Initial Commit
This commit is contained in:
19
openspec/archive/2026-04-20-enterprise-readline/proposal.md
Normal file
19
openspec/archive/2026-04-20-enterprise-readline/proposal.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# OpenSpec Change: enterprise-readline
|
||||
|
||||
**Change ID:** enterprise-readline
|
||||
**Date:** 2026-04-20
|
||||
**Status:** Shipped
|
||||
**Spec:** [docs/superpowers/specs/2026-04-20-readline-cli-design.md](/docs/superpowers/specs/2026-04-20-readline-cli-design.md)
|
||||
|
||||
## Summary
|
||||
|
||||
Introduces `@suaveplan/readline` as a new `universal/platform` package providing terminal I/O primitives: AsyncGenerator line reader (`readLines`), interactive prompt interface (`createInterface`), and byte scanner engine. This package satisfies `@suaveplan/cli`'s prompt module dependency on a universal readline abstraction instead of `node:readline` directly.
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
- `readLines(stream, signal?)` — async generator yielding UTF-8 lines
|
||||
- `createInterface({ input, output?, signal? })` — interactive readline interface with `question()` and `close()`
|
||||
- `ByteScanner` — low-level byte scanner engine
|
||||
- OTel spans on `createInterface` operations
|
||||
- AbortSignal support throughout
|
||||
- 100% istanbul coverage
|
||||
@@ -0,0 +1,21 @@
|
||||
# Spec: @suaveplan/readline
|
||||
|
||||
## Purpose
|
||||
|
||||
Terminal I/O primitive: async line reader, interactive readline interface, and byte scanner engine. Depends only on `@suaveplan/error`, `@suaveplan/types`, `@opentelemetry/api`, `zod`.
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### readLines
|
||||
- `readLines(stream: NodeJS.ReadableStream, signal?: AbortSignal): AsyncGenerator<string>`
|
||||
- Yields each newline-delimited UTF-8 line
|
||||
- Terminates cleanly on AbortSignal or stream close
|
||||
|
||||
### createInterface
|
||||
- `createInterface(opts: { input, output?, signal? }): ReadlineInterface`
|
||||
- Returns `{ question(prompt): Promise<string>, close(): void }`
|
||||
- OTel span per `question()` call
|
||||
- AbortSignal aborts pending question
|
||||
|
||||
### ByteScanner
|
||||
- Internal engine for buffered byte-level scanning
|
||||
5
openspec/archive/2026-04-20-enterprise-readline/tasks.md
Normal file
5
openspec/archive/2026-04-20-enterprise-readline/tasks.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Tasks: enterprise-readline
|
||||
|
||||
Implementation plan: [docs/superpowers/plans/2026-04-20-readline-cli.md](/docs/superpowers/plans/2026-04-20-readline-cli.md)
|
||||
|
||||
All tasks completed and shipped as @suaveplan/readline@0.0.0.
|
||||
Reference in New Issue
Block a user