nexus-agents 2.157.0 → 2.158.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-3YUKLM5F.js → child-mcp-config-ODAUXUWE.js} +2 -2
- package/dist/{chunk-PZDDA6IW.js → chunk-2O63LDYB.js} +3 -3
- package/dist/{chunk-BM26VPV5.js → chunk-42ZSRIEX.js} +2 -2
- package/dist/{chunk-5ULXLPVP.js → chunk-4IXC6V6O.js} +2 -2
- package/dist/{chunk-JZ4PCEEN.js → chunk-55ZDYUBT.js} +2 -2
- package/dist/{chunk-YZQXCCEA.js → chunk-6B5VQ2SY.js} +5 -5
- package/dist/{chunk-5FH7QZIT.js → chunk-6MCSD37T.js} +2 -2
- package/dist/{chunk-NELFMLLR.js → chunk-7J3AAPH5.js} +2 -2
- package/dist/{chunk-EJ3MAR5M.js → chunk-CSHFTQA7.js} +3 -3
- package/dist/{chunk-6ZKQRTTQ.js → chunk-CTL5HUZZ.js} +10 -7
- package/dist/chunk-CTL5HUZZ.js.map +1 -0
- package/dist/{chunk-IILTUCFB.js → chunk-DSUFV2ZN.js} +2 -2
- package/dist/{chunk-SCJ2EB6Z.js → chunk-FWW5GCEH.js} +2 -2
- package/dist/{chunk-7YOJXOFN.js → chunk-GG7MGRQ6.js} +4 -4
- package/dist/{chunk-TNRTP5FW.js → chunk-I32MYAT5.js} +2 -2
- package/dist/{chunk-553QYRXJ.js → chunk-IQVHJD4O.js} +5 -5
- package/dist/{chunk-47WFM6QH.js → chunk-J2JP35S3.js} +4 -4
- package/dist/{chunk-OXYGRB4C.js → chunk-J6OUXCR3.js} +7 -7
- package/dist/{chunk-LZ2LHYDO.js → chunk-K6HJLOPA.js} +3 -3
- package/dist/{chunk-HUN7CEAU.js → chunk-KS622JST.js} +3 -3
- package/dist/{chunk-BGAK4N74.js → chunk-LSWGHIJK.js} +7 -7
- package/dist/{chunk-XGUZ2OQK.js → chunk-OOGGQ2NA.js} +3 -3
- package/dist/{chunk-RCSDD2QY.js → chunk-Q4JNYY2Y.js} +4 -4
- package/dist/{chunk-RCSDD2QY.js.map → chunk-Q4JNYY2Y.js.map} +1 -1
- package/dist/{chunk-TT4ZITRU.js → chunk-Q7TALELN.js} +15 -44
- package/dist/chunk-Q7TALELN.js.map +1 -0
- package/dist/{chunk-O7VPOR5A.js → chunk-R76LLKT2.js} +5 -5
- package/dist/{chunk-YGYJUPVX.js → chunk-RI3BFANI.js} +2 -2
- package/dist/{chunk-UAGYCCHY.js → chunk-S3H4VWN5.js} +2 -2
- package/dist/{chunk-M532SJS6.js → chunk-S7PFS6PX.js} +7 -7
- package/dist/{chunk-3SE57WOV.js → chunk-SPOES3DZ.js} +34 -34
- package/dist/{chunk-3SE57WOV.js.map → chunk-SPOES3DZ.js.map} +1 -1
- package/dist/{chunk-MYSS22Q2.js → chunk-U5KSLUZ6.js} +2 -2
- package/dist/{chunk-3NT6NAXD.js → chunk-UQOJ2KGW.js} +13 -12
- package/dist/chunk-UQOJ2KGW.js.map +1 -0
- package/dist/{chunk-TKCXD36G.js → chunk-VKVJSPHJ.js} +4 -4
- package/dist/{chunk-3S2OPUGU.js → chunk-XLJCXM7L.js} +2 -2
- package/dist/{chunk-HWG437YQ.js → chunk-YH5U3XCP.js} +2 -2
- package/dist/{chunk-AEPCCXMK.js → chunk-YMMX6ELC.js} +3 -3
- package/dist/{chunk-GYWYCCJC.js → chunk-YQRP5NST.js} +2 -2
- package/dist/{cli-circuit-breaker-Q43YSBCB.js → cli-circuit-breaker-MLVJXLK6.js} +4 -4
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +41 -41
- package/dist/{composite-router-5UHJFOB3.js → composite-router-FTECAR4U.js} +2 -2
- package/dist/{consensus-vote-7EBYYBCQ.js → consensus-vote-MMZTCPL7.js} +15 -15
- package/dist/{consensus-vote-types-BNBMB415.d.ts → consensus-vote-types-DB3SmULO.d.ts} +16 -10
- package/dist/{context-retriever-33SGXV33.js → context-retriever-MPZ7T4VA.js} +8 -8
- package/dist/{doctor-deep-RAN4HGOH.js → doctor-deep-KUB4HPCS.js} +3 -3
- package/dist/{expert-bridge-RJP57L75.js → expert-bridge-EK362QGQ.js} +4 -4
- package/dist/{factory-C5PY7R6O.js → factory-GOO7MH5G.js} +8 -8
- package/dist/{factory-YOUM5MCV.js → factory-XBUQP3UB.js} +5 -5
- package/dist/{improvement-review-H5BQ2JXK.js → improvement-review-XXRDVOJT.js} +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +30 -30
- package/dist/{init-opencode-KHODCXA6.js → init-opencode-RNSCHZIW.js} +6 -6
- package/dist/{issue-triage-OP3FDRKY.js → issue-triage-7TWTN6LI.js} +6 -6
- package/dist/{pr-reviewer-helpers-UF42XZB6.js → pr-reviewer-helpers-VT4DR5BC.js} +4 -4
- package/dist/{registry-command-EZ7735GC.js → registry-command-QVBYBBWR.js} +2 -2
- package/dist/{repo-security-plan-D62HB5PK.js → repo-security-plan-VSQWMONM.js} +3 -3
- package/dist/{research-helpers-synthesize-KUA53BAD.js → research-helpers-synthesize-VCUOMHPD.js} +4 -4
- package/dist/{routing-memory-FE4EQUXO.js → routing-memory-PP4UJVH4.js} +2 -2
- package/dist/{session-memory-RA7KE6CX.js → session-memory-TVV2IOGB.js} +3 -3
- package/dist/{setup-command-FJ2II5YH.js → setup-command-4GOUS52A.js} +11 -11
- package/dist/{setup-config-SHG2DMZJ.js → setup-config-HZHL4QMD.js} +3 -3
- package/dist/{setup-custom-api-NVS4EPBG.js → setup-custom-api-H6FJ5VWL.js} +3 -3
- package/dist/{tool-memory-UQH2FTAS.js → tool-memory-YLCJZVMV.js} +5 -5
- package/dist/{unified-registry-MMQXU622.js → unified-registry-ZUPTC7OR.js} +9 -9
- package/dist/{weather-report-HRQCJEU5.js → weather-report-XPDW6LGI.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-3NT6NAXD.js.map +0 -1
- package/dist/chunk-6ZKQRTTQ.js.map +0 -1
- package/dist/chunk-TT4ZITRU.js.map +0 -1
- /package/dist/{child-mcp-config-3YUKLM5F.js.map → child-mcp-config-ODAUXUWE.js.map} +0 -0
- /package/dist/{chunk-PZDDA6IW.js.map → chunk-2O63LDYB.js.map} +0 -0
- /package/dist/{chunk-BM26VPV5.js.map → chunk-42ZSRIEX.js.map} +0 -0
- /package/dist/{chunk-5ULXLPVP.js.map → chunk-4IXC6V6O.js.map} +0 -0
- /package/dist/{chunk-JZ4PCEEN.js.map → chunk-55ZDYUBT.js.map} +0 -0
- /package/dist/{chunk-YZQXCCEA.js.map → chunk-6B5VQ2SY.js.map} +0 -0
- /package/dist/{chunk-5FH7QZIT.js.map → chunk-6MCSD37T.js.map} +0 -0
- /package/dist/{chunk-NELFMLLR.js.map → chunk-7J3AAPH5.js.map} +0 -0
- /package/dist/{chunk-EJ3MAR5M.js.map → chunk-CSHFTQA7.js.map} +0 -0
- /package/dist/{chunk-IILTUCFB.js.map → chunk-DSUFV2ZN.js.map} +0 -0
- /package/dist/{chunk-SCJ2EB6Z.js.map → chunk-FWW5GCEH.js.map} +0 -0
- /package/dist/{chunk-7YOJXOFN.js.map → chunk-GG7MGRQ6.js.map} +0 -0
- /package/dist/{chunk-TNRTP5FW.js.map → chunk-I32MYAT5.js.map} +0 -0
- /package/dist/{chunk-553QYRXJ.js.map → chunk-IQVHJD4O.js.map} +0 -0
- /package/dist/{chunk-47WFM6QH.js.map → chunk-J2JP35S3.js.map} +0 -0
- /package/dist/{chunk-OXYGRB4C.js.map → chunk-J6OUXCR3.js.map} +0 -0
- /package/dist/{chunk-LZ2LHYDO.js.map → chunk-K6HJLOPA.js.map} +0 -0
- /package/dist/{chunk-HUN7CEAU.js.map → chunk-KS622JST.js.map} +0 -0
- /package/dist/{chunk-BGAK4N74.js.map → chunk-LSWGHIJK.js.map} +0 -0
- /package/dist/{chunk-XGUZ2OQK.js.map → chunk-OOGGQ2NA.js.map} +0 -0
- /package/dist/{chunk-O7VPOR5A.js.map → chunk-R76LLKT2.js.map} +0 -0
- /package/dist/{chunk-YGYJUPVX.js.map → chunk-RI3BFANI.js.map} +0 -0
- /package/dist/{chunk-UAGYCCHY.js.map → chunk-S3H4VWN5.js.map} +0 -0
- /package/dist/{chunk-M532SJS6.js.map → chunk-S7PFS6PX.js.map} +0 -0
- /package/dist/{chunk-MYSS22Q2.js.map → chunk-U5KSLUZ6.js.map} +0 -0
- /package/dist/{chunk-TKCXD36G.js.map → chunk-VKVJSPHJ.js.map} +0 -0
- /package/dist/{chunk-3S2OPUGU.js.map → chunk-XLJCXM7L.js.map} +0 -0
- /package/dist/{chunk-HWG437YQ.js.map → chunk-YH5U3XCP.js.map} +0 -0
- /package/dist/{chunk-AEPCCXMK.js.map → chunk-YMMX6ELC.js.map} +0 -0
- /package/dist/{chunk-GYWYCCJC.js.map → chunk-YQRP5NST.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-Q43YSBCB.js.map → cli-circuit-breaker-MLVJXLK6.js.map} +0 -0
- /package/dist/{composite-router-5UHJFOB3.js.map → composite-router-FTECAR4U.js.map} +0 -0
- /package/dist/{consensus-vote-7EBYYBCQ.js.map → consensus-vote-MMZTCPL7.js.map} +0 -0
- /package/dist/{context-retriever-33SGXV33.js.map → context-retriever-MPZ7T4VA.js.map} +0 -0
- /package/dist/{doctor-deep-RAN4HGOH.js.map → doctor-deep-KUB4HPCS.js.map} +0 -0
- /package/dist/{expert-bridge-RJP57L75.js.map → expert-bridge-EK362QGQ.js.map} +0 -0
- /package/dist/{factory-C5PY7R6O.js.map → factory-GOO7MH5G.js.map} +0 -0
- /package/dist/{factory-YOUM5MCV.js.map → factory-XBUQP3UB.js.map} +0 -0
- /package/dist/{improvement-review-H5BQ2JXK.js.map → improvement-review-XXRDVOJT.js.map} +0 -0
- /package/dist/{init-opencode-KHODCXA6.js.map → init-opencode-RNSCHZIW.js.map} +0 -0
- /package/dist/{issue-triage-OP3FDRKY.js.map → issue-triage-7TWTN6LI.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-UF42XZB6.js.map → pr-reviewer-helpers-VT4DR5BC.js.map} +0 -0
- /package/dist/{registry-command-EZ7735GC.js.map → registry-command-QVBYBBWR.js.map} +0 -0
- /package/dist/{repo-security-plan-D62HB5PK.js.map → repo-security-plan-VSQWMONM.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-KUA53BAD.js.map → research-helpers-synthesize-VCUOMHPD.js.map} +0 -0
- /package/dist/{routing-memory-FE4EQUXO.js.map → routing-memory-PP4UJVH4.js.map} +0 -0
- /package/dist/{session-memory-RA7KE6CX.js.map → session-memory-TVV2IOGB.js.map} +0 -0
- /package/dist/{setup-command-FJ2II5YH.js.map → setup-command-4GOUS52A.js.map} +0 -0
- /package/dist/{setup-config-SHG2DMZJ.js.map → setup-config-HZHL4QMD.js.map} +0 -0
- /package/dist/{setup-custom-api-NVS4EPBG.js.map → setup-custom-api-H6FJ5VWL.js.map} +0 -0
- /package/dist/{tool-memory-UQH2FTAS.js.map → tool-memory-YLCJZVMV.js.map} +0 -0
- /package/dist/{unified-registry-MMQXU622.js.map → unified-registry-ZUPTC7OR.js.map} +0 -0
- /package/dist/{weather-report-HRQCJEU5.js.map → weather-report-XPDW6LGI.js.map} +0 -0
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
createCliAdapter,
|
|
4
4
|
getAvailableClis,
|
|
5
5
|
isCliAvailable
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-S7PFS6PX.js";
|
|
7
|
+
import "./chunk-55ZDYUBT.js";
|
|
8
|
+
import "./chunk-I32MYAT5.js";
|
|
9
|
+
import "./chunk-YQRP5NST.js";
|
|
10
|
+
import "./chunk-RI3BFANI.js";
|
|
11
|
+
import "./chunk-U5KSLUZ6.js";
|
|
12
|
+
import "./chunk-Q4JNYY2Y.js";
|
|
13
13
|
import "./chunk-NL7SZQPW.js";
|
|
14
14
|
import "./chunk-DHVMSIT5.js";
|
|
15
15
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
getAvailableClis,
|
|
20
20
|
isCliAvailable
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=factory-
|
|
22
|
+
//# sourceMappingURL=factory-GOO7MH5G.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createGitHubProvider,
|
|
3
3
|
createScmProvider
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-J2JP35S3.js";
|
|
5
|
+
import "./chunk-7J3AAPH5.js";
|
|
6
|
+
import "./chunk-XLJCXM7L.js";
|
|
7
|
+
import "./chunk-Q4JNYY2Y.js";
|
|
8
8
|
import "./chunk-NL7SZQPW.js";
|
|
9
9
|
import "./chunk-DHVMSIT5.js";
|
|
10
10
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -12,4 +12,4 @@ export {
|
|
|
12
12
|
createGitHubProvider,
|
|
13
13
|
createScmProvider
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=factory-
|
|
15
|
+
//# sourceMappingURL=factory-XBUQP3UB.js.map
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
loadSelfEvalSignals,
|
|
12
12
|
registerImprovementReviewTool,
|
|
13
13
|
runImprovementReview
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-K6HJLOPA.js";
|
|
15
|
+
import "./chunk-2O63LDYB.js";
|
|
16
|
+
import "./chunk-42ZSRIEX.js";
|
|
17
|
+
import "./chunk-Q4JNYY2Y.js";
|
|
18
18
|
import "./chunk-NL7SZQPW.js";
|
|
19
19
|
import "./chunk-DHVMSIT5.js";
|
|
20
20
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -32,4 +32,4 @@ export {
|
|
|
32
32
|
registerImprovementReviewTool,
|
|
33
33
|
runImprovementReview
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=improvement-review-
|
|
35
|
+
//# sourceMappingURL=improvement-review-XXRDVOJT.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ZodError, z, ZodType, ZodSafeParseResult } from 'zod';
|
|
2
|
-
import { C as CliNameLiteral, I as InputModality, O as OutputModality, T as ToolCapability, S as SpecialFeature, P as Pricing, Q as QualityScores, M as ModelId, V as Vote, a as VoteDecision$1, b as VoterRole, D as DecisionCostSummary, c as ConsensusAlgorithm, d as VoteCounts, W as WeightedVoteCounts, A as AgentPerformance, e as ProposalState, f as ProposalId, g as ConsensusEngineConfig, h as ConsensusResult, i as ProposalStatus, j as Proposal, k as ConsensusMetrics, l as VoterExpansionCallback, m as AgentVoteResult, n as VotingStrategy, E as ErrorPolicy } from './consensus-vote-types-
|
|
3
|
-
export { o as AgentPerformanceSchema, p as AgentVoteSummary, q as ConsensusAlgorithmSchema, r as ConsensusEngineConfigSchema, s as ConsensusMetricsSchema, t as ConsensusResultSchema, u as ConsensusVoteInput, v as ConsensusVoteInputSchema, w as ConsensusVoteResponse, x as DEFAULT_CONSENSUS_CONFIG, y as ProposalSchema, z as ProposalStatusSchema, R as REJECTION_CATEGORIES, B as RejectionCategory, F as RejectionCategorySchema, G as VOTING_THRESHOLDS, H as VoteDecisionStatus, J as VoteSchema } from './consensus-vote-types-
|
|
2
|
+
import { C as CliNameLiteral, I as InputModality, O as OutputModality, T as ToolCapability, S as SpecialFeature, P as Pricing, Q as QualityScores, M as ModelId, V as Vote, a as VoteDecision$1, b as VoterRole, D as DecisionCostSummary, c as ConsensusAlgorithm, d as VoteCounts, W as WeightedVoteCounts, A as AgentPerformance, e as ProposalState, f as ProposalId, g as ConsensusEngineConfig, h as ConsensusResult, i as ProposalStatus, j as Proposal, k as ConsensusMetrics, l as VoterExpansionCallback, m as AgentVoteResult, n as VotingStrategy, E as ErrorPolicy } from './consensus-vote-types-DB3SmULO.js';
|
|
3
|
+
export { o as AgentPerformanceSchema, p as AgentVoteSummary, q as ConsensusAlgorithmSchema, r as ConsensusEngineConfigSchema, s as ConsensusMetricsSchema, t as ConsensusResultSchema, u as ConsensusVoteInput, v as ConsensusVoteInputSchema, w as ConsensusVoteResponse, x as DEFAULT_CONSENSUS_CONFIG, y as ProposalSchema, z as ProposalStatusSchema, R as REJECTION_CATEGORIES, B as RejectionCategory, F as RejectionCategorySchema, G as VOTING_THRESHOLDS, H as VoteDecisionStatus, J as VoteSchema } from './consensus-vote-types-DB3SmULO.js';
|
|
4
4
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
5
|
import { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
|
|
6
6
|
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createGitHubProvider,
|
|
3
3
|
createScmProvider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-J2JP35S3.js";
|
|
5
5
|
import {
|
|
6
6
|
ALLOWED_COMMANDS,
|
|
7
7
|
ARTIFACT_TYPES,
|
|
@@ -520,13 +520,13 @@ import {
|
|
|
520
520
|
validateWorkflow,
|
|
521
521
|
validateWorkflowDependencies,
|
|
522
522
|
withLogging
|
|
523
|
-
} from "./chunk-
|
|
523
|
+
} from "./chunk-SPOES3DZ.js";
|
|
524
524
|
import {
|
|
525
525
|
OPENAI_MODELS,
|
|
526
526
|
OPENAI_MODEL_ALIASES,
|
|
527
527
|
OpenAIAdapter,
|
|
528
528
|
createOpenAIAdapter
|
|
529
|
-
} from "./chunk-
|
|
529
|
+
} from "./chunk-CSHFTQA7.js";
|
|
530
530
|
import {
|
|
531
531
|
FALLBACK_SCANNER_DATA,
|
|
532
532
|
buildPlanFromAnalysis,
|
|
@@ -534,7 +534,7 @@ import {
|
|
|
534
534
|
generateSecurityPlan,
|
|
535
535
|
getRegistryManifest,
|
|
536
536
|
resolveScannerData
|
|
537
|
-
} from "./chunk-
|
|
537
|
+
} from "./chunk-6MCSD37T.js";
|
|
538
538
|
import {
|
|
539
539
|
analyzeGitHubRepo,
|
|
540
540
|
analyzeRepo,
|
|
@@ -560,14 +560,14 @@ import {
|
|
|
560
560
|
getKnownNexusVarNames,
|
|
561
561
|
startStdioServer,
|
|
562
562
|
validateNexusEnv
|
|
563
|
-
} from "./chunk-
|
|
563
|
+
} from "./chunk-J6OUXCR3.js";
|
|
564
564
|
import {
|
|
565
565
|
CliCircuitBreakerIntegration,
|
|
566
566
|
createCliCircuitBreakerIntegration
|
|
567
|
-
} from "./chunk-
|
|
567
|
+
} from "./chunk-YMMX6ELC.js";
|
|
568
568
|
import {
|
|
569
569
|
executeExpert
|
|
570
|
-
} from "./chunk-
|
|
570
|
+
} from "./chunk-LSWGHIJK.js";
|
|
571
571
|
import {
|
|
572
572
|
AgentFindingSchema,
|
|
573
573
|
ConsensusEngine,
|
|
@@ -616,9 +616,9 @@ import {
|
|
|
616
616
|
generateProposalId,
|
|
617
617
|
parseAgentPairKey,
|
|
618
618
|
registerConsensusVoteTool
|
|
619
|
-
} from "./chunk-
|
|
620
|
-
import "./chunk-
|
|
621
|
-
import "./chunk-
|
|
619
|
+
} from "./chunk-Q7TALELN.js";
|
|
620
|
+
import "./chunk-UQOJ2KGW.js";
|
|
621
|
+
import "./chunk-OOGGQ2NA.js";
|
|
622
622
|
import {
|
|
623
623
|
AgentActionSchema,
|
|
624
624
|
GitHubReviewer,
|
|
@@ -640,11 +640,11 @@ import {
|
|
|
640
640
|
requiresCorroboration,
|
|
641
641
|
validateAgentAction,
|
|
642
642
|
validateCorroboration
|
|
643
|
-
} from "./chunk-
|
|
643
|
+
} from "./chunk-6B5VQ2SY.js";
|
|
644
644
|
import {
|
|
645
645
|
GitHubProvider,
|
|
646
646
|
ScmError
|
|
647
|
-
} from "./chunk-
|
|
647
|
+
} from "./chunk-7J3AAPH5.js";
|
|
648
648
|
import {
|
|
649
649
|
GitHubUserRoleSchema,
|
|
650
650
|
InjectionFlagSchema,
|
|
@@ -659,11 +659,11 @@ import {
|
|
|
659
659
|
assessReputation,
|
|
660
660
|
reconcileTrustTier,
|
|
661
661
|
sanitizeInput
|
|
662
|
-
} from "./chunk-
|
|
662
|
+
} from "./chunk-S3H4VWN5.js";
|
|
663
663
|
import {
|
|
664
664
|
ImprovementReviewInputSchema,
|
|
665
665
|
registerImprovementReviewTool
|
|
666
|
-
} from "./chunk-
|
|
666
|
+
} from "./chunk-K6HJLOPA.js";
|
|
667
667
|
import {
|
|
668
668
|
AgentPerformanceSchema,
|
|
669
669
|
ConsensusAlgorithmSchema,
|
|
@@ -699,7 +699,7 @@ import {
|
|
|
699
699
|
toolSuccess,
|
|
700
700
|
toolSuccessStructured,
|
|
701
701
|
validateToolInput
|
|
702
|
-
} from "./chunk-
|
|
702
|
+
} from "./chunk-2O63LDYB.js";
|
|
703
703
|
import {
|
|
704
704
|
AuditTrail,
|
|
705
705
|
MAX_STRIPPED_ELEMENTS_PER_EVENT,
|
|
@@ -711,23 +711,23 @@ import {
|
|
|
711
711
|
emitReputationEvent,
|
|
712
712
|
emitSanitizationEvent,
|
|
713
713
|
emitTrustEvent
|
|
714
|
-
} from "./chunk-
|
|
714
|
+
} from "./chunk-42ZSRIEX.js";
|
|
715
715
|
import {
|
|
716
716
|
PersistentStrategyDistiller,
|
|
717
717
|
RulesSnapshotSchema
|
|
718
|
-
} from "./chunk-
|
|
718
|
+
} from "./chunk-R76LLKT2.js";
|
|
719
719
|
import {
|
|
720
720
|
getTokenEnvVars,
|
|
721
721
|
hasToken,
|
|
722
722
|
resolveToken
|
|
723
|
-
} from "./chunk-
|
|
724
|
-
import "./chunk-
|
|
723
|
+
} from "./chunk-XLJCXM7L.js";
|
|
724
|
+
import "./chunk-YH5U3XCP.js";
|
|
725
725
|
import "./chunk-NUBSJGQZ.js";
|
|
726
726
|
import {
|
|
727
727
|
MemoryError
|
|
728
|
-
} from "./chunk-
|
|
728
|
+
} from "./chunk-GG7MGRQ6.js";
|
|
729
729
|
import "./chunk-6T3EPABN.js";
|
|
730
|
-
import "./chunk-
|
|
730
|
+
import "./chunk-DSUFV2ZN.js";
|
|
731
731
|
import {
|
|
732
732
|
BUILT_IN_EXPERTS,
|
|
733
733
|
BuiltInExpertTypeSchema,
|
|
@@ -746,7 +746,7 @@ import {
|
|
|
746
746
|
resetGlobalRegistry,
|
|
747
747
|
withModelNotFoundFallback,
|
|
748
748
|
wrapResilientWithFallback
|
|
749
|
-
} from "./chunk-
|
|
749
|
+
} from "./chunk-VKVJSPHJ.js";
|
|
750
750
|
import {
|
|
751
751
|
BaseCliAdapter,
|
|
752
752
|
CLAUDE_MODELS,
|
|
@@ -784,7 +784,7 @@ import {
|
|
|
784
784
|
isRetryableError,
|
|
785
785
|
messagesToAnthropicFormat,
|
|
786
786
|
sleep
|
|
787
|
-
} from "./chunk-
|
|
787
|
+
} from "./chunk-S7PFS6PX.js";
|
|
788
788
|
import {
|
|
789
789
|
AdapterModelError,
|
|
790
790
|
BaseAdapter,
|
|
@@ -808,12 +808,12 @@ import {
|
|
|
808
808
|
transformStream,
|
|
809
809
|
validateApiKeyPresence,
|
|
810
810
|
withTimeout
|
|
811
|
-
} from "./chunk-
|
|
811
|
+
} from "./chunk-55ZDYUBT.js";
|
|
812
812
|
import {
|
|
813
813
|
DEFAULTS,
|
|
814
814
|
PROVIDER_ENV_KEYS
|
|
815
|
-
} from "./chunk-
|
|
816
|
-
import "./chunk-
|
|
815
|
+
} from "./chunk-I32MYAT5.js";
|
|
816
|
+
import "./chunk-YQRP5NST.js";
|
|
817
817
|
import {
|
|
818
818
|
AvailabilityCache,
|
|
819
819
|
filterAvailableModels,
|
|
@@ -822,8 +822,8 @@ import {
|
|
|
822
822
|
getFallbackChain,
|
|
823
823
|
resetAvailabilityCache,
|
|
824
824
|
resolveFallback
|
|
825
|
-
} from "./chunk-
|
|
826
|
-
import "./chunk-
|
|
825
|
+
} from "./chunk-RI3BFANI.js";
|
|
826
|
+
import "./chunk-U5KSLUZ6.js";
|
|
827
827
|
import {
|
|
828
828
|
AgentCapability,
|
|
829
829
|
AgentError,
|
|
@@ -901,7 +901,7 @@ import {
|
|
|
901
901
|
toError,
|
|
902
902
|
unwrap,
|
|
903
903
|
unwrapOr
|
|
904
|
-
} from "./chunk-
|
|
904
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
905
905
|
import "./chunk-NL7SZQPW.js";
|
|
906
906
|
import "./chunk-DHVMSIT5.js";
|
|
907
907
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -5987,7 +5987,7 @@ function buildVotingInput(plan, config) {
|
|
|
5987
5987
|
}
|
|
5988
5988
|
async function executeSingleVote(plan, config, log) {
|
|
5989
5989
|
try {
|
|
5990
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
5990
|
+
const { executeVoting } = await import("./consensus-vote-MMZTCPL7.js");
|
|
5991
5991
|
const input = buildVotingInput(plan, config);
|
|
5992
5992
|
const result = await executeVoting(input, log);
|
|
5993
5993
|
return parseVotingResult(result);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
discoverModels,
|
|
3
3
|
readOpencodeGateway
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-CTL5HUZZ.js";
|
|
5
|
+
import "./chunk-CSHFTQA7.js";
|
|
6
|
+
import "./chunk-UQOJ2KGW.js";
|
|
7
|
+
import "./chunk-55ZDYUBT.js";
|
|
8
8
|
import {
|
|
9
9
|
createLogger
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
11
11
|
import "./chunk-NL7SZQPW.js";
|
|
12
12
|
import "./chunk-DHVMSIT5.js";
|
|
13
13
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -176,4 +176,4 @@ export {
|
|
|
176
176
|
runInitOpencode,
|
|
177
177
|
runOpencodeValidate
|
|
178
178
|
};
|
|
179
|
-
//# sourceMappingURL=init-opencode-
|
|
179
|
+
//# sourceMappingURL=init-opencode-RNSCHZIW.js.map
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
IssueTriage,
|
|
3
3
|
createIssueTriage,
|
|
4
4
|
formatTriageComment
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-6B5VQ2SY.js";
|
|
6
|
+
import "./chunk-7J3AAPH5.js";
|
|
7
|
+
import "./chunk-S3H4VWN5.js";
|
|
8
|
+
import "./chunk-42ZSRIEX.js";
|
|
9
|
+
import "./chunk-Q4JNYY2Y.js";
|
|
10
10
|
import "./chunk-NL7SZQPW.js";
|
|
11
11
|
import "./chunk-DHVMSIT5.js";
|
|
12
12
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
createIssueTriage,
|
|
16
16
|
formatTriageComment
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=issue-triage-
|
|
18
|
+
//# sourceMappingURL=issue-triage-7TWTN6LI.js.map
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
parseFindings,
|
|
18
18
|
parseSeverity,
|
|
19
19
|
sumFindings
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KS622JST.js";
|
|
21
21
|
import "./chunk-WAYGXUSM.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-S3H4VWN5.js";
|
|
23
|
+
import "./chunk-Q4JNYY2Y.js";
|
|
24
24
|
import "./chunk-NL7SZQPW.js";
|
|
25
25
|
import "./chunk-DHVMSIT5.js";
|
|
26
26
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -44,4 +44,4 @@ export {
|
|
|
44
44
|
parseSeverity,
|
|
45
45
|
sumFindings
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=pr-reviewer-helpers-
|
|
47
|
+
//# sourceMappingURL=pr-reviewer-helpers-VT4DR5BC.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
loadGeneratedRegistryEntries,
|
|
8
8
|
loadUserManifestOverlay,
|
|
9
9
|
reloadDefaultRegistry
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
11
11
|
import "./chunk-NL7SZQPW.js";
|
|
12
12
|
import {
|
|
13
13
|
nexusDataPath
|
|
@@ -249,4 +249,4 @@ export {
|
|
|
249
249
|
isValidRegistrySubcommand,
|
|
250
250
|
registryCommand
|
|
251
251
|
};
|
|
252
|
-
//# sourceMappingURL=registry-command-
|
|
252
|
+
//# sourceMappingURL=registry-command-QVBYBBWR.js.map
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
buildPlanFromAnalysis,
|
|
4
4
|
generateSecurityPlan,
|
|
5
5
|
resolveScannerData
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6MCSD37T.js";
|
|
7
7
|
import "./chunk-HFOQKCD2.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-Q4JNYY2Y.js";
|
|
9
9
|
import "./chunk-NL7SZQPW.js";
|
|
10
10
|
import "./chunk-DHVMSIT5.js";
|
|
11
11
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
generateSecurityPlan,
|
|
16
16
|
resolveScannerData
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=repo-security-plan-
|
|
18
|
+
//# sourceMappingURL=repo-security-plan-VSQWMONM.js.map
|
package/dist/{research-helpers-synthesize-KUA53BAD.js → research-helpers-synthesize-VCUOMHPD.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AttributedInsightSchema,
|
|
3
3
|
synthesizeResearch
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-OOGGQ2NA.js";
|
|
5
|
+
import "./chunk-YH5U3XCP.js";
|
|
6
6
|
import "./chunk-NUBSJGQZ.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-Q4JNYY2Y.js";
|
|
8
8
|
import "./chunk-NL7SZQPW.js";
|
|
9
9
|
import "./chunk-DHVMSIT5.js";
|
|
10
10
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -12,4 +12,4 @@ export {
|
|
|
12
12
|
AttributedInsightSchema,
|
|
13
13
|
synthesizeResearch
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=research-helpers-synthesize-
|
|
15
|
+
//# sourceMappingURL=research-helpers-synthesize-VCUOMHPD.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DEFAULT_ROUTING_MEMORY_CONFIG,
|
|
3
3
|
RoutingMemory,
|
|
4
4
|
createRoutingMemory
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
6
6
|
import "./chunk-NL7SZQPW.js";
|
|
7
7
|
import "./chunk-DHVMSIT5.js";
|
|
8
8
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -11,4 +11,4 @@ export {
|
|
|
11
11
|
RoutingMemory,
|
|
12
12
|
createRoutingMemory
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=routing-memory-
|
|
14
|
+
//# sourceMappingURL=routing-memory-PP4UJVH4.js.map
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
SessionMemory,
|
|
7
7
|
SessionMemoryError,
|
|
8
8
|
createSessionMemory
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-DSUFV2ZN.js";
|
|
10
|
+
import "./chunk-Q4JNYY2Y.js";
|
|
11
11
|
import "./chunk-NL7SZQPW.js";
|
|
12
12
|
import "./chunk-DHVMSIT5.js";
|
|
13
13
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
SessionMemoryError,
|
|
21
21
|
createSessionMemory
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=session-memory-
|
|
23
|
+
//# sourceMappingURL=session-memory-TVV2IOGB.js.map
|
|
@@ -8,19 +8,19 @@ import {
|
|
|
8
8
|
runWizard,
|
|
9
9
|
setupCommand,
|
|
10
10
|
setupCommandAsync
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-IQVHJD4O.js";
|
|
12
|
+
import "./chunk-4IXC6V6O.js";
|
|
13
|
+
import "./chunk-J6OUXCR3.js";
|
|
14
14
|
import "./chunk-NUBSJGQZ.js";
|
|
15
15
|
import "./chunk-6T3EPABN.js";
|
|
16
16
|
import "./chunk-ZM4O442V.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-S7PFS6PX.js";
|
|
18
|
+
import "./chunk-55ZDYUBT.js";
|
|
19
|
+
import "./chunk-I32MYAT5.js";
|
|
20
|
+
import "./chunk-YQRP5NST.js";
|
|
21
|
+
import "./chunk-RI3BFANI.js";
|
|
22
|
+
import "./chunk-U5KSLUZ6.js";
|
|
23
|
+
import "./chunk-Q4JNYY2Y.js";
|
|
24
24
|
import "./chunk-NL7SZQPW.js";
|
|
25
25
|
import "./chunk-DHVMSIT5.js";
|
|
26
26
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -35,4 +35,4 @@ export {
|
|
|
35
35
|
setupCommand,
|
|
36
36
|
setupCommandAsync
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=setup-command-
|
|
38
|
+
//# sourceMappingURL=setup-command-4GOUS52A.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runConfigInitSync
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-4IXC6V6O.js";
|
|
4
|
+
import "./chunk-Q4JNYY2Y.js";
|
|
5
5
|
import "./chunk-NL7SZQPW.js";
|
|
6
6
|
import "./chunk-DHVMSIT5.js";
|
|
7
7
|
import "./chunk-ZPWHCABL.js";
|
|
8
8
|
export {
|
|
9
9
|
runConfigInitSync
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=setup-config-
|
|
11
|
+
//# sourceMappingURL=setup-config-HZHL4QMD.js.map
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
CUSTOM_API_BASE_URL_ENV,
|
|
4
4
|
CUSTOM_API_DEFAULT_MODEL,
|
|
5
5
|
validateCustomApiBaseUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I32MYAT5.js";
|
|
7
7
|
import {
|
|
8
8
|
err,
|
|
9
9
|
ok
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
11
11
|
import "./chunk-NL7SZQPW.js";
|
|
12
12
|
import "./chunk-DHVMSIT5.js";
|
|
13
13
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -105,4 +105,4 @@ function buildShellFragment(params) {
|
|
|
105
105
|
export {
|
|
106
106
|
configureCustomApi
|
|
107
107
|
};
|
|
108
|
-
//# sourceMappingURL=setup-custom-api-
|
|
108
|
+
//# sourceMappingURL=setup-custom-api-H6FJ5VWL.js.map
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
getToolMemory,
|
|
4
4
|
reinitializeMemoryBackends,
|
|
5
5
|
shutdownToolMemory
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GG7MGRQ6.js";
|
|
7
7
|
import "./chunk-6T3EPABN.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-DSUFV2ZN.js";
|
|
9
9
|
import "./chunk-PINS44XA.js";
|
|
10
10
|
import "./chunk-KSQSWEFH.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-U5KSLUZ6.js";
|
|
12
|
+
import "./chunk-Q4JNYY2Y.js";
|
|
13
13
|
import "./chunk-NL7SZQPW.js";
|
|
14
14
|
import "./chunk-DHVMSIT5.js";
|
|
15
15
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
reinitializeMemoryBackends,
|
|
20
20
|
shutdownToolMemory
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=tool-memory-
|
|
22
|
+
//# sourceMappingURL=tool-memory-YLCJZVMV.js.map
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
getGlobalRegistry,
|
|
5
5
|
resetGlobalRegistry,
|
|
6
6
|
withDefaultOnRetirement
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-VKVJSPHJ.js";
|
|
8
|
+
import "./chunk-S7PFS6PX.js";
|
|
9
|
+
import "./chunk-55ZDYUBT.js";
|
|
10
|
+
import "./chunk-I32MYAT5.js";
|
|
11
|
+
import "./chunk-YQRP5NST.js";
|
|
12
|
+
import "./chunk-RI3BFANI.js";
|
|
13
|
+
import "./chunk-U5KSLUZ6.js";
|
|
14
|
+
import "./chunk-Q4JNYY2Y.js";
|
|
15
15
|
import "./chunk-NL7SZQPW.js";
|
|
16
16
|
import "./chunk-DHVMSIT5.js";
|
|
17
17
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -22,4 +22,4 @@ export {
|
|
|
22
22
|
resetGlobalRegistry,
|
|
23
23
|
withDefaultOnRetirement
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=unified-registry-
|
|
25
|
+
//# sourceMappingURL=unified-registry-ZUPTC7OR.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getAdaptiveBonus,
|
|
4
4
|
queryWithLookback,
|
|
5
5
|
shouldExplore
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Q4JNYY2Y.js";
|
|
7
7
|
import "./chunk-NL7SZQPW.js";
|
|
8
8
|
import "./chunk-DHVMSIT5.js";
|
|
9
9
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
queryWithLookback,
|
|
14
14
|
shouldExplore
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=weather-report-
|
|
16
|
+
//# sourceMappingURL=weather-report-XPDW6LGI.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexus-agents",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.158.0",
|
|
4
4
|
"description": "Governance substrate for AI coding agents — adversarial PR review, drift-detected rules, tamper-evident audit, and closed-loop outcome routing for Claude, Codex, Gemini, and OpenCode",
|
|
5
5
|
"mcpName": "io.github.nexus-substrate/nexus-agents",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/learning/usage-log.ts"],"sourcesContent":["/**\n * usage-log — append-only per-call usage events with cost.\n *\n * Source: Issue #2469 (epic #2467 child).\n *\n * For operators running against metered API gateways, per-call cost +\n * tokens + latency is the data they need to manage spend. This module\n * provides three things:\n *\n * 1. `recordUsageEvent(event)` — append a per-call record to a JSONL\n * log under <NEXUS_DATA_DIR>/usage/usage-YYYY-MM.jsonl.\n * 2. `loadUsageEvents({...})` — read events for a window, filtered\n * by model / category.\n * 3. `computeCostUSD(modelId, inputTokens, outputTokens)` — compute\n * cost from `config/in-tree-data.ts` pricing via `lookupInTreeCapability`.\n *\n * The `usage` CLI command (cli/usage-command.ts) consumes this for the\n * operator dashboard. Existing OutcomeStore is intentionally untouched\n * — its schema is for routing/learning signals, not billing.\n */\n\nimport { appendFileSync, existsSync, mkdirSync, readFileSync, readdirSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\n\nimport { getNexusDataDir } from '../config/nexus-data-dir.js';\nimport { lookupInTreeCapability } from '../config/model-config-helpers.js';\n\nexport interface UsageEvent {\n /** ISO 8601 timestamp of the call. */\n readonly timestamp: string;\n /** Model identifier (e.g., 'claude-sonnet-4', 'gpt-4o'). */\n readonly modelId: string;\n /** Provider/adapter (e.g., 'anthropic', 'openai', 'openai-compat'). */\n readonly providerId: string;\n /** Token counts. */\n readonly inputTokens: number;\n readonly outputTokens: number;\n /** Cost in USD. Computed at write time from pricing in `config/in-tree-data.ts`. */\n readonly usdCost: number;\n /** Wall-clock latency in milliseconds. */\n readonly latencyMs: number;\n /** Whether the call succeeded. */\n readonly success: boolean;\n /**\n * Optional task category — populated when the call was made on behalf of\n * a routed task (so aggregation can roll up by category).\n */\n readonly category?: string;\n /** Optional failure code when success === false. */\n readonly errorCode?: string;\n}\n\n/**\n * Compute cost in USD given a model and token counts. Returns 0 when the\n * model has no pricing data (e.g., free local model, gateway-routed model\n * we don't have rates for). Operators with custom gateways can extend\n * `config/in-tree-data.ts` to add their pricing.\n */\nexport function computeCostUSD(modelId: string, inputTokens: number, outputTokens: number): number {\n const cap = lookupInTreeCapability(modelId);\n if (cap === undefined) return 0;\n const inputPer1M = cap.pricing?.inputPer1M ?? 0;\n const outputPer1M = cap.pricing?.outputPer1M ?? 0;\n // Multiply token counts by per-million rate then divide. Use Math.round\n // at micro-USD precision so JSONL files don't drift to floating-point\n // noise on small calls.\n const microUsd = Math.round(\n inputTokens * inputPer1M + outputTokens * outputPer1M // micro-USD per million scaled\n );\n return microUsd / 1_000_000;\n}\n\n/** Resolve the active usage log path for the current month. */\nexport function getUsageLogPath(date: Date = new Date()): string {\n const year = date.getUTCFullYear();\n const month = String(date.getUTCMonth() + 1).padStart(2, '0');\n return join(getNexusDataDir(), 'usage', `usage-${String(year)}-${month}.jsonl`);\n}\n\n/**\n * Append a usage event to the current month's log. Best-effort — failures\n * are silent (we don't want to fail a successful model call because we\n * couldn't write a log line).\n */\nexport function recordUsageEvent(event: UsageEvent): void {\n try {\n const path = getUsageLogPath(new Date(event.timestamp));\n mkdirSync(dirname(path), { recursive: true });\n appendFileSync(path, `${JSON.stringify(event)}\\n`, 'utf-8');\n } catch {\n // Intentionally silent — telemetry must not break user calls.\n }\n}\n\nexport interface LoadUsageOptions {\n /** Restrict to events at or after this ISO timestamp. */\n readonly sinceIso?: string;\n /** Restrict to events before this ISO timestamp. */\n readonly untilIso?: string;\n /** Only events for this model. */\n readonly modelId?: string;\n /** Only events for this category. */\n readonly category?: string;\n}\n\nfunction listUsageFiles(dir: string): readonly string[] {\n if (!existsSync(dir)) return [];\n try {\n return readdirSync(dir).filter((f) => f.startsWith('usage-') && f.endsWith('.jsonl'));\n } catch {\n return [];\n }\n}\n\ninterface LoadFilter {\n readonly sinceMs: number;\n readonly untilMs: number;\n readonly modelId: string | undefined;\n readonly category: string | undefined;\n}\n\nfunction eventMatches(parsed: UsageEvent, f: LoadFilter): boolean {\n const ts = Date.parse(parsed.timestamp);\n if (ts < f.sinceMs || ts >= f.untilMs) return false;\n if (f.modelId !== undefined && parsed.modelId !== f.modelId) return false;\n if (f.category !== undefined && parsed.category !== f.category) return false;\n return true;\n}\n\nfunction parseFileLines(filePath: string, filter: LoadFilter): readonly UsageEvent[] {\n let content: string;\n try {\n content = readFileSync(filePath, 'utf-8');\n } catch {\n return [];\n }\n const out: UsageEvent[] = [];\n for (const line of content.split('\\n')) {\n if (line.trim() === '') continue;\n try {\n const parsed = JSON.parse(line) as UsageEvent;\n if (eventMatches(parsed, filter)) out.push(parsed);\n } catch {\n // Skip malformed line; keep reading.\n continue;\n }\n }\n return out;\n}\n\n/**\n * Load all usage events from disk that match the filter. Reads every\n * monthly log file under the data dir; for sub-second filtering at scale\n * a future PR can index by month, but linear scan is fine at the\n * \"operator dashboard\" scale this command targets.\n */\nexport function loadUsageEvents(opts: LoadUsageOptions = {}): readonly UsageEvent[] {\n const dir = join(getNexusDataDir(), 'usage');\n const files = listUsageFiles(dir);\n if (files.length === 0) return [];\n const filter: LoadFilter = {\n sinceMs: opts.sinceIso !== undefined ? Date.parse(opts.sinceIso) : Number.NEGATIVE_INFINITY,\n untilMs: opts.untilIso !== undefined ? Date.parse(opts.untilIso) : Number.POSITIVE_INFINITY,\n modelId: opts.modelId,\n category: opts.category,\n };\n const events: UsageEvent[] = [];\n for (const f of files) {\n events.push(...parseFileLines(join(dir, f), filter));\n }\n return events;\n}\n\nexport interface ModelRollup {\n readonly modelId: string;\n readonly providerId: string;\n readonly callCount: number;\n readonly successCount: number;\n readonly successRate: number;\n readonly totalInputTokens: number;\n readonly totalOutputTokens: number;\n readonly totalUsdCost: number;\n readonly avgLatencyMs: number;\n readonly costPerSuccessUsd: number;\n}\n\n/**\n * Aggregate events into per-model rollups. Sorted by total cost descending\n * — the model burning the most money at top. Useful for \"where is my spend\n * going?\" investigations.\n */\nexport function rollupByModel(events: readonly UsageEvent[]): readonly ModelRollup[] {\n const groups = new Map<string, UsageEvent[]>();\n for (const e of events) {\n const arr = groups.get(e.modelId);\n if (arr === undefined) groups.set(e.modelId, [e]);\n else arr.push(e);\n }\n const rollups: ModelRollup[] = [];\n for (const [modelId, group] of groups) {\n const callCount = group.length;\n const successCount = group.filter((e) => e.success).length;\n const totalInputTokens = group.reduce((s, e) => s + e.inputTokens, 0);\n const totalOutputTokens = group.reduce((s, e) => s + e.outputTokens, 0);\n const totalUsdCost = group.reduce((s, e) => s + e.usdCost, 0);\n const totalLatency = group.reduce((s, e) => s + e.latencyMs, 0);\n const successRate = callCount === 0 ? 0 : successCount / callCount;\n const avgLatencyMs = callCount === 0 ? 0 : totalLatency / callCount;\n const costPerSuccessUsd = successCount === 0 ? totalUsdCost : totalUsdCost / successCount;\n rollups.push({\n modelId,\n providerId: group[0]?.providerId ?? 'unknown',\n callCount,\n successCount,\n successRate,\n totalInputTokens,\n totalOutputTokens,\n totalUsdCost,\n avgLatencyMs,\n costPerSuccessUsd,\n });\n }\n return rollups.sort((a, b) => b.totalUsdCost - a.totalUsdCost);\n}\n"],"mappings":"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","names":[]}
|