@orkestrel/scaffold 0.0.112 → 0.0.114
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-harden/scripts/titles.js +3 -3
- package/dist/agents/skills/orkestrel-publish/scripts/wave.js +120 -21
- package/dist/bin/main.js +71 -23
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/platforms/windows.md +1 -1
- package/dist/host/agents/skills/orkestrel-harden/scripts/titles.ts +3 -3
- package/dist/host/agents/skills/orkestrel-publish/SKILL.md +7 -7
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +25 -8
- package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +187 -54
- package/dist/host/claude/agents/orkestrel.md +53 -53
- package/dist/host/claude/rules/architecture.md +4 -3
- package/dist/host/claude/rules/tests.md +24 -7
- package/dist/host/claude/rules/typescript.md +11 -2
- package/dist/host/claude/rules/workspace.md +32 -28
- package/dist/host/configs/policy.ts +49 -0
- package/dist/host/dotfiles/gitignore +1 -0
- package/dist/host/dotfiles/oxlintrc.json +6 -0
- package/dist/host/guides/agent.md +13 -13
- package/dist/host/guides/brief.md +4 -0
- package/dist/host/guides/browser.md +162 -44
- package/dist/host/guides/budget.md +1 -1
- package/dist/host/guides/capture.md +4 -0
- package/dist/host/guides/console.md +13 -0
- package/dist/host/guides/contract.md +38 -3
- package/dist/host/guides/csv.md +5 -0
- package/dist/host/guides/database.md +58 -8
- package/dist/host/guides/form.md +17 -0
- package/dist/host/guides/guide.md +36 -33
- package/dist/host/guides/html.md +72 -44
- package/dist/host/guides/indexeddb.md +4 -0
- package/dist/host/guides/lsp.md +49 -8
- package/dist/host/guides/markdown.md +146 -1
- package/dist/host/guides/mcp.md +117 -22
- package/dist/host/guides/middleware.md +194 -26
- package/dist/host/guides/msg.md +9 -5
- package/dist/host/guides/pool.md +8 -1
- package/dist/host/guides/probe.md +13 -1
- package/dist/host/guides/process.md +102 -90
- package/dist/host/guides/program.md +4 -0
- package/dist/host/guides/qualifier.md +4 -0
- package/dist/host/guides/rater.md +4 -0
- package/dist/host/guides/reason.md +6 -4
- package/dist/host/guides/relation.md +4 -0
- package/dist/host/guides/scaffold.md +32 -14
- package/dist/host/guides/server.md +29 -13
- package/dist/host/guides/sqlite.md +6 -0
- package/dist/host/guides/sse.md +6 -0
- package/dist/host/guides/study.md +473 -473
- package/dist/host/guides/table.md +3 -0
- package/dist/host/guides/template.md +3 -0
- package/dist/host/guides/test.md +38 -20
- package/dist/host/guides/tool.md +3 -0
- package/dist/host/guides/toolbox.md +21 -0
- package/dist/host/guides/websocket.md +3 -1
- package/dist/host/guides/workflow.md +103 -11
- package/dist/host/guides/workspace.md +4 -0
- package/dist/host/manifest.json +56 -56
- package/dist/host/tests/config.test.ts +72 -16
- package/dist/host/tests/policy.test.ts +21 -7
- package/dist/host/tests/setupPolicy.ts +147 -12
- package/dist/src/core/index.cjs +22 -28
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +8 -8
- package/dist/src/core/index.d.ts +8 -8
- package/dist/src/core/index.js +22 -28
- package/dist/src/core/index.js.map +1 -1
- package/package.json +12 -12
|
@@ -742,7 +742,7 @@ The following table lists the errors the root declares and the guards that narro
|
|
|
742
742
|
| API | Kind | Summary |
|
|
743
743
|
| ------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
744
744
|
| `JudgeAbortError` | class | Reports a judge call cancelled by the caller's signal or its deadline, carrying the `JudgeResult` merged from the calls that completed before the cancel and the machine-readable `code` `'ABORT'`. |
|
|
745
|
-
| `isJudgeAbortError` | function | Narrows a caught value to a `JudgeAbortError` through
|
|
745
|
+
| `isJudgeAbortError` | function | Narrows a caught value to a `JudgeAbortError` through its identity brand and declared members, so a `catch` can recover its `partial` result. |
|
|
746
746
|
|
|
747
747
|
#### Shapes and contracts
|
|
748
748
|
|
|
@@ -862,11 +862,11 @@ The following table lists the errors the providers module declares and the guard
|
|
|
862
862
|
| API | Kind | Summary |
|
|
863
863
|
| ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
864
864
|
| `ProviderAbortError` | class | Reports a provider stream cancelled mid-flight by its bound signal — thrown by the `stream` method of a `ProviderInterface`, carrying the `ProviderResult` assembled from whatever streamed before the cancel and the machine-readable `code` `'ABORT'`. |
|
|
865
|
-
| `isProviderAbortError` | function | Narrows an unknown caught value to a `ProviderAbortError` through
|
|
865
|
+
| `isProviderAbortError` | function | Narrows an unknown caught value to a `ProviderAbortError` through its identity brand and declared members, so a `catch` can recover its `partial` result. |
|
|
866
866
|
| `ProviderError` | class | Reports a coded provider failure with its HTTP status and underlying cause when available. |
|
|
867
|
-
| `isProviderError` | function | Narrows a caught value to the provider failure class through
|
|
867
|
+
| `isProviderError` | function | Narrows a caught value to the provider failure class through its identity brand and declared members. |
|
|
868
868
|
| `JudgeError` | class | Reports a coded judge failure with its HTTP status and underlying cause when available. |
|
|
869
|
-
| `isJudgeError` | function | Narrows a caught value to the judge failure class through
|
|
869
|
+
| `isJudgeError` | function | Narrows a caught value to the judge failure class through its identity brand and declared members. |
|
|
870
870
|
|
|
871
871
|
#### Shapes and contracts
|
|
872
872
|
|
|
@@ -998,7 +998,7 @@ The following table lists the errors the conversations module declares and the g
|
|
|
998
998
|
| API | Kind | Summary |
|
|
999
999
|
| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1000
1000
|
| `ConversationError` | class | Reports a conversation with no `ConversationSummaryHandler` to fold its messages with, a `sections` cap below `1`, a `keep` that is not a nonnegative safe integer, or a judgment or judge request that JSON cannot carry — thrown by the `compact()` method of a `ConversationInterface`, its construction, or its judgment store, carrying the machine-readable `code` `'SUMMARIZER' \| 'SECTIONS' \| 'JUDGMENT' \| 'KEEP'`. |
|
|
1001
|
-
| `isConversationError` | function | Narrows an unknown caught value to a `ConversationError` through
|
|
1001
|
+
| `isConversationError` | function | Narrows an unknown caught value to a `ConversationError` through its identity brand and declared members, so a `catch` can branch on its `code`. |
|
|
1002
1002
|
|
|
1003
1003
|
#### Factories
|
|
1004
1004
|
|
|
@@ -1148,7 +1148,7 @@ The following table lists the types the agents module declares:
|
|
|
1148
1148
|
| `AgentTurn` | interface | `{ content, thinking, usage, spent, messages, ending, partial, futile, estimate, interrupted, truncated }` | Holds what one agent loop turn contributed to its run and how the turn ended — the readonly record the loop appends for each turn, from which the run derives its `AgentRunResult`. |
|
|
1149
1149
|
| `AgentStop` | type | `{ layer: 'meter' \| 'budget', id, max, consumed, estimate?, usage? } \| { layer: 'model', id, estimate?, usage? }` | Represents why one of a run's three allowed failure layers stopped it — the meter's estimate allowance, the cost budget, or the model's own token limit — with the readings that layer crossed. |
|
|
1150
1150
|
| `AgentErrorCode` | type | `'CONCURRENCY' \| 'LIMIT' \| 'REGISTRY' \| 'WINDOW'` | Names the machine-readable agent concurrency, limit, registry, and window failures. |
|
|
1151
|
-
| `MessageMeasure` | interface | `{ id, role, content,
|
|
1151
|
+
| `MessageMeasure` | interface | `{ id, role, content, uniform, calls, thinking, images }` | Holds the disjoint estimate components of one message, in heuristic estimate units. |
|
|
1152
1152
|
| `RequestMeasure` | interface | `{ messages, tools, schema }` | Holds the disjoint estimate components of one provider request, in heuristic estimate units. |
|
|
1153
1153
|
| `ChannelInterface` | interface | `{} plus push, close, fail, drain` | Buffers values in an unbounded async channel — a producer writes them in (`push`) and ends it (`close` / `fail`) regardless of consumption, while a consumer reads them back live through `drain`. |
|
|
1154
1154
|
| `StreamInterface` | interface | `{ events, result } plus abort` | Pairs a live event stream with the eventual settled result and a cancel — the generic pull/streaming handle a long-running operation hands back. |
|
|
@@ -1185,9 +1185,9 @@ The following table lists the errors the agents module declares and the guards t
|
|
|
1185
1185
|
| API | Kind | Summary |
|
|
1186
1186
|
| ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1187
1187
|
| `AgentJobError` | class | Reports an `AgentInterface` run that ended `AgentResult.partial` under a `partial` policy of `false` (the default) — thrown by an agent-job handler (a `createAgentQueue` / `createAgentRunner` job), carrying the partial `AgentResult` so the failure stays inspectable, and the machine-readable `code` `'PARTIAL'`. |
|
|
1188
|
-
| `isAgentJobError` | function | Narrows an unknown caught value to an `AgentJobError` through
|
|
1188
|
+
| `isAgentJobError` | function | Narrows an unknown caught value to an `AgentJobError` through its identity brand and declared members, so a `catch` can recover its `partial` result. |
|
|
1189
1189
|
| `AgentError` | class | Reports a run sharing accounting with a live run, a `limit` that is not a nonnegative safe integer, a name absent from a registry pool, or a strict run whose request exceeds its window. Agent construction, the `stream` and `generate` methods, and registry accessors throw synchronously, before returning a handle or promise; a `'WINDOW'` refusal rejects the run's `result` instead. Await the call inside `try`/`catch` to catch it. |
|
|
1190
|
-
| `isAgentError` | function | Narrows an unknown caught value to an `AgentError` through
|
|
1190
|
+
| `isAgentError` | function | Narrows an unknown caught value to an `AgentError` through its identity brand and declared members, so a `catch` can branch on its `code`. |
|
|
1191
1191
|
|
|
1192
1192
|
#### Factories
|
|
1193
1193
|
|
|
@@ -1326,7 +1326,7 @@ The following table lists the types the ledger declares, each with its shape:
|
|
|
1326
1326
|
| `GaugeCall` | interface | `{ estimate, prompt?, completion?, thinking?, tools }` | Carries one agent call as the gauge reads it. |
|
|
1327
1327
|
| `GaugeOptions` | interface | `{ scale, overhead, capacity, predict?, replay? }` | Configures a gauge: its starting price of a prompt and the context capacity it measures against. |
|
|
1328
1328
|
| `GaugeInterface` | interface | `{ scale, overhead } plus rate, remainder, reserve, room, observe` | Prices prompts in tokens and measures the room a request has left. |
|
|
1329
|
-
| `
|
|
1329
|
+
| `LedgerPlanGroup` | type | `1 \| 2 \| 3` | Names a briefing source's planning group: a topic match, an off-topic rule or correction, or a name match. |
|
|
1330
1330
|
| `LedgerErrorCode` | type | `'REQUEST' \| 'THRESHOLD' \| 'SHARE' \| 'CAPACITY' \| 'LIMIT' \| 'TOPIC' \| 'LOOKUP' \| 'GAUGE' \| 'REFERENCE'` | Names the machine-readable conditions a `LedgerError` error reports. |
|
|
1331
1331
|
|
|
1332
1332
|
#### Constants
|
|
@@ -1353,10 +1353,10 @@ The following table lists the constants that hold the ledger's categories, recor
|
|
|
1353
1353
|
|
|
1354
1354
|
The following table lists the error the ledger raises and the guard that narrows it:
|
|
1355
1355
|
|
|
1356
|
-
| API | Kind | Summary
|
|
1357
|
-
| --------------- | -------- |
|
|
1358
|
-
| `LedgerError` | class | Reports an invalid ledger configuration, failed calibration, or unowned request selection, carrying the machine-readable `code`.
|
|
1359
|
-
| `isLedgerError` | function | Narrows an unknown caught value to a `LedgerError` through
|
|
1356
|
+
| API | Kind | Summary |
|
|
1357
|
+
| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1358
|
+
| `LedgerError` | class | Reports an invalid ledger configuration, failed calibration, or unowned request selection, carrying the machine-readable `code`. |
|
|
1359
|
+
| `isLedgerError` | function | Narrows an unknown caught value to a `LedgerError` through its identity brand and declared members, so a `catch` can branch on its `code`. |
|
|
1360
1360
|
|
|
1361
1361
|
#### Factories
|
|
1362
1362
|
|
|
@@ -195,6 +195,10 @@ drift between the guard and the schema.
|
|
|
195
195
|
`BriefError` extends `Error` with a readonly `code` on the `BriefErrorCode` vocabulary and an
|
|
196
196
|
optional readonly `context` record.
|
|
197
197
|
|
|
198
|
+
The guard recognizes the shared brand across package copies, accepts subclasses,
|
|
199
|
+
and refuses transparent proxies and unbranded look-alikes. It accepts class and
|
|
200
|
+
callable contexts that satisfy the declared context type.
|
|
201
|
+
|
|
198
202
|
```ts
|
|
199
203
|
import { BriefError, isBriefError } from '@orkestrel/brief'
|
|
200
204
|
|