@orkestrel/scaffold 0.0.115 → 0.0.117

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.
Files changed (70) hide show
  1. package/dist/bin/main.js +138 -16
  2. package/dist/bin/main.js.map +1 -1
  3. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +1 -1
  4. package/dist/host/claude/agents/orkestrel.md +2 -2
  5. package/dist/host/claude/rules/names.md +3 -1
  6. package/dist/host/guides/abort.md +17 -17
  7. package/dist/host/guides/agent.md +445 -445
  8. package/dist/host/guides/brief.md +143 -143
  9. package/dist/host/guides/browser.md +731 -731
  10. package/dist/host/guides/budget.md +39 -39
  11. package/dist/host/guides/capture.md +298 -298
  12. package/dist/host/guides/console.md +109 -109
  13. package/dist/host/guides/contract.md +335 -335
  14. package/dist/host/guides/csv.md +30 -30
  15. package/dist/host/guides/database.md +163 -163
  16. package/dist/host/guides/emitter.md +17 -17
  17. package/dist/host/guides/form.md +99 -99
  18. package/dist/host/guides/guide.md +368 -183
  19. package/dist/host/guides/html.md +49 -49
  20. package/dist/host/guides/indexeddb.md +40 -40
  21. package/dist/host/guides/interpret.md +139 -139
  22. package/dist/host/guides/lsp.md +114 -114
  23. package/dist/host/guides/markdown.md +68 -68
  24. package/dist/host/guides/mcp.md +3745 -3745
  25. package/dist/host/guides/middleware.md +170 -170
  26. package/dist/host/guides/msg.md +95 -95
  27. package/dist/host/guides/ndjson.md +8 -8
  28. package/dist/host/guides/ollama.md +56 -56
  29. package/dist/host/guides/pool.md +21 -21
  30. package/dist/host/guides/probe.md +82 -82
  31. package/dist/host/guides/process.md +99 -99
  32. package/dist/host/guides/program.md +98 -96
  33. package/dist/host/guides/qualifier.md +70 -70
  34. package/dist/host/guides/queue.md +37 -37
  35. package/dist/host/guides/rater.md +38 -38
  36. package/dist/host/guides/reason.md +308 -308
  37. package/dist/host/guides/relation.md +50 -50
  38. package/dist/host/guides/router.md +58 -58
  39. package/dist/host/guides/scaffold.md +558 -419
  40. package/dist/host/guides/sea.md +128 -128
  41. package/dist/host/guides/server.md +100 -100
  42. package/dist/host/guides/sqlite.md +28 -28
  43. package/dist/host/guides/sse.md +20 -20
  44. package/dist/host/guides/study.md +444 -444
  45. package/dist/host/guides/table.md +82 -82
  46. package/dist/host/guides/template.md +41 -41
  47. package/dist/host/guides/terminal.md +121 -121
  48. package/dist/host/guides/test.md +273 -273
  49. package/dist/host/guides/timeout.md +18 -18
  50. package/dist/host/guides/tool.md +27 -27
  51. package/dist/host/guides/toolbox.md +166 -166
  52. package/dist/host/guides/websocket.md +54 -54
  53. package/dist/host/guides/worker.md +24 -24
  54. package/dist/host/guides/workflow.md +187 -187
  55. package/dist/host/guides/workspace.md +55 -55
  56. package/dist/host/manifest.json +55 -55
  57. package/dist/host/tests/setupPolicy.ts +5 -3
  58. package/dist/src/core/index.cjs +90 -4
  59. package/dist/src/core/index.cjs.map +1 -1
  60. package/dist/src/core/index.d.cts +229 -144
  61. package/dist/src/core/index.d.ts +229 -144
  62. package/dist/src/core/index.js +88 -5
  63. package/dist/src/core/index.js.map +1 -1
  64. package/dist/src/server/index.cjs +295 -66
  65. package/dist/src/server/index.cjs.map +1 -1
  66. package/dist/src/server/index.d.cts +193 -6
  67. package/dist/src/server/index.d.ts +193 -6
  68. package/dist/src/server/index.js +290 -69
  69. package/dist/src/server/index.js.map +1 -1
  70. package/package.json +5 -4
@@ -45,47 +45,47 @@ defaults to a random UUID.
45
45
 
46
46
  ### Factories
47
47
 
48
- | API | Kind | Summary |
49
- | --------------- | -------- | ------------------------------------------------------------------------------------------------- |
50
- | `createTimeout` | function | Creates a deadline handle from validated `TimeoutOptions` and returns it as a `TimeoutInterface`. |
48
+ | Name | Kind | Signature | Summary |
49
+ | --------------- | -------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------- |
50
+ | `createTimeout` | function | `(options: TimeoutOptions) => TimeoutInterface` | Creates a deadline handle from validated `TimeoutOptions` and returns it as a `TimeoutInterface`. |
51
51
 
52
52
  ### Classes
53
53
 
54
- | API | Kind | Summary |
55
- | --------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
56
- | `Timeout` | class | Implements `TimeoutInterface` exactly, as a controllable `setTimeout` wrapper over one owned `AbortController` whose signal aborts when the deadline expires. |
54
+ | Name | Kind | Signature | Summary |
55
+ | --------- | ----- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
56
+ | `Timeout` | class | `new (options: TimeoutOptions) => TimeoutInterface` | Implements `TimeoutInterface` exactly, as a controllable `setTimeout` wrapper over one owned `AbortController` whose signal aborts when the deadline expires. |
57
57
 
58
58
  ### Constants
59
59
 
60
60
  A `Shape` cell holds the constant's declared type.
61
61
 
62
- | API | Kind | Shape | Summary |
63
- | ---------------- | ----- | -------- | ------------------------------------------------------------------------------------- |
64
- | `MAX_TIMEOUT_MS` | const | `number` | Names the largest timeout duration the package accepts, `2_147_483_647` milliseconds. |
62
+ | Name | Kind | Signature | Summary |
63
+ | ---------------- | ----- | ------------ | ------------------------------------------------------------------------------------- |
64
+ | `MAX_TIMEOUT_MS` | const | `2147483647` | Names the largest timeout duration the package accepts, `2_147_483_647` milliseconds. |
65
65
 
66
66
  ### Validators
67
67
 
68
68
  In a guard table a `Shape` cell holds the type the guard narrows to.
69
69
 
70
- | API | Kind | Shape | Summary |
71
- | ------------------- | -------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
72
- | `isTimeoutDuration` | function | `number` | Determines whether a value is an integer in the inclusive range from `0` through `MAX_TIMEOUT_MS`, staying total for every input. |
73
- | `isTimeoutSignal` | function | `AbortSignal` | Determines whether a value is a genuine native `AbortSignal`, staying total for a structural spoof and for a hostile or revoked proxy. |
70
+ | Name | Kind | Signature | Summary |
71
+ | ------------------- | -------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
72
+ | `isTimeoutDuration` | function | `(value: unknown) => value is number` | Determines whether a value is an integer in the inclusive range from `0` through `MAX_TIMEOUT_MS`, staying total for every input. |
73
+ | `isTimeoutSignal` | function | `(value: unknown) => value is AbortSignal` | Determines whether a value is a genuine native `AbortSignal`, staying total for a structural spoof and for a hostile or revoked proxy. |
74
74
 
75
75
  ### Helpers
76
76
 
77
- | API | Kind | Summary |
78
- | ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------- |
79
- | `validateTimeoutOptions` | function | Validates once-read timeout construction options and returns a fresh normalized copy omitting absent optional keys. |
77
+ | Name | Kind | Signature | Summary |
78
+ | ------------------------ | -------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
79
+ | `validateTimeoutOptions` | function | `(options: TimeoutOptions) => TimeoutOptions` | Validates once-read timeout construction options and returns a fresh normalized copy omitting absent optional keys. |
80
80
 
81
81
  ### Types
82
82
 
83
83
  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 `\|`.
84
84
 
85
- | Type | Kind | Shape | Summary |
85
+ | Name | Kind | Signature | Summary |
86
86
  | ------------------ | --------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------- |
87
87
  | `TimeoutOptions` | interface | `{ id?, ms, signal? }` | Represents the options `createTimeout` and the `Timeout` constructor accept. |
88
- | `TimeoutInterface` | interface | `{ id, ms, signal, expired } plus start, clear` | Represents a controllable deadline exposing a native `AbortSignal` that aborts on expiry. |
88
+ | `TimeoutInterface` | interface | `{ id, ms, signal, expired, start(), clear() }` | Represents a controllable deadline exposing a native `AbortSignal` that aborts on expiry. |
89
89
 
90
90
  The `id`, `ms`, `signal`, and `expired` members of `TimeoutInterface` are
91
91
  `readonly` data members (Shape cell, earlier) — its call-signature methods are
@@ -45,22 +45,22 @@ interface's data members as bare names in braces, `?` marking an optional member
45
45
  introducing its call-signature members, and a type alias's own type literal with a union's arms
46
46
  escaped as `\|`. An extended interface's name comes before `plus`, with the members it adds after.
47
47
 
48
- | Name | Kind | Shape | Summary |
49
- | ---------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
50
- | `ToolDefinition` | interface | `{ name, title?, description?, parameters?, annotations? }` | Describes a tool as advertised to a caller. |
51
- | `ToolCall` | interface | `{ id, name, arguments }` | Describes one request to run a named tool. |
52
- | `ToolSuccess` | interface | `Success<unknown> plus { id, name }` | Reports the successful outcome of executing a `ToolCall`. |
53
- | `ToolFailure` | interface | `Failure<string> plus { id, name }` | Reports the failed outcome of executing a `ToolCall`. |
54
- | `ToolOptions` | interface | `{ name, title?, description?, summary?, parameters?, contract?, annotations?, execute }` | Configures an executable tool. |
55
- | `ToolInterface` | interface | `ToolDefinition plus { summary? } plus execute` | Represents an executable tool: its advertised definition plus its local handler. |
56
- | `ToolManagerInterface` | interface | `{ count, emitter } plus add, tool, tools, definitions, execute, remove, clear, destroy` | Represents a registry of executable tools with per-call error isolation. |
57
- | `ToolManagerEventMap` | type | `{ readonly add: readonly [tool: ToolInterface]; readonly remove: readonly [tool: ToolInterface]; readonly clear: readonly [tools: readonly ToolInterface[]] }` | Names the events a tool registry publishes. |
58
- | `ToolManagerOptions` | interface | `{ on?, error? }` | Configures a tool registry's initial listeners and error handling. |
59
- | `ToolResult` | type | `ToolSuccess \| ToolFailure` | Represents the outcome of executing a `ToolCall`. |
60
- | `ToolContext` | interface | `{ signal, caller? }` | Carries the signal and consumer-asserted identity for an execution. |
61
- | `ToolAnnotations` | interface | `{ pure?, untrusted?, consequential? }` | Describes the observable effects and content of a tool. |
62
- | `ToolErrorCode` | type | `'SCHEMA' \| 'ARGUMENTS'` | Identifies a schema conflict or an argument validation failure. |
63
- | `ToolErrorContext` | interface | `{ faults? }` | Carries the structured faults behind an argument validation failure. |
48
+ | Name | Kind | Signature | Summary |
49
+ | ---------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
50
+ | `ToolDefinition` | interface | `{ name, title?, description?, parameters?, annotations? }` | Describes a tool as advertised to a caller. |
51
+ | `ToolCall` | interface | `{ id, name, arguments }` | Describes one request to run a named tool. |
52
+ | `ToolSuccess` | interface | `{ id, name }` | Reports the successful outcome of executing a `ToolCall`. |
53
+ | `ToolFailure` | interface | `{ id, name }` | Reports the failed outcome of executing a `ToolCall`. |
54
+ | `ToolOptions` | interface | `{ name, title?, description?, summary?, parameters?, contract?, annotations?, execute }` | Configures an executable tool. |
55
+ | `ToolInterface` | interface | `{ summary?, execute() }` | Represents an executable tool: its advertised definition plus its local handler. |
56
+ | `ToolManagerInterface` | interface | `{ count, emitter, add(), tool(), tools(), definitions(), execute(), remove(), clear(), destroy() }` | Represents a registry of executable tools with per-call error isolation. |
57
+ | `ToolManagerEventMap` | type | `{ readonly add: readonly [tool: ToolInterface]; readonly remove: readonly [tool: ToolInterface]; readonly clear: readonly [tools: readonly ToolInterface[]]; }` | Names the events a tool registry publishes. |
58
+ | `ToolManagerOptions` | interface | `{ on?, error? }` | Configures a tool registry's initial listeners and error handling. |
59
+ | `ToolResult` | type | `ToolSuccess \| ToolFailure` | Represents the outcome of executing a `ToolCall`. |
60
+ | `ToolContext` | interface | `{ signal, caller? }` | Carries the signal and consumer-asserted identity for an execution. |
61
+ | `ToolAnnotations` | interface | `{ pure?, untrusted?, consequential? }` | Describes the observable effects and content of a tool. |
62
+ | `ToolErrorCode` | type | `'SCHEMA' \| 'ARGUMENTS'` | Identifies a schema conflict or an argument validation failure. |
63
+ | `ToolErrorContext` | interface | `{ faults? }` | Carries the structured faults behind an argument validation failure. |
64
64
 
65
65
  `ToolInterface` and `ToolManagerInterface` list every member they declare or inherit. The
66
66
  call-signature members of each are documented under [Methods](#methods); the readonly `count` of
@@ -74,9 +74,9 @@ and an `error` handler for listener throws.
74
74
  The call-envelope guard, from [`validators.ts`](../src/core/validators.ts). In a guard
75
75
  table a `Shape` cell holds the type the guard narrows to.
76
76
 
77
- | Name | Kind | Shape | Summary |
78
- | ------------ | -------- | ---------- | -------------------------------------------------------------------------------------------------------------------- |
79
- | `isToolCall` | function | `ToolCall` | Determines whether an unknown value is structurally a `ToolCall`, staying total for malformed and adversarial input. |
77
+ | Name | Kind | Signature | Summary |
78
+ | ------------ | -------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
79
+ | `isToolCall` | function | `(value: unknown) => value is ToolCall` | Determines whether an unknown value is structurally a `ToolCall`, staying total for malformed and adversarial input. |
80
80
 
81
81
  ### Helpers
82
82
 
@@ -102,11 +102,11 @@ The implementing classes, from [`Tool.ts`](../src/core/tools/Tool.ts) and
102
102
  [`ToolManager.ts`](../src/core/tools/ToolManager.ts) — each documented in full under its own
103
103
  heading following this table.
104
104
 
105
- | Name | Kind | Summary |
106
- | ------------- | ----- | -------------------------------------------------------------------------------------- |
107
- | `Tool` | class | Binds an executable tool definition to a handler. |
108
- | `ToolManager` | class | Represents an insertion-ordered tool registry with per-call error isolation. |
109
- | `ToolError` | class | Reports a schema conflict or argument validation failure with a machine-readable code. |
105
+ | Name | Kind | Signature | Summary |
106
+ | ------------- | ----- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
107
+ | `Tool` | class | `new (options: ToolOptions) => ToolInterface` | Binds an executable tool definition to a handler. |
108
+ | `ToolManager` | class | `new (options?: ToolManagerOptions) => ToolManagerInterface` | Represents an insertion-ordered tool registry with per-call error isolation. |
109
+ | `ToolError` | class | `new (code: ToolErrorCode, message: string, context?: ToolErrorContext) => ToolError` | Reports a schema conflict or argument validation failure with a machine-readable code. |
110
110
 
111
111
  ### `Tool`
112
112
 
@@ -140,9 +140,9 @@ the full fault report in `context.faults`; the manager contains it as a message.
140
140
  to narrow a caught value. See [Contract validation and errors](#contract-validation-and-errors)
141
141
  for an executed example.
142
142
 
143
- | Name | Kind | Shape | Summary |
144
- | ------------- | -------- | ----------- | ---------------------------------------------------------------------------- |
145
- | `isToolError` | function | `ToolError` | Checks whether a value is a tool error, containing hostile prototype access. |
143
+ | Name | Kind | Signature | Summary |
144
+ | ------------- | -------- | ---------------------------------------- | ---------------------------------------------------------------------------- |
145
+ | `isToolError` | function | `(value: unknown) => value is ToolError` | Checks whether a value is a tool error, containing hostile prototype access. |
146
146
 
147
147
  ## Methods
148
148