@orkestrel/scaffold 0.0.120 → 0.0.122
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/dist/agents/skills/orkestrel-dispatch/scripts/brief.js +57 -9
- package/dist/agents/skills/orkestrel-dispatch/scripts/chain.js +22 -2
- package/dist/agents/skills/orkestrel-publish/scripts/pins.js +5 -5
- package/dist/agents/skills/orkestrel-publish/scripts/wave.js +67 -5
- package/dist/bin/main.js +5 -5
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/orchestration.md +16 -11
- package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +4 -4
- package/dist/host/agents/skills/orkestrel-dispatch/references/launch.md +2 -1
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/brief.ts +65 -9
- package/dist/host/agents/skills/orkestrel-dispatch/scripts/chain.ts +28 -2
- package/dist/host/agents/skills/orkestrel-falsify/references/brief.md +2 -1
- package/dist/host/agents/skills/orkestrel-harden/SKILL.md +8 -8
- package/dist/host/agents/skills/orkestrel-harden/references/hardening.md +3 -3
- package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +2 -2
- package/dist/host/agents/skills/orkestrel-publish/SKILL.md +10 -8
- package/dist/host/agents/skills/orkestrel-publish/references/release.md +2 -2
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +22 -8
- package/dist/host/agents/skills/orkestrel-publish/references/window.md +5 -1
- package/dist/host/agents/skills/orkestrel-publish/scripts/pins.ts +5 -5
- package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +86 -7
- package/dist/host/claude/AGENTS.md +1 -1
- package/dist/host/claude/agents/analyst.md +1 -1
- package/dist/host/claude/agents/opus.md +7 -6
- package/dist/host/claude/agents/orkestrel.md +26 -26
- package/dist/host/claude/agents/planner.md +3 -3
- package/dist/host/claude/agents/reviewer.md +3 -3
- package/dist/host/claude/agents/verifier.md +1 -1
- package/dist/host/claude/rules/campaign.md +3 -2
- package/dist/host/claude/rules/names.md +13 -7
- package/dist/host/claude/rules/tests.md +1 -1
- package/dist/host/claude/rules/workspace.md +9 -0
- package/dist/host/claude/skills/orkestrel-harden/SKILL.md +1 -1
- package/dist/host/codex/agents/analyst.toml +2 -5
- package/dist/host/codex/agents/opus.toml +5 -3
- package/dist/host/codex/agents/planner.toml +6 -5
- package/dist/host/codex/agents/reviewer.toml +4 -7
- package/dist/host/codex/agents/verifier.toml +2 -2
- package/dist/host/dotfiles/gitignore +1 -2
- package/dist/host/guides/agent.md +5 -5
- package/dist/host/guides/brief.md +7 -15
- package/dist/host/guides/browser.md +1 -1
- package/dist/host/guides/capture.md +2 -2
- package/dist/host/guides/console.md +4 -30
- package/dist/host/guides/guide.md +0 -1
- package/dist/host/guides/interpret.md +165 -182
- package/dist/host/guides/lsp.md +26 -51
- package/dist/host/guides/mcp.md +220 -276
- package/dist/host/guides/middleware.md +14 -22
- package/dist/host/guides/ollama.md +1 -3
- package/dist/host/guides/probe.md +71 -80
- package/dist/host/guides/program.md +26 -35
- package/dist/host/guides/qualifier.md +0 -6
- package/dist/host/guides/queue.md +0 -4
- package/dist/host/guides/rater.md +6 -12
- package/dist/host/guides/relation.md +0 -2
- package/dist/host/guides/scaffold.md +18 -9
- package/dist/host/guides/sea.md +47 -51
- package/dist/host/guides/server.md +15 -19
- package/dist/host/guides/terminal.md +0 -26
- package/dist/host/guides/toolbox.md +0 -10
- package/dist/host/guides/worker.md +57 -57
- package/dist/host/guides/workflow.md +13 -26
- package/dist/host/guides/workspace.md +15 -21
- package/dist/host/manifest.json +63 -483
- package/dist/host/tests/config.test.ts +7 -0
- package/dist/src/core/index.cjs +13 -46
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.js +13 -46
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +10 -9
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +12 -8
- package/dist/src/server/index.d.ts +12 -8
- package/dist/src/server/index.js +10 -9
- package/dist/src/server/index.js.map +1 -1
- package/package.json +5 -5
- /package/dist/host/agents/skills/orkestrel-parallel/references/{claude.md → claude-code.md} +0 -0
|
@@ -58,11 +58,11 @@ Cross-face and substrate usage appear under [Patterns](#patterns).
|
|
|
58
58
|
|
|
59
59
|
### Factories
|
|
60
60
|
|
|
61
|
-
| Name | Kind | Signature | Summary
|
|
62
|
-
| ------------------ | -------- | --------------------------------------------------------------------- |
|
|
63
|
-
| `createNegotiator` | function | `() => NegotiatorInterface` | Creates a `NegotiatorInterface` — the reusable content-negotiation machine over the weighted `Accept` family.
|
|
64
|
-
| `createServer` | function | `<TState>(options: ServerOptions<TState>) => ServerInterface<TState>` | Creates a `ServerInterface` — the node face's HTTP server facade over a consumed `@orkestrel/router` dispatcher.
|
|
65
|
-
| `createStream` | function | `(options?: StreamOptions) =>
|
|
61
|
+
| Name | Kind | Signature | Summary |
|
|
62
|
+
| ------------------ | -------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
63
|
+
| `createNegotiator` | function | `() => NegotiatorInterface` | Creates a `NegotiatorInterface` — the reusable content-negotiation machine over the weighted `Accept` family. |
|
|
64
|
+
| `createServer` | function | `<TState>(options: ServerOptions<TState>) => ServerInterface<TState>` | Creates a `ServerInterface` — the node face's HTTP server facade over a consumed `@orkestrel/router` dispatcher. |
|
|
65
|
+
| `createStream` | function | `(options?: StreamOptions) => SSEStreamInterface` | Creates an `SSEStreamInterface` — a generic Server-Sent-Events stream whose `response` is a fetch-standard streaming `Response` a route returns. |
|
|
66
66
|
|
|
67
67
|
### Startup ownership
|
|
68
68
|
|
|
@@ -77,8 +77,6 @@ cleanup finish before the start event is emitted.
|
|
|
77
77
|
|
|
78
78
|
### Constants
|
|
79
79
|
|
|
80
|
-
A `Shape` cell holds the constant's declared type.
|
|
81
|
-
|
|
82
80
|
| Name | Kind | Signature | Summary |
|
|
83
81
|
| ---------------------------- | ----- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
84
82
|
| `DEFAULT_DRAIN_MS` | const | `10000` | Names the default graceful-stop deadline `stop()` gives in-flight requests and claimed upgraded sockets, `10_000` ms. |
|
|
@@ -148,12 +146,10 @@ A `Shape` cell holds the constant's declared type.
|
|
|
148
146
|
| `ServerError` | class | `new (code: ServerErrorCode, message: string, context?: Readonly<Record<string, unknown>>) => ServerError` | Represents the error this package raises when a caller programmed a call the entity refuses, carrying `'STATUS'` or `'NEXT'` as its code. |
|
|
149
147
|
| `Negotiator` | class | `new () => NegotiatorInterface` | Represents the content-negotiation machine over the weighted `Accept` family — a reusable, cross-middleware entity rather than a middleware. Implements exactly `NegotiatorInterface`. |
|
|
150
148
|
| `Server` | class | `new <TState>(options: ServerOptions<TState>) => ServerInterface<TState>` | Represents the HTTP server facade — an observable `node:http` lifecycle composing this module's own middleware onion around a consumed `@orkestrel/router` dispatcher. Implements exactly `ServerInterface`. |
|
|
151
|
-
| `Stream` | class | `new (options?: StreamOptions) =>
|
|
149
|
+
| `Stream` | class | `new (options?: StreamOptions) => SSEStreamInterface` | Represents the Server-Sent-Events handle over an open, fetch-standard streaming `Response`. Implements exactly `SSEStreamInterface`. |
|
|
152
150
|
|
|
153
151
|
### Types
|
|
154
152
|
|
|
155
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`.
|
|
156
|
-
|
|
157
153
|
| Name | Kind | Signature | Summary |
|
|
158
154
|
| ------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
159
155
|
| `MiddlewareContext` | interface | `{ url, method, state, body() }` | Represents the composition context — plain data, one per request, shared by every middleware and, as `state`, by the route handlers behind the dispatcher. |
|
|
@@ -169,8 +165,8 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
169
165
|
| `FormatHandlerMap` | type | `Readonly<Record<string, (request: Request, context: MiddlewareContext<TState>) => Response \| Promise<Response>>>` | Represents a map of media type → handler for `NegotiatorInterface.format` — the content-negotiation dispatch table. |
|
|
170
166
|
| `NegotiatorInterface` | interface | `{ negotiate(), encoding(), language(), format() }` | Represents content negotiation over the weighted `Accept` family — a reusable, cross-middleware machine (not itself a middleware). |
|
|
171
167
|
| `SSEMessage` | interface | `{ data, event?, id?, retry? }` | Represents one Server-Sent Event to serialize to the wire. |
|
|
172
|
-
| `StreamOptions` | interface | `{ status?, headers? }` | Options for
|
|
173
|
-
| `
|
|
168
|
+
| `StreamOptions` | interface | `{ status?, headers? }` | Options for an `SSEStreamInterface` — how `createStream` opens the streaming response. |
|
|
169
|
+
| `SSEStreamInterface` | interface | `{ response, closed, write(), comment(), drain(), end() }` | Represents a handle to write Server-Sent Events to an open, fetch-standard streaming `Response` — the generic streaming surface `createStream` returns over a `ReadableStream`. |
|
|
174
170
|
| `RangeSpec` | type | `{ readonly satisfiable: true; readonly start: number; readonly end: number; } \| { readonly satisfiable: false; }` | Represents the parsed outcome of an HTTP `Range` request header. |
|
|
175
171
|
| `BodyOptions` | interface | `{ limit?, decompression? }` | Options for `readBody` — how the shared body-collection pipeline caps and decompresses a request body. |
|
|
176
172
|
| `ServerStatus` | type | `'idle' \| 'starting' \| 'listening' \| 'stopping' \| 'stopped'` | Represents the `Server`'s lifecycle state. |
|
|
@@ -201,7 +197,7 @@ The error guards and request readers expose these primitives.
|
|
|
201
197
|
|
|
202
198
|
## Methods
|
|
203
199
|
|
|
204
|
-
The public methods of `NegotiatorInterface`, `
|
|
200
|
+
The public methods of `NegotiatorInterface`, `SSEStreamInterface`, and
|
|
205
201
|
`ServerInterface` — every call-signature member listed (their `readonly` data
|
|
206
202
|
members stay Surface rows). `Negotiator`, `Server`, and `Stream` implement
|
|
207
203
|
their interfaces exactly, so their tables also double as each class's
|
|
@@ -226,7 +222,7 @@ coding, because an absent `Accept-Encoding` makes identity the correct answer;
|
|
|
226
222
|
| `language` | `string \| undefined` | Picks the best `available` language for an `Accept-Language` header — `negotiate` with a language-prefix match (`en` accepts `en-US`) and a bare `*` wildcard. |
|
|
227
223
|
| `format` | `Promise<Response>` | Dispatches to the handler whose media type the client most prefers — reads the request `Accept`, negotiates against `handlers`' keys, and invokes the winner; `406` when none is acceptable. |
|
|
228
224
|
|
|
229
|
-
#### `
|
|
225
|
+
#### `SSEStreamInterface`
|
|
230
226
|
|
|
231
227
|
`write` always accepts an event while open and returns whether the local
|
|
232
228
|
`ReadableStream` queue still has positive desired size afterward. A producer
|
|
@@ -274,7 +270,7 @@ These invariants hold across `src/server` ↔ `server.md`.
|
|
|
274
270
|
source directory, and every export appears as a Surface row — exhaustive,
|
|
275
271
|
both directions.
|
|
276
272
|
2. **Doc ↔ source method bijection.** The `## Methods` tables list exactly
|
|
277
|
-
`NegotiatorInterface`'s, `
|
|
273
|
+
`NegotiatorInterface`'s, `SSEStreamInterface`'s, and `ServerInterface`'s public
|
|
278
274
|
methods — exhaustive, both directions — and `Negotiator` / `Stream` /
|
|
279
275
|
`Server` expose the same public methods, no more.
|
|
280
276
|
3. **Status machine + bound address + restart-fresh-abort.**
|
|
@@ -484,7 +480,7 @@ These invariants hold across `src/server` ↔ `server.md`.
|
|
|
484
480
|
Object and callable contexts are accepted. Subclass names are unrestricted. Transparent
|
|
485
481
|
proxies, unbranded look-alikes, and branded plain objects are rejected.
|
|
486
482
|
19. **SSE producers can cooperate with real process-local transport
|
|
487
|
-
backpressure.** `
|
|
483
|
+
backpressure.** `SSEStreamInterface.write` returns `true` only while the
|
|
488
484
|
underlying `ReadableStream` controller retains positive desired size after
|
|
489
485
|
accepting the event. A `false` result tells a cooperative producer to await
|
|
490
486
|
`drain()`; that promise parks without polling until a consumer pull restores
|
|
@@ -592,10 +588,10 @@ handle afterwards; a `write` that reports `false` is backpressure `drain`
|
|
|
592
588
|
waits out.
|
|
593
589
|
|
|
594
590
|
```ts
|
|
595
|
-
import type {
|
|
591
|
+
import type { SSEStreamInterface } from '@orkestrel/server'
|
|
596
592
|
import { createStream } from '@orkestrel/server'
|
|
597
593
|
|
|
598
|
-
async function pumpStream(stream:
|
|
594
|
+
async function pumpStream(stream: SSEStreamInterface): Promise<void> {
|
|
599
595
|
if (!stream.write({ event: 'token', data: 'hello' })) await stream.drain()
|
|
600
596
|
stream.comment('keep-alive')
|
|
601
597
|
stream.end()
|
|
@@ -774,7 +770,7 @@ new TextDecoder().decode(body) // 'hi' — capped decompression, the zip-bomb de
|
|
|
774
770
|
## Tests
|
|
775
771
|
|
|
776
772
|
- [`tests/guides.test.ts`](../tests/guides.test.ts) — the `## Surface` ↔ `src/server`
|
|
777
|
-
bijection (value and type exports), the `NegotiatorInterface` / `
|
|
773
|
+
bijection (value and type exports), the `NegotiatorInterface` / `SSEStreamInterface` /
|
|
778
774
|
`ServerInterface` ↔ implementing-class method bijections, and the equality gate:
|
|
779
775
|
every `Summary` cell against its declaration's description paragraph, the titled
|
|
780
776
|
`Substrate direct use — tokens, cookies, negotiation` fence against the `@example`
|
|
@@ -98,8 +98,6 @@ symbol from form.
|
|
|
98
98
|
|
|
99
99
|
What a driver is, and what one step of a field reducer produces ([`src/core`](../src/core)).
|
|
100
100
|
|
|
101
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`.
|
|
102
|
-
|
|
103
101
|
| Name | Kind | Signature | Summary |
|
|
104
102
|
| ------------------- | --------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
105
103
|
| `TerminalInterface` | interface | `{ ask() }` | Declares the contract for asking a form of a human at a keyboard — `ask` and nothing beside it, because a form is one question however many fields it holds. The server `Terminal` implements it against a real TTY; a `PromptClientInterface` holds one to answer forms parked elsewhere. |
|
|
@@ -111,8 +109,6 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
111
109
|
The TTY-agnostic decoder every driver reads keystrokes through ([`src/core`](../src/core)). Pure and
|
|
112
110
|
total: no `node:*`, no I/O, and no input throws.
|
|
113
111
|
|
|
114
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to.
|
|
115
|
-
|
|
116
112
|
| Name | Kind | Signature | Summary |
|
|
117
113
|
| ------------- | --------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
118
114
|
| `KeyEvent` | interface | `{ name?, sequence, ctrl, meta, shift }` | Represents one decoded keypress — the TTY-agnostic representation of a single key, the output of `parseKey`. A driver reads `name` and the modifier flags to decide its transition; `sequence` is preserved so a printable character round-trips and an unknown escape is never lost. |
|
|
@@ -125,8 +121,6 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
125
121
|
A theme is data — a glyph per icon slot and a console `Style` per semantic role — plus the shared
|
|
126
122
|
line shapes every view is assembled from ([`src/core`](../src/core)).
|
|
127
123
|
|
|
128
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to.
|
|
129
|
-
|
|
130
124
|
| Name | Kind | Signature | Summary |
|
|
131
125
|
| -------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
132
126
|
| `PromptIcon` | type | `'question' \| 'pointer' \| 'dot' \| 'selected' \| 'checked' \| 'unchecked' \| 'success' \| 'error'` | Names one glyph slot a rendered field draws — the icon axis of a `PromptTheme`. A named value set, not a toggle, so it stays a union. |
|
|
@@ -145,8 +139,6 @@ The pure `(state, key) → PromptStep` machines the driver feeds decoded keys in
|
|
|
145
139
|
([`src/core`](../src/core)). Each is total and copy-on-write, and each produces a candidate value
|
|
146
140
|
only: the form validates, the form settles, and none of this code does either.
|
|
147
141
|
|
|
148
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to.
|
|
149
|
-
|
|
150
142
|
| Name | Kind | Signature | Summary |
|
|
151
143
|
| --------------------- | --------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
152
144
|
| `InputState` | interface | `{ message, default, styler, theme, value }` | Represents the immutable state a text field's reducer carries — built by `createInputState`, rendered by `renderInputView`, and advanced by `reduceInput`. |
|
|
@@ -191,8 +183,6 @@ safe to print ([`src/core`](../src/core)).
|
|
|
191
183
|
The park-as-promise arm — no terminal here, so a transport forwards each `pending` record to whoever
|
|
192
184
|
can answer, and `answer` drives the parked form to settlement ([`src/core`](../src/core)).
|
|
193
185
|
|
|
194
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
195
|
-
|
|
196
186
|
| Name | Kind | Signature | Summary |
|
|
197
187
|
| --------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
198
188
|
| `PromptInterface` | interface | `{ emitter, count, park(), pending(), answer(), stop(), destroy() }` | Declares the headless form broker — parks a live form until somebody elsewhere answers it. The headless arm of the local-TTY, headless, and remote trio: there is no terminal here, so a transport forwards each `pending` record to whoever can answer, and `answer` drives the parked form to settlement. |
|
|
@@ -216,8 +206,6 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
216
206
|
The `http`-free frame shape a consumer's own HTTP spine mounts the broker over
|
|
217
207
|
([`src/core`](../src/core)).
|
|
218
208
|
|
|
219
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to.
|
|
220
|
-
|
|
221
209
|
| Name | Kind | Signature | Summary |
|
|
222
210
|
| ------------------ | --------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
223
211
|
| `WireEvent` | interface | `{ event, data, id? }` | Represents one SSE-shaped wire frame — the `event` name, its already-stringified `data` payload, and an optional `id`. The transport-neutral shape `serializePending`, `serializeExpire`, and `serializeDestroy` build, with no `http` dependency. |
|
|
@@ -232,8 +220,6 @@ The client-side counterpart to the broker: receive a form parked elsewhere, rebu
|
|
|
232
220
|
through a local terminal, and POST the answers back ([`src/core`](../src/core)). Universal — `fetch`
|
|
233
221
|
and SSE are web standards.
|
|
234
222
|
|
|
235
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
236
|
-
|
|
237
223
|
| Name | Kind | Signature | Summary |
|
|
238
224
|
| ----------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
239
225
|
| `PromptClientInterface` | interface | `{ emitter, url, connected, connect(), disconnect(), destroy() }` | Declares the SSE form bridge — the client-side counterpart to `PromptInterface`. It receives serialized `PendingForm` records from a remote broker, rebuilds each schema locally, drives it through a `TerminalInterface`, and POSTs the answer back, so a human at this machine answers forms a broker parked elsewhere. |
|
|
@@ -252,8 +238,6 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
252
238
|
A named registry of brokers, so several parties can ask forms of each other by name with a `from` →
|
|
253
239
|
`to` edge on every parked record ([`src/core`](../src/core)).
|
|
254
240
|
|
|
255
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
256
|
-
|
|
257
241
|
| Name | Kind | Signature | Summary |
|
|
258
242
|
| -------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
259
243
|
| `TerminalManagerInterface` | interface | `{ emitter, count, terminal(), terminals(), add(), ask(), pending(), answer(), open(), save(), remove(), destroy() }` | Declares a registry of named `PromptInterface` brokers, one per endpoint, so several parties (agents, tools, humans) can ask forms of each other by name, attributed with a `from` → `to` edge on every parked record. |
|
|
@@ -268,8 +252,6 @@ A `Shape` cell holds an interface's data members as bare names in braces, `?` ma
|
|
|
268
252
|
The point-access persistence seam for a manager's endpoint config — config only, because a parked
|
|
269
253
|
form is process-bound and is never resurrected ([`src/core`](../src/core)).
|
|
270
254
|
|
|
271
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
272
|
-
|
|
273
255
|
| Name | Kind | Signature | Summary |
|
|
274
256
|
| ----------------------------- | --------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
275
257
|
| `TerminalStoreInterface` | interface | `{ get(), set(), delete() }` | Declares the point-access persistence seam for a `TerminalManagerInterface`'s endpoint configs. Every primitive is async; deleting an absent id is a no-op. |
|
|
@@ -287,8 +269,6 @@ Terminal's own failure type. A refusal that belongs to the form — a malformed
|
|
|
287
269
|
control cannot hold, a write to a settled form — arrives as form's own `FormError` and is never
|
|
288
270
|
re-coded ([`src/core`](../src/core)).
|
|
289
271
|
|
|
290
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
291
|
-
|
|
292
272
|
| Name | Kind | Signature | Summary |
|
|
293
273
|
| ------------------- | -------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
294
274
|
| `TerminalErrorCode` | type | `'EXPIRE' \| 'CANCEL' \| 'DRIVER' \| 'DEADLOCK' \| 'TARGET' \| 'LIMIT' \| 'DESTROYED'` | Names the machine-readable condition carried by a `TerminalError` — the axis a `catch` branches on. Names its axis (the failure condition), never `kind`. |
|
|
@@ -302,8 +282,6 @@ The decode tables, the default mask, the theme defaults, and the broker and SSE
|
|
|
302
282
|
`String.fromCharCode` or read from console's own `ESC` and `CSI`, so no raw control character
|
|
303
283
|
appears in source.
|
|
304
284
|
|
|
305
|
-
A `Shape` cell holds the constant's declared type.
|
|
306
|
-
|
|
307
285
|
| Name | Kind | Signature | Summary |
|
|
308
286
|
| ---------------------------- | ----- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
309
287
|
| `RETURN` | const | `string` | Names the carriage return byte (`\r`, U+000D) — Enter on most terminals. |
|
|
@@ -337,8 +315,6 @@ The local-TTY arm and the only impure part of the stack ([`src/server`](../src/s
|
|
|
337
315
|
raw-mode stdin, drives the core reducers, renders each view in place, and falls back to
|
|
338
316
|
`node:readline` when piped. Every form contract is imported from core and none is redeclared here.
|
|
339
317
|
|
|
340
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A class row's `Shape` cell holds the interface it implements, or its constructor signature where it implements none.
|
|
341
|
-
|
|
342
318
|
| Name | Kind | Signature | Summary |
|
|
343
319
|
| ---------------------- | --------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
344
320
|
| `Terminal` | class | `new (options?: TerminalOptions) => TerminalInterface` | Implements `TerminalInterface` for a human at this machine's keyboard — the interactive form driver, and the only impure part of the terminal stack. `ask` walks one form's fields in schema order, feeds raw-mode stdin bytes through `parseKey` into the matching pure reducer, renders each returned view in place, binds every answer through the form's own `fill`, and re-asks what the form refused. It owns no form logic: the schema, the rules, the values, and the settlement all belong to the form it is given, and this class owns only raw mode, the cursor, and the re-render. |
|
|
@@ -375,8 +351,6 @@ The cursor and clear sequences the driver writes, and the fixed copy the walk re
|
|
|
375
351
|
([`src/server`](../src/server)). Sequences are built from console's own `CSI`, so no raw control
|
|
376
352
|
character appears in source.
|
|
377
353
|
|
|
378
|
-
A `Shape` cell holds the constant's declared type.
|
|
379
|
-
|
|
380
354
|
| Name | Kind | Signature | Summary |
|
|
381
355
|
| ------------------------ | ----- | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
382
356
|
| `CSI_UP` | const | `string` | Holds the cursor-up sequence template (`ESC[{count}A`) — `renderCursorUp` interpolates the `{count}` placeholder with the number of lines to climb. Kept as a template so the count stays out of the constant. |
|
|
@@ -64,8 +64,6 @@ Concrete `DefinitionStoreInterface` implementations (AGENTS' Stores rule, point-
|
|
|
64
64
|
|
|
65
65
|
The total `(value: unknown) => value is T` guards this package applies at its untrusted boundaries — an authored lineage, a frozen agent adapter, the small-model column DSL, and a persisted database definition read back from a store.
|
|
66
66
|
|
|
67
|
-
In a guard table a `Shape` cell holds the type the guard narrows to.
|
|
68
|
-
|
|
69
67
|
| Name | Kind | Signature | Summary |
|
|
70
68
|
| ---------------------- | -------- | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
71
69
|
| `isWorkflowLineage` | function | `(value: unknown) => value is WorkflowLineage` | Narrows an unknown value to a valid alternating workflow lineage. |
|
|
@@ -115,8 +113,6 @@ The `TableSpec` column DSL compiled into the live `@orkestrel/database` `TableMa
|
|
|
115
113
|
|
|
116
114
|
The shape values each `create*Tool` factory (and `createWorkflowDraftContract`) compiles into the lockstep guard / parser / JSON Schema outputs under AGENTS' narrow-untrusted-input-with-guards rule; `agentToolShape` agrees with the hand-written `AgentToolArguments`, the source of truth.
|
|
117
115
|
|
|
118
|
-
A `Shape` cell holds the constant's declared type.
|
|
119
|
-
|
|
120
116
|
| Name | Kind | Signature | Summary |
|
|
121
117
|
| ---------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
122
118
|
| `agentToolShape` | const | `import("@orkestrel/contract").ObjectShape<{ task: import("@orkestrel/contract").StringShape; provider: import("@orkestrel/contract").OptionalShape<import("@orkestrel/contract").StringShape>; tools: import("@orkestrel/contract").OptionalShape<import("@orkestrel/contract").ArrayShape<import("@orkestrel/contract").StringShape>>; system: import("@orkestrel/contract").OptionalShape<import("@orkestrel/contract").StringShape>; }, false>` | Describes the shape of `AgentToolArguments` — `createAgentTool`'s advertised `parameters`. |
|
|
@@ -147,8 +143,6 @@ A `Shape` cell holds the constant's declared type.
|
|
|
147
143
|
|
|
148
144
|
### Constants
|
|
149
145
|
|
|
150
|
-
A `Shape` cell holds the constant's declared type.
|
|
151
|
-
|
|
152
146
|
| Name | Kind | Signature | Summary |
|
|
153
147
|
| ------------------------------ | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
154
148
|
| `AGENT_TOOL_NAME` | const | `"agent"` | Holds the name `createAgentTool` advertises by default, `'agent'` — the key a model calls and the `ToolManagerInterface` (`@orkestrel/tool`) registers under. |
|
|
@@ -190,8 +184,6 @@ A `Shape` cell holds the constant's declared type.
|
|
|
190
184
|
|
|
191
185
|
### Types
|
|
192
186
|
|
|
193
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`.
|
|
194
|
-
|
|
195
187
|
| Name | Kind | Signature | Summary |
|
|
196
188
|
| -------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
197
189
|
| `TaskDraft` | interface | `{ id?, name?, description?, behavior?, retries?, timeout? }` | Represents a draft task — a `TaskDefinition` (`@orkestrel/workflow`) with optional `id` and `name`. |
|
|
@@ -234,8 +226,6 @@ The wire bridge for a `TerminalManagerInterface` — a GET SSE stream and a POST
|
|
|
234
226
|
|
|
235
227
|
The POST endpoint takes `{ id, values }`, admits the body only when `id` is a nonempty string and `values` passes `@orkestrel/form`'s `isFormValues`, and returns the manager's own answer `Result` as a JSON body — `200` accepted, `422` an `'unknown'` / `'rejected'` outcome, `404` a `'target'` outcome. The body is what carries a rejection's per-field `errors` back to the answering client, so `PromptClient` can re-render the failed fields instead of guessing from a status code.
|
|
236
228
|
|
|
237
|
-
A `Shape` cell holds an interface's data members as bare names in braces, `?` marking an optional member and `plus` introducing its call-signature members, and a type alias's own type literal with a union's arms escaped as `\|`. A function row's `Shape` cell holds its signature, and a guard row's the type it narrows to. A `Shape` cell holds the constant's declared type.
|
|
238
|
-
|
|
239
229
|
| Name | Kind | Signature | Summary |
|
|
240
230
|
| ----------------------- | --------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
241
231
|
| `createTerminalRoutes` | function | `(manager: TerminalManagerInterface, options?: TerminalRoutesOptions) => readonly TerminalRoute[]` | Builds the GET SSE stream and POST answer routes that bridge a terminal manager onto the wire. |
|