nexus-agents 3.9.2 → 3.9.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/dist/{child-mcp-config-XIZWCWS3.js → child-mcp-config-MJNB5GXS.js} +2 -2
- package/dist/{chunk-OJCIP6W5.js → chunk-32AWWH4F.js} +2 -2
- package/dist/{chunk-EZXYOWCX.js → chunk-3WWE26PG.js} +2 -2
- package/dist/{chunk-65WAPYJ6.js → chunk-6VUIQQ3O.js} +116 -46
- package/dist/chunk-6VUIQQ3O.js.map +1 -0
- package/dist/{chunk-AENOTEID.js → chunk-7FJFN74H.js} +5 -5
- package/dist/{chunk-3MUJKEAQ.js → chunk-ABV3XE7D.js} +5 -5
- package/dist/{chunk-VCNOCG2J.js → chunk-DMKV7ANB.js} +8 -8
- package/dist/{chunk-KIE4R424.js → chunk-ERCCVO4N.js} +2 -2
- package/dist/{chunk-P5WOAEDY.js → chunk-FJKMNLTU.js} +4 -4
- package/dist/{chunk-7PBXPMKW.js → chunk-G5GOWK5T.js} +2 -2
- package/dist/{chunk-XYVYKPIB.js → chunk-G6AVXG6F.js} +2 -2
- package/dist/{chunk-DXL625N6.js → chunk-IAEZN2N4.js} +5 -5
- package/dist/{chunk-YAZW2ANJ.js → chunk-JBLM3UZA.js} +5 -5
- package/dist/{chunk-SXWUCWLR.js → chunk-JBSL2HKV.js} +3 -3
- package/dist/{chunk-SMBJQBEC.js → chunk-JJZF37X2.js} +3 -3
- package/dist/{chunk-2CN7DD4C.js → chunk-JPMXFYKW.js} +3 -3
- package/dist/{chunk-DSP6PMDI.js → chunk-K3TRG2CD.js} +3 -3
- package/dist/{chunk-CQAO35WX.js → chunk-KBX4JSBE.js} +8 -8
- package/dist/{chunk-R43Y6TXS.js → chunk-KLMXZRDK.js} +2 -2
- package/dist/{chunk-EGUKCGGM.js → chunk-KPYPJGSD.js} +7 -7
- package/dist/{chunk-AQBM5CAX.js → chunk-M3HKW5HF.js} +2 -2
- package/dist/{chunk-PBD5LS4B.js → chunk-M7566JRS.js} +8 -8
- package/dist/{chunk-ACWU2RRK.js → chunk-MAP3BVCT.js} +2 -2
- package/dist/{chunk-WVN62JSE.js → chunk-MXJEMYC7.js} +2 -2
- package/dist/{chunk-NZCBB4SP.js → chunk-N62DDWV3.js} +2 -2
- package/dist/{chunk-MUBJ4ROO.js → chunk-OL6TRWBA.js} +2 -2
- package/dist/{chunk-FZ5YJSM6.js → chunk-QUOCOEDQ.js} +4 -4
- package/dist/{chunk-6YEAUZBF.js → chunk-SOCKDRK6.js} +4 -4
- package/dist/{chunk-Q2UUVPVY.js → chunk-TJ6UFU3I.js} +2 -2
- package/dist/{chunk-YP25ZDI2.js → chunk-TU4FRZWU.js} +2 -2
- package/dist/{chunk-OM5VAEYP.js → chunk-VF4ZV4KG.js} +2 -2
- package/dist/{chunk-ZGAML4CX.js → chunk-XBEED5SG.js} +87 -37
- package/dist/chunk-XBEED5SG.js.map +1 -0
- package/dist/{chunk-7GA5V4L2.js → chunk-XMNMIMR6.js} +2 -2
- package/dist/{chunk-3ZGYVPN3.js → chunk-ZVZHNAQH.js} +2 -2
- package/dist/{cli-circuit-breaker-M5JY42QE.js → cli-circuit-breaker-JWCKCVDX.js} +3 -3
- package/dist/cli.js +41 -41
- package/dist/{composite-router-AU7QAE3Z.js → composite-router-5OCKHBR3.js} +2 -2
- package/dist/{consensus-vote-FUQNZAHI.js → consensus-vote-HG5BE56Y.js} +16 -16
- package/dist/{context-retriever-BJL3MZTY.js → context-retriever-JNXUAPWJ.js} +8 -8
- package/dist/{doctor-deep-CSIYPBWB.js → doctor-deep-IZAAFLBC.js} +3 -3
- package/dist/{doctor-live-Z3EUWDEM.js → doctor-live-Z5IP2TWY.js} +9 -9
- package/dist/{expert-bridge-NI3ZJASZ.js → expert-bridge-XI4BNDI7.js} +4 -4
- package/dist/{factory-663E66YC.js → factory-QAH46LJX.js} +9 -9
- package/dist/{factory-BQAVRQGT.js → factory-WU2VY6QI.js} +5 -5
- package/dist/{improvement-review-J6TNYY37.js → improvement-review-E2PK2AEA.js} +5 -5
- package/dist/index.d.ts +28 -1
- package/dist/index.js +30 -30
- package/dist/{init-opencode-EY7LKRNG.js → init-opencode-BQHWMUOD.js} +6 -6
- package/dist/{issue-triage-SVM7E5KL.js → issue-triage-EBQFRWOQ.js} +6 -6
- package/dist/{pr-reviewer-helpers-545VXQVR.js → pr-reviewer-helpers-RN35E43S.js} +4 -4
- package/dist/{registry-command-7YZHWM5F.js → registry-command-J2FV4BT2.js} +2 -2
- package/dist/{repo-security-plan-F32BFXAV.js → repo-security-plan-IRILDORZ.js} +3 -3
- package/dist/{research-helpers-synthesize-DQXRIADN.js → research-helpers-synthesize-KUZRNHXY.js} +4 -4
- package/dist/{routing-memory-MUUFFXDI.js → routing-memory-GFO76574.js} +2 -2
- package/dist/{session-memory-OPYU2ZX3.js → session-memory-CY3T3XNO.js} +3 -3
- package/dist/{setup-command-LWTWYEM6.js → setup-command-QI3LDW4D.js} +14 -14
- package/dist/{setup-config-EUBS3LFF.js → setup-config-A27SDCRY.js} +3 -3
- package/dist/{setup-custom-api-XT23L2NX.js → setup-custom-api-UZV66PZA.js} +4 -4
- package/dist/{tool-memory-HEHBDQDP.js → tool-memory-YYEWKSC4.js} +5 -5
- package/dist/{unified-registry-FYD2XQ43.js → unified-registry-PKDBZ6FO.js} +10 -10
- package/dist/{weather-report-ZG3JCRLK.js → weather-report-MXQTPLDG.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-65WAPYJ6.js.map +0 -1
- package/dist/chunk-ZGAML4CX.js.map +0 -1
- /package/dist/{child-mcp-config-XIZWCWS3.js.map → child-mcp-config-MJNB5GXS.js.map} +0 -0
- /package/dist/{chunk-OJCIP6W5.js.map → chunk-32AWWH4F.js.map} +0 -0
- /package/dist/{chunk-EZXYOWCX.js.map → chunk-3WWE26PG.js.map} +0 -0
- /package/dist/{chunk-AENOTEID.js.map → chunk-7FJFN74H.js.map} +0 -0
- /package/dist/{chunk-3MUJKEAQ.js.map → chunk-ABV3XE7D.js.map} +0 -0
- /package/dist/{chunk-VCNOCG2J.js.map → chunk-DMKV7ANB.js.map} +0 -0
- /package/dist/{chunk-KIE4R424.js.map → chunk-ERCCVO4N.js.map} +0 -0
- /package/dist/{chunk-P5WOAEDY.js.map → chunk-FJKMNLTU.js.map} +0 -0
- /package/dist/{chunk-7PBXPMKW.js.map → chunk-G5GOWK5T.js.map} +0 -0
- /package/dist/{chunk-XYVYKPIB.js.map → chunk-G6AVXG6F.js.map} +0 -0
- /package/dist/{chunk-DXL625N6.js.map → chunk-IAEZN2N4.js.map} +0 -0
- /package/dist/{chunk-YAZW2ANJ.js.map → chunk-JBLM3UZA.js.map} +0 -0
- /package/dist/{chunk-SXWUCWLR.js.map → chunk-JBSL2HKV.js.map} +0 -0
- /package/dist/{chunk-SMBJQBEC.js.map → chunk-JJZF37X2.js.map} +0 -0
- /package/dist/{chunk-2CN7DD4C.js.map → chunk-JPMXFYKW.js.map} +0 -0
- /package/dist/{chunk-DSP6PMDI.js.map → chunk-K3TRG2CD.js.map} +0 -0
- /package/dist/{chunk-CQAO35WX.js.map → chunk-KBX4JSBE.js.map} +0 -0
- /package/dist/{chunk-R43Y6TXS.js.map → chunk-KLMXZRDK.js.map} +0 -0
- /package/dist/{chunk-EGUKCGGM.js.map → chunk-KPYPJGSD.js.map} +0 -0
- /package/dist/{chunk-AQBM5CAX.js.map → chunk-M3HKW5HF.js.map} +0 -0
- /package/dist/{chunk-PBD5LS4B.js.map → chunk-M7566JRS.js.map} +0 -0
- /package/dist/{chunk-ACWU2RRK.js.map → chunk-MAP3BVCT.js.map} +0 -0
- /package/dist/{chunk-WVN62JSE.js.map → chunk-MXJEMYC7.js.map} +0 -0
- /package/dist/{chunk-NZCBB4SP.js.map → chunk-N62DDWV3.js.map} +0 -0
- /package/dist/{chunk-MUBJ4ROO.js.map → chunk-OL6TRWBA.js.map} +0 -0
- /package/dist/{chunk-FZ5YJSM6.js.map → chunk-QUOCOEDQ.js.map} +0 -0
- /package/dist/{chunk-6YEAUZBF.js.map → chunk-SOCKDRK6.js.map} +0 -0
- /package/dist/{chunk-Q2UUVPVY.js.map → chunk-TJ6UFU3I.js.map} +0 -0
- /package/dist/{chunk-YP25ZDI2.js.map → chunk-TU4FRZWU.js.map} +0 -0
- /package/dist/{chunk-OM5VAEYP.js.map → chunk-VF4ZV4KG.js.map} +0 -0
- /package/dist/{chunk-7GA5V4L2.js.map → chunk-XMNMIMR6.js.map} +0 -0
- /package/dist/{chunk-3ZGYVPN3.js.map → chunk-ZVZHNAQH.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-M5JY42QE.js.map → cli-circuit-breaker-JWCKCVDX.js.map} +0 -0
- /package/dist/{composite-router-AU7QAE3Z.js.map → composite-router-5OCKHBR3.js.map} +0 -0
- /package/dist/{consensus-vote-FUQNZAHI.js.map → consensus-vote-HG5BE56Y.js.map} +0 -0
- /package/dist/{context-retriever-BJL3MZTY.js.map → context-retriever-JNXUAPWJ.js.map} +0 -0
- /package/dist/{doctor-deep-CSIYPBWB.js.map → doctor-deep-IZAAFLBC.js.map} +0 -0
- /package/dist/{doctor-live-Z3EUWDEM.js.map → doctor-live-Z5IP2TWY.js.map} +0 -0
- /package/dist/{expert-bridge-NI3ZJASZ.js.map → expert-bridge-XI4BNDI7.js.map} +0 -0
- /package/dist/{factory-663E66YC.js.map → factory-QAH46LJX.js.map} +0 -0
- /package/dist/{factory-BQAVRQGT.js.map → factory-WU2VY6QI.js.map} +0 -0
- /package/dist/{improvement-review-J6TNYY37.js.map → improvement-review-E2PK2AEA.js.map} +0 -0
- /package/dist/{init-opencode-EY7LKRNG.js.map → init-opencode-BQHWMUOD.js.map} +0 -0
- /package/dist/{issue-triage-SVM7E5KL.js.map → issue-triage-EBQFRWOQ.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-545VXQVR.js.map → pr-reviewer-helpers-RN35E43S.js.map} +0 -0
- /package/dist/{registry-command-7YZHWM5F.js.map → registry-command-J2FV4BT2.js.map} +0 -0
- /package/dist/{repo-security-plan-F32BFXAV.js.map → repo-security-plan-IRILDORZ.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-DQXRIADN.js.map → research-helpers-synthesize-KUZRNHXY.js.map} +0 -0
- /package/dist/{routing-memory-MUUFFXDI.js.map → routing-memory-GFO76574.js.map} +0 -0
- /package/dist/{session-memory-OPYU2ZX3.js.map → session-memory-CY3T3XNO.js.map} +0 -0
- /package/dist/{setup-command-LWTWYEM6.js.map → setup-command-QI3LDW4D.js.map} +0 -0
- /package/dist/{setup-config-EUBS3LFF.js.map → setup-config-A27SDCRY.js.map} +0 -0
- /package/dist/{setup-custom-api-XT23L2NX.js.map → setup-custom-api-UZV66PZA.js.map} +0 -0
- /package/dist/{tool-memory-HEHBDQDP.js.map → tool-memory-YYEWKSC4.js.map} +0 -0
- /package/dist/{unified-registry-FYD2XQ43.js.map → unified-registry-PKDBZ6FO.js.map} +0 -0
- /package/dist/{weather-report-ZG3JCRLK.js.map → weather-report-MXQTPLDG.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-SNJNRDKZ.js";
|
|
4
4
|
import {
|
|
5
5
|
createLogger
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6VUIQQ3O.js";
|
|
7
7
|
import "./chunk-2HUC6NZN.js";
|
|
8
8
|
import "./chunk-OQLFRJCW.js";
|
|
9
9
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
generateMcpConfig,
|
|
63
63
|
getDefaultAllowedTools
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=child-mcp-config-
|
|
65
|
+
//# sourceMappingURL=child-mcp-config-MJNB5GXS.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
lookupInTreeCapability,
|
|
14
14
|
ok,
|
|
15
15
|
resolveRetryAfterMs
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6VUIQQ3O.js";
|
|
17
17
|
|
|
18
18
|
// src/config/model-parameter-support.ts
|
|
19
19
|
function parseClaudeMajorMinor(bareId) {
|
|
@@ -834,4 +834,4 @@ export {
|
|
|
834
834
|
DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
|
|
835
835
|
collectStream
|
|
836
836
|
};
|
|
837
|
-
//# sourceMappingURL=chunk-
|
|
837
|
+
//# sourceMappingURL=chunk-32AWWH4F.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
err,
|
|
5
5
|
getErrorMessage,
|
|
6
6
|
ok
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6VUIQQ3O.js";
|
|
8
8
|
|
|
9
9
|
// src/scm/types.ts
|
|
10
10
|
var ScmError = class extends Error {
|
|
@@ -263,4 +263,4 @@ export {
|
|
|
263
263
|
ScmError,
|
|
264
264
|
GitHubProvider
|
|
265
265
|
};
|
|
266
|
-
//# sourceMappingURL=chunk-
|
|
266
|
+
//# sourceMappingURL=chunk-3WWE26PG.js.map
|
|
@@ -2623,7 +2623,7 @@ function setDefaultRegistry(registry) {
|
|
|
2623
2623
|
}
|
|
2624
2624
|
async function reloadDefaultRegistry() {
|
|
2625
2625
|
globalRegistry = buildDefaultRegistry();
|
|
2626
|
-
const { resetGlobalRegistry } = await import("./unified-registry-
|
|
2626
|
+
const { resetGlobalRegistry } = await import("./unified-registry-PKDBZ6FO.js");
|
|
2627
2627
|
resetGlobalRegistry();
|
|
2628
2628
|
return globalRegistry;
|
|
2629
2629
|
}
|
|
@@ -4914,6 +4914,7 @@ function declaredOrthogonalityGroup(tool) {
|
|
|
4914
4914
|
}
|
|
4915
4915
|
|
|
4916
4916
|
// src/core/task-analysis/capability-gap-detector.ts
|
|
4917
|
+
var CAPABILITY_GAP_TYPES = ["tool", "expert", "tool_refusal"];
|
|
4917
4918
|
var AVAILABLE_TOOLS = new Set(TOOL_MANIFEST.map((t) => t.name));
|
|
4918
4919
|
var AVAILABLE_EXPERTS = /* @__PURE__ */ new Set([
|
|
4919
4920
|
"code_expert",
|
|
@@ -4972,68 +4973,137 @@ function detectCapabilityGaps(required) {
|
|
|
4972
4973
|
};
|
|
4973
4974
|
}
|
|
4974
4975
|
|
|
4975
|
-
// src/core/task-analysis/capability-gap-ledger.ts
|
|
4976
|
-
|
|
4976
|
+
// src/core/task-analysis/capability-gap-ledger-persistence.ts
|
|
4977
|
+
import { appendFileSync, existsSync as existsSync5, mkdirSync as mkdirSync2, readFileSync as readFileSync4 } from "fs";
|
|
4978
|
+
import { dirname as dirname4 } from "path";
|
|
4979
|
+
var DEFAULT_MAX_ENTRIES = 5e3;
|
|
4980
|
+
var DEFAULT_RETENTION_DAYS = 90;
|
|
4977
4981
|
var MAX_EXAMPLE_GOALS = 3;
|
|
4978
|
-
function
|
|
4979
|
-
return
|
|
4982
|
+
function isEntry(value) {
|
|
4983
|
+
if (typeof value !== "object" || value === null) return false;
|
|
4984
|
+
const v = value;
|
|
4985
|
+
return (
|
|
4986
|
+
// Derived from CAPABILITY_GAP_TYPES, never re-listed here — hardcoding the
|
|
4987
|
+
// union is what made every persisted tool_refusal load as malformed.
|
|
4988
|
+
// The array is widened rather than the value asserted: `includes` on a
|
|
4989
|
+
// readonly tuple will not accept `unknown`, and asserting the value would
|
|
4990
|
+
// claim a narrowing this guard has not yet done.
|
|
4991
|
+
typeof v["type"] === "string" && CAPABILITY_GAP_TYPES.includes(v["type"]) && typeof v["name"] === "string" && typeof v["suggestion"] === "string" && typeof v["timestamp"] === "string"
|
|
4992
|
+
);
|
|
4980
4993
|
}
|
|
4981
|
-
function
|
|
4994
|
+
function summarize(entries) {
|
|
4982
4995
|
const groups = /* @__PURE__ */ new Map();
|
|
4983
|
-
for (const
|
|
4984
|
-
const key =
|
|
4985
|
-
const group = groups.get(key)
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
group.
|
|
4996
|
-
group.suggestion = e.suggestion;
|
|
4997
|
-
if (e.goal !== void 0) group.goals.add(e.goal);
|
|
4996
|
+
for (const entry of entries) {
|
|
4997
|
+
const key = `${entry.type}:${entry.name}`;
|
|
4998
|
+
const group = groups.get(key) ?? {
|
|
4999
|
+
type: entry.type,
|
|
5000
|
+
name: entry.name,
|
|
5001
|
+
count: 0,
|
|
5002
|
+
suggestion: entry.suggestion,
|
|
5003
|
+
goals: []
|
|
5004
|
+
};
|
|
5005
|
+
group.count += 1;
|
|
5006
|
+
group.suggestion = entry.suggestion;
|
|
5007
|
+
if (entry.goal !== void 0 && entry.goal !== "" && !group.goals.includes(entry.goal) && group.goals.length < MAX_EXAMPLE_GOALS) {
|
|
5008
|
+
group.goals.push(entry.goal);
|
|
4998
5009
|
}
|
|
5010
|
+
groups.set(key, group);
|
|
4999
5011
|
}
|
|
5000
5012
|
return [...groups.values()].map((g) => ({
|
|
5001
5013
|
type: g.type,
|
|
5002
5014
|
name: g.name,
|
|
5003
5015
|
count: g.count,
|
|
5004
5016
|
suggestion: g.suggestion,
|
|
5005
|
-
exampleGoals:
|
|
5006
|
-
})).sort((a, b) => b.count
|
|
5017
|
+
exampleGoals: g.goals
|
|
5018
|
+
})).sort((a, b) => b.count - a.count || a.name.localeCompare(b.name));
|
|
5007
5019
|
}
|
|
5008
|
-
function
|
|
5020
|
+
function loadEntries(filePath, cutoff, maxEntries) {
|
|
5009
5021
|
const entries = [];
|
|
5022
|
+
let malformedLines = 0;
|
|
5023
|
+
let expiredEntries = 0;
|
|
5024
|
+
const fileExisted = existsSync5(filePath);
|
|
5025
|
+
if (!fileExisted) {
|
|
5026
|
+
return { entries, report: { fileExisted, loaded: 0, malformedLines: 0, expiredEntries: 0 } };
|
|
5027
|
+
}
|
|
5028
|
+
let raw = "";
|
|
5029
|
+
try {
|
|
5030
|
+
raw = readFileSync4(filePath, "utf-8");
|
|
5031
|
+
} catch {
|
|
5032
|
+
raw = "";
|
|
5033
|
+
}
|
|
5034
|
+
for (const line of raw.split("\n")) {
|
|
5035
|
+
const trimmed = line.trim();
|
|
5036
|
+
if (trimmed === "") continue;
|
|
5037
|
+
let parsed;
|
|
5038
|
+
try {
|
|
5039
|
+
parsed = JSON.parse(trimmed);
|
|
5040
|
+
} catch {
|
|
5041
|
+
malformedLines += 1;
|
|
5042
|
+
continue;
|
|
5043
|
+
}
|
|
5044
|
+
if (!isEntry(parsed)) {
|
|
5045
|
+
malformedLines += 1;
|
|
5046
|
+
continue;
|
|
5047
|
+
}
|
|
5048
|
+
if (Date.parse(parsed.timestamp) < cutoff) {
|
|
5049
|
+
expiredEntries += 1;
|
|
5050
|
+
continue;
|
|
5051
|
+
}
|
|
5052
|
+
entries.push(parsed);
|
|
5053
|
+
}
|
|
5054
|
+
if (entries.length > maxEntries) entries.splice(0, entries.length - maxEntries);
|
|
5055
|
+
return {
|
|
5056
|
+
entries,
|
|
5057
|
+
report: { fileExisted, loaded: entries.length, malformedLines, expiredEntries }
|
|
5058
|
+
};
|
|
5059
|
+
}
|
|
5060
|
+
function createPersistentCapabilityGapLedger(config) {
|
|
5061
|
+
const maxEntries = config.maxEntries ?? DEFAULT_MAX_ENTRIES;
|
|
5062
|
+
const retentionMs = (config.retentionDays ?? DEFAULT_RETENTION_DAYS) * 24 * 60 * 60 * 1e3;
|
|
5063
|
+
const cutoff = getTimeProvider().now() - retentionMs;
|
|
5064
|
+
const { entries, report: loadReport } = loadEntries(config.filePath, cutoff, maxEntries);
|
|
5010
5065
|
return {
|
|
5011
5066
|
record(report, context) {
|
|
5067
|
+
if (report.gaps.length === 0) return;
|
|
5012
5068
|
const timestamp = new Date(getTimeProvider().now()).toISOString();
|
|
5069
|
+
const lines = [];
|
|
5013
5070
|
for (const gap of report.gaps) {
|
|
5014
|
-
|
|
5071
|
+
const entry = {
|
|
5015
5072
|
type: gap.type,
|
|
5016
5073
|
name: gap.name,
|
|
5017
5074
|
suggestion: gap.suggestion,
|
|
5018
5075
|
goal: context?.goal,
|
|
5019
5076
|
timestamp
|
|
5020
|
-
}
|
|
5077
|
+
};
|
|
5078
|
+
entries.push(entry);
|
|
5079
|
+
lines.push(JSON.stringify(entry));
|
|
5021
5080
|
}
|
|
5022
|
-
if (entries.length > maxEntries)
|
|
5023
|
-
|
|
5081
|
+
if (entries.length > maxEntries) entries.splice(0, entries.length - maxEntries);
|
|
5082
|
+
try {
|
|
5083
|
+
mkdirSync2(dirname4(config.filePath), { recursive: true });
|
|
5084
|
+
appendFileSync(config.filePath, `${lines.join("\n")}
|
|
5085
|
+
`, "utf-8");
|
|
5086
|
+
} catch {
|
|
5024
5087
|
}
|
|
5025
5088
|
},
|
|
5026
5089
|
summarize() {
|
|
5027
|
-
return
|
|
5090
|
+
return summarize(entries);
|
|
5028
5091
|
},
|
|
5029
5092
|
size() {
|
|
5030
5093
|
return entries.length;
|
|
5094
|
+
},
|
|
5095
|
+
loadReport() {
|
|
5096
|
+
return loadReport;
|
|
5031
5097
|
}
|
|
5032
5098
|
};
|
|
5033
5099
|
}
|
|
5100
|
+
|
|
5101
|
+
// src/core/task-analysis/capability-gap-ledger.ts
|
|
5034
5102
|
var singletonLedger;
|
|
5035
5103
|
function getGapLedger() {
|
|
5036
|
-
singletonLedger ??=
|
|
5104
|
+
singletonLedger ??= createPersistentCapabilityGapLedger({
|
|
5105
|
+
filePath: nexusDataPath("capability-gaps.jsonl")
|
|
5106
|
+
});
|
|
5037
5107
|
return singletonLedger;
|
|
5038
5108
|
}
|
|
5039
5109
|
function recordRoutingGaps(source, context, ledger = getGapLedger()) {
|
|
@@ -12026,8 +12096,8 @@ function aggregateDecisionCosts(records, windowMs) {
|
|
|
12026
12096
|
import { z as z17 } from "zod";
|
|
12027
12097
|
|
|
12028
12098
|
// src/config/jsonl-store.ts
|
|
12029
|
-
import { appendFileSync, existsSync as
|
|
12030
|
-
import { dirname as
|
|
12099
|
+
import { appendFileSync as appendFileSync2, existsSync as existsSync6, mkdirSync as mkdirSync3, readFileSync as readFileSync5, writeFileSync as writeFileSync2 } from "fs";
|
|
12100
|
+
import { dirname as dirname5 } from "path";
|
|
12031
12101
|
var DIR_MODE = 448;
|
|
12032
12102
|
var JsonlStore = class {
|
|
12033
12103
|
filePath;
|
|
@@ -12080,7 +12150,7 @@ var JsonlStore = class {
|
|
|
12080
12150
|
// ==========================================================================
|
|
12081
12151
|
ensureDir() {
|
|
12082
12152
|
try {
|
|
12083
|
-
|
|
12153
|
+
mkdirSync3(dirname5(this.filePath), { recursive: true, mode: DIR_MODE });
|
|
12084
12154
|
} catch (error) {
|
|
12085
12155
|
this.logger.warn("Failed to create JSONL store directory", {
|
|
12086
12156
|
error: getErrorMessage(error),
|
|
@@ -12089,14 +12159,14 @@ var JsonlStore = class {
|
|
|
12089
12159
|
}
|
|
12090
12160
|
}
|
|
12091
12161
|
hydrate() {
|
|
12092
|
-
if (!
|
|
12162
|
+
if (!existsSync6(this.filePath)) {
|
|
12093
12163
|
this.logger.debug("No JSONL file found, starting fresh", { path: this.filePath });
|
|
12094
12164
|
return;
|
|
12095
12165
|
}
|
|
12096
12166
|
let loaded = 0;
|
|
12097
12167
|
let skipped = 0;
|
|
12098
12168
|
try {
|
|
12099
|
-
const content =
|
|
12169
|
+
const content = readFileSync5(this.filePath, "utf-8");
|
|
12100
12170
|
const lines = content.split("\n").filter((line) => line.trim().length > 0);
|
|
12101
12171
|
for (const line of lines) {
|
|
12102
12172
|
try {
|
|
@@ -12132,7 +12202,7 @@ var JsonlStore = class {
|
|
|
12132
12202
|
}
|
|
12133
12203
|
persistLine(record) {
|
|
12134
12204
|
try {
|
|
12135
|
-
|
|
12205
|
+
appendFileSync2(this.filePath, JSON.stringify(record) + "\n", "utf-8");
|
|
12136
12206
|
return true;
|
|
12137
12207
|
} catch (error) {
|
|
12138
12208
|
this.logger.warn("Failed to append JSONL record to disk", {
|
|
@@ -12390,7 +12460,7 @@ var DecisionCostStore = class {
|
|
|
12390
12460
|
};
|
|
12391
12461
|
|
|
12392
12462
|
// src/orchestration/strategy-manifest.ts
|
|
12393
|
-
import { existsSync as
|
|
12463
|
+
import { existsSync as existsSync7, readFileSync as readFileSync6 } from "fs";
|
|
12394
12464
|
import { parse as parseYaml2 } from "yaml";
|
|
12395
12465
|
import { z as z18 } from "zod";
|
|
12396
12466
|
var STRATEGY_MANIFEST_SCHEMA_VERSION = 1;
|
|
@@ -14269,7 +14339,7 @@ function resolveModelForTier(cliName, tier, opts = {}) {
|
|
|
14269
14339
|
}
|
|
14270
14340
|
|
|
14271
14341
|
// src/cli-adapters/model-selection-shadow.ts
|
|
14272
|
-
import { appendFileSync as
|
|
14342
|
+
import { appendFileSync as appendFileSync3, existsSync as existsSync8, readFileSync as readFileSync7 } from "fs";
|
|
14273
14343
|
import { z as z21 } from "zod";
|
|
14274
14344
|
function isRouteModelShadowEnabled() {
|
|
14275
14345
|
return process.env["NEXUS_ROUTE_MODEL_SHADOW"] === "1" && isPersistenceEnabled();
|
|
@@ -14310,7 +14380,7 @@ var persistLogger = createLogger({ component: "ModelSelectionShadow" });
|
|
|
14310
14380
|
function persistModelSelectionShadowRecord(record) {
|
|
14311
14381
|
try {
|
|
14312
14382
|
ensureLearningDir();
|
|
14313
|
-
|
|
14383
|
+
appendFileSync3(getModelSelectionShadowFile(), JSON.stringify(record) + "\n", "utf-8");
|
|
14314
14384
|
} catch (err2) {
|
|
14315
14385
|
recordModelSelectionShadowFailure();
|
|
14316
14386
|
persistLogger.warn("Failed to persist model-selection shadow record (ignored)", {
|
|
@@ -14320,11 +14390,11 @@ function persistModelSelectionShadowRecord(record) {
|
|
|
14320
14390
|
}
|
|
14321
14391
|
function readModelSelectionShadowRecords() {
|
|
14322
14392
|
const file = getModelSelectionShadowFile();
|
|
14323
|
-
if (!
|
|
14393
|
+
if (!existsSync8(file)) return [];
|
|
14324
14394
|
const records = [];
|
|
14325
14395
|
try {
|
|
14326
14396
|
const cutoff = Date.now() - READ_LOOKBACK_MS;
|
|
14327
|
-
const lines =
|
|
14397
|
+
const lines = readFileSync7(file, "utf-8").split("\n").filter((l) => l.trim().length > 0);
|
|
14328
14398
|
for (const line of lines) {
|
|
14329
14399
|
let parsed;
|
|
14330
14400
|
try {
|
|
@@ -14835,7 +14905,7 @@ var CompositeRouter = class _CompositeRouter {
|
|
|
14835
14905
|
*/
|
|
14836
14906
|
async consultUnifiedContext(task) {
|
|
14837
14907
|
try {
|
|
14838
|
-
const { getContextForTask, inferTaskCategory } = await import("./context-retriever-
|
|
14908
|
+
const { getContextForTask, inferTaskCategory } = await import("./context-retriever-JNXUAPWJ.js");
|
|
14839
14909
|
const ctx = await getContextForTask({
|
|
14840
14910
|
task: task.content,
|
|
14841
14911
|
category: inferTaskCategory(task.content),
|
|
@@ -15329,8 +15399,8 @@ var OrchestratorError = class extends Error {
|
|
|
15329
15399
|
|
|
15330
15400
|
// src/context/mobimem.ts
|
|
15331
15401
|
import Database from "better-sqlite3";
|
|
15332
|
-
import { dirname as
|
|
15333
|
-
import { mkdirSync as
|
|
15402
|
+
import { dirname as dirname6 } from "path";
|
|
15403
|
+
import { mkdirSync as mkdirSync4 } from "fs";
|
|
15334
15404
|
|
|
15335
15405
|
// src/context/mobimem-types.ts
|
|
15336
15406
|
import { z as z22 } from "zod";
|
|
@@ -15821,7 +15891,7 @@ var MobiMem = class {
|
|
|
15821
15891
|
if (validated.dbPath === ":memory:" || validated.dbPath === "") {
|
|
15822
15892
|
this.db = null;
|
|
15823
15893
|
} else {
|
|
15824
|
-
|
|
15894
|
+
mkdirSync4(dirname6(validated.dbPath), { recursive: true });
|
|
15825
15895
|
const db = new Database(validated.dbPath);
|
|
15826
15896
|
db.pragma("journal_mode = WAL");
|
|
15827
15897
|
this.db = db;
|
|
@@ -16424,4 +16494,4 @@ export {
|
|
|
16424
16494
|
AgentCapability,
|
|
16425
16495
|
OrchestratorError
|
|
16426
16496
|
};
|
|
16427
|
-
//# sourceMappingURL=chunk-
|
|
16497
|
+
//# sourceMappingURL=chunk-6VUIQQ3O.js.map
|