nexus-agents 2.79.3 → 2.79.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/README.md +2 -2
- package/dist/{child-mcp-config-CTO2MBRM.js → child-mcp-config-DFRYTRBK.js} +2 -2
- package/dist/{chunk-HB4MIDHJ.js → chunk-3ENBGGYA.js} +104 -61
- package/dist/{chunk-HB4MIDHJ.js.map → chunk-3ENBGGYA.js.map} +1 -1
- package/dist/{chunk-6E3NMMEY.js → chunk-3RZWLQSC.js} +2 -2
- package/dist/{chunk-6E3NMMEY.js.map → chunk-3RZWLQSC.js.map} +1 -1
- package/dist/{chunk-KT5FIBWS.js → chunk-42MM7GKW.js} +2 -2
- package/dist/{chunk-3NIPH6UP.js → chunk-45NUO4FE.js} +2 -2
- package/dist/{chunk-2YPG6PDG.js → chunk-ACP4YARI.js} +3 -3
- package/dist/{chunk-D6TM2VHX.js → chunk-BIH2CBC5.js} +44 -21
- package/dist/chunk-BIH2CBC5.js.map +1 -0
- package/dist/{chunk-SD76JZBG.js → chunk-BSQ4KTY4.js} +2 -2
- package/dist/{chunk-6TFTVW77.js → chunk-BXI6DKBU.js} +3 -3
- package/dist/{chunk-PLX6FCFC.js → chunk-DOI7RE3X.js} +2 -2
- package/dist/{chunk-SWFJU3W2.js → chunk-DW3UTO43.js} +56 -46
- package/dist/{chunk-SWFJU3W2.js.map → chunk-DW3UTO43.js.map} +1 -1
- package/dist/{chunk-7XCUZI4G.js → chunk-IPDUZJPH.js} +3 -3
- package/dist/{chunk-2UYTFLMO.js → chunk-JMRCMMZ5.js} +2 -2
- package/dist/{chunk-GONMG4NM.js → chunk-LFTK5ZQG.js} +2 -2
- package/dist/{chunk-DLXT23AC.js → chunk-NJPFN75N.js} +2 -2
- package/dist/{chunk-YXWGEIQR.js → chunk-NVSJXN4S.js} +2 -2
- package/dist/{chunk-Q5CFPIJ5.js → chunk-NXNNT5XW.js} +3 -3
- package/dist/chunk-OFRDE7MK.js +136 -0
- package/dist/chunk-OFRDE7MK.js.map +1 -0
- package/dist/{chunk-L6SCKLGO.js → chunk-OGV7J5WG.js} +3 -3
- package/dist/{chunk-ZVCED4Z4.js → chunk-PAKVXGS2.js} +2 -2
- package/dist/{chunk-DNO2INX5.js → chunk-PDCLBWH5.js} +3 -3
- package/dist/{chunk-K2QILJG4.js → chunk-PHBRELUK.js} +33 -9
- package/dist/chunk-PHBRELUK.js.map +1 -0
- package/dist/{chunk-JI7S55R3.js → chunk-SU3Y6LU2.js} +8 -8
- package/dist/chunk-SU3Y6LU2.js.map +1 -0
- package/dist/{chunk-FJWWSVWB.js → chunk-TN5ZKSGC.js} +2 -2
- package/dist/{chunk-5O6XLBPP.js → chunk-UNFS6YBY.js} +2 -2
- package/dist/{chunk-HYU4GZY6.js → chunk-UNRTM43V.js} +2 -2
- package/dist/{chunk-VIQOVK4E.js → chunk-UOR2JWFH.js} +7 -136
- package/dist/chunk-UOR2JWFH.js.map +1 -0
- package/dist/{chunk-WDYCIJWN.js → chunk-UQOSVOEU.js} +4 -3
- package/dist/{chunk-WDYCIJWN.js.map → chunk-UQOSVOEU.js.map} +1 -1
- package/dist/{chunk-FVPYP5DD.js → chunk-UWDVEMYZ.js} +4 -4
- package/dist/{cli-circuit-breaker-I74ZQ44Q.js → cli-circuit-breaker-T75HOLZK.js} +4 -4
- package/dist/cli.js +46 -45
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-V3OC57IE.js → composite-router-OPSK5FCQ.js} +2 -2
- package/dist/{consensus-vote-ESFPGEJE.js → consensus-vote-CYUPIJXR.js} +11 -11
- package/dist/{context-retriever-MB3D7KS6.js → context-retriever-6AWHCHRP.js} +5 -5
- package/dist/{doctor-deep-KQ765XZA.js → doctor-deep-XBPRQ6ZP.js} +3 -3
- package/dist/expert-bridge-5YOPK5IT.js +11 -0
- package/dist/{factory-BUUXNGIB.js → factory-DN7SJZ5Z.js} +5 -5
- package/dist/{factory-LHHYDVZX.js → factory-Y3TMP4OQ.js} +4 -4
- package/dist/index.d.ts +24 -2
- package/dist/index.js +30 -28
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-GXZN2W5S.js → init-opencode-RV6IQEMS.js} +5 -5
- package/dist/{issue-triage-RMXPDZ2K.js → issue-triage-UTWKXLKC.js} +4 -4
- package/dist/{pr-reviewer-helpers-XCY7HOPE.js → pr-reviewer-helpers-L4L324FQ.js} +2 -2
- package/dist/{registry-command-6E4YKAMT.js → registry-command-6KJWW3W7.js} +2 -2
- package/dist/{repo-security-plan-AGRU72DL.js → repo-security-plan-HNLMF7J7.js} +3 -3
- package/dist/{research-helpers-synthesize-K2UCJQQG.js → research-helpers-synthesize-77TLYSW4.js} +3 -3
- package/dist/{routing-memory-3B6DDZ76.js → routing-memory-6DV6ZPAH.js} +2 -2
- package/dist/{session-memory-L7EQIY2O.js → session-memory-XZ3NJIR4.js} +3 -3
- package/dist/{setup-command-QSAGFMGN.js → setup-command-QOXG36UV.js} +10 -9
- package/dist/{setup-config-EQT24DD4.js → setup-config-B4V4QHDP.js} +3 -3
- package/dist/{setup-custom-api-IBDV654K.js → setup-custom-api-PJ6TGHJH.js} +4 -4
- package/dist/{tool-memory-6HCHQLAN.js → tool-memory-K2QPTPKV.js} +4 -4
- package/dist/{weather-report-ER3WUZ7S.js → weather-report-ZB4AKOIA.js} +2 -2
- package/package.json +4 -4
- package/scripts/postinstall.js +1 -1
- package/dist/chunk-D6TM2VHX.js.map +0 -1
- package/dist/chunk-JI7S55R3.js.map +0 -1
- package/dist/chunk-K2QILJG4.js.map +0 -1
- package/dist/chunk-VIQOVK4E.js.map +0 -1
- package/dist/expert-bridge-JKLC57IC.js +0 -10
- /package/dist/{child-mcp-config-CTO2MBRM.js.map → child-mcp-config-DFRYTRBK.js.map} +0 -0
- /package/dist/{chunk-KT5FIBWS.js.map → chunk-42MM7GKW.js.map} +0 -0
- /package/dist/{chunk-3NIPH6UP.js.map → chunk-45NUO4FE.js.map} +0 -0
- /package/dist/{chunk-2YPG6PDG.js.map → chunk-ACP4YARI.js.map} +0 -0
- /package/dist/{chunk-SD76JZBG.js.map → chunk-BSQ4KTY4.js.map} +0 -0
- /package/dist/{chunk-6TFTVW77.js.map → chunk-BXI6DKBU.js.map} +0 -0
- /package/dist/{chunk-PLX6FCFC.js.map → chunk-DOI7RE3X.js.map} +0 -0
- /package/dist/{chunk-7XCUZI4G.js.map → chunk-IPDUZJPH.js.map} +0 -0
- /package/dist/{chunk-2UYTFLMO.js.map → chunk-JMRCMMZ5.js.map} +0 -0
- /package/dist/{chunk-GONMG4NM.js.map → chunk-LFTK5ZQG.js.map} +0 -0
- /package/dist/{chunk-DLXT23AC.js.map → chunk-NJPFN75N.js.map} +0 -0
- /package/dist/{chunk-YXWGEIQR.js.map → chunk-NVSJXN4S.js.map} +0 -0
- /package/dist/{chunk-Q5CFPIJ5.js.map → chunk-NXNNT5XW.js.map} +0 -0
- /package/dist/{chunk-L6SCKLGO.js.map → chunk-OGV7J5WG.js.map} +0 -0
- /package/dist/{chunk-ZVCED4Z4.js.map → chunk-PAKVXGS2.js.map} +0 -0
- /package/dist/{chunk-DNO2INX5.js.map → chunk-PDCLBWH5.js.map} +0 -0
- /package/dist/{chunk-FJWWSVWB.js.map → chunk-TN5ZKSGC.js.map} +0 -0
- /package/dist/{chunk-5O6XLBPP.js.map → chunk-UNFS6YBY.js.map} +0 -0
- /package/dist/{chunk-HYU4GZY6.js.map → chunk-UNRTM43V.js.map} +0 -0
- /package/dist/{chunk-FVPYP5DD.js.map → chunk-UWDVEMYZ.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-I74ZQ44Q.js.map → cli-circuit-breaker-T75HOLZK.js.map} +0 -0
- /package/dist/{composite-router-V3OC57IE.js.map → composite-router-OPSK5FCQ.js.map} +0 -0
- /package/dist/{consensus-vote-ESFPGEJE.js.map → consensus-vote-CYUPIJXR.js.map} +0 -0
- /package/dist/{context-retriever-MB3D7KS6.js.map → context-retriever-6AWHCHRP.js.map} +0 -0
- /package/dist/{doctor-deep-KQ765XZA.js.map → doctor-deep-XBPRQ6ZP.js.map} +0 -0
- /package/dist/{expert-bridge-JKLC57IC.js.map → expert-bridge-5YOPK5IT.js.map} +0 -0
- /package/dist/{factory-BUUXNGIB.js.map → factory-DN7SJZ5Z.js.map} +0 -0
- /package/dist/{factory-LHHYDVZX.js.map → factory-Y3TMP4OQ.js.map} +0 -0
- /package/dist/{init-opencode-GXZN2W5S.js.map → init-opencode-RV6IQEMS.js.map} +0 -0
- /package/dist/{issue-triage-RMXPDZ2K.js.map → issue-triage-UTWKXLKC.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-XCY7HOPE.js.map → pr-reviewer-helpers-L4L324FQ.js.map} +0 -0
- /package/dist/{registry-command-6E4YKAMT.js.map → registry-command-6KJWW3W7.js.map} +0 -0
- /package/dist/{repo-security-plan-AGRU72DL.js.map → repo-security-plan-HNLMF7J7.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-K2UCJQQG.js.map → research-helpers-synthesize-77TLYSW4.js.map} +0 -0
- /package/dist/{routing-memory-3B6DDZ76.js.map → routing-memory-6DV6ZPAH.js.map} +0 -0
- /package/dist/{session-memory-L7EQIY2O.js.map → session-memory-XZ3NJIR4.js.map} +0 -0
- /package/dist/{setup-command-QSAGFMGN.js.map → setup-command-QOXG36UV.js.map} +0 -0
- /package/dist/{setup-config-EQT24DD4.js.map → setup-config-B4V4QHDP.js.map} +0 -0
- /package/dist/{setup-custom-api-IBDV654K.js.map → setup-custom-api-PJ6TGHJH.js.map} +0 -0
- /package/dist/{tool-memory-6HCHQLAN.js.map → tool-memory-K2QPTPKV.js.map} +0 -0
- /package/dist/{weather-report-ER3WUZ7S.js.map → weather-report-ZB4AKOIA.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
err,
|
|
4
4
|
getErrorMessage,
|
|
5
5
|
ok
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UQOSVOEU.js";
|
|
7
7
|
|
|
8
8
|
// src/scm/types.ts
|
|
9
9
|
var ScmError = class extends Error {
|
|
@@ -243,4 +243,4 @@ export {
|
|
|
243
243
|
ScmError,
|
|
244
244
|
GitHubProvider
|
|
245
245
|
};
|
|
246
|
-
//# sourceMappingURL=chunk-
|
|
246
|
+
//# sourceMappingURL=chunk-BSQ4KTY4.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GitHubProvider,
|
|
3
3
|
ScmError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BSQ4KTY4.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-UQOSVOEU.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-BXI6DKBU.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getTokenEstimator,
|
|
11
11
|
isRateLimitLikeError,
|
|
12
12
|
ok
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-UQOSVOEU.js";
|
|
14
14
|
|
|
15
15
|
// src/adapters/base-adapter.ts
|
|
16
16
|
var AdapterModelError = class extends ModelError {
|
|
@@ -707,4 +707,4 @@ export {
|
|
|
707
707
|
DEFAULT_COLLECT_STREAM_MAX_CHUNKS,
|
|
708
708
|
collectStream
|
|
709
709
|
};
|
|
710
|
-
//# sourceMappingURL=chunk-
|
|
710
|
+
//# sourceMappingURL=chunk-DOI7RE3X.js.map
|
|
@@ -2,23 +2,23 @@ import {
|
|
|
2
2
|
CUSTOM_API_BASE_URL_ENV,
|
|
3
3
|
PROVIDER_ENV_KEYS,
|
|
4
4
|
validateCustomApiBaseUrl
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PAKVXGS2.js";
|
|
6
6
|
import {
|
|
7
7
|
AdapterModelError,
|
|
8
8
|
BaseAdapter,
|
|
9
9
|
createStream,
|
|
10
10
|
requireApiKey,
|
|
11
11
|
validateApiKeyPresence
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DOI7RE3X.js";
|
|
13
13
|
import {
|
|
14
14
|
getToolMemory
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NXNNT5XW.js";
|
|
16
16
|
import {
|
|
17
17
|
getDefaultAvailableModelsCache
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-42MM7GKW.js";
|
|
19
19
|
import {
|
|
20
20
|
CUSTOM_API_DEFAULT_MODEL
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-UNRTM43V.js";
|
|
22
22
|
import {
|
|
23
23
|
createCliAdapter,
|
|
24
24
|
createCliDetectionCache,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
getAvailableClis,
|
|
27
27
|
isCliAvailable,
|
|
28
28
|
withTimeout
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-BIH2CBC5.js";
|
|
30
30
|
import {
|
|
31
31
|
AgentError,
|
|
32
32
|
CACHE_TIMEOUTS,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
resolveCliAlias,
|
|
70
70
|
resolveVoteTimeout,
|
|
71
71
|
toRateLimitError
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-UQOSVOEU.js";
|
|
73
73
|
import {
|
|
74
74
|
ensureLearningDir,
|
|
75
75
|
getNexusDataDir,
|
|
@@ -5576,6 +5576,16 @@ var ConsensusError = class extends AgentError {
|
|
|
5576
5576
|
this.name = "ConsensusError";
|
|
5577
5577
|
}
|
|
5578
5578
|
};
|
|
5579
|
+
var HYPOTHETICAL_APPROVE = {
|
|
5580
|
+
decision: "approve",
|
|
5581
|
+
confidence: 0.5,
|
|
5582
|
+
reasoning: "hypothetical-cascade-probe"
|
|
5583
|
+
};
|
|
5584
|
+
var HYPOTHETICAL_REJECT = {
|
|
5585
|
+
decision: "reject",
|
|
5586
|
+
confidence: 0.5,
|
|
5587
|
+
reasoning: "hypothetical-cascade-probe"
|
|
5588
|
+
};
|
|
5579
5589
|
var DEFAULT_PROPOSAL_CACHE_CONFIG = {
|
|
5580
5590
|
enabled: true,
|
|
5581
5591
|
ttlMs: 36e5,
|
|
@@ -5849,47 +5859,47 @@ var ConsensusEngine = class {
|
|
|
5849
5859
|
}
|
|
5850
5860
|
/**
|
|
5851
5861
|
* Agreement-based cascading: close early when outcome is mathematically determined.
|
|
5852
|
-
*
|
|
5853
|
-
*
|
|
5862
|
+
*
|
|
5863
|
+
* #2822: the prior implementation computed approval rates against
|
|
5864
|
+
* `totalExpected = requiredVoters.length` and compared against
|
|
5865
|
+
* `VOTING_THRESHOLDS[algorithm]` directly. Every voting strategy
|
|
5866
|
+
* (`SimpleMajorityStrategy`, `SupermajorityStrategy`, `UnanimousStrategy`,
|
|
5867
|
+
* `ProofOfLearningStrategy`) uses `approve + reject` as its denominator —
|
|
5868
|
+
* abstains are explicitly excluded. The two diverged whenever abstains
|
|
5869
|
+
* were present, producing wrong-winner cascades (e.g. 5-voter supermajority
|
|
5870
|
+
* with [approve, abstain, abstain, abstain, pending] cascade-rejected even
|
|
5871
|
+
* though the strategy would approve at close).
|
|
5872
|
+
*
|
|
5873
|
+
* The fix delegates to the strategy itself: build a best-case (all pending
|
|
5874
|
+
* voters approve) and worst-case (all pending voters reject) hypothetical
|
|
5875
|
+
* vote map, call `strategy.calculateOutcome` on each, and cascade only
|
|
5876
|
+
* when both extremes yield the same outcome. This guarantees parity with
|
|
5877
|
+
* the strategy's denominator semantics by construction.
|
|
5854
5878
|
*/
|
|
5855
5879
|
canCascadeEarly(state) {
|
|
5856
5880
|
const required = state.proposal.requiredVoters;
|
|
5857
5881
|
if (required === void 0 || required.length === 0) return false;
|
|
5858
|
-
|
|
5859
|
-
const
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
const
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
const
|
|
5870
|
-
if (
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
}
|
|
5880
|
-
const maxPossibleApprovals = approvals + remaining;
|
|
5881
|
-
const maxApprovalRate = maxPossibleApprovals / totalExpected;
|
|
5882
|
-
if (maxApprovalRate < threshold) {
|
|
5883
|
-
this.logger.info("Agreement cascade: early rejection", {
|
|
5884
|
-
proposalId: state.proposal.id,
|
|
5885
|
-
rejections,
|
|
5886
|
-
totalExpected,
|
|
5887
|
-
threshold,
|
|
5888
|
-
remaining
|
|
5889
|
-
});
|
|
5890
|
-
return true;
|
|
5891
|
-
}
|
|
5892
|
-
return false;
|
|
5882
|
+
if (state.votes.size === 0) return false;
|
|
5883
|
+
const pending = required.filter((voter) => !state.votes.has(voter));
|
|
5884
|
+
if (pending.length === 0) return false;
|
|
5885
|
+
const strategy = this.strategyFactory.getStrategy(state.proposal.algorithm);
|
|
5886
|
+
const bestCase = new Map(state.votes);
|
|
5887
|
+
const worstCase = new Map(state.votes);
|
|
5888
|
+
for (const voter of pending) {
|
|
5889
|
+
bestCase.set(voter, HYPOTHETICAL_APPROVE);
|
|
5890
|
+
worstCase.set(voter, HYPOTHETICAL_REJECT);
|
|
5891
|
+
}
|
|
5892
|
+
const bestOutcome = strategy.calculateOutcome(bestCase, state.voteWeights);
|
|
5893
|
+
const worstOutcome = strategy.calculateOutcome(worstCase, state.voteWeights);
|
|
5894
|
+
if (bestOutcome.approved !== worstOutcome.approved) return false;
|
|
5895
|
+
this.logger.info("Agreement cascade: outcome determined", {
|
|
5896
|
+
proposalId: state.proposal.id,
|
|
5897
|
+
outcome: bestOutcome.approved ? "approve" : "reject",
|
|
5898
|
+
votesCast: state.votes.size,
|
|
5899
|
+
pending: pending.length,
|
|
5900
|
+
algorithm: state.proposal.algorithm
|
|
5901
|
+
});
|
|
5902
|
+
return true;
|
|
5893
5903
|
}
|
|
5894
5904
|
allRequiredVotersVoted(state) {
|
|
5895
5905
|
const required = state.proposal.requiredVoters;
|
|
@@ -8638,7 +8648,7 @@ async function processVotesWithCascade(engineVotes, opts) {
|
|
|
8638
8648
|
var CONTRARIAN_ESCALATION_THRESHOLD = 0.8;
|
|
8639
8649
|
async function runContrarianCheck(proposal, log) {
|
|
8640
8650
|
try {
|
|
8641
|
-
const { executeExpert } = await import("./expert-bridge-
|
|
8651
|
+
const { executeExpert } = await import("./expert-bridge-5YOPK5IT.js");
|
|
8642
8652
|
const prompt = [
|
|
8643
8653
|
"You are a contrarian analyst. Your job is to find reasons this proposal should be REJECTED.",
|
|
8644
8654
|
"Look for: YAGNI (not needed), MISALIGNED (wrong tech/architecture), SECURITY_RISK, SCOPE_CREEP.",
|
|
@@ -9055,4 +9065,4 @@ export {
|
|
|
9055
9065
|
CONSENSUS_VOTE_OUTPUT_SCHEMA,
|
|
9056
9066
|
registerConsensusVoteTool
|
|
9057
9067
|
};
|
|
9058
|
-
//# sourceMappingURL=chunk-
|
|
9068
|
+
//# sourceMappingURL=chunk-DW3UTO43.js.map
|