@iowarp/clio-coder 0.3.2 → 0.3.4
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 +269 -458
- package/CONTRIBUTING.md +1 -1
- package/README.md +3 -3
- package/dist/{acp-BIYHVZIM.js → acp-S5R4RR5B.js} +7 -6
- package/dist/{agents-YT6SSRIT.js → agents-P6DMMVZY.js} +24 -21
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-5TWEIYDN.js → auth-2XCZLPKS.js} +12 -8
- package/dist/{chunk-GGXXDWE4.js → chunk-22NAGB7X.js} +2 -2
- package/dist/{chunk-WMSVI4G2.js → chunk-2LZI5CAG.js} +133 -13
- package/dist/{chunk-OAO4GE4M.js → chunk-2TZWSW76.js} +2 -2
- package/dist/{chunk-OOJYHWRB.js → chunk-34475P3I.js} +2 -2
- package/dist/{chunk-WVO7V2QY.js → chunk-35MKKU5R.js} +4 -4
- package/dist/{chunk-LBNRH5WM.js → chunk-3HZ5RWN2.js} +5 -5
- package/dist/{chunk-AGYYIBLL.js → chunk-3JLKSKD7.js} +2 -2
- package/dist/{chunk-MBS4V7ZP.js → chunk-4JUF2NNX.js} +7 -7
- package/dist/{chunk-ZDOOVTXZ.js → chunk-4OC57DA6.js} +27 -4
- package/dist/chunk-5M54SPOL.js +926 -0
- package/dist/{chunk-STBPMHSX.js → chunk-7RXG6QRZ.js} +51 -11
- package/dist/{chunk-77VKQEHF.js → chunk-A2GZF7DC.js} +5 -5
- package/dist/{chunk-A3CYT5EX.js → chunk-AD2SYQYC.js} +55 -2
- package/dist/chunk-AOCYTWAV.js +449 -0
- package/dist/chunk-BEY543CS.js +258 -0
- package/dist/{chunk-6N5PTWMY.js → chunk-BP4OYD6A.js} +32 -13
- package/dist/chunk-BPGS2WCQ.js +612 -0
- package/dist/{chunk-J5HN4RYU.js → chunk-BRXQQJFP.js} +8 -8
- package/dist/chunk-CFGTUFWB.js +67 -0
- package/dist/{chunk-CBCAPZAA.js → chunk-E25LMLRW.js} +2 -2
- package/dist/{chunk-G2DE3C7R.js → chunk-EDRHSCIE.js} +4 -4
- package/dist/{chunk-4KLWL3UC.js → chunk-EFADSJET.js} +2 -2
- package/dist/{chunk-M6SHUN7Q.js → chunk-FO5ZOVUY.js} +2 -2
- package/dist/chunk-FYYLNIL5.js +313 -0
- package/dist/{chunk-EPVUXGXG.js → chunk-HV5X7OR2.js} +14 -12
- package/dist/{chunk-TZTZS7QK.js → chunk-HXG4IURW.js} +5 -3
- package/dist/{chunk-IGLFWIYI.js → chunk-K6WL7QZT.js} +3 -3
- package/dist/chunk-K7VKOLQQ.js +15 -0
- package/dist/{chunk-BMEMKKIT.js → chunk-KOHPCX4K.js} +2 -2
- package/dist/{chunk-V4RXGQ5Q.js → chunk-KRPY7NTG.js} +10 -7
- package/dist/chunk-LL4KHSZI.js +22 -0
- package/dist/{chunk-KJ5LWLOE.js → chunk-MEQ45TQ4.js} +15 -9
- package/dist/{chunk-5UUP6MWO.js → chunk-MV3K5QF2.js} +5 -436
- package/dist/{chunk-AO4RKG4M.js → chunk-N4CZJQRK.js} +5 -5
- package/dist/{chunk-ARBGF5F7.js → chunk-NILBFAPG.js} +14 -8
- package/dist/chunk-OZNBF4L3.js +23 -0
- package/dist/{verify-G6V4D2G7.js → chunk-PCZJO5TI.js} +127 -42
- package/dist/chunk-QQK64KLB.js +1360 -0
- package/dist/{chunk-6EJV5X2W.js → chunk-QQL5RT5M.js} +979 -1619
- package/dist/{chunk-LZSJBIVT.js → chunk-QWU7ZBO7.js} +70 -720
- package/dist/{chunk-2EHAIA3X.js → chunk-RD5U66HV.js} +3 -3
- package/dist/{chunk-OKGUZO2U.js → chunk-SPULKLCF.js} +4 -3
- package/dist/{chunk-OQ33BKR3.js → chunk-TTNYS3EA.js} +3 -60
- package/dist/chunk-TW3WDMVS.js +677 -0
- package/dist/chunk-TZSKNMZG.js +434 -0
- package/dist/{chunk-7MNJORFF.js → chunk-UL3WSD3F.js} +6 -1
- package/dist/{chunk-7EYHLWU7.js → chunk-UZHIZC5S.js} +7 -7
- package/dist/{chunk-QTYWRVRA.js → chunk-VAWWTKDP.js} +8 -8
- package/dist/{chunk-X75S7HFS.js → chunk-VEZEGCGW.js} +214 -20
- package/dist/{chunk-OHHN2SO4.js → chunk-VMNQ6OZA.js} +98 -202
- package/dist/chunk-VSNATDE6.js +122 -0
- package/dist/chunk-W6GROXXM.js +69 -0
- package/dist/chunk-WPQLXFOZ.js +375 -0
- package/dist/{chunk-ORBHGJC5.js → chunk-WR67VIZY.js} +3 -3
- package/dist/{chunk-3ZXDFGR5.js → chunk-X6COSD2O.js} +5 -5
- package/dist/chunk-ZGVHUX3M.js +66 -0
- package/dist/{chunk-MAW544W2.js → chunk-ZWMF7253.js} +4 -4
- package/dist/{chunk-MQSRRFWA.js → chunk-ZYKPLLNQ.js} +563 -546
- package/dist/cli/index.js +27 -23
- package/dist/{clio-4LY5K2AC.js → clio-J5JIOIDS.js} +7 -6
- package/dist/{code-nav-7AX6FYE6.js → code-nav-AXCXSBHX.js} +5 -3
- package/dist/{config-GTLUW2PR.js → config-OEBMIN2U.js} +37 -27
- package/dist/{configure-R6A64DHX.js → configure-PUQOSIXQ.js} +16 -13
- package/dist/{context-5VKGUVJJ.js → context-EKDCKUUZ.js} +82 -7
- package/dist/{context-RW5HC47S.js → context-MGSE4Z2T.js} +33 -23
- package/dist/{context-JFZEJ7W5.js → context-URSXPBCK.js} +17 -9
- package/dist/{context-clear-6ZHBAZZT.js → context-clear-KDAJRNUK.js} +33 -23
- package/dist/context-working-set-SBKMPPI2.js +1552 -0
- package/dist/{dispatch-runner-VKBRCWQC.js → dispatch-runner-MSWN72NK.js} +43 -29
- package/dist/{doctor-KI767GSN.js → doctor-7BSE27PJ.js} +10 -10
- package/dist/{eval-XSSNATB4.js → eval-IZGDOO4H.js} +9 -8
- package/dist/{evidence-UA6AWDQQ.js → evidence-SR7WXB5B.js} +51 -23
- package/dist/{evolve-QNTFGV6Z.js → evolve-K7VE2CBX.js} +30 -20
- package/dist/{fleet-Q7UOMUSG.js → fleet-7XMJNQNF.js} +48 -38
- package/dist/{fleet-preflight-DDN536IT.js → fleet-preflight-AQNAH644.js} +3 -3
- package/dist/{init-WBB65ZHQ.js → init-JGNPAYXT.js} +41 -31
- package/dist/{memory-MD3O64RI.js → memory-4ALKDJ4Q.js} +32 -22
- package/dist/{models-BZU34YWD.js → models-ZMMLFJNN.js} +22 -19
- package/dist/{monitor-MEQA5C3I.js → monitor-2F3T5KHP.js} +55 -43
- package/dist/{orchestrator-CGFKEP27.js → orchestrator-ORHT43JB.js} +2507 -1896
- package/dist/{reset-L2FQEE3E.js → reset-NXGTYNUO.js} +4 -3
- package/dist/{run-IV4Q6RLN.js → run-RF4WJGMT.js} +51 -41
- package/dist/{share-S5BZQC5I.js → share-UT3W6E4M.js} +5 -4
- package/dist/{skills-LQEKRDTN.js → skills-PSACKC5Q.js} +2 -2
- package/dist/{skills-eval-3DC4HEWS.js → skills-eval-WJSI55RZ.js} +34 -24
- package/dist/{targets-C4SSGQOB.js → targets-PIIRAOYS.js} +23 -20
- package/dist/{terminal-lease-IT5JW2NR.js → terminal-lease-ULWXWNVY.js} +5 -4
- package/dist/{upgrade-7TT7SQ3G.js → upgrade-346TZ6AV.js} +18 -17
- package/dist/{usage-GV4PKT3M.js → usage-6KKXR32N.js} +34 -24
- package/dist/verifiers-4UUM6TEE.js +1214 -0
- package/dist/verify-X5HDROLA.js +25 -0
- package/dist/{wiki-generate-DQF6Z66B.js → wiki-generate-7STOCIFZ.js} +42 -31
- package/dist/worker/entry.js +33 -24
- package/docs/README.md +8 -7
- package/docs/acp.md +1 -1
- package/docs/alcf-provider.md +1 -1
- package/docs/architecture.md +2 -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 +53 -21
- package/docs/config-knobs-audit.md +1 -2
- package/docs/configuration-and-targets.md +15 -1
- package/docs/context-engine.md +64 -12
- package/docs/context-working-set.md +194 -0
- package/docs/development-pipeline.md +1 -1
- package/docs/documentation-coverage.md +5 -5
- package/docs/documentation-guide.md +6 -5
- package/docs/environment-variables.md +2 -1
- package/docs/eval-runner.md +1 -1
- package/docs/evals-internal.md +14 -1
- package/docs/evidence-and-memory.md +74 -2
- 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 +22 -7
- package/docs/glossary.md +21 -1
- package/docs/installation-and-lifecycle.md +6 -6
- package/docs/middleware-and-components.md +1 -1
- package/docs/model-catalog.md +7 -9
- package/docs/observability.md +4 -4
- package/docs/performance-methodology.md +2 -2
- package/docs/proactive-memory.md +1 -1
- package/docs/prompt-envelope-and-tools.md +4 -4
- package/docs/provider-adapter-cookbook.md +1 -1
- package/docs/release-cut-checklist.md +35 -35
- package/docs/safety-model.md +23 -4
- package/docs/scientific-validation.md +21 -3
- package/docs/session-lifecycle.md +3 -3
- package/docs/skills-marketplace.md +1 -1
- package/docs/tool-usage.md +79 -12
- package/docs/trace-store.md +1 -1
- package/docs/troubleshooting.md +1 -1
- package/docs/tui-design.md +2 -2
- package/docs/worker-dispatch-mechanics.md +11 -1
- package/package.json +8 -11
- package/skills/meta/clio-test/SKILL.md +20 -17
- package/skills/meta/clio-test/evals.md +3 -3
- package/skills/meta/clio-test/references/harness.md +35 -6
- package/skills/meta/clio-test/references/test-map.md +20 -10
- package/skills/registry.yaml +2 -2
- package/skills/skill-marketplace.json +1 -1
- package/src/cli/context-working-set.ts +513 -0
- package/src/cli/context.ts +8 -0
- package/src/cli/evidence.ts +20 -2
- package/src/cli/index.ts +4 -0
- package/src/cli/verifiers.ts +325 -0
- package/src/core/bash-exec.ts +39 -14
- package/src/core/bus-events.ts +19 -4
- package/src/core/config.ts +54 -0
- package/src/core/defaults.ts +50 -3
- package/src/core/git-commit-attribution.ts +46 -21
- package/src/core/verification-scripts.ts +6 -0
- package/src/domains/agents/builtins/verifier.md +3 -0
- package/src/domains/config/classify.ts +1 -0
- package/src/domains/config/keybindings.ts +3 -3
- package/src/domains/context/working-set/contract.ts +161 -0
- package/src/domains/context/working-set/defaults.ts +28 -0
- package/src/domains/context/working-set/engine.ts +203 -0
- package/src/domains/context/working-set/fold.ts +62 -0
- package/src/domains/context/working-set/horizon.ts +38 -0
- package/src/domains/context/working-set/marker.ts +103 -0
- package/src/domains/context/working-set/path-index.ts +436 -0
- package/src/domains/context/working-set/payload.ts +152 -0
- package/src/domains/context/working-set/policies/age-horizon.ts +55 -0
- package/src/domains/context/working-set/policies/index.ts +21 -0
- package/src/domains/context/working-set/policies/structural.ts +160 -0
- package/src/domains/context/working-set/project.ts +132 -0
- package/src/domains/context/working-set/protect.ts +109 -0
- package/src/domains/context/working-set/recall.ts +177 -0
- package/src/domains/context/working-set/replay/controls.ts +112 -0
- package/src/domains/context/working-set/replay/load-clio.ts +199 -0
- package/src/domains/context/working-set/replay/metrics.ts +185 -0
- package/src/domains/context/working-set/replay/reference-graph.ts +79 -0
- package/src/domains/context/working-set/replay/report.ts +139 -0
- package/src/domains/context/working-set/replay/runner.ts +325 -0
- package/src/domains/context/working-set/replay/synthetic.ts +422 -0
- package/src/domains/context/working-set/replay/trace.ts +21 -0
- package/src/domains/context/working-set/visible.ts +54 -0
- package/src/domains/evidence/build.ts +112 -45
- package/src/domains/evidence/eval.ts +24 -7
- package/src/domains/evidence/index.ts +53 -0
- package/src/domains/evidence/ordering.ts +12 -0
- package/src/domains/evidence/run-trust.ts +221 -0
- package/src/domains/evidence/store.ts +46 -6
- package/src/domains/evidence/trust-status.ts +854 -0
- package/src/domains/evidence/types.ts +26 -0
- package/src/domains/middleware/memory-intervention.ts +3 -0
- package/src/domains/middleware/stalled-turn.ts +165 -4
- package/src/domains/safety/autonomy.ts +1 -1
- package/src/domains/safety/default-path-policy.ts +8 -0
- package/src/domains/safety/finish-contract.ts +4 -3
- package/src/domains/safety/policy-engine.ts +48 -6
- package/src/domains/session/compaction/compact.ts +23 -1
- package/src/domains/session/compaction/cut-point.ts +2 -0
- package/src/domains/session/compaction/tokens.ts +16 -1
- package/src/domains/session/context-ledger.ts +2 -0
- package/src/domains/session/entries.ts +107 -1
- package/src/domains/session/manager.ts +9 -2
- package/src/domains/session/migrations/index.ts +22 -3
- package/src/engine/acp/server.ts +3 -0
- package/src/engine/agent.ts +18 -1
- package/src/engine/session.ts +9 -3
- package/src/entry/orchestrator.ts +16 -4
- package/src/interactive/chat-loop-messages.ts +18 -6
- package/src/interactive/chat-panel.ts +571 -244
- package/src/interactive/chat-renderer.ts +79 -39
- package/src/interactive/context-meter.ts +10 -0
- package/src/interactive/context-overlay.ts +81 -6
- package/src/interactive/context-recall-command.ts +110 -0
- package/src/interactive/editor-submit.ts +26 -1
- package/src/interactive/footer/widgets.ts +22 -20
- package/src/interactive/footer-panel.ts +6 -1
- package/src/interactive/interactive-application.ts +2 -0
- package/src/interactive/interactive-event-projection.ts +12 -0
- package/src/interactive/interactive-slash-runtime.ts +49 -8
- package/src/interactive/model-session-replay.ts +21 -0
- package/src/interactive/overlay-general-openers.ts +6 -0
- package/src/interactive/overlay-session-lifecycle.ts +8 -4
- package/src/interactive/overlays/ask-user.ts +146 -24
- package/src/interactive/renderers/tool-execution.ts +167 -56
- package/src/interactive/session-transcript.ts +2 -2
- package/src/interactive/slash-commands.ts +29 -2
- package/src/interactive/status/index.ts +12 -1
- package/src/interactive/status/reasoning.ts +87 -0
- package/src/interactive/status/summary.ts +13 -2
- package/src/interactive/transcript-detail.ts +120 -0
- package/src/interactive/turn-context.ts +238 -88
- package/src/interactive/turn-middleware.ts +6 -6
- package/src/tools/agent-tools.ts +11 -4
- package/src/tools/bash.ts +144 -82
- package/src/tools/builtin-tool-catalog.ts +18 -6
- package/src/tools/context/index.ts +105 -3
- package/src/tools/context/surface.ts +3 -2
- package/src/tools/core-bootstrap.ts +21 -0
- package/src/tools/dispatch-runner.ts +9 -7
- package/src/tools/monitor.ts +28 -20
- package/src/tools/presentation.ts +107 -0
- package/src/tools/registry.ts +65 -7
- package/src/tools/result-disposition.ts +550 -0
- package/src/tools/result-shaping.ts +262 -19
- package/src/tools/safe-exec.ts +2 -0
- package/src/tools/verify/authoring.ts +1119 -0
- package/src/tools/verify/catalog.ts +346 -0
- package/src/tools/verify/index.ts +13 -3
- package/src/tools/verify/scripts.ts +135 -37
- package/src/tools/verify/surface.ts +9 -5
- package/src/tools/worker-evidence.ts +35 -12
- package/dist/chunk-MNA4JGU4.js +0 -255
- package/dist/chunk-SRF2PJNW.js +0 -184
- package/dist/chunk-T6YILFSB.js +0 -80
- package/dist/chunk-VAKQQHWR.js +0 -434
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-3R73A4XB.js";
|
|
5
|
+
|
|
6
|
+
// src/engine/strip-tokenizer-sentinels.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
var KNOWN_SENTINELS = [
|
|
9
|
+
"<|endoftext|>",
|
|
10
|
+
"<|im_start|>",
|
|
11
|
+
"<|im_end|>",
|
|
12
|
+
"<|eot_id|>",
|
|
13
|
+
"<|end_of_turn|>",
|
|
14
|
+
"<|fim_prefix|>",
|
|
15
|
+
"<|fim_middle|>",
|
|
16
|
+
"<|fim_suffix|>",
|
|
17
|
+
"<|file_separator|>",
|
|
18
|
+
"<s>",
|
|
19
|
+
"</s>"
|
|
20
|
+
];
|
|
21
|
+
var SENTINEL_RE = new RegExp(KNOWN_SENTINELS.map((s) => s.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&")).join("|"), "g");
|
|
22
|
+
var MAX_SENTINEL_LEN = KNOWN_SENTINELS.reduce((max, s) => s.length > max ? s.length : max, 0);
|
|
23
|
+
function stripTokenizerSentinels(text) {
|
|
24
|
+
if (text.length === 0) return text;
|
|
25
|
+
return text.replace(SENTINEL_RE, "");
|
|
26
|
+
}
|
|
27
|
+
function isSentinelPrefix(tail) {
|
|
28
|
+
if (tail.length === 0) return false;
|
|
29
|
+
for (const sentinel of KNOWN_SENTINELS) {
|
|
30
|
+
if (sentinel.length > tail.length && sentinel.startsWith(tail)) return true;
|
|
31
|
+
}
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
function createSentinelStripper() {
|
|
35
|
+
let buffer = "";
|
|
36
|
+
return {
|
|
37
|
+
push(chunk) {
|
|
38
|
+
if (chunk.length === 0) return "";
|
|
39
|
+
buffer += chunk;
|
|
40
|
+
const stripped = buffer.replace(SENTINEL_RE, "");
|
|
41
|
+
const holdMax = Math.min(stripped.length, MAX_SENTINEL_LEN - 1);
|
|
42
|
+
let hold = 0;
|
|
43
|
+
for (let take = holdMax; take > 0; take--) {
|
|
44
|
+
const tail = stripped.slice(stripped.length - take);
|
|
45
|
+
if (isSentinelPrefix(tail)) {
|
|
46
|
+
hold = take;
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const safe = hold === 0 ? stripped : stripped.slice(0, stripped.length - hold);
|
|
51
|
+
buffer = hold === 0 ? "" : stripped.slice(stripped.length - hold);
|
|
52
|
+
return safe;
|
|
53
|
+
},
|
|
54
|
+
flush() {
|
|
55
|
+
if (buffer.length === 0) return "";
|
|
56
|
+
const remainder = buffer.replace(SENTINEL_RE, "");
|
|
57
|
+
buffer = "";
|
|
58
|
+
return remainder;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export {
|
|
64
|
+
stripTokenizerSentinels,
|
|
65
|
+
createSentinelStripper
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=chunk-CFGTUFWB.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
settingsPath,
|
|
6
6
|
updateSavedSettingsDocument,
|
|
7
7
|
validateSettings
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AD2SYQYC.js";
|
|
9
9
|
import {
|
|
10
10
|
require_dist
|
|
11
11
|
} from "./chunk-APJ265NV.js";
|
|
@@ -226,4 +226,4 @@ export {
|
|
|
226
226
|
updateLayeredSettings,
|
|
227
227
|
settingsSourceFor
|
|
228
228
|
};
|
|
229
|
-
//# sourceMappingURL=chunk-
|
|
229
|
+
//# sourceMappingURL=chunk-E25LMLRW.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
cloneApprovedAssignmentRoute,
|
|
7
7
|
isApprovedAssignmentRoute,
|
|
8
8
|
isToolProfileName
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZYKPLLNQ.js";
|
|
10
10
|
import {
|
|
11
11
|
ROUTE_POLICY_VERSION,
|
|
12
12
|
isExecutionRole,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
isRoutingIntent,
|
|
15
15
|
parseRoutingIntent,
|
|
16
16
|
requestExecutionRole
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-22NAGB7X.js";
|
|
18
18
|
import {
|
|
19
19
|
AGENT_AUTOMATION_AUTHORITIES
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-AOCYTWAV.js";
|
|
21
21
|
import {
|
|
22
22
|
init_esm_shims
|
|
23
23
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -641,4 +641,4 @@ export {
|
|
|
641
641
|
withResolvedDispatchPlan,
|
|
642
642
|
describeDispatchPlan
|
|
643
643
|
};
|
|
644
|
-
//# sourceMappingURL=chunk-
|
|
644
|
+
//# sourceMappingURL=chunk-EDRHSCIE.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
|
durableAssistantTextFromEvent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QQL5RT5M.js";
|
|
5
5
|
import {
|
|
6
6
|
init_esm_shims
|
|
7
7
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -15,4 +15,4 @@ function assistantTextFromEvent(event) {
|
|
|
15
15
|
export {
|
|
16
16
|
assistantTextFromEvent
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-EFADSJET.js.map
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
} from "node:fs";
|
|
39
39
|
import { dirname, join, resolve } from "node:path";
|
|
40
40
|
import { StringDecoder } from "node:string_decoder";
|
|
41
|
-
var CURRENT_SESSION_FORMAT_VERSION =
|
|
41
|
+
var CURRENT_SESSION_FORMAT_VERSION = 4;
|
|
42
42
|
function cwdHash(cwd) {
|
|
43
43
|
const normalized = resolve(cwd);
|
|
44
44
|
return createHash("sha256").update(normalized).digest("hex").slice(0, 16);
|
|
@@ -567,4 +567,4 @@ export {
|
|
|
567
567
|
openSession,
|
|
568
568
|
resumeSession
|
|
569
569
|
};
|
|
570
|
-
//# sourceMappingURL=chunk-
|
|
570
|
+
//# sourceMappingURL=chunk-FO5ZOVUY.js.map
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
isProjectVerifierCheckId
|
|
4
|
+
} from "./chunk-UL3WSD3F.js";
|
|
5
|
+
import {
|
|
6
|
+
SAFE_EXEC_DEFAULT_TIMEOUT_MS,
|
|
7
|
+
resolveSafeCwd
|
|
8
|
+
} from "./chunk-VEZEGCGW.js";
|
|
9
|
+
import {
|
|
10
|
+
require_dist
|
|
11
|
+
} from "./chunk-APJ265NV.js";
|
|
12
|
+
import {
|
|
13
|
+
__toESM,
|
|
14
|
+
init_esm_shims
|
|
15
|
+
} from "./chunk-3R73A4XB.js";
|
|
16
|
+
|
|
17
|
+
// src/tools/verify/catalog.ts
|
|
18
|
+
init_esm_shims();
|
|
19
|
+
var import_yaml = __toESM(require_dist(), 1);
|
|
20
|
+
import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
21
|
+
import path from "node:path";
|
|
22
|
+
|
|
23
|
+
// src/domains/evidence/ordering.ts
|
|
24
|
+
init_esm_shims();
|
|
25
|
+
function compareCodepoints(left, right) {
|
|
26
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// src/tools/verify/catalog.ts
|
|
30
|
+
var PROJECT_VERIFIER_CATALOG_RELATIVE_PATH = ".clio-coder/verifiers.yaml";
|
|
31
|
+
var PROJECT_VERIFIER_CATALOG_VERSION = 1;
|
|
32
|
+
var PROJECT_VERIFIER_CATALOG_CAPS = Object.freeze({
|
|
33
|
+
fileBytes: 256 * 1024,
|
|
34
|
+
checks: 128,
|
|
35
|
+
idBytes: 64,
|
|
36
|
+
descriptionBytes: 512,
|
|
37
|
+
argvEntries: 64,
|
|
38
|
+
argumentBytes: 4096,
|
|
39
|
+
cwdBytes: 512,
|
|
40
|
+
timeoutMs: 9e5,
|
|
41
|
+
tags: 16,
|
|
42
|
+
tagBytes: 32
|
|
43
|
+
});
|
|
44
|
+
var ROOT_FIELDS = /* @__PURE__ */ new Set(["version", "checks"]);
|
|
45
|
+
var CHECK_FIELDS = /* @__PURE__ */ new Set(["id", "description", "command", "cwd", "timeoutMs", "tags"]);
|
|
46
|
+
var TAG_PATTERN = /^[a-z0-9][a-z0-9._-]*$/;
|
|
47
|
+
var SHELL_EXECUTABLES = /* @__PURE__ */ new Set([
|
|
48
|
+
"bash",
|
|
49
|
+
"cmd",
|
|
50
|
+
"command.com",
|
|
51
|
+
"dash",
|
|
52
|
+
"fish",
|
|
53
|
+
"ksh",
|
|
54
|
+
"powershell",
|
|
55
|
+
"pwsh",
|
|
56
|
+
"sh",
|
|
57
|
+
"tcsh",
|
|
58
|
+
"zsh"
|
|
59
|
+
]);
|
|
60
|
+
function isRecord(value) {
|
|
61
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
62
|
+
}
|
|
63
|
+
function utf8Bytes(value) {
|
|
64
|
+
return Buffer.byteLength(value, "utf8");
|
|
65
|
+
}
|
|
66
|
+
function hasControlCharacter(value) {
|
|
67
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
68
|
+
const code = value.charCodeAt(index);
|
|
69
|
+
if (code <= 31 || code === 127) return true;
|
|
70
|
+
}
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
function catalogDiagnostic(message) {
|
|
74
|
+
return { ok: false, reason: `${PROJECT_VERIFIER_CATALOG_RELATIVE_PATH}: ${message}` };
|
|
75
|
+
}
|
|
76
|
+
function unknownFields(record, allowed) {
|
|
77
|
+
return Object.keys(record).filter((key) => !allowed.has(key)).sort(compareCodepoints);
|
|
78
|
+
}
|
|
79
|
+
function relativeCwd(workspaceRoot, resolved) {
|
|
80
|
+
const relative = path.relative(workspaceRoot, resolved);
|
|
81
|
+
return relative.length === 0 ? "." : relative.split(path.sep).join("/");
|
|
82
|
+
}
|
|
83
|
+
function safelyResolveCatalogCwd(rawCwd, workspaceRoot, location) {
|
|
84
|
+
if (path.isAbsolute(rawCwd) || path.win32.isAbsolute(rawCwd)) {
|
|
85
|
+
return new Error(`${location} must be repository-relative; absolute cwd '${rawCwd}' is not allowed`);
|
|
86
|
+
}
|
|
87
|
+
let resolved;
|
|
88
|
+
try {
|
|
89
|
+
resolved = resolveSafeCwd(rawCwd, workspaceRoot);
|
|
90
|
+
} catch {
|
|
91
|
+
return new Error(`${location} escapes the workspace root: '${rawCwd}'`);
|
|
92
|
+
}
|
|
93
|
+
let realCwd;
|
|
94
|
+
try {
|
|
95
|
+
const cwdStat = statSync(resolved);
|
|
96
|
+
if (!cwdStat.isDirectory()) return new Error(`${location} is not a directory: '${rawCwd}'`);
|
|
97
|
+
const realRoot = realpathSync(workspaceRoot);
|
|
98
|
+
realCwd = realpathSync(resolved);
|
|
99
|
+
resolveSafeCwd(realCwd, realRoot);
|
|
100
|
+
} catch (error) {
|
|
101
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
102
|
+
if (message.includes("escapes workspace root")) {
|
|
103
|
+
return new Error(`${location} escapes the workspace root through a symbolic link: '${rawCwd}'`);
|
|
104
|
+
}
|
|
105
|
+
return new Error(`${location} cannot be resolved as a repository directory: '${rawCwd}' (${message})`);
|
|
106
|
+
}
|
|
107
|
+
return { declared: relativeCwd(workspaceRoot, resolved), execution: realCwd };
|
|
108
|
+
}
|
|
109
|
+
function resolveProjectVerifierExecutionCwd(rawCwd, workspaceRoot) {
|
|
110
|
+
const resolution = safelyResolveCatalogCwd(rawCwd, workspaceRoot, "project check cwd");
|
|
111
|
+
return resolution instanceof Error ? resolution : resolution.execution;
|
|
112
|
+
}
|
|
113
|
+
function validateId(value, location) {
|
|
114
|
+
if (typeof value !== "string" || value.length === 0) return new Error(`${location} must be a non-empty string`);
|
|
115
|
+
if (utf8Bytes(value) > PROJECT_VERIFIER_CATALOG_CAPS.idBytes) {
|
|
116
|
+
return new Error(`${location} exceeds the ${PROJECT_VERIFIER_CATALOG_CAPS.idBytes}-byte cap`);
|
|
117
|
+
}
|
|
118
|
+
if (!isProjectVerifierCheckId(value)) {
|
|
119
|
+
return new Error(`${location} must match /^[a-z0-9][a-z0-9._:-]*$/`);
|
|
120
|
+
}
|
|
121
|
+
if (value === "frontend") return new Error(`${location} uses reserved built-in check id 'frontend'`);
|
|
122
|
+
return value;
|
|
123
|
+
}
|
|
124
|
+
function validateDescription(value, location) {
|
|
125
|
+
if (typeof value !== "string" || value.length === 0) return new Error(`${location} must be a non-empty string`);
|
|
126
|
+
if (value.trim() !== value || hasControlCharacter(value)) {
|
|
127
|
+
return new Error(`${location} must be trimmed, single-line text without control characters`);
|
|
128
|
+
}
|
|
129
|
+
if (utf8Bytes(value) > PROJECT_VERIFIER_CATALOG_CAPS.descriptionBytes) {
|
|
130
|
+
return new Error(`${location} exceeds the ${PROJECT_VERIFIER_CATALOG_CAPS.descriptionBytes}-byte cap`);
|
|
131
|
+
}
|
|
132
|
+
return value;
|
|
133
|
+
}
|
|
134
|
+
function validateCommand(value, location) {
|
|
135
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
136
|
+
return new Error(`${location} must be a non-empty argv string array; shell command strings are not allowed`);
|
|
137
|
+
}
|
|
138
|
+
if (value.length > PROJECT_VERIFIER_CATALOG_CAPS.argvEntries) {
|
|
139
|
+
return new Error(`${location} exceeds the ${PROJECT_VERIFIER_CATALOG_CAPS.argvEntries}-entry cap`);
|
|
140
|
+
}
|
|
141
|
+
const command = [];
|
|
142
|
+
for (const [index, entry] of value.entries()) {
|
|
143
|
+
const entryLocation = `${location}[${index}]`;
|
|
144
|
+
if (typeof entry !== "string" || entry.length === 0) {
|
|
145
|
+
return new Error(`${entryLocation} must be a non-empty string`);
|
|
146
|
+
}
|
|
147
|
+
if (entry.includes("\0")) return new Error(`${entryLocation} must not contain a NUL byte`);
|
|
148
|
+
if (utf8Bytes(entry) > PROJECT_VERIFIER_CATALOG_CAPS.argumentBytes) {
|
|
149
|
+
return new Error(`${entryLocation} exceeds the ${PROJECT_VERIFIER_CATALOG_CAPS.argumentBytes}-byte cap`);
|
|
150
|
+
}
|
|
151
|
+
command.push(entry);
|
|
152
|
+
}
|
|
153
|
+
const executable = command[0] ?? "";
|
|
154
|
+
if (/\s/u.test(executable)) {
|
|
155
|
+
return new Error(`${location}[0] must be one executable token, not a shell command string`);
|
|
156
|
+
}
|
|
157
|
+
const executableName = path.basename(executable).toLowerCase().replace(/\.exe$/u, "");
|
|
158
|
+
if (SHELL_EXECUTABLES.has(executableName)) {
|
|
159
|
+
return new Error(`${location}[0] may not invoke shell executable '${executable}'`);
|
|
160
|
+
}
|
|
161
|
+
return command;
|
|
162
|
+
}
|
|
163
|
+
function validateTimeout(value, location) {
|
|
164
|
+
if (!Number.isInteger(value) || typeof value !== "number" || value <= 0) {
|
|
165
|
+
return new Error(`${location} must be a positive integer number of milliseconds`);
|
|
166
|
+
}
|
|
167
|
+
if (value > PROJECT_VERIFIER_CATALOG_CAPS.timeoutMs) {
|
|
168
|
+
return new Error(`${location} exceeds the ${PROJECT_VERIFIER_CATALOG_CAPS.timeoutMs}ms cap`);
|
|
169
|
+
}
|
|
170
|
+
return value;
|
|
171
|
+
}
|
|
172
|
+
function validateTags(value, location) {
|
|
173
|
+
if (!Array.isArray(value)) return new Error(`${location} must be an array of bounded tag strings`);
|
|
174
|
+
if (value.length > PROJECT_VERIFIER_CATALOG_CAPS.tags) {
|
|
175
|
+
return new Error(`${location} exceeds the ${PROJECT_VERIFIER_CATALOG_CAPS.tags}-tag cap`);
|
|
176
|
+
}
|
|
177
|
+
const tags = [];
|
|
178
|
+
const seen = /* @__PURE__ */ new Set();
|
|
179
|
+
for (const [index, entry] of value.entries()) {
|
|
180
|
+
const entryLocation = `${location}[${index}]`;
|
|
181
|
+
if (typeof entry !== "string" || entry.length === 0) {
|
|
182
|
+
return new Error(`${entryLocation} must be a non-empty string`);
|
|
183
|
+
}
|
|
184
|
+
if (utf8Bytes(entry) > PROJECT_VERIFIER_CATALOG_CAPS.tagBytes) {
|
|
185
|
+
return new Error(`${entryLocation} exceeds the ${PROJECT_VERIFIER_CATALOG_CAPS.tagBytes}-byte cap`);
|
|
186
|
+
}
|
|
187
|
+
if (!TAG_PATTERN.test(entry)) return new Error(`${entryLocation} must match /^[a-z0-9][a-z0-9._-]*$/`);
|
|
188
|
+
if (seen.has(entry)) return new Error(`${location} contains duplicate tag '${entry}'`);
|
|
189
|
+
seen.add(entry);
|
|
190
|
+
tags.push(entry);
|
|
191
|
+
}
|
|
192
|
+
return tags;
|
|
193
|
+
}
|
|
194
|
+
function sourcePathInsideWorkspace(catalogPath, workspaceRoot) {
|
|
195
|
+
try {
|
|
196
|
+
const realRoot = realpathSync(workspaceRoot);
|
|
197
|
+
const realCatalogPath = realpathSync(catalogPath);
|
|
198
|
+
resolveSafeCwd(realCatalogPath, realRoot);
|
|
199
|
+
return realCatalogPath;
|
|
200
|
+
} catch (error) {
|
|
201
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
202
|
+
return new Error(`catalog file must resolve inside the workspace root (${message})`);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
function loadProjectVerifierCatalog(workspaceRoot) {
|
|
206
|
+
const catalogPath = path.join(workspaceRoot, PROJECT_VERIFIER_CATALOG_RELATIVE_PATH);
|
|
207
|
+
if (!existsSync(catalogPath)) return { ok: true, source: null };
|
|
208
|
+
const safeSourcePath = sourcePathInsideWorkspace(catalogPath, workspaceRoot);
|
|
209
|
+
if (safeSourcePath instanceof Error) return catalogDiagnostic(safeSourcePath.message);
|
|
210
|
+
let text;
|
|
211
|
+
try {
|
|
212
|
+
const stats = statSync(safeSourcePath);
|
|
213
|
+
if (!stats.isFile()) return catalogDiagnostic("catalog path must be a regular file");
|
|
214
|
+
if (stats.size > PROJECT_VERIFIER_CATALOG_CAPS.fileBytes) {
|
|
215
|
+
return catalogDiagnostic(`file exceeds the ${PROJECT_VERIFIER_CATALOG_CAPS.fileBytes}-byte cap`);
|
|
216
|
+
}
|
|
217
|
+
text = readFileSync(safeSourcePath, "utf8");
|
|
218
|
+
} catch (error) {
|
|
219
|
+
return catalogDiagnostic(`cannot read catalog (${error instanceof Error ? error.message : String(error)})`);
|
|
220
|
+
}
|
|
221
|
+
return parseProjectVerifierCatalogText(text, workspaceRoot, catalogPath);
|
|
222
|
+
}
|
|
223
|
+
function parseProjectVerifierCatalogText(text, workspaceRoot, catalogPath = path.join(workspaceRoot, PROJECT_VERIFIER_CATALOG_RELATIVE_PATH)) {
|
|
224
|
+
const document = (0, import_yaml.parseDocument)(text, { prettyErrors: false, strict: true, uniqueKeys: true });
|
|
225
|
+
if (document.errors.length > 0) {
|
|
226
|
+
return catalogDiagnostic(`invalid YAML: ${document.errors.map((error) => error.message).join("; ")}`);
|
|
227
|
+
}
|
|
228
|
+
let parsed;
|
|
229
|
+
try {
|
|
230
|
+
parsed = document.toJS({ maxAliasCount: 0 });
|
|
231
|
+
} catch (error) {
|
|
232
|
+
return catalogDiagnostic(`invalid YAML: ${error instanceof Error ? error.message : String(error)}`);
|
|
233
|
+
}
|
|
234
|
+
if (!isRecord(parsed)) return catalogDiagnostic("root must be an object with version and checks fields");
|
|
235
|
+
const rootUnknown = unknownFields(parsed, ROOT_FIELDS);
|
|
236
|
+
if (rootUnknown.length > 0) return catalogDiagnostic(`root has unknown field(s): ${rootUnknown.join(", ")}`);
|
|
237
|
+
if (!Object.hasOwn(parsed, "version")) return catalogDiagnostic("root.version is required");
|
|
238
|
+
if (parsed.version !== PROJECT_VERIFIER_CATALOG_VERSION) {
|
|
239
|
+
return catalogDiagnostic(
|
|
240
|
+
`unsupported version ${JSON.stringify(parsed.version)}; supported version is ${PROJECT_VERIFIER_CATALOG_VERSION}`
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
if (!Object.hasOwn(parsed, "checks")) return catalogDiagnostic("root.checks is required");
|
|
244
|
+
if (!Array.isArray(parsed.checks)) return catalogDiagnostic("root.checks must be an array");
|
|
245
|
+
if (parsed.checks.length > PROJECT_VERIFIER_CATALOG_CAPS.checks) {
|
|
246
|
+
return catalogDiagnostic(`root.checks exceeds the ${PROJECT_VERIFIER_CATALOG_CAPS.checks}-check cap`);
|
|
247
|
+
}
|
|
248
|
+
const sourceRef = { kind: "project-catalog", path: catalogPath };
|
|
249
|
+
const checks = [];
|
|
250
|
+
const ids = /* @__PURE__ */ new Map();
|
|
251
|
+
for (const [index, value] of parsed.checks.entries()) {
|
|
252
|
+
const location = `checks[${index}]`;
|
|
253
|
+
if (!isRecord(value)) return catalogDiagnostic(`${location} must be an object`);
|
|
254
|
+
const checkUnknown = unknownFields(value, CHECK_FIELDS);
|
|
255
|
+
if (checkUnknown.length > 0) {
|
|
256
|
+
return catalogDiagnostic(`${location} has unknown field(s): ${checkUnknown.join(", ")}`);
|
|
257
|
+
}
|
|
258
|
+
for (const field of CHECK_FIELDS) {
|
|
259
|
+
if (!Object.hasOwn(value, field)) return catalogDiagnostic(`${location}.${field} is required`);
|
|
260
|
+
}
|
|
261
|
+
const id = validateId(value.id, `${location}.id`);
|
|
262
|
+
if (id instanceof Error) return catalogDiagnostic(id.message);
|
|
263
|
+
const duplicateIndex = ids.get(id);
|
|
264
|
+
if (duplicateIndex !== void 0) {
|
|
265
|
+
return catalogDiagnostic(`${location}.id duplicates '${id}' from checks[${duplicateIndex}].id`);
|
|
266
|
+
}
|
|
267
|
+
const description = validateDescription(value.description, `${location}.description`);
|
|
268
|
+
if (description instanceof Error) return catalogDiagnostic(description.message);
|
|
269
|
+
const command = validateCommand(value.command, `${location}.command`);
|
|
270
|
+
if (command instanceof Error) return catalogDiagnostic(command.message);
|
|
271
|
+
if (typeof value.cwd !== "string" || value.cwd.length === 0) {
|
|
272
|
+
return catalogDiagnostic(`${location}.cwd must be a non-empty repository-relative string`);
|
|
273
|
+
}
|
|
274
|
+
if (value.cwd.includes("\0")) return catalogDiagnostic(`${location}.cwd must not contain a NUL byte`);
|
|
275
|
+
if (utf8Bytes(value.cwd) > PROJECT_VERIFIER_CATALOG_CAPS.cwdBytes) {
|
|
276
|
+
return catalogDiagnostic(`${location}.cwd exceeds the ${PROJECT_VERIFIER_CATALOG_CAPS.cwdBytes}-byte cap`);
|
|
277
|
+
}
|
|
278
|
+
const cwdResolution = safelyResolveCatalogCwd(value.cwd, workspaceRoot, `${location}.cwd`);
|
|
279
|
+
if (cwdResolution instanceof Error) return catalogDiagnostic(cwdResolution.message);
|
|
280
|
+
const cwd = cwdResolution.declared;
|
|
281
|
+
const timeoutMs = validateTimeout(value.timeoutMs, `${location}.timeoutMs`);
|
|
282
|
+
if (timeoutMs instanceof Error) return catalogDiagnostic(timeoutMs.message);
|
|
283
|
+
const tags = validateTags(value.tags, `${location}.tags`);
|
|
284
|
+
if (tags instanceof Error) return catalogDiagnostic(tags.message);
|
|
285
|
+
ids.set(id, index);
|
|
286
|
+
checks.push({ id, description, command, cwd, timeoutMs, tags, source: { ...sourceRef } });
|
|
287
|
+
}
|
|
288
|
+
checks.sort((left, right) => compareCodepoints(left.id, right.id));
|
|
289
|
+
return { ok: true, source: { ...sourceRef, checks } };
|
|
290
|
+
}
|
|
291
|
+
function packageDeclaredCheck(id, packagePath, cwd, tags) {
|
|
292
|
+
return {
|
|
293
|
+
id,
|
|
294
|
+
description: `Run package.json script '${id}'.`,
|
|
295
|
+
command: ["npm", "run", id],
|
|
296
|
+
cwd,
|
|
297
|
+
timeoutMs: SAFE_EXEC_DEFAULT_TIMEOUT_MS,
|
|
298
|
+
tags,
|
|
299
|
+
source: { kind: "package.json", path: packagePath }
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export {
|
|
304
|
+
compareCodepoints,
|
|
305
|
+
PROJECT_VERIFIER_CATALOG_RELATIVE_PATH,
|
|
306
|
+
PROJECT_VERIFIER_CATALOG_VERSION,
|
|
307
|
+
PROJECT_VERIFIER_CATALOG_CAPS,
|
|
308
|
+
resolveProjectVerifierExecutionCwd,
|
|
309
|
+
loadProjectVerifierCatalog,
|
|
310
|
+
parseProjectVerifierCatalogText,
|
|
311
|
+
packageDeclaredCheck
|
|
312
|
+
};
|
|
313
|
+
//# sourceMappingURL=chunk-FYYLNIL5.js.map
|
|
@@ -5,44 +5,46 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SchedulingDomainModule,
|
|
7
7
|
createPromptsDomainModule
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3HZ5RWN2.js";
|
|
9
9
|
import {
|
|
10
10
|
AgentsDomainModule,
|
|
11
11
|
SafetyDomainModule
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-X6COSD2O.js";
|
|
13
13
|
import {
|
|
14
14
|
ConfigDomainModule,
|
|
15
15
|
loadDomains
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KRPY7NTG.js";
|
|
17
17
|
import {
|
|
18
18
|
createObservabilityDomainModule
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-35MKKU5R.js";
|
|
20
20
|
import {
|
|
21
21
|
fallbackBootstrapOutput
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-UZHIZC5S.js";
|
|
23
23
|
import {
|
|
24
24
|
renderCodewikiDigest
|
|
25
25
|
} from "./chunk-5WIGXA4T.js";
|
|
26
26
|
import {
|
|
27
|
-
DispatchDomainModule
|
|
27
|
+
DispatchDomainModule
|
|
28
|
+
} from "./chunk-QQL5RT5M.js";
|
|
29
|
+
import {
|
|
28
30
|
SessionDomainModule
|
|
29
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QQK64KLB.js";
|
|
30
32
|
import {
|
|
31
33
|
ResourcesDomainModule
|
|
32
34
|
} from "./chunk-MFFY33HR.js";
|
|
33
35
|
import {
|
|
34
36
|
MiddlewareDomainModule
|
|
35
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-2LZI5CAG.js";
|
|
36
38
|
import {
|
|
37
39
|
UnsupportedResponseSchemaError,
|
|
38
40
|
isResponseSchemaRejection
|
|
39
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-ZYKPLLNQ.js";
|
|
40
42
|
import {
|
|
41
43
|
parseJsonObjectPayload
|
|
42
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-7RXG6QRZ.js";
|
|
43
45
|
import {
|
|
44
46
|
ProvidersDomainModule
|
|
45
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-QWU7ZBO7.js";
|
|
46
48
|
import {
|
|
47
49
|
init_esm_shims
|
|
48
50
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -671,4 +673,4 @@ export {
|
|
|
671
673
|
validateInitOptions,
|
|
672
674
|
bootstrapInputFromInitOptions
|
|
673
675
|
};
|
|
674
|
-
//# sourceMappingURL=chunk-
|
|
676
|
+
//# sourceMappingURL=chunk-HV5X7OR2.js.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
-
BusChannels,
|
|
4
3
|
getSharedBus
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZGVHUX3M.js";
|
|
5
|
+
import {
|
|
6
|
+
BusChannels
|
|
7
|
+
} from "./chunk-TTNYS3EA.js";
|
|
6
8
|
import {
|
|
7
9
|
init_esm_shims
|
|
8
10
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -224,4 +226,4 @@ export {
|
|
|
224
226
|
runWithBudget,
|
|
225
227
|
getTerminationCoordinator
|
|
226
228
|
};
|
|
227
|
-
//# sourceMappingURL=chunk-
|
|
229
|
+
//# sourceMappingURL=chunk-HXG4IURW.js.map
|
|
@@ -2,7 +2,7 @@ import { createRequire as __clioCreateRequire } from "node:module"; const requir
|
|
|
2
2
|
import {
|
|
3
3
|
readStateInfo,
|
|
4
4
|
runDoctor
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VAWWTKDP.js";
|
|
6
6
|
import {
|
|
7
7
|
getVersionInfo
|
|
8
8
|
} from "./chunk-XPLRXC72.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
readSettings,
|
|
11
11
|
settingsPath,
|
|
12
12
|
updateSettings
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AD2SYQYC.js";
|
|
14
14
|
import {
|
|
15
15
|
authStoragePath,
|
|
16
16
|
openAuthStorage
|
|
@@ -158,4 +158,4 @@ export {
|
|
|
158
158
|
describeUpgradeNotice,
|
|
159
159
|
LifecycleDomainModule
|
|
160
160
|
};
|
|
161
|
-
//# sourceMappingURL=chunk-
|
|
161
|
+
//# sourceMappingURL=chunk-K6WL7QZT.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-3R73A4XB.js";
|
|
5
|
+
|
|
6
|
+
// src/core/headless-permission.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
var HEADLESS_PERMISSION_DENIED_REASON = "clio-coder run cannot confirm permission requests; rerun interactively to approve this action.";
|
|
9
|
+
var HEADLESS_PERMISSION_DENIED_MARKER = "clio-coder run cannot confirm permission requests";
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
HEADLESS_PERMISSION_DENIED_REASON,
|
|
13
|
+
HEADLESS_PERMISSION_DENIED_MARKER
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=chunk-K7VKOLQQ.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
|
DEFAULT_SETTINGS_YAML
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4OC57DA6.js";
|
|
5
5
|
import {
|
|
6
6
|
clioCacheDir,
|
|
7
7
|
clioConfigDir,
|
|
@@ -143,4 +143,4 @@ function enforceHomePrefixGuard() {
|
|
|
143
143
|
export {
|
|
144
144
|
initializeClioHome
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-KOHPCX4K.js.map
|
|
@@ -2,23 +2,25 @@ import { createRequire as __clioCreateRequire } from "node:module"; const requir
|
|
|
2
2
|
import {
|
|
3
3
|
readStrictLayeredSettings,
|
|
4
4
|
updateLayeredSettings
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-E25LMLRW.js";
|
|
6
6
|
import {
|
|
7
7
|
formatSettingsFailure,
|
|
8
8
|
settingsPath
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AD2SYQYC.js";
|
|
10
10
|
import {
|
|
11
11
|
setGitCommitAttributionEnabled
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VEZEGCGW.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveShutdownHookBudgetMs,
|
|
15
15
|
runWithBudget,
|
|
16
16
|
writeShutdownNotice
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HXG4IURW.js";
|
|
18
18
|
import {
|
|
19
|
-
BusChannels,
|
|
20
19
|
getSharedBus
|
|
21
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZGVHUX3M.js";
|
|
21
|
+
import {
|
|
22
|
+
BusChannels
|
|
23
|
+
} from "./chunk-TTNYS3EA.js";
|
|
22
24
|
import {
|
|
23
25
|
init_esm_shims
|
|
24
26
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -184,6 +186,7 @@ var NEXT_TURN_FIELDS = /* @__PURE__ */ new Set([
|
|
|
184
186
|
"skills",
|
|
185
187
|
"delegation",
|
|
186
188
|
"compaction",
|
|
189
|
+
"context",
|
|
187
190
|
"retry"
|
|
188
191
|
]);
|
|
189
192
|
var RESTART_REQUIRED_FIELDS = /* @__PURE__ */ new Set([
|
|
@@ -381,4 +384,4 @@ export {
|
|
|
381
384
|
ConfigDomainModule,
|
|
382
385
|
createConfigDomainModule
|
|
383
386
|
};
|
|
384
|
-
//# sourceMappingURL=chunk-
|
|
387
|
+
//# sourceMappingURL=chunk-KRPY7NTG.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-3R73A4XB.js";
|
|
5
|
+
|
|
6
|
+
// src/domains/context/working-set/defaults.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
var DEFAULT_WORKING_SET_SETTINGS = {
|
|
9
|
+
enabled: true,
|
|
10
|
+
policy: "structural-v1",
|
|
11
|
+
target: 0.6,
|
|
12
|
+
protectLastTurns: 6,
|
|
13
|
+
// The procedural floor sweep found marker break-even near 50 tokens. A zero
|
|
14
|
+
// floor saved only 0.167 summaries at 64k and none at 128k while reducing
|
|
15
|
+
// covered retention by 0.0076 and 0.0237. Keep 200 as the churn guard.
|
|
16
|
+
minEvictableTokens: 200
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
DEFAULT_WORKING_SET_SETTINGS
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=chunk-LL4KHSZI.js.map
|