nexus-agents 4.12.0 → 4.12.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/{child-mcp-config-SG5D6EHE.js → child-mcp-config-KNFWHR5B.js} +2 -2
- package/dist/{chunk-VNPF3XDJ.js → chunk-3F7XUEXM.js} +2 -2
- package/dist/{chunk-6YPUY4DX.js → chunk-3JJ3QSJ6.js} +2 -2
- package/dist/{chunk-CUSNJVQP.js → chunk-7H6AIQFC.js} +2 -2
- package/dist/{chunk-U3PXZWHJ.js → chunk-ADKJSLYH.js} +2 -2
- package/dist/{chunk-QAX4II24.js → chunk-AUFZGVPH.js} +2 -2
- package/dist/{chunk-J2ZVAPGA.js → chunk-BDJ5H6BY.js} +2 -2
- package/dist/{chunk-M6V7RJ4F.js → chunk-BQTQ5FSH.js} +8 -8
- package/dist/{chunk-L47G4NGG.js → chunk-D7NQCYON.js} +2 -2
- package/dist/{chunk-WTZZ6TS4.js → chunk-JBNA3RWX.js} +5 -5
- package/dist/{chunk-4KMXUSDA.js → chunk-JDX7FSEE.js} +3 -3
- package/dist/{chunk-FR5WCGPG.js → chunk-JEOQU5YQ.js} +2 -2
- package/dist/{chunk-VCEDQOKA.js → chunk-JYXU7XFQ.js} +5 -5
- package/dist/{chunk-EAF3SUOQ.js → chunk-K6DDDK5U.js} +7 -7
- package/dist/{chunk-7ZCZDRTJ.js → chunk-MWJLA3SK.js} +3 -3
- package/dist/{chunk-XQES4XMS.js → chunk-OS6V6AUS.js} +2 -2
- package/dist/{chunk-OAVU4XW2.js → chunk-PIOQ22BI.js} +6 -6
- package/dist/{chunk-SZB4YAPS.js → chunk-Q6TVHHJS.js} +4 -4
- package/dist/{chunk-HG2SQFVP.js → chunk-QWKXEUR3.js} +2 -2
- package/dist/{chunk-SOZLET5T.js → chunk-R5HKFDMX.js} +4 -4
- package/dist/{chunk-WJZ2BV5H.js → chunk-RTLSASIG.js} +5 -5
- package/dist/{chunk-NMQSNJPT.js → chunk-SIDH6NYX.js} +4 -4
- package/dist/{chunk-5CN5DWZL.js → chunk-U34HVKOU.js} +35 -35
- package/dist/{chunk-7LDOGIIK.js → chunk-U3ULCRR5.js} +2 -2
- package/dist/{chunk-M5BG7NYZ.js → chunk-UGXR3FGB.js} +2 -2
- package/dist/{chunk-ACYC2MQ6.js → chunk-UUHVA3EP.js} +3 -3
- package/dist/{chunk-2FKHVC6A.js → chunk-VAKHNSKR.js} +3 -3
- package/dist/{chunk-4BHQDCIT.js → chunk-VXSEXHLF.js} +2 -2
- package/dist/{chunk-GCBJOTZL.js → chunk-WDICVPNC.js} +2 -2
- package/dist/{chunk-5ML6GHQX.js → chunk-WFZGUWWQ.js} +8 -8
- package/dist/{chunk-SIJBJRHO.js → chunk-XUHVOLBI.js} +3 -3
- package/dist/{chunk-KE3VSAM2.js → chunk-YBR5G3FR.js} +62 -4
- package/dist/chunk-YBR5G3FR.js.map +1 -0
- package/dist/{chunk-QDYDMKNY.js → chunk-Z3XRX5G6.js} +8 -8
- package/dist/{chunk-RGCNKORY.js → chunk-Z46NIT6Y.js} +2 -2
- package/dist/{cli-circuit-breaker-46QD5K4X.js → cli-circuit-breaker-O3SRTC2D.js} +3 -3
- package/dist/cli.js +47 -43
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-6UDWNWSG.js → composite-router-FGCCXTW7.js} +2 -2
- package/dist/{consensus-vote-BJTJBSAC.js → consensus-vote-6XPXNECR.js} +16 -16
- package/dist/{context-retriever-AF32AUWP.js → context-retriever-5ZTWDBOB.js} +8 -8
- package/dist/{doctor-deep-HDG27DON.js → doctor-deep-LMVPV2XK.js} +3 -3
- package/dist/{doctor-live-J4NKCAIC.js → doctor-live-I5EMLG2W.js} +9 -9
- package/dist/{expert-bridge-YL4XVDGZ.js → expert-bridge-XCOFEAAH.js} +4 -4
- package/dist/{factory-QHMJXPI7.js → factory-RO6WFMAM.js} +9 -9
- package/dist/{factory-HUZJENBV.js → factory-UWBH5S4U.js} +5 -5
- package/dist/{improvement-review-6TPXS3VW.js → improvement-review-4WOLRVMB.js} +5 -5
- package/dist/index.js +30 -30
- package/dist/{init-opencode-GVYBHTUJ.js → init-opencode-HDVB7A2E.js} +6 -6
- package/dist/issue-triage-HJQK7C6D.js +17 -0
- package/dist/{pr-reviewer-helpers-FAVURSBY.js → pr-reviewer-helpers-7ER77ZQO.js} +4 -4
- package/dist/{registry-command-MZF4QA7H.js → registry-command-DKJVYKGI.js} +2 -2
- package/dist/{repo-security-plan-BROJ243L.js → repo-security-plan-KTLCJNJ4.js} +3 -3
- package/dist/{research-helpers-synthesize-VIUVR626.js → research-helpers-synthesize-D4W5C27B.js} +4 -4
- package/dist/{routing-memory-TKRPQIOL.js → routing-memory-ZV5EBOKF.js} +2 -2
- package/dist/{session-memory-EFWXUVUY.js → session-memory-VOPXMUVU.js} +3 -3
- package/dist/{setup-command-DOQYI3SG.js → setup-command-TNHWMJIJ.js} +14 -14
- package/dist/{setup-config-WL5FOPUX.js → setup-config-JUJWPZW3.js} +3 -3
- package/dist/{setup-custom-api-OP5BHA7S.js → setup-custom-api-WCVFLOCN.js} +4 -4
- package/dist/{tool-memory-AQMUNZUN.js → tool-memory-FSBMC4MW.js} +5 -5
- package/dist/{unified-registry-UQBZMGUH.js → unified-registry-QV2LXC45.js} +10 -10
- package/dist/{weather-report-5USEJKDB.js → weather-report-J6LIGRJ7.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-KE3VSAM2.js.map +0 -1
- package/dist/issue-triage-XHS65H3P.js +0 -17
- /package/dist/{child-mcp-config-SG5D6EHE.js.map → child-mcp-config-KNFWHR5B.js.map} +0 -0
- /package/dist/{chunk-VNPF3XDJ.js.map → chunk-3F7XUEXM.js.map} +0 -0
- /package/dist/{chunk-6YPUY4DX.js.map → chunk-3JJ3QSJ6.js.map} +0 -0
- /package/dist/{chunk-CUSNJVQP.js.map → chunk-7H6AIQFC.js.map} +0 -0
- /package/dist/{chunk-U3PXZWHJ.js.map → chunk-ADKJSLYH.js.map} +0 -0
- /package/dist/{chunk-QAX4II24.js.map → chunk-AUFZGVPH.js.map} +0 -0
- /package/dist/{chunk-J2ZVAPGA.js.map → chunk-BDJ5H6BY.js.map} +0 -0
- /package/dist/{chunk-M6V7RJ4F.js.map → chunk-BQTQ5FSH.js.map} +0 -0
- /package/dist/{chunk-L47G4NGG.js.map → chunk-D7NQCYON.js.map} +0 -0
- /package/dist/{chunk-WTZZ6TS4.js.map → chunk-JBNA3RWX.js.map} +0 -0
- /package/dist/{chunk-4KMXUSDA.js.map → chunk-JDX7FSEE.js.map} +0 -0
- /package/dist/{chunk-FR5WCGPG.js.map → chunk-JEOQU5YQ.js.map} +0 -0
- /package/dist/{chunk-VCEDQOKA.js.map → chunk-JYXU7XFQ.js.map} +0 -0
- /package/dist/{chunk-EAF3SUOQ.js.map → chunk-K6DDDK5U.js.map} +0 -0
- /package/dist/{chunk-7ZCZDRTJ.js.map → chunk-MWJLA3SK.js.map} +0 -0
- /package/dist/{chunk-XQES4XMS.js.map → chunk-OS6V6AUS.js.map} +0 -0
- /package/dist/{chunk-OAVU4XW2.js.map → chunk-PIOQ22BI.js.map} +0 -0
- /package/dist/{chunk-SZB4YAPS.js.map → chunk-Q6TVHHJS.js.map} +0 -0
- /package/dist/{chunk-HG2SQFVP.js.map → chunk-QWKXEUR3.js.map} +0 -0
- /package/dist/{chunk-SOZLET5T.js.map → chunk-R5HKFDMX.js.map} +0 -0
- /package/dist/{chunk-WJZ2BV5H.js.map → chunk-RTLSASIG.js.map} +0 -0
- /package/dist/{chunk-NMQSNJPT.js.map → chunk-SIDH6NYX.js.map} +0 -0
- /package/dist/{chunk-5CN5DWZL.js.map → chunk-U34HVKOU.js.map} +0 -0
- /package/dist/{chunk-7LDOGIIK.js.map → chunk-U3ULCRR5.js.map} +0 -0
- /package/dist/{chunk-M5BG7NYZ.js.map → chunk-UGXR3FGB.js.map} +0 -0
- /package/dist/{chunk-ACYC2MQ6.js.map → chunk-UUHVA3EP.js.map} +0 -0
- /package/dist/{chunk-2FKHVC6A.js.map → chunk-VAKHNSKR.js.map} +0 -0
- /package/dist/{chunk-4BHQDCIT.js.map → chunk-VXSEXHLF.js.map} +0 -0
- /package/dist/{chunk-GCBJOTZL.js.map → chunk-WDICVPNC.js.map} +0 -0
- /package/dist/{chunk-5ML6GHQX.js.map → chunk-WFZGUWWQ.js.map} +0 -0
- /package/dist/{chunk-SIJBJRHO.js.map → chunk-XUHVOLBI.js.map} +0 -0
- /package/dist/{chunk-QDYDMKNY.js.map → chunk-Z3XRX5G6.js.map} +0 -0
- /package/dist/{chunk-RGCNKORY.js.map → chunk-Z46NIT6Y.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-46QD5K4X.js.map → cli-circuit-breaker-O3SRTC2D.js.map} +0 -0
- /package/dist/{composite-router-6UDWNWSG.js.map → composite-router-FGCCXTW7.js.map} +0 -0
- /package/dist/{consensus-vote-BJTJBSAC.js.map → consensus-vote-6XPXNECR.js.map} +0 -0
- /package/dist/{context-retriever-AF32AUWP.js.map → context-retriever-5ZTWDBOB.js.map} +0 -0
- /package/dist/{doctor-deep-HDG27DON.js.map → doctor-deep-LMVPV2XK.js.map} +0 -0
- /package/dist/{doctor-live-J4NKCAIC.js.map → doctor-live-I5EMLG2W.js.map} +0 -0
- /package/dist/{expert-bridge-YL4XVDGZ.js.map → expert-bridge-XCOFEAAH.js.map} +0 -0
- /package/dist/{factory-HUZJENBV.js.map → factory-RO6WFMAM.js.map} +0 -0
- /package/dist/{factory-QHMJXPI7.js.map → factory-UWBH5S4U.js.map} +0 -0
- /package/dist/{improvement-review-6TPXS3VW.js.map → improvement-review-4WOLRVMB.js.map} +0 -0
- /package/dist/{init-opencode-GVYBHTUJ.js.map → init-opencode-HDVB7A2E.js.map} +0 -0
- /package/dist/{issue-triage-XHS65H3P.js.map → issue-triage-HJQK7C6D.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-FAVURSBY.js.map → pr-reviewer-helpers-7ER77ZQO.js.map} +0 -0
- /package/dist/{registry-command-MZF4QA7H.js.map → registry-command-DKJVYKGI.js.map} +0 -0
- /package/dist/{repo-security-plan-BROJ243L.js.map → repo-security-plan-KTLCJNJ4.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-VIUVR626.js.map → research-helpers-synthesize-D4W5C27B.js.map} +0 -0
- /package/dist/{routing-memory-TKRPQIOL.js.map → routing-memory-ZV5EBOKF.js.map} +0 -0
- /package/dist/{session-memory-EFWXUVUY.js.map → session-memory-VOPXMUVU.js.map} +0 -0
- /package/dist/{setup-command-DOQYI3SG.js.map → setup-command-TNHWMJIJ.js.map} +0 -0
- /package/dist/{setup-config-WL5FOPUX.js.map → setup-config-JUJWPZW3.js.map} +0 -0
- /package/dist/{setup-custom-api-OP5BHA7S.js.map → setup-custom-api-WCVFLOCN.js.map} +0 -0
- /package/dist/{tool-memory-AQMUNZUN.js.map → tool-memory-FSBMC4MW.js.map} +0 -0
- /package/dist/{unified-registry-UQBZMGUH.js.map → unified-registry-QV2LXC45.js.map} +0 -0
- /package/dist/{weather-report-5USEJKDB.js.map → weather-report-J6LIGRJ7.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateSecurityPlan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z46NIT6Y.js";
|
|
4
4
|
import {
|
|
5
5
|
analyzeGitHubRepo
|
|
6
6
|
} from "./chunk-HFOQKCD2.js";
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
DEFAULT_TASK_TTL_MS,
|
|
23
23
|
DEFAULT_TOOL_RATE_LIMITS,
|
|
24
24
|
clampTaskTtl
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-BQTQ5FSH.js";
|
|
26
26
|
import {
|
|
27
27
|
executeExpert
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-K6DDDK5U.js";
|
|
29
29
|
import {
|
|
30
30
|
JobStatusSchema,
|
|
31
31
|
abortJob,
|
|
@@ -46,24 +46,24 @@ import {
|
|
|
46
46
|
simulationDeniedResult,
|
|
47
47
|
toJobSummary,
|
|
48
48
|
writeJobCancelled
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-Z3XRX5G6.js";
|
|
50
50
|
import {
|
|
51
51
|
allOf
|
|
52
52
|
} from "./chunk-OQB3XC5O.js";
|
|
53
53
|
import {
|
|
54
54
|
normalizeTopicToCanonical,
|
|
55
55
|
synthesizeResearch
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-UUHVA3EP.js";
|
|
57
57
|
import {
|
|
58
58
|
IssueTriage
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-PIOQ22BI.js";
|
|
60
60
|
import {
|
|
61
61
|
resolveEnvMode,
|
|
62
62
|
sanitizeInput
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-3JJ3QSJ6.js";
|
|
64
64
|
import {
|
|
65
65
|
withPrerequisite
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-XUHVOLBI.js";
|
|
67
67
|
import {
|
|
68
68
|
NOOP_NOTIFIER,
|
|
69
69
|
RateLimiter,
|
|
@@ -87,18 +87,18 @@ import {
|
|
|
87
87
|
withAuditTrail,
|
|
88
88
|
withProgressHeartbeat,
|
|
89
89
|
wrapToolWithTimeout
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-MWJLA3SK.js";
|
|
91
91
|
import {
|
|
92
92
|
createAuditTrail,
|
|
93
93
|
createGraphAuditBridge,
|
|
94
94
|
emitPipelinePolicyEvent
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-7H6AIQFC.js";
|
|
96
96
|
import {
|
|
97
97
|
EventTopics,
|
|
98
98
|
createEvent,
|
|
99
99
|
getGlobalEventBus,
|
|
100
100
|
getGlobalRegistry
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-SIDH6NYX.js";
|
|
102
102
|
import {
|
|
103
103
|
IDENTIFIER_RE,
|
|
104
104
|
LANG_VALUES,
|
|
@@ -131,31 +131,31 @@ import {
|
|
|
131
131
|
parseRegistry,
|
|
132
132
|
sourceExistsInRegistry,
|
|
133
133
|
summarizeContextForPrompt
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-RTLSASIG.js";
|
|
135
135
|
import {
|
|
136
136
|
loadPapersRegistry,
|
|
137
137
|
loadTechniquesRegistry
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-QWKXEUR3.js";
|
|
139
139
|
import {
|
|
140
140
|
resolveInsideRoot
|
|
141
141
|
} from "./chunk-NUBSJGQZ.js";
|
|
142
142
|
import {
|
|
143
143
|
getTokenEnvVars,
|
|
144
144
|
resolveToken
|
|
145
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-3F7XUEXM.js";
|
|
146
146
|
import {
|
|
147
147
|
DEFAULT_RELEVANCE_CONFIG,
|
|
148
148
|
MemoryImportance,
|
|
149
149
|
calculateTextJaccardSimilarity,
|
|
150
150
|
getToolMemory
|
|
151
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-Q6TVHHJS.js";
|
|
152
152
|
import {
|
|
153
153
|
STOPWORDS,
|
|
154
154
|
truncateWithInfo
|
|
155
155
|
} from "./chunk-6T3EPABN.js";
|
|
156
156
|
import {
|
|
157
157
|
createSessionMemory
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-WDICVPNC.js";
|
|
159
159
|
import {
|
|
160
160
|
BUILT_IN_EXPERTS,
|
|
161
161
|
BuiltInExpertTypeSchema,
|
|
@@ -173,25 +173,25 @@ import {
|
|
|
173
173
|
getAvailableClis,
|
|
174
174
|
sleep,
|
|
175
175
|
withTimeout
|
|
176
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-WFZGUWWQ.js";
|
|
177
177
|
import {
|
|
178
178
|
BaseAdapter,
|
|
179
179
|
createStream,
|
|
180
180
|
requireApiKey,
|
|
181
181
|
validateApiKeyPresence
|
|
182
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-AUFZGVPH.js";
|
|
183
183
|
import {
|
|
184
184
|
DEFAULTS
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-JEOQU5YQ.js";
|
|
186
186
|
import {
|
|
187
187
|
getAvailabilityCache,
|
|
188
188
|
getCliForModelId,
|
|
189
189
|
resolveFallback
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-BDJ5H6BY.js";
|
|
191
191
|
import {
|
|
192
192
|
generateHyphenId,
|
|
193
193
|
generateUUID
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-ADKJSLYH.js";
|
|
195
195
|
import {
|
|
196
196
|
AGENT_ROUTER_TIMEOUTS,
|
|
197
197
|
API_TIMEOUTS,
|
|
@@ -291,7 +291,7 @@ import {
|
|
|
291
291
|
selectStrategyByManifest,
|
|
292
292
|
toExpertTaskAnalysisResult,
|
|
293
293
|
withStep
|
|
294
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-JDX7FSEE.js";
|
|
295
295
|
import {
|
|
296
296
|
ensureLearningDir,
|
|
297
297
|
getMetaOutcomesFile,
|
|
@@ -28265,7 +28265,7 @@ function execIdFields(executionId) {
|
|
|
28265
28265
|
async function populateUnifiedContextOnState(state, options) {
|
|
28266
28266
|
const taskCandidate = state["task"];
|
|
28267
28267
|
if (typeof taskCandidate !== "string" || taskCandidate === "") return;
|
|
28268
|
-
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-
|
|
28268
|
+
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-5ZTWDBOB.js");
|
|
28269
28269
|
const category = inferTaskCategory2(taskCandidate);
|
|
28270
28270
|
const executionId = options?.executionId;
|
|
28271
28271
|
const execFields = execIdFields(executionId);
|
|
@@ -43964,7 +43964,7 @@ async function tryIssueTriage(task) {
|
|
|
43964
43964
|
try {
|
|
43965
43965
|
const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
|
|
43966
43966
|
if (issueMatch === null) return null;
|
|
43967
|
-
const { createIssueTriage } = await import("./issue-triage-
|
|
43967
|
+
const { createIssueTriage } = await import("./issue-triage-HJQK7C6D.js");
|
|
43968
43968
|
const triage = createIssueTriage();
|
|
43969
43969
|
const owner = issueMatch[1] ?? "";
|
|
43970
43970
|
const num = issueMatch[2] ?? "";
|
|
@@ -43992,7 +43992,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
|
|
|
43992
43992
|
]);
|
|
43993
43993
|
async function classifyWithLLM(task) {
|
|
43994
43994
|
try {
|
|
43995
|
-
const { executeExpert: executeExpert2 } = await import("./expert-bridge-
|
|
43995
|
+
const { executeExpert: executeExpert2 } = await import("./expert-bridge-XCOFEAAH.js");
|
|
43996
43996
|
const prompt = [
|
|
43997
43997
|
"Classify this task into exactly one pipeline template.",
|
|
43998
43998
|
"Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
|
|
@@ -45733,7 +45733,7 @@ var memoryInitPromise = null;
|
|
|
45733
45733
|
async function initPipelineMemory() {
|
|
45734
45734
|
if (cachedMemory !== null) return cachedMemory;
|
|
45735
45735
|
try {
|
|
45736
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
45736
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-VOPXMUVU.js");
|
|
45737
45737
|
const { getLearningDir } = await import("./learning-persistence-EGY4VKKO.js");
|
|
45738
45738
|
const mem = createSessionMemory2(getLearningDir());
|
|
45739
45739
|
mem.startSession(`pipeline-${String(getTimeProvider().now())}`);
|
|
@@ -45795,7 +45795,7 @@ function recordRoutingExperience(category, success, durationMs, tokensUsed = 0,
|
|
|
45795
45795
|
callRecord(routingMemoryCache);
|
|
45796
45796
|
return;
|
|
45797
45797
|
}
|
|
45798
|
-
routingMemoryInitPromise ??= import("./routing-memory-
|
|
45798
|
+
routingMemoryInitPromise ??= import("./routing-memory-ZV5EBOKF.js").then(({ createRoutingMemory }) => {
|
|
45799
45799
|
routingMemoryCache ??= createRoutingMemory();
|
|
45800
45800
|
return routingMemoryCache;
|
|
45801
45801
|
}).catch((error) => {
|
|
@@ -45829,7 +45829,7 @@ ${text}` : "";
|
|
|
45829
45829
|
}
|
|
45830
45830
|
async function getWeatherContext() {
|
|
45831
45831
|
try {
|
|
45832
|
-
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-
|
|
45832
|
+
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-J6LIGRJ7.js");
|
|
45833
45833
|
const report = generateWeatherReport2({ includeAdaptive: true });
|
|
45834
45834
|
const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
|
|
45835
45835
|
if (!Array.isArray(mappings) || mappings.length === 0) return "";
|
|
@@ -45847,7 +45847,7 @@ ${lines}
|
|
|
45847
45847
|
}
|
|
45848
45848
|
async function getMemoryContext(task) {
|
|
45849
45849
|
try {
|
|
45850
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
45850
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-VOPXMUVU.js");
|
|
45851
45851
|
const { getLearningDir } = await import("./learning-persistence-EGY4VKKO.js");
|
|
45852
45852
|
const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
|
|
45853
45853
|
const learnings = memory.searchLearnings(task.slice(0, 200));
|
|
@@ -45966,7 +45966,7 @@ ${contextBlock}`;
|
|
|
45966
45966
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
45967
45967
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
45968
45968
|
try {
|
|
45969
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
45969
|
+
const { executeVoting } = await import("./consensus-vote-6XPXNECR.js");
|
|
45970
45970
|
const votingResult = await executeVoting(
|
|
45971
45971
|
{
|
|
45972
45972
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -46405,7 +46405,7 @@ async function searchCodebaseForTask(task) {
|
|
|
46405
46405
|
}
|
|
46406
46406
|
async function queryResearchRegistry(task) {
|
|
46407
46407
|
try {
|
|
46408
|
-
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-
|
|
46408
|
+
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-D4W5C27B.js");
|
|
46409
46409
|
const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
|
|
46410
46410
|
if (topic === void 0) return null;
|
|
46411
46411
|
const result = await synthesizeResearch2(topic.slice(0, 50));
|
|
@@ -46476,7 +46476,7 @@ function createScanStageWrapper() {
|
|
|
46476
46476
|
try {
|
|
46477
46477
|
const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
|
|
46478
46478
|
if (slug !== void 0) {
|
|
46479
|
-
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-
|
|
46479
|
+
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-KTLCJNJ4.js");
|
|
46480
46480
|
const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
|
|
46481
46481
|
const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
|
|
46482
46482
|
return output(PIPELINE_STATE_KEYS.FINDINGS, recs, getTimeProvider().now() - start, true);
|
|
@@ -49601,7 +49601,7 @@ var GitHubTaskTracker = class {
|
|
|
49601
49601
|
cachedProvider = null;
|
|
49602
49602
|
async getProvider() {
|
|
49603
49603
|
if (this.cachedProvider !== null) return this.cachedProvider;
|
|
49604
|
-
const { createScmProvider } = await import("./factory-
|
|
49604
|
+
const { createScmProvider } = await import("./factory-UWBH5S4U.js");
|
|
49605
49605
|
const result = await createScmProvider({ repo: this.config.repo ?? "" });
|
|
49606
49606
|
if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
|
|
49607
49607
|
this.cachedProvider = result.value;
|
|
@@ -50492,7 +50492,7 @@ async function probeSource(source, includeModelIds) {
|
|
|
50492
50492
|
}
|
|
50493
50493
|
}
|
|
50494
50494
|
async function defaultSources(includeOpenRouter) {
|
|
50495
|
-
const { createAllAdapters: createAllAdapters2 } = await import("./factory-
|
|
50495
|
+
const { createAllAdapters: createAllAdapters2 } = await import("./factory-RO6WFMAM.js");
|
|
50496
50496
|
const adapters = createAllAdapters2();
|
|
50497
50497
|
return buildDefaultModelSources(adapters, { includeOpenRouter });
|
|
50498
50498
|
}
|
|
@@ -54534,4 +54534,4 @@ export {
|
|
|
54534
54534
|
shutdownFeedbackSubscriber,
|
|
54535
54535
|
createEventBusBridge
|
|
54536
54536
|
};
|
|
54537
|
-
//# sourceMappingURL=chunk-
|
|
54537
|
+
//# sourceMappingURL=chunk-U34HVKOU.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
err,
|
|
5
5
|
getErrorMessage,
|
|
6
6
|
ok
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JDX7FSEE.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-U3ULCRR5.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getTimeProvider,
|
|
9
9
|
isRateLimitText,
|
|
10
10
|
ok
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JDX7FSEE.js";
|
|
12
12
|
|
|
13
13
|
// src/cli-adapters/circuit-breaker-types.ts
|
|
14
14
|
var CircuitErrorCode = {
|
|
@@ -540,4 +540,4 @@ export {
|
|
|
540
540
|
CliCircuitBreakerIntegration,
|
|
541
541
|
createCliCircuitBreakerIntegration
|
|
542
542
|
};
|
|
543
|
-
//# sourceMappingURL=chunk-
|
|
543
|
+
//# sourceMappingURL=chunk-UGXR3FGB.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadPapersRegistry
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QWKXEUR3.js";
|
|
4
4
|
import {
|
|
5
5
|
getErrorMessage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JDX7FSEE.js";
|
|
7
7
|
|
|
8
8
|
// src/cli/research-helpers-synthesize.ts
|
|
9
9
|
import { z } from "zod";
|
|
@@ -876,4 +876,4 @@ export {
|
|
|
876
876
|
AttributedInsightSchema,
|
|
877
877
|
synthesizeResearch
|
|
878
878
|
};
|
|
879
|
-
//# sourceMappingURL=chunk-
|
|
879
|
+
//# sourceMappingURL=chunk-UUHVA3EP.js.map
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
gateWithReputation,
|
|
13
13
|
resolveReputationGatingMode,
|
|
14
14
|
sanitizeInput
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3JJ3QSJ6.js";
|
|
16
16
|
import {
|
|
17
17
|
createLogger,
|
|
18
18
|
getTimeProvider
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JDX7FSEE.js";
|
|
20
20
|
|
|
21
21
|
// src/dogfooding/pr-reviewer-helpers.ts
|
|
22
22
|
import { randomUUID } from "crypto";
|
|
@@ -291,4 +291,4 @@ export {
|
|
|
291
291
|
formatReviewComment,
|
|
292
292
|
createFailedReview
|
|
293
293
|
};
|
|
294
|
-
//# sourceMappingURL=chunk-
|
|
294
|
+
//# sourceMappingURL=chunk-VAKHNSKR.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
TASK_CATEGORIES,
|
|
3
3
|
getAdaptiveBonus,
|
|
4
4
|
getOutcomeStore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JDX7FSEE.js";
|
|
6
6
|
|
|
7
7
|
// src/cli/doctor-deep.ts
|
|
8
8
|
var CLI_NAMES = ["claude", "gemini", "codex", "opencode"];
|
|
@@ -106,4 +106,4 @@ export {
|
|
|
106
106
|
runDeepDiagnostics,
|
|
107
107
|
formatDeepDiagnostics
|
|
108
108
|
};
|
|
109
|
-
//# sourceMappingURL=chunk-
|
|
109
|
+
//# sourceMappingURL=chunk-VXSEXHLF.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getErrorMessage,
|
|
5
5
|
getTimeProvider,
|
|
6
6
|
ok
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JDX7FSEE.js";
|
|
8
8
|
|
|
9
9
|
// src/context/session-memory.ts
|
|
10
10
|
import * as fs from "fs";
|
|
@@ -352,4 +352,4 @@ export {
|
|
|
352
352
|
SessionMemory,
|
|
353
353
|
createSessionMemory
|
|
354
354
|
};
|
|
355
|
-
//# sourceMappingURL=chunk-
|
|
355
|
+
//# sourceMappingURL=chunk-WDICVPNC.js.map
|
|
@@ -5,34 +5,34 @@ import {
|
|
|
5
5
|
planOptionalParams,
|
|
6
6
|
requireApiKey,
|
|
7
7
|
validateApiKeyPresence
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AUFZGVPH.js";
|
|
9
9
|
import {
|
|
10
10
|
CUSTOM_API_DEFAULT_MODEL
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JEOQU5YQ.js";
|
|
12
12
|
import {
|
|
13
13
|
CUSTOM_API_BASE_URL_ENV,
|
|
14
14
|
PROVIDER_ENV_KEYS,
|
|
15
15
|
assertCustomApiHostResolvesPublic,
|
|
16
16
|
validateCustomApiBaseUrl
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YBR5G3FR.js";
|
|
18
18
|
import {
|
|
19
19
|
nexusMkdtempSync
|
|
20
20
|
} from "./chunk-SNJNRDKZ.js";
|
|
21
21
|
import {
|
|
22
22
|
getAvailabilityCache
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BDJ5H6BY.js";
|
|
24
24
|
import {
|
|
25
25
|
extractSystemPrompt
|
|
26
26
|
} from "./chunk-QZUG667L.js";
|
|
27
27
|
import {
|
|
28
28
|
generateHyphenId
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ADKJSLYH.js";
|
|
30
30
|
import {
|
|
31
31
|
CliCircuitBreaker,
|
|
32
32
|
DEFAULT_CIRCUIT_BREAKER_CONFIG,
|
|
33
33
|
getCliCircuitBreakerSnapshot,
|
|
34
34
|
getDefaultCliCircuitBreakerRegistry
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-UGXR3FGB.js";
|
|
36
36
|
import {
|
|
37
37
|
CLI_SUBPROCESS_TIMEOUTS,
|
|
38
38
|
CLI_TIMEOUTS,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
resolveCliAlias,
|
|
73
73
|
resolveRetryAfterMs,
|
|
74
74
|
retryAfterMsFromContext
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-JDX7FSEE.js";
|
|
76
76
|
|
|
77
77
|
// src/cli-adapters/cli-to-model-adapter.ts
|
|
78
78
|
var CliToModelAdapter = class {
|
|
@@ -4870,4 +4870,4 @@ export {
|
|
|
4870
4870
|
SdkAdapter,
|
|
4871
4871
|
createAutoAdapter
|
|
4872
4872
|
};
|
|
4873
|
-
//# sourceMappingURL=chunk-
|
|
4873
|
+
//# sourceMappingURL=chunk-WFZGUWWQ.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
toolStructuredError,
|
|
8
8
|
toolSuccessStructured,
|
|
9
9
|
wrapToolWithTimeout
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MWJLA3SK.js";
|
|
11
11
|
import {
|
|
12
12
|
JsonlStore,
|
|
13
13
|
SECURITY_KEYWORDS,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
getPipelineEventBus,
|
|
20
20
|
getTimeProvider,
|
|
21
21
|
isDeclaredNeverDeprecate
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JDX7FSEE.js";
|
|
23
23
|
import {
|
|
24
24
|
getNexusDataDir,
|
|
25
25
|
nexusDataPath
|
|
@@ -2132,4 +2132,4 @@ export {
|
|
|
2132
2132
|
runImprovementReview,
|
|
2133
2133
|
registerImprovementReviewTool
|
|
2134
2134
|
};
|
|
2135
|
-
//# sourceMappingURL=chunk-
|
|
2135
|
+
//# sourceMappingURL=chunk-XUHVOLBI.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
createLogger,
|
|
4
4
|
err,
|
|
5
5
|
ok
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JDX7FSEE.js";
|
|
7
7
|
|
|
8
8
|
// src/adapters/sdk/types.ts
|
|
9
9
|
var PROVIDER_ENV_KEYS = {
|
|
@@ -82,6 +82,15 @@ function classifyIpAddress(normalized) {
|
|
|
82
82
|
}
|
|
83
83
|
return "not_an_ip";
|
|
84
84
|
}
|
|
85
|
+
function classifyLiteral(hostname, normalized) {
|
|
86
|
+
const literal = classifyIpAddress(normalized);
|
|
87
|
+
if (literal === null || literal === "not_an_ip") return ok(void 0);
|
|
88
|
+
return err(
|
|
89
|
+
new ConfigError(
|
|
90
|
+
`Custom API host '${hostname}' is a ${literal.reason} address: ${literal.message}`
|
|
91
|
+
)
|
|
92
|
+
);
|
|
93
|
+
}
|
|
85
94
|
async function assertCustomApiHostResolvesPublic(hostname, opts = {}) {
|
|
86
95
|
const allowPrivate = opts.allowPrivate === true || resolveAllowPrivateFromEnv();
|
|
87
96
|
if (allowPrivate) {
|
|
@@ -89,7 +98,7 @@ async function assertCustomApiHostResolvesPublic(hostname, opts = {}) {
|
|
|
89
98
|
}
|
|
90
99
|
const normalized = normalizeHost(hostname);
|
|
91
100
|
if (isIPv4(normalized) || isIPv6(normalized)) {
|
|
92
|
-
return
|
|
101
|
+
return classifyLiteral(hostname, normalized);
|
|
93
102
|
}
|
|
94
103
|
let addresses;
|
|
95
104
|
try {
|
|
@@ -151,6 +160,47 @@ function classifyIPv4(ip) {
|
|
|
151
160
|
}
|
|
152
161
|
return null;
|
|
153
162
|
}
|
|
163
|
+
function foldTrailingQuad(s) {
|
|
164
|
+
const dotted = /(?:^|:)((?:\d{1,3}\.){3}\d{1,3})$/.exec(s);
|
|
165
|
+
if (dotted?.[1] === void 0) return s;
|
|
166
|
+
const q = dotted[1].split(".").map((n) => Number.parseInt(n, 10));
|
|
167
|
+
if (q.length !== 4 || q.some((n) => Number.isNaN(n) || n < 0 || n > 255)) return null;
|
|
168
|
+
const hi = ((q[0] ?? 0) << 8 | (q[1] ?? 0)).toString(16);
|
|
169
|
+
const lo = ((q[2] ?? 0) << 8 | (q[3] ?? 0)).toString(16);
|
|
170
|
+
return `${s.slice(0, s.length - dotted[1].length)}${hi}:${lo}`;
|
|
171
|
+
}
|
|
172
|
+
function toHextets(ip) {
|
|
173
|
+
const s = foldTrailingQuad(ip.toLowerCase());
|
|
174
|
+
if (s === null) return null;
|
|
175
|
+
const halves = s.split("::");
|
|
176
|
+
if (halves.length > 2) return null;
|
|
177
|
+
const head = halves[0] === "" || halves[0] === void 0 ? [] : halves[0].split(":");
|
|
178
|
+
const tail = halves[1] === "" || halves[1] === void 0 ? [] : halves[1].split(":");
|
|
179
|
+
const groups = halves.length === 1 ? head : [...head, ...Array(8 - head.length - tail.length).fill("0"), ...tail];
|
|
180
|
+
if (groups.length !== 8) return null;
|
|
181
|
+
const out = groups.map((g) => Number.parseInt(g === "" ? "0" : g, 16));
|
|
182
|
+
return out.some((n) => Number.isNaN(n) || n < 0 || n > 65535) ? null : out;
|
|
183
|
+
}
|
|
184
|
+
function embeddedIPv4(g) {
|
|
185
|
+
const top = g.slice(0, 6);
|
|
186
|
+
const prefixes = [
|
|
187
|
+
[0, 0, 0, 0, 0, 65535],
|
|
188
|
+
// ::ffff:0:0/96 — IPv4-mapped
|
|
189
|
+
[0, 0, 0, 0, 65535, 0],
|
|
190
|
+
// ::ffff:0:0:0/96 — IPv4-translated
|
|
191
|
+
[100, 65435, 0, 0, 0, 0],
|
|
192
|
+
// 64:ff9b::/96 — NAT64 well-known
|
|
193
|
+
[0, 0, 0, 0, 0, 0]
|
|
194
|
+
// ::a.b.c.d — deprecated IPv4-compatible
|
|
195
|
+
];
|
|
196
|
+
const matched = prefixes.some((p) => p.every((v, i) => top[i] === v));
|
|
197
|
+
if (!matched) return null;
|
|
198
|
+
const g6 = g[6] ?? 0;
|
|
199
|
+
const g7 = g[7] ?? 0;
|
|
200
|
+
if (top.every((v) => v === 0) && g6 === 0 && g7 <= 1) return null;
|
|
201
|
+
const octets = [g6 >> 8 & 255, g6 & 255, g7 >> 8 & 255, g7 & 255];
|
|
202
|
+
return octets.join(".");
|
|
203
|
+
}
|
|
154
204
|
function classifyIPv6(ip) {
|
|
155
205
|
const lower = ip.toLowerCase();
|
|
156
206
|
if (lower === "::1") return { reason: "loopback", message: `IPv6 loopback (${ip})` };
|
|
@@ -159,7 +209,15 @@ function classifyIPv6(ip) {
|
|
|
159
209
|
if (/^fc|^fd/.test(lower)) {
|
|
160
210
|
return { reason: "private_range", message: `IPv6 unique-local (${ip}, fc00::/7)` };
|
|
161
211
|
}
|
|
162
|
-
|
|
212
|
+
const groups = toHextets(lower);
|
|
213
|
+
if (groups === null) return null;
|
|
214
|
+
if (groups.every((n) => n === 0)) {
|
|
215
|
+
return { reason: "reserved", message: `IPv6 unspecified (${ip}) \u2014 routes to localhost` };
|
|
216
|
+
}
|
|
217
|
+
const v4 = embeddedIPv4(groups);
|
|
218
|
+
if (v4 === null) return null;
|
|
219
|
+
const detail = classifyIPv4(v4);
|
|
220
|
+
return detail === null ? null : { reason: detail.reason, message: `${detail.message} via IPv6 (${ip})` };
|
|
163
221
|
}
|
|
164
222
|
|
|
165
223
|
export {
|
|
@@ -169,4 +227,4 @@ export {
|
|
|
169
227
|
validateCustomApiBaseUrl,
|
|
170
228
|
assertCustomApiHostResolvesPublic
|
|
171
229
|
};
|
|
172
|
-
//# sourceMappingURL=chunk-
|
|
230
|
+
//# sourceMappingURL=chunk-YBR5G3FR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/adapters/sdk/types.ts","../src/adapters/sdk/custom-api-validation.ts"],"sourcesContent":["/**\n * nexus-agents/adapters/sdk - Shared Types\n *\n * Type definitions for AI SDK adapter layer.\n *\n * @module adapters/sdk/types\n * (Source: Issue #1123 — AI SDK provider layer)\n */\n\n/**\n * Supported AI SDK provider identifiers.\n *\n * `custom-openai` is for OpenAI-compatible gateways (multi-vendor proxies,\n * self-hosted LLM servers, corporate model gateways) — uses the same\n * @ai-sdk/openai package but with a configurable `baseURL`.\n */\nexport type SdkProviderId = 'anthropic' | 'openai' | 'google' | 'custom-openai';\n\n/**\n * Configuration for creating an AI SDK adapter.\n */\nexport interface SdkAdapterConfig {\n /** Provider identifier */\n providerId: SdkProviderId;\n /** Model to use (e.g., 'claude-sonnet-4-6', 'gpt-4o') */\n modelId: string;\n /** API key (falls back to environment variable) */\n apiKey?: string;\n /**\n * Base URL for OpenAI-compatible gateways. Required when\n * `providerId === 'custom-openai'`, ignored otherwise. Falls back to\n * the `NEXUS_CUSTOM_API_BASE_URL` environment variable.\n */\n baseUrl?: string;\n /** Request timeout in milliseconds */\n timeout?: number;\n /** Maximum retries on transient failures */\n maxRetries?: number;\n}\n\n/**\n * Maps provider IDs to their environment variable names.\n */\nexport const PROVIDER_ENV_KEYS: Record<SdkProviderId, string> = {\n anthropic: 'ANTHROPIC_API_KEY',\n openai: 'OPENAI_API_KEY',\n google: 'GOOGLE_AI_API_KEY',\n 'custom-openai': 'NEXUS_CUSTOM_API_KEY',\n};\n\n/**\n * Environment variable name for the custom gateway base URL.\n * Keep in sync with `SdkAdapterConfig.baseUrl`.\n */\nexport const CUSTOM_API_BASE_URL_ENV = 'NEXUS_CUSTOM_API_BASE_URL';\n\n/**\n * Escape hatch: set to `1`/`true` to allow the custom gateway base URL to\n * resolve to a loopback or RFC 1918 private address. Default is DENY —\n * SSRF defense. Only disable this when you know the gateway runs on a\n * trusted internal host and you accept the risk.\n */\nexport const CUSTOM_API_ALLOW_PRIVATE_ENV = 'NEXUS_CUSTOM_API_ALLOW_PRIVATE';\n","/**\n * Validation for the `custom-openai` SDK adapter's gateway URL.\n *\n * The base URL is user-provided, so without validation the adapter becomes\n * an SSRF vector: a malicious prompt that reshaped env vars, or a typo in\n * the config, could point nexus-agents at `http://169.254.169.254/` (AWS\n * metadata) or `http://localhost:5432/` (internal services). This module\n * rejects such URLs unless the user explicitly opts in via\n * `NEXUS_CUSTOM_API_ALLOW_PRIVATE=1`.\n *\n * Called out in the #2119 consensus vote by the Security Engineer role.\n *\n * @module adapters/sdk/custom-api-validation\n */\n\nimport { isIPv4, isIPv6 } from 'node:net';\nimport { lookup as dnsLookup } from 'node:dns/promises';\nimport { ConfigError, ok, err, createLogger, type Result } from '../../core/index.js';\nimport { CUSTOM_API_ALLOW_PRIVATE_ENV } from './types.js';\n\nconst logger = createLogger({ module: 'custom-api-validation' });\n\n/**\n * Why a given URL was rejected. Machine-readable so error messages can\n * distinguish root causes in downstream tooling.\n */\nexport type BaseUrlRejectionReason =\n | 'empty'\n | 'not_a_url'\n | 'not_http_https'\n | 'loopback'\n | 'link_local'\n | 'private_range'\n | 'reserved';\n\ninterface RejectionDetail {\n readonly reason: BaseUrlRejectionReason;\n readonly message: string;\n}\n\n/**\n * Validates a user-provided custom-gateway base URL. Returns the URL as an\n * `ok` Result if it passes, or a `ConfigError` with a machine-readable\n * reason if it fails.\n *\n * Pass `{ allowPrivate: true }` (or set the env var) to bypass the SSRF\n * checks — use this only when the gateway is on a trusted internal host\n * and you accept the risk.\n */\nexport function validateCustomApiBaseUrl(\n raw: string | undefined,\n opts: { readonly allowPrivate?: boolean } = {}\n): Result<URL, ConfigError> {\n if (raw === undefined || raw.trim() === '') {\n return err(\n new ConfigError(\n 'Custom API base URL is required but missing. Set NEXUS_CUSTOM_API_BASE_URL or pass `baseUrl` in config.'\n )\n );\n }\n\n let url: URL;\n try {\n url = new URL(raw);\n } catch {\n return err(new ConfigError(`Custom API base URL is not a valid URL: ${raw}`));\n }\n\n if (url.protocol !== 'http:' && url.protocol !== 'https:') {\n return err(\n new ConfigError(`Custom API base URL must use http or https, got \"${url.protocol}\" in ${raw}`)\n );\n }\n\n const allowPrivate = opts.allowPrivate === true || resolveAllowPrivateFromEnv();\n if (!allowPrivate) {\n const rejection = classifyPrivateHost(url.hostname);\n if (rejection !== null) {\n return err(\n new ConfigError(\n `Custom API base URL rejected (SSRF guard, reason=\"${rejection.reason}\"): ${rejection.message}. ` +\n `Set ${CUSTOM_API_ALLOW_PRIVATE_ENV}=1 to bypass if the gateway runs on a trusted internal host.`\n )\n );\n }\n }\n\n return ok(url);\n}\n\nfunction resolveAllowPrivateFromEnv(): boolean {\n // Deliberately strict (case-sensitive, not parseBoolEnv): this disables an\n // SSRF guard, so we don't want extra case variants (e.g. `TRUE`) to loosen\n // the control. Fail-closed on anything but exact `1`/`true` (#3297).\n const v = process.env[CUSTOM_API_ALLOW_PRIVATE_ENV];\n return v === '1' || v === 'true';\n}\n\n/**\n * Returns a rejection reason if the hostname resolves (by string form) to\n * a loopback, link-local, or RFC 1918 private address; `null` otherwise.\n *\n * Note: this is a string-level check. It does NOT perform DNS resolution,\n * so a public DNS name that secretly resolves to a private IP will pass.\n * For that level of defense, callers should additionally run\n * {@link assertCustomApiHostResolvesPublic}, which performs a DNS lookup\n * and classifies each resolved address with the same range tables below.\n */\nfunction classifyPrivateHost(hostname: string): RejectionDetail | null {\n const normalized = normalizeHost(hostname);\n\n // Literal IP addresses — classify directly against the range tables.\n const literal = classifyIpAddress(normalized);\n if (literal !== 'not_an_ip') {\n return literal;\n }\n\n // Hostname literals that resolve to loopback without needing DNS\n if (\n normalized === 'localhost' ||\n normalized.endsWith('.localhost') ||\n normalized.endsWith('.local') // mDNS\n ) {\n return {\n reason: 'loopback',\n message: `hostname \"${hostname}\" resolves to loopback/mDNS`,\n };\n }\n\n return null;\n}\n\n/**\n * Strips IPv6 bracket wrapping (URL.hostname yields \"[::1]\") and lowercases,\n * giving the bare form the `node:net` checks expect. Shared by the sync and\n * async guards so the normalization rule lives in one place.\n */\nfunction normalizeHost(hostname: string): string {\n const stripped =\n hostname.startsWith('[') && hostname.endsWith(']') ? hostname.slice(1, -1) : hostname;\n return stripped.toLowerCase();\n}\n\n/**\n * Classifies a single (already normalized, bracket-stripped) address string.\n * Returns:\n * - a {@link RejectionDetail} if it is a private/loopback/link-local/reserved IP,\n * - `null` if it is a public IP literal (safe),\n * - the sentinel `'not_an_ip'` if the string is not an IP literal at all.\n *\n * This is the shared per-address classifier reused by both the sync\n * string-level guard ({@link classifyPrivateHost}) and the async\n * DNS-resolve-time guard ({@link assertCustomApiHostResolvesPublic}), so the\n * IPv4/IPv6 range tables live in exactly one place.\n */\nfunction classifyIpAddress(normalized: string): RejectionDetail | null | 'not_an_ip' {\n if (isIPv4(normalized)) {\n return classifyIPv4(normalized);\n }\n if (isIPv6(normalized)) {\n return classifyIPv6(normalized);\n }\n return 'not_an_ip';\n}\n\n/** Verdict for a host that is already an IP literal — no DNS required. */\nfunction classifyLiteral(hostname: string, normalized: string): Result<void, ConfigError> {\n const literal = classifyIpAddress(normalized);\n if (literal === null || literal === 'not_an_ip') return ok(undefined);\n return err(\n new ConfigError(\n `Custom API host '${hostname}' is a ${literal.reason} address: ${literal.message}`\n )\n );\n}\n\n/**\n * DNS-resolve-time SSRF guard for the custom-openai gateway.\n *\n * The sync {@link validateCustomApiBaseUrl} only inspects the hostname as a\n * string, so a PUBLIC DNS name that resolves to a PRIVATE/loopback/link-local\n * IP (e.g. an attacker-controlled `gateway.evil.test` pointing at\n * `169.254.169.254`) slips past it. This function closes that gap: it resolves\n * the hostname and runs the EXISTING IP classification against every returned\n * address, failing closed if ANY of them is private.\n *\n * Behaviour:\n * - `allowPrivate` (opt or env) → bypass, returns `ok` (matches the sync guard).\n * - hostname is already an IP literal → no DNS needed; the sync guard already\n * classified literals at construction, so return `ok`.\n * - otherwise `dns.lookup(hostname, { all: true })` and classify each address.\n * If ANY resolves private → `err(ConfigError)`.\n * - on a `dns.lookup` THROW (transient/NXDOMAIN/network error) → log debug and\n * return `ok`. Failing closed here is too aggressive: it would break legit\n * gateways on a flaky resolver, and this is additive defense-in-depth layered\n * on top of the sync string guard that already ran at construction. We only\n * REJECT on a SUCCESSFUL resolution to a private address.\n *\n * Residual risk (TOCTOU): this is RESOLVE-time, not socket-connect-time. A name\n * that passes here could rebind to a private IP before the actual connect\n * (DNS rebinding). A full fix needs a custom `fetch` `lookup` hook validating\n * the peer address at the socket layer — out of scope for this LOW\n * defense-in-depth pass (#3426).\n */\nexport async function assertCustomApiHostResolvesPublic(\n hostname: string,\n opts: { readonly allowPrivate?: boolean } = {}\n): Promise<Result<void, ConfigError>> {\n const allowPrivate = opts.allowPrivate === true || resolveAllowPrivateFromEnv();\n if (allowPrivate) {\n return ok(undefined);\n }\n\n const normalized = normalizeHost(hostname);\n\n // A literal needs no DNS, but it is still classified HERE rather than\n // assumed handled elsewhere. This used to return ok for any literal on the\n // grounds that the sync guard had classified it at construction — but\n // `discoverModels` calls only this guard, never the sync one, so on that\n // path each deferred to the other and neither ran. `http://169.254.169.254/`\n // reached IMDS, from a base URL that can come from a file rather than from\n // operator intent.\n if (isIPv4(normalized) || isIPv6(normalized)) {\n return classifyLiteral(hostname, normalized);\n }\n\n // Only `address` is read; the resolver's `family` is intentionally NOT\n // trusted — `classifyIpAddress` re-derives v4/v6 from the address string, so\n // a mislabeled family in the lookup result cannot let a private IP slip past.\n let addresses: ReadonlyArray<{ readonly address: string }>;\n try {\n addresses = await dnsLookup(hostname, { all: true });\n } catch (error) {\n // Fail OPEN: transient/NXDOMAIN/network errors must not break legit\n // gateways. The sync string guard already ran; this is additive only.\n logger.debug('custom-api SSRF resolve check: DNS lookup failed, skipping (fail-open)', {\n hostname,\n error: error instanceof Error ? error.message : String(error),\n });\n return ok(undefined);\n }\n\n const rejection = firstPrivateAddress(addresses);\n if (rejection !== null) {\n return err(\n new ConfigError(\n `Custom API base URL rejected (SSRF resolve guard, reason=\"${rejection.reason}\"): ` +\n `hostname \"${hostname}\" resolved to ${rejection.message}. ` +\n `Set ${CUSTOM_API_ALLOW_PRIVATE_ENV}=1 to bypass if the gateway runs on a trusted internal host.`\n )\n );\n }\n\n return ok(undefined);\n}\n\n/**\n * Returns the {@link RejectionDetail} for the first resolved address that\n * classifies as private/loopback/link-local/reserved, or `null` if every\n * address is public. Fail-closed: any single private hit trips the guard.\n */\nfunction firstPrivateAddress(\n addresses: ReadonlyArray<{ readonly address: string }>\n): RejectionDetail | null {\n for (const { address } of addresses) {\n const rejection = classifyIpAddress(address.toLowerCase());\n if (rejection !== null && rejection !== 'not_an_ip') {\n return rejection;\n }\n }\n return null;\n}\n\n/** IPv4 ranges the SSRF guard rejects, in order of specificity. */\nconst IPV4_RULES: ReadonlyArray<{\n readonly match: (a: number, b: number) => boolean;\n readonly reason: BaseUrlRejectionReason;\n readonly label: string;\n}> = [\n { match: (a) => a === 127, reason: 'loopback', label: 'IPv4 loopback' },\n { match: (a) => a === 10, reason: 'private_range', label: 'IPv4 private (10/8)' },\n {\n match: (a, b) => a === 172 && b >= 16 && b <= 31,\n reason: 'private_range',\n label: 'IPv4 private (172.16/12)',\n },\n {\n match: (a, b) => a === 192 && b === 168,\n reason: 'private_range',\n label: 'IPv4 private (192.168/16)',\n },\n {\n match: (a, b) => a === 169 && b === 254,\n reason: 'link_local',\n label: 'IPv4 link-local (169.254/16 — AWS IMDS)',\n },\n { match: (a) => a === 0, reason: 'reserved', label: 'IPv4 reserved (0/8)' },\n];\n\nfunction classifyIPv4(ip: string): RejectionDetail | null {\n const parts = ip.split('.').map((p) => Number.parseInt(p, 10));\n if (parts.length !== 4 || parts.some((n) => Number.isNaN(n))) return null;\n const [a, b] = parts as [number, number, number, number];\n for (const rule of IPV4_RULES) {\n if (rule.match(a, b)) {\n return { reason: rule.reason, message: `${rule.label} (${ip})` };\n }\n }\n return null;\n}\n\n/**\n * Expand an IPv6 literal to its eight 16-bit groups, or null if unparseable.\n *\n * A trailing dotted quad (`::ffff:1.2.3.4`) is folded into two groups first,\n * so callers see one representation regardless of spelling.\n */\nfunction foldTrailingQuad(s: string): string | null {\n const dotted = /(?:^|:)((?:\\d{1,3}\\.){3}\\d{1,3})$/.exec(s);\n if (dotted?.[1] === undefined) return s;\n const q = dotted[1].split('.').map((n) => Number.parseInt(n, 10));\n if (q.length !== 4 || q.some((n) => Number.isNaN(n) || n < 0 || n > 255)) return null;\n const hi = (((q[0] ?? 0) << 8) | (q[1] ?? 0)).toString(16);\n const lo = (((q[2] ?? 0) << 8) | (q[3] ?? 0)).toString(16);\n return `${s.slice(0, s.length - dotted[1].length)}${hi}:${lo}`;\n}\n\nfunction toHextets(ip: string): number[] | null {\n const s = foldTrailingQuad(ip.toLowerCase());\n if (s === null) return null;\n const halves = s.split('::');\n if (halves.length > 2) return null;\n const head = halves[0] === '' || halves[0] === undefined ? [] : halves[0].split(':');\n const tail = halves[1] === '' || halves[1] === undefined ? [] : halves[1].split(':');\n const groups =\n halves.length === 1\n ? head\n : [...head, ...Array<string>(8 - head.length - tail.length).fill('0'), ...tail];\n if (groups.length !== 8) return null;\n const out = groups.map((g) => Number.parseInt(g === '' ? '0' : g, 16));\n return out.some((n) => Number.isNaN(n) || n < 0 || n > 0xffff) ? null : out;\n}\n\n/**\n * The IPv4 address embedded in an IPv6 literal, in dotted form, or null.\n *\n * Covers every prefix that carries a routable IPv4 payload: IPv4-mapped\n * (`::ffff:0:0/96`), IPv4-translated (`::ffff:0:0:0/96`), the NAT64\n * well-known prefix (`64:ff9b::/96`), and the deprecated IPv4-compatible\n * form (`::a.b.c.d`). Each is the same destination under a different\n * spelling, and the IPv4 rules must apply to all of them.\n */\nfunction embeddedIPv4(g: readonly number[]): string | null {\n const top = g.slice(0, 6);\n const prefixes: ReadonlyArray<readonly number[]> = [\n [0, 0, 0, 0, 0, 0xffff], // ::ffff:0:0/96 — IPv4-mapped\n [0, 0, 0, 0, 0xffff, 0], // ::ffff:0:0:0/96 — IPv4-translated\n [0x64, 0xff9b, 0, 0, 0, 0], // 64:ff9b::/96 — NAT64 well-known\n [0, 0, 0, 0, 0, 0], // ::a.b.c.d — deprecated IPv4-compatible\n ];\n const matched = prefixes.some((p) => p.every((v, i) => top[i] === v));\n if (!matched) return null;\n const g6 = g[6] ?? 0;\n const g7 = g[7] ?? 0;\n // `::` and `::1` are their own addresses, not embedded IPv4.\n if (top.every((v) => v === 0) && g6 === 0 && g7 <= 1) return null;\n const octets = [(g6 >> 8) & 255, g6 & 255, (g7 >> 8) & 255, g7 & 255];\n return octets.join('.');\n}\n\nfunction classifyIPv6(ip: string): RejectionDetail | null {\n const lower = ip.toLowerCase();\n if (lower === '::1') return { reason: 'loopback', message: `IPv6 loopback (${ip})` };\n if (lower.startsWith('fe80:'))\n return { reason: 'link_local', message: `IPv6 link-local (${ip})` };\n // Unique-local: fc00::/7 → first byte has high bit set and second-high bit set\n if (/^fc|^fd/.test(lower)) {\n return { reason: 'private_range', message: `IPv6 unique-local (${ip}, fc00::/7)` };\n }\n\n const groups = toHextets(lower);\n if (groups === null) return null;\n\n if (groups.every((n) => n === 0)) {\n return { reason: 'reserved', message: `IPv6 unspecified (${ip}) — routes to localhost` };\n }\n\n // An IPv4 address written in IPv6 form is still that IPv4 address, and\n // `isIPv6` is true for it so it never reached the IPv4 rules — IMDS,\n // loopback and RFC1918 were all reachable this way. Note the URL parser\n // normalises the dotted spelling to hex, so the hex form is the one that\n // actually arrives.\n const v4 = embeddedIPv4(groups);\n if (v4 === null) return null;\n const detail = classifyIPv4(v4);\n return detail === null\n ? null\n : { reason: detail.reason, message: `${detail.message} via IPv6 (${ip})` };\n}\n"],"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AG,YAAY;AAC7B,MAAI,UAAU,MAAO,QAAO,EAAE,QAAQ,YAAY,SAAS,kBAAkB,EAAE,IAAI;AACnF,MAAI,MAAM,WAAW,OAAO;AAC1B,WAAO,EAAE,QAAQ,cAAc,SAAS,oBAAoB,EAAE,IAAI;AAEpE,MAAI,UAAU,KAAK,KAAK,GAAG;AACzB,WAAO,EAAE,QAAQ,iBAAiB,SAAS,sBAAsB,EAAE,cAAc;AAAA,EACnF;AAEA,QAAM,SAAS,UAAU,KAAK;AAC9B,MAAI,WAAW,KAAM,QAAO;AAE5B,MAAI,OAAO,MAAM,CAAC,MAAM,MAAM,CAAC,GAAG;AAChC,WAAO,EAAE,QAAQ,YAAY,SAAS,qBAAqB,EAAE,+BAA0B;AAAA,EACzF;AAOA,QAAM,KAAK,aAAa,MAAM;AAC9B,MAAI,OAAO,KAAM,QAAO;AACxB,QAAM,SAAS,aAAa,EAAE;AAC9B,SAAO,WAAW,OACd,OACA,EAAE,QAAQ,OAAO,QAAQ,SAAS,GAAG,OAAO,OAAO,cAAc,EAAE,IAAI;AAC7E;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
computeCostDetail,
|
|
3
3
|
priceBasisOf
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D7NQCYON.js";
|
|
5
5
|
import {
|
|
6
6
|
allOf
|
|
7
7
|
} from "./chunk-OQB3XC5O.js";
|
|
@@ -22,20 +22,20 @@ import {
|
|
|
22
22
|
toolSuccess,
|
|
23
23
|
withProgressHeartbeat,
|
|
24
24
|
wrapToolWithTimeout
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MWJLA3SK.js";
|
|
26
26
|
import {
|
|
27
27
|
createEvent,
|
|
28
28
|
getGlobalRegistry
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-SIDH6NYX.js";
|
|
30
30
|
import {
|
|
31
31
|
getToolMemory
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-Q6TVHHJS.js";
|
|
33
33
|
import {
|
|
34
34
|
authRemediation,
|
|
35
35
|
delay,
|
|
36
36
|
getAvailableClis,
|
|
37
37
|
withTimeout
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-WFZGUWWQ.js";
|
|
39
39
|
import {
|
|
40
40
|
AgentError,
|
|
41
41
|
CLI_NAMES,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
resolveClassGuardMs,
|
|
65
65
|
resolveModelIdentitySync,
|
|
66
66
|
resolveVoteTimeout
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-JDX7FSEE.js";
|
|
68
68
|
import {
|
|
69
69
|
ensureLearningDir,
|
|
70
70
|
getOutcomesFile
|
|
@@ -6162,7 +6162,7 @@ async function processVotesWithCascade(engineVotes, opts) {
|
|
|
6162
6162
|
var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
|
|
6163
6163
|
async function runContrarianCheck(proposal, log) {
|
|
6164
6164
|
try {
|
|
6165
|
-
const { executeExpert } = await import("./expert-bridge-
|
|
6165
|
+
const { executeExpert } = await import("./expert-bridge-XCOFEAAH.js");
|
|
6166
6166
|
const prompt = [
|
|
6167
6167
|
"You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
|
|
6168
6168
|
"Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
|
|
@@ -6728,4 +6728,4 @@ export {
|
|
|
6728
6728
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
6729
6729
|
registerConsensusVoteTool
|
|
6730
6730
|
};
|
|
6731
|
-
//# sourceMappingURL=chunk-
|
|
6731
|
+
//# sourceMappingURL=chunk-Z3XRX5G6.js.map
|