@iowarp/clio-coder 0.3.4 → 0.3.6
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/CHANGELOG.md +37 -2
- package/CONTRIBUTING.md +6 -6
- package/README.md +2 -2
- package/dist/{acp-S5R4RR5B.js → acp-2BEHC4DL.js} +4 -4
- package/dist/{agents-P6DMMVZY.js → agents-LNNFTM53.js} +13 -11
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-2XCZLPKS.js → auth-KXXFI2VS.js} +6 -6
- package/dist/{chunk-YCWGATWI.js → chunk-24I7BN55.js} +2 -2
- package/dist/{chunk-EKMEHE4H.js → chunk-33YXPOE3.js} +2 -3
- package/dist/chunk-3BPUFZDL.js +37 -0
- package/dist/{chunk-WPQLXFOZ.js → chunk-43AOLP7E.js} +2 -2
- package/dist/{chunk-N4CZJQRK.js → chunk-5JGRAMKL.js} +4 -4
- package/dist/{chunk-BRXQQJFP.js → chunk-6US73PDB.js} +568 -47
- package/dist/{chunk-K6WL7QZT.js → chunk-6XXKFVSN.js} +2 -2
- package/dist/{chunk-QQK64KLB.js → chunk-CJUB2JJ2.js} +138 -20
- package/dist/{chunk-HV5X7OR2.js → chunk-CKXWIANG.js} +12 -12
- package/dist/{chunk-UZHIZC5S.js → chunk-CYQKWTG3.js} +61 -76
- package/dist/{chunk-QWU7ZBO7.js → chunk-DJVECN66.js} +204 -45
- package/dist/{chunk-ZWMF7253.js → chunk-E2ER4LJF.js} +304 -9
- package/dist/{chunk-7RXG6QRZ.js → chunk-EKY57CSP.js} +2 -75
- package/dist/{chunk-EDRHSCIE.js → chunk-EYPA3EGJ.js} +10 -2
- package/dist/{chunk-TTNYS3EA.js → chunk-G7MUEIGA.js} +1 -1
- package/dist/{chunk-BPGS2WCQ.js → chunk-GEYXPTRF.js} +2 -1
- package/dist/{chunk-BEY543CS.js → chunk-GOXNB3AO.js} +5 -2
- package/dist/{chunk-G4BMMOKF.js → chunk-HVDIIIQW.js} +2 -2
- package/dist/chunk-HWUFFB6L.js +83 -0
- package/dist/{chunk-35MKKU5R.js → chunk-K7T3E2SR.js} +15 -8
- package/dist/{chunk-VAWWTKDP.js → chunk-KHSFENX2.js} +2 -2
- package/dist/chunk-LCGCVYZ4.js +57 -0
- package/dist/{chunk-X6COSD2O.js → chunk-LYF7OHWH.js} +41 -14
- package/dist/{chunk-POHLU5DW.js → chunk-M6L6IDJG.js} +3 -3
- package/dist/{chunk-X4RCMKVQ.js → chunk-NDINPTJ4.js} +2 -2
- package/dist/{chunk-5M54SPOL.js → chunk-ODFEOB4F.js} +161 -5
- package/dist/{chunk-3JLKSKD7.js → chunk-OH3TOQTB.js} +5 -1
- package/dist/{chunk-MEQ45TQ4.js → chunk-PBTHKCPN.js} +18 -4
- package/dist/{chunk-ED4KHGC3.js → chunk-PPAMZ32Z.js} +9 -2
- package/dist/{chunk-QQL5RT5M.js → chunk-QM3F2GKX.js} +94 -36
- package/dist/{chunk-A2GZF7DC.js → chunk-QNQHSOLF.js} +4 -4
- package/dist/{chunk-KRPY7NTG.js → chunk-R46L2BIR.js} +3 -3
- package/dist/{chunk-BP4OYD6A.js → chunk-RY3LY4J5.js} +20 -2
- package/dist/{chunk-34475P3I.js → chunk-TSHXZTOQ.js} +5 -4
- package/dist/{chunk-VJWL6YS5.js → chunk-UUVG37B4.js} +2 -2
- package/dist/{chunk-2TZWSW76.js → chunk-WHGPSPT5.js} +2 -2
- package/dist/{chunk-TW3WDMVS.js → chunk-WHJYKASB.js} +2 -2
- package/dist/{chunk-YHZX5GEU.js → chunk-XAKHZX5N.js} +2 -2
- package/dist/{chunk-HXG4IURW.js → chunk-XE2VEJHX.js} +2 -2
- package/dist/{chunk-3HZ5RWN2.js → chunk-XF5N4U5A.js} +7 -6
- package/dist/{chunk-ZYKPLLNQ.js → chunk-XXQNGV4M.js} +590 -32
- package/dist/{chunk-4JUF2NNX.js → chunk-XYDYPRZI.js} +4 -4
- package/dist/{chunk-VMNQ6OZA.js → chunk-ZRGEBJ4T.js} +971 -794
- package/dist/{chunk-2LZI5CAG.js → chunk-ZXF4XRKW.js} +75 -33
- package/dist/{chunk-VSNATDE6.js → chunk-ZZMN5OM4.js} +2 -2
- package/dist/cli/index.js +31 -31
- package/dist/{clio-J5JIOIDS.js → clio-M2KGYUFZ.js} +2 -2
- package/dist/{code-nav-AXCXSBHX.js → code-nav-GQNL7XA6.js} +5 -5
- package/dist/codewiki/build-worker.js +4 -4
- package/dist/{components-KELWS457.js → components-5TTYYX6G.js} +3 -3
- package/dist/{config-OEBMIN2U.js → config-XUUYQIWO.js} +27 -25
- package/dist/{configure-PUQOSIXQ.js → configure-IHJ7YOMV.js} +7 -7
- package/dist/{context-URSXPBCK.js → context-74JLXAWD.js} +12 -12
- package/dist/{context-MGSE4Z2T.js → context-75MIWW3U.js} +24 -22
- package/dist/{context-EKDCKUUZ.js → context-ZQ7SIFJV.js} +8 -7
- package/dist/{context-clear-KDAJRNUK.js → context-clear-GYKWNUML.js} +24 -22
- package/dist/{context-index-BZ4UYMTC.js → context-index-SSR5ECNE.js} +3 -3
- package/dist/{context-working-set-SBKMPPI2.js → context-working-set-UX5KEP4J.js} +11 -10
- package/dist/{dispatch-runner-MSWN72NK.js → dispatch-runner-GIJBHNFL.js} +21 -20
- package/dist/{docs-2C2LTVT2.js → docs-6FZSCG5B.js} +3 -3
- package/dist/{doctor-7BSE27PJ.js → doctor-SVJ5BZCW.js} +4 -4
- package/dist/{eval-IZGDOO4H.js → eval-CG6LLBLD.js} +47 -232
- package/dist/{evidence-SR7WXB5B.js → evidence-ZYFIEN42.js} +19 -18
- package/dist/{evolve-K7VE2CBX.js → evolve-QGEXEMDW.js} +19 -18
- package/dist/{extensions-QVDOHDGJ.js → extensions-ADGNCJJD.js} +3 -3
- package/dist/{fleet-7XMJNQNF.js → fleet-S5R4ZOQY.js} +49 -30
- package/dist/{fleet-preflight-AQNAH644.js → fleet-preflight-BHSNPBMH.js} +2 -2
- package/dist/{init-JGNPAYXT.js → init-5DRU55YR.js} +31 -29
- package/dist/memory-7YKKR6UC.js +467 -0
- package/dist/{models-ZMMLFJNN.js → models-ZPOLRU2C.js} +10 -10
- package/dist/{monitor-2F3T5KHP.js → monitor-US5F5YGZ.js} +33 -18
- package/dist/{orchestrator-ORHT43JB.js → orchestrator-E2AL4T5N.js} +1092 -659
- package/dist/{paths-UXLN5YYZ.js → paths-E7KYAQWE.js} +3 -3
- package/dist/{reset-NXGTYNUO.js → reset-KZ652EK6.js} +3 -3
- package/dist/{run-RF4WJGMT.js → run-SRNBKDWD.js} +52 -40
- package/dist/{share-UT3W6E4M.js → share-CGZE33UP.js} +3 -3
- package/dist/{skills-PSACKC5Q.js → skills-S2X4DLY5.js} +4 -4
- package/dist/{skills-eval-WJSI55RZ.js → skills-eval-W2GGIC4R.js} +19 -18
- package/dist/{targets-PIIRAOYS.js → targets-54SWINWB.js} +14 -12
- package/dist/{terminal-lease-ULWXWNVY.js → terminal-lease-SAIF2OGY.js} +5 -4
- package/dist/{uninstall-FZCQCDKC.js → uninstall-BVLWXKBT.js} +3 -3
- package/dist/{upgrade-346TZ6AV.js → upgrade-JKAR27XC.js} +8 -8
- package/dist/{usage-6KKXR32N.js → usage-MSAWCLX4.js} +60 -27
- package/dist/{verifiers-4UUM6TEE.js → verifiers-NCBTHHN2.js} +60 -54
- package/dist/{wiki-generate-7STOCIFZ.js → wiki-generate-GUSOQ6ZP.js} +30 -28
- package/dist/worker/entry.js +69 -58
- package/dist/{workspace-G4ZWUIPR.js → workspace-ZJ6BFM3Q.js} +4 -4
- package/docs/README.md +3 -3
- package/docs/acp.md +1 -1
- package/docs/alcf-provider.md +1 -1
- package/docs/architecture.md +2 -2
- package/docs/artifact-placement.md +1 -2
- package/docs/artifact-versions.md +1 -1
- package/docs/built-in-agents.md +1 -1
- package/docs/capacity-and-scheduling.md +1 -1
- package/docs/commands-and-modes.md +9 -7
- package/docs/configuration-and-targets.md +12 -1
- package/docs/context-engine.md +4 -2
- package/docs/context-working-set.md +4 -4
- package/docs/development-pipeline.md +1 -1
- package/docs/documentation-coverage.md +3 -3
- package/docs/documentation-guide.md +2 -2
- package/docs/eval-runner.md +1 -1
- package/docs/evals-internal.md +4 -45
- package/docs/evidence-and-memory.md +67 -7
- package/docs/evolution.md +1 -1
- package/docs/exit-codes-and-output.md +1 -1
- package/docs/extensions-and-sharing.md +2 -2
- package/docs/fleet-dispatch.md +28 -2
- package/docs/installation-and-lifecycle.md +2 -2
- package/docs/middleware-and-components.md +19 -2
- package/docs/model-catalog.md +1 -1
- package/docs/observability.md +3 -3
- package/docs/proactive-memory.md +26 -16
- package/docs/prompt-envelope-and-tools.md +4 -2
- package/docs/provider-adapter-cookbook.md +1 -1
- package/docs/release-cut-checklist.md +38 -35
- package/docs/safety-model.md +29 -7
- package/docs/scientific-validation.md +3 -3
- package/docs/session-lifecycle.md +1 -1
- package/docs/skills-marketplace.md +1 -1
- package/docs/tool-usage.md +2 -2
- package/docs/trace-store.md +1 -1
- package/docs/troubleshooting.md +1 -1
- package/docs/tui-design.md +38 -4
- package/docs/worker-dispatch-mechanics.md +1 -1
- package/package.json +7 -4
- package/src/cli/agents.ts +2 -3
- package/src/cli/argv.ts +14 -1
- package/src/cli/fleet.ts +15 -0
- package/src/cli/index.ts +1 -1
- package/src/cli/memory.ts +272 -10
- package/src/cli/modes/json-stream.ts +2 -2
- package/src/cli/modes/print.ts +12 -1
- package/src/cli/run.ts +22 -2
- package/src/cli/targets.ts +12 -3
- package/src/cli/usage.ts +55 -7
- package/src/core/bus-events.ts +3 -0
- package/src/core/response-model-id.ts +134 -0
- package/src/core/toml.ts +62 -0
- package/src/core/workspace-files.ts +0 -1
- package/src/domains/agents/builtins/architect.md +1 -1
- package/src/domains/agents/catalog.ts +5 -4
- package/src/domains/agents/recipe.ts +54 -14
- package/src/domains/agents/result-contract.ts +7 -4
- package/src/domains/context/bootstrap.ts +36 -27
- package/src/domains/context/project-metadata.ts +19 -63
- package/src/domains/context/prompt-context.ts +8 -0
- package/src/domains/context/working-set/policies/index.ts +3 -4
- package/src/domains/dispatch/budget-envelope.ts +396 -0
- package/src/domains/dispatch/contract.ts +2 -0
- package/src/domains/dispatch/extension.ts +81 -27
- package/src/domains/dispatch/orphan-recovery.ts +1 -0
- package/src/domains/dispatch/receipt-integrity.ts +4 -0
- package/src/domains/dispatch/state.ts +1 -0
- package/src/domains/dispatch/types.ts +10 -3
- package/src/domains/dispatch/validation.ts +14 -0
- package/src/domains/dispatch/worker-spawn.ts +14 -3
- package/src/domains/eval/metrics/evidence.ts +0 -116
- package/src/domains/eval/metrics/invariants.ts +1 -1
- package/src/domains/eval/runners/clio-run.ts +1 -10
- package/src/domains/eval/runners/external-command.ts +2 -29
- package/src/domains/eval/schema/suite.ts +0 -7
- package/src/domains/eval/suites/run.ts +1 -7
- package/src/domains/memory/index.ts +22 -0
- package/src/domains/memory/operations.ts +58 -1
- package/src/domains/memory/promotion.ts +281 -0
- package/src/domains/memory/prompt-section.ts +25 -5
- package/src/domains/memory/proposal.ts +51 -7
- package/src/domains/memory/task-bank.ts +3 -2
- package/src/domains/memory/task-memory-handoff.ts +181 -24
- package/src/domains/memory/task-memory-policy.ts +3 -1
- package/src/domains/memory/types.ts +37 -0
- package/src/domains/memory/validate.ts +178 -0
- package/src/domains/middleware/memory-intervention.ts +35 -25
- package/src/domains/middleware/runtime.ts +6 -0
- package/src/domains/middleware/skills-reminder.ts +19 -4
- package/src/domains/middleware/stalled-turn.ts +43 -1
- package/src/domains/middleware/types.ts +10 -0
- package/src/domains/observability/contract.ts +6 -1
- package/src/domains/observability/cost.ts +20 -4
- package/src/domains/observability/extension.ts +2 -2
- package/src/domains/providers/index.ts +3 -0
- package/src/domains/providers/model-discovery.ts +9 -0
- package/src/domains/providers/runtime-resolution.ts +38 -1
- package/src/domains/providers/runtimes/common/probe-helpers.ts +97 -16
- package/src/domains/providers/types/context-window-slots.ts +18 -0
- package/src/domains/providers/types/runtime-descriptor.ts +3 -1
- package/src/domains/safety/call-target.ts +211 -14
- package/src/domains/safety/decision-presentation.ts +268 -0
- package/src/domains/safety/redaction.ts +73 -0
- package/src/domains/session/context-ledger.ts +10 -1
- package/src/domains/session/decision-board.ts +4 -0
- package/src/domains/session/entries.ts +3 -0
- package/src/domains/session/history.ts +68 -19
- package/src/domains/session/usage.ts +24 -7
- package/src/engine/acp/event-mapper.ts +7 -0
- package/src/engine/acp/server.ts +29 -2
- package/src/engine/apis/lmstudio.ts +25 -4
- package/src/engine/apis/openai-completions.ts +147 -22
- package/src/engine/claude/sdk-runtime.ts +8 -2
- package/src/engine/claude/tool-safety.ts +13 -0
- package/src/engine/loop-guard.ts +27 -3
- package/src/engine/worker-events.ts +4 -3
- package/src/engine/worker-runtime.ts +59 -54
- package/src/entry/orchestrator.ts +18 -1
- package/src/interactive/chat-loop-messages.ts +22 -0
- package/src/interactive/chat-loop.ts +13 -0
- package/src/interactive/chat-renderer.ts +19 -3
- package/src/interactive/clio-editor.ts +44 -7
- package/src/interactive/context-overlay.ts +43 -5
- package/src/interactive/cost-overlay.ts +39 -8
- package/src/interactive/dispatch-board.ts +212 -35
- package/src/interactive/footer/widgets.ts +13 -0
- package/src/interactive/interactive-application.ts +6 -1
- package/src/interactive/interactive-input-runtime.ts +11 -1
- package/src/interactive/interactive-presentation.ts +11 -1
- package/src/interactive/memory-overlay.ts +89 -4
- package/src/interactive/overlay-ask-user-lifecycle.ts +1 -1
- package/src/interactive/overlay-frame.ts +5 -2
- package/src/interactive/overlay-general-openers.ts +40 -1
- package/src/interactive/overlay-key-routing.ts +41 -1
- package/src/interactive/overlay-lifecycle.ts +11 -4
- package/src/interactive/overlay-permission-lifecycle.ts +23 -8
- package/src/interactive/overlay-transitions.ts +11 -0
- package/src/interactive/overlays/ask-user.ts +74 -30
- package/src/interactive/overlays/decisions.ts +3 -1
- package/src/interactive/permission-hint.ts +35 -0
- package/src/interactive/permission-overlay.ts +95 -45
- package/src/interactive/renderers/tool-execution.ts +19 -49
- package/src/interactive/session-last-turn.ts +8 -1
- package/src/interactive/session-usage-reseed.ts +36 -10
- package/src/interactive/slash-commands.ts +2 -2
- package/src/interactive/status/summary.ts +5 -0
- package/src/interactive/status/types.ts +5 -0
- package/src/interactive/terminal-lease.ts +1 -0
- package/src/interactive/turn-context.ts +96 -23
- package/src/interactive/turn-middleware.ts +1 -0
- package/src/interactive/turn-runtime.ts +37 -8
- package/src/interactive/turn-state.ts +3 -0
- package/src/interactive/worker-progress.ts +440 -0
- package/src/interactive/worker-stream.ts +51 -110
- package/src/tools/agent-tools.ts +28 -3
- package/src/tools/ask-user.ts +21 -1
- package/src/tools/context/index.ts +2 -2
- package/src/tools/dispatch-arguments.ts +8 -0
- package/src/tools/dispatch-event-text.ts +19 -0
- package/src/tools/dispatch.ts +24 -1
- package/src/tools/monitor.ts +15 -0
- package/src/tools/registry.ts +15 -5
- package/src/tools/result-disposition.ts +156 -0
- package/src/tools/result-shaping.ts +59 -1
- package/src/tools/verify/authoring.ts +55 -54
- package/src/tools/worker-evidence.ts +19 -0
- package/src/worker/spec-contract.ts +43 -3
- package/dist/chunk-EFADSJET.js +0 -18
- package/dist/memory-4ALKDJ4Q.js +0 -246
- package/src/domains/eval/metrics/chaos-stream.ts +0 -93
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
protectedArtifactFromSessionEntry,
|
|
4
4
|
protectedArtifactStateFromSessionEntries,
|
|
5
5
|
readAuditRows,
|
|
6
|
-
readSessionEntriesForId
|
|
7
|
-
|
|
6
|
+
readSessionEntriesForId,
|
|
7
|
+
responseModelIdObservationFromRecord
|
|
8
|
+
} from "./chunk-CJUB2JJ2.js";
|
|
8
9
|
import {
|
|
9
10
|
FLEET_COMMAND_BASE_ENV,
|
|
10
11
|
describeWriteBoundary,
|
|
@@ -24,7 +25,7 @@ import {
|
|
|
24
25
|
sumEvalHarnessMetrics,
|
|
25
26
|
verifyReceiptIntegrity,
|
|
26
27
|
withReceiptIntegrity
|
|
27
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-OH3TOQTB.js";
|
|
28
29
|
import {
|
|
29
30
|
LOCAL_NODE_ID,
|
|
30
31
|
computeSettingsFingerprint,
|
|
@@ -35,7 +36,7 @@ import {
|
|
|
35
36
|
receiptAttestationFields,
|
|
36
37
|
routeFactVerdict,
|
|
37
38
|
spawnNativeWorker
|
|
38
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-TSHXZTOQ.js";
|
|
39
40
|
import {
|
|
40
41
|
AGENT_LEDGER_PROMPT_MAX_CHARS,
|
|
41
42
|
RETRYABLE_OUTCOMES,
|
|
@@ -57,6 +58,7 @@ import {
|
|
|
57
58
|
claudeSubprocessPermissionConfigForAutonomy,
|
|
58
59
|
competeStanceLiner,
|
|
59
60
|
createRunEffectsRecorder,
|
|
61
|
+
describeCallAction,
|
|
60
62
|
isBoundedGateRolePrompt,
|
|
61
63
|
isClaudeCanonicalTool,
|
|
62
64
|
isResponseSchemaRejection,
|
|
@@ -64,23 +66,21 @@ import {
|
|
|
64
66
|
networkToolsDisabled,
|
|
65
67
|
projectExecutionHandoffs,
|
|
66
68
|
renderAgentLedger,
|
|
69
|
+
resolveToolBudgetEnvelope,
|
|
67
70
|
responseSchemaConflictsWithTools,
|
|
68
71
|
runKindSupportsLiveSteering,
|
|
69
72
|
runtimeSpeaksResponseSchemaDialect,
|
|
70
73
|
serializeWorkerRuntimeDescriptor,
|
|
71
74
|
toolPromptHintsForNames,
|
|
72
75
|
validateJobSpec
|
|
73
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-XXQNGV4M.js";
|
|
74
77
|
import {
|
|
75
|
-
DEFAULT_AUTONOMY_LEVEL,
|
|
76
78
|
WRITE_ROOT_REFUSED_TOOLS,
|
|
77
79
|
assessFinishContract,
|
|
78
|
-
autonomyDenyRejection,
|
|
79
|
-
mapAutonomy,
|
|
80
80
|
parseJsonObjectPayload,
|
|
81
81
|
parseVerifierResult,
|
|
82
82
|
validateRecipeResult
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-EKY57CSP.js";
|
|
84
84
|
import {
|
|
85
85
|
appliesRecipeResultContract,
|
|
86
86
|
decideRoute,
|
|
@@ -132,7 +132,12 @@ import {
|
|
|
132
132
|
} from "./chunk-ECH6PKUQ.js";
|
|
133
133
|
import {
|
|
134
134
|
isSkillActivation
|
|
135
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-GOXNB3AO.js";
|
|
136
|
+
import {
|
|
137
|
+
DEFAULT_AUTONOMY_LEVEL,
|
|
138
|
+
autonomyDenyRejection,
|
|
139
|
+
mapAutonomy
|
|
140
|
+
} from "./chunk-HWUFFB6L.js";
|
|
136
141
|
import {
|
|
137
142
|
createRedactionTally,
|
|
138
143
|
redactSecretsDeep,
|
|
@@ -154,7 +159,7 @@ import {
|
|
|
154
159
|
resolveRuntimeTarget,
|
|
155
160
|
runtimeResolutionWarnings,
|
|
156
161
|
runtimeTargetSnapshot
|
|
157
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-DJVECN66.js";
|
|
158
163
|
import {
|
|
159
164
|
DEFAULT_DELEGATION_CONNECT_TIMEOUT_MS,
|
|
160
165
|
DEFAULT_DELEGATION_TURN_TIMEOUT_MS,
|
|
@@ -185,7 +190,7 @@ import {
|
|
|
185
190
|
} from "./chunk-3I7MS7N2.js";
|
|
186
191
|
import {
|
|
187
192
|
ceilChars
|
|
188
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-GEYXPTRF.js";
|
|
189
194
|
import {
|
|
190
195
|
atomicWrite
|
|
191
196
|
} from "./chunk-FO5ZOVUY.js";
|
|
@@ -206,7 +211,7 @@ import {
|
|
|
206
211
|
} from "./chunk-6EJMN2Y3.js";
|
|
207
212
|
import {
|
|
208
213
|
BusChannels
|
|
209
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-G7MUEIGA.js";
|
|
210
215
|
import {
|
|
211
216
|
readClioVersion,
|
|
212
217
|
readPiMonoVersion,
|
|
@@ -1538,12 +1543,15 @@ var AcpEventMapper = class {
|
|
|
1538
1543
|
if (!this.toolStarts.has(toolCallId) && (status === "pending" || status === "in_progress")) {
|
|
1539
1544
|
const startedAt = Date.now();
|
|
1540
1545
|
this.toolStarts.set(toolCallId, performance2.now());
|
|
1546
|
+
const action = describeCallAction(update.kind ?? title, update.rawInput);
|
|
1541
1547
|
out.push({
|
|
1542
1548
|
type: "clio_tool_start",
|
|
1543
1549
|
payload: {
|
|
1544
1550
|
tool: update.kind ?? title,
|
|
1551
|
+
toolCallId,
|
|
1545
1552
|
posture: "operating",
|
|
1546
|
-
startedAt
|
|
1553
|
+
startedAt,
|
|
1554
|
+
...action !== null ? { action } : {}
|
|
1547
1555
|
}
|
|
1548
1556
|
});
|
|
1549
1557
|
out.push({
|
|
@@ -1569,6 +1577,7 @@ var AcpEventMapper = class {
|
|
|
1569
1577
|
type: "clio_tool_finish",
|
|
1570
1578
|
payload: {
|
|
1571
1579
|
tool: update.kind ?? title,
|
|
1580
|
+
toolCallId,
|
|
1572
1581
|
posture: "operating",
|
|
1573
1582
|
durationMs: Math.round(performance2.now() - startedAtClock),
|
|
1574
1583
|
outcome: isError ? "error" : "ok",
|
|
@@ -4575,6 +4584,7 @@ function envelopeFromReceipt(receipt, status, receiptPath) {
|
|
|
4575
4584
|
...receipt.agentAudience !== void 0 ? { agentAudience: receipt.agentAudience } : {},
|
|
4576
4585
|
...receipt.requestOrigin !== void 0 ? { requestOrigin: receipt.requestOrigin } : {},
|
|
4577
4586
|
task: receipt.task,
|
|
4587
|
+
...receipt.budget !== void 0 ? { budget: receipt.budget } : {},
|
|
4578
4588
|
...receipt.briefing !== void 0 ? { briefing: receipt.briefing } : {},
|
|
4579
4589
|
...receipt.steering !== void 0 ? { steering: receipt.steering } : {},
|
|
4580
4590
|
targetId: receipt.targetId,
|
|
@@ -6349,6 +6359,7 @@ function openLedger(opts) {
|
|
|
6349
6359
|
...input.agentAudience !== void 0 ? { agentAudience: input.agentAudience } : {},
|
|
6350
6360
|
...input.requestOrigin !== void 0 ? { requestOrigin: input.requestOrigin } : {},
|
|
6351
6361
|
task: input.task,
|
|
6362
|
+
...input.budget !== void 0 ? { budget: structuredClone(input.budget) } : {},
|
|
6352
6363
|
...input.briefing !== void 0 ? { briefing: structuredClone(input.briefing) } : {},
|
|
6353
6364
|
...input.steering !== void 0 ? { steering: structuredClone(input.steering) } : {},
|
|
6354
6365
|
targetId: input.targetId,
|
|
@@ -7133,7 +7144,7 @@ function assertWriteRootsEnforceable(runtime, writeRoots) {
|
|
|
7133
7144
|
function assertWorkerBudgetEnforceable(runtime, hasDeclaredBudget) {
|
|
7134
7145
|
if (!hasDeclaredBudget || runtime.kind !== "subprocess") return;
|
|
7135
7146
|
throw new Error(
|
|
7136
|
-
`dispatch: runtime '${runtime.id}' cannot enforce an explicit
|
|
7147
|
+
`dispatch: runtime '${runtime.id}' cannot enforce an explicit dispatch budget because subprocess workers do not expose per-tool mediation; choose a native or claude-sdk worker`
|
|
7137
7148
|
);
|
|
7138
7149
|
}
|
|
7139
7150
|
var TOOL_CARRYING_API_FAMILIES = /* @__PURE__ */ new Set([
|
|
@@ -7186,18 +7197,27 @@ function assertPostRuntimeToolCompatibility(agentId, spec, effectiveTools, targe
|
|
|
7186
7197
|
`dispatch: admission denied: agent '${agentId}' is incompatible with runtime '${target.runtime.id}' after tool narrowing; missing required tools: ${compatibility.missingRequired.join(", ")}`
|
|
7187
7198
|
);
|
|
7188
7199
|
}
|
|
7189
|
-
function
|
|
7200
|
+
function workerToolCallHardCap(settings) {
|
|
7190
7201
|
const rawEnvCap = process.env.CLIO_CODER_WORKER_TOOL_CALL_CAP?.trim();
|
|
7191
7202
|
const parsedEnvCap = rawEnvCap && /^[1-9]\d*$/.test(rawEnvCap) ? Number(rawEnvCap) : Number.NaN;
|
|
7192
|
-
|
|
7203
|
+
return Number.isSafeInteger(parsedEnvCap) ? parsedEnvCap : settings?.guardrails.workerToolCallCap ?? GUARDRAIL_DEFAULTS.workerToolCallCap;
|
|
7204
|
+
}
|
|
7205
|
+
function resolveEffectiveWorkerBudget(input) {
|
|
7206
|
+
const hardCap = workerToolCallHardCap(input.settings);
|
|
7193
7207
|
const declared = input.declared ?? {
|
|
7194
7208
|
toolCalls: hardCap,
|
|
7195
7209
|
readReserve: Math.min(5, Math.max(0, hardCap - 1)),
|
|
7196
7210
|
synthesis: true
|
|
7197
7211
|
};
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7212
|
+
return resolveToolBudgetEnvelope({
|
|
7213
|
+
recipeId: input.recipeId,
|
|
7214
|
+
policy: declared,
|
|
7215
|
+
...input.req.budget === void 0 ? {} : { request: input.req.budget },
|
|
7216
|
+
hardCap,
|
|
7217
|
+
hasReadTool: input.allowedTools.includes(ToolNames.Read),
|
|
7218
|
+
retry: (input.req.lineage?.attempt ?? 0) > 0,
|
|
7219
|
+
revision: input.req.gate?.role === "builder" && input.req.gate.cycle > 1 && input.req.gate.verdict === "revise"
|
|
7220
|
+
});
|
|
7201
7221
|
}
|
|
7202
7222
|
function frozenProtectedArtifactState(state) {
|
|
7203
7223
|
return {
|
|
@@ -8475,7 +8495,7 @@ function createDispatchBundle(context, options) {
|
|
|
8475
8495
|
);
|
|
8476
8496
|
enforceCapabilityGate(target.target.id, target.modelCapabilities, req.requiredCapabilities);
|
|
8477
8497
|
assertRuntimeCanHonorWorkerPermissionMode(target.runtime, settings?.workers.onPermission ?? "deny");
|
|
8478
|
-
assertWorkerBudgetEnforceable(target.runtime, spec.budget !== null);
|
|
8498
|
+
assertWorkerBudgetEnforceable(target.runtime, spec.budget !== null || req.budget !== void 0);
|
|
8479
8499
|
const cwd = req.cwd ?? process.cwd();
|
|
8480
8500
|
const sessionAutonomy = settings?.autonomy ?? "auto-edit";
|
|
8481
8501
|
const effectiveAutonomy = clampWorkerAutonomy(sessionAutonomy, req.autonomy);
|
|
@@ -8508,7 +8528,13 @@ function createDispatchBundle(context, options) {
|
|
|
8508
8528
|
workingContextPaths: workerWorkingContextPaths(req)
|
|
8509
8529
|
});
|
|
8510
8530
|
const systemPrompt = compiledWorkerPrompt.systemPrompt;
|
|
8511
|
-
const
|
|
8531
|
+
const budgetEnvelope = resolveEffectiveWorkerBudget({
|
|
8532
|
+
req,
|
|
8533
|
+
recipeId: recipe.id,
|
|
8534
|
+
declared: spec.budget,
|
|
8535
|
+
allowedTools: effectiveTools,
|
|
8536
|
+
settings
|
|
8537
|
+
});
|
|
8512
8538
|
const tier = spec.projectContextTier;
|
|
8513
8539
|
const project = projectContext && tier === "bounded" ? projectContext.projectStructuredContext(cwd) : null;
|
|
8514
8540
|
const dynamicPromptMessages = buildDynamicPromptMessages(req, {
|
|
@@ -8558,7 +8584,8 @@ function createDispatchBundle(context, options) {
|
|
|
8558
8584
|
operatorProfileApplied: compiledWorkerPrompt.operatorProfileApplied ?? false,
|
|
8559
8585
|
capabilityMismatch,
|
|
8560
8586
|
effectiveAutonomy,
|
|
8561
|
-
budget,
|
|
8587
|
+
budget: budgetEnvelope.effective,
|
|
8588
|
+
budgetEnvelope,
|
|
8562
8589
|
...settings ? { settings } : {}
|
|
8563
8590
|
};
|
|
8564
8591
|
}
|
|
@@ -8732,12 +8759,16 @@ function createDispatchBundle(context, options) {
|
|
|
8732
8759
|
tokenMeter.cacheReadTokens += typeof u.cacheRead === "number" ? u.cacheRead : 0;
|
|
8733
8760
|
tokenMeter.cacheWriteTokens += typeof u.cacheWrite === "number" ? u.cacheWrite : 0;
|
|
8734
8761
|
tokenMeter.reasoningTokens += extractReasoningTokenCount(u);
|
|
8735
|
-
const
|
|
8736
|
-
const
|
|
8737
|
-
const
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8762
|
+
const requestedModelId = readStringOrNull(event.message.model);
|
|
8763
|
+
const responseModelIdObservation = responseModelIdObservationFromRecord(event.message, "not-observed");
|
|
8764
|
+
const differingResponseModelId = readStringOrNull(event.message.responseModel);
|
|
8765
|
+
const providerResponseId = readStringOrNull(event.message.responseId);
|
|
8766
|
+
upstreamResponses.push({
|
|
8767
|
+
requestedModelId,
|
|
8768
|
+
responseModelIdObservation,
|
|
8769
|
+
differingResponseModelId,
|
|
8770
|
+
providerResponseId
|
|
8771
|
+
});
|
|
8741
8772
|
if (event.message.stopReason === "error") {
|
|
8742
8773
|
const message = readStringOrNull(event.message.errorMessage);
|
|
8743
8774
|
if (message !== null) failureMessage = message;
|
|
@@ -9292,6 +9323,11 @@ function createDispatchBundle(context, options) {
|
|
|
9292
9323
|
return handle;
|
|
9293
9324
|
};
|
|
9294
9325
|
if (req.delegationAgentId) {
|
|
9326
|
+
if (req.budget !== void 0) {
|
|
9327
|
+
throw new Error(
|
|
9328
|
+
"dispatch: budget envelopes cannot be enforced on an ACP delegation target; dispatch to a native or claude-sdk worker"
|
|
9329
|
+
);
|
|
9330
|
+
}
|
|
9295
9331
|
assertPlannedNodeIdentity(req, { id: "local", kind: "local" });
|
|
9296
9332
|
assertProtectedArtifactsEnforceable("acp-delegation", false, protectedArtifactState);
|
|
9297
9333
|
if (req.responseSchema !== void 0) {
|
|
@@ -9551,12 +9587,16 @@ function createDispatchBundle(context, options) {
|
|
|
9551
9587
|
tokenMeter.cacheReadTokens += typeof u.cacheRead === "number" ? u.cacheRead : 0;
|
|
9552
9588
|
tokenMeter.cacheWriteTokens += typeof u.cacheWrite === "number" ? u.cacheWrite : 0;
|
|
9553
9589
|
tokenMeter.reasoningTokens += extractReasoningTokenCount(u);
|
|
9554
|
-
const
|
|
9555
|
-
const
|
|
9556
|
-
const
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9590
|
+
const requestedModelId = readStringOrNull(event.message.model);
|
|
9591
|
+
const responseModelIdObservation = responseModelIdObservationFromRecord(event.message, "not-observed");
|
|
9592
|
+
const differingResponseModelId = readStringOrNull(event.message.responseModel);
|
|
9593
|
+
const providerResponseId = readStringOrNull(event.message.responseId);
|
|
9594
|
+
upstreamResponses.push({
|
|
9595
|
+
requestedModelId,
|
|
9596
|
+
responseModelIdObservation,
|
|
9597
|
+
differingResponseModelId,
|
|
9598
|
+
providerResponseId
|
|
9599
|
+
});
|
|
9560
9600
|
if (event.message.stopReason === "error") {
|
|
9561
9601
|
const message = readStringOrNull(event.message.errorMessage);
|
|
9562
9602
|
if (message !== null) failureMessage = message;
|
|
@@ -9627,6 +9667,7 @@ function createDispatchBundle(context, options) {
|
|
|
9627
9667
|
agentAudience: lifecycle.agentAudience,
|
|
9628
9668
|
requestOrigin: lifecycle.requestOrigin,
|
|
9629
9669
|
task: req.task,
|
|
9670
|
+
budget: lifecycle.budgetEnvelope,
|
|
9630
9671
|
targetId: lifecycle.target.target.id,
|
|
9631
9672
|
wireModelId: lifecycle.target.wireModelId,
|
|
9632
9673
|
runtimeId: lifecycle.target.runtime.id,
|
|
@@ -9684,6 +9725,7 @@ function createDispatchBundle(context, options) {
|
|
|
9684
9725
|
});
|
|
9685
9726
|
await ledgerRef.persist();
|
|
9686
9727
|
const fleetIdentity = {
|
|
9728
|
+
budget: lifecycle.budgetEnvelope,
|
|
9687
9729
|
...placement !== void 0 && placement !== null ? { node: placement.node.id } : {},
|
|
9688
9730
|
...req.gate !== void 0 ? { gate: { role: req.gate.role, cycle: req.gate.cycle } } : {},
|
|
9689
9731
|
...req.reroutes !== void 0 && req.reroutes.length > 0 ? { rerouteCount: req.reroutes.length } : {},
|
|
@@ -9775,6 +9817,7 @@ function createDispatchBundle(context, options) {
|
|
|
9775
9817
|
requestOrigin: lifecycle.requestOrigin,
|
|
9776
9818
|
agentId: req.agentId,
|
|
9777
9819
|
task: req.task,
|
|
9820
|
+
budget: lifecycle.budgetEnvelope,
|
|
9778
9821
|
cwd: lifecycle.cwd,
|
|
9779
9822
|
node: placement?.node ?? null,
|
|
9780
9823
|
aborted: false,
|
|
@@ -9818,6 +9861,7 @@ function createDispatchBundle(context, options) {
|
|
|
9818
9861
|
agentAudience: lifecycle.agentAudience,
|
|
9819
9862
|
requestOrigin: lifecycle.requestOrigin,
|
|
9820
9863
|
task: req.task,
|
|
9864
|
+
budget: lifecycle.budgetEnvelope,
|
|
9821
9865
|
targetId: lifecycle.target.target.id,
|
|
9822
9866
|
wireModelId: lifecycle.target.wireModelId,
|
|
9823
9867
|
runtimeId: lifecycle.target.runtime.id,
|
|
@@ -10230,6 +10274,11 @@ function createDispatchBundle(context, options) {
|
|
|
10230
10274
|
if (!validated.ok) throw new Error(`dispatch: invalid spec: ${validated.errors.join("; ")}`);
|
|
10231
10275
|
req = validation.restore(validated.spec);
|
|
10232
10276
|
if (req.delegationAgentId) {
|
|
10277
|
+
if (req.budget !== void 0) {
|
|
10278
|
+
throw new Error(
|
|
10279
|
+
"dispatch: budget envelopes cannot be enforced on an ACP delegation target; dispatch to a native or claude-sdk worker"
|
|
10280
|
+
);
|
|
10281
|
+
}
|
|
10233
10282
|
const protectedArtifactState = getProtectedArtifactState();
|
|
10234
10283
|
assertProtectedArtifactsEnforceable("acp-delegation", false, protectedArtifactState);
|
|
10235
10284
|
if (req.responseSchema !== void 0) {
|
|
@@ -10291,6 +10340,7 @@ function createDispatchBundle(context, options) {
|
|
|
10291
10340
|
);
|
|
10292
10341
|
assertPostRuntimeToolCompatibility(req.agentId, agentSpec, effectiveTools, target);
|
|
10293
10342
|
assertRuntimeCanHonorWorkerPermissionMode(target.runtime, settings?.workers.onPermission ?? "deny");
|
|
10343
|
+
assertWorkerBudgetEnforceable(target.runtime, agentSpec.budget !== null || req.budget !== void 0);
|
|
10294
10344
|
assertResponseSchemaEnforceable(target.runtime, target.modelCapabilities, req.responseSchema, effectiveTools.length);
|
|
10295
10345
|
assertWriteRootsEnforceable(target.runtime, req.writeRoots);
|
|
10296
10346
|
assertProtectedArtifactsEnforceable(
|
|
@@ -10298,6 +10348,13 @@ function createDispatchBundle(context, options) {
|
|
|
10298
10348
|
target.runtime.kind !== "subprocess",
|
|
10299
10349
|
getProtectedArtifactState()
|
|
10300
10350
|
);
|
|
10351
|
+
resolveEffectiveWorkerBudget({
|
|
10352
|
+
req,
|
|
10353
|
+
recipeId: recipe.id,
|
|
10354
|
+
declared: agentSpec.budget,
|
|
10355
|
+
allowedTools: effectiveTools,
|
|
10356
|
+
settings
|
|
10357
|
+
});
|
|
10301
10358
|
return {
|
|
10302
10359
|
agentId: req.agentId,
|
|
10303
10360
|
specFingerprint: agentSpecFingerprint(agentSpec),
|
|
@@ -10622,6 +10679,7 @@ function createDispatchBundle(context, options) {
|
|
|
10622
10679
|
runId: run.runId,
|
|
10623
10680
|
agentId: run.agentId,
|
|
10624
10681
|
task: run.task,
|
|
10682
|
+
...run.budget !== void 0 ? { budget: run.budget } : {},
|
|
10625
10683
|
runtimeKind: run.runtimeKind,
|
|
10626
10684
|
outcomePhase: run.stallKilled ? "terminating" : run.aborted ? "aborting" : "running",
|
|
10627
10685
|
heartbeat,
|
|
@@ -15762,4 +15820,4 @@ export {
|
|
|
15762
15820
|
summarizeEvalResults,
|
|
15763
15821
|
buildEvalEvidence
|
|
15764
15822
|
};
|
|
15765
|
-
//# sourceMappingURL=chunk-
|
|
15823
|
+
//# sourceMappingURL=chunk-QM3F2GKX.js.map
|
|
@@ -25,11 +25,11 @@ import {
|
|
|
25
25
|
import {
|
|
26
26
|
credentialWriteFailed,
|
|
27
27
|
printPlaintextCredentialWarning
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-24I7BN55.js";
|
|
29
29
|
import {
|
|
30
30
|
printError,
|
|
31
31
|
printOk
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-PPAMZ32Z.js";
|
|
33
33
|
import {
|
|
34
34
|
buildProviderSupportEntry,
|
|
35
35
|
configuredTargetsForRuntime,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
probeCapabilitiesForModel,
|
|
45
45
|
registerBuiltinRuntimes,
|
|
46
46
|
supportGroupLabel
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-DJVECN66.js";
|
|
48
48
|
import {
|
|
49
49
|
readSettings,
|
|
50
50
|
removeTargetFromSettings,
|
|
@@ -1489,4 +1489,4 @@ export {
|
|
|
1489
1489
|
runTargetRename,
|
|
1490
1490
|
runConfigureCommand
|
|
1491
1491
|
};
|
|
1492
|
-
//# sourceMappingURL=chunk-
|
|
1492
|
+
//# sourceMappingURL=chunk-QNQHSOLF.js.map
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
resolveShutdownHookBudgetMs,
|
|
15
15
|
runWithBudget,
|
|
16
16
|
writeShutdownNotice
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XE2VEJHX.js";
|
|
18
18
|
import {
|
|
19
19
|
getSharedBus
|
|
20
20
|
} from "./chunk-ZGVHUX3M.js";
|
|
21
21
|
import {
|
|
22
22
|
BusChannels
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-G7MUEIGA.js";
|
|
24
24
|
import {
|
|
25
25
|
init_esm_shims
|
|
26
26
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -384,4 +384,4 @@ export {
|
|
|
384
384
|
ConfigDomainModule,
|
|
385
385
|
createConfigDomainModule
|
|
386
386
|
};
|
|
387
|
-
//# sourceMappingURL=chunk-
|
|
387
|
+
//# sourceMappingURL=chunk-R46L2BIR.js.map
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
receiptResponseModelIdObservationLabel
|
|
4
|
+
} from "./chunk-3BPUFZDL.js";
|
|
2
5
|
import {
|
|
3
6
|
adaptRunReceiptTrustStatus
|
|
4
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QM3F2GKX.js";
|
|
8
|
+
import {
|
|
9
|
+
formatBudgetPolicy,
|
|
10
|
+
formatBudgetReasons,
|
|
11
|
+
formatBudgetRequest,
|
|
12
|
+
formatEffectiveBudget
|
|
13
|
+
} from "./chunk-XXQNGV4M.js";
|
|
5
14
|
import {
|
|
6
15
|
mentionsWorkerToolCallCap
|
|
7
16
|
} from "./chunk-4ZG3XFUR.js";
|
|
@@ -74,10 +83,19 @@ function receiptEvidenceLabels(receipt, verification, integrity) {
|
|
|
74
83
|
const sections = receipt.projectContext.sections ?? [];
|
|
75
84
|
projectContext = `project_context=${receipt.projectContext.tier} chars:${receipt.projectContext.chars ?? 0}${sections.length > 0 ? ` sections:${[...sections].sort().join(",")}` : ""}${receipt.projectContext.contentHash !== void 0 ? ` sha256:${receipt.projectContext.contentHash}` : ""}`;
|
|
76
85
|
}
|
|
86
|
+
const responseModelIdObservation = receiptResponseModelIdObservationLabel(receipt);
|
|
87
|
+
const budget = receipt.budget === void 0 ? [] : [
|
|
88
|
+
`budget_recipe_policy=${JSON.stringify(formatBudgetPolicy(receipt.budget))}`,
|
|
89
|
+
`budget_requested=${JSON.stringify(formatBudgetRequest(receipt.budget))}`,
|
|
90
|
+
`budget_effective=${JSON.stringify(formatEffectiveBudget(receipt.budget))}`,
|
|
91
|
+
`budget_reason=${JSON.stringify(formatBudgetReasons(receipt.budget))}`
|
|
92
|
+
];
|
|
77
93
|
return [
|
|
78
94
|
canonical,
|
|
79
95
|
`receipt_integrity=verified/v${receipt.integrity.version}/${receipt.integrity.algorithm}`,
|
|
80
96
|
`evidence_verification=${verification.state}/${verification.basis}`,
|
|
97
|
+
...responseModelIdObservation ? [responseModelIdObservation] : [],
|
|
98
|
+
...budget,
|
|
81
99
|
...receiptAdmissionLabels(receipt),
|
|
82
100
|
...receiptActivityLabels(receipt, status),
|
|
83
101
|
briefing,
|
|
@@ -152,4 +170,4 @@ export {
|
|
|
152
170
|
workerTextLabel,
|
|
153
171
|
workerTextNonEvidenceNotices
|
|
154
172
|
};
|
|
155
|
-
//# sourceMappingURL=chunk-
|
|
173
|
+
//# sourceMappingURL=chunk-RY3LY4J5.js.map
|
|
@@ -299,6 +299,7 @@ function signalProcessGroup(child, signal) {
|
|
|
299
299
|
function spawnWorkerProcess(command, args, spec, opts) {
|
|
300
300
|
const shutdownGraceMs = opts?.shutdownGraceMs ?? DEFAULT_SHUTDOWN_GRACE_MS;
|
|
301
301
|
const attestationGraceMs = opts?.attestationGraceMs ?? DEFAULT_ATTESTATION_GRACE_MS;
|
|
302
|
+
const now = opts?.now ?? Date.now;
|
|
302
303
|
const approved = opts?.approvedIdentity ?? approvedIdentityForSpec(spec);
|
|
303
304
|
const child = spawn(command, [...args], {
|
|
304
305
|
stdio: ["pipe", "pipe", "pipe"],
|
|
@@ -309,7 +310,7 @@ function spawnWorkerProcess(command, args, spec, opts) {
|
|
|
309
310
|
detached: true
|
|
310
311
|
});
|
|
311
312
|
const pid = child.pid ?? null;
|
|
312
|
-
const heartbeatAt = { current:
|
|
313
|
+
const heartbeatAt = { current: now() };
|
|
313
314
|
const queue = createBoundedEventQueue();
|
|
314
315
|
const waiters = [];
|
|
315
316
|
let finished = false;
|
|
@@ -334,7 +335,7 @@ function spawnWorkerProcess(command, args, spec, opts) {
|
|
|
334
335
|
};
|
|
335
336
|
}
|
|
336
337
|
function push(value) {
|
|
337
|
-
heartbeatAt.current =
|
|
338
|
+
heartbeatAt.current = now();
|
|
338
339
|
const w = waiters.shift();
|
|
339
340
|
if (w) {
|
|
340
341
|
w({ value, done: false });
|
|
@@ -444,7 +445,7 @@ function spawnWorkerProcess(command, args, spec, opts) {
|
|
|
444
445
|
if (!announceAccepted) failAttestation(`Invalid worker attestation: ${frame.reason}`);
|
|
445
446
|
return;
|
|
446
447
|
}
|
|
447
|
-
heartbeatAt.current =
|
|
448
|
+
heartbeatAt.current = now();
|
|
448
449
|
if (frame.value.kind === "announce") {
|
|
449
450
|
if (announceAccepted || announceFailed) return;
|
|
450
451
|
const verdict = verifyWorkerAttestation(frame.value.attestation, approved);
|
|
@@ -920,4 +921,4 @@ export {
|
|
|
920
921
|
routeFactVerdict,
|
|
921
922
|
runFleetNodePreflight
|
|
922
923
|
};
|
|
923
|
-
//# sourceMappingURL=chunk-
|
|
924
|
+
//# sourceMappingURL=chunk-TSHXZTOQ.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
WORKSPACE_EXCLUDED_DIRS,
|
|
8
8
|
enumerateWorkspaceFiles,
|
|
9
9
|
enumerateWorkspaceFilesAsync
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-33YXPOE3.js";
|
|
11
11
|
import {
|
|
12
12
|
init_esm_shims
|
|
13
13
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -241,4 +241,4 @@ export {
|
|
|
241
241
|
computeFingerprintCached,
|
|
242
242
|
isStale
|
|
243
243
|
};
|
|
244
|
-
//# sourceMappingURL=chunk-
|
|
244
|
+
//# sourceMappingURL=chunk-UUVG37B4.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
ceilChars
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GEYXPTRF.js";
|
|
5
5
|
import {
|
|
6
6
|
clioStateDir
|
|
7
7
|
} from "./chunk-BNAZZHFG.js";
|
|
@@ -616,4 +616,4 @@ export {
|
|
|
616
616
|
createTaskMemoryTelemetrySink,
|
|
617
617
|
taskMemoryBankDelta
|
|
618
618
|
};
|
|
619
|
-
//# sourceMappingURL=chunk-
|
|
619
|
+
//# sourceMappingURL=chunk-WHGPSPT5.js.map
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
ceilChars,
|
|
26
26
|
contentChars,
|
|
27
27
|
estimateAgentMessageTokens
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-GEYXPTRF.js";
|
|
29
29
|
import {
|
|
30
30
|
init_esm_shims
|
|
31
31
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -674,4 +674,4 @@ export {
|
|
|
674
674
|
compactionCut,
|
|
675
675
|
selectVisibleEntries
|
|
676
676
|
};
|
|
677
|
-
//# sourceMappingURL=chunk-
|
|
677
|
+
//# sourceMappingURL=chunk-WHJYKASB.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
enumerateWorkspaceFiles
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-33YXPOE3.js";
|
|
5
5
|
import {
|
|
6
6
|
classifyCHeaderLanguage
|
|
7
7
|
} from "./chunk-7CR24IG7.js";
|
|
@@ -190,4 +190,4 @@ export {
|
|
|
190
190
|
detectProjectProfile,
|
|
191
191
|
detectProjectType
|
|
192
192
|
};
|
|
193
|
-
//# sourceMappingURL=chunk-
|
|
193
|
+
//# sourceMappingURL=chunk-XAKHZX5N.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-ZGVHUX3M.js";
|
|
5
5
|
import {
|
|
6
6
|
BusChannels
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-G7MUEIGA.js";
|
|
8
8
|
import {
|
|
9
9
|
init_esm_shims
|
|
10
10
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -226,4 +226,4 @@ export {
|
|
|
226
226
|
runWithBudget,
|
|
227
227
|
getTerminationCoordinator
|
|
228
228
|
};
|
|
229
|
-
//# sourceMappingURL=chunk-
|
|
229
|
+
//# sourceMappingURL=chunk-XE2VEJHX.js.map
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
loadProjectRules,
|
|
6
6
|
renderOperatorProfile,
|
|
7
7
|
selectActiveRules
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CYQKWTG3.js";
|
|
9
9
|
import {
|
|
10
10
|
compile,
|
|
11
11
|
compileWorker,
|
|
12
12
|
sha256
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QM3F2GKX.js";
|
|
14
14
|
import {
|
|
15
15
|
isUserVisibleAgent
|
|
16
16
|
} from "./chunk-AOCYTWAV.js";
|
|
17
17
|
import {
|
|
18
18
|
BusChannels
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-G7MUEIGA.js";
|
|
20
20
|
import {
|
|
21
21
|
classifyProjectPreload
|
|
22
22
|
} from "./chunk-JVCV3ICN.js";
|
|
@@ -43,7 +43,7 @@ function fleetPromptPurpose(description) {
|
|
|
43
43
|
return `${sentence.slice(0, cut > 0 ? cut : FLEET_PROMPT_PURPOSE_MAX_CHARS).trimEnd()}...`;
|
|
44
44
|
}
|
|
45
45
|
function fleetPromptLine(spec) {
|
|
46
|
-
const budget = spec.budget ? `${spec.budget.toolCalls} calls` :
|
|
46
|
+
const budget = spec.budget.maximum ? `${spec.budget.toolCalls}..${spec.budget.maximum.toolCalls} calls` : `${spec.budget.toolCalls} calls`;
|
|
47
47
|
const purpose = fleetPromptPurpose(spec.description);
|
|
48
48
|
return `- ${spec.id} (${spec.capabilityClass}, ${budget})${purpose.length > 0 ? `: ${purpose}` : ""}`;
|
|
49
49
|
}
|
|
@@ -110,7 +110,8 @@ function renderAgentCatalogSectionsFromSpecs(input) {
|
|
|
110
110
|
function formatSpecLine(spec, suffix) {
|
|
111
111
|
const tags = spec.tags.length > 0 ? `, tags=${spec.tags.join("/")}` : "";
|
|
112
112
|
const skills = spec.skills.length > 0 ? `, skills=${spec.skills.join("/")}` : "";
|
|
113
|
-
const
|
|
113
|
+
const maximum = spec.budget.maximum ? `..${spec.budget.maximum.toolCalls}/${spec.budget.maximum.readReserve}` : "";
|
|
114
|
+
const budget = `, budget=${spec.budget.toolCalls}/${spec.budget.readReserve}${maximum}/${spec.budget.synthesis ? "synthesize" : "stop"}`;
|
|
114
115
|
return `- ${spec.name} [${spec.id}] (${spec.audience}, ${spec.category}, ${spec.capabilityClass}, ${spec.latencyClass}, ${spec.source}${tags}${skills}${budget})${suffix}`;
|
|
115
116
|
}
|
|
116
117
|
|
|
@@ -653,4 +654,4 @@ export {
|
|
|
653
654
|
createPromptsDomainModule,
|
|
654
655
|
SchedulingDomainModule
|
|
655
656
|
};
|
|
656
|
-
//# sourceMappingURL=chunk-
|
|
657
|
+
//# sourceMappingURL=chunk-XF5N4U5A.js.map
|