@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
|
@@ -1,37 +1,34 @@
|
|
|
1
1
|
import { createRequire as __clioCreateRequire } from "node:module"; const require = __clioCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
discoverDeclaredChecks,
|
|
4
|
+
listChecks,
|
|
5
|
+
runProjectCheck,
|
|
6
|
+
runScriptCheck
|
|
7
|
+
} from "./chunk-PD3MESLB.js";
|
|
2
8
|
import {
|
|
3
9
|
BROWSER_MODES,
|
|
4
10
|
maxOutputArg,
|
|
5
11
|
prepareVerifyArguments,
|
|
6
|
-
runVectorTool,
|
|
7
12
|
timeoutArg,
|
|
8
13
|
verifyToolSurface
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
PROJECT_VERIFIER_CATALOG_RELATIVE_PATH,
|
|
12
|
-
loadProjectVerifierCatalog,
|
|
13
|
-
packageDeclaredCheck,
|
|
14
|
-
resolveProjectVerifierExecutionCwd
|
|
15
|
-
} from "./chunk-FYYLNIL5.js";
|
|
16
|
-
import {
|
|
17
|
-
VERIFICATION_SCRIPT_FAMILY_HINT,
|
|
18
|
-
declaredVerificationScripts,
|
|
19
|
-
isVerificationScriptName
|
|
20
|
-
} from "./chunk-UL3WSD3F.js";
|
|
14
|
+
} from "./chunk-JNXPYBB4.js";
|
|
21
15
|
import {
|
|
22
16
|
escapeRegExp
|
|
23
17
|
} from "./chunk-VG7TBQIY.js";
|
|
24
18
|
import {
|
|
25
19
|
resolveReadPath
|
|
26
20
|
} from "./chunk-OQE5J4C6.js";
|
|
21
|
+
import {
|
|
22
|
+
VERIFICATION_SCRIPT_FAMILY_HINT,
|
|
23
|
+
isVerificationScriptName
|
|
24
|
+
} from "./chunk-UL3WSD3F.js";
|
|
27
25
|
import {
|
|
28
26
|
truncateUtf8
|
|
29
27
|
} from "./chunk-6XLNIQDB.js";
|
|
30
28
|
import {
|
|
31
29
|
combineSafeOutput,
|
|
32
|
-
resolveSafeCwd,
|
|
33
30
|
runCommandVector
|
|
34
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-D4MDIG46.js";
|
|
35
32
|
import {
|
|
36
33
|
init_esm_shims
|
|
37
34
|
} from "./chunk-3R73A4XB.js";
|
|
@@ -609,167 +606,6 @@ function lineAt(text, index) {
|
|
|
609
606
|
return line;
|
|
610
607
|
}
|
|
611
608
|
|
|
612
|
-
// src/tools/verify/scripts.ts
|
|
613
|
-
init_esm_shims();
|
|
614
|
-
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
615
|
-
import path2 from "node:path";
|
|
616
|
-
function repositoryRelativeCwd(workspaceRoot, resolved) {
|
|
617
|
-
const relative = path2.relative(workspaceRoot, resolved);
|
|
618
|
-
return relative.length === 0 ? "." : relative.split(path2.sep).join("/");
|
|
619
|
-
}
|
|
620
|
-
function packageTag(id) {
|
|
621
|
-
const separator = id.search(/[:.-]/u);
|
|
622
|
-
return [separator === -1 ? id : id.slice(0, separator)];
|
|
623
|
-
}
|
|
624
|
-
function packageCheckSource(packageRoot, workspaceRoot) {
|
|
625
|
-
const packagePath = path2.join(packageRoot, "package.json");
|
|
626
|
-
if (!existsSync2(packagePath)) return null;
|
|
627
|
-
const pkg = parsePackageJson(packagePath);
|
|
628
|
-
if (!pkg.ok) return null;
|
|
629
|
-
const cwd = repositoryRelativeCwd(workspaceRoot, packageRoot);
|
|
630
|
-
const checks = declaredVerificationScripts(pkg.scripts).map(
|
|
631
|
-
(id) => packageDeclaredCheck(id, packagePath, cwd, packageTag(id))
|
|
632
|
-
);
|
|
633
|
-
return { kind: "package.json", path: packagePath, checks };
|
|
634
|
-
}
|
|
635
|
-
function providerCollision(sources) {
|
|
636
|
-
const seen = /* @__PURE__ */ new Map();
|
|
637
|
-
for (const source of sources) {
|
|
638
|
-
for (const check of source.checks) {
|
|
639
|
-
const prior = seen.get(check.id);
|
|
640
|
-
if (prior !== void 0) {
|
|
641
|
-
return `duplicate declared check id '${check.id}' from ${prior.source.kind} (${prior.source.path}) and ${check.source.kind} (${check.source.path})`;
|
|
642
|
-
}
|
|
643
|
-
seen.set(check.id, check);
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
return null;
|
|
647
|
-
}
|
|
648
|
-
function discoverDeclaredChecksAtRoot(workspaceRoot, cwdArg) {
|
|
649
|
-
let packageRoot;
|
|
650
|
-
try {
|
|
651
|
-
packageRoot = resolveSafeCwd(cwdArg, workspaceRoot);
|
|
652
|
-
} catch (error) {
|
|
653
|
-
return { ok: false, reason: error instanceof Error ? error.message : String(error) };
|
|
654
|
-
}
|
|
655
|
-
const sources = [];
|
|
656
|
-
const packageSource = packageCheckSource(packageRoot, workspaceRoot);
|
|
657
|
-
if (packageSource !== null) sources.push(packageSource);
|
|
658
|
-
const projectCatalog = loadProjectVerifierCatalog(workspaceRoot);
|
|
659
|
-
if (!projectCatalog.ok) return projectCatalog;
|
|
660
|
-
if (projectCatalog.source !== null) sources.push(projectCatalog.source);
|
|
661
|
-
const collision = providerCollision(sources);
|
|
662
|
-
if (collision !== null) return { ok: false, reason: collision };
|
|
663
|
-
return { ok: true, sources };
|
|
664
|
-
}
|
|
665
|
-
function discoverDeclaredChecks(cwdArg) {
|
|
666
|
-
return discoverDeclaredChecksAtRoot(process.cwd(), cwdArg);
|
|
667
|
-
}
|
|
668
|
-
function clonedSources(sources) {
|
|
669
|
-
return sources.map((source) => ({
|
|
670
|
-
kind: source.kind,
|
|
671
|
-
path: source.path,
|
|
672
|
-
checks: source.checks.map((check) => ({
|
|
673
|
-
...check,
|
|
674
|
-
command: [...check.command],
|
|
675
|
-
tags: [...check.tags],
|
|
676
|
-
source: { ...check.source }
|
|
677
|
-
}))
|
|
678
|
-
}));
|
|
679
|
-
}
|
|
680
|
-
function listChecks(cwdArg) {
|
|
681
|
-
const discovery = discoverDeclaredChecks(cwdArg);
|
|
682
|
-
if (!discovery.ok) return { kind: "error", message: `verify: ${discovery.reason}` };
|
|
683
|
-
const lines = [];
|
|
684
|
-
if (discovery.sources.length === 0 || discovery.sources.every((source) => source.checks.length === 0)) {
|
|
685
|
-
lines.push(
|
|
686
|
-
`No declared verification checks found (no package.json verification scripts or ${PROJECT_VERIFIER_CATALOG_RELATIVE_PATH} entries).`,
|
|
687
|
-
"Run `clio-coder verifiers author` to inspect declared project tooling, preview exact argv checks, and create the catalog after confirmation."
|
|
688
|
-
);
|
|
689
|
-
} else {
|
|
690
|
-
lines.push("Declared verification checks:");
|
|
691
|
-
for (const source of discovery.sources) {
|
|
692
|
-
lines.push(source.kind === "package.json" ? "package.json:" : `${PROJECT_VERIFIER_CATALOG_RELATIVE_PATH}:`);
|
|
693
|
-
for (const check of source.checks) {
|
|
694
|
-
const tags = check.tags.length > 0 ? ` [${check.tags.join(", ")}]` : "";
|
|
695
|
-
lines.push(`- ${check.id}${tags}: ${check.description}`);
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
lines.push(
|
|
700
|
-
"",
|
|
701
|
-
'Run one with verify(check="<id>"). verify(check="frontend", path=<file>) validates an HTML/CSS/JS artifact.'
|
|
702
|
-
);
|
|
703
|
-
return {
|
|
704
|
-
kind: "ok",
|
|
705
|
-
output: lines.join("\n"),
|
|
706
|
-
details: { sources: clonedSources(discovery.sources) }
|
|
707
|
-
};
|
|
708
|
-
}
|
|
709
|
-
function withDeclaredEvidence(result, check) {
|
|
710
|
-
return {
|
|
711
|
-
...result,
|
|
712
|
-
details: {
|
|
713
|
-
...result.details,
|
|
714
|
-
action: "verify",
|
|
715
|
-
check: check.id,
|
|
716
|
-
source: { ...check.source },
|
|
717
|
-
description: check.description,
|
|
718
|
-
declaredCommand: [...check.command],
|
|
719
|
-
declaredCwd: check.cwd,
|
|
720
|
-
declaredTimeoutMs: check.timeoutMs,
|
|
721
|
-
tags: [...check.tags]
|
|
722
|
-
}
|
|
723
|
-
};
|
|
724
|
-
}
|
|
725
|
-
async function runProjectCheck(check, options) {
|
|
726
|
-
const [file, ...vector] = check.command;
|
|
727
|
-
if (file === void 0) return { kind: "error", message: `verify: declared check '${check.id}' has empty argv` };
|
|
728
|
-
const cwd = resolveProjectVerifierExecutionCwd(check.cwd, process.cwd());
|
|
729
|
-
if (cwd instanceof Error) return { kind: "error", message: `verify: ${cwd.message}` };
|
|
730
|
-
const result = await runVectorTool("verify", file, vector, { cwd, timeout_ms: check.timeoutMs }, options);
|
|
731
|
-
return withDeclaredEvidence(result, check);
|
|
732
|
-
}
|
|
733
|
-
async function runScriptCheck(check, args, options) {
|
|
734
|
-
let cwd;
|
|
735
|
-
try {
|
|
736
|
-
cwd = resolveSafeCwd(typeof args.cwd === "string" && args.cwd.length > 0 ? args.cwd : void 0, process.cwd());
|
|
737
|
-
} catch (error) {
|
|
738
|
-
return { kind: "error", message: `verify: ${error instanceof Error ? error.message : String(error)}` };
|
|
739
|
-
}
|
|
740
|
-
const packagePath = path2.join(cwd, "package.json");
|
|
741
|
-
if (!existsSync2(packagePath)) return { kind: "error", message: `verify: package.json not found in ${cwd}` };
|
|
742
|
-
const pkg = parsePackageJson(packagePath);
|
|
743
|
-
if (!pkg.ok) return { kind: "error", message: `verify: ${pkg.reason}` };
|
|
744
|
-
if (!Object.hasOwn(pkg.scripts, check)) {
|
|
745
|
-
const declared = declaredVerificationScripts(pkg.scripts);
|
|
746
|
-
const list = declared.length > 0 ? declared.join(", ") : "(none)";
|
|
747
|
-
return {
|
|
748
|
-
kind: "error",
|
|
749
|
-
message: `verify: package.json has no '${check}' script. Declared verification checks: ${list}.`
|
|
750
|
-
};
|
|
751
|
-
}
|
|
752
|
-
const extraArgs = Array.isArray(args.args) ? args.args.filter((entry) => typeof entry === "string") : [];
|
|
753
|
-
const vector = ["run", check];
|
|
754
|
-
if (extraArgs.length > 0) vector.push("--", ...extraArgs);
|
|
755
|
-
return runVectorTool("verify", "npm", vector, { ...args, cwd }, options);
|
|
756
|
-
}
|
|
757
|
-
function parsePackageJson(packagePath) {
|
|
758
|
-
try {
|
|
759
|
-
const parsed = JSON.parse(readFileSync2(packagePath, "utf8"));
|
|
760
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
761
|
-
return { ok: false, reason: "package.json root must be an object" };
|
|
762
|
-
}
|
|
763
|
-
const scripts = parsed.scripts;
|
|
764
|
-
if (!scripts || typeof scripts !== "object" || Array.isArray(scripts)) {
|
|
765
|
-
return { ok: false, reason: "package.json has no scripts object" };
|
|
766
|
-
}
|
|
767
|
-
return { ok: true, scripts };
|
|
768
|
-
} catch (error) {
|
|
769
|
-
return { ok: false, reason: error instanceof Error ? error.message : String(error) };
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
|
|
773
609
|
// src/tools/verify/index.ts
|
|
774
610
|
var verifyTool = {
|
|
775
611
|
...verifyToolSurface,
|
|
@@ -795,7 +631,6 @@ var verifyTool = {
|
|
|
795
631
|
};
|
|
796
632
|
|
|
797
633
|
export {
|
|
798
|
-
discoverDeclaredChecksAtRoot,
|
|
799
634
|
verifyTool
|
|
800
635
|
};
|
|
801
|
-
//# sourceMappingURL=chunk-
|
|
636
|
+
//# sourceMappingURL=chunk-UFQ3F4FW.js.map
|
|
@@ -3,9 +3,11 @@ import {
|
|
|
3
3
|
ACTIVE_AGENT_AUTOMATION_ROLES,
|
|
4
4
|
ACTIVE_ROUTING_POSTURES,
|
|
5
5
|
ACTIVE_ROUTING_ROLES,
|
|
6
|
+
COUNCIL_MEMBER_LABEL_PATTERN,
|
|
6
7
|
DEFAULT_SETTINGS,
|
|
8
|
+
THEME_NAMED_COLORS,
|
|
7
9
|
THINKING_LEVELS
|
|
8
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4DGYLA73.js";
|
|
9
11
|
import {
|
|
10
12
|
MAX_TIMER_DELAY_MS
|
|
11
13
|
} from "./chunk-FQ4SKYE4.js";
|
|
@@ -731,6 +733,30 @@ function validateMemorySettings(issues, value) {
|
|
|
731
733
|
}
|
|
732
734
|
return out;
|
|
733
735
|
}
|
|
736
|
+
function validateWatchdogSettings(issues, value) {
|
|
737
|
+
const out = cloneValue(DEFAULT_SETTINGS.watchdog);
|
|
738
|
+
if (!isPlainObject(value)) {
|
|
739
|
+
issues.add("watchdog", `expected a map, got ${describe(value)}`);
|
|
740
|
+
return out;
|
|
741
|
+
}
|
|
742
|
+
issues.unknownKeys("watchdog", value, ["enabled", "target", "cadenceToolCalls"]);
|
|
743
|
+
if ("enabled" in value) {
|
|
744
|
+
const enabled = expectBoolean(issues, "watchdog.enabled", value.enabled);
|
|
745
|
+
if (enabled !== void 0) out.enabled = enabled;
|
|
746
|
+
}
|
|
747
|
+
if ("target" in value && value.target !== null) {
|
|
748
|
+
const target = expectString(issues, "watchdog.target", value.target);
|
|
749
|
+
if (target !== void 0) {
|
|
750
|
+
if (target.trim().length === 0) issues.add("watchdog.target", "expected a non-empty target id");
|
|
751
|
+
else out.target = target.trim();
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
if ("cadenceToolCalls" in value && value.cadenceToolCalls !== null) {
|
|
755
|
+
const cadence = expectInteger(issues, "watchdog.cadenceToolCalls", value.cadenceToolCalls, { min: 1 });
|
|
756
|
+
if (cadence !== void 0) out.cadenceToolCalls = cadence;
|
|
757
|
+
}
|
|
758
|
+
return out;
|
|
759
|
+
}
|
|
734
760
|
function validateKeybindings(issues, value) {
|
|
735
761
|
if (!isPlainObject(value)) {
|
|
736
762
|
issues.add("keybindings", `expected a map, got ${describe(value)}`);
|
|
@@ -769,6 +795,7 @@ var TOP_LEVEL_KEYS = [
|
|
|
769
795
|
"orchestrator",
|
|
770
796
|
"background",
|
|
771
797
|
"memory",
|
|
798
|
+
"watchdog",
|
|
772
799
|
"workers",
|
|
773
800
|
"fleet",
|
|
774
801
|
"routing",
|
|
@@ -779,6 +806,7 @@ var TOP_LEVEL_KEYS = [
|
|
|
779
806
|
"theme",
|
|
780
807
|
"terminal",
|
|
781
808
|
"skills",
|
|
809
|
+
"library",
|
|
782
810
|
"attribution",
|
|
783
811
|
"delegation",
|
|
784
812
|
"keybindings",
|
|
@@ -825,6 +853,25 @@ function validateSettings(raw) {
|
|
|
825
853
|
const v = expectStringArray(issues, "runtimePlugins", raw.runtimePlugins);
|
|
826
854
|
if (v !== void 0) settings.runtimePlugins = v;
|
|
827
855
|
}
|
|
856
|
+
if ("library" in raw) {
|
|
857
|
+
if (!isPlainObject(raw.library)) {
|
|
858
|
+
issues.add("library", `expected a map, got ${describe(raw.library)}`);
|
|
859
|
+
} else {
|
|
860
|
+
issues.unknownKeys("library", raw.library, ["catalog", "remote", "confirmedRemote", "sync"]);
|
|
861
|
+
for (const key of ["catalog", "remote", "confirmedRemote"]) {
|
|
862
|
+
const value = raw.library[key];
|
|
863
|
+
if (value === void 0) continue;
|
|
864
|
+
if (value !== null && typeof value !== "string")
|
|
865
|
+
issues.add(`library.${key}`, `expected a string or null, got ${describe(value)}`);
|
|
866
|
+
else settings.library[key] = value;
|
|
867
|
+
}
|
|
868
|
+
if (raw.library.sync !== void 0) {
|
|
869
|
+
if (typeof raw.library.sync !== "boolean")
|
|
870
|
+
issues.add("library.sync", `expected a boolean, got ${describe(raw.library.sync)}`);
|
|
871
|
+
else settings.library.sync = raw.library.sync;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
828
875
|
if ("orchestrator" in raw) {
|
|
829
876
|
settings.orchestrator = validateWorkerTarget(
|
|
830
877
|
issues,
|
|
@@ -844,6 +891,7 @@ function validateSettings(raw) {
|
|
|
844
891
|
);
|
|
845
892
|
}
|
|
846
893
|
if ("memory" in raw) settings.memory = validateMemorySettings(issues, raw.memory);
|
|
894
|
+
if ("watchdog" in raw) settings.watchdog = validateWatchdogSettings(issues, raw.watchdog);
|
|
847
895
|
if ("fleet" in raw) {
|
|
848
896
|
settings.fleet = validateFleet(issues, raw.fleet);
|
|
849
897
|
}
|
|
@@ -935,6 +983,7 @@ function validateSettings(raw) {
|
|
|
935
983
|
issues.unknownKeys("workers", raw.workers, [
|
|
936
984
|
"default",
|
|
937
985
|
"profiles",
|
|
986
|
+
"rosters",
|
|
938
987
|
"agentBindings",
|
|
939
988
|
"maxRetries",
|
|
940
989
|
"onPermission",
|
|
@@ -976,6 +1025,70 @@ function validateSettings(raw) {
|
|
|
976
1025
|
settings.workers.profiles = profiles;
|
|
977
1026
|
}
|
|
978
1027
|
}
|
|
1028
|
+
if ("rosters" in raw.workers) {
|
|
1029
|
+
if (!isPlainObject(raw.workers.rosters)) {
|
|
1030
|
+
issues.add("workers.rosters", `expected a map, got ${describe(raw.workers.rosters)}`);
|
|
1031
|
+
} else {
|
|
1032
|
+
const rosters = {};
|
|
1033
|
+
for (const [rawName, rawRoster] of Object.entries(raw.workers.rosters)) {
|
|
1034
|
+
const name = rawName.trim();
|
|
1035
|
+
const path = `workers.rosters.${name}`;
|
|
1036
|
+
if (!name) {
|
|
1037
|
+
issues.add("workers.rosters", "empty roster name");
|
|
1038
|
+
continue;
|
|
1039
|
+
}
|
|
1040
|
+
if (!isPlainObject(rawRoster)) {
|
|
1041
|
+
issues.add(path, `expected a map, got ${describe(rawRoster)}`);
|
|
1042
|
+
continue;
|
|
1043
|
+
}
|
|
1044
|
+
issues.unknownKeys(path, rawRoster, ["members"]);
|
|
1045
|
+
if (!Array.isArray(rawRoster.members)) {
|
|
1046
|
+
issues.add(`${path}.members`, "expected a list");
|
|
1047
|
+
continue;
|
|
1048
|
+
}
|
|
1049
|
+
if (rawRoster.members.length < 2 || rawRoster.members.length > 5) {
|
|
1050
|
+
issues.add(`${path}.members`, "expected 2 to 5 members");
|
|
1051
|
+
}
|
|
1052
|
+
const members = [];
|
|
1053
|
+
const labels = /* @__PURE__ */ new Set();
|
|
1054
|
+
for (const [index, rawMember] of rawRoster.members.entries()) {
|
|
1055
|
+
const memberPath = `${path}.members[${index}]`;
|
|
1056
|
+
if (!isPlainObject(rawMember)) {
|
|
1057
|
+
issues.add(memberPath, `expected a map, got ${describe(rawMember)}`);
|
|
1058
|
+
continue;
|
|
1059
|
+
}
|
|
1060
|
+
issues.unknownKeys(memberPath, rawMember, ["label", "target", "model", "thinking", "color"]);
|
|
1061
|
+
const label = expectString(issues, `${memberPath}.label`, rawMember.label);
|
|
1062
|
+
const target = expectString(issues, `${memberPath}.target`, rawMember.target);
|
|
1063
|
+
if (label !== void 0 && !COUNCIL_MEMBER_LABEL_PATTERN.test(label)) {
|
|
1064
|
+
issues.add(`${memberPath}.label`, "expected [a-z][a-z0-9_-]{0,31}");
|
|
1065
|
+
}
|
|
1066
|
+
if (label !== void 0 && labels.has(label)) issues.add(`${memberPath}.label`, "duplicate label");
|
|
1067
|
+
if (label !== void 0) labels.add(label);
|
|
1068
|
+
if (target !== void 0 && !settings.targets.some((entry) => entry.id === target)) {
|
|
1069
|
+
issues.add(`${memberPath}.target`, `unknown target '${target}'`);
|
|
1070
|
+
}
|
|
1071
|
+
const model = rawMember.model === void 0 ? void 0 : expectString(issues, `${memberPath}.model`, rawMember.model);
|
|
1072
|
+
const thinking = rawMember.thinking === void 0 ? void 0 : expectEnum(issues, `${memberPath}.thinking`, rawMember.thinking, THINKING_LEVELS);
|
|
1073
|
+
const color = rawMember.color === void 0 ? void 0 : expectString(issues, `${memberPath}.color`, rawMember.color);
|
|
1074
|
+
if (color !== void 0 && !THEME_NAMED_COLORS.includes(color) && !/^#[0-9a-fA-F]{6}$/u.test(color)) {
|
|
1075
|
+
issues.add(`${memberPath}.color`, "expected a theme named color or 6-digit hex color");
|
|
1076
|
+
}
|
|
1077
|
+
if (label === void 0 || target === void 0) continue;
|
|
1078
|
+
members.push({
|
|
1079
|
+
label,
|
|
1080
|
+
target,
|
|
1081
|
+
...model ? { model } : {},
|
|
1082
|
+
...thinking ? { thinking } : {},
|
|
1083
|
+
...color ? { color } : {}
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
if (rawRoster.members.length >= 2 && rawRoster.members.length <= 5 && members.length === rawRoster.members.length)
|
|
1087
|
+
rosters[name] = { members };
|
|
1088
|
+
}
|
|
1089
|
+
settings.workers.rosters = rosters;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
979
1092
|
if ("agentBindings" in raw.workers) {
|
|
980
1093
|
if (!isPlainObject(raw.workers.agentBindings)) {
|
|
981
1094
|
issues.add("workers.agentBindings", `expected a map, got ${describe(raw.workers.agentBindings)}`);
|
|
@@ -1100,7 +1213,8 @@ function validateSettings(raw) {
|
|
|
1100
1213
|
"outputVerbosity",
|
|
1101
1214
|
"tuiMode",
|
|
1102
1215
|
"fullscreenScrollbar",
|
|
1103
|
-
"smoothStreaming"
|
|
1216
|
+
"smoothStreaming",
|
|
1217
|
+
"notify"
|
|
1104
1218
|
]);
|
|
1105
1219
|
if ("showTerminalProgress" in raw.terminal) {
|
|
1106
1220
|
const v = expectBoolean(issues, "terminal.showTerminalProgress", raw.terminal.showTerminalProgress);
|
|
@@ -1126,6 +1240,10 @@ function validateSettings(raw) {
|
|
|
1126
1240
|
if (v === "off" || v === "auto" || v === "on") settings.terminal.smoothStreaming = v;
|
|
1127
1241
|
else if (v !== void 0) issues.add("terminal.smoothStreaming", "expected off, auto, or on");
|
|
1128
1242
|
}
|
|
1243
|
+
if ("notify" in raw.terminal) {
|
|
1244
|
+
const v = expectBoolean(issues, "terminal.notify", raw.terminal.notify);
|
|
1245
|
+
if (v !== void 0) settings.terminal.notify = v;
|
|
1246
|
+
}
|
|
1129
1247
|
}
|
|
1130
1248
|
}
|
|
1131
1249
|
if ("skills" in raw) {
|
|
@@ -1443,4 +1561,4 @@ export {
|
|
|
1443
1561
|
removeFleetProfileFromSettings,
|
|
1444
1562
|
bindAgentProfileInSettings
|
|
1445
1563
|
};
|
|
1446
|
-
//# sourceMappingURL=chunk-
|
|
1564
|
+
//# sourceMappingURL=chunk-UHXRNZ2J.js.map
|
|
@@ -0,0 +1,103 @@
|
|
|
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/dispatch/execution-role.ts
|
|
7
|
+
init_esm_shims();
|
|
8
|
+
var EXECUTION_ROLES = [
|
|
9
|
+
"builder",
|
|
10
|
+
"reviewer",
|
|
11
|
+
"judge",
|
|
12
|
+
"researcher",
|
|
13
|
+
"verifier",
|
|
14
|
+
"recovery"
|
|
15
|
+
];
|
|
16
|
+
function isExecutionRole(value) {
|
|
17
|
+
return typeof value === "string" && EXECUTION_ROLES.includes(value);
|
|
18
|
+
}
|
|
19
|
+
function deriveExecutionRole(input) {
|
|
20
|
+
if (input.attempt > 0) return "recovery";
|
|
21
|
+
if (input.gateRole === "reviewer") return "reviewer";
|
|
22
|
+
if (input.gateRole === "judge") return "judge";
|
|
23
|
+
if (input.gateRole === "synthesis") return "judge";
|
|
24
|
+
if (input.gateRole === "member") return "researcher";
|
|
25
|
+
if (input.gateRole === "builder" || input.gateRole === "candidate") return "builder";
|
|
26
|
+
if (input.resultContractKind === "verifier-report") return "verifier";
|
|
27
|
+
if (input.capabilityClass === "read-only") return "researcher";
|
|
28
|
+
return "builder";
|
|
29
|
+
}
|
|
30
|
+
function agentRoleFactsResolver(getSpec) {
|
|
31
|
+
return (agentId) => {
|
|
32
|
+
const spec = getSpec(agentId);
|
|
33
|
+
return spec === null ? null : { capabilityClass: spec.capabilityClass, resultContractKind: spec.resultContract.kind };
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function requestExecutionRole(input) {
|
|
37
|
+
const facts = input.resolveFacts?.(input.agentId) ?? null;
|
|
38
|
+
return deriveExecutionRole({
|
|
39
|
+
attempt: 0,
|
|
40
|
+
...input.gateRole !== void 0 ? { gateRole: input.gateRole } : {},
|
|
41
|
+
capabilityClass: facts?.capabilityClass ?? "workspace-edit",
|
|
42
|
+
resultContractKind: facts?.resultContractKind ?? null
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function withAttemptRole(requestRole, attempt) {
|
|
46
|
+
return attempt > 0 ? "recovery" : requestRole;
|
|
47
|
+
}
|
|
48
|
+
var DEFAULT_GATE_DECIDER_AGENT_ID = "verifier";
|
|
49
|
+
function gateDeciderAgentId(requested) {
|
|
50
|
+
const trimmed = requested?.trim() ?? "";
|
|
51
|
+
return trimmed.length > 0 ? trimmed : DEFAULT_GATE_DECIDER_AGENT_ID;
|
|
52
|
+
}
|
|
53
|
+
function appliesRecipeResultContract(gateRole) {
|
|
54
|
+
return gateRole !== "reviewer" && gateRole !== "judge";
|
|
55
|
+
}
|
|
56
|
+
function routeCorrelationFactsForRun(run) {
|
|
57
|
+
return {
|
|
58
|
+
agentId: run.agentId,
|
|
59
|
+
targetId: run.targetId,
|
|
60
|
+
wireModelId: run.wireModelId,
|
|
61
|
+
runtimeId: run.runtimeId,
|
|
62
|
+
nodeId: run.node?.id ?? "local"
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function modelFamily(model) {
|
|
66
|
+
return model.trim().toLowerCase().replace(/[-_:]?\d{4}[-_]?\d{2}[-_]?\d{2}$/u, "");
|
|
67
|
+
}
|
|
68
|
+
function gateRouteCorrelation(subject, decider) {
|
|
69
|
+
const agent = subject.agentId === decider.agentId;
|
|
70
|
+
const target = subject.targetId === decider.targetId;
|
|
71
|
+
const sameModelFamily = modelFamily(subject.wireModelId) === modelFamily(decider.wireModelId);
|
|
72
|
+
const runtime = subject.runtimeId === decider.runtimeId;
|
|
73
|
+
const node = subject.nodeId === decider.nodeId;
|
|
74
|
+
const dimensions = [
|
|
75
|
+
...agent ? ["agent"] : [],
|
|
76
|
+
...target ? ["target"] : [],
|
|
77
|
+
...sameModelFamily ? ["model-family"] : [],
|
|
78
|
+
...runtime ? ["runtime"] : [],
|
|
79
|
+
...node ? ["node"] : []
|
|
80
|
+
].sort();
|
|
81
|
+
return {
|
|
82
|
+
agent,
|
|
83
|
+
target,
|
|
84
|
+
modelFamily: sameModelFamily,
|
|
85
|
+
runtime,
|
|
86
|
+
node,
|
|
87
|
+
independent: !agent && !sameModelFamily,
|
|
88
|
+
dimensions
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export {
|
|
93
|
+
isExecutionRole,
|
|
94
|
+
deriveExecutionRole,
|
|
95
|
+
agentRoleFactsResolver,
|
|
96
|
+
requestExecutionRole,
|
|
97
|
+
withAttemptRole,
|
|
98
|
+
gateDeciderAgentId,
|
|
99
|
+
appliesRecipeResultContract,
|
|
100
|
+
routeCorrelationFactsForRun,
|
|
101
|
+
gateRouteCorrelation
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=chunk-UND3GU2L.js.map
|