@orkestrel/scaffold 0.0.114 → 0.0.116

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 (108) hide show
  1. package/dist/bin/main.js +137 -15
  2. package/dist/bin/main.js.map +1 -1
  3. package/dist/host/agents/orchestration.md +5 -3
  4. package/dist/host/agents/platforms/windows.md +1 -0
  5. package/dist/host/agents/skills/orkestrel-align/references/integration.md +1 -1
  6. package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +4 -4
  7. package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +4 -1
  8. package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +8 -2
  9. package/dist/host/agents/skills/orkestrel-harden/references/equivalence.md +1 -0
  10. package/dist/host/agents/skills/orkestrel-harden/references/hardening.md +1 -1
  11. package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +1 -1
  12. package/dist/host/agents/skills/orkestrel-parallel/references/codex.md +1 -0
  13. package/dist/host/agents/skills/orkestrel-publish/references/wave.md +9 -3
  14. package/dist/host/claude/agents/analyst.md +1 -1
  15. package/dist/host/claude/agents/astra.md +2 -2
  16. package/dist/host/claude/agents/builder.md +4 -4
  17. package/dist/host/claude/agents/opus.md +3 -3
  18. package/dist/host/claude/agents/orkestrel.md +5 -7
  19. package/dist/host/claude/agents/planner.md +8 -2
  20. package/dist/host/claude/rules/campaign.md +2 -1
  21. package/dist/host/claude/rules/documentation.md +1 -0
  22. package/dist/host/claude/rules/names.md +3 -1
  23. package/dist/host/claude/rules/tests.md +7 -4
  24. package/dist/host/claude/rules/writing.md +1 -0
  25. package/dist/host/claude/skills/enterprise-bootstrap/SKILL.md +1 -2
  26. package/dist/host/claude/skills/orkestrel-align/SKILL.md +1 -1
  27. package/dist/host/claude/skills/orkestrel-build/SKILL.md +1 -2
  28. package/dist/host/claude/skills/orkestrel-debrief/SKILL.md +1 -2
  29. package/dist/host/claude/skills/orkestrel-dispatch/SKILL.md +1 -1
  30. package/dist/host/claude/skills/orkestrel-falsify/SKILL.md +1 -1
  31. package/dist/host/claude/skills/orkestrel-harden/SKILL.md +1 -1
  32. package/dist/host/claude/skills/orkestrel-journey/SKILL.md +1 -1
  33. package/dist/host/claude/skills/orkestrel-parallel/SKILL.md +1 -1
  34. package/dist/host/claude/skills/orkestrel-polish/SKILL.md +1 -2
  35. package/dist/host/claude/skills/orkestrel-publish/SKILL.md +1 -2
  36. package/dist/host/claude/skills/orkestrel-scout/SKILL.md +1 -1
  37. package/dist/host/codex/agents/analyst.toml +8 -5
  38. package/dist/host/codex/agents/astra.toml +4 -5
  39. package/dist/host/codex/agents/builder.toml +5 -5
  40. package/dist/host/codex/agents/opus.toml +3 -4
  41. package/dist/host/codex/agents/orkestrel.toml +2 -1
  42. package/dist/host/codex/agents/planner.toml +8 -5
  43. package/dist/host/codex/agents/reviewer.toml +5 -4
  44. package/dist/host/guides/abort.md +17 -17
  45. package/dist/host/guides/agent.md +445 -445
  46. package/dist/host/guides/brief.md +143 -143
  47. package/dist/host/guides/browser.md +731 -731
  48. package/dist/host/guides/budget.md +39 -39
  49. package/dist/host/guides/capture.md +298 -298
  50. package/dist/host/guides/console.md +109 -109
  51. package/dist/host/guides/contract.md +335 -335
  52. package/dist/host/guides/csv.md +30 -30
  53. package/dist/host/guides/database.md +163 -163
  54. package/dist/host/guides/emitter.md +17 -17
  55. package/dist/host/guides/form.md +99 -99
  56. package/dist/host/guides/guide.md +361 -183
  57. package/dist/host/guides/html.md +49 -49
  58. package/dist/host/guides/indexeddb.md +40 -40
  59. package/dist/host/guides/interpret.md +139 -139
  60. package/dist/host/guides/lsp.md +114 -114
  61. package/dist/host/guides/markdown.md +68 -68
  62. package/dist/host/guides/mcp.md +3745 -3745
  63. package/dist/host/guides/middleware.md +170 -170
  64. package/dist/host/guides/msg.md +95 -95
  65. package/dist/host/guides/ndjson.md +8 -8
  66. package/dist/host/guides/ollama.md +56 -56
  67. package/dist/host/guides/pool.md +21 -21
  68. package/dist/host/guides/probe.md +82 -82
  69. package/dist/host/guides/process.md +99 -99
  70. package/dist/host/guides/program.md +98 -96
  71. package/dist/host/guides/qualifier.md +70 -70
  72. package/dist/host/guides/queue.md +37 -37
  73. package/dist/host/guides/rater.md +38 -38
  74. package/dist/host/guides/reason.md +308 -308
  75. package/dist/host/guides/relation.md +50 -50
  76. package/dist/host/guides/router.md +58 -58
  77. package/dist/host/guides/scaffold.md +554 -419
  78. package/dist/host/guides/sea.md +128 -128
  79. package/dist/host/guides/server.md +100 -100
  80. package/dist/host/guides/sqlite.md +28 -28
  81. package/dist/host/guides/sse.md +20 -20
  82. package/dist/host/guides/study.md +444 -444
  83. package/dist/host/guides/table.md +82 -82
  84. package/dist/host/guides/template.md +41 -41
  85. package/dist/host/guides/terminal.md +121 -121
  86. package/dist/host/guides/test.md +273 -273
  87. package/dist/host/guides/timeout.md +18 -18
  88. package/dist/host/guides/tool.md +27 -27
  89. package/dist/host/guides/toolbox.md +166 -166
  90. package/dist/host/guides/websocket.md +54 -54
  91. package/dist/host/guides/worker.md +24 -24
  92. package/dist/host/guides/workflow.md +187 -187
  93. package/dist/host/guides/workspace.md +55 -55
  94. package/dist/host/manifest.json +93 -93
  95. package/dist/host/tests/setupPolicy.ts +5 -3
  96. package/dist/src/core/index.cjs +89 -3
  97. package/dist/src/core/index.cjs.map +1 -1
  98. package/dist/src/core/index.d.cts +229 -144
  99. package/dist/src/core/index.d.ts +229 -144
  100. package/dist/src/core/index.js +87 -4
  101. package/dist/src/core/index.js.map +1 -1
  102. package/dist/src/server/index.cjs +292 -66
  103. package/dist/src/server/index.cjs.map +1 -1
  104. package/dist/src/server/index.d.cts +188 -6
  105. package/dist/src/server/index.d.ts +188 -6
  106. package/dist/src/server/index.js +287 -69
  107. package/dist/src/server/index.js.map +1 -1
  108. package/package.json +4 -3
@@ -27,64 +27,64 @@ budget.consume(7_000) // crosses 10_000 — fires `signal`
27
27
 
28
28
  ### Factories
29
29
 
30
- | API | Kind | Summary |
31
- | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
32
- | `createBudget` | function | Creates a cumulative budget as a `BudgetInterface<T>` over a `max` ceiling and a `consumer`, whose native signal aborts the moment the tally reaches that ceiling. |
33
- | `createTokenConsumer` | function | Creates a validated unary consumer that charges one selected `TokenUsage` field. |
34
- | `createTokenBudget` | function | Creates a token budget as a `BudgetInterface<TokenUsage>` charging one validated `scope` field per provider call. |
35
- | `createTokenMeter` | function | Creates a token meter as a `MeterInterface` that charges a token budget each growth of a streamed answer's estimated token count as completion tokens. |
30
+ | Name | Kind | Signature | Summary |
31
+ | --------------------- | -------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
32
+ | `createBudget` | function | `<T>(options: BudgetOptions<T>) => BudgetInterface<T>` | Creates a cumulative budget as a `BudgetInterface<T>` over a `max` ceiling and a `consumer`, whose native signal aborts the moment the tally reaches that ceiling. |
33
+ | `createTokenConsumer` | function | `(scope: TokenScope) => BudgetOptions<TokenUsage>['consumer']` | Creates a validated unary consumer that charges one selected `TokenUsage` field. |
34
+ | `createTokenBudget` | function | `(options: TokenBudgetOptions) => BudgetInterface<TokenUsage>` | Creates a token budget as a `BudgetInterface<TokenUsage>` charging one validated `scope` field per provider call. |
35
+ | `createTokenMeter` | function | `(options: TokenMeterOptions) => MeterInterface` | Creates a token meter as a `MeterInterface` that charges a token budget each growth of a streamed answer's estimated token count as completion tokens. |
36
36
 
37
37
  ### Validators
38
38
 
39
39
  In a guard table a `Shape` cell holds the type the guard narrows to.
40
40
 
41
- | API | Kind | Shape | Summary |
42
- | ---------------- | -------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
43
- | `isBudget` | function | `BudgetInterface<unknown>` | Determines whether a value implements `BudgetInterface`, returning `false` rather than throwing on hostile input. |
44
- | `isBudgetError` | function | `BudgetError` | Checks whether an unknown value is a `BudgetError` built by any copy of this package, so an abort reason can be read as a budget's exhaustion. |
45
- | `isBudgetAmount` | function | `number` | Determines whether a value is a finite nonnegative budget amount. |
46
- | `isBudgetSignal` | function | `AbortSignal` | Determines whether a value is a genuine native `AbortSignal`, returning `false` rather than throwing on hostile input. |
47
- | `isTokenScope` | function | `TokenScope` | Determines whether a value is a supported `TokenScope` field selector. |
48
- | `isTokenUsage` | function | `TokenUsage` | Determines whether a value is readable token usage carrying three finite nonnegative counts, returning `false` rather than throwing. |
41
+ | Name | Kind | Signature | Summary |
42
+ | ---------------- | -------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
43
+ | `isBudget` | function | `(value: unknown) => value is BudgetInterface<unknown>` | Determines whether a value implements `BudgetInterface`, returning `false` rather than throwing on hostile input. |
44
+ | `isBudgetError` | function | `(value: unknown) => value is BudgetError` | Checks whether an unknown value is a `BudgetError` built by any copy of this package, so an abort reason can be read as a budget's exhaustion. |
45
+ | `isBudgetAmount` | function | `(value: unknown) => value is number` | Determines whether a value is a finite nonnegative budget amount. |
46
+ | `isBudgetSignal` | function | `(value: unknown) => value is AbortSignal` | Determines whether a value is a genuine native `AbortSignal`, returning `false` rather than throwing on hostile input. |
47
+ | `isTokenScope` | function | `(value: unknown) => value is TokenScope` | Determines whether a value is a supported `TokenScope` field selector. |
48
+ | `isTokenUsage` | function | `(value: unknown) => value is TokenUsage` | Determines whether a value is readable token usage carrying three finite nonnegative counts, returning `false` rather than throwing. |
49
49
 
50
50
  ### Helpers
51
51
 
52
- | API | Kind | Summary |
53
- | ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
54
- | `validateBudgetOptions` | function | Validates and normalizes budget construction options into a fresh copy that omits absent optional keys. |
55
- | `validateTokenBudgetOptions` | function | Validates and normalizes token-budget construction options into a fresh copy that omits absent optional keys. |
56
- | `validateMeterOptions` | function | Validates and normalizes meter construction options into a fresh copy. |
57
- | `validateTokenMeterOptions` | function | Validates and normalizes token-meter construction options into a fresh copy. |
52
+ | Name | Kind | Signature | Summary |
53
+ | ---------------------------- | -------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
54
+ | `validateBudgetOptions` | function | `<T>(options: BudgetOptions<T>) => BudgetOptions<T>` | Validates and normalizes budget construction options into a fresh copy that omits absent optional keys. |
55
+ | `validateTokenBudgetOptions` | function | `(options: TokenBudgetOptions) => TokenBudgetOptions` | Validates and normalizes token-budget construction options into a fresh copy that omits absent optional keys. |
56
+ | `validateMeterOptions` | function | `<T>(options: MeterOptions<T>) => MeterOptions<T>` | Validates and normalizes meter construction options into a fresh copy. |
57
+ | `validateTokenMeterOptions` | function | `(options: TokenMeterOptions) => TokenMeterOptions` | Validates and normalizes token-meter construction options into a fresh copy. |
58
58
 
59
59
  ### Classes
60
60
 
61
- | API | Kind | Summary |
62
- | ------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
63
- | `Budget` | class | Implements `BudgetInterface` over a private `AbortController` the instance owns, aborting the composed signal the moment `consumed` reaches the `max` ceiling. |
64
- | `Meter` | class | Implements `MeterInterface` for one stream, charging a budget the growth of the streamed text's estimated cost as each delta arrives. |
65
- | `BudgetError` | class | Reports a budget whose cumulative tally reached its ceiling — the abort reason of the budget's own `signal`, carrying the machine-readable `code` `'exhaust'` and the budget's `id`, `max`, and `consumed` readings. |
61
+ | Name | Kind | Signature | Summary |
62
+ | ------------- | ----- | ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
63
+ | `Budget` | class | `new <T>(options: BudgetOptions<T>) => BudgetInterface<T>` | Implements `BudgetInterface` over a private `AbortController` the instance owns, aborting the composed signal the moment `consumed` reaches the `max` ceiling. |
64
+ | `Meter` | class | `new <T>(options: MeterOptions<T>) => MeterInterface` | Implements `MeterInterface` for one stream, charging a budget the growth of the streamed text's estimated cost as each delta arrives. |
65
+ | `BudgetError` | class | `new (context: BudgetErrorContext) => BudgetError` | Reports a budget whose cumulative tally reached its ceiling — the abort reason of the budget's own `signal`, carrying the machine-readable `code` `'exhaust'` and the budget's `id`, `max`, and `consumed` readings. |
66
66
 
67
67
  ### Constants
68
68
 
69
- | API | Kind | Summary |
70
- | -------------------- | ----- | ------------------------------------------------------------------------------------------- |
71
- | `BUDGET_ERROR_BRAND` | const | Holds the registry-global key used to recognize `BudgetError` values across package copies. |
69
+ | Name | Kind | Signature | Summary |
70
+ | -------------------- | ----- | --------------- | ------------------------------------------------------------------------------------------- |
71
+ | `BUDGET_ERROR_BRAND` | const | `unique symbol` | Holds the registry-global key used to recognize `BudgetError` values across package copies. |
72
72
 
73
73
  ### Types
74
74
 
75
75
  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 `\|`.
76
76
 
77
- | Type | Kind | Shape | Summary |
78
- | -------------------- | --------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
79
- | `BudgetOptions` | interface | `{ id?, max, consumer, signal? }` | Represents the options for constructing a cumulative budget, accepted by the `createBudget` function and the `Budget` constructor. |
80
- | `TokenBudgetOptions` | interface | `{ id?, max, scope?, signal? }` | Represents the options for constructing a token budget, accepted by the `createTokenBudget` function. |
81
- | `BudgetInterface` | interface | `{ id, signal, max, consumed, remaining, exhausted } plus start, consume, clear` | Represents the cumulative cost handle contract: a lifetime tally, its validated ceiling, and the native signal that aborts when the tally reaches that ceiling. |
82
- | `TokenScope` | type | `'completion' \| 'total' \| 'prompt'` | Names the token-usage field selected as the charge for a token budget. |
83
- | `TokenUsage` | interface | `{ prompt, completion, total }` | Represents the canonical LLM cost unit: the finite nonnegative token counts reported for one provider call, and the typical `T` for an agent budget. |
84
- | `MeterOptions` | interface | `{ budget, estimator, producer }` | Represents the options for constructing a meter, accepted by the `Meter` constructor. |
85
- | `TokenMeterOptions` | interface | `{ budget, estimator }` | Represents the options for constructing a token meter, accepted by the `createTokenMeter` function. |
86
- | `MeterInterface` | interface | `{ charged } plus charge` | Represents the stream meter contract: it measures text as it streams and charges a budget the growth of the text's estimated cost, keeping the cost already charged so a later reported total can be reconciled against it. |
87
- | `BudgetErrorContext` | interface | `{ id, max, consumed }` | Represents the readings a `BudgetError` carries: the exhausted budget's trace `id`, its `max` ceiling, and its `consumed` tally at the moment the ceiling was reached. |
77
+ | Name | Kind | Signature | Summary |
78
+ | -------------------- | --------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
79
+ | `BudgetOptions` | interface | `{ id?, max, consumer, signal? }` | Represents the options for constructing a cumulative budget, accepted by the `createBudget` function and the `Budget` constructor. |
80
+ | `TokenBudgetOptions` | interface | `{ id?, max, scope?, signal? }` | Represents the options for constructing a token budget, accepted by the `createTokenBudget` function. |
81
+ | `BudgetInterface` | interface | `{ id, signal, max, consumed, remaining, exhausted, start(), consume(), clear() }` | Represents the cumulative cost handle contract: a lifetime tally, its validated ceiling, and the native signal that aborts when the tally reaches that ceiling. |
82
+ | `TokenScope` | type | `'completion' \| 'total' \| 'prompt'` | Names the token-usage field selected as the charge for a token budget. |
83
+ | `TokenUsage` | interface | `{ prompt, completion, total }` | Represents the canonical LLM cost unit: the finite nonnegative token counts reported for one provider call, and the typical `T` for an agent budget. |
84
+ | `MeterOptions` | interface | `{ budget, estimator, producer }` | Represents the options for constructing a meter, accepted by the `Meter` constructor. |
85
+ | `TokenMeterOptions` | interface | `{ budget, estimator }` | Represents the options for constructing a token meter, accepted by the `createTokenMeter` function. |
86
+ | `MeterInterface` | interface | `{ charged, charge() }` | Represents the stream meter contract: it measures text as it streams and charges a budget the growth of the text's estimated cost, keeping the cost already charged so a later reported total can be reconciled against it. |
87
+ | `BudgetErrorContext` | interface | `{ id, max, consumed }` | Represents the readings a `BudgetError` carries: the exhausted budget's trace `id`, its `max` ceiling, and its `consumed` tally at the moment the ceiling was reached. |
88
88
 
89
89
  The `id`, `signal`, `max`, `consumed`, `remaining`, and `exhausted` members of `BudgetInterface` are `readonly` data members (the preceding Surface rows) — its call-signature methods are documented under [Methods](#methods). The `charged` member of `MeterInterface` is a `readonly` data member; its call-signature method is documented under [Methods](#methods).
90
90