@iowarp/clio-coder 0.3.7 → 0.3.8
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 +31 -0
- package/README.md +7 -2
- package/dist/{acp-SK4MD6MM.js → acp-U67UHUK2.js} +13 -13
- package/dist/{agents-2FN2K6ME.js → agents-YU6SGALZ.js} +35 -33
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-QIYZWM5I.js → auth-5ZPJOIVG.js} +32 -24
- package/dist/builtins-C6JMZVV6.js +17 -0
- package/dist/{chunk-YD734TPH.js → chunk-26LEYJZH.js} +2 -2
- package/dist/{chunk-TSHXZTOQ.js → chunk-2HEJ2F35.js} +5 -5
- package/dist/{chunk-WJHBC77E.js → chunk-2HFZQUHL.js} +5 -5
- package/dist/{chunk-FO5ZOVUY.js → chunk-3BINW3FP.js} +5 -5
- package/dist/{chunk-EOOQZZDE.js → chunk-4SPRNWDE.js} +18 -18
- package/dist/{chunk-EBEFWSGL.js → chunk-5DHKRSMQ.js} +7 -7
- package/dist/{chunk-OBMAI2DP.js → chunk-5H3GB5BO.js} +11 -9
- package/dist/{chunk-JTSEDYVQ.js → chunk-5Q2VVUKB.js} +7 -7
- package/dist/{chunk-VQNODYQ4.js → chunk-7RFXX52T.js} +294 -3704
- package/dist/{chunk-XEGB6BCN.js → chunk-7RGZWPB6.js} +5 -5
- package/dist/{chunk-GH5622CP.js → chunk-A2NJGIB3.js} +2 -2
- package/dist/{chunk-CEYBNUGC.js → chunk-A3WNZD3P.js} +323 -27
- package/dist/{chunk-D4MDIG46.js → chunk-B5CSFE7B.js} +7 -7
- package/dist/{chunk-2SFS6XQE.js → chunk-DGSYXYMX.js} +3 -2
- package/dist/{chunk-ZWLZP4ZT.js → chunk-DYIM5TJT.js} +98 -12
- package/dist/{chunk-KCMKRQX4.js → chunk-E77JEWSD.js} +42 -49
- package/dist/{chunk-J7PIKKWC.js → chunk-EMYUUSFG.js} +7 -7
- package/dist/{chunk-JRIO5UD2.js → chunk-EQ63NRB7.js} +5 -5
- package/dist/{chunk-UVDSQ6LW.js → chunk-FBVTI2TJ.js} +74 -28
- package/dist/{chunk-BMWK7ZIZ.js → chunk-FHJEP5SW.js} +13 -13
- package/dist/{chunk-FOT2FX5J.js → chunk-GN57SG4G.js} +7 -7
- package/dist/{chunk-SROCI7ZU.js → chunk-GPIEI3LY.js} +5 -5
- package/dist/{chunk-UFQ3F4FW.js → chunk-GU2UIAFZ.js} +4 -4
- package/dist/{chunk-UND3GU2L.js → chunk-H7IXIC72.js} +2 -2
- package/dist/{chunk-VREKEFLL.js → chunk-HLE42MG7.js} +3 -3
- package/dist/{chunk-465YSENW.js → chunk-IFBNV6H6.js} +3 -3
- package/dist/{chunk-LADCF22A.js → chunk-IGWKHNIQ.js} +113 -54
- package/dist/chunk-IIZWH4XA.js +172 -0
- package/dist/{chunk-UHXRNZ2J.js → chunk-IJ7RPIYJ.js} +4 -4
- package/dist/{chunk-M4AKACEO.js → chunk-J3YUBZWY.js} +2 -2
- package/dist/{chunk-AB4XIIVB.js → chunk-JOZYP4GM.js} +6 -6
- package/dist/{chunk-ZGH7FGS5.js → chunk-K4XHGFR5.js} +742 -12
- package/dist/{chunk-EELBMBT6.js → chunk-KTYTFRMB.js} +62 -5
- package/dist/chunk-LU7P4LHA.js +33 -0
- package/dist/{chunk-DQA7QLMD.js → chunk-ME6CCNFO.js} +9 -24
- package/dist/{chunk-KZ2H5X4G.js → chunk-MXKJU4JB.js} +88 -14
- package/dist/{chunk-DMD2AGVS.js → chunk-N22QMJKY.js} +20 -18
- package/dist/chunk-NMPKI6XL.js +3006 -0
- package/dist/chunk-NUGM5KR6.js +165 -0
- package/dist/{chunk-5C77SEEY.js → chunk-P43ETTHK.js} +2 -2
- package/dist/{chunk-JNXPYBB4.js → chunk-PMDBGQSJ.js} +2 -2
- package/dist/chunk-PT7HYKEM.js +165 -0
- package/dist/{chunk-GEYXPTRF.js → chunk-RWSI4YD7.js} +2 -2
- package/dist/{chunk-C4JBQ5SR.js → chunk-TANS5ZJS.js} +6 -6
- package/dist/{chunk-YTYFXUI3.js → chunk-TB5666IT.js} +9 -9
- package/dist/{chunk-UUANF5CR.js → chunk-TLQJPP24.js} +375 -687
- package/dist/{chunk-OB5HIGJY.js → chunk-TT36MB5S.js} +2 -1
- package/dist/{chunk-DJNLUABN.js → chunk-TTHACPOM.js} +135 -17
- package/dist/{chunk-6M7VS3J3.js → chunk-TYPGUK6W.js} +4 -4
- package/dist/{chunk-THKY7CD7.js → chunk-U6MBIEMB.js} +108 -24
- package/dist/{chunk-PD3MESLB.js → chunk-VAWNZU7Z.js} +4 -4
- package/dist/{chunk-IR4CFBFN.js → chunk-VCBR6CU7.js} +12 -12
- package/dist/{chunk-WHJYKASB.js → chunk-VHN4MY6O.js} +2 -2
- package/dist/{chunk-MXI6J5JF.js → chunk-VWZOAB7K.js} +10 -10
- package/dist/{chunk-QCTRSGHQ.js → chunk-WLFILSD5.js} +36 -36
- package/dist/{chunk-5UJ6ECTS.js → chunk-WNIJTQQK.js} +6 -6
- package/dist/{chunk-4DWFMQDR.js → chunk-WSB3FPX7.js} +68 -20
- package/dist/{chunk-3HAPLH5M.js → chunk-WWCZ5F23.js} +112 -10
- package/dist/{chunk-X2KV5FXT.js → chunk-WXY7KU3G.js} +2 -2
- package/dist/{chunk-PPAMZ32Z.js → chunk-XK56QHLX.js} +6 -1
- package/dist/{chunk-DOOEX22V.js → chunk-XWSF374K.js} +4 -4
- package/dist/{chunk-6TUKSZVF.js → chunk-YS5VLNH5.js} +8 -8
- package/dist/{chunk-ZZMN5OM4.js → chunk-ZNLWCMVZ.js} +2 -2
- package/dist/{chunk-WHGPSPT5.js → chunk-ZVJ5BLO2.js} +2 -2
- package/dist/cli/index.js +31 -31
- package/dist/{clio-WBVQEBKO.js → clio-QVTYJ57A.js} +8 -8
- package/dist/code-nav-FGGFIE7L.js +2 -2
- package/dist/codewiki/build-worker.js +4 -4
- package/dist/{components-F7OEATSO.js → components-ZFA3SAER.js} +8 -8
- package/dist/{config-TRBL3RCF.js → config-LW5IJFQN.js} +58 -53
- package/dist/{configure-OLCVPHNM.js → configure-7XIZCOU4.js} +26 -21
- package/dist/{context-XEWE3MOJ.js → context-L3WL3X7K.js} +47 -41
- package/dist/{context-WFPKQSM6.js → context-N52ZA626.js} +22 -22
- package/dist/{context-MJIJ6GOX.js → context-Y6Y7QPR6.js} +12 -12
- package/dist/{context-clear-KNOS2JPB.js → context-clear-MBQRLSDQ.js} +47 -41
- package/dist/{context-index-SSR5ECNE.js → context-index-HVMFQHK3.js} +5 -5
- package/dist/{context-working-set-EUXAZI6N.js → context-working-set-GS6DSO7F.js} +14 -14
- package/dist/{dispatch-runner-B7MTOVKL.js → dispatch-runner-22ZCNOM3.js} +83 -55
- package/dist/{docs-FLJTIDSE.js → docs-7LQ23DLM.js} +8 -8
- package/dist/{doctor-RN4YKO2X.js → doctor-M7YEDGAE.js} +24 -20
- package/dist/{eval-RUBJVSNQ.js → eval-BEC2WHDA.js} +71 -19
- package/dist/{evidence-JZNBUOQZ.js → evidence-REJUMSKM.js} +62 -56
- package/dist/{evolve-FJVC4KKI.js → evolve-PY5ZBA5K.js} +41 -35
- package/dist/{extensions-IQL36S7K.js → extensions-HVKU65YU.js} +6 -6
- package/dist/{fleet-BDKYJFCP.js → fleet-7WZEWRFA.js} +72 -67
- package/dist/{fleet-commands-ZFIWZSB3.js → fleet-commands-UVHWM76J.js} +10 -10
- package/dist/{fleet-graph-Y6HPXIVF.js → fleet-graph-6ULH7PES.js} +13 -13
- package/dist/{fleet-preflight-BHSNPBMH.js → fleet-preflight-J53T6CCE.js} +5 -5
- package/dist/{fleet-validate-BIYREGIK.js → fleet-validate-72PC4SLA.js} +17 -17
- package/dist/{init-LQUB5COQ.js → init-OG3TPGQG.js} +61 -56
- package/dist/{library-NJAHIGG4.js → library-CNTMPLRF.js} +18 -18
- package/dist/{memory-OG6HOYKM.js → memory-6IS7F275.js} +43 -37
- package/dist/{models-5ZG5XY7J.js → models-ENRJDA5W.js} +33 -28
- package/dist/{monitor-TJ7AMTGB.js → monitor-XLDVO7TN.js} +56 -38
- package/dist/{orchestrator-WZYB54DM.js → orchestrator-6KSPYRHA.js} +421 -303
- package/dist/{paths-XUC7GS6E.js → paths-DBXMZMDU.js} +5 -5
- package/dist/registry-LG64LTF4.js +11 -0
- package/dist/{reset-PXQT45IY.js → reset-RZ4ER727.js} +10 -10
- package/dist/{run-FQ74YF62.js → run-Y2CNK5RU.js} +79 -74
- package/dist/{share-FW7SVCL3.js → share-A55GYP6Z.js} +16 -16
- package/dist/{skills-7E7IRB3R.js → skills-ALC5J6AT.js} +19 -19
- package/dist/{skills-eval-LI75W6OK.js → skills-eval-JPBEBYQU.js} +52 -47
- package/dist/support-MIETYA5E.js +38 -0
- package/dist/{targets-4CIFKCTW.js → targets-VGNXIR3S.js} +42 -33
- package/dist/{terminal-lease-WUZY7ZV5.js → terminal-lease-WOBR64YA.js} +3 -3
- package/dist/{uninstall-7FV7IP4E.js → uninstall-ZJF5H5ZN.js} +8 -8
- package/dist/{upgrade-K2HVIVMQ.js → upgrade-FUSUAGHR.js} +27 -25
- package/dist/{usage-GTZELZQX.js → usage-N4MKVHKD.js} +51 -46
- package/dist/{verifiers-RLAHT27O.js → verifiers-YAWOJ3H2.js} +13 -13
- package/dist/{verify-BX3BRKH5.js → verify-LTDHYBGY.js} +9 -9
- package/dist/{wiki-generate-ASIFASCN.js → wiki-generate-6M7GHTBJ.js} +66 -61
- package/dist/worker/entry.js +68 -61
- package/docs/alcf-provider.md +1 -1
- package/docs/architecture.md +1 -1
- package/docs/artifact-versions.md +6 -5
- package/docs/built-in-agents.md +1 -1
- package/docs/commands-and-modes.md +2 -2
- package/docs/configuration-and-targets.md +8 -3
- package/docs/context-engine.md +1 -1
- package/docs/documentation-guide.md +1 -1
- package/docs/eval-runner.md +1 -1
- package/docs/evals-internal.md +1 -1
- package/docs/evidence-and-memory.md +70 -6
- package/docs/evolution.md +1 -1
- package/docs/extensions-and-sharing.md +1 -1
- package/docs/fleet-dispatch.md +34 -9
- package/docs/glossary.md +21 -1
- package/docs/installation-and-lifecycle.md +1 -1
- package/docs/middleware-and-components.md +1 -1
- package/docs/model-catalog.md +1 -1
- package/docs/observability.md +2 -2
- package/docs/proactive-memory.md +1 -1
- package/docs/prompt-envelope-and-tools.md +4 -2
- package/docs/provider-adapter-cookbook.md +1 -1
- package/docs/release-cut-checklist.md +41 -38
- package/docs/safety-model.md +1 -1
- package/docs/scientific-validation.md +1 -1
- package/docs/skills-marketplace.md +1 -1
- package/docs/tool-usage.md +1 -1
- package/docs/trace-store.md +1 -1
- package/docs/tui-design.md +1 -1
- package/docs/worker-dispatch-mechanics.md +1 -1
- package/package.json +1 -2
- package/src/cli/argv.ts +5 -0
- package/src/cli/configure.ts +107 -23
- package/src/cli/doctor.ts +5 -1
- package/src/cli/evidence.ts +30 -25
- package/src/cli/fleet-preflight.ts +2 -12
- package/src/cli/shared.ts +1 -0
- package/src/cli/targets.ts +4 -1
- package/src/cli/validate-model.ts +60 -5
- package/src/core/bus-events.ts +25 -0
- package/src/core/commit-attribution.ts +4 -4
- package/src/core/path-boundary.ts +100 -0
- package/src/domains/agents/extension.ts +2 -11
- package/src/domains/agents/fleet-contract.ts +30 -12
- package/src/domains/agents/recipe.ts +7 -1
- package/src/domains/agents/registry.ts +73 -5
- package/src/domains/agents/result-contract.ts +128 -17
- package/src/domains/agents/write-boundary.ts +15 -50
- package/src/domains/context/project-rules.ts +51 -1
- package/src/domains/dispatch/assignment-reconcile.ts +22 -5
- package/src/domains/dispatch/assignment-store.ts +151 -14
- package/src/domains/dispatch/contract.ts +15 -1
- package/src/domains/dispatch/delegation-plan.ts +2 -5
- package/src/domains/dispatch/execution-role.ts +9 -1
- package/src/domains/dispatch/extension.ts +156 -67
- package/src/domains/dispatch/fleet-run.ts +57 -3
- package/src/domains/dispatch/gate-role-prompts.ts +38 -0
- package/src/domains/dispatch/index.ts +3 -1
- package/src/domains/dispatch/intent-requirements.ts +40 -0
- package/src/domains/dispatch/intent.ts +84 -8
- package/src/domains/dispatch/path-scope.ts +370 -0
- package/src/domains/dispatch/receipt-integrity.ts +2 -1
- package/src/domains/dispatch/types.ts +14 -7
- package/src/domains/dispatch/validation.ts +6 -3
- package/src/domains/dispatch/write-boundary-enforcer.ts +45 -0
- package/src/domains/dispatch/write-boundary.ts +201 -22
- package/src/domains/eval/metrics/evidence.ts +79 -2
- package/src/domains/eval/runners/clio-run.ts +12 -2
- package/src/domains/evidence/build.ts +69 -11
- package/src/domains/evidence/index.ts +21 -0
- package/src/domains/evidence/provenance.ts +46 -11
- package/src/domains/evidence/trust-projection.ts +274 -0
- package/src/domains/evidence/trust-status.ts +145 -17
- package/src/domains/evidence/types.ts +4 -0
- package/src/domains/extensions/discovery.ts +88 -1
- package/src/domains/extensions/resources.ts +20 -8
- package/src/domains/extensions/state.ts +6 -2
- package/src/domains/extensions/types.ts +4 -1
- package/src/domains/lifecycle/doctor.ts +140 -1
- package/src/domains/prompts/contract.ts +3 -5
- package/src/domains/providers/extension.ts +30 -2
- package/src/domains/resources/common-loader.ts +3 -0
- package/src/domains/resources/prompts/loader.ts +119 -14
- package/src/domains/safety/policy-engine.ts +5 -5
- package/src/domains/safety/run-effects.ts +64 -1
- package/src/domains/safety/scope.ts +7 -12
- package/src/engine/acp/server.ts +4 -1
- package/src/engine/prompt-templates.ts +18 -1
- package/src/engine/worker-runtime.ts +6 -3
- package/src/interactive/dispatch-board.ts +53 -3
- package/src/interactive/interactive-event-projection.ts +14 -0
- package/src/interactive/overlays/settings.ts +141 -47
- package/src/interactive/slash-commands.ts +7 -2
- package/src/interactive/view/artifacts.ts +42 -9
- package/src/interactive/view/view-overlay.ts +15 -3
- package/src/interactive/worker-receipts.ts +14 -2
- package/src/interactive/worker-stream.ts +8 -0
- package/src/tools/dispatch-admission.ts +12 -13
- package/src/tools/dispatch-arguments.ts +27 -0
- package/src/tools/dispatch-plan.ts +29 -0
- package/src/tools/dispatch-runner.ts +48 -13
- package/src/tools/monitor.ts +13 -0
- package/src/tools/worker-evidence.ts +19 -13
- package/src/worker/spec-contract.ts +2 -1
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
TASK_MEMORY_POLICY_DEFAULT_TIMEOUT_MS,
|
|
8
8
|
runTaskMemoryPolicy,
|
|
9
9
|
taskMemoryBankDelta
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZVJ5BLO2.js";
|
|
11
11
|
import {
|
|
12
12
|
isTerminalRunEnvelope
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-A3WNZD3P.js";
|
|
14
14
|
import {
|
|
15
15
|
taskBoardCounts
|
|
16
16
|
} from "./chunk-5FR74PWO.js";
|
|
@@ -27,11 +27,11 @@ import {
|
|
|
27
27
|
} from "./chunk-CGKSTWHD.js";
|
|
28
28
|
import {
|
|
29
29
|
ceilChars
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-RWSI4YD7.js";
|
|
31
31
|
import {
|
|
32
32
|
reportCommitAttributionDiagnostic,
|
|
33
33
|
withManagedGitCommitAttributionEnvironment
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-B5CSFE7B.js";
|
|
35
35
|
import {
|
|
36
36
|
require_dist
|
|
37
37
|
} from "./chunk-APJ265NV.js";
|
|
@@ -2404,4 +2404,4 @@ export {
|
|
|
2404
2404
|
createWatchdogRegistration,
|
|
2405
2405
|
MiddlewareDomainModule
|
|
2406
2406
|
};
|
|
2407
|
-
//# sourceMappingURL=chunk-
|
|
2407
|
+
//# sourceMappingURL=chunk-7RGZWPB6.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SAFE_EXEC_DEFAULT_TIMEOUT_MS,
|
|
7
7
|
resolveSafeCwd
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-B5CSFE7B.js";
|
|
9
9
|
import {
|
|
10
10
|
require_dist
|
|
11
11
|
} from "./chunk-APJ265NV.js";
|
|
@@ -310,4 +310,4 @@ export {
|
|
|
310
310
|
parseProjectVerifierCatalogText,
|
|
311
311
|
packageDeclaredCheck
|
|
312
312
|
};
|
|
313
|
-
//# sourceMappingURL=chunk-
|
|
313
|
+
//# sourceMappingURL=chunk-A2NJGIB3.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
typedValidationSummary
|
|
4
|
-
} from "./chunk-OBMAI2DP.js";
|
|
5
2
|
import {
|
|
6
3
|
ROUTE_POLICY_VERSION,
|
|
7
4
|
isRouteDecisionAgentSelection,
|
|
8
5
|
isRoutingIntent,
|
|
9
6
|
routePriorForLatencyClass,
|
|
10
7
|
sameRouteIdentity
|
|
11
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-P43ETTHK.js";
|
|
12
9
|
import {
|
|
13
10
|
deriveExecutionRole,
|
|
14
11
|
isExecutionRole
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-H7IXIC72.js";
|
|
13
|
+
import {
|
|
14
|
+
typedValidationSummary
|
|
15
|
+
} from "./chunk-5H3GB5BO.js";
|
|
16
16
|
import {
|
|
17
17
|
expandPath,
|
|
18
18
|
resolveReadPath
|
|
@@ -24,9 +24,20 @@ import {
|
|
|
24
24
|
isAutonomyLevel,
|
|
25
25
|
mapAutonomy
|
|
26
26
|
} from "./chunk-HWUFFB6L.js";
|
|
27
|
+
import {
|
|
28
|
+
COUNCIL_BALLOT_SHAPE,
|
|
29
|
+
COUNCIL_BALLOT_VERDICT_MAX_BYTES,
|
|
30
|
+
PATH_BOUNDARY_MAX_ENTRIES,
|
|
31
|
+
PathBoundaryError,
|
|
32
|
+
asDirectoryPathBoundary,
|
|
33
|
+
normalizePathBoundaryEntry,
|
|
34
|
+
pathBoundaryCovers,
|
|
35
|
+
resolvePathBoundary
|
|
36
|
+
} from "./chunk-TTHACPOM.js";
|
|
27
37
|
import {
|
|
28
38
|
AGENT_AUTOMATION_AUTHORITIES,
|
|
29
|
-
agentSpecFingerprint
|
|
39
|
+
agentSpecFingerprint,
|
|
40
|
+
classify
|
|
30
41
|
} from "./chunk-AOCYTWAV.js";
|
|
31
42
|
import {
|
|
32
43
|
detectValidationCommand,
|
|
@@ -62,26 +73,26 @@ import {
|
|
|
62
73
|
ToolNames,
|
|
63
74
|
isBuiltinToolName
|
|
64
75
|
} from "./chunk-CGKSTWHD.js";
|
|
65
|
-
import {
|
|
66
|
-
THINKING_LEVELS
|
|
67
|
-
} from "./chunk-4DGYLA73.js";
|
|
68
76
|
import {
|
|
69
77
|
gitCommitAttributionEnabled,
|
|
70
78
|
reportCommitAttributionDiagnostic,
|
|
71
79
|
resolveSafeCwd,
|
|
72
80
|
withManagedGitCommitAttributionEnvironment
|
|
73
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-B5CSFE7B.js";
|
|
74
82
|
import {
|
|
75
83
|
clampTimerDelayMs
|
|
76
84
|
} from "./chunk-FQ4SKYE4.js";
|
|
85
|
+
import {
|
|
86
|
+
AI_AGENT_NAME
|
|
87
|
+
} from "./chunk-6EJMN2Y3.js";
|
|
88
|
+
import {
|
|
89
|
+
THINKING_LEVELS
|
|
90
|
+
} from "./chunk-4DGYLA73.js";
|
|
77
91
|
import {
|
|
78
92
|
GUARDRAIL_DEFAULTS,
|
|
79
93
|
GUARDRAIL_ENV_VARS,
|
|
80
94
|
resolveGuardrail
|
|
81
95
|
} from "./chunk-4ZG3XFUR.js";
|
|
82
|
-
import {
|
|
83
|
-
AI_AGENT_NAME
|
|
84
|
-
} from "./chunk-6EJMN2Y3.js";
|
|
85
96
|
import {
|
|
86
97
|
init_esm_shims
|
|
87
98
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -1400,6 +1411,15 @@ var COUNCIL_JUDGE_PROMPT = [
|
|
|
1400
1411
|
"You cannot modify anything.",
|
|
1401
1412
|
'End with a JSON object only: {"verdict":"...","text":"the supported synthesis"}.'
|
|
1402
1413
|
].join("\n");
|
|
1414
|
+
var COUNCIL_VOTE_MEMBER_DIRECTIVE = [
|
|
1415
|
+
"This council round is a vote. Do the work the task asks for, then cast one ballot on it.",
|
|
1416
|
+
`The verdict is a short comparable token the other members can match exactly, such as "yes", "no", "keep", or the name of an option you were given. It must be a single line of at most ${COUNCIL_BALLOT_VERDICT_MAX_BYTES} bytes and is lower-cased before the tally. Anything longer is reasoning: put that in text, along with the evidence behind it.`,
|
|
1417
|
+
"Your recipe's own result shape does not apply to this run. The council reads the ballot and nothing else.",
|
|
1418
|
+
`End with a JSON object only: ${COUNCIL_BALLOT_SHAPE}`
|
|
1419
|
+
].join("\n");
|
|
1420
|
+
function renderCouncilVoteMemberTask(originalTask) {
|
|
1421
|
+
return [originalTask, COUNCIL_VOTE_MEMBER_DIRECTIVE].join("\n\n");
|
|
1422
|
+
}
|
|
1403
1423
|
var COMPETE_STANCES = [
|
|
1404
1424
|
"minimal-diff",
|
|
1405
1425
|
"test-first",
|
|
@@ -2716,6 +2736,10 @@ function builtin(spec, sourceInfo) {
|
|
|
2716
2736
|
// src/domains/safety/run-effects.ts
|
|
2717
2737
|
init_esm_shims();
|
|
2718
2738
|
import path from "node:path";
|
|
2739
|
+
var ENUMERABLE_ACTION_CLASSES = /* @__PURE__ */ new Set(["read", "write"]);
|
|
2740
|
+
function toolWritesOpaquely(toolName) {
|
|
2741
|
+
return !ENUMERABLE_ACTION_CLASSES.has(classify({ tool: toolName }).actionClass);
|
|
2742
|
+
}
|
|
2719
2743
|
var GIT_PATH_MUTATIONS = /* @__PURE__ */ new Set(["mv", "rm"]);
|
|
2720
2744
|
function gitPathOperands(command) {
|
|
2721
2745
|
const targets = [];
|
|
@@ -2769,17 +2793,20 @@ function createRunEffectsRecorder(cwd) {
|
|
|
2769
2793
|
const failedMutationPaths = /* @__PURE__ */ new Set();
|
|
2770
2794
|
const validationCommands = /* @__PURE__ */ new Set();
|
|
2771
2795
|
const verificationCommands = /* @__PURE__ */ new Set();
|
|
2796
|
+
let opaqueWriteObserved = false;
|
|
2772
2797
|
return {
|
|
2773
2798
|
start(toolCallId, toolName, args) {
|
|
2774
2799
|
const paths = mutationTargets(toolName, args);
|
|
2775
2800
|
const validationCommand = validationCommandOf(toolName, args, "finish-contract");
|
|
2776
2801
|
const verificationCommand = validationCommandOf(toolName, args, "grounding");
|
|
2777
|
-
|
|
2802
|
+
const opaque = toolWritesOpaquely(toolName);
|
|
2803
|
+
if (!opaque && paths.length === 0 && validationCommand === null && verificationCommand === null) return;
|
|
2778
2804
|
const base = typeof args?.cwd === "string" && args.cwd.length > 0 ? path.resolve(cwd, args.cwd) : cwd;
|
|
2779
2805
|
pending.set(toolCallId, {
|
|
2780
2806
|
paths: paths.map((target) => path.resolve(base, target)),
|
|
2781
2807
|
validationCommand,
|
|
2782
|
-
verificationCommand
|
|
2808
|
+
verificationCommand,
|
|
2809
|
+
opaque
|
|
2783
2810
|
});
|
|
2784
2811
|
},
|
|
2785
2812
|
finish(toolCallId, failed) {
|
|
@@ -2790,6 +2817,7 @@ function createRunEffectsRecorder(cwd) {
|
|
|
2790
2817
|
for (const target of effects.paths) failedMutationPaths.add(target);
|
|
2791
2818
|
return;
|
|
2792
2819
|
}
|
|
2820
|
+
if (effects.opaque) opaqueWriteObserved = true;
|
|
2793
2821
|
for (const target of effects.paths) mutatedPaths.add(target);
|
|
2794
2822
|
if (effects.validationCommand !== null) validationCommands.add(effects.validationCommand);
|
|
2795
2823
|
if (effects.verificationCommand !== null) verificationCommands.add(effects.verificationCommand);
|
|
@@ -2799,7 +2827,8 @@ function createRunEffectsRecorder(cwd) {
|
|
|
2799
2827
|
mutatedPaths: new Set(mutatedPaths),
|
|
2800
2828
|
failedMutationPaths: new Set([...failedMutationPaths].filter((target) => !mutatedPaths.has(target))),
|
|
2801
2829
|
validationCommands: new Set(validationCommands),
|
|
2802
|
-
verificationCommands: new Set(verificationCommands)
|
|
2830
|
+
verificationCommands: new Set(verificationCommands),
|
|
2831
|
+
writeRecordComplete: !opaqueWriteObserved
|
|
2803
2832
|
};
|
|
2804
2833
|
}
|
|
2805
2834
|
};
|
|
@@ -3031,10 +3060,223 @@ function renderAll(entries) {
|
|
|
3031
3060
|
return lines.join("\n");
|
|
3032
3061
|
}
|
|
3033
3062
|
|
|
3063
|
+
// src/domains/dispatch/path-scope.ts
|
|
3064
|
+
init_esm_shims();
|
|
3065
|
+
var DISPATCH_PATH_TOKEN_RE = /(?:[\w.-]+\/)+[\w.-]+|\b[\w-]+\.[A-Za-z0-9]{1,8}\b/g;
|
|
3066
|
+
var HTTP_URL_RE = /\bhttps?:\/\/\S+/gu;
|
|
3067
|
+
var POSIX_ABSOLUTE_TOKEN_RE = /(?:^|[\s("'])((?:\/[\w.~+-]+)+)/gu;
|
|
3068
|
+
var WINDOWS_ABSOLUTE_TOKEN_RE = /(?:^|[\s("'])([A-Za-z]:[\\/][^\s"']+)/gu;
|
|
3069
|
+
var BACKSLASH_PATH_RE = /\b[A-Za-z_.-][\w.-]*\\(?:(?:[\w.-]+\\)+[\w.-]+|[\w-]+\.[A-Za-z0-9]{1,8})\b/gu;
|
|
3070
|
+
var DOUBLE_SEPARATOR_PATH_RE = /\b[\w.-]+\/\/[\w./-]+/gu;
|
|
3071
|
+
var DispatchPathScopeInferenceError = class extends Error {
|
|
3072
|
+
code;
|
|
3073
|
+
source;
|
|
3074
|
+
token;
|
|
3075
|
+
constructor(code, source, token, detail) {
|
|
3076
|
+
super(`${code}: ${source} contains ${detail} '${token}'; declare intent explicitly`);
|
|
3077
|
+
this.name = "DispatchPathScopeInferenceError";
|
|
3078
|
+
this.code = code;
|
|
3079
|
+
this.source = source;
|
|
3080
|
+
this.token = token;
|
|
3081
|
+
}
|
|
3082
|
+
};
|
|
3083
|
+
var DECLARED_EVIDENCE = {
|
|
3084
|
+
readRoots: {
|
|
3085
|
+
provenance: "declared",
|
|
3086
|
+
source: "intent.read_roots",
|
|
3087
|
+
confidence: "certain",
|
|
3088
|
+
reason: "explicit_intent"
|
|
3089
|
+
},
|
|
3090
|
+
writeRoots: {
|
|
3091
|
+
provenance: "declared",
|
|
3092
|
+
source: "intent.write_roots",
|
|
3093
|
+
confidence: "certain",
|
|
3094
|
+
reason: "explicit_intent"
|
|
3095
|
+
},
|
|
3096
|
+
relevantPaths: {
|
|
3097
|
+
provenance: "declared",
|
|
3098
|
+
source: "intent.relevant_paths",
|
|
3099
|
+
confidence: "certain",
|
|
3100
|
+
reason: "explicit_intent"
|
|
3101
|
+
}
|
|
3102
|
+
};
|
|
3103
|
+
function cloneEvidence(evidence) {
|
|
3104
|
+
return { ...evidence };
|
|
3105
|
+
}
|
|
3106
|
+
function addProvenance(entries, path4, evidence) {
|
|
3107
|
+
const current = entries.get(path4);
|
|
3108
|
+
if (current === void 0) {
|
|
3109
|
+
entries.set(path4, { path: path4, evidence: [cloneEvidence(evidence)] });
|
|
3110
|
+
return;
|
|
3111
|
+
}
|
|
3112
|
+
if (!current.evidence.some((entry) => entry.source === evidence.source)) {
|
|
3113
|
+
current.evidence.push(cloneEvidence(evidence));
|
|
3114
|
+
}
|
|
3115
|
+
}
|
|
3116
|
+
function sortedEntries(entries) {
|
|
3117
|
+
return [...entries.values()].sort((left, right) => left.path < right.path ? -1 : left.path > right.path ? 1 : 0).map((entry) => ({ path: entry.path, evidence: entry.evidence.map(cloneEvidence) }));
|
|
3118
|
+
}
|
|
3119
|
+
function declaredIntentPathProvenance(input) {
|
|
3120
|
+
const entries = /* @__PURE__ */ new Map();
|
|
3121
|
+
for (const path4 of input.readRoots) addProvenance(entries, path4, DECLARED_EVIDENCE.readRoots);
|
|
3122
|
+
for (const path4 of input.writeRoots) addProvenance(entries, path4, DECLARED_EVIDENCE.writeRoots);
|
|
3123
|
+
for (const path4 of input.relevantPaths) addProvenance(entries, path4, DECLARED_EVIDENCE.relevantPaths);
|
|
3124
|
+
return sortedEntries(entries);
|
|
3125
|
+
}
|
|
3126
|
+
function inferredPaths(req) {
|
|
3127
|
+
const paths = /* @__PURE__ */ new Set();
|
|
3128
|
+
const text = `${req.task}
|
|
3129
|
+
${req.briefing ?? ""}`;
|
|
3130
|
+
for (const match of text.matchAll(DISPATCH_PATH_TOKEN_RE)) {
|
|
3131
|
+
const token = inferredPathToken(match[0]);
|
|
3132
|
+
if (token.startsWith("http://") || token.startsWith("https://")) continue;
|
|
3133
|
+
paths.add(token);
|
|
3134
|
+
}
|
|
3135
|
+
return [...paths];
|
|
3136
|
+
}
|
|
3137
|
+
function inferredPathToken(token) {
|
|
3138
|
+
return token.replace(/\.+$/u, "");
|
|
3139
|
+
}
|
|
3140
|
+
function failMalformedText(text, source) {
|
|
3141
|
+
const withoutUrls = text.replace(HTTP_URL_RE, (url) => " ".repeat(url.length));
|
|
3142
|
+
const absolute = POSIX_ABSOLUTE_TOKEN_RE.exec(withoutUrls)?.[1];
|
|
3143
|
+
POSIX_ABSOLUTE_TOKEN_RE.lastIndex = 0;
|
|
3144
|
+
if (absolute !== void 0) {
|
|
3145
|
+
throw new DispatchPathScopeInferenceError("legacy_scope_path_absolute", source, absolute, "an absolute path token");
|
|
3146
|
+
}
|
|
3147
|
+
const windowsAbsolute = WINDOWS_ABSOLUTE_TOKEN_RE.exec(withoutUrls)?.[1];
|
|
3148
|
+
WINDOWS_ABSOLUTE_TOKEN_RE.lastIndex = 0;
|
|
3149
|
+
if (windowsAbsolute !== void 0) {
|
|
3150
|
+
throw new DispatchPathScopeInferenceError(
|
|
3151
|
+
"legacy_scope_path_absolute",
|
|
3152
|
+
source,
|
|
3153
|
+
windowsAbsolute,
|
|
3154
|
+
"an absolute path token"
|
|
3155
|
+
);
|
|
3156
|
+
}
|
|
3157
|
+
for (const pattern of [BACKSLASH_PATH_RE, DOUBLE_SEPARATOR_PATH_RE]) {
|
|
3158
|
+
const malformed = pattern.exec(withoutUrls)?.[0];
|
|
3159
|
+
pattern.lastIndex = 0;
|
|
3160
|
+
if (malformed !== void 0) {
|
|
3161
|
+
throw new DispatchPathScopeInferenceError(
|
|
3162
|
+
"legacy_scope_path_malformed",
|
|
3163
|
+
source,
|
|
3164
|
+
malformed,
|
|
3165
|
+
"a malformed path token"
|
|
3166
|
+
);
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3169
|
+
}
|
|
3170
|
+
function strictInferredPaths(text, source) {
|
|
3171
|
+
failMalformedText(text, source);
|
|
3172
|
+
const withoutUrls = text.replace(HTTP_URL_RE, (url) => " ".repeat(url.length));
|
|
3173
|
+
const evidence = source === "task" ? { provenance: "inferred", source, confidence: "medium", reason: "task_path_token" } : { provenance: "inferred", source, confidence: "low", reason: "briefing_path_token" };
|
|
3174
|
+
const result = [];
|
|
3175
|
+
for (const match of withoutUrls.matchAll(DISPATCH_PATH_TOKEN_RE)) {
|
|
3176
|
+
const token = inferredPathToken(match[0]);
|
|
3177
|
+
try {
|
|
3178
|
+
result.push({ path: normalizePathBoundaryEntry(token), evidence });
|
|
3179
|
+
} catch (error) {
|
|
3180
|
+
const code = error instanceof PathBoundaryError && error.code === "absolute" ? "legacy_scope_path_absolute" : "legacy_scope_path_malformed";
|
|
3181
|
+
throw new DispatchPathScopeInferenceError(
|
|
3182
|
+
code,
|
|
3183
|
+
source,
|
|
3184
|
+
token,
|
|
3185
|
+
code === "legacy_scope_path_absolute" ? "an absolute path token" : "a malformed path token"
|
|
3186
|
+
);
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
return result;
|
|
3190
|
+
}
|
|
3191
|
+
function legacyPathScope(req, cwd) {
|
|
3192
|
+
const workingEntries = /* @__PURE__ */ new Map();
|
|
3193
|
+
const writeEntries = /* @__PURE__ */ new Map();
|
|
3194
|
+
const writeEvidence = {
|
|
3195
|
+
provenance: "derived",
|
|
3196
|
+
source: "writeRoots",
|
|
3197
|
+
confidence: "high",
|
|
3198
|
+
reason: "legacy_write_roots"
|
|
3199
|
+
};
|
|
3200
|
+
for (const root of req.writeRoots ?? []) {
|
|
3201
|
+
addProvenance(workingEntries, root, writeEvidence);
|
|
3202
|
+
addProvenance(writeEntries, asDirectoryPathBoundary(resolvePathBoundary(cwd, root)), writeEvidence);
|
|
3203
|
+
}
|
|
3204
|
+
for (const candidate of strictInferredPaths(req.task, "task")) {
|
|
3205
|
+
addProvenance(workingEntries, candidate.path, candidate.evidence);
|
|
3206
|
+
}
|
|
3207
|
+
if (req.briefing !== void 0) {
|
|
3208
|
+
for (const candidate of strictInferredPaths(req.briefing, "briefing")) {
|
|
3209
|
+
addProvenance(workingEntries, candidate.path, candidate.evidence);
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
const workingContext = [...workingEntries.values()].map((entry) => ({
|
|
3213
|
+
path: entry.path,
|
|
3214
|
+
evidence: entry.evidence.map(cloneEvidence)
|
|
3215
|
+
}));
|
|
3216
|
+
const writeBoundaries = [...writeEntries.values()].map((entry) => ({
|
|
3217
|
+
path: entry.path,
|
|
3218
|
+
evidence: entry.evidence.map(cloneEvidence)
|
|
3219
|
+
}));
|
|
3220
|
+
return {
|
|
3221
|
+
source: "inferred",
|
|
3222
|
+
workingContextPaths: workingContext.map((entry) => entry.path),
|
|
3223
|
+
writeBoundaries: writeBoundaries.map((entry) => entry.path),
|
|
3224
|
+
inferredOnlyPaths: [],
|
|
3225
|
+
provenance: {
|
|
3226
|
+
version: 1,
|
|
3227
|
+
mode: "legacy-inferred",
|
|
3228
|
+
workingContextPaths: workingContext,
|
|
3229
|
+
writeBoundaries
|
|
3230
|
+
}
|
|
3231
|
+
};
|
|
3232
|
+
}
|
|
3233
|
+
function resolveDispatchPathScope(req) {
|
|
3234
|
+
const cwd = req.cwd ?? process.cwd();
|
|
3235
|
+
if (req.intent === void 0) return legacyPathScope(req, cwd);
|
|
3236
|
+
const declaredProvenance = declaredIntentPathProvenance(req.intent);
|
|
3237
|
+
const declaredPaths = declaredProvenance.map((entry) => entry.path);
|
|
3238
|
+
const inferredOnlyPaths = inferredPaths(req).filter((candidate) => !pathBoundaryCovers(declaredPaths, candidate));
|
|
3239
|
+
const writeEvidence = DECLARED_EVIDENCE.writeRoots;
|
|
3240
|
+
const writeBoundaries = req.intent.writeRoots.map((root) => ({
|
|
3241
|
+
path: resolvePathBoundary(cwd, root),
|
|
3242
|
+
evidence: [cloneEvidence(writeEvidence)]
|
|
3243
|
+
}));
|
|
3244
|
+
return {
|
|
3245
|
+
source: "declared",
|
|
3246
|
+
workingContextPaths: declaredPaths,
|
|
3247
|
+
writeBoundaries: writeBoundaries.map((entry) => entry.path),
|
|
3248
|
+
inferredOnlyPaths,
|
|
3249
|
+
provenance: {
|
|
3250
|
+
version: 1,
|
|
3251
|
+
mode: "declared",
|
|
3252
|
+
workingContextPaths: declaredProvenance,
|
|
3253
|
+
writeBoundaries
|
|
3254
|
+
}
|
|
3255
|
+
};
|
|
3256
|
+
}
|
|
3257
|
+
function declaredScopeReplacementDiagnostic(scope) {
|
|
3258
|
+
if (scope.source !== "declared" || scope.inferredOnlyPaths.length === 0) return null;
|
|
3259
|
+
return `typed_scope_replaced_inferred_paths: typed intent omitted prose-inferred paths ${scope.inferredOnlyPaths.join(
|
|
3260
|
+
", "
|
|
3261
|
+
)}; those paths did not select project rules or expand worker authority`;
|
|
3262
|
+
}
|
|
3263
|
+
function declaredScopeReplacementNotice(scope) {
|
|
3264
|
+
if (scope.source !== "declared" || scope.inferredOnlyPaths.length === 0) return null;
|
|
3265
|
+
const omittedPaths = [...scope.inferredOnlyPaths];
|
|
3266
|
+
return {
|
|
3267
|
+
code: "typed_scope_replaced_inferred_paths",
|
|
3268
|
+
level: "warning",
|
|
3269
|
+
omittedPaths,
|
|
3270
|
+
message: `[dispatch scope] typed intent replaced prose path inference; omitted paths: ${omittedPaths.join(
|
|
3271
|
+
", "
|
|
3272
|
+
)}. Those paths did not select project rules or expand worker authority.`
|
|
3273
|
+
};
|
|
3274
|
+
}
|
|
3275
|
+
|
|
3034
3276
|
// src/domains/dispatch/intent.ts
|
|
3035
3277
|
init_esm_shims();
|
|
3036
3278
|
import path2 from "node:path";
|
|
3037
|
-
var DISPATCH_INTENT_PATH_LIST_CAP =
|
|
3279
|
+
var DISPATCH_INTENT_PATH_LIST_CAP = PATH_BOUNDARY_MAX_ENTRIES;
|
|
3038
3280
|
var DISPATCH_INTENT_PATH_ENTRY_BYTES_CAP = 512;
|
|
3039
3281
|
var DISPATCH_INTENT_VERIFICATION_CAP = 8;
|
|
3040
3282
|
var DISPATCH_INTENT_TIMEOUT_MIN_MS = 1e3;
|
|
@@ -3048,7 +3290,7 @@ function compareCodepoints(left, right) {
|
|
|
3048
3290
|
function fail(reason, message) {
|
|
3049
3291
|
return { ok: false, reason, message };
|
|
3050
3292
|
}
|
|
3051
|
-
function
|
|
3293
|
+
function checkedPathText(value, field, index) {
|
|
3052
3294
|
if (typeof value !== "string" || value.trim().length === 0) {
|
|
3053
3295
|
return fail("intent_path_malformed", `${field}[${index}] must be a non-empty repository-relative POSIX path`);
|
|
3054
3296
|
}
|
|
@@ -3059,6 +3301,32 @@ function normalizePathEntry(value, field, index) {
|
|
|
3059
3301
|
`${field}[${index}] exceeds the ${DISPATCH_INTENT_PATH_ENTRY_BYTES_CAP}-byte cap`
|
|
3060
3302
|
);
|
|
3061
3303
|
}
|
|
3304
|
+
return trimmed;
|
|
3305
|
+
}
|
|
3306
|
+
function normalizeScopePathEntry(value, field, index) {
|
|
3307
|
+
const checked = checkedPathText(value, field, index);
|
|
3308
|
+
if (typeof checked !== "string") return checked;
|
|
3309
|
+
try {
|
|
3310
|
+
return normalizePathBoundaryEntry(checked);
|
|
3311
|
+
} catch (error) {
|
|
3312
|
+
if (error instanceof PathBoundaryError) {
|
|
3313
|
+
if (error.code === "absolute") {
|
|
3314
|
+
return fail("intent_path_absolute", `${field}[${index}] must be a repository-relative POSIX path`);
|
|
3315
|
+
}
|
|
3316
|
+
if (error.code === "parent") {
|
|
3317
|
+
return fail("intent_path_escapes_root", `${field}[${index}] escapes the repository root`);
|
|
3318
|
+
}
|
|
3319
|
+
}
|
|
3320
|
+
return fail(
|
|
3321
|
+
"intent_path_malformed",
|
|
3322
|
+
`${field}[${index}] does not follow the repository path boundary grammar: ${error instanceof Error ? error.message : String(error)}`
|
|
3323
|
+
);
|
|
3324
|
+
}
|
|
3325
|
+
}
|
|
3326
|
+
function normalizeExpectedOutputEntry(value, field, index) {
|
|
3327
|
+
const checked = checkedPathText(value, field, index);
|
|
3328
|
+
if (typeof checked !== "string") return checked;
|
|
3329
|
+
const trimmed = checked;
|
|
3062
3330
|
if (trimmed.includes("\\") || path2.posix.isAbsolute(trimmed) || path2.win32.isAbsolute(trimmed)) {
|
|
3063
3331
|
return fail("intent_path_absolute", `${field}[${index}] must be a repository-relative POSIX path`);
|
|
3064
3332
|
}
|
|
@@ -3071,7 +3339,7 @@ function normalizePathEntry(value, field, index) {
|
|
|
3071
3339
|
}
|
|
3072
3340
|
return normalized;
|
|
3073
3341
|
}
|
|
3074
|
-
function normalizePathList(value, field) {
|
|
3342
|
+
function normalizePathList(value, field, normalizeEntry = normalizeScopePathEntry) {
|
|
3075
3343
|
if (value === void 0) return [];
|
|
3076
3344
|
if (!Array.isArray(value)) return fail("intent_path_malformed", `${field} must be an array`);
|
|
3077
3345
|
if (value.length > DISPATCH_INTENT_PATH_LIST_CAP) {
|
|
@@ -3079,17 +3347,29 @@ function normalizePathList(value, field) {
|
|
|
3079
3347
|
}
|
|
3080
3348
|
const normalized = [];
|
|
3081
3349
|
for (const [index, entry] of value.entries()) {
|
|
3082
|
-
const result =
|
|
3350
|
+
const result = normalizeEntry(entry, field, index);
|
|
3083
3351
|
if (typeof result !== "string") return result;
|
|
3084
3352
|
normalized.push(result);
|
|
3085
3353
|
}
|
|
3086
3354
|
return [...new Set(normalized)].sort(compareCodepoints);
|
|
3087
3355
|
}
|
|
3088
3356
|
function isDispatchIntent(value) {
|
|
3089
|
-
if (!isRecord2(value) || value.version !==
|
|
3357
|
+
if (!isRecord2(value) || value.version !== 2) return false;
|
|
3090
3358
|
for (const field of ["readRoots", "writeRoots", "relevantPaths", "expectedOutputs"]) {
|
|
3091
3359
|
if (!Array.isArray(value[field]) || !value[field].every((entry) => typeof entry === "string")) return false;
|
|
3092
3360
|
}
|
|
3361
|
+
const readRoots = value.readRoots;
|
|
3362
|
+
const writeRoots = value.writeRoots;
|
|
3363
|
+
const relevantPaths = value.relevantPaths;
|
|
3364
|
+
if (!Array.isArray(value.pathProvenance) || JSON.stringify(value.pathProvenance) !== JSON.stringify(
|
|
3365
|
+
declaredIntentPathProvenance({
|
|
3366
|
+
readRoots,
|
|
3367
|
+
writeRoots,
|
|
3368
|
+
relevantPaths
|
|
3369
|
+
})
|
|
3370
|
+
)) {
|
|
3371
|
+
return false;
|
|
3372
|
+
}
|
|
3093
3373
|
return Array.isArray(value.verification) && value.verification.every(
|
|
3094
3374
|
(entry) => isRecord2(entry) && typeof entry.check === "string" && entry.check.length > 0 && typeof entry.timeoutMs === "number" && Number.isInteger(entry.timeoutMs) && entry.timeoutMs >= DISPATCH_INTENT_TIMEOUT_MIN_MS
|
|
3095
3375
|
);
|
|
@@ -3104,7 +3384,11 @@ function normalizeDispatchIntent(raw, checks) {
|
|
|
3104
3384
|
if (!Array.isArray(writeRoots)) return writeRoots;
|
|
3105
3385
|
const relevantPaths = normalizePathList(raw.relevant_paths, "intent.relevant_paths");
|
|
3106
3386
|
if (!Array.isArray(relevantPaths)) return relevantPaths;
|
|
3107
|
-
const expectedOutputs = normalizePathList(
|
|
3387
|
+
const expectedOutputs = normalizePathList(
|
|
3388
|
+
raw.expected_outputs,
|
|
3389
|
+
"intent.expected_outputs",
|
|
3390
|
+
normalizeExpectedOutputEntry
|
|
3391
|
+
);
|
|
3108
3392
|
if (!Array.isArray(expectedOutputs)) return expectedOutputs;
|
|
3109
3393
|
const rawVerification = raw.verification ?? [];
|
|
3110
3394
|
if (!Array.isArray(rawVerification)) {
|
|
@@ -3140,7 +3424,15 @@ function normalizeDispatchIntent(raw, checks) {
|
|
|
3140
3424
|
}
|
|
3141
3425
|
return {
|
|
3142
3426
|
ok: true,
|
|
3143
|
-
intent: {
|
|
3427
|
+
intent: {
|
|
3428
|
+
version: 2,
|
|
3429
|
+
readRoots,
|
|
3430
|
+
writeRoots,
|
|
3431
|
+
relevantPaths,
|
|
3432
|
+
pathProvenance: declaredIntentPathProvenance({ readRoots, writeRoots, relevantPaths }),
|
|
3433
|
+
expectedOutputs,
|
|
3434
|
+
verification
|
|
3435
|
+
}
|
|
3144
3436
|
};
|
|
3145
3437
|
}
|
|
3146
3438
|
|
|
@@ -3419,8 +3711,8 @@ function validateJobSpec(spec) {
|
|
|
3419
3711
|
}
|
|
3420
3712
|
if (isDispatchIntent(spec.intent) && spec.intent.writeRoots.length > 0 && Array.isArray(spec.writeRoots)) {
|
|
3421
3713
|
const jobCwd = typeof spec.cwd === "string" && spec.cwd.length > 0 ? spec.cwd : process.cwd();
|
|
3422
|
-
const legacy = [...new Set(spec.writeRoots.map((root) =>
|
|
3423
|
-
const declared = [...new Set(spec.intent.writeRoots.map((root) =>
|
|
3714
|
+
const legacy = [...new Set(spec.writeRoots.map((root) => resolvePathBoundary(jobCwd, String(root))))].sort();
|
|
3715
|
+
const declared = [...new Set(spec.intent.writeRoots.map((root) => resolvePathBoundary(jobCwd, root)))].sort();
|
|
3424
3716
|
if (JSON.stringify(legacy) !== JSON.stringify(declared)) errors.push("intent_write_roots_contradiction");
|
|
3425
3717
|
}
|
|
3426
3718
|
if ("requestOrigin" in spec && spec.requestOrigin !== void 0) {
|
|
@@ -3514,7 +3806,7 @@ function validateJobSpec(spec) {
|
|
|
3514
3806
|
const effectiveWriteRoots = Array.isArray(spec.writeRoots) && spec.writeRoots.length > 0 && spec.writeRoots.every((root) => typeof root === "string" && root.length > 0) ? spec.writeRoots : isDispatchIntent(spec.intent) && spec.intent.writeRoots.length > 0 ? spec.intent.writeRoots : void 0;
|
|
3515
3807
|
if (effectiveWriteRoots !== void 0) {
|
|
3516
3808
|
const jobCwd = typeof spec.cwd === "string" && spec.cwd.length > 0 ? spec.cwd : process.cwd();
|
|
3517
|
-
out.writeRoots = effectiveWriteRoots.map((root) => path3.resolve(jobCwd, String(root)));
|
|
3809
|
+
out.writeRoots = isDispatchIntent(spec.intent) ? effectiveWriteRoots.map((root) => resolvePathBoundary(jobCwd, String(root))) : effectiveWriteRoots.map((root) => asDirectoryPathBoundary(path3.resolve(jobCwd, String(root))));
|
|
3518
3810
|
}
|
|
3519
3811
|
if (typeof spec.requestOrigin === "string" && VALID_REQUEST_ORIGINS.has(spec.requestOrigin)) {
|
|
3520
3812
|
out.requestOrigin = spec.requestOrigin;
|
|
@@ -4167,9 +4459,13 @@ export {
|
|
|
4167
4459
|
REVIEWER_GATE_PROMPT,
|
|
4168
4460
|
JUDGE_GATE_PROMPT,
|
|
4169
4461
|
COUNCIL_JUDGE_PROMPT,
|
|
4462
|
+
renderCouncilVoteMemberTask,
|
|
4170
4463
|
COMPETE_STANCES,
|
|
4171
4464
|
competeStanceLiner,
|
|
4172
4465
|
isBoundedGateRolePrompt,
|
|
4466
|
+
resolveDispatchPathScope,
|
|
4467
|
+
declaredScopeReplacementDiagnostic,
|
|
4468
|
+
declaredScopeReplacementNotice,
|
|
4173
4469
|
isRunOutcomeCode,
|
|
4174
4470
|
RETRYABLE_OUTCOMES,
|
|
4175
4471
|
isTerminalRunEnvelope,
|
|
@@ -4180,4 +4476,4 @@ export {
|
|
|
4180
4476
|
DISPATCH_BRIEFING_MAX_BYTES,
|
|
4181
4477
|
validateJobSpec
|
|
4182
4478
|
};
|
|
4183
|
-
//# sourceMappingURL=chunk-
|
|
4479
|
+
//# sourceMappingURL=chunk-A3WNZD3P.js.map
|
|
@@ -2,12 +2,12 @@ import { createRequire as __clioCreateRequire } from "node:module"; const requir
|
|
|
2
2
|
import {
|
|
3
3
|
clampTimerDelayMs
|
|
4
4
|
} from "./chunk-FQ4SKYE4.js";
|
|
5
|
-
import {
|
|
6
|
-
clioStateDir
|
|
7
|
-
} from "./chunk-BNAZZHFG.js";
|
|
8
5
|
import {
|
|
9
6
|
AI_AGENT_NAME
|
|
10
7
|
} from "./chunk-6EJMN2Y3.js";
|
|
8
|
+
import {
|
|
9
|
+
clioStateDir
|
|
10
|
+
} from "./chunk-BNAZZHFG.js";
|
|
11
11
|
import {
|
|
12
12
|
init_esm_shims
|
|
13
13
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -48,7 +48,7 @@ var KNOWN_CLIO_TRAILERS = new Set(
|
|
|
48
48
|
Object.values(CLIO_COMMIT_TRAILERS).map((line) => normalizedTrailer(line)).filter((line) => line !== null)
|
|
49
49
|
);
|
|
50
50
|
function isClioTrailer(key) {
|
|
51
|
-
return KNOWN_CLIO_TRAILERS.has(key) || key.startsWith("clio-evidence:receipt-
|
|
51
|
+
return KNOWN_CLIO_TRAILERS.has(key) || key.startsWith("clio-evidence:receipt-v20/sha256:");
|
|
52
52
|
}
|
|
53
53
|
function trailerBlockStart(lines) {
|
|
54
54
|
if (lines.length < 2) return null;
|
|
@@ -67,10 +67,10 @@ function trailerBlockStart(lines) {
|
|
|
67
67
|
return sawTrailer ? first : null;
|
|
68
68
|
}
|
|
69
69
|
function receiptTrailer(receipt) {
|
|
70
|
-
if (receipt?.version !==
|
|
70
|
+
if (receipt?.version !== 20 || receipt.algorithm !== "sha256" || receipt.integrityValid !== true || receipt.directlyRelevant !== true || !SHA256.test(receipt.digest)) {
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
|
-
return `Clio-Evidence: receipt-
|
|
73
|
+
return `Clio-Evidence: receipt-v20/sha256:${receipt.digest}`;
|
|
74
74
|
}
|
|
75
75
|
function attributeCommitMessage(originalMessage, evidence, enabled = true) {
|
|
76
76
|
if (!enabled) return originalMessage;
|
|
@@ -567,4 +567,4 @@ export {
|
|
|
567
567
|
runCommandVector,
|
|
568
568
|
combineSafeOutput
|
|
569
569
|
};
|
|
570
|
-
//# sourceMappingURL=chunk-
|
|
570
|
+
//# sourceMappingURL=chunk-B5CSFE7B.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
|
enabledExtensionResourceRoots
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DYIM5TJT.js";
|
|
5
5
|
import {
|
|
6
6
|
require_dist
|
|
7
7
|
} from "./chunk-APJ265NV.js";
|
|
@@ -29,6 +29,7 @@ function defaultScopedResourceRoots(kind, cwd) {
|
|
|
29
29
|
return [
|
|
30
30
|
...enabledExtensionResourceRoots(kind, cwd).map((root) => ({
|
|
31
31
|
path: root.path,
|
|
32
|
+
rootPath: root.rootPath,
|
|
32
33
|
scope: "package",
|
|
33
34
|
source: root.source,
|
|
34
35
|
precedence: COMPAT_RESOURCE_PRECEDENCE.extension
|
|
@@ -119,4 +120,4 @@ export {
|
|
|
119
120
|
splitYamlFrontmatter,
|
|
120
121
|
stringField
|
|
121
122
|
};
|
|
122
|
-
//# sourceMappingURL=chunk-
|
|
123
|
+
//# sourceMappingURL=chunk-DGSYXYMX.js.map
|