nexus-agents 8.8.0 → 8.8.2
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/dist/{ast-rule-runner-IESI3WWR.js → ast-rule-runner-WANOR3MX.js} +5 -5
- package/dist/{child-mcp-config-WQNW5YFO.js → child-mcp-config-N4HLLCEH.js} +5 -5
- package/dist/{chunk-TQT2BIZ7.js → chunk-276GRITW.js} +4 -4
- package/dist/{chunk-DEXENQXS.js → chunk-3CLKYFE3.js} +74 -7
- package/dist/chunk-3CLKYFE3.js.map +1 -0
- package/dist/{chunk-YUMKCIEL.js → chunk-3XQK4MEF.js} +2 -2
- package/dist/{chunk-6AGNJBHE.js → chunk-3YKFLM2B.js} +2 -2
- package/dist/{chunk-4HZCKQ25.js → chunk-64VMTY3M.js} +2 -2
- package/dist/{chunk-DY6DVTX2.js → chunk-6HETGJSB.js} +3 -3
- package/dist/{chunk-ODBLHHTP.js → chunk-6URMW3DB.js} +2 -2
- package/dist/{chunk-BNPXE7BD.js → chunk-7AU5WLAJ.js} +2 -2
- package/dist/{chunk-66GKBIY2.js → chunk-7J7UYJXC.js} +7 -7
- package/dist/{chunk-BIHRU7WA.js → chunk-7QQ5F7T5.js} +9 -9
- package/dist/{chunk-ITCKXMOH.js → chunk-7WJGV5DN.js} +2 -2
- package/dist/{chunk-ZN6BTFLD.js → chunk-AOS7F4QR.js} +2 -2
- package/dist/{chunk-7BYI5CBK.js → chunk-CQCVEC7P.js} +124 -111
- package/dist/{chunk-7BYI5CBK.js.map → chunk-CQCVEC7P.js.map} +1 -1
- package/dist/{chunk-4HXPNLZS.js → chunk-DKHBIJO4.js} +2 -2
- package/dist/{chunk-37ONEK7R.js → chunk-EALWAQAQ.js} +12 -12
- package/dist/chunk-EALWAQAQ.js.map +1 -0
- package/dist/{chunk-HEV2C6VS.js → chunk-ERL3XHQO.js} +6 -6
- package/dist/{chunk-OLR2RIN2.js → chunk-F2GERNMF.js} +2 -2
- package/dist/{chunk-7BNB4YVO.js → chunk-FBWOWMEB.js} +3 -3
- package/dist/{chunk-W5VBFX65.js → chunk-FKKVZRSY.js} +2 -2
- package/dist/{chunk-3SO5DMHS.js → chunk-GXLI2E4U.js} +4 -4
- package/dist/chunk-H5DTHO7O.js +7 -0
- package/dist/{chunk-RWZJ2D2N.js → chunk-II5NJRKH.js} +2 -2
- package/dist/{chunk-MM223CVS.js → chunk-J7QCZRVK.js} +6 -1
- package/dist/{chunk-MM223CVS.js.map → chunk-J7QCZRVK.js.map} +1 -1
- package/dist/{chunk-F26X4N73.js → chunk-K2PVLCHR.js} +2 -2
- package/dist/{chunk-DZ5V47RU.js → chunk-MXQG3A5W.js} +6 -6
- package/dist/{chunk-4AE2QO7Q.js → chunk-N347WXTT.js} +2 -2
- package/dist/{chunk-CRKF5LUZ.js → chunk-NR62IQDC.js} +6 -6
- package/dist/{chunk-REY2B5LO.js → chunk-Q5V3KTUL.js} +2 -2
- package/dist/{chunk-NSHGFRGF.js → chunk-QCSXKQTK.js} +2 -2
- package/dist/{chunk-HQ6K7OYH.js → chunk-QY3HOLGD.js} +10 -10
- package/dist/{chunk-SNEUKIBK.js → chunk-SNSPYZQT.js} +5 -5
- package/dist/{chunk-36AR3GCF.js → chunk-SQCFKQUR.js} +56 -23
- package/dist/{chunk-36AR3GCF.js.map → chunk-SQCFKQUR.js.map} +1 -1
- package/dist/{chunk-GUOMNRXZ.js → chunk-TZWJ7QLW.js} +2 -2
- package/dist/{chunk-PX422NHD.js → chunk-VADACTVB.js} +2 -2
- package/dist/{chunk-ZQD67JES.js → chunk-W6SM3MU5.js} +4 -4
- package/dist/{chunk-W37HHXDL.js → chunk-WXU4Y5T3.js} +2 -2
- package/dist/{chunk-OPHI2RB6.js → chunk-YQUM3UWK.js} +5 -5
- package/dist/{chunk-BBMGN7FS.js → chunk-ZGHJMFQ6.js} +3 -3
- package/dist/{cli-circuit-breaker-YAAGSJ5N.js → cli-circuit-breaker-AAHYLFXZ.js} +5 -5
- package/dist/cli.js +47 -47
- package/dist/{composite-router-TU6MVJBG.js → composite-router-VAVDLJGT.js} +4 -4
- package/dist/{consensus-vote-FJWLHMQL.js → consensus-vote-L4CN33XE.js} +21 -21
- package/dist/{context-retriever-A4BZMTWM.js → context-retriever-MYKBBDAN.js} +11 -11
- package/dist/doctor-deep-AKOPPCXB.js +13 -0
- package/dist/{doctor-live-G3EO5LQD.js → doctor-live-3PVIYQST.js} +12 -12
- package/dist/{expert-bridge-IKY5TTAH.js → expert-bridge-G3KN7QWL.js} +6 -6
- package/dist/factory-KVMLFEWJ.js +15 -0
- package/dist/factory-ROTP63IZ.js +25 -0
- package/dist/{improvement-review-JNHEZ2DJ.js → improvement-review-WTZ4JV5V.js} +8 -8
- package/dist/index.d.ts +49 -0
- package/dist/index.js +36 -36
- package/dist/{init-opencode-KENOM2HA.js → init-opencode-C63LASGX.js} +8 -8
- package/dist/issue-triage-PIE3YVCV.js +17 -0
- package/dist/{learning-persistence-7N5SZHNX.js → learning-persistence-JK2FELZL.js} +3 -3
- package/dist/{pr-reviewer-helpers-C72VNWXU.js → pr-reviewer-helpers-4VDGMGV5.js} +6 -6
- package/dist/{registry-command-53E7LRNR.js → registry-command-IRDP2L2R.js} +4 -4
- package/dist/{repo-security-plan-ZSXHLYMU.js → repo-security-plan-NS47HQEF.js} +5 -5
- package/dist/research-helpers-synthesize-5NBL637T.js +14 -0
- package/dist/{routing-memory-5RYZJE45.js → routing-memory-2IELT5GT.js} +4 -4
- package/dist/{session-memory-3GE74TXJ.js → session-memory-CH3CVLIT.js} +5 -5
- package/dist/setup-config-MKZZDUJP.js +11 -0
- package/dist/{setup-custom-api-5ZZQJ5WX.js → setup-custom-api-2I52S7XU.js} +6 -6
- package/dist/setup-data-dir-NU3YBIZB.js +29 -0
- package/dist/{tool-memory-ZW2J3PMR.js → tool-memory-STS3DWOK.js} +8 -8
- package/dist/{tool-memory-registry-adapters-PCOYMYRF.js → tool-memory-registry-adapters-MZ5CSCYW.js} +3 -3
- package/dist/unified-registry-NJS4ZWC3.js +26 -0
- package/dist/{weather-report-OQ2UA3DZ.js → weather-report-YG4T4Q23.js} +4 -4
- package/package.json +1 -1
- package/dist/chunk-37ONEK7R.js.map +0 -1
- package/dist/chunk-DEXENQXS.js.map +0 -1
- package/dist/chunk-SAKV5TSH.js +0 -7
- package/dist/doctor-deep-N4IFVZLP.js +0 -13
- package/dist/factory-EJ2ZMEQ7.js +0 -15
- package/dist/factory-VGRG7M62.js +0 -25
- package/dist/issue-triage-IWMHDNUY.js +0 -17
- package/dist/research-helpers-synthesize-X4O3S4SH.js +0 -14
- package/dist/setup-config-YGTQJTTC.js +0 -11
- package/dist/setup-data-dir-NKG6L7FO.js +0 -29
- package/dist/unified-registry-IH3UEZLZ.js +0 -26
- /package/dist/{ast-rule-runner-IESI3WWR.js.map → ast-rule-runner-WANOR3MX.js.map} +0 -0
- /package/dist/{child-mcp-config-WQNW5YFO.js.map → child-mcp-config-N4HLLCEH.js.map} +0 -0
- /package/dist/{chunk-TQT2BIZ7.js.map → chunk-276GRITW.js.map} +0 -0
- /package/dist/{chunk-YUMKCIEL.js.map → chunk-3XQK4MEF.js.map} +0 -0
- /package/dist/{chunk-6AGNJBHE.js.map → chunk-3YKFLM2B.js.map} +0 -0
- /package/dist/{chunk-4HZCKQ25.js.map → chunk-64VMTY3M.js.map} +0 -0
- /package/dist/{chunk-DY6DVTX2.js.map → chunk-6HETGJSB.js.map} +0 -0
- /package/dist/{chunk-ODBLHHTP.js.map → chunk-6URMW3DB.js.map} +0 -0
- /package/dist/{chunk-BNPXE7BD.js.map → chunk-7AU5WLAJ.js.map} +0 -0
- /package/dist/{chunk-66GKBIY2.js.map → chunk-7J7UYJXC.js.map} +0 -0
- /package/dist/{chunk-BIHRU7WA.js.map → chunk-7QQ5F7T5.js.map} +0 -0
- /package/dist/{chunk-ITCKXMOH.js.map → chunk-7WJGV5DN.js.map} +0 -0
- /package/dist/{chunk-ZN6BTFLD.js.map → chunk-AOS7F4QR.js.map} +0 -0
- /package/dist/{chunk-4HXPNLZS.js.map → chunk-DKHBIJO4.js.map} +0 -0
- /package/dist/{chunk-HEV2C6VS.js.map → chunk-ERL3XHQO.js.map} +0 -0
- /package/dist/{chunk-OLR2RIN2.js.map → chunk-F2GERNMF.js.map} +0 -0
- /package/dist/{chunk-7BNB4YVO.js.map → chunk-FBWOWMEB.js.map} +0 -0
- /package/dist/{chunk-W5VBFX65.js.map → chunk-FKKVZRSY.js.map} +0 -0
- /package/dist/{chunk-3SO5DMHS.js.map → chunk-GXLI2E4U.js.map} +0 -0
- /package/dist/{chunk-SAKV5TSH.js.map → chunk-H5DTHO7O.js.map} +0 -0
- /package/dist/{chunk-RWZJ2D2N.js.map → chunk-II5NJRKH.js.map} +0 -0
- /package/dist/{chunk-F26X4N73.js.map → chunk-K2PVLCHR.js.map} +0 -0
- /package/dist/{chunk-DZ5V47RU.js.map → chunk-MXQG3A5W.js.map} +0 -0
- /package/dist/{chunk-4AE2QO7Q.js.map → chunk-N347WXTT.js.map} +0 -0
- /package/dist/{chunk-CRKF5LUZ.js.map → chunk-NR62IQDC.js.map} +0 -0
- /package/dist/{chunk-REY2B5LO.js.map → chunk-Q5V3KTUL.js.map} +0 -0
- /package/dist/{chunk-NSHGFRGF.js.map → chunk-QCSXKQTK.js.map} +0 -0
- /package/dist/{chunk-HQ6K7OYH.js.map → chunk-QY3HOLGD.js.map} +0 -0
- /package/dist/{chunk-SNEUKIBK.js.map → chunk-SNSPYZQT.js.map} +0 -0
- /package/dist/{chunk-GUOMNRXZ.js.map → chunk-TZWJ7QLW.js.map} +0 -0
- /package/dist/{chunk-PX422NHD.js.map → chunk-VADACTVB.js.map} +0 -0
- /package/dist/{chunk-ZQD67JES.js.map → chunk-W6SM3MU5.js.map} +0 -0
- /package/dist/{chunk-W37HHXDL.js.map → chunk-WXU4Y5T3.js.map} +0 -0
- /package/dist/{chunk-OPHI2RB6.js.map → chunk-YQUM3UWK.js.map} +0 -0
- /package/dist/{chunk-BBMGN7FS.js.map → chunk-ZGHJMFQ6.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-YAAGSJ5N.js.map → cli-circuit-breaker-AAHYLFXZ.js.map} +0 -0
- /package/dist/{composite-router-TU6MVJBG.js.map → composite-router-VAVDLJGT.js.map} +0 -0
- /package/dist/{consensus-vote-FJWLHMQL.js.map → consensus-vote-L4CN33XE.js.map} +0 -0
- /package/dist/{context-retriever-A4BZMTWM.js.map → context-retriever-MYKBBDAN.js.map} +0 -0
- /package/dist/{doctor-deep-N4IFVZLP.js.map → doctor-deep-AKOPPCXB.js.map} +0 -0
- /package/dist/{doctor-live-G3EO5LQD.js.map → doctor-live-3PVIYQST.js.map} +0 -0
- /package/dist/{expert-bridge-IKY5TTAH.js.map → expert-bridge-G3KN7QWL.js.map} +0 -0
- /package/dist/{factory-EJ2ZMEQ7.js.map → factory-KVMLFEWJ.js.map} +0 -0
- /package/dist/{factory-VGRG7M62.js.map → factory-ROTP63IZ.js.map} +0 -0
- /package/dist/{improvement-review-JNHEZ2DJ.js.map → improvement-review-WTZ4JV5V.js.map} +0 -0
- /package/dist/{init-opencode-KENOM2HA.js.map → init-opencode-C63LASGX.js.map} +0 -0
- /package/dist/{issue-triage-IWMHDNUY.js.map → issue-triage-PIE3YVCV.js.map} +0 -0
- /package/dist/{learning-persistence-7N5SZHNX.js.map → learning-persistence-JK2FELZL.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-C72VNWXU.js.map → pr-reviewer-helpers-4VDGMGV5.js.map} +0 -0
- /package/dist/{registry-command-53E7LRNR.js.map → registry-command-IRDP2L2R.js.map} +0 -0
- /package/dist/{repo-security-plan-ZSXHLYMU.js.map → repo-security-plan-NS47HQEF.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-X4O3S4SH.js.map → research-helpers-synthesize-5NBL637T.js.map} +0 -0
- /package/dist/{routing-memory-5RYZJE45.js.map → routing-memory-2IELT5GT.js.map} +0 -0
- /package/dist/{session-memory-3GE74TXJ.js.map → session-memory-CH3CVLIT.js.map} +0 -0
- /package/dist/{setup-config-YGTQJTTC.js.map → setup-config-MKZZDUJP.js.map} +0 -0
- /package/dist/{setup-custom-api-5ZZQJ5WX.js.map → setup-custom-api-2I52S7XU.js.map} +0 -0
- /package/dist/{setup-data-dir-NKG6L7FO.js.map → setup-data-dir-NU3YBIZB.js.map} +0 -0
- /package/dist/{tool-memory-ZW2J3PMR.js.map → tool-memory-STS3DWOK.js.map} +0 -0
- /package/dist/{tool-memory-registry-adapters-PCOYMYRF.js.map → tool-memory-registry-adapters-MZ5CSCYW.js.map} +0 -0
- /package/dist/{unified-registry-IH3UEZLZ.js.map → unified-registry-NJS4ZWC3.js.map} +0 -0
- /package/dist/{weather-report-OQ2UA3DZ.js.map → weather-report-YG4T4Q23.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
computeCostDetail,
|
|
3
3
|
priceBasisOf
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6HETGJSB.js";
|
|
5
5
|
import {
|
|
6
6
|
allOf
|
|
7
7
|
} from "./chunk-OQB3XC5O.js";
|
|
@@ -23,22 +23,25 @@ import {
|
|
|
23
23
|
toolSuccessStructured,
|
|
24
24
|
withProgressHeartbeat,
|
|
25
25
|
wrapToolWithTimeout
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-YQUM3UWK.js";
|
|
27
|
+
import {
|
|
28
|
+
VERSION
|
|
29
|
+
} from "./chunk-H5DTHO7O.js";
|
|
27
30
|
import {
|
|
28
31
|
assessPanelIndependence,
|
|
29
32
|
countDistinctModels,
|
|
30
33
|
createEvent,
|
|
31
34
|
getGlobalRegistry
|
|
32
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-276GRITW.js";
|
|
33
36
|
import {
|
|
34
37
|
getToolMemory
|
|
35
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-NR62IQDC.js";
|
|
36
39
|
import {
|
|
37
40
|
authRemediation,
|
|
38
41
|
delay,
|
|
39
42
|
getAvailableClis,
|
|
40
43
|
withTimeout
|
|
41
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-7QQ5F7T5.js";
|
|
42
45
|
import {
|
|
43
46
|
AgentError,
|
|
44
47
|
CLI_NAMES,
|
|
@@ -67,16 +70,16 @@ import {
|
|
|
67
70
|
registerPersistentOutcomeStoreFactory,
|
|
68
71
|
resolveClassGuardMs,
|
|
69
72
|
resolveVoteTimeout
|
|
70
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-ERL3XHQO.js";
|
|
71
74
|
import {
|
|
72
75
|
ensureLearningDir,
|
|
73
76
|
getOutcomesFile
|
|
74
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-7WJGV5DN.js";
|
|
75
78
|
import {
|
|
76
79
|
getNexusDataDir,
|
|
77
80
|
nexusDataPath,
|
|
78
81
|
nexusDataPathEnsure
|
|
79
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-J7QCZRVK.js";
|
|
80
83
|
|
|
81
84
|
// src/mcp/tools/consensus-vote.ts
|
|
82
85
|
import { z as z10 } from "zod";
|
|
@@ -5627,8 +5630,33 @@ var JobResultSchema = z8.object({
|
|
|
5627
5630
|
* "cancellation can reach this tool", not "the work stopped". Absent means
|
|
5628
5631
|
* the writer did not report it, which is not the same as `false`.
|
|
5629
5632
|
*/
|
|
5630
|
-
signalAccepted: z8.boolean().optional()
|
|
5633
|
+
signalAccepted: z8.boolean().optional(),
|
|
5634
|
+
/**
|
|
5635
|
+
* `VERSION` of the nexus-agents process that WROTE this record (#5008) —
|
|
5636
|
+
* i.e. the build that ran the job, not the build that reads it back.
|
|
5637
|
+
*
|
|
5638
|
+
* `get_job_result` is itself a wrapped tool, so its `_meta['nexus-agents/build']`
|
|
5639
|
+
* stamp (#5056) names the READER's build. After a mid-session global install
|
|
5640
|
+
* the reader and the producer differ, and only the record can say which
|
|
5641
|
+
* build produced the payload. Each writer re-stamps on its own transition,
|
|
5642
|
+
* so a terminal record names the process that settled it.
|
|
5643
|
+
*
|
|
5644
|
+
* Optional so v1 records written before this field existed still parse:
|
|
5645
|
+
* on a SIDECAR record, absence means "produced before this field existed",
|
|
5646
|
+
* not a version of `undefined`. A record adapted from the task-state log
|
|
5647
|
+
* (`jobResultFromTaskState`, selected by `NEXUS_JOB_RESULT_SOURCE=task_state`)
|
|
5648
|
+
* NEVER carries it — that log records no producer version — so a reader
|
|
5649
|
+
* must consult the source (`get_job_result`'s `producerVersionSource`)
|
|
5650
|
+
* before reading absence as age. The value is recorded verbatim, including
|
|
5651
|
+
* `'dev'` — readers MUST run it through {@link isMeasuredBuildVersion}
|
|
5652
|
+
* before treating two stamps as comparable.
|
|
5653
|
+
*/
|
|
5654
|
+
producerVersion: z8.string().optional()
|
|
5631
5655
|
});
|
|
5656
|
+
var UNMEASURED_BUILD_VERSION = "dev";
|
|
5657
|
+
function isMeasuredBuildVersion(version) {
|
|
5658
|
+
return version !== void 0 && version !== "" && version !== UNMEASURED_BUILD_VERSION;
|
|
5659
|
+
}
|
|
5632
5660
|
function isAbandonedJob(record, nowMs) {
|
|
5633
5661
|
if (record.status !== "pending") return false;
|
|
5634
5662
|
const startedMs = Date.parse(record.createdAt);
|
|
@@ -5641,7 +5669,7 @@ function persistJobRecord(path, record) {
|
|
|
5641
5669
|
writeFileSync3(path, JSON.stringify(record, null, 2), { mode: 384 });
|
|
5642
5670
|
chmodSync(path, 384);
|
|
5643
5671
|
}
|
|
5644
|
-
function writeJobPending(jobId, toolName, signalAccepted) {
|
|
5672
|
+
function writeJobPending(jobId, toolName, signalAccepted, producerVersion = VERSION) {
|
|
5645
5673
|
const path = jobResultPath(jobId);
|
|
5646
5674
|
if (existsSync4(path)) {
|
|
5647
5675
|
logger7.debug("Job result file already exists \u2014 leaving in place", { jobId });
|
|
@@ -5653,12 +5681,13 @@ function writeJobPending(jobId, toolName, signalAccepted) {
|
|
|
5653
5681
|
toolName,
|
|
5654
5682
|
status: "pending",
|
|
5655
5683
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5656
|
-
...signalAccepted !== void 0 ? { signalAccepted } : {}
|
|
5684
|
+
...signalAccepted !== void 0 ? { signalAccepted } : {},
|
|
5685
|
+
producerVersion
|
|
5657
5686
|
};
|
|
5658
5687
|
persistJobRecord(path, record);
|
|
5659
5688
|
logger7.debug("Wrote pending job record", { jobId, toolName, signalAccepted });
|
|
5660
5689
|
}
|
|
5661
|
-
function writeJobComplete(jobId, toolName, result) {
|
|
5690
|
+
function writeJobComplete(jobId, toolName, result, producerVersion = VERSION) {
|
|
5662
5691
|
const existing = readJobResult(jobId);
|
|
5663
5692
|
if (existing?.status === "cancelled") {
|
|
5664
5693
|
logger7.debug("Skipping complete write \u2014 job already cancelled (preserving cancellation)", {
|
|
@@ -5674,12 +5703,13 @@ function writeJobComplete(jobId, toolName, result) {
|
|
|
5674
5703
|
status: "complete",
|
|
5675
5704
|
createdAt: existing?.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
5676
5705
|
completedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5677
|
-
result
|
|
5706
|
+
result,
|
|
5707
|
+
producerVersion
|
|
5678
5708
|
};
|
|
5679
5709
|
persistJobRecord(jobResultPath(jobId), record);
|
|
5680
5710
|
logger7.debug("Wrote complete job record", { jobId, toolName });
|
|
5681
5711
|
}
|
|
5682
|
-
function writeJobFailed(jobId, toolName, error) {
|
|
5712
|
+
function writeJobFailed(jobId, toolName, error, producerVersion = VERSION) {
|
|
5683
5713
|
const existing = readJobResult(jobId);
|
|
5684
5714
|
if (existing?.status === "cancelled") {
|
|
5685
5715
|
logger7.debug("Skipping failed write \u2014 job already cancelled (preserving cancellation)", {
|
|
@@ -5695,12 +5725,13 @@ function writeJobFailed(jobId, toolName, error) {
|
|
|
5695
5725
|
status: "failed",
|
|
5696
5726
|
createdAt: existing?.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
5697
5727
|
completedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5698
|
-
error
|
|
5728
|
+
error,
|
|
5729
|
+
producerVersion
|
|
5699
5730
|
};
|
|
5700
5731
|
persistJobRecord(jobResultPath(jobId), record);
|
|
5701
5732
|
logger7.debug("Wrote failed job record", { jobId, toolName, error });
|
|
5702
5733
|
}
|
|
5703
|
-
function writeJobCancelled(jobId, toolName, reason) {
|
|
5734
|
+
function writeJobCancelled(jobId, toolName, reason, producerVersion = VERSION) {
|
|
5704
5735
|
const record = {
|
|
5705
5736
|
v: 1,
|
|
5706
5737
|
jobId,
|
|
@@ -5708,7 +5739,8 @@ function writeJobCancelled(jobId, toolName, reason) {
|
|
|
5708
5739
|
status: "cancelled",
|
|
5709
5740
|
createdAt: readJobResult(jobId)?.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
5710
5741
|
completedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5711
|
-
...reason !== void 0 ? { error: reason } : {}
|
|
5742
|
+
...reason !== void 0 ? { error: reason } : {},
|
|
5743
|
+
producerVersion
|
|
5712
5744
|
};
|
|
5713
5745
|
persistJobRecord(jobResultPath(jobId), record);
|
|
5714
5746
|
logger7.debug("Wrote cancelled job record", { jobId, toolName, reason });
|
|
@@ -6108,7 +6140,7 @@ function runAsJob(params) {
|
|
|
6108
6140
|
return env.busy(suggestRetryAfterMs(params.toolName), params.toolName);
|
|
6109
6141
|
}
|
|
6110
6142
|
const jobId = idempotency.jobId;
|
|
6111
|
-
writeJobPending(jobId, params.toolName, params.run.length >= 3);
|
|
6143
|
+
writeJobPending(jobId, params.toolName, params.run.length >= 3, params.producerVersion);
|
|
6112
6144
|
if (params.idempotencyKey !== void 0 && params.idempotencyKey !== "") {
|
|
6113
6145
|
registerIdempotentJob({
|
|
6114
6146
|
tool: params.toolName,
|
|
@@ -6131,7 +6163,7 @@ async function runJobInBackground(jobId, params) {
|
|
|
6131
6163
|
]);
|
|
6132
6164
|
const failure = detectFailureShapedResult(result);
|
|
6133
6165
|
if (failure !== null && params.allowFailureShapedResult === void 0) {
|
|
6134
|
-
writeJobFailed(jobId, params.toolName, describeFailureShape(failure));
|
|
6166
|
+
writeJobFailed(jobId, params.toolName, describeFailureShape(failure), params.producerVersion);
|
|
6135
6167
|
} else {
|
|
6136
6168
|
if (failure !== null) {
|
|
6137
6169
|
params.logger?.warn(
|
|
@@ -6139,12 +6171,12 @@ async function runJobInBackground(jobId, params) {
|
|
|
6139
6171
|
{ jobId, key: failure.key, reason: params.allowFailureShapedResult }
|
|
6140
6172
|
);
|
|
6141
6173
|
}
|
|
6142
|
-
writeJobComplete(jobId, params.toolName, result);
|
|
6174
|
+
writeJobComplete(jobId, params.toolName, result, params.producerVersion);
|
|
6143
6175
|
}
|
|
6144
6176
|
} catch (err2) {
|
|
6145
6177
|
const errObj = err2 instanceof Error ? err2 : new Error(String(err2));
|
|
6146
6178
|
params.logger?.error(`Async ${params.toolName} dispatch failed`, errObj, { jobId });
|
|
6147
|
-
writeJobFailed(jobId, params.toolName, errObj.message);
|
|
6179
|
+
writeJobFailed(jobId, params.toolName, errObj.message, params.producerVersion);
|
|
6148
6180
|
} finally {
|
|
6149
6181
|
guard.clear();
|
|
6150
6182
|
unregisterJobAbort(jobId);
|
|
@@ -6356,7 +6388,7 @@ function logPartialProposal(bounded, log) {
|
|
|
6356
6388
|
}
|
|
6357
6389
|
async function runContrarianCheck(proposal, log) {
|
|
6358
6390
|
try {
|
|
6359
|
-
const { executeExpert } = await import("./expert-bridge-
|
|
6391
|
+
const { executeExpert } = await import("./expert-bridge-G3KN7QWL.js");
|
|
6360
6392
|
const bounded = boundArtifactForReview(proposal, CONTRARIAN_PROPOSAL_BUDGET, "proposal");
|
|
6361
6393
|
logPartialProposal(bounded, log);
|
|
6362
6394
|
const result = await executeExpert("architecture", buildContrarianPrompt(bounded));
|
|
@@ -6858,6 +6890,7 @@ function registerConsensusVoteTool(server, deps) {
|
|
|
6858
6890
|
export {
|
|
6859
6891
|
VOTER_ROLES,
|
|
6860
6892
|
JobStatusSchema,
|
|
6893
|
+
isMeasuredBuildVersion,
|
|
6861
6894
|
isAbandonedJob,
|
|
6862
6895
|
writeJobCancelled,
|
|
6863
6896
|
readJobResult,
|
|
@@ -6939,4 +6972,4 @@ export {
|
|
|
6939
6972
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
6940
6973
|
registerConsensusVoteTool
|
|
6941
6974
|
};
|
|
6942
|
-
//# sourceMappingURL=chunk-
|
|
6975
|
+
//# sourceMappingURL=chunk-SQCFKQUR.js.map
|