@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
|
@@ -26,6 +26,7 @@ var BusChannels = {
|
|
|
26
26
|
ToolBudgetExceeded: "safety.toolBudgetExceeded",
|
|
27
27
|
ProviderHealth: "provider.health",
|
|
28
28
|
RuntimeNotice: "runtime.notice",
|
|
29
|
+
DispatchScopeNotice: "dispatch.scopeNotice",
|
|
29
30
|
DispatchEnqueued: "dispatch.enqueued",
|
|
30
31
|
DispatchStarted: "dispatch.started",
|
|
31
32
|
DispatchProgress: "dispatch.progress",
|
|
@@ -67,4 +68,4 @@ export {
|
|
|
67
68
|
BusChannels,
|
|
68
69
|
isRunAbortedPayload
|
|
69
70
|
};
|
|
70
|
-
//# sourceMappingURL=chunk-
|
|
71
|
+
//# sourceMappingURL=chunk-TT36MB5S.js.map
|
|
@@ -59,6 +59,30 @@ function parseDelegationPlanResult(output) {
|
|
|
59
59
|
}
|
|
60
60
|
return { tasks };
|
|
61
61
|
}
|
|
62
|
+
var COUNCIL_BALLOT_VERDICT_MAX_BYTES = 64;
|
|
63
|
+
var COUNCIL_BALLOT_SHAPE = '{"verdict":"yes","text":"the answer and the evidence behind it"}';
|
|
64
|
+
function parseCouncilBallot(output) {
|
|
65
|
+
const parsed = parseJson(output);
|
|
66
|
+
if (!parsed.ok) return null;
|
|
67
|
+
const value = parsed.value;
|
|
68
|
+
if (!hasOnlyKeys(value, ["verdict", "text"]) || !string(value.verdict) || !string(value.text)) return null;
|
|
69
|
+
const verdict = value.verdict.trim();
|
|
70
|
+
if (verdict.includes("\n") || Buffer.byteLength(verdict, "utf8") > COUNCIL_BALLOT_VERDICT_MAX_BYTES) return null;
|
|
71
|
+
return { verdict, text: value.text.trim() };
|
|
72
|
+
}
|
|
73
|
+
function validateCouncilBallot(contract, output) {
|
|
74
|
+
const parsed = parseJson(output);
|
|
75
|
+
if (!parsed.ok) return failure(contract, "unmeasured", parsed.reason);
|
|
76
|
+
const ballot = parseCouncilBallot(output);
|
|
77
|
+
if (ballot === null) {
|
|
78
|
+
return failure(
|
|
79
|
+
contract,
|
|
80
|
+
"unmeasured",
|
|
81
|
+
`A council ballot must carry only verdict and text, both non-empty strings, with verdict a single line of at most ${COUNCIL_BALLOT_VERDICT_MAX_BYTES} bytes so the tally can match it against the other members`
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
return success(contract, "unmeasured", ballot);
|
|
85
|
+
}
|
|
62
86
|
function parseCouncilReport(output) {
|
|
63
87
|
if (output === null) return null;
|
|
64
88
|
const parsed = parseJsonObjectPayload(output);
|
|
@@ -647,6 +671,8 @@ function validateResultContract(input) {
|
|
|
647
671
|
const report = parseCouncilReport(input.output);
|
|
648
672
|
return report === null ? failure(input.contract, "fail", "council-report is malformed") : success(input.contract, "unmeasured", { council: report });
|
|
649
673
|
}
|
|
674
|
+
case "council-ballot":
|
|
675
|
+
return validateCouncilBallot(input.contract, input.output);
|
|
650
676
|
case "debugger-report":
|
|
651
677
|
return validateDebugger(input.contract, input.output);
|
|
652
678
|
case "research-report":
|
|
@@ -719,6 +745,8 @@ function resultContractShape(contract) {
|
|
|
719
745
|
return '{"verdict":"pass","checks":[{"name":"npm run typecheck","passed":true,"evidence":"exit 0"}]}';
|
|
720
746
|
case "council-report":
|
|
721
747
|
return '{"members":[{"label":"alpha","runId":"run-1","round":1,"answer":"..."}],"synthesis":{"kind":"none"}}';
|
|
748
|
+
case "council-ballot":
|
|
749
|
+
return COUNCIL_BALLOT_SHAPE;
|
|
722
750
|
case "debugger-report":
|
|
723
751
|
return '{"diagnosis":"...","reproduction":"reproduced","evidence":["..."]}';
|
|
724
752
|
case "research-report":
|
|
@@ -789,7 +817,22 @@ function resultContractRepairMessages(input, origin) {
|
|
|
789
817
|
}
|
|
790
818
|
];
|
|
791
819
|
}
|
|
792
|
-
|
|
820
|
+
var RECIPE_DECLARABLE_KINDS = [
|
|
821
|
+
"scout-report",
|
|
822
|
+
"verifier-report",
|
|
823
|
+
"council-report",
|
|
824
|
+
"debugger-report",
|
|
825
|
+
"research-report",
|
|
826
|
+
"mutation-report",
|
|
827
|
+
"provenance-report",
|
|
828
|
+
"oracle-report",
|
|
829
|
+
"external-delegation",
|
|
830
|
+
"artifact-report",
|
|
831
|
+
"context-handbook",
|
|
832
|
+
"delegation-plan"
|
|
833
|
+
];
|
|
834
|
+
var COORDINATOR_AUTHORED_KINDS = ["council-ballot"];
|
|
835
|
+
function parseContract(value, sourcePath, kinds) {
|
|
793
836
|
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
794
837
|
throw new Error(`agent recipe: ${sourcePath}: resultContract must be an object`);
|
|
795
838
|
}
|
|
@@ -806,28 +849,94 @@ function parseResultContract(value, sourcePath) {
|
|
|
806
849
|
}
|
|
807
850
|
return { kind: "architect-plan", path: record.path };
|
|
808
851
|
}
|
|
809
|
-
const kinds = [
|
|
810
|
-
"scout-report",
|
|
811
|
-
"verifier-report",
|
|
812
|
-
"council-report",
|
|
813
|
-
"debugger-report",
|
|
814
|
-
"research-report",
|
|
815
|
-
"mutation-report",
|
|
816
|
-
"provenance-report",
|
|
817
|
-
"oracle-report",
|
|
818
|
-
"external-delegation",
|
|
819
|
-
"artifact-report",
|
|
820
|
-
"context-handbook",
|
|
821
|
-
"delegation-plan"
|
|
822
|
-
];
|
|
823
852
|
if (!kinds.includes(record.kind) || !only("kind")) {
|
|
824
853
|
throw new Error(`agent recipe: ${sourcePath}: resultContract.kind is unsupported or has unknown keys`);
|
|
825
854
|
}
|
|
826
855
|
return { kind: record.kind };
|
|
827
856
|
}
|
|
857
|
+
function parseResultContract(value, sourcePath) {
|
|
858
|
+
return parseContract(value, sourcePath, RECIPE_DECLARABLE_KINDS);
|
|
859
|
+
}
|
|
860
|
+
function parseWorkerResultContract(value, sourcePath) {
|
|
861
|
+
return parseContract(value, sourcePath, [...RECIPE_DECLARABLE_KINDS, ...COORDINATOR_AUTHORED_KINDS]);
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
// src/core/path-boundary.ts
|
|
865
|
+
init_esm_shims();
|
|
866
|
+
import path2 from "node:path";
|
|
867
|
+
var PATH_BOUNDARY_MAX_ENTRIES = 32;
|
|
868
|
+
var PathBoundaryError = class extends Error {
|
|
869
|
+
code;
|
|
870
|
+
constructor(code, message) {
|
|
871
|
+
super(message);
|
|
872
|
+
this.name = "PathBoundaryError";
|
|
873
|
+
this.code = code;
|
|
874
|
+
}
|
|
875
|
+
};
|
|
876
|
+
var GLOB_CHARACTERS = /[*?[\]{}]/u;
|
|
877
|
+
function normalizePathBoundaryEntry(entry) {
|
|
878
|
+
const raw = entry.trim();
|
|
879
|
+
if (raw.length === 0) throw new PathBoundaryError("empty", "write boundary: entry must be a non-empty path");
|
|
880
|
+
if (raw.includes("\\")) {
|
|
881
|
+
throw new PathBoundaryError("separator", `write boundary: entry '${entry}' must use '/' separators`);
|
|
882
|
+
}
|
|
883
|
+
if (GLOB_CHARACTERS.test(raw)) {
|
|
884
|
+
throw new PathBoundaryError("glob", `write boundary: entry '${entry}' looks like a glob, which v1 does not support`);
|
|
885
|
+
}
|
|
886
|
+
if (raw.startsWith("/") || /^[A-Za-z]:/u.test(raw)) {
|
|
887
|
+
throw new PathBoundaryError("absolute", `write boundary: entry '${entry}' must be repository-relative, not absolute`);
|
|
888
|
+
}
|
|
889
|
+
const subtree = raw.endsWith("/");
|
|
890
|
+
const segments = raw.split("/").filter((segment) => segment.length > 0);
|
|
891
|
+
if (segments.length === 0) {
|
|
892
|
+
throw new PathBoundaryError("empty", `write boundary: entry '${entry}' must name a path inside the repository`);
|
|
893
|
+
}
|
|
894
|
+
for (const segment of segments) {
|
|
895
|
+
if (segment === "..") {
|
|
896
|
+
throw new PathBoundaryError("parent", `write boundary: entry '${entry}' must not contain '..'`);
|
|
897
|
+
}
|
|
898
|
+
if (segment === ".") {
|
|
899
|
+
throw new PathBoundaryError("dot", `write boundary: entry '${entry}' must not contain '.' segments`);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
const joined = segments.join("/");
|
|
903
|
+
return subtree ? `${joined}/` : joined;
|
|
904
|
+
}
|
|
905
|
+
function normalizePathBoundary(entries) {
|
|
906
|
+
if (entries.length > PATH_BOUNDARY_MAX_ENTRIES) {
|
|
907
|
+
throw new Error(`write boundary: at most ${PATH_BOUNDARY_MAX_ENTRIES} entries may be declared`);
|
|
908
|
+
}
|
|
909
|
+
return [...new Set(entries.map(normalizePathBoundaryEntry))].sort();
|
|
910
|
+
}
|
|
911
|
+
function toPosixBoundaryPath(value) {
|
|
912
|
+
return value.split("\\").join("/");
|
|
913
|
+
}
|
|
914
|
+
function isDirectoryPathBoundary(entry) {
|
|
915
|
+
return toPosixBoundaryPath(entry).endsWith("/");
|
|
916
|
+
}
|
|
917
|
+
function asDirectoryPathBoundary(entry) {
|
|
918
|
+
const normalized = toPosixBoundaryPath(entry);
|
|
919
|
+
return normalized.endsWith("/") ? normalized : `${normalized}/`;
|
|
920
|
+
}
|
|
921
|
+
function resolvePathBoundary(cwd, entry) {
|
|
922
|
+
const directory = isDirectoryPathBoundary(entry);
|
|
923
|
+
const withoutMarker = directory ? entry.slice(0, -1) : entry;
|
|
924
|
+
const resolved = toPosixBoundaryPath(path2.resolve(cwd, withoutMarker));
|
|
925
|
+
return directory ? asDirectoryPathBoundary(resolved) : resolved;
|
|
926
|
+
}
|
|
927
|
+
function pathBoundaryEntryCovers(outer, inner) {
|
|
928
|
+
const normalizedOuter = toPosixBoundaryPath(outer);
|
|
929
|
+
const normalizedInner = toPosixBoundaryPath(inner);
|
|
930
|
+
return normalizedOuter.endsWith("/") ? normalizedInner.startsWith(normalizedOuter) : !normalizedInner.endsWith("/") && normalizedInner === normalizedOuter;
|
|
931
|
+
}
|
|
932
|
+
function pathBoundaryCovers(boundary, candidate) {
|
|
933
|
+
return boundary.some((entry) => pathBoundaryEntryCovers(entry, candidate));
|
|
934
|
+
}
|
|
828
935
|
|
|
829
936
|
export {
|
|
830
937
|
parseJsonObjectPayload,
|
|
938
|
+
COUNCIL_BALLOT_VERDICT_MAX_BYTES,
|
|
939
|
+
COUNCIL_BALLOT_SHAPE,
|
|
831
940
|
parseCouncilReport,
|
|
832
941
|
resultContractSourceId,
|
|
833
942
|
parseVerifierResult,
|
|
@@ -838,6 +947,15 @@ export {
|
|
|
838
947
|
validateRecipeResult,
|
|
839
948
|
RESULT_CONTRACT_REPAIR_LIMIT,
|
|
840
949
|
resultContractRepairMessages,
|
|
841
|
-
parseResultContract
|
|
950
|
+
parseResultContract,
|
|
951
|
+
parseWorkerResultContract,
|
|
952
|
+
PATH_BOUNDARY_MAX_ENTRIES,
|
|
953
|
+
PathBoundaryError,
|
|
954
|
+
normalizePathBoundaryEntry,
|
|
955
|
+
normalizePathBoundary,
|
|
956
|
+
asDirectoryPathBoundary,
|
|
957
|
+
resolvePathBoundary,
|
|
958
|
+
pathBoundaryEntryCovers,
|
|
959
|
+
pathBoundaryCovers
|
|
842
960
|
};
|
|
843
|
-
//# sourceMappingURL=chunk-
|
|
961
|
+
//# sourceMappingURL=chunk-TTHACPOM.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
inspectEvidence
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TLQJPP24.js";
|
|
5
5
|
import {
|
|
6
6
|
TASK_MEMORY_CONTENT_MAX_CHARS,
|
|
7
7
|
TASK_MEMORY_DEFAULT_KNOWLEDGE_CAP,
|
|
8
8
|
TASK_MEMORY_DEFAULT_PROCEDURAL_CAP
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZVJ5BLO2.js";
|
|
10
10
|
import {
|
|
11
11
|
createRedactionTally,
|
|
12
12
|
redactSecretsText
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-ECH6PKUQ.js";
|
|
17
17
|
import {
|
|
18
18
|
ceilChars
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RWSI4YD7.js";
|
|
20
20
|
import {
|
|
21
21
|
safeResourceWrite
|
|
22
22
|
} from "./chunk-WEPFGWHJ.js";
|
|
@@ -1450,4 +1450,4 @@ export {
|
|
|
1450
1450
|
taskMemoryTracePath,
|
|
1451
1451
|
createTaskMemoryTrace
|
|
1452
1452
|
};
|
|
1453
|
-
//# sourceMappingURL=chunk-
|
|
1453
|
+
//# sourceMappingURL=chunk-TYPGUK6W.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
|
parseAgentRecipeSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FBVTI2TJ.js";
|
|
5
5
|
import {
|
|
6
6
|
discoverMarketplaceSkills,
|
|
7
7
|
expandSkillInvocationInput,
|
|
@@ -10,19 +10,18 @@ import {
|
|
|
10
10
|
normalizedSkillHash,
|
|
11
11
|
parsePendingSkillRequests,
|
|
12
12
|
projectCompatTrusted
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TANS5ZJS.js";
|
|
14
14
|
import {
|
|
15
15
|
COMPAT_RESOURCE_PRECEDENCE,
|
|
16
16
|
defaultScopedResourceRoots,
|
|
17
|
-
readRootEntries,
|
|
18
17
|
sourceInfoForRoot,
|
|
19
18
|
splitYamlFrontmatter,
|
|
20
19
|
stringField
|
|
21
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DGSYXYMX.js";
|
|
22
21
|
import {
|
|
23
22
|
parseFleetContract,
|
|
24
23
|
parseFrontmatter
|
|
25
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-E77JEWSD.js";
|
|
26
25
|
import {
|
|
27
26
|
assertAgentSpecPolicy,
|
|
28
27
|
normalizeAgentSpec
|
|
@@ -30,16 +29,16 @@ import {
|
|
|
30
29
|
import {
|
|
31
30
|
INTEROP_AGENT_KINDS
|
|
32
31
|
} from "./chunk-IHXBNWMM.js";
|
|
32
|
+
import {
|
|
33
|
+
runCommandVector
|
|
34
|
+
} from "./chunk-B5CSFE7B.js";
|
|
33
35
|
import {
|
|
34
36
|
readSettings,
|
|
35
37
|
updateSettings
|
|
36
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-IJ7RPIYJ.js";
|
|
37
39
|
import {
|
|
38
40
|
expandConfigPath
|
|
39
41
|
} from "./chunk-SST6Z5JA.js";
|
|
40
|
-
import {
|
|
41
|
-
runCommandVector
|
|
42
|
-
} from "./chunk-D4MDIG46.js";
|
|
43
42
|
import {
|
|
44
43
|
require_dist
|
|
45
44
|
} from "./chunk-APJ265NV.js";
|
|
@@ -63,13 +62,18 @@ import path2 from "node:path";
|
|
|
63
62
|
|
|
64
63
|
// src/domains/resources/prompts/loader.ts
|
|
65
64
|
init_esm_shims();
|
|
66
|
-
import { readFileSync } from "node:fs";
|
|
65
|
+
import { lstatSync, readdirSync, readFileSync, realpathSync } from "node:fs";
|
|
67
66
|
import { homedir } from "node:os";
|
|
68
67
|
import path from "node:path";
|
|
69
68
|
|
|
70
69
|
// src/engine/prompt-templates.ts
|
|
71
70
|
init_esm_shims();
|
|
72
|
-
import { parseCommandArgs, substituteArgs } from "@earendil-works/pi-agent-core";
|
|
71
|
+
import { parseCommandArgs, substituteArgs as substituteParsedArgs } from "@earendil-works/pi-agent-core";
|
|
72
|
+
var RAW_ARGUMENTS_PLACEHOLDER = /\$ARGUMENTS/g;
|
|
73
|
+
function substituteArgs(content, args, rawArguments) {
|
|
74
|
+
if (rawArguments === void 0) return substituteParsedArgs(content, args);
|
|
75
|
+
return content.split(RAW_ARGUMENTS_PLACEHOLDER).map((segment) => substituteParsedArgs(segment, args)).join(rawArguments);
|
|
76
|
+
}
|
|
73
77
|
|
|
74
78
|
// src/domains/resources/collision.ts
|
|
75
79
|
init_esm_shims();
|
|
@@ -163,6 +167,46 @@ function fallbackDescription(body) {
|
|
|
163
167
|
const normalized = line.replace(/^#{1,6}\s+/, "");
|
|
164
168
|
return normalized.length > 60 ? `${normalized.slice(0, 57)}...` : normalized;
|
|
165
169
|
}
|
|
170
|
+
var EXTENSION_ROOT_REFERENCE = /\$\{extensionRoot\}(\/[A-Za-z0-9._~%+@/-]*)?/g;
|
|
171
|
+
var EXTENSION_ROOT_TOKEN = "${extensionRoot}";
|
|
172
|
+
function contained(root, candidate) {
|
|
173
|
+
const relative = path.relative(root, candidate);
|
|
174
|
+
return relative === "" || !relative.startsWith(`..${path.sep}`) && relative !== ".." && !path.isAbsolute(relative);
|
|
175
|
+
}
|
|
176
|
+
function resolveExtensionReferences(body, root, filePath, diagnostics) {
|
|
177
|
+
if (root.rootPath === void 0 || !body.includes(EXTENSION_ROOT_TOKEN)) return body;
|
|
178
|
+
let canonicalRoot;
|
|
179
|
+
try {
|
|
180
|
+
canonicalRoot = realpathSync(root.rootPath);
|
|
181
|
+
} catch (error) {
|
|
182
|
+
diagnostics.push({
|
|
183
|
+
type: "warning",
|
|
184
|
+
message: `extension root could not be resolved: ${error instanceof Error ? error.message : String(error)}`,
|
|
185
|
+
path: filePath
|
|
186
|
+
});
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
let invalid = null;
|
|
190
|
+
const resolved = body.replace(EXTENSION_ROOT_REFERENCE, (reference, suffix) => {
|
|
191
|
+
const candidate = path.resolve(canonicalRoot, `.${suffix ?? ""}`);
|
|
192
|
+
try {
|
|
193
|
+
const canonicalCandidate = realpathSync(candidate);
|
|
194
|
+
if (!contained(canonicalRoot, canonicalCandidate)) invalid = reference;
|
|
195
|
+
} catch {
|
|
196
|
+
invalid = reference;
|
|
197
|
+
}
|
|
198
|
+
return candidate;
|
|
199
|
+
});
|
|
200
|
+
if (invalid !== null) {
|
|
201
|
+
diagnostics.push({
|
|
202
|
+
type: "warning",
|
|
203
|
+
message: `prompt template has an unresolved or escaping extension reference: ${invalid}`,
|
|
204
|
+
path: filePath
|
|
205
|
+
});
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
return resolved;
|
|
209
|
+
}
|
|
166
210
|
function loadPromptFile(filePath, root, diagnostics) {
|
|
167
211
|
const ext = path.extname(filePath).toLowerCase();
|
|
168
212
|
if (ext !== ".md") return null;
|
|
@@ -174,16 +218,23 @@ function loadPromptFile(filePath, root, diagnostics) {
|
|
|
174
218
|
diagnostics.push({ type: "warning", message: `prompt template could not be read: ${reason}`, path: filePath });
|
|
175
219
|
return null;
|
|
176
220
|
}
|
|
177
|
-
const
|
|
221
|
+
const relativePath = path.relative(root.path, filePath);
|
|
222
|
+
if (relativePath === "" || relativePath === ".." || relativePath.startsWith(`..${path.sep}`) || path.isAbsolute(relativePath)) {
|
|
223
|
+
diagnostics.push({ type: "warning", message: "prompt template escaped its discovery root", path: filePath });
|
|
224
|
+
return null;
|
|
225
|
+
}
|
|
226
|
+
const name = relativePath.slice(0, -ext.length).split(path.sep).join(":");
|
|
178
227
|
if (name.trim().length === 0) return null;
|
|
179
228
|
const { frontmatter, body } = splitOptionalFrontmatter(raw, filePath, diagnostics);
|
|
180
|
-
const
|
|
229
|
+
const resolvedBody = resolveExtensionReferences(body, root, filePath, diagnostics);
|
|
230
|
+
if (resolvedBody === null) return null;
|
|
231
|
+
const description = stringField(frontmatter, "description") ?? fallbackDescription(resolvedBody);
|
|
181
232
|
const argumentHint = stringField(frontmatter, "argument-hint") ?? stringField(frontmatter, "argumentHint");
|
|
182
233
|
const sourceInfo = sourceInfoForRoot(root, filePath);
|
|
183
234
|
const template = {
|
|
184
235
|
name,
|
|
185
236
|
description,
|
|
186
|
-
content:
|
|
237
|
+
content: resolvedBody.trim(),
|
|
187
238
|
filePath,
|
|
188
239
|
sourceInfo,
|
|
189
240
|
trusted: root.trusted !== false
|
|
@@ -193,10 +244,42 @@ function loadPromptFile(filePath, root, diagnostics) {
|
|
|
193
244
|
}
|
|
194
245
|
function loadPromptRoot(root, diagnostics) {
|
|
195
246
|
const candidates = [];
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
247
|
+
const pending = [root.path];
|
|
248
|
+
while (pending.length > 0) {
|
|
249
|
+
const directory = pending.pop();
|
|
250
|
+
if (!directory) continue;
|
|
251
|
+
let entries;
|
|
252
|
+
try {
|
|
253
|
+
const stat = lstatSync(directory);
|
|
254
|
+
if (stat.isSymbolicLink() || !stat.isDirectory()) {
|
|
255
|
+
diagnostics.push({
|
|
256
|
+
type: "warning",
|
|
257
|
+
message: "prompt template root contains a non-directory or symbolic link",
|
|
258
|
+
path: directory
|
|
259
|
+
});
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
entries = readdirSync(directory, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
|
|
263
|
+
} catch (error) {
|
|
264
|
+
if (error.code === "ENOENT") continue;
|
|
265
|
+
diagnostics.push({
|
|
266
|
+
type: "warning",
|
|
267
|
+
message: `prompt template directory could not be read: ${error instanceof Error ? error.message : String(error)}`,
|
|
268
|
+
path: directory
|
|
269
|
+
});
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
for (const entry of [...entries].reverse()) {
|
|
273
|
+
const filePath = path.join(directory, entry.name);
|
|
274
|
+
if (entry.isSymbolicLink()) {
|
|
275
|
+
diagnostics.push({ type: "warning", message: "prompt template symbolic link was ignored", path: filePath });
|
|
276
|
+
} else if (entry.isDirectory()) {
|
|
277
|
+
pending.push(filePath);
|
|
278
|
+
} else if (entry.isFile()) {
|
|
279
|
+
const candidate = loadPromptFile(filePath, root, diagnostics);
|
|
280
|
+
if (candidate) candidates.push(candidate);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
200
283
|
}
|
|
201
284
|
return candidates;
|
|
202
285
|
}
|
|
@@ -223,13 +306,14 @@ function loadPromptTemplates(input = {}) {
|
|
|
223
306
|
};
|
|
224
307
|
}
|
|
225
308
|
function parsePromptCommand(input) {
|
|
226
|
-
const
|
|
227
|
-
if (!
|
|
228
|
-
const withoutSlash =
|
|
309
|
+
const framed = input.trimStart();
|
|
310
|
+
if (!framed.startsWith("/")) return null;
|
|
311
|
+
const withoutSlash = framed.slice(1);
|
|
229
312
|
const separator = withoutSlash.search(/\s/);
|
|
230
313
|
const name = separator === -1 ? withoutSlash : withoutSlash.slice(0, separator);
|
|
231
314
|
if (name.length === 0 || name.includes("/")) return null;
|
|
232
|
-
const
|
|
315
|
+
const delimiterWidth = separator !== -1 && withoutSlash.slice(separator, separator + 2) === "\r\n" ? 2 : 1;
|
|
316
|
+
const rest = separator === -1 ? "" : withoutSlash.slice(separator + delimiterWidth);
|
|
233
317
|
return { name, rest };
|
|
234
318
|
}
|
|
235
319
|
function expandPromptTemplateInput(input, templates) {
|
|
@@ -250,7 +334,7 @@ function expandPromptTemplateInput(input, templates) {
|
|
|
250
334
|
const args = parseCommandArgs(command.rest);
|
|
251
335
|
return {
|
|
252
336
|
expanded: true,
|
|
253
|
-
text: substituteArgs(template.content, args),
|
|
337
|
+
text: substituteArgs(template.content, args, command.rest),
|
|
254
338
|
args,
|
|
255
339
|
template,
|
|
256
340
|
diagnostics: templates.diagnostics
|
|
@@ -793,4 +877,4 @@ export {
|
|
|
793
877
|
ResourcesDomainModule,
|
|
794
878
|
createResourcesDomainModule
|
|
795
879
|
};
|
|
796
|
-
//# sourceMappingURL=chunk-
|
|
880
|
+
//# sourceMappingURL=chunk-U6MBIEMB.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
runVectorTool
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PMDBGQSJ.js";
|
|
5
5
|
import {
|
|
6
6
|
PROJECT_VERIFIER_CATALOG_RELATIVE_PATH,
|
|
7
7
|
loadProjectVerifierCatalog,
|
|
8
8
|
packageDeclaredCheck,
|
|
9
9
|
resolveProjectVerifierExecutionCwd
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A2NJGIB3.js";
|
|
11
11
|
import {
|
|
12
12
|
declaredVerificationScripts
|
|
13
13
|
} from "./chunk-UL3WSD3F.js";
|
|
14
14
|
import {
|
|
15
15
|
resolveSafeCwd
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-B5CSFE7B.js";
|
|
17
17
|
import {
|
|
18
18
|
init_esm_shims
|
|
19
19
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -239,4 +239,4 @@ export {
|
|
|
239
239
|
runProjectCheck,
|
|
240
240
|
runScriptCheck
|
|
241
241
|
};
|
|
242
|
-
//# sourceMappingURL=chunk-
|
|
242
|
+
//# sourceMappingURL=chunk-VAWNZU7Z.js.map
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
asDirectoryPathBoundary,
|
|
4
|
+
pathBoundaryEntryCovers,
|
|
5
|
+
resolvePathBoundary
|
|
6
|
+
} from "./chunk-TTHACPOM.js";
|
|
2
7
|
import {
|
|
3
8
|
init_esm_shims
|
|
4
9
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -7,21 +12,16 @@ import {
|
|
|
7
12
|
init_esm_shims();
|
|
8
13
|
import path from "node:path";
|
|
9
14
|
function normalizeRoot(root) {
|
|
10
|
-
return
|
|
11
|
-
}
|
|
12
|
-
function isUnder(child, parent) {
|
|
13
|
-
const c = normalizeRoot(child);
|
|
14
|
-
const p = normalizeRoot(parent);
|
|
15
|
-
if (c === p) return true;
|
|
16
|
-
const rel = path.relative(p, c);
|
|
17
|
-
return rel !== "" && !rel.startsWith("..") && !path.isAbsolute(rel);
|
|
15
|
+
return resolvePathBoundary(process.cwd(), root);
|
|
18
16
|
}
|
|
19
17
|
function isSubset(worker, orchestrator) {
|
|
20
18
|
for (const action of worker.allowedActions) {
|
|
21
19
|
if (!orchestrator.allowedActions.has(action)) return false;
|
|
22
20
|
}
|
|
23
21
|
for (const root of worker.allowedWriteRoots) {
|
|
24
|
-
const covered = orchestrator.allowedWriteRoots.some(
|
|
22
|
+
const covered = orchestrator.allowedWriteRoots.some(
|
|
23
|
+
(outer) => pathBoundaryEntryCovers(normalizeRoot(outer), normalizeRoot(root))
|
|
24
|
+
);
|
|
25
25
|
if (!covered) return false;
|
|
26
26
|
}
|
|
27
27
|
if (worker.allowNetwork && !orchestrator.allowNetwork) return false;
|
|
@@ -36,13 +36,13 @@ var READONLY_SCOPE = {
|
|
|
36
36
|
};
|
|
37
37
|
var WORKSPACE_SCOPE = {
|
|
38
38
|
allowedActions: /* @__PURE__ */ new Set(["read", "write", "execute", "dispatch"]),
|
|
39
|
-
allowedWriteRoots: [process.cwd()],
|
|
39
|
+
allowedWriteRoots: [asDirectoryPathBoundary(path.resolve(process.cwd()))],
|
|
40
40
|
allowNetwork: true,
|
|
41
41
|
allowDispatch: true
|
|
42
42
|
};
|
|
43
43
|
var CONFIRMED_SCOPE = {
|
|
44
44
|
allowedActions: /* @__PURE__ */ new Set(["read", "write", "execute", "dispatch", "system_modify"]),
|
|
45
|
-
allowedWriteRoots: [process.cwd()],
|
|
45
|
+
allowedWriteRoots: [asDirectoryPathBoundary(path.resolve(process.cwd()))],
|
|
46
46
|
allowNetwork: true,
|
|
47
47
|
allowDispatch: true
|
|
48
48
|
};
|
|
@@ -53,4 +53,4 @@ export {
|
|
|
53
53
|
WORKSPACE_SCOPE,
|
|
54
54
|
CONFIRMED_SCOPE
|
|
55
55
|
};
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-VCBR6CU7.js.map
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
ceilChars,
|
|
26
26
|
contentChars,
|
|
27
27
|
estimateAgentMessageTokens
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-RWSI4YD7.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-VHN4MY6O.js.map
|
|
@@ -2,26 +2,26 @@ import { createRequire as __clioCreateRequire } from "node:module"; const requir
|
|
|
2
2
|
import {
|
|
3
3
|
readLayeredSettings,
|
|
4
4
|
readStrictLayeredSettings
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-26LEYJZH.js";
|
|
6
6
|
import {
|
|
7
7
|
formatBootTrace
|
|
8
8
|
} from "./chunk-HKIYEGME.js";
|
|
9
9
|
import {
|
|
10
10
|
initializeClioHome
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XWSF374K.js";
|
|
12
12
|
import {
|
|
13
13
|
readSettings
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IJ7RPIYJ.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
17
|
} from "./chunk-APJ265NV.js";
|
|
18
|
+
import {
|
|
19
|
+
clioConfigDir
|
|
20
|
+
} from "./chunk-BNAZZHFG.js";
|
|
18
21
|
import {
|
|
19
22
|
findEngineEnvKeys,
|
|
20
23
|
getEngineEnvApiKey
|
|
21
24
|
} from "./chunk-YXLYO42X.js";
|
|
22
|
-
import {
|
|
23
|
-
clioConfigDir
|
|
24
|
-
} from "./chunk-BNAZZHFG.js";
|
|
25
25
|
import {
|
|
26
26
|
__toESM,
|
|
27
27
|
init_esm_shims
|
|
@@ -158,7 +158,7 @@ Run \`clio-coder auth login ${verdict.store}\` if the endpoint requires one; loc
|
|
|
158
158
|
} else if (verdict.kind !== "usable") {
|
|
159
159
|
process.stdout.write(`${describeVerdict(verdict)} Starting \`clio-coder configure\`.
|
|
160
160
|
`);
|
|
161
|
-
const { runConfigureCommand } = await import("./configure-
|
|
161
|
+
const { runConfigureCommand } = await import("./configure-7XIZCOU4.js");
|
|
162
162
|
const configured = await runConfigureCommand([]);
|
|
163
163
|
if (configured !== 0) return configured;
|
|
164
164
|
startupSettings = readStrictLayeredSettings(process.cwd()).settings;
|
|
@@ -167,7 +167,7 @@ Run \`clio-coder auth login ${verdict.store}\` if the endpoint requires one; loc
|
|
|
167
167
|
let terminalLease;
|
|
168
168
|
try {
|
|
169
169
|
if (terminalLeaseEligible(options)) {
|
|
170
|
-
const { createProcessTerminalLease, instantShellEnabled } = await import("./terminal-lease-
|
|
170
|
+
const { createProcessTerminalLease, instantShellEnabled } = await import("./terminal-lease-WOBR64YA.js");
|
|
171
171
|
if (instantShellEnabled()) {
|
|
172
172
|
let stage0FrameId = null;
|
|
173
173
|
terminalLease = createProcessTerminalLease({
|
|
@@ -190,7 +190,7 @@ Run \`clio-coder auth login ${verdict.store}\` if the endpoint requires one; loc
|
|
|
190
190
|
throw new Error("injected Stage 1 hydration failure");
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
const { bootOrchestrator } = await import("./orchestrator-
|
|
193
|
+
const { bootOrchestrator } = await import("./orchestrator-6KSPYRHA.js");
|
|
194
194
|
const result = await bootOrchestrator({
|
|
195
195
|
...options,
|
|
196
196
|
...startupSettings ? { startupSettings } : {},
|
|
@@ -214,4 +214,4 @@ export {
|
|
|
214
214
|
terminalLeaseEligible,
|
|
215
215
|
runClioCommand
|
|
216
216
|
};
|
|
217
|
-
//# sourceMappingURL=chunk-
|
|
217
|
+
//# sourceMappingURL=chunk-VWZOAB7K.js.map
|