@iowarp/clio-coder 0.3.6 → 0.3.7
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 +28 -0
- package/README.md +16 -5
- package/dist/{acp-2BEHC4DL.js → acp-SK4MD6MM.js} +10 -10
- package/dist/{agents-LNNFTM53.js → agents-2FN2K6ME.js} +30 -25
- package/dist/assets/codewiki.json +1 -1
- package/dist/{auth-KXXFI2VS.js → auth-QIYZWM5I.js} +13 -13
- package/dist/{chunk-KHSFENX2.js → chunk-3HAPLH5M.js} +10 -10
- package/dist/{chunk-24I7BN55.js → chunk-465YSENW.js} +2 -2
- package/dist/{chunk-4OC57DA6.js → chunk-4DGYLA73.js} +53 -2
- package/dist/{chunk-CYQKWTG3.js → chunk-4DWFMQDR.js} +4 -4
- package/dist/{chunk-E2ER4LJF.js → chunk-5C3AQNDW.js} +25 -1
- package/dist/{chunk-22NAGB7X.js → chunk-5C77SEEY.js} +5 -94
- package/dist/{chunk-43AOLP7E.js → chunk-5FR74PWO.js} +2 -1
- package/dist/{chunk-K7T3E2SR.js → chunk-5UJ6ECTS.js} +10 -9
- package/dist/{chunk-6US73PDB.js → chunk-6M7VS3J3.js} +5 -5
- package/dist/{chunk-CJUB2JJ2.js → chunk-6TUKSZVF.js} +5 -5
- package/dist/{chunk-5JGRAMKL.js → chunk-AB4XIIVB.js} +8 -6
- package/dist/{chunk-R46L2BIR.js → chunk-BMWK7ZIZ.js} +14 -20
- package/dist/{chunk-4BPJXDWC.js → chunk-C4JBQ5SR.js} +30 -14
- package/dist/{chunk-XXQNGV4M.js → chunk-CEYBNUGC.js} +243 -63
- package/dist/{chunk-VEZEGCGW.js → chunk-D4MDIG46.js} +20 -18
- package/dist/chunk-DJNLUABN.js +843 -0
- package/dist/{chunk-RY3LY4J5.js → chunk-DMD2AGVS.js} +5 -4
- package/dist/{chunk-KOHPCX4K.js → chunk-DOOEX22V.js} +2 -2
- package/dist/chunk-DQA7QLMD.js +123 -0
- package/dist/chunk-DR52UMZW.js +21 -0
- package/dist/{chunk-XF5N4U5A.js → chunk-EBEFWSGL.js} +6 -5
- package/dist/{chunk-EYPA3EGJ.js → chunk-EELBMBT6.js} +120 -13
- package/dist/{chunk-CKXWIANG.js → chunk-EOOQZZDE.js} +16 -14
- package/dist/{chunk-WR67VIZY.js → chunk-FOT2FX5J.js} +63 -5
- package/dist/{chunk-FYYLNIL5.js → chunk-GH5622CP.js} +2 -2
- package/dist/chunk-GWS3VEIW.js +195 -0
- package/dist/{chunk-LYF7OHWH.js → chunk-J7PIKKWC.js} +8 -463
- package/dist/{chunk-NILBFAPG.js → chunk-JNXPYBB4.js} +2 -2
- package/dist/{chunk-4VP4KH3K.js → chunk-JRIO5UD2.js} +4 -4
- package/dist/{chunk-6XXKFVSN.js → chunk-JTSEDYVQ.js} +7 -7
- package/dist/{chunk-QKMUKYO7.js → chunk-KCMKRQX4.js} +236 -84
- package/dist/chunk-KZ2H5X4G.js +1026 -0
- package/dist/{chunk-QNQHSOLF.js → chunk-LADCF22A.js} +12 -12
- package/dist/chunk-M4AKACEO.js +382 -0
- package/dist/{chunk-XYDYPRZI.js → chunk-MXI6J5JF.js} +7 -7
- package/dist/{chunk-G7MUEIGA.js → chunk-OB5HIGJY.js} +1 -1
- package/dist/{chunk-EKY57CSP.js → chunk-OBMAI2DP.js} +61 -767
- package/dist/chunk-PD3MESLB.js +242 -0
- package/dist/{chunk-ZRGEBJ4T.js → chunk-QCTRSGHQ.js} +21 -21
- package/dist/chunk-RVG5JXAL.js +41 -0
- package/dist/{chunk-RD5U66HV.js → chunk-SROCI7ZU.js} +7 -7
- package/dist/{chunk-MFFY33HR.js → chunk-THKY7CD7.js} +466 -205
- package/dist/{chunk-PCZJO5TI.js → chunk-UFQ3F4FW.js} +13 -178
- package/dist/{chunk-AD2SYQYC.js → chunk-UHXRNZ2J.js} +121 -3
- package/dist/chunk-UND3GU2L.js +103 -0
- package/dist/{chunk-QM3F2GKX.js → chunk-UUANF5CR.js} +2247 -2096
- package/dist/chunk-UVDSQ6LW.js +472 -0
- package/dist/{chunk-DJVECN66.js → chunk-VQNODYQ4.js} +14 -14
- package/dist/{chunk-3BPUFZDL.js → chunk-VREKEFLL.js} +3 -3
- package/dist/{chunk-PBTHKCPN.js → chunk-WJHBC77E.js} +6 -6
- package/dist/{chunk-XE2VEJHX.js → chunk-X2KV5FXT.js} +2 -2
- package/dist/{chunk-ZXF4XRKW.js → chunk-XEGB6BCN.js} +157 -7
- package/dist/{chunk-E25LMLRW.js → chunk-YD734TPH.js} +2 -2
- package/dist/{verifiers-NCBTHHN2.js → chunk-YTYFXUI3.js} +65 -322
- package/dist/{chunk-OH3TOQTB.js → chunk-ZGH7FGS5.js} +13 -7
- package/dist/cli/index.js +32 -30
- package/dist/{clio-M2KGYUFZ.js → clio-WBVQEBKO.js} +7 -7
- package/dist/{code-nav-GQNL7XA6.js → code-nav-FGGFIE7L.js} +3 -3
- package/dist/{components-5TTYYX6G.js → components-F7OEATSO.js} +4 -4
- package/dist/{config-XUUYQIWO.js → config-TRBL3RCF.js} +34 -29
- package/dist/{configure-IHJ7YOMV.js → configure-OLCVPHNM.js} +15 -15
- package/dist/{context-74JLXAWD.js → context-MJIJ6GOX.js} +11 -11
- package/dist/{context-ZQ7SIFJV.js → context-WFPKQSM6.js} +19 -3
- package/dist/{context-75MIWW3U.js → context-XEWE3MOJ.js} +31 -26
- package/dist/{context-clear-GYKWNUML.js → context-clear-KNOS2JPB.js} +31 -26
- package/dist/{context-working-set-UX5KEP4J.js → context-working-set-EUXAZI6N.js} +8 -8
- package/dist/{dispatch-runner-GIJBHNFL.js → dispatch-runner-B7MTOVKL.js} +313 -53
- package/dist/{docs-6FZSCG5B.js → docs-FLJTIDSE.js} +4 -4
- package/dist/{doctor-SVJ5BZCW.js → doctor-RN4YKO2X.js} +14 -14
- package/dist/{eval-CG6LLBLD.js → eval-RUBJVSNQ.js} +8 -7
- package/dist/{evidence-ZYFIEN42.js → evidence-JZNBUOQZ.js} +30 -25
- package/dist/{evolve-QGEXEMDW.js → evolve-FJVC4KKI.js} +30 -25
- package/dist/{extensions-ADGNCJJD.js → extensions-IQL36S7K.js} +4 -4
- package/dist/{fleet-S5R4ZOQY.js → fleet-BDKYJFCP.js} +214 -360
- package/dist/fleet-commands-ZFIWZSB3.js +70 -0
- package/dist/fleet-graph-Y6HPXIVF.js +125 -0
- package/dist/fleet-new-RDVJLHHH.js +48 -0
- package/dist/fleet-validate-BIYREGIK.js +79 -0
- package/dist/{init-5DRU55YR.js → init-LQUB5COQ.js} +44 -37
- package/dist/library-NJAHIGG4.js +217 -0
- package/dist/{memory-7YKKR6UC.js → memory-OG6HOYKM.js} +31 -26
- package/dist/{models-ZPOLRU2C.js → models-5ZG5XY7J.js} +21 -20
- package/dist/{monitor-US5F5YGZ.js → monitor-TJ7AMTGB.js} +49 -30
- package/dist/{orchestrator-E2AL4T5N.js → orchestrator-WZYB54DM.js} +3827 -581
- package/dist/{paths-E7KYAQWE.js → paths-XUC7GS6E.js} +4 -4
- package/dist/{reset-KZ652EK6.js → reset-PXQT45IY.js} +7 -7
- package/dist/{run-SRNBKDWD.js → run-FQ74YF62.js} +53 -45
- package/dist/{share-CGZE33UP.js → share-FW7SVCL3.js} +33 -9
- package/dist/{skills-S2X4DLY5.js → skills-7E7IRB3R.js} +24 -8
- package/dist/{skills-eval-W2GGIC4R.js → skills-eval-LI75W6OK.js} +34 -27
- package/dist/{targets-54SWINWB.js → targets-4CIFKCTW.js} +23 -22
- package/dist/{terminal-lease-SAIF2OGY.js → terminal-lease-WUZY7ZV5.js} +4 -4
- package/dist/{uninstall-BVLWXKBT.js → uninstall-7FV7IP4E.js} +4 -4
- package/dist/{upgrade-JKAR27XC.js → upgrade-K2HVIVMQ.js} +20 -19
- package/dist/{usage-MSAWCLX4.js → usage-GTZELZQX.js} +116 -49
- package/dist/verifiers-RLAHT27O.js +336 -0
- package/dist/{verify-X5HDROLA.js → verify-BX3BRKH5.js} +7 -6
- package/dist/{wiki-generate-GUSOQ6ZP.js → wiki-generate-ASIFASCN.js} +45 -37
- package/dist/worker/entry.js +38 -35
- package/docs/README.md +3 -2
- package/docs/acp.md +1 -1
- package/docs/alcf-provider.md +1 -1
- package/docs/architecture.md +2 -2
- package/docs/artifact-versions.md +10 -6
- package/docs/built-in-agents.md +26 -2
- package/docs/capacity-and-scheduling.md +1 -1
- package/docs/commands-and-modes.md +82 -2
- package/docs/configuration-and-targets.md +79 -2
- package/docs/context-engine.md +1 -1
- package/docs/development-pipeline.md +1 -1
- package/docs/dispatch-architecture-rationale.md +1 -1
- package/docs/documentation-coverage.md +3 -3
- package/docs/documentation-guide.md +3 -3
- package/docs/eval-runner.md +1 -1
- package/docs/evals-internal.md +1 -1
- package/docs/evidence-and-memory.md +5 -5
- package/docs/evolution.md +1 -1
- package/docs/exit-codes-and-output.md +4 -1
- package/docs/extensions-and-sharing.md +6 -2
- package/docs/fleet-demo-runbook.md +2 -2
- package/docs/fleet-dispatch.md +197 -10
- package/docs/git-commit-provenance.md +2 -2
- package/docs/glossary.md +1 -1
- package/docs/installation-and-lifecycle.md +2 -2
- package/docs/middleware-and-components.md +2 -1
- package/docs/model-catalog.md +1 -1
- package/docs/observability.md +55 -8
- package/docs/proactive-memory.md +1 -1
- package/docs/prompt-envelope-and-tools.md +1 -1
- package/docs/provider-adapter-cookbook.md +1 -1
- package/docs/release-cut-checklist.md +79 -64
- package/docs/resource-library.md +59 -0
- package/docs/safety-model.md +2 -2
- package/docs/scientific-validation.md +3 -3
- package/docs/session-lifecycle.md +37 -1
- package/docs/skills-marketplace.md +16 -3
- package/docs/tool-usage.md +14 -7
- package/docs/trace-store.md +1 -1
- package/docs/troubleshooting.md +1 -1
- package/docs/tui-design.md +1 -1
- package/docs/worker-dispatch-mechanics.md +3 -3
- package/package.json +1 -1
- package/src/cli/fleet-commands.ts +37 -0
- package/src/cli/fleet-graph.ts +102 -0
- package/src/cli/fleet-new.ts +36 -0
- package/src/cli/fleet-preflight.ts +121 -0
- package/src/cli/fleet-validate.ts +30 -0
- package/src/cli/fleet.ts +173 -335
- package/src/cli/index.ts +3 -1
- package/src/cli/library.ts +190 -0
- package/src/cli/share.ts +13 -1
- package/src/cli/usage.ts +111 -19
- package/src/core/bus-events.ts +4 -0
- package/src/core/commit-attribution.ts +4 -4
- package/src/core/config.ts +130 -0
- package/src/core/defaults.ts +81 -0
- package/src/domains/agents/builtins/architect.md +1 -0
- package/src/domains/agents/builtins/oracle.md +33 -0
- package/src/domains/agents/catalog.ts +13 -1
- package/src/domains/agents/fleet-contract.ts +278 -16
- package/src/domains/agents/index.ts +14 -0
- package/src/domains/agents/result-contract.ts +235 -1
- package/src/domains/config/classify.ts +4 -0
- package/src/domains/dispatch/active-route-planner.ts +14 -0
- package/src/domains/dispatch/backoff.ts +2 -1
- package/src/domains/dispatch/capability-match.ts +1 -0
- package/src/domains/dispatch/checkout-writer-lease.ts +175 -0
- package/src/domains/dispatch/contract.ts +34 -0
- package/src/domains/dispatch/delegation-plan.ts +167 -0
- package/src/domains/dispatch/execution-plan.ts +76 -5
- package/src/domains/dispatch/execution-role.ts +3 -1
- package/src/domains/dispatch/execution-scheduler.ts +183 -67
- package/src/domains/dispatch/extension.ts +258 -9
- package/src/domains/dispatch/fleet-gate.ts +14 -0
- package/src/domains/dispatch/fleet-plan.ts +63 -3
- package/src/domains/dispatch/fleet-run.ts +737 -0
- package/src/domains/dispatch/gate-role-prompts.ts +9 -0
- package/src/domains/dispatch/host-verification.ts +178 -0
- package/src/domains/dispatch/index.ts +38 -0
- package/src/domains/dispatch/intent.ts +159 -0
- package/src/domains/dispatch/receipt-integrity.ts +8 -4
- package/src/domains/dispatch/state.ts +36 -3
- package/src/domains/dispatch/types.ts +51 -6
- package/src/domains/dispatch/validation.ts +66 -6
- package/src/domains/evidence/trust-status.ts +10 -1
- package/src/domains/middleware/index.ts +15 -0
- package/src/domains/middleware/watchdog.ts +281 -0
- package/src/domains/observability/contract.ts +3 -1
- package/src/domains/observability/cost.ts +12 -1
- package/src/domains/observability/extension.ts +2 -2
- package/src/domains/observability/index.ts +10 -0
- package/src/domains/observability/out-of-turn-usage.ts +223 -0
- package/src/domains/resources/index.ts +20 -0
- package/src/domains/resources/library.ts +326 -0
- package/src/domains/resources/skills/marketplace.ts +37 -12
- package/src/domains/session/handoff.ts +629 -0
- package/src/domains/share/archive.ts +67 -2
- package/src/entry/orchestrator.ts +37 -0
- package/src/interactive/bus-notices.ts +26 -0
- package/src/interactive/chat-loop.ts +235 -1
- package/src/interactive/chat-renderer.ts +22 -0
- package/src/interactive/cost-overlay.ts +31 -3
- package/src/interactive/council-dispatch.ts +30 -0
- package/src/interactive/council-grid.ts +213 -0
- package/src/interactive/council.ts +99 -0
- package/src/interactive/dispatch-board.ts +260 -16
- package/src/interactive/fleet-run-preview.ts +307 -0
- package/src/interactive/footer/notifications.ts +219 -0
- package/src/interactive/handoff-round.ts +56 -0
- package/src/interactive/interactive-application.ts +43 -1
- package/src/interactive/interactive-event-projection.ts +9 -1
- package/src/interactive/interactive-slash-runtime.ts +52 -2
- package/src/interactive/interactive-subscriptions.ts +14 -2
- package/src/interactive/oracle.ts +179 -0
- package/src/interactive/overlay-ask-user-lifecycle.ts +6 -0
- package/src/interactive/overlay-general-openers.ts +190 -1
- package/src/interactive/overlay-key-routing.ts +17 -1
- package/src/interactive/overlay-lifecycle.ts +41 -1
- package/src/interactive/overlay-permission-lifecycle.ts +10 -0
- package/src/interactive/overlay-resource-openers.ts +11 -3
- package/src/interactive/overlay-session-lifecycle.ts +234 -2
- package/src/interactive/overlays/fleet-run-approval.ts +208 -0
- package/src/interactive/overlays/handoff-review.ts +185 -0
- package/src/interactive/overlays/library-install-confirm.ts +151 -0
- package/src/interactive/overlays/list-overlay.ts +168 -2
- package/src/interactive/overlays/settings.ts +101 -4
- package/src/interactive/overlays/side-question.ts +139 -0
- package/src/interactive/overlays/skills-hub.ts +401 -15
- package/src/interactive/side-question.ts +171 -0
- package/src/interactive/slash-commands.ts +432 -5
- package/src/interactive/slash-spec.ts +19 -6
- package/src/interactive/theme/tokens.ts +30 -0
- package/src/interactive/turn-middleware.ts +15 -1
- package/src/interactive/watchdog-run.ts +75 -0
- package/src/interactive/worker-share.ts +56 -1
- package/src/interactive/worker-stream.ts +7 -0
- package/src/tools/bootstrap.ts +3 -0
- package/src/tools/compete-worktrees.ts +13 -79
- package/src/tools/dispatch-admission.ts +242 -8
- package/src/tools/dispatch-arguments.ts +57 -1
- package/src/tools/dispatch-plan.ts +136 -6
- package/src/tools/dispatch-runner.ts +319 -13
- package/src/tools/dispatch-types.ts +20 -1
- package/src/tools/dispatch.ts +72 -2
- package/src/tools/monitor.ts +16 -0
- package/src/tools/profiles.ts +18 -4
- package/src/tools/task-worktree.ts +238 -0
- package/src/tools/verify/authoring.ts +61 -1
- package/src/tools/verify/scripts.ts +62 -0
- package/src/tools/worker-evidence.ts +2 -1
- package/src/worker/spec-contract.ts +1 -0
- package/dist/chunk-HC4CLZ2Y.js +0 -68
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
runVectorTool
|
|
4
|
+
} from "./chunk-JNXPYBB4.js";
|
|
5
|
+
import {
|
|
6
|
+
PROJECT_VERIFIER_CATALOG_RELATIVE_PATH,
|
|
7
|
+
loadProjectVerifierCatalog,
|
|
8
|
+
packageDeclaredCheck,
|
|
9
|
+
resolveProjectVerifierExecutionCwd
|
|
10
|
+
} from "./chunk-GH5622CP.js";
|
|
11
|
+
import {
|
|
12
|
+
declaredVerificationScripts
|
|
13
|
+
} from "./chunk-UL3WSD3F.js";
|
|
14
|
+
import {
|
|
15
|
+
resolveSafeCwd
|
|
16
|
+
} from "./chunk-D4MDIG46.js";
|
|
17
|
+
import {
|
|
18
|
+
init_esm_shims
|
|
19
|
+
} from "./chunk-3R73A4XB.js";
|
|
20
|
+
|
|
21
|
+
// src/tools/verify/scripts.ts
|
|
22
|
+
init_esm_shims();
|
|
23
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
24
|
+
import path from "node:path";
|
|
25
|
+
function repositoryRelativeCwd(workspaceRoot, resolved) {
|
|
26
|
+
const relative = path.relative(workspaceRoot, resolved);
|
|
27
|
+
return relative.length === 0 ? "." : relative.split(path.sep).join("/");
|
|
28
|
+
}
|
|
29
|
+
function packageTag(id) {
|
|
30
|
+
const separator = id.search(/[:.-]/u);
|
|
31
|
+
return [separator === -1 ? id : id.slice(0, separator)];
|
|
32
|
+
}
|
|
33
|
+
function packageCheckSource(packageRoot, workspaceRoot) {
|
|
34
|
+
const packagePath = path.join(packageRoot, "package.json");
|
|
35
|
+
if (!existsSync(packagePath)) return null;
|
|
36
|
+
const pkg = parsePackageJson(packagePath);
|
|
37
|
+
if (!pkg.ok) return null;
|
|
38
|
+
const cwd = repositoryRelativeCwd(workspaceRoot, packageRoot);
|
|
39
|
+
const checks = declaredVerificationScripts(pkg.scripts).map(
|
|
40
|
+
(id) => packageDeclaredCheck(id, packagePath, cwd, packageTag(id))
|
|
41
|
+
);
|
|
42
|
+
return { kind: "package.json", path: packagePath, checks };
|
|
43
|
+
}
|
|
44
|
+
function discoverDeclaredProjectEntriesAtRoot(workspaceRoot) {
|
|
45
|
+
const entries = [];
|
|
46
|
+
const packagePath = path.join(workspaceRoot, "package.json");
|
|
47
|
+
if (existsSync(packagePath)) {
|
|
48
|
+
const pkg = parsePackageJson(packagePath);
|
|
49
|
+
if (pkg.ok) {
|
|
50
|
+
for (const name of Object.keys(pkg.scripts).sort()) {
|
|
51
|
+
if (typeof pkg.scripts[name] !== "string") continue;
|
|
52
|
+
entries.push({
|
|
53
|
+
id: name,
|
|
54
|
+
command: ["npm", "run", name],
|
|
55
|
+
path: "package.json",
|
|
56
|
+
detail: `package.json script '${name}'`,
|
|
57
|
+
kind: "package-script"
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
for (const relative of ["justfile", "Justfile"]) {
|
|
63
|
+
const filePath = path.join(workspaceRoot, relative);
|
|
64
|
+
if (!existsSync(filePath)) continue;
|
|
65
|
+
const text = readFileSync(filePath, "utf8");
|
|
66
|
+
for (const match of text.matchAll(/^([A-Za-z0-9][A-Za-z0-9_-]*)\s*(?:[^:=\n]*)?:\s*(?:#.*)?$/gmu)) {
|
|
67
|
+
const name = match[1];
|
|
68
|
+
if (name === void 0 || name.startsWith("_")) continue;
|
|
69
|
+
entries.push({
|
|
70
|
+
id: name,
|
|
71
|
+
command: ["just", name],
|
|
72
|
+
path: relative,
|
|
73
|
+
detail: `just recipe '${name}'`,
|
|
74
|
+
kind: "just-recipe"
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
const makePath = path.join(workspaceRoot, "Makefile");
|
|
80
|
+
if (existsSync(makePath)) {
|
|
81
|
+
const text = readFileSync(makePath, "utf8");
|
|
82
|
+
for (const match of text.matchAll(/^([A-Za-z0-9][A-Za-z0-9_.-]*)\s*:(?![=])[^\n]*$/gmu)) {
|
|
83
|
+
const name = match[1];
|
|
84
|
+
if (name === void 0 || name.startsWith(".")) continue;
|
|
85
|
+
entries.push({
|
|
86
|
+
id: name,
|
|
87
|
+
command: ["make", name],
|
|
88
|
+
path: "Makefile",
|
|
89
|
+
detail: `Makefile target '${name}'`,
|
|
90
|
+
kind: "make-target"
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return entries;
|
|
95
|
+
}
|
|
96
|
+
function providerCollision(sources) {
|
|
97
|
+
const seen = /* @__PURE__ */ new Map();
|
|
98
|
+
for (const source of sources) {
|
|
99
|
+
for (const check of source.checks) {
|
|
100
|
+
const prior = seen.get(check.id);
|
|
101
|
+
if (prior !== void 0) {
|
|
102
|
+
return `duplicate declared check id '${check.id}' from ${prior.source.kind} (${prior.source.path}) and ${check.source.kind} (${check.source.path})`;
|
|
103
|
+
}
|
|
104
|
+
seen.set(check.id, check);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
function discoverDeclaredChecksAtRoot(workspaceRoot, cwdArg) {
|
|
110
|
+
let packageRoot;
|
|
111
|
+
try {
|
|
112
|
+
packageRoot = resolveSafeCwd(cwdArg, workspaceRoot);
|
|
113
|
+
} catch (error) {
|
|
114
|
+
return { ok: false, reason: error instanceof Error ? error.message : String(error) };
|
|
115
|
+
}
|
|
116
|
+
const sources = [];
|
|
117
|
+
const packageSource = packageCheckSource(packageRoot, workspaceRoot);
|
|
118
|
+
if (packageSource !== null) sources.push(packageSource);
|
|
119
|
+
const projectCatalog = loadProjectVerifierCatalog(workspaceRoot);
|
|
120
|
+
if (!projectCatalog.ok) return projectCatalog;
|
|
121
|
+
if (projectCatalog.source !== null) sources.push(projectCatalog.source);
|
|
122
|
+
const collision = providerCollision(sources);
|
|
123
|
+
if (collision !== null) return { ok: false, reason: collision };
|
|
124
|
+
return { ok: true, sources };
|
|
125
|
+
}
|
|
126
|
+
function discoverDeclaredChecks(cwdArg) {
|
|
127
|
+
return discoverDeclaredChecksAtRoot(process.cwd(), cwdArg);
|
|
128
|
+
}
|
|
129
|
+
function clonedSources(sources) {
|
|
130
|
+
return sources.map((source) => ({
|
|
131
|
+
kind: source.kind,
|
|
132
|
+
path: source.path,
|
|
133
|
+
checks: source.checks.map((check) => ({
|
|
134
|
+
...check,
|
|
135
|
+
command: [...check.command],
|
|
136
|
+
tags: [...check.tags],
|
|
137
|
+
source: { ...check.source }
|
|
138
|
+
}))
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
function listChecks(cwdArg) {
|
|
142
|
+
const discovery = discoverDeclaredChecks(cwdArg);
|
|
143
|
+
if (!discovery.ok) return { kind: "error", message: `verify: ${discovery.reason}` };
|
|
144
|
+
const lines = [];
|
|
145
|
+
if (discovery.sources.length === 0 || discovery.sources.every((source) => source.checks.length === 0)) {
|
|
146
|
+
lines.push(
|
|
147
|
+
`No declared verification checks found (no package.json verification scripts or ${PROJECT_VERIFIER_CATALOG_RELATIVE_PATH} entries).`,
|
|
148
|
+
"Run `clio-coder verifiers author` to inspect declared project tooling, preview exact argv checks, and create the catalog after confirmation."
|
|
149
|
+
);
|
|
150
|
+
} else {
|
|
151
|
+
lines.push("Declared verification checks:");
|
|
152
|
+
for (const source of discovery.sources) {
|
|
153
|
+
lines.push(source.kind === "package.json" ? "package.json:" : `${PROJECT_VERIFIER_CATALOG_RELATIVE_PATH}:`);
|
|
154
|
+
for (const check of source.checks) {
|
|
155
|
+
const tags = check.tags.length > 0 ? ` [${check.tags.join(", ")}]` : "";
|
|
156
|
+
lines.push(`- ${check.id}${tags}: ${check.description}`);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
lines.push(
|
|
161
|
+
"",
|
|
162
|
+
'Run one with verify(check="<id>"). verify(check="frontend", path=<file>) validates an HTML/CSS/JS artifact.'
|
|
163
|
+
);
|
|
164
|
+
return {
|
|
165
|
+
kind: "ok",
|
|
166
|
+
output: lines.join("\n"),
|
|
167
|
+
details: { sources: clonedSources(discovery.sources) }
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function withDeclaredEvidence(result, check) {
|
|
171
|
+
return {
|
|
172
|
+
...result,
|
|
173
|
+
details: {
|
|
174
|
+
...result.details,
|
|
175
|
+
action: "verify",
|
|
176
|
+
check: check.id,
|
|
177
|
+
source: { ...check.source },
|
|
178
|
+
description: check.description,
|
|
179
|
+
declaredCommand: [...check.command],
|
|
180
|
+
declaredCwd: check.cwd,
|
|
181
|
+
declaredTimeoutMs: check.timeoutMs,
|
|
182
|
+
tags: [...check.tags]
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
async function runProjectCheck(check, options) {
|
|
187
|
+
const [file, ...vector] = check.command;
|
|
188
|
+
if (file === void 0) return { kind: "error", message: `verify: declared check '${check.id}' has empty argv` };
|
|
189
|
+
const cwd = resolveProjectVerifierExecutionCwd(check.cwd, process.cwd());
|
|
190
|
+
if (cwd instanceof Error) return { kind: "error", message: `verify: ${cwd.message}` };
|
|
191
|
+
const result = await runVectorTool("verify", file, vector, { cwd, timeout_ms: check.timeoutMs }, options);
|
|
192
|
+
return withDeclaredEvidence(result, check);
|
|
193
|
+
}
|
|
194
|
+
async function runScriptCheck(check, args, options) {
|
|
195
|
+
let cwd;
|
|
196
|
+
try {
|
|
197
|
+
cwd = resolveSafeCwd(typeof args.cwd === "string" && args.cwd.length > 0 ? args.cwd : void 0, process.cwd());
|
|
198
|
+
} catch (error) {
|
|
199
|
+
return { kind: "error", message: `verify: ${error instanceof Error ? error.message : String(error)}` };
|
|
200
|
+
}
|
|
201
|
+
const packagePath = path.join(cwd, "package.json");
|
|
202
|
+
if (!existsSync(packagePath)) return { kind: "error", message: `verify: package.json not found in ${cwd}` };
|
|
203
|
+
const pkg = parsePackageJson(packagePath);
|
|
204
|
+
if (!pkg.ok) return { kind: "error", message: `verify: ${pkg.reason}` };
|
|
205
|
+
if (!Object.hasOwn(pkg.scripts, check)) {
|
|
206
|
+
const declared = declaredVerificationScripts(pkg.scripts);
|
|
207
|
+
const list = declared.length > 0 ? declared.join(", ") : "(none)";
|
|
208
|
+
return {
|
|
209
|
+
kind: "error",
|
|
210
|
+
message: `verify: package.json has no '${check}' script. Declared verification checks: ${list}.`
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
const extraArgs = Array.isArray(args.args) ? args.args.filter((entry) => typeof entry === "string") : [];
|
|
214
|
+
const vector = ["run", check];
|
|
215
|
+
if (extraArgs.length > 0) vector.push("--", ...extraArgs);
|
|
216
|
+
return runVectorTool("verify", "npm", vector, { ...args, cwd }, options);
|
|
217
|
+
}
|
|
218
|
+
function parsePackageJson(packagePath) {
|
|
219
|
+
try {
|
|
220
|
+
const parsed = JSON.parse(readFileSync(packagePath, "utf8"));
|
|
221
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
222
|
+
return { ok: false, reason: "package.json root must be an object" };
|
|
223
|
+
}
|
|
224
|
+
const scripts = parsed.scripts;
|
|
225
|
+
if (!scripts || typeof scripts !== "object" || Array.isArray(scripts)) {
|
|
226
|
+
return { ok: false, reason: "package.json has no scripts object" };
|
|
227
|
+
}
|
|
228
|
+
return { ok: true, scripts };
|
|
229
|
+
} catch (error) {
|
|
230
|
+
return { ok: false, reason: error instanceof Error ? error.message : String(error) };
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export {
|
|
235
|
+
discoverDeclaredProjectEntriesAtRoot,
|
|
236
|
+
discoverDeclaredChecksAtRoot,
|
|
237
|
+
discoverDeclaredChecks,
|
|
238
|
+
listChecks,
|
|
239
|
+
runProjectCheck,
|
|
240
|
+
runScriptCheck
|
|
241
|
+
};
|
|
242
|
+
//# sourceMappingURL=chunk-PD3MESLB.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-UOV2BYIW.js";
|
|
8
8
|
import {
|
|
9
9
|
describeDispatchPlan
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EELBMBT6.js";
|
|
11
11
|
import {
|
|
12
12
|
RESPONSE_SCHEMA_RUNTIME_ID,
|
|
13
13
|
applyToolProfile,
|
|
@@ -18,24 +18,14 @@ import {
|
|
|
18
18
|
readMaxBytes,
|
|
19
19
|
readTool,
|
|
20
20
|
renderAgentLedger
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CEYBNUGC.js";
|
|
22
22
|
import {
|
|
23
23
|
createTaskBoardStore,
|
|
24
24
|
taskBoardCounts
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5FR74PWO.js";
|
|
26
26
|
import {
|
|
27
27
|
formatModelRejection
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import {
|
|
30
|
-
classify
|
|
31
|
-
} from "./chunk-AOCYTWAV.js";
|
|
32
|
-
import {
|
|
33
|
-
CLIO_ARTIFACT_DIR,
|
|
34
|
-
artifactDefaultPath,
|
|
35
|
-
detectValidationCommand,
|
|
36
|
-
protectArtifact,
|
|
37
|
-
protectedArtifactMutationBlockReason
|
|
38
|
-
} from "./chunk-MV3K5QF2.js";
|
|
28
|
+
} from "./chunk-OBMAI2DP.js";
|
|
39
29
|
import {
|
|
40
30
|
parseAgentLedgerBody
|
|
41
31
|
} from "./chunk-CMZWFGD2.js";
|
|
@@ -45,7 +35,7 @@ import {
|
|
|
45
35
|
import {
|
|
46
36
|
gitTool,
|
|
47
37
|
verifyToolSurface
|
|
48
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-JNXPYBB4.js";
|
|
49
39
|
import {
|
|
50
40
|
codeNavToolSurface
|
|
51
41
|
} from "./chunk-XN3L4EYL.js";
|
|
@@ -75,6 +65,16 @@ import {
|
|
|
75
65
|
autonomyDenyRejection,
|
|
76
66
|
mapAutonomy
|
|
77
67
|
} from "./chunk-HWUFFB6L.js";
|
|
68
|
+
import {
|
|
69
|
+
classify
|
|
70
|
+
} from "./chunk-AOCYTWAV.js";
|
|
71
|
+
import {
|
|
72
|
+
CLIO_ARTIFACT_DIR,
|
|
73
|
+
artifactDefaultPath,
|
|
74
|
+
detectValidationCommand,
|
|
75
|
+
protectArtifact,
|
|
76
|
+
protectedArtifactMutationBlockReason
|
|
77
|
+
} from "./chunk-MV3K5QF2.js";
|
|
78
78
|
import {
|
|
79
79
|
DEFAULT_TOOL_RESULT_MAX_BYTES,
|
|
80
80
|
OBSERVATION_POLICY_SLACK_BYTES,
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
} from "./chunk-65DEGPJ6.js";
|
|
110
110
|
import {
|
|
111
111
|
buildSafeToolEnv
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-D4MDIG46.js";
|
|
113
113
|
import {
|
|
114
114
|
GUARDRAIL_DEFAULTS,
|
|
115
115
|
isWorkerToolCallCapExceededReason,
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
} from "./chunk-BNAZZHFG.js";
|
|
129
129
|
import {
|
|
130
130
|
BusChannels
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-OB5HIGJY.js";
|
|
132
132
|
import {
|
|
133
133
|
init_esm_shims
|
|
134
134
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -5076,13 +5076,13 @@ function registerCoreTools(registry, deps = {}) {
|
|
|
5076
5076
|
});
|
|
5077
5077
|
registry.register({
|
|
5078
5078
|
...builtin(
|
|
5079
|
-
lazyTool(verifyToolSurface, async () => (await import("./verify-
|
|
5079
|
+
lazyTool(verifyToolSurface, async () => (await import("./verify-BX3BRKH5.js")).verifyTool),
|
|
5080
5080
|
{ path: "src/tools/verify/index.ts", scope: "core" }
|
|
5081
5081
|
)
|
|
5082
5082
|
});
|
|
5083
5083
|
registry.register({
|
|
5084
5084
|
...builtin(
|
|
5085
|
-
lazyTool(codeNavToolSurface, async () => (await import("./code-nav-
|
|
5085
|
+
lazyTool(codeNavToolSurface, async () => (await import("./code-nav-FGGFIE7L.js")).codeNavTool),
|
|
5086
5086
|
{ path: "src/tools/codewiki/code-nav.ts", scope: "core" }
|
|
5087
5087
|
)
|
|
5088
5088
|
});
|
|
@@ -5107,7 +5107,7 @@ function registerCoreTools(registry, deps = {}) {
|
|
|
5107
5107
|
registry.register({
|
|
5108
5108
|
...builtin(
|
|
5109
5109
|
lazyTool(contextToolSurface, async () => {
|
|
5110
|
-
const { createContextTool } = await import("./context-
|
|
5110
|
+
const { createContextTool } = await import("./context-WFPKQSM6.js");
|
|
5111
5111
|
if (!session) return createContextTool(skillToolDeps);
|
|
5112
5112
|
const { probeWorkspace } = await import("./workspace-ZJ6BFM3Q.js");
|
|
5113
5113
|
return createContextTool({
|
|
@@ -5205,4 +5205,4 @@ export {
|
|
|
5205
5205
|
assertRegisteredBuiltinTools,
|
|
5206
5206
|
createRegistry
|
|
5207
5207
|
};
|
|
5208
|
-
//# sourceMappingURL=chunk-
|
|
5208
|
+
//# sourceMappingURL=chunk-QCTRSGHQ.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
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/safety/rigor.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
import { existsSync } from "node:fs";
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
var VALIDATION_CONTRACT_FILES = [
|
|
11
|
+
path.join(".clio-coder", "validation.yaml"),
|
|
12
|
+
path.join(".clio-coder", "validation.yml"),
|
|
13
|
+
"validation.yaml",
|
|
14
|
+
"validation.yml",
|
|
15
|
+
"VALIDATION.md"
|
|
16
|
+
];
|
|
17
|
+
function resolveRigor(options) {
|
|
18
|
+
if (options.override === "high" || options.override === "normal") return options.override;
|
|
19
|
+
const cwd = options.cwd ?? process.cwd();
|
|
20
|
+
return hasValidationContract(cwd) ? "high" : "normal";
|
|
21
|
+
}
|
|
22
|
+
function parseRigorOverride(value) {
|
|
23
|
+
if (typeof value !== "string") return null;
|
|
24
|
+
const normalized = value.trim().toLowerCase();
|
|
25
|
+
if (normalized === "high") return "high";
|
|
26
|
+
if (normalized === "normal") return "normal";
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
function hasValidationContract(cwd) {
|
|
30
|
+
try {
|
|
31
|
+
return VALIDATION_CONTRACT_FILES.some((relative) => existsSync(path.join(cwd, relative)));
|
|
32
|
+
} catch {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
resolveRigor,
|
|
39
|
+
parseRigorOverride
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=chunk-RVG5JXAL.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
INTEROP_AGENT_KINDS,
|
|
4
|
+
interopAgentKind
|
|
5
|
+
} from "./chunk-IHXBNWMM.js";
|
|
2
6
|
import {
|
|
3
7
|
readSettings,
|
|
4
8
|
updateSettings
|
|
5
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UHXRNZ2J.js";
|
|
6
10
|
import {
|
|
7
11
|
runCommandVector
|
|
8
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-D4MDIG46.js";
|
|
9
13
|
import {
|
|
10
14
|
withStateFileLockSync
|
|
11
15
|
} from "./chunk-IKCO5N3L.js";
|
|
12
|
-
import {
|
|
13
|
-
INTEROP_AGENT_KINDS,
|
|
14
|
-
interopAgentKind
|
|
15
|
-
} from "./chunk-IHXBNWMM.js";
|
|
16
16
|
import {
|
|
17
17
|
require_dist
|
|
18
18
|
} from "./chunk-APJ265NV.js";
|
|
@@ -478,4 +478,4 @@ export {
|
|
|
478
478
|
detectInteropAgents,
|
|
479
479
|
InteropDomainModule
|
|
480
480
|
};
|
|
481
|
-
//# sourceMappingURL=chunk-
|
|
481
|
+
//# sourceMappingURL=chunk-SROCI7ZU.js.map
|