nexus-agents 2.157.1 → 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-ENPYELJM.js → chunk-IQVHJD4O.js} +5 -5
- package/dist/{chunk-47WFM6QH.js → chunk-J2JP35S3.js} +4 -4
- package/dist/{chunk-RHUKGSH7.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-JWCD3JCB.js → chunk-Q7TALELN.js} +11 -10
- package/dist/{chunk-JWCD3JCB.js.map → chunk-Q7TALELN.js.map} +1 -1
- 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-VEINXCXS.js → chunk-SPOES3DZ.js} +34 -34
- 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-ZYZMDGT5.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-AX3B46CE.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/{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-ENPYELJM.js.map → chunk-IQVHJD4O.js.map} +0 -0
- /package/dist/{chunk-47WFM6QH.js.map → chunk-J2JP35S3.js.map} +0 -0
- /package/dist/{chunk-RHUKGSH7.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-VEINXCXS.js.map → chunk-SPOES3DZ.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-ZYZMDGT5.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-AX3B46CE.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
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":";;;;;;;;AAqBA,SAAS,gBAAgB,YAAY,WAAW,cAAc,mBAAmB;AACjF,SAAS,SAAS,YAAY;AAoCvB,SAAS,eAAe,SAAiB,aAAqB,cAA8B;AACjG,QAAM,MAAM,uBAAuB,OAAO;AAC1C,MAAI,QAAQ,OAAW,QAAO;AAC9B,QAAM,aAAa,IAAI,SAAS,cAAc;AAC9C,QAAM,cAAc,IAAI,SAAS,eAAe;AAIhD,QAAM,WAAW,KAAK;AAAA,IACpB,cAAc,aAAa,eAAe;AAAA;AAAA,EAC5C;AACA,SAAO,WAAW;AACpB;AAGO,SAAS,gBAAgB,OAAa,oBAAI,KAAK,GAAW;AAC/D,QAAM,OAAO,KAAK,eAAe;AACjC,QAAM,QAAQ,OAAO,KAAK,YAAY,IAAI,CAAC,EAAE,SAAS,GAAG,GAAG;AAC5D,SAAO,KAAK,gBAAgB,GAAG,SAAS,SAAS,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ;AAChF;AAOO,SAAS,iBAAiB,OAAyB;AACxD,MAAI;AACF,UAAM,OAAO,gBAAgB,IAAI,KAAK,MAAM,SAAS,CAAC;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MAAM,CAAC,GAAG,cAAc;AAAA,MACpC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AACA,SAAO,QAAQ,KAAK,CAAC,GAAG,MAAM,EAAE,eAAe,EAAE,YAAY;AAC/D;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config/opencode-bridge.ts","../src/adapters/openai-compat-adapter.ts"],"sourcesContent":["/**\n * opencode.json gateway-config bridge (#2503, child 3 of epic #2500).\n *\n * When nexus-agents runs as an MCP loaded by OpenCode (typically inside a\n * Docker sandbox), OpenCode's `opencode.json` already declares the\n * OpenAI-compatible gateway the harness uses. Reading it from there saves\n * the operator from re-declaring the same `baseURL` + `apiKey` as\n * NEXUS_OPENAI_COMPAT_* env vars.\n *\n * Scope (per direction discussion 2026-05-09):\n * - **Only** reads `providers.openai-compat.options.{baseURL, apiKey}`.\n * Does NOT read OpenCode's MCP config, model list, logging, or other\n * settings. nexus-agents' own behaviour stays driven by\n * `nexus-agents.yaml` + `NEXUS_*` env vars.\n * - Resolves OpenCode's `{env:VAR}` interpolation in the apiKey field.\n * - Returns `null` on any failure path (missing file, parse error,\n * missing fields, unset interpolated env var) — caller falls back to\n * env-var precedence; we don't throw.\n *\n * Precedence (applied in `openai-compat-adapter.ts`):\n * 1. `NEXUS_OPENAI_COMPAT_URL` + `NEXUS_OPENAI_COMPAT_KEY` env vars (if both set)\n * 2. `NEXUS_OPENCODE_CONFIG` → `opencode.json` → `providers.openai-compat`\n * 3. Unconfigured → `null`, no adapter registered\n *\n * Sanitised logging: never log the resolved apiKey. Only the baseURL is\n * logged on success.\n *\n * @module config/opencode-bridge\n */\n\nimport { readFileSync } from 'node:fs';\n\nimport { createLogger } from '../core/index.js';\n\nconst logger = createLogger({ component: 'opencode-bridge' });\n\nexport interface OpencodeGatewayConfig {\n readonly baseURL: string;\n readonly apiKey: string;\n}\n\n/**\n * Read `providers.openai-compat.options.{baseURL, apiKey}` from the given\n * opencode.json path. Returns `null` on any failure — the caller falls\n * back to env-var precedence.\n */\nexport function readOpencodeGateway(path: string): OpencodeGatewayConfig | null {\n const raw = readFileOrNull(path);\n if (raw === null) return null;\n\n const parsed = parseJsonOrNull(raw, path);\n if (parsed === null) return null;\n\n const options = extractOpenAICompatOptions(parsed);\n if (options === null) {\n logger.debug('opencode.json has no providers.openai-compat.options block', { path });\n return null;\n }\n\n const baseURL = typeof options.baseURL === 'string' ? options.baseURL.trim() : '';\n const apiKeyRaw = typeof options.apiKey === 'string' ? options.apiKey.trim() : '';\n if (baseURL === '' || apiKeyRaw === '') {\n logger.warn('opencode.json providers.openai-compat missing baseURL or apiKey', { path });\n return null;\n }\n\n const apiKey = resolveEnvInterpolation(apiKeyRaw);\n if (apiKey === null) {\n logger.warn(\n 'opencode.json apiKey references an env var that is not set; gateway not configured',\n { path }\n );\n return null;\n }\n\n logger.info('Gateway config sourced from opencode.json', { baseURL, path });\n return { baseURL, apiKey };\n}\n\nfunction readFileOrNull(path: string): string | null {\n try {\n return readFileSync(path, 'utf8');\n } catch (err: unknown) {\n const msg = err instanceof Error ? err.message : String(err);\n logger.debug('Could not read opencode.json', { path, error: msg });\n return null;\n }\n}\n\nfunction parseJsonOrNull(raw: string, path: string): unknown {\n try {\n return JSON.parse(raw);\n } catch (err: unknown) {\n const msg = err instanceof Error ? err.message : String(err);\n logger.warn('opencode.json is not valid JSON; ignoring', { path, error: msg });\n return null;\n }\n}\n\n/**\n * Pull `providers.openai-compat.options` out of the parsed JSON without\n * coupling to a Zod schema. OpenCode's config has many keys we don't\n * care about; we only navigate to the one we need.\n */\nfunction extractOpenAICompatOptions(\n parsed: unknown\n): { baseURL?: unknown; apiKey?: unknown } | null {\n if (typeof parsed !== 'object' || parsed === null) return null;\n const root = parsed as { providers?: unknown };\n const providers = root.providers;\n if (typeof providers !== 'object' || providers === null) return null;\n const provider = (providers as Record<string, unknown>)['openai-compat'];\n if (typeof provider !== 'object' || provider === null) return null;\n const options = (provider as { options?: unknown }).options;\n if (typeof options !== 'object' || options === null) return null;\n return options;\n}\n\n/**\n * Resolve OpenCode's `{env:VAR}` interpolation. Only the literal pattern\n * is supported (no shell expansion, no defaults). Returns the string as-is\n * when no interpolation is present; returns `null` when the referenced\n * env var is not set.\n */\nfunction resolveEnvInterpolation(value: string): string | null {\n const match = /^\\{env:([A-Z0-9_]+)\\}$/.exec(value);\n if (match === null) return value;\n const envName = match[1];\n if (envName === undefined) return null;\n const resolved = process.env[envName];\n if (resolved === undefined || resolved === '') return null;\n return resolved;\n}\n","/**\n * OpenAI-compatible gateway adapter — talk to any HTTP gateway that exposes\n * the OpenAI Chat Completions API. The gateway may itself be a multi-model\n * router (Bedrock/Vertex/Azure proxy, OpenRouter, vLLM, etc.). nexus-agents\n * sees one adapter, the gateway exposes N models, and the existing routing\n * pipeline picks among them.\n *\n * Source: Issue #2468 (epic #2467 child).\n *\n * Configuration precedence (#2503, child 3 of epic #2500):\n * 1. NEXUS_OPENAI_COMPAT_URL + NEXUS_OPENAI_COMPAT_KEY env vars (both required)\n * 2. NEXUS_OPENCODE_CONFIG path → opencode.json → providers.openai-compat\n * 3. Unconfigured → adapter not built\n *\n * Models are discovered via GET {base}/v1/models at first use. Each model\n * the gateway exposes can be selected by ID; the adapter wraps the existing\n * `OpenAIAdapter` for the actual chat-completions request, so streaming +\n * tool use + the full IModelAdapter contract come for free.\n */\n\nimport OpenAI from 'openai';\n\nimport type {\n Result,\n CompletionRequest,\n CompletionResponse,\n ModelError,\n ModelMetadata,\n IModelAdapter,\n} from '../core/index.js';\nimport { ok, err, ConfigError, getErrorMessage, getTimeProvider } from '../core/index.js';\nimport { OpenAIAdapter } from './openai-adapter.js';\nimport { recordUsageEvent, computeCostUSD } from '../learning/usage-log.js';\nimport { readOpencodeGateway } from '../config/opencode-bridge.js';\n\nexport interface OpenAICompatConfig {\n /** Gateway base URL — must reach `/v1/models` and `/v1/chat/completions`. */\n readonly baseUrl: string;\n /** API key the gateway expects. */\n readonly apiKey: string;\n}\n\nexport interface DiscoveredModel {\n readonly id: string;\n /** Unix epoch seconds when the model was created (per OpenAI API). */\n readonly created?: number;\n /** Owning organization or upstream provider name. */\n readonly ownedBy?: string;\n}\n\n/**\n * Read the gateway config with the precedence chain documented in the\n * module docstring: env vars > opencode.json > unconfigured.\n *\n * The env-var path (#2468) wins when both `NEXUS_OPENAI_COMPAT_URL` and\n * `NEXUS_OPENAI_COMPAT_KEY` are set. Otherwise, when `NEXUS_OPENCODE_CONFIG`\n * names a path, the opencode.json bridge tries to source the gateway from\n * `providers.openai-compat.options.{baseURL, apiKey}` (#2503). Returns\n * `null` when neither path yields a config — caller treats unset gateway\n * as \"no adapter from this source.\"\n */\nexport function readOpenAICompatEnv(): OpenAICompatConfig | null {\n const fromEnv = readGatewayFromEnv();\n if (fromEnv !== null) return fromEnv;\n return readGatewayFromOpencode();\n}\n\nfunction readGatewayFromEnv(): OpenAICompatConfig | null {\n const envUrl = process.env['NEXUS_OPENAI_COMPAT_URL']?.trim();\n const envKey = process.env['NEXUS_OPENAI_COMPAT_KEY']?.trim();\n if (envUrl === undefined || envUrl === '') return null;\n if (envKey === undefined || envKey === '') return null;\n return { baseUrl: envUrl, apiKey: envKey };\n}\n\nfunction readGatewayFromOpencode(): OpenAICompatConfig | null {\n const opencodePath = process.env['NEXUS_OPENCODE_CONFIG']?.trim();\n if (opencodePath === undefined || opencodePath === '') return null;\n const fromFile = readOpencodeGateway(opencodePath);\n if (fromFile === null) return null;\n return { baseUrl: fromFile.baseURL, apiKey: fromFile.apiKey };\n}\n\n/**\n * Discover available models by calling `GET {baseUrl}/v1/models`. Uses the\n * official `openai` SDK's `client.models.list()` so we benefit from its\n * pagination + retry handling. The list is the strongly authoritative\n * source: nexus-agents won't try to dispatch to a model the gateway doesn't\n * expose.\n */\nexport async function discoverModels(\n config: OpenAICompatConfig\n): Promise<Result<readonly DiscoveredModel[], ConfigError>> {\n try {\n const client = new OpenAI({ baseURL: config.baseUrl, apiKey: config.apiKey });\n const list = await client.models.list();\n const models: readonly DiscoveredModel[] = list.data.map((m) => ({\n id: m.id,\n created: m.created,\n ownedBy: m.owned_by,\n }));\n return ok(models);\n } catch (e: unknown) {\n return err(\n new ConfigError(\n `Failed to discover models from ${config.baseUrl}: ${getErrorMessage(e)}. ` +\n `Verify NEXUS_OPENAI_COMPAT_URL and NEXUS_OPENAI_COMPAT_KEY, then retry.`\n )\n );\n }\n}\n\n/**\n * Create an OpenAIAdapter pointed at the gateway for a specific model ID,\n * wrapped with usage recording so every completion appends a UsageEvent\n * to the JSONL log consumed by `nexus-agents usage`.\n *\n * The wrapper is transparent — same IModelAdapter contract, same fields,\n * same error handling. Recording is best-effort (telemetry never fails\n * the user's call).\n *\n * When invoked via MCP, the host harness's model identifier is passed\n * through verbatim — nexus-agents doesn't second-guess what the host is\n * already routing.\n */\nexport function createOpenAICompatAdapter(\n modelId: string,\n config: OpenAICompatConfig\n): IModelAdapter {\n const inner = new OpenAIAdapter({ modelId, apiKey: config.apiKey, baseUrl: config.baseUrl });\n return withUsageRecording(inner);\n}\n\n/**\n * Wrap any IModelAdapter so that successful + failed `complete()` calls\n * append a UsageEvent to the on-disk usage log. Stream calls aren't yet\n * instrumented (a future PR can add streaming-aware recording).\n *\n * The returned object preserves the IModelAdapter contract identically;\n * downstream code can't tell the difference except that one extra JSONL\n * line gets written per call.\n */\nfunction withUsageRecording(inner: IModelAdapter): IModelAdapter {\n const wrapped: IModelAdapter = {\n providerId: inner.providerId,\n modelId: inner.modelId,\n capabilities: inner.capabilities,\n countTokens: (text) => inner.countTokens(text),\n validateConfig: () => inner.validateConfig(),\n stream: (request) => inner.stream(request),\n async complete(request: CompletionRequest): Promise<Result<CompletionResponse, ModelError>> {\n const start = getTimeProvider().now();\n const result = await inner.complete(request);\n const latencyMs = getTimeProvider().now() - start;\n try {\n if (result.ok) {\n const u = result.value.usage;\n recordUsageEvent({\n timestamp: new Date().toISOString(),\n modelId: inner.modelId,\n providerId: inner.providerId,\n inputTokens: u.inputTokens,\n outputTokens: u.outputTokens,\n usdCost: computeCostUSD(inner.modelId, u.inputTokens, u.outputTokens),\n latencyMs,\n success: true,\n });\n } else {\n recordUsageEvent({\n timestamp: new Date().toISOString(),\n modelId: inner.modelId,\n providerId: inner.providerId,\n inputTokens: 0,\n outputTokens: 0,\n usdCost: 0,\n latencyMs,\n success: false,\n errorCode: result.error.code,\n });\n }\n } catch {\n // Telemetry must not break user calls.\n }\n return result;\n },\n };\n attachListModels(wrapped, inner);\n return wrapped;\n}\n\n/**\n * (#2540) Forward `listModels` through the wrapper when the inner adapter\n * exposes one. Only attach when defined so the wrapper's `listModels?:`\n * hint stays accurate for the resolver. The inner reference is captured\n * by closure so the forwarded call binds `this` to the inner adapter.\n */\nfunction attachListModels(wrapped: IModelAdapter, inner: IModelAdapter): void {\n const list = inner.listModels?.bind(inner);\n if (list === undefined) return;\n wrapped.listModels = (): Promise<readonly ModelMetadata[]> => list();\n}\n\n/**\n * Convenience: read env, discover, return adapter instances for every\n * discovered model. Returns `null` (not an error) when env vars aren't set\n * — the caller treats unset gateway as \"no adapter from this source.\"\n *\n * Use case: the unified registry / factory calls this at startup; if the\n * operator has configured a gateway, every discovered model becomes a\n * dispatch target alongside the existing claude/codex/gemini/opencode\n * adapter slots.\n */\nexport async function buildOpenAICompatAdapters(): Promise<Result<\n readonly IModelAdapter[],\n ConfigError\n> | null> {\n const config = readOpenAICompatEnv();\n if (config === null) return null;\n const discovered = await discoverModels(config);\n if (!discovered.ok) return discovered;\n return ok(discovered.value.map((m) => createOpenAICompatAdapter(m.id, config)));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA8BA,SAAS,oBAAoB;AAI7B,IAAM,SAAS,aAAa,EAAE,WAAW,kBAAkB,CAAC;AAYrD,SAAS,oBAAoB,MAA4C;AAC9E,QAAM,MAAM,eAAe,IAAI;AAC/B,MAAI,QAAQ,KAAM,QAAO;AAEzB,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A,YACA,SAAS;AAAA,UACX,CAAC;AAAA,QACH,OAAO;AACL,2BAAiB;AAAA,YACf,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,YAClC,SAAS,MAAM;AAAA,YACf,YAAY,MAAM;AAAA,YAClB,aAAa;AAAA,YACb,cAAc;AAAA,YACd,SAAS;AAAA,YACT;AAAA,YACA,SAAS;AAAA,YACT,WAAW,OAAO,MAAM;AAAA,UAC1B,CAAC;AAAA,QACH;AAAA,MACF,QAAQ;AAAA,MAER;AACA,aAAO;AAAA,IACT;AAAA,EACF;AACA,mBAAiB,SAAS,KAAK;AAC/B,SAAO;AACT;AAQA,SAAS,iBAAiB,SAAwB,OAA4B;AAC5E,QAAM,OAAO,MAAM,YAAY,KAAK,KAAK;AACzC,MAAI,SAAS,OAAW;AACxB,UAAQ,aAAa,MAAyC,KAAK;AACrE;AAYA,eAAsB,4BAGZ;AACR,QAAM,SAAS,oBAAoB;AACnC,MAAI,WAAW,KAAM,QAAO;AAC5B,QAAM,aAAa,MAAM,eAAe,MAAM;AAC9C,MAAI,CAAC,WAAW,GAAI,QAAO;AAC3B,SAAO,GAAG,WAAW,MAAM,IAAI,CAAC,MAAM,0BAA0B,EAAE,IAAI,MAAM,CAAC,CAAC;AAChF;","names":["err"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|