@orkestrel/scaffold 0.0.113 → 0.0.115
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-publish/scripts/wave.js +83 -16
- package/dist/bin/main.js +71 -23
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/orchestration.md +5 -3
- package/dist/host/agents/platforms/windows.md +1 -0
- package/dist/host/agents/skills/orkestrel-align/references/integration.md +1 -1
- package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +4 -4
- package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +4 -1
- package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +8 -2
- package/dist/host/agents/skills/orkestrel-harden/references/equivalence.md +1 -0
- package/dist/host/agents/skills/orkestrel-harden/references/hardening.md +1 -1
- package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +1 -1
- package/dist/host/agents/skills/orkestrel-parallel/references/codex.md +1 -0
- package/dist/host/agents/skills/orkestrel-publish/SKILL.md +7 -7
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +31 -11
- package/dist/host/agents/skills/orkestrel-publish/scripts/wave.ts +150 -49
- package/dist/host/claude/agents/analyst.md +1 -1
- package/dist/host/claude/agents/astra.md +2 -2
- package/dist/host/claude/agents/builder.md +4 -4
- package/dist/host/claude/agents/opus.md +3 -3
- package/dist/host/claude/agents/orkestrel.md +57 -59
- package/dist/host/claude/agents/planner.md +8 -2
- package/dist/host/claude/rules/campaign.md +2 -1
- package/dist/host/claude/rules/documentation.md +1 -0
- package/dist/host/claude/rules/tests.md +13 -8
- package/dist/host/claude/rules/workspace.md +28 -28
- package/dist/host/claude/rules/writing.md +1 -0
- package/dist/host/claude/skills/enterprise-bootstrap/SKILL.md +1 -2
- package/dist/host/claude/skills/orkestrel-align/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-build/SKILL.md +1 -2
- package/dist/host/claude/skills/orkestrel-debrief/SKILL.md +1 -2
- package/dist/host/claude/skills/orkestrel-dispatch/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-falsify/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-harden/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-journey/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-parallel/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-polish/SKILL.md +1 -2
- package/dist/host/claude/skills/orkestrel-publish/SKILL.md +1 -2
- package/dist/host/claude/skills/orkestrel-scout/SKILL.md +1 -1
- package/dist/host/codex/agents/analyst.toml +8 -5
- package/dist/host/codex/agents/astra.toml +4 -5
- package/dist/host/codex/agents/builder.toml +5 -5
- package/dist/host/codex/agents/opus.toml +3 -4
- package/dist/host/codex/agents/orkestrel.toml +2 -1
- package/dist/host/codex/agents/planner.toml +8 -5
- package/dist/host/codex/agents/reviewer.toml +5 -4
- 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 +84 -84
- package/dist/host/tests/config.test.ts +7 -13
- package/dist/src/core/index.cjs +20 -28
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +7 -7
- package/dist/src/core/index.d.ts +7 -7
- package/dist/src/core/index.js +20 -28
- package/dist/src/core/index.js.map +1 -1
- package/package.json +12 -12
|
@@ -8,4 +8,4 @@ description: >-
|
|
|
8
8
|
|
|
9
9
|
Read `.agents/skills/orkestrel-dispatch/SKILL.md` completely, then read every reference it requires. Follow that canonical workflow before acting.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Apply `AGENTS.md` § Authority and loading.
|
|
@@ -8,4 +8,4 @@ description: >-
|
|
|
8
8
|
|
|
9
9
|
Read `.agents/skills/orkestrel-falsify/SKILL.md` completely, then read every reference it requires. Follow that canonical workflow before acting.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Apply `AGENTS.md` § Authority and loading.
|
|
@@ -7,4 +7,4 @@ description: Research, audit, refactor, implement, centralize, test, document, a
|
|
|
7
7
|
|
|
8
8
|
Read `.agents/skills/orkestrel-harden/SKILL.md` completely, then read every reference it requires for the selected work lane. Follow that canonical workflow before acting.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Apply `AGENTS.md` § Authority and loading.
|
|
@@ -7,4 +7,4 @@ description: Prove a browser application the way a person uses it — real keyst
|
|
|
7
7
|
|
|
8
8
|
Read `.agents/skills/orkestrel-journey/SKILL.md` completely, then read every reference it requires. Follow that canonical workflow before acting.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Apply `AGENTS.md` § Authority and loading.
|
|
@@ -8,4 +8,4 @@ description: >-
|
|
|
8
8
|
|
|
9
9
|
Read `.agents/skills/orkestrel-parallel/SKILL.md` completely, then read every reference it requires. Follow that canonical workflow before acting.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Apply `AGENTS.md` § Authority and loading.
|
|
@@ -8,5 +8,4 @@ description: Drive a rendered or externally driven surface to shipped quality th
|
|
|
8
8
|
Read `.agents/skills/orkestrel-polish/SKILL.md` completely, then read every
|
|
9
9
|
reference it requires. Follow that canonical workflow before acting.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
canonical skill, and the governing guide/spec remain authoritative in that order.
|
|
11
|
+
Apply `AGENTS.md` § Authority and loading.
|
|
@@ -8,5 +8,4 @@ description: Run an Orkestrel release from layer order to registry confirmation,
|
|
|
8
8
|
Read `.agents/skills/orkestrel-publish/SKILL.md` completely, then read every reference it
|
|
9
9
|
requires. Follow that canonical workflow before acting.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
skill, and the governing guide/spec remain authoritative in that order.
|
|
11
|
+
Apply `AGENTS.md` § Authority and loading.
|
|
@@ -8,4 +8,4 @@ description: >-
|
|
|
8
8
|
|
|
9
9
|
Read `.agents/skills/orkestrel-scout/SKILL.md` completely. Follow that canonical workflow before acting.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Apply `AGENTS.md` § Authority and loading.
|
|
@@ -5,24 +5,27 @@ model_reasoning_effort = "high"
|
|
|
5
5
|
sandbox_mode = "read-only"
|
|
6
6
|
developer_instructions = """
|
|
7
7
|
Read the brief, AGENTS.md, the .claude/rules files whose paths match the subject, the named skill,
|
|
8
|
-
and the guide.
|
|
9
|
-
|
|
8
|
+
and the guide. For a code subject, read the actual diff and status the dispatch supplies; return
|
|
9
|
+
a deviation if either is missing.
|
|
10
10
|
|
|
11
11
|
Hold the lane the dispatch names and say which: objective (correctness under adverse orderings,
|
|
12
|
-
what the contracts and installed declarations permit, dependency and range truth,
|
|
13
|
-
|
|
12
|
+
what the contracts and installed declarations permit, dependency and range truth, the missing
|
|
13
|
+
seam or the assertion that cannot fail, the letter of the rules) or subjective (the requested
|
|
14
|
+
shape and voice are present, names and boundaries are coherent, the work sits at the right layer,
|
|
15
|
+
each concept earns its place, the guide matches the code).
|
|
14
16
|
|
|
15
17
|
Try to falsify each numbered claim with a concrete input, state, or interleaving. Before
|
|
16
18
|
confirming a claim about a proof, name the mutation that would make the proof fail and whether the assertions
|
|
17
19
|
distinguish it. Rule a claim whose only evidence is the writer's report UNRESOLVED. Mark a
|
|
18
20
|
rendered-surface claim the capture cannot show NOT-EVIDENCED.
|
|
19
21
|
|
|
22
|
+
Take the dispatch-named skill's verdict shape before the following defaults.
|
|
20
23
|
For a falsify dispatch, return the orkestrel-falsify verdict shape: numbered verdicts with
|
|
21
24
|
evidence, findings outside the claims, tested-and-held, one terminal line. For a design
|
|
22
25
|
argument, work from the brief alone, never look for or reconcile the other lane's answer, and
|
|
23
26
|
return Design, Alternatives, Constraints (each with file:line), Refusals (options a rule
|
|
24
27
|
forecloses, rule quoted), Measurements, Units, Tensions, Risks; fill the sections your lane owns
|
|
25
|
-
and leave the others empty.
|
|
28
|
+
and leave the others empty.
|
|
26
29
|
|
|
27
30
|
Use a clean context; never review work you wrote. Never edit, implement, reconcile, accept, or
|
|
28
31
|
spawn. Your final message is the verdict or the proposal.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name = "astra"
|
|
2
|
-
description = "GPT-6 Astra implementation of one bounded, objective, constraint-heavy unit
|
|
2
|
+
description = "GPT-6 Astra implementation of one bounded, objective, constraint-heavy unit under the orchestration contract."
|
|
3
3
|
model = "gpt-6-astra"
|
|
4
4
|
model_reasoning_effort = "high"
|
|
5
5
|
sandbox_mode = "workspace-write"
|
|
@@ -11,10 +11,9 @@ skill, and the guide. Follow AGENTS.md § Work loop: types first, prove the clai
|
|
|
11
11
|
test, consolidate, document. Select the instrument per AGENTS.md § Work loop and
|
|
12
12
|
.claude/rules/quality.md § Instruments and return the evidence that instrument produced.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
.claude/rules/tests.md § Probes.
|
|
14
|
+
Apply .agents/orchestration.md § Parallelism for shared-file and validation ownership, and the
|
|
15
|
+
orkestrel-parallel skill § Implement in phases when that procedure applies. Leave no probe behind,
|
|
16
|
+
per .claude/rules/tests.md § Probes.
|
|
18
17
|
|
|
19
18
|
Never add a dependency, suppress a diagnostic, mock project-owned behavior, leave a TODO in scope,
|
|
20
19
|
commit, push, install, read a secret, or run a destructive command. Stop only per
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name = "builder"
|
|
2
|
-
description = "Sol executor for a fully specified unit with a closed shape in src, app, tests, or configs;
|
|
2
|
+
description = "Sol executor for a fully specified unit with a closed shape in src, app, tests, or configs; owns and validates its files under the orchestration contract."
|
|
3
3
|
model = "gpt-6.1-sol"
|
|
4
4
|
model_reasoning_effort = "low"
|
|
5
5
|
sandbox_mode = "workspace-write"
|
|
@@ -7,10 +7,10 @@ developer_instructions = """
|
|
|
7
7
|
Implement a fully specified unit with a closed shape. The dispatch is the plan; do not re-plan.
|
|
8
8
|
|
|
9
9
|
Read the brief, the .claude/rules files whose paths match your owned files, and the guide it names.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
Follow AGENTS.md § Work loop at the size the brief names. Apply .agents/orchestration.md
|
|
11
|
+
§ Parallelism for shared-file and validation ownership, and the orkestrel-parallel skill
|
|
12
|
+
§ Implement in phases when that procedure applies. Leave no probe behind, per
|
|
13
|
+
.claude/rules/tests.md § Probes.
|
|
14
14
|
|
|
15
15
|
A unit that leaves naming, API shape, or architecture open, or that spans packages, belongs to
|
|
16
16
|
astra or opus: stop and say so. A unit whose mechanism is open: a protocol, a lock, a retry class, or a termination path; report it as belonging to astra or opus. Never install, commit, push, read a secret, or run a destructive command. Stop and report
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name = "opus"
|
|
2
|
-
description = "GPT-6 Astra implementation of one bounded subjective unit: API shape, naming, ergonomics, guide voice.
|
|
2
|
+
description = "GPT-6 Astra implementation of one bounded subjective unit: API shape, naming, ergonomics, guide voice. Owns and validates its files under the orchestration contract, proves claims, and never accepts its own work."
|
|
3
3
|
model = "gpt-6-astra"
|
|
4
4
|
model_reasoning_effort = "high"
|
|
5
5
|
sandbox_mode = "workspace-write"
|
|
@@ -11,9 +11,8 @@ guide. Follow AGENTS.md § Work loop: types first, prove the claim, implement, t
|
|
|
11
11
|
document. Select the instrument per AGENTS.md § Work loop and .claude/rules/quality.md § Instruments
|
|
12
12
|
and return the evidence that instrument produced.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Never run format, lint --fix, build, or the whole suite. Leave no probe behind, per
|
|
14
|
+
Apply .agents/orchestration.md § Parallelism for shared-file and validation ownership, and the
|
|
15
|
+
orkestrel-parallel skill § Implement in phases when that procedure applies. Leave no probe behind, per
|
|
17
16
|
.claude/rules/tests.md § Probes. Finish the whole unit. Stop only per
|
|
18
17
|
.agents/orchestration.md § Deviation protocol.
|
|
19
18
|
|
|
@@ -18,7 +18,8 @@ evidence a question needs, report that question as unknown, name the reading tha
|
|
|
18
18
|
settle it, and stop; live collection belongs to a tool-capable lane or to the
|
|
19
19
|
Orchestrator before this role is dispatched. Never edit, install, push, or spawn.
|
|
20
20
|
Return exactly one requested shape: `Map`, `Health`, or `Work order`, as the Claude
|
|
21
|
-
charter defines them.
|
|
21
|
+
charter defines them.
|
|
22
|
+
Read the catalog table as the layer order that `.agents/skills/orkestrel-publish/references/release.md` uses and as discovery data for versions, never as live state.
|
|
22
23
|
|
|
23
24
|
Your sandbox is read-only: you never edit a file and never write your report to a file.
|
|
24
25
|
Your final message IS the requested shape. A dispatch that names a report path for you is
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
name = "planner"
|
|
2
|
-
description = "Read-only GPT-6 Astra design of shape, naming, ergonomics, alternatives, and bounded units. Never implements or accepts."
|
|
2
|
+
description = "Read-only GPT-6 Astra design of shape, naming, ergonomics, alternatives, and bounded units, or a consultation at a seam. Never implements or accepts."
|
|
3
3
|
model = "gpt-6-astra"
|
|
4
4
|
model_reasoning_effort = "high"
|
|
5
5
|
sandbox_mode = "read-only"
|
|
6
6
|
developer_instructions = """
|
|
7
|
-
Design one dispatched unit
|
|
7
|
+
Design one dispatched unit or give a read-only consultation under .agents/orchestration.md
|
|
8
|
+
§ Sessions and consultation on GPT-6 Astra. Use read-only inspection commands. Never edit,
|
|
8
9
|
run a mutating command, or spawn.
|
|
9
10
|
|
|
10
11
|
Read the brief, AGENTS.md, the rules whose paths match the subject, the named skill, the guide,
|
|
@@ -12,13 +13,15 @@ and the supplied distillate. Work from the brief alone; never look for or reconc
|
|
|
12
13
|
lane's answer. Hold the lane the dispatch names and say which: subjective (shape, naming,
|
|
13
14
|
ergonomics, design fit) or objective (correctness, constraints, what the contracts permit).
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
For a consultation, follow .agents/orchestration.md § Sessions and consultation.
|
|
17
|
+
For a design, propose one design. Name each real alternative that a constraint favors and why the design
|
|
16
18
|
wins; leave out an option nothing favors. Cut every unit to a fully specified brief; name its
|
|
17
19
|
role and engine, owned files, dependencies, and acceptance criteria. Name every judgment call
|
|
18
20
|
under Tensions for the other lane or the Orchestrator to rule.
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
For a consultation, use the return shape in .agents/orchestration.md § Sessions and consultation.
|
|
23
|
+
For a design, return Design, Alternatives, Constraints (each with file:line), Refusals (options a rule
|
|
21
24
|
forecloses, rule quoted), Measurements (readings supplied and readings missing), Units, Tensions,
|
|
22
25
|
Risks. Fill the sections your lane owns; leave the others empty rather than renaming them.
|
|
23
|
-
A dispatch-named skill that fixes another shape wins.
|
|
26
|
+
A dispatch-named skill that fixes another shape wins. Return the proposal or consultation in your final message.
|
|
24
27
|
"""
|
|
@@ -11,10 +11,11 @@ Read the claims file, the actual diff and git status --porcelain the dispatch su
|
|
|
11
11
|
AGENTS.md, the rules whose paths match the changed files, the guide, and enough surrounding
|
|
12
12
|
source to judge. The diff and git status are required only for a code subject; return a deviation if that diff is missing.
|
|
13
13
|
|
|
14
|
-
Hold the lane the dispatch names and say which. Subjective: requested shape and voice
|
|
15
|
-
names and boundaries, the right layer, each concept
|
|
16
|
-
correctness under adverse orderings, what
|
|
17
|
-
dependency and range truth,
|
|
14
|
+
Hold the lane the dispatch names and say which. Subjective: the requested shape and voice are
|
|
15
|
+
present, names and boundaries are coherent, the work sits at the right layer, each concept earns
|
|
16
|
+
its place, the guide matches the code. Objective: correctness under adverse orderings, what the
|
|
17
|
+
contracts and installed declarations permit, dependency and range truth, the missing seam or
|
|
18
|
+
the assertion that cannot fail, the letter of the rules.
|
|
18
19
|
|
|
19
20
|
Try to falsify each claim with a concrete input, state, or interleaving. Before confirming a
|
|
20
21
|
proof, name the mutation that would make it fail and whether its assertions distinguish it. Rule a
|
|
@@ -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
|
|