@orkestrel/terminal 0.0.13 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,14 +1,13 @@
1
1
  # @orkestrel/terminal
2
2
 
3
- The terminal side of a form, for the `@orkestrel` line. `@orkestrel/form` owns
4
- the document — the schema, the twelve controls, the rules, the values, and the
5
- settle-once `answer` promise. This package owns what form has no opinion about:
6
- a key decoder, a theme, pure per-field reducers, and three surfaces one form
7
- can be answered on. The server `Terminal` implements the one driving contract
8
- against a real TTY (raw-mode stdin, live in-place re-render, a `node:readline`
9
- fallback when piped). The headless `Prompt` broker PARKS a live form until
10
- somebody elsewhere answers it. The `PromptClient` bridge carries a form parked
11
- elsewhere to this machine's keyboard over SSE. Built beside
3
+ > The terminal side of a form: a key decoder, a presentation theme, the pure per-field reducers,
4
+ > the headless broker that parks a live form until somebody elsewhere answers it, the SSE bridge
5
+ > that carries a parked form to a machine with a keyboard, and the manager that routes parked
6
+ > forms between named endpoints.
7
+
8
+ `@orkestrel/form` owns the document — the schema, the controls, the rules,
9
+ the values, and the settle-once `answer` promise — and this package declares
10
+ none of it a second time. Part of the `@orkestrel` line, built beside
12
11
  `@orkestrel/console` (the shared style engine), `@orkestrel/contract`,
13
12
  `@orkestrel/emitter`, `@orkestrel/database`, and `@orkestrel/sse`.
14
13
 
@@ -18,10 +17,6 @@ elsewhere to this machine's keyboard over SSE. Built beside
18
17
  npm install @orkestrel/terminal
19
18
  ```
20
19
 
21
- `@orkestrel/form` is pinned to a committed tarball until it is published, so
22
- this package is not publishable yet. The pin, its standing conditions, and the
23
- re-pin recipe are recorded in [guides/terminal.md](./guides/terminal.md).
24
-
25
20
  ## Requirements
26
21
 
27
22
  - Node.js >= 22
@@ -46,7 +41,7 @@ const values = await terminal.ask(
46
41
  )
47
42
  ```
48
43
 
49
- A bare return binds ABSENCE, not the empty string, so `required` refuses it and
44
+ A bare return binds absence, not the empty string, so `required` refuses it and
50
45
  the walk asks again.
51
46
 
52
47
  Park a live form and answer it from anywhere else:
@@ -60,7 +55,7 @@ prompt.emitter.on('pending', (form) => send(form)) // the wire-safe record
60
55
 
61
56
  const form = createForm({ fields: [{ control: 'text', name: 'name' }] })
62
57
  const id = prompt.park(form) // the id; you await the form's own `answer`
63
- prompt.answer(id, { name: 'Ada' }) // fills and submits the AUTHORITATIVE form
58
+ prompt.answer(id, { name: 'Ada' }) // fills and submits the authoritative form
64
59
  const values = await form.answer // { name: 'Ada' }
65
60
  ```
66
61
 
@@ -85,7 +80,7 @@ the multi-endpoint manager, the stores, and the TTY driver.
85
80
 
86
81
  ## Package
87
82
 
88
- Two entry points, per the `exports` field in `package.json`: `.` (the
83
+ The entry points, per the `exports` field in `package.json`, are `.` (the
89
84
  host-independent core — the reducers, the broker, the bridge, the manager, and
90
85
  the stores) and `./server` (the Node-only `Terminal` driver). Both entry points
91
86
  ship dual ESM+CJS builds.