@orkestrel/scaffold 0.0.139 → 0.0.140
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/bin/main.js +86 -26
- package/dist/bin/main.js.map +1 -1
- package/dist/host/claude/agents/orkestrel.md +51 -51
- package/dist/host/guides/abort.md +2 -0
- package/dist/host/guides/browser.md +1 -1
- package/dist/host/guides/guide.md +10 -2
- package/dist/host/guides/mcp.md +9 -9
- package/dist/host/guides/middleware.md +34 -49
- package/dist/host/guides/probe.md +1 -2
- package/dist/host/guides/scaffold.md +25 -16
- package/dist/host/guides/server.md +5 -5
- package/dist/host/manifest.json +10 -10
- package/dist/host/scripts/browsers.sh +0 -0
- package/dist/host/scripts/codex.sh +0 -0
- package/dist/host/scripts/cursor.sh +0 -0
- package/dist/host/scripts/deps.sh +0 -0
- package/dist/host/scripts/npm.sh +0 -0
- package/dist/host/scripts/ollama.sh +0 -0
- package/dist/src/core/index.cjs +14 -14
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.js +14 -14
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +6 -24
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +1 -1
- package/dist/src/server/index.d.ts +1 -1
- package/dist/src/server/index.js +7 -25
- package/dist/src/server/index.js.map +1 -1
- package/package.json +11 -11
|
@@ -43,58 +43,58 @@ Treat generated package identifiers, versions, layers, and dependency ranges as
|
|
|
43
43
|
|
|
44
44
|
| Package | Version | Layer | Runtime dependencies | Peer dependencies |
|
|
45
45
|
| ----------------------- | --------- | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
46
|
-
| `@orkestrel/abort` | `0.0.
|
|
47
|
-
| `@orkestrel/agent` | `0.0.
|
|
48
|
-
| `@orkestrel/brief` | `0.0.
|
|
49
|
-
| `@orkestrel/browser` | `0.0.
|
|
50
|
-
| `@orkestrel/budget` | `0.0.
|
|
51
|
-
| `@orkestrel/capture` | `0.0.
|
|
52
|
-
| `@orkestrel/codec` | `0.0.
|
|
53
|
-
| `@orkestrel/console` | `0.0.
|
|
46
|
+
| `@orkestrel/abort` | `0.0.19` | L1 | `@orkestrel/contract` `^0.0.26` | |
|
|
47
|
+
| `@orkestrel/agent` | `0.0.46` | L5 | `@orkestrel/tool` `^0.0.25`, `@orkestrel/abort` `^0.0.19`, `@orkestrel/queue` `^0.0.25`, `@orkestrel/budget` `^0.0.20`, `@orkestrel/ndjson` `^0.0.19`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/timeout` `^0.0.19`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/database` `^0.0.28`, `@orkestrel/workflow` `^0.0.31`, `@orkestrel/workspace` `^0.0.21` | |
|
|
48
|
+
| `@orkestrel/brief` | `0.0.20` | L4 | `@orkestrel/reason` `^0.0.20`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/interpret` `^0.0.25` | |
|
|
49
|
+
| `@orkestrel/browser` | `0.0.35` | L5 | `@orkestrel/mcp` `^0.0.45`, `@orkestrel/html` `^0.0.18`, `@orkestrel/pool` `^0.0.23`, `@orkestrel/tool` `^0.0.25`, `@orkestrel/codec` `^0.0.12`, `@orkestrel/router` `^0.0.24`, `@orkestrel/server` `^0.0.30`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/process` `^0.0.22`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/markdown` `^0.0.23`, `@orkestrel/websocket` `^0.0.21` | |
|
|
50
|
+
| `@orkestrel/budget` | `0.0.20` | L1 | `@orkestrel/contract` `^0.0.26` | |
|
|
51
|
+
| `@orkestrel/capture` | `0.0.11` | L3 | `@orkestrel/process` `^0.0.22`, `@orkestrel/timeout` `^0.0.19`, `@orkestrel/contract` `^0.0.26` | `vite` `^8.3.8`, `vitest` `^5.1.0`, `playwright` `^1.65.0`, `@orkestrel/test` `~0.0.41`, `@vitest/browser-playwright` `^5.0.5` |
|
|
52
|
+
| `@orkestrel/codec` | `0.0.12` | L1 | `@orkestrel/contract` `^0.0.26` | |
|
|
53
|
+
| `@orkestrel/console` | `0.0.22` | L2 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
54
54
|
| `@orkestrel/contract` | `0.0.26` | L0 | | |
|
|
55
|
-
| `@orkestrel/csv` | `0.0.
|
|
56
|
-
| `@orkestrel/database` | `0.0.
|
|
57
|
-
| `@orkestrel/emitter` | `0.0.
|
|
58
|
-
| `@orkestrel/form` | `0.0.
|
|
59
|
-
| `@orkestrel/guide` | `0.0.
|
|
60
|
-
| `@orkestrel/html` | `0.0.
|
|
61
|
-
| `@orkestrel/indexeddb` | `0.0.
|
|
62
|
-
| `@orkestrel/interpret` | `0.0.
|
|
63
|
-
| `@orkestrel/jsonrpc` | `0.0.
|
|
64
|
-
| `@orkestrel/lsp` | `0.0.
|
|
65
|
-
| `@orkestrel/markdown` | `0.0.
|
|
66
|
-
| `@orkestrel/mcp` | `0.0.
|
|
67
|
-
| `@orkestrel/middleware` | `0.0.
|
|
68
|
-
| `@orkestrel/msg` | `0.0.
|
|
69
|
-
| `@orkestrel/ndjson` | `0.0.
|
|
70
|
-
| `@orkestrel/ollama` | `0.0.
|
|
71
|
-
| `@orkestrel/pool` | `0.0.
|
|
72
|
-
| `@orkestrel/probe` | `0.0.
|
|
73
|
-
| `@orkestrel/process` | `0.0.
|
|
74
|
-
| `@orkestrel/program` | `0.0.
|
|
75
|
-
| `@orkestrel/qualifier` | `0.0.
|
|
76
|
-
| `@orkestrel/queue` | `0.0.
|
|
77
|
-
| `@orkestrel/rater` | `0.0.
|
|
78
|
-
| `@orkestrel/reason` | `0.0.
|
|
79
|
-
| `@orkestrel/relation` | `0.0.
|
|
80
|
-
| `@orkestrel/router` | `0.0.
|
|
81
|
-
| `@orkestrel/scaffold` | `0.0.
|
|
82
|
-
| `@orkestrel/sea` | `0.0.
|
|
83
|
-
| `@orkestrel/server` | `0.0.
|
|
84
|
-
| `@orkestrel/sqlite` | `0.0.
|
|
85
|
-
| `@orkestrel/sse` | `0.0.
|
|
86
|
-
| `@orkestrel/study` | `0.0.
|
|
87
|
-
| `@orkestrel/table` | `0.0.
|
|
88
|
-
| `@orkestrel/template` | `0.0.
|
|
89
|
-
| `@orkestrel/terminal` | `0.0.
|
|
90
|
-
| `@orkestrel/test` | `0.0.
|
|
91
|
-
| `@orkestrel/timeout` | `0.0.
|
|
92
|
-
| `@orkestrel/tool` | `0.0.
|
|
93
|
-
| `@orkestrel/toolbox` | `0.0.
|
|
94
|
-
| `@orkestrel/websocket` | `0.0.
|
|
95
|
-
| `@orkestrel/worker` | `0.0.
|
|
96
|
-
| `@orkestrel/workflow` | `0.0.
|
|
97
|
-
| `@orkestrel/workspace` | `0.0.
|
|
55
|
+
| `@orkestrel/csv` | `0.0.16` | L2 | `@orkestrel/codec` `^0.0.12`, `@orkestrel/contract` `^0.0.26` | |
|
|
56
|
+
| `@orkestrel/database` | `0.0.28` | L2 | `@orkestrel/sqlite` `^0.0.20`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/indexeddb` `^0.0.20` | |
|
|
57
|
+
| `@orkestrel/emitter` | `0.0.18` | L1 | `@orkestrel/contract` `^0.0.26` | |
|
|
58
|
+
| `@orkestrel/form` | `0.0.20` | L2 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
59
|
+
| `@orkestrel/guide` | `0.0.33` | L3 | `@orkestrel/contract` `^0.0.26`, `@orkestrel/markdown` `^0.0.23` | |
|
|
60
|
+
| `@orkestrel/html` | `0.0.18` | L1 | `@orkestrel/contract` `^0.0.26` | |
|
|
61
|
+
| `@orkestrel/indexeddb` | `0.0.20` | L1 | `@orkestrel/contract` `^0.0.26` | |
|
|
62
|
+
| `@orkestrel/interpret` | `0.0.25` | L3 | `@orkestrel/reason` `^0.0.20`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/template` `^0.0.16` | |
|
|
63
|
+
| `@orkestrel/jsonrpc` | `0.0.5` | L1 | `@orkestrel/contract` `^0.0.26` | |
|
|
64
|
+
| `@orkestrel/lsp` | `0.0.17` | L3 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/jsonrpc` `^0.0.5`, `@orkestrel/process` `^0.0.22`, `@orkestrel/contract` `^0.0.26` | |
|
|
65
|
+
| `@orkestrel/markdown` | `0.0.23` | L2 | `@orkestrel/html` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
66
|
+
| `@orkestrel/mcp` | `0.0.45` | L4 | `@orkestrel/sse` `^0.0.16`, `@orkestrel/tool` `^0.0.25`, `@orkestrel/codec` `^0.0.12`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/jsonrpc` `^0.0.5`, `@orkestrel/process` `^0.0.22`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/websocket` `^0.0.21` | `@orkestrel/router` `^0.0.24`, `@orkestrel/server` `^0.0.30` |
|
|
67
|
+
| `@orkestrel/middleware` | `0.0.36` | L4 | `@orkestrel/budget` `^0.0.20`, `@orkestrel/timeout` `^0.0.19`, `@orkestrel/contract` `^0.0.26` | `@orkestrel/router` `^0.0.24`, `@orkestrel/server` `^0.0.30`, `@orkestrel/database` `^0.0.28` |
|
|
68
|
+
| `@orkestrel/msg` | `0.0.19` | L2 | `@orkestrel/codec` `^0.0.12`, `@orkestrel/contract` `^0.0.26` | |
|
|
69
|
+
| `@orkestrel/ndjson` | `0.0.19` | L1 | `@orkestrel/contract` `^0.0.26` | |
|
|
70
|
+
| `@orkestrel/ollama` | `0.0.40` | L6 | `@orkestrel/tool` `^0.0.25`, `@orkestrel/agent` `^0.0.46`, `@orkestrel/budget` `^0.0.20`, `@orkestrel/ndjson` `^0.0.19`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/process` `^0.0.22`, `@orkestrel/contract` `^0.0.26` | |
|
|
71
|
+
| `@orkestrel/pool` | `0.0.23` | L2 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
72
|
+
| `@orkestrel/probe` | `0.0.32` | L5 | `@orkestrel/lsp` `^0.0.17`, `@orkestrel/mcp` `^0.0.45`, `@orkestrel/pool` `^0.0.23`, `@orkestrel/tool` `^0.0.25`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/process` `^0.0.22`, `@orkestrel/timeout` `^0.0.19`, `@orkestrel/contract` `^0.0.26` | `vitest` `^4.1.12 \|\| ^5.1.0`, `typescript` `^6.0.3 \|\| ^7.0.2` |
|
|
73
|
+
| `@orkestrel/process` | `0.0.22` | L2 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
74
|
+
| `@orkestrel/program` | `0.0.23` | L4 | `@orkestrel/rater` `^0.0.24`, `@orkestrel/reason` `^0.0.20`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/qualifier` `^0.0.24` | |
|
|
75
|
+
| `@orkestrel/qualifier` | `0.0.24` | L3 | `@orkestrel/reason` `^0.0.20`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
76
|
+
| `@orkestrel/queue` | `0.0.25` | L3 | `@orkestrel/abort` `^0.0.19`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/timeout` `^0.0.19`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/database` `^0.0.28` | |
|
|
77
|
+
| `@orkestrel/rater` | `0.0.24` | L3 | `@orkestrel/reason` `^0.0.20`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
78
|
+
| `@orkestrel/reason` | `0.0.20` | L2 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
79
|
+
| `@orkestrel/relation` | `0.0.26` | L3 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/database` `^0.0.28` | |
|
|
80
|
+
| `@orkestrel/router` | `0.0.24` | L2 | `@orkestrel/abort` `^0.0.19`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
81
|
+
| `@orkestrel/scaffold` | `0.0.139` | L3 | `@orkestrel/console` `^0.0.21`, `@orkestrel/emitter` `^0.0.17`, `@orkestrel/process` `^0.0.21`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/markdown` `^0.0.22`, `@orkestrel/template` `^0.0.15` | |
|
|
82
|
+
| `@orkestrel/sea` | `0.0.25` | L3 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/process` `^0.0.22`, `@orkestrel/contract` `^0.0.26` | |
|
|
83
|
+
| `@orkestrel/server` | `0.0.30` | L3 | `@orkestrel/abort` `^0.0.19`, `@orkestrel/codec` `^0.0.12`, `@orkestrel/router` `^0.0.24`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/timeout` `^0.0.19`, `@orkestrel/contract` `^0.0.26` | |
|
|
84
|
+
| `@orkestrel/sqlite` | `0.0.20` | L1 | `@orkestrel/contract` `^0.0.26` | |
|
|
85
|
+
| `@orkestrel/sse` | `0.0.16` | L2 | `@orkestrel/codec` `^0.0.12`, `@orkestrel/contract` `^0.0.26` | |
|
|
86
|
+
| `@orkestrel/study` | `0.0.22` | L7 | `@orkestrel/tool` `^0.0.25`, `@orkestrel/abort` `^0.0.19`, `@orkestrel/agent` `^0.0.46`, `@orkestrel/budget` `^0.0.20`, `@orkestrel/ollama` `^0.0.40`, `@orkestrel/timeout` `^0.0.19`, `@orkestrel/contract` `^0.0.26` | |
|
|
87
|
+
| `@orkestrel/table` | `0.0.19` | L2 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
88
|
+
| `@orkestrel/template` | `0.0.16` | L2 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
89
|
+
| `@orkestrel/terminal` | `0.0.28` | L3 | `@orkestrel/sse` `^0.0.16`, `@orkestrel/form` `^0.0.20`, `@orkestrel/console` `^0.0.22`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/database` `^0.0.28` | |
|
|
90
|
+
| `@orkestrel/test` | `0.0.44` | L1 | `@orkestrel/contract` `^0.0.26` | `vitest` `^5.1.0`, `playwright` `^1.65.0` |
|
|
91
|
+
| `@orkestrel/timeout` | `0.0.19` | L1 | `@orkestrel/contract` `^0.0.26` | |
|
|
92
|
+
| `@orkestrel/tool` | `0.0.25` | L2 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
93
|
+
| `@orkestrel/toolbox` | `0.0.35` | L6 | `@orkestrel/form` `^0.0.20`, `@orkestrel/tool` `^0.0.25`, `@orkestrel/agent` `^0.0.46`, `@orkestrel/server` `^0.0.30`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/database` `^0.0.28`, `@orkestrel/relation` `^0.0.26`, `@orkestrel/terminal` `^0.0.28`, `@orkestrel/workflow` `^0.0.31`, `@orkestrel/workspace` `^0.0.21` | |
|
|
94
|
+
| `@orkestrel/websocket` | `0.0.21` | L2 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26` | |
|
|
95
|
+
| `@orkestrel/worker` | `0.0.25` | L4 | `@orkestrel/pool` `^0.0.23`, `@orkestrel/queue` `^0.0.25`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/database` `^0.0.28` | |
|
|
96
|
+
| `@orkestrel/workflow` | `0.0.31` | L4 | `@orkestrel/abort` `^0.0.19`, `@orkestrel/queue` `^0.0.25`, `@orkestrel/budget` `^0.0.20`, `@orkestrel/emitter` `^0.0.18`, `@orkestrel/timeout` `^0.0.19`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/database` `^0.0.28` | |
|
|
97
|
+
| `@orkestrel/workspace` | `0.0.21` | L3 | `@orkestrel/emitter` `^0.0.18`, `@orkestrel/contract` `^0.0.26`, `@orkestrel/database` `^0.0.28` | |
|
|
98
98
|
|
|
99
99
|
<!-- /orkestrel:catalog -->
|
|
100
100
|
|
|
@@ -28,6 +28,8 @@ abort.abort() // cancels the in-flight fetch through the native signal; `aborted
|
|
|
28
28
|
|
|
29
29
|
The `signal` is a plain `AbortSignal`, so it drops into anything that takes one. Call `abort()` to cancel and `abort(reason)` to attach a value the cancelled work can read off `signal.reason`. Aborting is idempotent — the first call wins, and a second is a safe no-op. Pass a parent `signal` to link cancellation: the child's `signal` then fires when the parent aborts, so one cancellation cascades to every linked handle (through `AbortSignal.any`, no listener bookkeeping). Pass `id` to label a handle for tracing, or let it default to a random UUID.
|
|
30
30
|
|
|
31
|
+
The `signal` option links through `AbortSignal.any`. Node 22 keeps about 176 B per link for the lifetime of a run-lived parent, where Node 24.22.3 and Chromium 153 keep none. Router 0.0.23's `buildRequest` avoids the retention with a per-use controller whose listener is removed when the use ends.
|
|
32
|
+
|
|
31
33
|
Construction is a strict JavaScript boundary. `validateAbortOptions` normalizes omitted options to a fresh empty object; otherwise it requires a plain record, reads `id` and `signal` exactly once inside a contained boundary, and returns a fresh copy omitting absent keys. A provided `id` must be a string and a provided parent `signal` must be native. Invalid values fail immediately with a coded `ContractError`: malformed or unreadable options use `bound`, a nonstring id uses `literal`, and a nonnative option signal uses `placement`, with exact `options`, `options.id`, or `options.signal` context, limits, safe previews, and the originating cause for unreadable records. Direct `linkSignal` calls independently validate `own` and `parent` as native signals with `placement` context. An `undefined` `id` still generates a UUID, while an empty string remains a valid explicit id.
|
|
32
34
|
|
|
33
35
|
### Factories
|
|
@@ -273,7 +273,7 @@ The core supplies the entities a browser session and an agent use. Its host-spec
|
|
|
273
273
|
| `BROWSER_DEFAULT_VIEWPORT_HEIGHT` | const | `720` | Sets the default viewport height, `720` pixels. |
|
|
274
274
|
| `BROWSER_DEFAULT_VIEWPORT_WIDTH` | const | `1280` | Sets the default viewport width, `1280` pixels. |
|
|
275
275
|
| `BROWSER_FRAME_WORLD_NAME` | const | `"__orkestrelBrowserFrame"` | Names the isolated world used for iframe evaluation, `'__orkestrelBrowserFrame'`. |
|
|
276
|
-
| `BROWSER_HAR_CREATOR` | const | `Readonly<{ name: "@orkestrel/browser"; version: "0.0.
|
|
276
|
+
| `BROWSER_HAR_CREATOR` | const | `Readonly<{ name: "@orkestrel/browser"; version: "0.0.35"; }>` | Names the tool identity embedded in HAR 1.2 documents. |
|
|
277
277
|
| `BROWSER_KEY_MODIFIERS` | const | `Readonly<Record<string, number>>` | Maps a canonical modifier name to its CDP Input modifier bit value. |
|
|
278
278
|
| `BROWSER_MOUSE_BUTTON_MASKS` | const | `Readonly<Record<BrowserMouseButton, number>>` | Maps each public mouse button to its CDP Input pressed-button bit value. |
|
|
279
279
|
| `BROWSER_NAVIGATION_REASONS` | const | `readonly BrowserNavigationReason[]` | Lists every CDP `Page.ClientNavigationReason` value a page accepts as a navigation's reason, as of Chromium 141; a page reads any other reason as undefined. |
|
|
@@ -128,6 +128,9 @@ workflow paths and usage text come from [`constants.ts`](../src/server/constants
|
|
|
128
128
|
| `SURFACE_HEADER` | const | `readonly string[]` | Lists the uniform `## Surface` table header, column by column, that guide construction requires. |
|
|
129
129
|
| `EXTERNAL_SCHEMES` | const | `readonly string[]` | Lists the link `href` schemes a guides-parity link check skips as external — a link with one of these prefixes (or a bare `#` anchor, handled separately in `isExternalLink`) is never resolved against the filesystem. |
|
|
130
130
|
| `WRAP_WIDTH` | const | `number` | Holds the default character budget a rewritten doc block's description paragraph wraps inside — the greatest number of characters a re-wrapped line may carry, counted from the line's first character with a tab counting as one, so a wrapped line reads `${indent} * ${text}` and never passes that count. |
|
|
131
|
+
| `WIDE_CHARACTER` | const | `RegExp` | Matches one character that occupies two terminal columns: an emoji presentation character other than a regional indicator, or a character of the East Asian wide and fullwidth classes. |
|
|
132
|
+
| `ZERO_WIDTH` | const | `RegExp` | Matches a character that occupies no terminal column: a nonspacing, enclosing, or extending mark, a format character such as a zero width space, a control character, and the Hangul medial and final jamo, less the format and mark characters the formatter counts one column. |
|
|
133
|
+
| `EMOJI_SEQUENCE` | const | `RegExp` | Matches a grapheme cluster the formatter counts two columns whole: a pictograph sequence joined by a zero width joiner, an emoji followed by a skin-tone modifier, an emoji followed by the emoji variation selector, or a keycap that carries that selector. |
|
|
131
134
|
|
|
132
135
|
### Server constants
|
|
133
136
|
|
|
@@ -222,6 +225,8 @@ directly.
|
|
|
222
225
|
| `findDrift` | function | `(guide: GuideInterface, source: SourceInterface) => readonly Drift[]` | Finds every disagreement between a guide and the source it documents, naming both sites: each `## Surface` row against its declaration's description paragraph, each present `Signature` cell against the declaration's computed signature written as a code span, each `## Methods` row against its member's, and the first titled guide fence of a heading against the `@example` block of the same title. An example's compared text is its language on the first line and its body beneath, so a fence that names another language drifts on its own. |
|
|
223
226
|
| `renderSurface` | function | `(symbols: readonly SurfaceSymbol[]) => string` | Renders a uniform `Name \| Kind \| Signature \| Summary` table with one row per symbol, the name as a code span, the keyword as text, and the signature and summary through `buildCell`. An absent signature or summary renders an empty cell, which `extractSurface` reads back as absent. Guide construction refuses an empty signature cell. |
|
|
224
227
|
| `renderMethods` | function | `(group: MethodGroup) => string` | Renders one `## Methods` group — the `####` heading naming the interface as a code span, then a `Name` and `SUMMARY` table with one row per documented member. A member carrying no summary renders an empty cell, which `extractMethods` reads back as an absent summary. |
|
|
228
|
+
| `computeCellWidth` | function | `(text: string) => number` | Measures how many terminal columns `text` occupies the way the checkout's formatter pads a Markdown table cell: each grapheme cluster counts two columns when it is wide — a character of the East Asian wide and fullwidth blocks, an emoji, or a sequence of them — and otherwise one column per character that has a width, with marks, format characters, and control characters counting none. |
|
|
229
|
+
| `renderMarkdownTable` | function | `(table: TableNode) => string` | Renders `table` as the bytes the checkout's formatter writes for it: every column padded to its widest cell, at least three columns wide, each cell justified to its column's alignment, and a delimiter row of dashes the column's width carrying the alignment's colons. |
|
|
225
230
|
| `renderExample` | function | `(example: SourceExample) => string` | Renders one `@example` block as the guide fence it pairs with — an H3 heading carrying the block's title, then a fence carrying its language and its code. An untitled block renders the fence alone, because a fence pairs on its nearest preceding heading and an untitled block claims none. |
|
|
226
231
|
| `buildTable` | function | `(table: TableNode, row: number, column: number, cell: readonly InlineNode[]) => TableNode` | Builds a copy of `table` with one cell's inline content replaced by `cell`. Every other cell keeps its own nodes, so a rewrite touches the one cell it names and the header and the alignment row travel unchanged. |
|
|
227
232
|
| `buildFence` | function | `(example: SourceExample) => CodeBlockNode` | Builds the fenced code block one `@example` block renders as — its code inside a fence carrying its language, and an untagged fence when the block names none. |
|
|
@@ -924,7 +929,10 @@ splices the render over the region through `spliceSpan`. Only the located node's
|
|
|
924
929
|
rewritten, so every byte of the guide outside it travels unchanged. `replaceCell` takes the header
|
|
925
930
|
of the column it writes and the cell's inline content: `--to guide` passes `SUMMARY` with
|
|
926
931
|
`buildCell(summary)` for a summary, and `SIGNATURE` with one code span carrying the computed
|
|
927
|
-
signature, which the render writes with `|` as `\|` and a longer fence around a backtick.
|
|
932
|
+
signature, which the render writes with `|` as `\|` and a longer fence around a backtick. The
|
|
933
|
+
rewritten table renders through `renderMarkdownTable`, which pads every row to the column widths the
|
|
934
|
+
checkout's formatter writes, measured by `computeCellWidth`, so a `--to guide` rewrite leaves a
|
|
935
|
+
guide the formatter's check accepts without a formatter pass.
|
|
928
936
|
|
|
929
937
|
`replaceSummary` and `replaceExample` rewrite one doc block's raw text — its description paragraph,
|
|
930
938
|
or the body of the `@example` tag carrying a given title. `locateComment` is how a caller finds
|
|
@@ -1161,7 +1169,7 @@ const guide =
|
|
|
1161
1169
|
|
|
1162
1170
|
// The guide's text back, with that one cell replaced and every byte outside the table unchanged.
|
|
1163
1171
|
replaceCell(guide, 'function walk', SUMMARY, buildCell('Walks a tree.'))
|
|
1164
|
-
// '## Surface\n\n| Name
|
|
1172
|
+
// '## Surface\n\n| Name | Kind | Signature | Summary |\n| ------ | -------- | ------------ | ------------- |\n| `walk` | function | `() => void` | Walks a tree. |'
|
|
1165
1173
|
replaceCell(guide, 'function phantom', SUMMARY, buildCell('Absent.')) // undefined — no row carries that key
|
|
1166
1174
|
replaceCell(guide, 'function walk', SUMMARY, buildCell('Walks the tree.')) === guide // true — the row already carries it
|
|
1167
1175
|
|
package/dist/host/guides/mcp.md
CHANGED
|
@@ -1158,8 +1158,8 @@ present origin requires an exact entry in the shared `origin.origins` list. A de
|
|
|
1158
1158
|
that validates upstream sets `origin.enabled` to `false` on the one options value passed to
|
|
1159
1159
|
the route and the session middleware. No shared session primitive is composed; the store, mint, and stream are
|
|
1160
1160
|
implemented here. Because the body can only be read once, the middleware
|
|
1161
|
-
|
|
1162
|
-
|
|
1161
|
+
reads `request.clone()` and calls `next()` on the one `Request` the server built,
|
|
1162
|
+
so the downstream route reads the body itself. Omit the
|
|
1163
1163
|
middleware for the byte-identical stateless default. The WebSocket and stdio
|
|
1164
1164
|
transports are inherently one session per connection, so they carry no
|
|
1165
1165
|
session header — `createMCPSession` is for the HTTP transport only.
|
|
@@ -5852,8 +5852,8 @@ the exact statement:
|
|
|
5852
5852
|
response-stream cancellation to `mcp.dispatch`. After origin/body/JSON-RPC/modern-metadata-shape/header
|
|
5853
5853
|
validation, and only for a request that will dispatch, it synchronously calls the optional
|
|
5854
5854
|
`MCPCallerHandler` immediately before dispatch; a defined result is added as asserted
|
|
5855
|
-
`caller`, while absence is omitted. The session middleware
|
|
5856
|
-
headers, and route state
|
|
5855
|
+
`caller`, while absence is omitted. The session middleware calls `next()` on the one `Request` the server built, so the
|
|
5856
|
+
signal, headers, and route state reach the route unchanged; the pump awaits
|
|
5857
5857
|
the async iterator and never polls. An SSE comment is written every configured
|
|
5858
5858
|
`keepalive.interval` (default `DEFAULT_MCP_KEEPALIVE_INTERVAL`), so an idle
|
|
5859
5859
|
streamed response notices a dead client within one interval; this is transport
|
|
@@ -6094,7 +6094,8 @@ the exact statement:
|
|
|
6094
6094
|
while `enabled: false` delegates each site to an upstream validator. A
|
|
6095
6095
|
modern-shaped POST passes straight through with `next()`, ignoring
|
|
6096
6096
|
`Mcp-Session-Id`. Otherwise, for its `path`, it makes the legacy transport
|
|
6097
|
-
stateful across its verbs: a `POST`
|
|
6097
|
+
stateful across its verbs: a `POST` reads its body text from `request.clone()` (an unusable body, used or locked, reads as
|
|
6098
|
+
absent text and passes through to the route) — resolves a session through
|
|
6098
6099
|
`readSessionHeader`; a valid id touches the entry and sets
|
|
6099
6100
|
`context.state.session`; an absent / unknown id whose (guarded) body
|
|
6100
6101
|
parses to an `initialize` request (`isInitializeRequest`) mints a fresh
|
|
@@ -6105,10 +6106,9 @@ the exact statement:
|
|
|
6105
6106
|
Other unresolved requests return `rejectUnknownSession()` (`404`). The candidate is stored
|
|
6106
6107
|
and advertised only after `context.state.initialization` records a successful dispatch
|
|
6107
6108
|
result, independently of JSON or SSE framing. It
|
|
6108
|
-
then
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
injects that pinned revision when a live-session POST
|
|
6109
|
+
then calls `next()` on that same `Request` — so the route reads the body itself
|
|
6110
|
+
and retains front-middleware state for caller extraction — sets the pinned
|
|
6111
|
+
revision on it when a live-session POST
|
|
6112
6112
|
is headerless, and stamps the response with `MCP_SESSION_HEADER`. A
|
|
6113
6113
|
live-session POST whose `MCP-Protocol-Version` header names a different
|
|
6114
6114
|
revision than the session pinned is `400` + `-32020` — a session negotiates its
|