nexus-agents 2.77.13 → 2.78.0
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-MJMUF7TL.js → child-mcp-config-CTO2MBRM.js} +3 -4
- package/dist/{child-mcp-config-MJMUF7TL.js.map → child-mcp-config-CTO2MBRM.js.map} +1 -1
- package/dist/{chunk-YJ2IGAD2.js → chunk-2UYTFLMO.js} +2 -2
- package/dist/{chunk-6AY5DK4E.js → chunk-2YPG6PDG.js} +3 -3
- package/dist/{chunk-3VWMM6UF.js → chunk-3NIPH6UP.js} +2 -2
- package/dist/{chunk-JX6OI4FS.js → chunk-4N33QZLH.js} +13 -15
- package/dist/{chunk-JX6OI4FS.js.map → chunk-4N33QZLH.js.map} +1 -1
- package/dist/{chunk-JN6UWGHH.js → chunk-5O6XLBPP.js} +2 -2
- package/dist/{chunk-ERWXGXV2.js → chunk-6TFTVW77.js} +3 -3
- package/dist/{chunk-GFKGL2GQ.js → chunk-6WBTNZAY.js} +171 -83
- package/dist/chunk-6WBTNZAY.js.map +1 -0
- package/dist/{chunk-GOT7OAL5.js → chunk-7BMOZJYS.js} +29 -5
- package/dist/chunk-7BMOZJYS.js.map +1 -0
- package/dist/{chunk-C2LLQ6TW.js → chunk-7XCUZI4G.js} +4 -4
- package/dist/chunk-7XCUZI4G.js.map +1 -0
- package/dist/{chunk-TDV5ALHY.js → chunk-D6TM2VHX.js} +3 -3
- package/dist/{chunk-PWTJGGKB.js → chunk-DLXT23AC.js} +2 -2
- package/dist/chunk-DNO2INX5.js +276 -0
- package/dist/chunk-DNO2INX5.js.map +1 -0
- package/dist/{chunk-G2CSKBY5.js → chunk-FJWWSVWB.js} +29 -6
- package/dist/chunk-FJWWSVWB.js.map +1 -0
- package/dist/{chunk-DSQ5XM4O.js → chunk-FVPYP5DD.js} +4 -4
- package/dist/{chunk-MGLWPN2I.js → chunk-GONMG4NM.js} +2 -2
- package/dist/{chunk-RBZ4CDMY.js → chunk-GTGDVBLW.js} +5 -5
- package/dist/{chunk-YQMQSJQK.js → chunk-HYU4GZY6.js} +2 -2
- package/dist/{chunk-3DH5SLFH.js → chunk-K2QILJG4.js} +6 -6
- package/dist/{chunk-5WHWKY32.js → chunk-KT5FIBWS.js} +2 -2
- package/dist/{chunk-DIB6V67T.js → chunk-L6SCKLGO.js} +3 -3
- package/dist/{chunk-IPWCD22D.js → chunk-PLX6FCFC.js} +2 -2
- package/dist/chunk-PQHVC4BD.js +639 -0
- package/dist/chunk-PQHVC4BD.js.map +1 -0
- package/dist/chunk-Q5CFPIJ5.js +5581 -0
- package/dist/chunk-Q5CFPIJ5.js.map +1 -0
- package/dist/{chunk-G6ZPVADX.js → chunk-SD76JZBG.js} +2 -2
- package/dist/{chunk-Y2CP4Z5B.js → chunk-SWFJU3W2.js} +220 -4580
- package/dist/chunk-SWFJU3W2.js.map +1 -0
- package/dist/{chunk-3MRM53T4.js → chunk-WDYCIJWN.js} +640 -470
- package/dist/chunk-WDYCIJWN.js.map +1 -0
- package/dist/{chunk-CM3TORGV.js → chunk-YXWGEIQR.js} +2 -2
- package/dist/{chunk-7NK7BTWP.js → chunk-ZVCED4Z4.js} +2 -2
- package/dist/cli-circuit-breaker-I74ZQ44Q.js +13 -0
- package/dist/cli.js +109 -58
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-S6E26BCI.js → composite-router-V3OC57IE.js} +3 -4
- package/dist/consensus-vote-ESFPGEJE.js +30 -0
- package/dist/context-retriever-MB3D7KS6.js +18 -0
- package/dist/dist-NIXVXYIH.js +42 -0
- package/dist/doctor-deep-KQ765XZA.js +12 -0
- package/dist/expert-bridge-JKLC57IC.js +10 -0
- package/dist/factory-BUUXNGIB.js +14 -0
- package/dist/{factory-X3VKIGKP.js → factory-LHHYDVZX.js} +5 -6
- package/dist/index.d.ts +72 -8
- package/dist/index.js +208 -316
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-CFE7M6XA.js → init-opencode-GXZN2W5S.js} +6 -7
- package/dist/{init-opencode-CFE7M6XA.js.map → init-opencode-GXZN2W5S.js.map} +1 -1
- package/dist/issue-triage-RMXPDZ2K.js +15 -0
- package/dist/{learning-persistence-N6ILD2HX.js → learning-persistence-Q3HTOGTU.js} +2 -3
- package/dist/outcome-store-adapter-QRFJJIKB.js +57 -0
- package/dist/outcome-store-adapter-QRFJJIKB.js.map +1 -0
- package/dist/{registry-command-RPPC7N2K.js → registry-command-6E4YKAMT.js} +3 -4
- package/dist/{registry-command-RPPC7N2K.js.map → registry-command-6E4YKAMT.js.map} +1 -1
- package/dist/{repo-security-plan-7ZCDVH5O.js → repo-security-plan-AGRU72DL.js} +4 -5
- package/dist/research-helpers-synthesize-K2UCJQQG.js +13 -0
- package/dist/{routing-memory-5VTX7LQX.js → routing-memory-3B6DDZ76.js} +3 -4
- package/dist/{session-memory-7XBV6BMY.js → session-memory-L7EQIY2O.js} +4 -5
- package/dist/{setup-command-W6UKPODL.js → setup-command-VYV4RFWW.js} +11 -12
- package/dist/setup-config-EQT24DD4.js +10 -0
- package/dist/{setup-custom-api-WM5W5AY5.js → setup-custom-api-IBDV654K.js} +5 -6
- package/dist/{setup-custom-api-WM5W5AY5.js.map → setup-custom-api-IBDV654K.js.map} +1 -1
- package/dist/tool-memory-6HCHQLAN.js +19 -0
- package/dist/{weather-report-YJMVKJGA.js → weather-report-ER3WUZ7S.js} +3 -4
- package/package.json +3 -2
- package/dist/adaptive-memory-EI564K4C.js +0 -16
- package/dist/chunk-3MRM53T4.js.map +0 -1
- package/dist/chunk-BJ2OMC7P.js +0 -944
- package/dist/chunk-BJ2OMC7P.js.map +0 -1
- package/dist/chunk-C2LLQ6TW.js.map +0 -1
- package/dist/chunk-G2CSKBY5.js.map +0 -1
- package/dist/chunk-GFKGL2GQ.js.map +0 -1
- package/dist/chunk-GOT7OAL5.js.map +0 -1
- package/dist/chunk-I7ORMAO7.js +0 -32
- package/dist/chunk-I7ORMAO7.js.map +0 -1
- package/dist/chunk-Y2CP4Z5B.js.map +0 -1
- package/dist/cli-circuit-breaker-YX4BWZD5.js +0 -14
- package/dist/consensus-vote-MUQ4HPIF.js +0 -30
- package/dist/doctor-deep-BRU5ZUJI.js +0 -13
- package/dist/expert-bridge-ZPNVLJVN.js +0 -11
- package/dist/factory-A7DTCCUY.js +0 -15
- package/dist/issue-triage-6XD6CVPB.js +0 -16
- package/dist/mobimem-CG2MNS7V.js +0 -14
- package/dist/nexus-data-dir-77UO7N6J.js +0 -12
- package/dist/research-helpers-synthesize-36TUTUUA.js +0 -14
- package/dist/setup-config-EI5KROA3.js +0 -11
- /package/dist/{chunk-YJ2IGAD2.js.map → chunk-2UYTFLMO.js.map} +0 -0
- /package/dist/{chunk-6AY5DK4E.js.map → chunk-2YPG6PDG.js.map} +0 -0
- /package/dist/{chunk-3VWMM6UF.js.map → chunk-3NIPH6UP.js.map} +0 -0
- /package/dist/{chunk-JN6UWGHH.js.map → chunk-5O6XLBPP.js.map} +0 -0
- /package/dist/{chunk-ERWXGXV2.js.map → chunk-6TFTVW77.js.map} +0 -0
- /package/dist/{chunk-TDV5ALHY.js.map → chunk-D6TM2VHX.js.map} +0 -0
- /package/dist/{chunk-PWTJGGKB.js.map → chunk-DLXT23AC.js.map} +0 -0
- /package/dist/{chunk-DSQ5XM4O.js.map → chunk-FVPYP5DD.js.map} +0 -0
- /package/dist/{chunk-MGLWPN2I.js.map → chunk-GONMG4NM.js.map} +0 -0
- /package/dist/{chunk-RBZ4CDMY.js.map → chunk-GTGDVBLW.js.map} +0 -0
- /package/dist/{chunk-YQMQSJQK.js.map → chunk-HYU4GZY6.js.map} +0 -0
- /package/dist/{chunk-3DH5SLFH.js.map → chunk-K2QILJG4.js.map} +0 -0
- /package/dist/{chunk-5WHWKY32.js.map → chunk-KT5FIBWS.js.map} +0 -0
- /package/dist/{chunk-DIB6V67T.js.map → chunk-L6SCKLGO.js.map} +0 -0
- /package/dist/{chunk-IPWCD22D.js.map → chunk-PLX6FCFC.js.map} +0 -0
- /package/dist/{chunk-G6ZPVADX.js.map → chunk-SD76JZBG.js.map} +0 -0
- /package/dist/{chunk-CM3TORGV.js.map → chunk-YXWGEIQR.js.map} +0 -0
- /package/dist/{chunk-7NK7BTWP.js.map → chunk-ZVCED4Z4.js.map} +0 -0
- /package/dist/{adaptive-memory-EI564K4C.js.map → cli-circuit-breaker-I74ZQ44Q.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-YX4BWZD5.js.map → composite-router-V3OC57IE.js.map} +0 -0
- /package/dist/{composite-router-S6E26BCI.js.map → consensus-vote-ESFPGEJE.js.map} +0 -0
- /package/dist/{consensus-vote-MUQ4HPIF.js.map → context-retriever-MB3D7KS6.js.map} +0 -0
- /package/dist/{doctor-deep-BRU5ZUJI.js.map → dist-NIXVXYIH.js.map} +0 -0
- /package/dist/{expert-bridge-ZPNVLJVN.js.map → doctor-deep-KQ765XZA.js.map} +0 -0
- /package/dist/{factory-A7DTCCUY.js.map → expert-bridge-JKLC57IC.js.map} +0 -0
- /package/dist/{factory-X3VKIGKP.js.map → factory-BUUXNGIB.js.map} +0 -0
- /package/dist/{issue-triage-6XD6CVPB.js.map → factory-LHHYDVZX.js.map} +0 -0
- /package/dist/{learning-persistence-N6ILD2HX.js.map → issue-triage-RMXPDZ2K.js.map} +0 -0
- /package/dist/{mobimem-CG2MNS7V.js.map → learning-persistence-Q3HTOGTU.js.map} +0 -0
- /package/dist/{nexus-data-dir-77UO7N6J.js.map → repo-security-plan-AGRU72DL.js.map} +0 -0
- /package/dist/{repo-security-plan-7ZCDVH5O.js.map → research-helpers-synthesize-K2UCJQQG.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-36TUTUUA.js.map → routing-memory-3B6DDZ76.js.map} +0 -0
- /package/dist/{routing-memory-5VTX7LQX.js.map → session-memory-L7EQIY2O.js.map} +0 -0
- /package/dist/{session-memory-7XBV6BMY.js.map → setup-command-VYV4RFWW.js.map} +0 -0
- /package/dist/{setup-command-W6UKPODL.js.map → setup-config-EQT24DD4.js.map} +0 -0
- /package/dist/{setup-config-EI5KROA3.js.map → tool-memory-6HCHQLAN.js.map} +0 -0
- /package/dist/{weather-report-YJMVKJGA.js.map → weather-report-ER3WUZ7S.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
err,
|
|
8
8
|
getErrorMessage,
|
|
9
9
|
ok
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WDYCIJWN.js";
|
|
11
11
|
|
|
12
12
|
// src/cli/research-helpers-synthesize.ts
|
|
13
13
|
import { z } from "zod";
|
|
@@ -1015,4 +1015,4 @@ export {
|
|
|
1015
1015
|
AttributedInsightSchema,
|
|
1016
1016
|
synthesizeResearch
|
|
1017
1017
|
};
|
|
1018
|
-
//# sourceMappingURL=chunk-
|
|
1018
|
+
//# sourceMappingURL=chunk-5O6XLBPP.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GitHubProvider,
|
|
3
3
|
ScmError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SD76JZBG.js";
|
|
5
5
|
import {
|
|
6
6
|
CACHE_TIMEOUTS,
|
|
7
7
|
createLogger,
|
|
8
8
|
err,
|
|
9
9
|
getTimeProvider,
|
|
10
10
|
ok
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WDYCIJWN.js";
|
|
12
12
|
|
|
13
13
|
// src/security/trust-types.ts
|
|
14
14
|
import { z } from "zod";
|
|
@@ -1656,4 +1656,4 @@ export {
|
|
|
1656
1656
|
IssueTriage,
|
|
1657
1657
|
createIssueTriage
|
|
1658
1658
|
};
|
|
1659
|
-
//# sourceMappingURL=chunk-
|
|
1659
|
+
//# sourceMappingURL=chunk-6TFTVW77.js.map
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CodebaseIndex
|
|
3
|
+
} from "./chunk-AP2FD37C.js";
|
|
1
4
|
import {
|
|
2
5
|
SharedMemoryStore
|
|
3
6
|
} from "./chunk-ED6VQWNG.js";
|
|
4
7
|
import {
|
|
5
8
|
getTokenEnvVars,
|
|
6
9
|
resolveToken
|
|
7
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GONMG4NM.js";
|
|
8
11
|
import {
|
|
9
12
|
executeExpert
|
|
10
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-K2QILJG4.js";
|
|
11
14
|
import {
|
|
12
|
-
DEFAULT_RELEVANCE_CONFIG,
|
|
13
15
|
EventTopics,
|
|
14
16
|
NOOP_NOTIFIER,
|
|
15
17
|
RateLimiter,
|
|
@@ -19,12 +21,9 @@ import {
|
|
|
19
21
|
createEvent,
|
|
20
22
|
createMcpNotifier,
|
|
21
23
|
createSecureHandler,
|
|
22
|
-
generateHyphenId,
|
|
23
|
-
generateUUID,
|
|
24
24
|
getGlobalEventBus,
|
|
25
25
|
getGlobalRegistry,
|
|
26
26
|
getToolAnnotations,
|
|
27
|
-
getToolMemory,
|
|
28
27
|
getToolTimeout,
|
|
29
28
|
isRateLimitError,
|
|
30
29
|
toSdkCallback,
|
|
@@ -37,7 +36,7 @@ import {
|
|
|
37
36
|
withAccessPolicy,
|
|
38
37
|
withProgressHeartbeat,
|
|
39
38
|
wrapToolWithTimeout
|
|
40
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-SWFJU3W2.js";
|
|
41
40
|
import {
|
|
42
41
|
REGISTRY_PATH,
|
|
43
42
|
getProjectRoot,
|
|
@@ -46,37 +45,52 @@ import {
|
|
|
46
45
|
normalizeTopicToCanonical,
|
|
47
46
|
savePapersRegistry,
|
|
48
47
|
synthesizeResearch
|
|
49
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-5O6XLBPP.js";
|
|
50
49
|
import {
|
|
51
50
|
IssueTriage,
|
|
52
51
|
sanitizeInput
|
|
53
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-6TFTVW77.js";
|
|
54
53
|
import {
|
|
55
54
|
generateSecurityPlan
|
|
56
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-FJWWSVWB.js";
|
|
57
56
|
import {
|
|
58
57
|
analyzeGitHubRepo
|
|
59
58
|
} from "./chunk-7J7PNOJQ.js";
|
|
60
|
-
import {
|
|
61
|
-
CodebaseIndex
|
|
62
|
-
} from "./chunk-AP2FD37C.js";
|
|
63
59
|
import {
|
|
64
60
|
extractSymbolIndex,
|
|
65
61
|
extractSymbols
|
|
66
62
|
} from "./chunk-BQ4YXGGQ.js";
|
|
63
|
+
import {
|
|
64
|
+
getContextForTask,
|
|
65
|
+
inferTaskCategory,
|
|
66
|
+
summarizeContextForPrompt
|
|
67
|
+
} from "./chunk-DNO2INX5.js";
|
|
68
|
+
import {
|
|
69
|
+
DEFAULT_RELEVANCE_CONFIG,
|
|
70
|
+
MemoryImportance,
|
|
71
|
+
calculateTextJaccardSimilarity,
|
|
72
|
+
generateHyphenId,
|
|
73
|
+
generateUUID,
|
|
74
|
+
getToolMemory
|
|
75
|
+
} from "./chunk-Q5CFPIJ5.js";
|
|
67
76
|
import {
|
|
68
77
|
DEFAULT_TASK_TTL_MS,
|
|
69
78
|
DEFAULT_TOOL_RATE_LIMITS,
|
|
70
79
|
clampTaskTtl,
|
|
71
80
|
getAvailabilityCache,
|
|
72
81
|
resolveFallback
|
|
73
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-4N33QZLH.js";
|
|
74
83
|
import {
|
|
75
84
|
DEFAULTS
|
|
76
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-HYU4GZY6.js";
|
|
77
86
|
import {
|
|
78
87
|
resolveInsideRoot
|
|
79
88
|
} from "./chunk-NUBSJGQZ.js";
|
|
89
|
+
import {
|
|
90
|
+
STOPWORDS,
|
|
91
|
+
capitalizeWords,
|
|
92
|
+
truncateWithInfo
|
|
93
|
+
} from "./chunk-633WH2ML.js";
|
|
80
94
|
import {
|
|
81
95
|
CliDetectionCache,
|
|
82
96
|
asRecord,
|
|
@@ -84,7 +98,7 @@ import {
|
|
|
84
98
|
getAvailableClis,
|
|
85
99
|
sleep,
|
|
86
100
|
withTimeout
|
|
87
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-D6TM2VHX.js";
|
|
88
102
|
import {
|
|
89
103
|
BUILT_IN_EXPERTS,
|
|
90
104
|
BuiltInExpertTypeSchema,
|
|
@@ -92,17 +106,11 @@ import {
|
|
|
92
106
|
getSecurityKnowledgePrompt
|
|
93
107
|
} from "./chunk-ZM4O442V.js";
|
|
94
108
|
import {
|
|
95
|
-
|
|
96
|
-
} from "./chunk-
|
|
97
|
-
import {
|
|
98
|
-
MemoryImportance,
|
|
99
|
-
calculateTextJaccardSimilarity
|
|
100
|
-
} from "./chunk-BJ2OMC7P.js";
|
|
109
|
+
getMemoryRegistry
|
|
110
|
+
} from "./chunk-PQHVC4BD.js";
|
|
101
111
|
import {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
truncateWithInfo
|
|
105
|
-
} from "./chunk-633WH2ML.js";
|
|
112
|
+
createSessionMemory
|
|
113
|
+
} from "./chunk-3NIPH6UP.js";
|
|
106
114
|
import {
|
|
107
115
|
AGENT_ROUTER_TIMEOUTS,
|
|
108
116
|
API_TIMEOUTS,
|
|
@@ -172,11 +180,11 @@ import {
|
|
|
172
180
|
resolveModelIdentitySync,
|
|
173
181
|
toExpertTaskAnalysisResult,
|
|
174
182
|
withStep
|
|
175
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-WDYCIJWN.js";
|
|
176
184
|
import {
|
|
177
185
|
getNexusDataDir,
|
|
178
186
|
nexusDataPath
|
|
179
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-7BMOZJYS.js";
|
|
180
188
|
|
|
181
189
|
// src/agents/state-machine-types.ts
|
|
182
190
|
var VALID_TRANSITIONS = /* @__PURE__ */ new Map([
|
|
@@ -12513,7 +12521,8 @@ var DEFAULT_SKILL_LIBRARY_CONFIG = {
|
|
|
12513
12521
|
executionsBeforeEvaluation: 5,
|
|
12514
12522
|
enablePruning: true,
|
|
12515
12523
|
trackExecutionHistory: true,
|
|
12516
|
-
maxHistoryPerSkill: 100
|
|
12524
|
+
maxHistoryPerSkill: 100,
|
|
12525
|
+
minSuccessesForPromotion: 5
|
|
12517
12526
|
};
|
|
12518
12527
|
var COMPLEXITY_ORDER = {
|
|
12519
12528
|
primitive: 1,
|
|
@@ -12949,6 +12958,49 @@ var SkillLibrary = class {
|
|
|
12949
12958
|
const updated = calculateUpdatedMetrics(current, execution);
|
|
12950
12959
|
this.store.metrics.set(skillId, updated);
|
|
12951
12960
|
this.evaluateRetention(skillId);
|
|
12961
|
+
this.maybePromote(skillId, current, updated);
|
|
12962
|
+
}
|
|
12963
|
+
/**
|
|
12964
|
+
* Phase 6 of #2792 — promote a stabilized skill to the shared belief
|
|
12965
|
+
* store so future tasks (executed by other agents) see the signal.
|
|
12966
|
+
*
|
|
12967
|
+
* Fires exactly once per skill, when the successful-execution count
|
|
12968
|
+
* crosses {@link SkillLibraryConfig.minSuccessesForPromotion}. The
|
|
12969
|
+
* `previousMetrics → updatedMetrics` comparison guards against
|
|
12970
|
+
* re-promoting on every subsequent execution.
|
|
12971
|
+
*
|
|
12972
|
+
* Best-effort: a throwing/rejecting promoter is caught here so a
|
|
12973
|
+
* broken promotion bridge never breaks the local skill bookkeeping.
|
|
12974
|
+
*/
|
|
12975
|
+
maybePromote(skillId, previousMetrics, updatedMetrics) {
|
|
12976
|
+
if (this.config.skillPromoter === void 0) return;
|
|
12977
|
+
const threshold = this.config.minSuccessesForPromotion;
|
|
12978
|
+
const justCrossed = previousMetrics.successCount < threshold && updatedMetrics.successCount >= threshold;
|
|
12979
|
+
if (!justCrossed) return;
|
|
12980
|
+
const skill = this.store.skills.get(skillId);
|
|
12981
|
+
if (skill === void 0) return;
|
|
12982
|
+
try {
|
|
12983
|
+
const maybePromise = this.config.skillPromoter({
|
|
12984
|
+
skillId,
|
|
12985
|
+
name: skill.name,
|
|
12986
|
+
category: skill.category,
|
|
12987
|
+
successRate: updatedMetrics.successRate,
|
|
12988
|
+
executionCount: updatedMetrics.executionCount
|
|
12989
|
+
});
|
|
12990
|
+
if (maybePromise instanceof Promise) {
|
|
12991
|
+
maybePromise.catch((error) => {
|
|
12992
|
+
this.logger.debug("Skill promotion rejected", {
|
|
12993
|
+
skillId,
|
|
12994
|
+
error: error instanceof Error ? error.message : String(error)
|
|
12995
|
+
});
|
|
12996
|
+
});
|
|
12997
|
+
}
|
|
12998
|
+
} catch (error) {
|
|
12999
|
+
this.logger.debug("Skill promotion threw", {
|
|
13000
|
+
skillId,
|
|
13001
|
+
error: error instanceof Error ? error.message : String(error)
|
|
13002
|
+
});
|
|
13003
|
+
}
|
|
12952
13004
|
}
|
|
12953
13005
|
/**
|
|
12954
13006
|
* Evaluates whether a skill should be retained.
|
|
@@ -26617,9 +26669,32 @@ async function runSinglePrecondition(config, ctx, options) {
|
|
|
26617
26669
|
var logger15 = createLogger({ component: "GraphExecutor" });
|
|
26618
26670
|
var DEFAULT_MAX_STEPS = GRAPH_TIMEOUTS.maxSteps;
|
|
26619
26671
|
var DEFAULT_TIMEOUT_MS3 = GRAPH_TIMEOUTS.defaultMs;
|
|
26672
|
+
var GRAPH_UNIFIED_CONTEXT_KEY = "__unifiedContext";
|
|
26673
|
+
async function populateUnifiedContextOnState(state) {
|
|
26674
|
+
try {
|
|
26675
|
+
const taskCandidate = state["task"];
|
|
26676
|
+
if (typeof taskCandidate !== "string" || taskCandidate === "") return;
|
|
26677
|
+
const { getContextForTask: getContextForTask2, inferTaskCategory: inferTaskCategory2 } = await import("./context-retriever-MB3D7KS6.js");
|
|
26678
|
+
const ctx = await getContextForTask2({
|
|
26679
|
+
task: taskCandidate,
|
|
26680
|
+
category: inferTaskCategory2(taskCandidate),
|
|
26681
|
+
logger: logger15
|
|
26682
|
+
});
|
|
26683
|
+
state[GRAPH_UNIFIED_CONTEXT_KEY] = ctx;
|
|
26684
|
+
logger15.debug("Graph start: unified memory context stashed", {
|
|
26685
|
+
beliefs: ctx.beliefs.length,
|
|
26686
|
+
similarMemories: ctx.similarMemories.length,
|
|
26687
|
+
experiencePatterns: ctx.experiencePatterns.length,
|
|
26688
|
+
outcomesTotal: ctx.outcomes?.totalTasks ?? 0
|
|
26689
|
+
});
|
|
26690
|
+
} catch (error) {
|
|
26691
|
+
logger15.debug("Graph start: context retrieval failed", { error: getErrorMessage(error) });
|
|
26692
|
+
}
|
|
26693
|
+
}
|
|
26620
26694
|
async function executeGraph(graph, initialInputs, options) {
|
|
26621
26695
|
const startTime = getTimeProvider().now();
|
|
26622
26696
|
const initialState = initializeState(graph, initialInputs);
|
|
26697
|
+
await populateUnifiedContextOnState(initialState);
|
|
26623
26698
|
const ctx = {
|
|
26624
26699
|
state: initialState,
|
|
26625
26700
|
allResults: [],
|
|
@@ -33509,6 +33584,7 @@ async function runOrchestratePipeline(params) {
|
|
|
33509
33584
|
const startMs = getTimeProvider().now();
|
|
33510
33585
|
const v2Config = resolveV2Config();
|
|
33511
33586
|
if (v2Config.orchestrateEnabled) instrumentV2Orchestrate(input, logger51);
|
|
33587
|
+
await injectMemoryContextForOrchestrate(input, logger51);
|
|
33512
33588
|
const agentPlan = v2Config.aorchestraEnabled ? computeAgentPlan(input.task, logger51) : void 0;
|
|
33513
33589
|
const workerDispatchResult = await tryWorkerDispatch(
|
|
33514
33590
|
agentPlan,
|
|
@@ -33532,6 +33608,30 @@ async function runOrchestratePipeline(params) {
|
|
|
33532
33608
|
});
|
|
33533
33609
|
return assembleOrchestrateOutput(result.value, agentPlan, workerDispatchResult);
|
|
33534
33610
|
}
|
|
33611
|
+
async function injectMemoryContextForOrchestrate(input, logger51) {
|
|
33612
|
+
try {
|
|
33613
|
+
const ctx = await getContextForTask({
|
|
33614
|
+
task: input.task,
|
|
33615
|
+
category: inferTaskCategory(input.task),
|
|
33616
|
+
logger: logger51
|
|
33617
|
+
});
|
|
33618
|
+
const summary = summarizeContextForPrompt(ctx);
|
|
33619
|
+
logger51.debug("orchestrate: unified memory context", {
|
|
33620
|
+
beliefs: ctx.beliefs.length,
|
|
33621
|
+
similarMemories: ctx.similarMemories.length,
|
|
33622
|
+
recentLearnings: ctx.recentLearnings.length,
|
|
33623
|
+
experiencePatterns: ctx.experiencePatterns.length,
|
|
33624
|
+
outcomesTotal: ctx.outcomes?.totalTasks ?? 0,
|
|
33625
|
+
summaryChars: summary.length
|
|
33626
|
+
});
|
|
33627
|
+
if (process.env["NEXUS_CONTEXT_RETRIEVER_INJECT"] === "1" && summary !== "") {
|
|
33628
|
+
const mutable = input;
|
|
33629
|
+
mutable.context = { ...mutable.context ?? {}, priorMemorySummary: summary };
|
|
33630
|
+
}
|
|
33631
|
+
} catch (error) {
|
|
33632
|
+
logger51.debug("orchestrate: context retrieval failed", { error: getErrorMessage(error) });
|
|
33633
|
+
}
|
|
33634
|
+
}
|
|
33535
33635
|
function createOrchestrateHandler(deps) {
|
|
33536
33636
|
const notifier = deps.notifier ?? NOOP_NOTIFIER;
|
|
33537
33637
|
return async (args, ctx) => {
|
|
@@ -36328,8 +36428,15 @@ function extractEntryXml(xml) {
|
|
|
36328
36428
|
const entryMatch = xml.match(/<entry>([\s\S]*?)<\/entry>/);
|
|
36329
36429
|
return entryMatch?.[1] ?? null;
|
|
36330
36430
|
}
|
|
36431
|
+
var XML_ENTITIES = {
|
|
36432
|
+
"&": "&",
|
|
36433
|
+
"<": "<",
|
|
36434
|
+
">": ">",
|
|
36435
|
+
""": '"',
|
|
36436
|
+
"'": "'"
|
|
36437
|
+
};
|
|
36331
36438
|
function decodeXmlEntities(s) {
|
|
36332
|
-
return s.replace(/&
|
|
36439
|
+
return s.replace(/&(?:amp|lt|gt|quot|apos);/g, (m) => XML_ENTITIES[m] ?? m);
|
|
36333
36440
|
}
|
|
36334
36441
|
function parseArxivXml(arxivId, xml) {
|
|
36335
36442
|
const entryXml = extractEntryXml(xml);
|
|
@@ -39686,7 +39793,8 @@ async function collectMemoryStats(input, logger51) {
|
|
|
39686
39793
|
mobimem: toolMemory.isMobiMemAvailable(),
|
|
39687
39794
|
decay: toolMemory.isDecayManagerAvailable()
|
|
39688
39795
|
};
|
|
39689
|
-
|
|
39796
|
+
const registry = await collectRegistryStats(logger51);
|
|
39797
|
+
logger51.debug("Memory stats collected", { backends, registryDomains: registry.length });
|
|
39690
39798
|
return {
|
|
39691
39799
|
backends,
|
|
39692
39800
|
session: sessionStats,
|
|
@@ -39694,9 +39802,27 @@ async function collectMemoryStats(input, logger51) {
|
|
|
39694
39802
|
typed: typedStats !== void 0 ? typedStats : null,
|
|
39695
39803
|
mobimem: mobimemStats !== void 0 ? mobimemStats : null,
|
|
39696
39804
|
decay: decayStats,
|
|
39805
|
+
registry,
|
|
39697
39806
|
collectedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
39698
39807
|
};
|
|
39699
39808
|
}
|
|
39809
|
+
async function collectRegistryStats(logger51) {
|
|
39810
|
+
const registry = getMemoryRegistry();
|
|
39811
|
+
const rows = [];
|
|
39812
|
+
for (const domain of registry.domains()) {
|
|
39813
|
+
const backend = registry.get(domain);
|
|
39814
|
+
if (backend === void 0) continue;
|
|
39815
|
+
try {
|
|
39816
|
+
const s = await backend.stats();
|
|
39817
|
+
rows.push({ domain, count: s.count, error: null });
|
|
39818
|
+
} catch (error) {
|
|
39819
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
39820
|
+
logger51.debug("Registry domain stats failed", { domain, error: message });
|
|
39821
|
+
rows.push({ domain, count: null, error: message });
|
|
39822
|
+
}
|
|
39823
|
+
}
|
|
39824
|
+
return rows;
|
|
39825
|
+
}
|
|
39700
39826
|
async function memoryStatsHandler(args, ctx) {
|
|
39701
39827
|
const validationResult = MemoryStatsInputSchema.safeParse(args);
|
|
39702
39828
|
if (!validationResult.success) {
|
|
@@ -39730,6 +39856,7 @@ function registerMemoryStatsTool(server, deps) {
|
|
|
39730
39856
|
typed: z73.unknown().optional(),
|
|
39731
39857
|
mobimem: z73.unknown().optional(),
|
|
39732
39858
|
decay: z73.unknown().optional(),
|
|
39859
|
+
registry: z73.array(z73.unknown()).optional(),
|
|
39733
39860
|
collectedAt: z73.string().optional()
|
|
39734
39861
|
};
|
|
39735
39862
|
server.registerTool(
|
|
@@ -41771,7 +41898,7 @@ async function tryIssueTriage(task) {
|
|
|
41771
41898
|
try {
|
|
41772
41899
|
const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
|
|
41773
41900
|
if (issueMatch === null) return null;
|
|
41774
|
-
const { createIssueTriage } = await import("./issue-triage-
|
|
41901
|
+
const { createIssueTriage } = await import("./issue-triage-RMXPDZ2K.js");
|
|
41775
41902
|
const triage = createIssueTriage();
|
|
41776
41903
|
const owner = issueMatch[1] ?? "";
|
|
41777
41904
|
const num = issueMatch[2] ?? "";
|
|
@@ -41799,7 +41926,7 @@ var VALID_TEMPLATES = /* @__PURE__ */ new Set([
|
|
|
41799
41926
|
]);
|
|
41800
41927
|
async function classifyWithLLM(task) {
|
|
41801
41928
|
try {
|
|
41802
|
-
const { executeExpert: executeExpert2 } = await import("./expert-bridge-
|
|
41929
|
+
const { executeExpert: executeExpert2 } = await import("./expert-bridge-JKLC57IC.js");
|
|
41803
41930
|
const prompt = [
|
|
41804
41931
|
"Classify this task into exactly one pipeline template.",
|
|
41805
41932
|
"Templates: dev (implementation/bug fix/refactor), research (investigate/evaluate/compare),",
|
|
@@ -42591,8 +42718,8 @@ var memoryInitPromise = null;
|
|
|
42591
42718
|
async function initPipelineMemory() {
|
|
42592
42719
|
if (cachedMemory !== null) return cachedMemory;
|
|
42593
42720
|
try {
|
|
42594
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
42595
|
-
const { getLearningDir } = await import("./learning-persistence-
|
|
42721
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-L7EQIY2O.js");
|
|
42722
|
+
const { getLearningDir } = await import("./learning-persistence-Q3HTOGTU.js");
|
|
42596
42723
|
const mem = createSessionMemory2(getLearningDir());
|
|
42597
42724
|
mem.startSession(`pipeline-${String(Date.now())}`);
|
|
42598
42725
|
cachedMemory = {
|
|
@@ -42636,19 +42763,6 @@ function recordMemoryError(error, solution) {
|
|
|
42636
42763
|
}
|
|
42637
42764
|
function flushPipelineMemory() {
|
|
42638
42765
|
void getPipelineMemoryAsync().then((m) => m?.flush());
|
|
42639
|
-
void persistMobiMemState();
|
|
42640
|
-
}
|
|
42641
|
-
async function persistMobiMemState() {
|
|
42642
|
-
try {
|
|
42643
|
-
const { isPersistenceEnabled } = await import("./learning-persistence-N6ILD2HX.js");
|
|
42644
|
-
if (!isPersistenceEnabled()) return;
|
|
42645
|
-
const { nexusDataPath: nexusDataPath2 } = await import("./nexus-data-dir-77UO7N6J.js");
|
|
42646
|
-
const { createMobiMem } = await import("./mobimem-CG2MNS7V.js");
|
|
42647
|
-
const mobimem = createMobiMem();
|
|
42648
|
-
const savePath = nexusDataPath2("memory", "mobimem-state.json");
|
|
42649
|
-
await mobimem.save(savePath);
|
|
42650
|
-
} catch {
|
|
42651
|
-
}
|
|
42652
42766
|
}
|
|
42653
42767
|
var routingMemoryCache = null;
|
|
42654
42768
|
function recordRoutingExperience(category, success, durationMs) {
|
|
@@ -42660,7 +42774,7 @@ function recordRoutingExperience(category, success, durationMs) {
|
|
|
42660
42774
|
callRecord(routingMemoryCache);
|
|
42661
42775
|
return;
|
|
42662
42776
|
}
|
|
42663
|
-
void import("./routing-memory-
|
|
42777
|
+
void import("./routing-memory-3B6DDZ76.js").then(({ createRoutingMemory }) => {
|
|
42664
42778
|
routingMemoryCache = createRoutingMemory();
|
|
42665
42779
|
callRecord(routingMemoryCache);
|
|
42666
42780
|
}).catch((error) => {
|
|
@@ -42689,7 +42803,7 @@ ${text}` : "";
|
|
|
42689
42803
|
}
|
|
42690
42804
|
async function getWeatherContext() {
|
|
42691
42805
|
try {
|
|
42692
|
-
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-
|
|
42806
|
+
const { generateWeatherReport: generateWeatherReport2 } = await import("./weather-report-ER3WUZ7S.js");
|
|
42693
42807
|
const report = generateWeatherReport2({ includeAdaptive: true });
|
|
42694
42808
|
const mappings = "recommendedMappings" in report ? report.recommendedMappings : [];
|
|
42695
42809
|
if (!Array.isArray(mappings) || mappings.length === 0) return "";
|
|
@@ -42707,8 +42821,8 @@ ${lines}
|
|
|
42707
42821
|
}
|
|
42708
42822
|
async function getMemoryContext(task) {
|
|
42709
42823
|
try {
|
|
42710
|
-
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-
|
|
42711
|
-
const { getLearningDir } = await import("./learning-persistence-
|
|
42824
|
+
const { createSessionMemory: createSessionMemory2 } = await import("./session-memory-L7EQIY2O.js");
|
|
42825
|
+
const { getLearningDir } = await import("./learning-persistence-Q3HTOGTU.js");
|
|
42712
42826
|
const memory = createSessionMemory2(getLearningDir(), { maxLearningsInContext: 10 });
|
|
42713
42827
|
const learnings = memory.searchLearnings(task.slice(0, 200));
|
|
42714
42828
|
if (learnings.length === 0) return "";
|
|
@@ -42800,7 +42914,7 @@ ${contextBlock}`;
|
|
|
42800
42914
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
42801
42915
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
42802
42916
|
try {
|
|
42803
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
42917
|
+
const { executeVoting } = await import("./consensus-vote-ESFPGEJE.js");
|
|
42804
42918
|
const votingResult = await executeVoting(
|
|
42805
42919
|
{
|
|
42806
42920
|
proposal: plan.slice(0, 4e3),
|
|
@@ -43466,15 +43580,8 @@ function createResearchStageWrapper(stages) {
|
|
|
43466
43580
|
async execute(ctx) {
|
|
43467
43581
|
const start = getTimeProvider().now();
|
|
43468
43582
|
try {
|
|
43469
|
-
const priorContext = await retrieveAdaptiveMemory(ctx.task);
|
|
43470
43583
|
const codeContext = await searchCodebaseForTask(ctx.task);
|
|
43471
43584
|
let enrichedTask = ctx.task;
|
|
43472
|
-
if (priorContext !== null) {
|
|
43473
|
-
enrichedTask = `${enrichedTask}
|
|
43474
|
-
|
|
43475
|
-
## Prior Context (Adaptive Memory)
|
|
43476
|
-
${priorContext}`;
|
|
43477
|
-
}
|
|
43478
43585
|
if (codeContext !== null && codeContext !== "") {
|
|
43479
43586
|
enrichedTask = `${enrichedTask}
|
|
43480
43587
|
|
|
@@ -43663,28 +43770,9 @@ async function extractSymbolsForTask(task) {
|
|
|
43663
43770
|
return null;
|
|
43664
43771
|
}
|
|
43665
43772
|
}
|
|
43666
|
-
async function retrieveAdaptiveMemory(task) {
|
|
43667
|
-
try {
|
|
43668
|
-
const { AdaptiveMemoryBackend } = await import("./adaptive-memory-EI564K4C.js");
|
|
43669
|
-
const path14 = await import("path");
|
|
43670
|
-
const { nexusDataPath: nexusDataPath2 } = await import("./nexus-data-dir-77UO7N6J.js");
|
|
43671
|
-
const baseDir = nexusDataPath2("memory");
|
|
43672
|
-
const memory = new AdaptiveMemoryBackend({
|
|
43673
|
-
dbPath: path14.join(baseDir, "adaptive.db"),
|
|
43674
|
-
markdownDir: path14.join(baseDir, "adaptive-md")
|
|
43675
|
-
});
|
|
43676
|
-
const key = task.slice(0, 50).replace(/\s+/g, "-").toLowerCase();
|
|
43677
|
-
const result = await memory.retrieve(key);
|
|
43678
|
-
if (!result.ok) return null;
|
|
43679
|
-
const value = result.value;
|
|
43680
|
-
return typeof value === "string" && value.length > 0 ? value : null;
|
|
43681
|
-
} catch {
|
|
43682
|
-
return null;
|
|
43683
|
-
}
|
|
43684
|
-
}
|
|
43685
43773
|
async function queryResearchRegistry(task) {
|
|
43686
43774
|
try {
|
|
43687
|
-
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-
|
|
43775
|
+
const { synthesizeResearch: synthesizeResearch2 } = await import("./research-helpers-synthesize-K2UCJQQG.js");
|
|
43688
43776
|
const topic = task.split(/[.!?\n]/).filter((s) => s.trim().length > 10)[0]?.trim();
|
|
43689
43777
|
if (topic === void 0) return null;
|
|
43690
43778
|
const result = await synthesizeResearch2(topic.slice(0, 50));
|
|
@@ -43769,7 +43857,7 @@ function createScanStageWrapper() {
|
|
|
43769
43857
|
try {
|
|
43770
43858
|
const slug = ctx.task.match(/([a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+)/)?.[1];
|
|
43771
43859
|
if (slug !== void 0) {
|
|
43772
|
-
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-
|
|
43860
|
+
const { generateSecurityPlan: generateSecurityPlan2 } = await import("./repo-security-plan-AGRU72DL.js");
|
|
43773
43861
|
const plan = await generateSecurityPlan2({ repo: slug, maxScanners: 10 });
|
|
43774
43862
|
const recs = plan.recommendations.slice(0, 5).map((r) => `${r.priority}: ${r.displayName} (${r.category})`).join("; ");
|
|
43775
43863
|
ctx.sharedMemory.write("scan", "decision", { recommendations: recs });
|
|
@@ -49336,7 +49424,7 @@ var GitHubTaskTracker = class {
|
|
|
49336
49424
|
cachedProvider = null;
|
|
49337
49425
|
async getProvider() {
|
|
49338
49426
|
if (this.cachedProvider !== null) return this.cachedProvider;
|
|
49339
|
-
const { createScmProvider } = await import("./factory-
|
|
49427
|
+
const { createScmProvider } = await import("./factory-BUUXNGIB.js");
|
|
49340
49428
|
const result = await createScmProvider({ repo: this.config.repo ?? "" });
|
|
49341
49429
|
if (!result.ok) throw new Error(`SCM provider error: ${result.error.message}`);
|
|
49342
49430
|
this.cachedProvider = result.value;
|
|
@@ -50041,4 +50129,4 @@ export {
|
|
|
50041
50129
|
detectBackend,
|
|
50042
50130
|
createTaskTracker
|
|
50043
50131
|
};
|
|
50044
|
-
//# sourceMappingURL=chunk-
|
|
50132
|
+
//# sourceMappingURL=chunk-6WBTNZAY.js.map
|