@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.
- package/dist/bin/main.js +138 -16
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +1 -1
- package/dist/host/claude/agents/orkestrel.md +2 -2
- package/dist/host/claude/rules/names.md +3 -1
- package/dist/host/guides/abort.md +17 -17
- package/dist/host/guides/agent.md +445 -445
- package/dist/host/guides/brief.md +143 -143
- package/dist/host/guides/browser.md +731 -731
- package/dist/host/guides/budget.md +39 -39
- package/dist/host/guides/capture.md +298 -298
- package/dist/host/guides/console.md +109 -109
- package/dist/host/guides/contract.md +335 -335
- package/dist/host/guides/csv.md +30 -30
- package/dist/host/guides/database.md +163 -163
- package/dist/host/guides/emitter.md +17 -17
- package/dist/host/guides/form.md +99 -99
- package/dist/host/guides/guide.md +368 -183
- package/dist/host/guides/html.md +49 -49
- package/dist/host/guides/indexeddb.md +40 -40
- package/dist/host/guides/interpret.md +139 -139
- package/dist/host/guides/lsp.md +114 -114
- package/dist/host/guides/markdown.md +68 -68
- package/dist/host/guides/mcp.md +3745 -3745
- package/dist/host/guides/middleware.md +170 -170
- package/dist/host/guides/msg.md +95 -95
- package/dist/host/guides/ndjson.md +8 -8
- package/dist/host/guides/ollama.md +56 -56
- package/dist/host/guides/pool.md +21 -21
- package/dist/host/guides/probe.md +82 -82
- package/dist/host/guides/process.md +99 -99
- package/dist/host/guides/program.md +98 -96
- package/dist/host/guides/qualifier.md +70 -70
- package/dist/host/guides/queue.md +37 -37
- package/dist/host/guides/rater.md +38 -38
- package/dist/host/guides/reason.md +308 -308
- package/dist/host/guides/relation.md +50 -50
- package/dist/host/guides/router.md +58 -58
- package/dist/host/guides/scaffold.md +558 -419
- package/dist/host/guides/sea.md +128 -128
- package/dist/host/guides/server.md +100 -100
- package/dist/host/guides/sqlite.md +28 -28
- package/dist/host/guides/sse.md +20 -20
- package/dist/host/guides/study.md +444 -444
- package/dist/host/guides/table.md +82 -82
- package/dist/host/guides/template.md +41 -41
- package/dist/host/guides/terminal.md +121 -121
- package/dist/host/guides/test.md +273 -273
- package/dist/host/guides/timeout.md +18 -18
- package/dist/host/guides/tool.md +27 -27
- package/dist/host/guides/toolbox.md +166 -166
- package/dist/host/guides/websocket.md +54 -54
- package/dist/host/guides/worker.md +24 -24
- package/dist/host/guides/workflow.md +187 -187
- package/dist/host/guides/workspace.md +55 -55
- package/dist/host/manifest.json +55 -55
- package/dist/host/tests/setupPolicy.ts +5 -3
- package/dist/src/core/index.cjs +90 -4
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +229 -144
- package/dist/src/core/index.d.ts +229 -144
- package/dist/src/core/index.js +88 -5
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +295 -66
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +193 -6
- package/dist/src/server/index.d.ts +193 -6
- package/dist/src/server/index.js +290 -69
- package/dist/src/server/index.js.map +1 -1
- package/package.json +5 -4
|
@@ -45,47 +45,47 @@ defaults to a random UUID.
|
|
|
45
45
|
|
|
46
46
|
### Factories
|
|
47
47
|
|
|
48
|
-
|
|
|
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
|
-
|
|
|
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
|
-
|
|
|
63
|
-
| ---------------- | ----- |
|
|
64
|
-
| `MAX_TIMEOUT_MS` | const | `
|
|
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
|
-
|
|
|
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
|
-
|
|
|
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
|
-
|
|
|
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
|
|
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
|
package/dist/host/guides/tool.md
CHANGED
|
@@ -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 |
|
|
49
|
-
| ---------------------- | --------- |
|
|
50
|
-
| `ToolDefinition` | interface | `{ name, title?, description?, parameters?, annotations? }`
|
|
51
|
-
| `ToolCall` | interface | `{ id, name, arguments }`
|
|
52
|
-
| `ToolSuccess` | interface | `
|
|
53
|
-
| `ToolFailure` | interface | `
|
|
54
|
-
| `ToolOptions` | interface | `{ name, title?, description?, summary?, parameters?, contract?, annotations?, execute }`
|
|
55
|
-
| `ToolInterface` | interface | `
|
|
56
|
-
| `ToolManagerInterface` | interface | `{ count, emitter
|
|
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? }`
|
|
59
|
-
| `ToolResult` | type | `ToolSuccess \| ToolFailure`
|
|
60
|
-
| `ToolContext` | interface | `{ signal, caller? }`
|
|
61
|
-
| `ToolAnnotations` | interface | `{ pure?, untrusted?, consequential? }`
|
|
62
|
-
| `ToolErrorCode` | type | `'SCHEMA' \| 'ARGUMENTS'`
|
|
63
|
-
| `ToolErrorContext` | interface | `{ faults? }`
|
|
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 |
|
|
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 |
|
|
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
|
|