nexus-agents 2.100.2 → 2.101.1
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-OWCVT4NN.js → child-mcp-config-NBELOYYZ.js} +2 -2
- package/dist/{chunk-JW4JGJEU.js → chunk-2ETX4XQW.js} +10 -10
- package/dist/{chunk-P453545L.js → chunk-3GF52QPA.js} +4 -4
- package/dist/{chunk-DQ2YK2PI.js → chunk-3J53EAYX.js} +5 -5
- package/dist/{chunk-AH67WRET.js → chunk-3QFQG5QT.js} +2 -2
- package/dist/{chunk-5T6S6HFY.js → chunk-4IWHFMCN.js} +4 -4
- package/dist/{chunk-HFNHJZOK.js → chunk-4L7FH53H.js} +2 -2
- package/dist/{chunk-A7XUXJWL.js → chunk-4RW6OONY.js} +2 -2
- package/dist/{chunk-WYDK6V7W.js → chunk-5PZIMHNA.js} +3 -3
- package/dist/{chunk-Q3IFS7UA.js → chunk-ABGRFLJ6.js} +4 -4
- package/dist/{chunk-LRM5NZ2I.js → chunk-AMYO7KUK.js} +46 -34
- package/dist/{chunk-LRM5NZ2I.js.map → chunk-AMYO7KUK.js.map} +1 -1
- package/dist/{chunk-ZPCDZMLK.js → chunk-E47LOV6Y.js} +2 -2
- package/dist/{chunk-SU7RKNIZ.js → chunk-EKO6XAAZ.js} +3 -3
- package/dist/{chunk-HBZUXO4Q.js → chunk-FLUC27DF.js} +2 -2
- package/dist/{chunk-BO6QUVXI.js → chunk-FVWKAEYH.js} +2 -2
- package/dist/{chunk-BKUKBOGV.js → chunk-FZCB2P3F.js} +2 -2
- package/dist/{chunk-VD4TXDMR.js → chunk-GDY23NDK.js} +2 -2
- package/dist/{chunk-3OCQKZLC.js → chunk-KAJPY6YZ.js} +2 -2
- package/dist/{chunk-H4LBBFCO.js → chunk-KHEQIB6P.js} +7 -7
- package/dist/{chunk-M774MKHE.js → chunk-KLYBJUTK.js} +43 -4
- package/dist/chunk-KLYBJUTK.js.map +1 -0
- package/dist/{chunk-D7FORQJJ.js → chunk-KYONCTIL.js} +3 -3
- package/dist/{chunk-CJODZY4U.js → chunk-L2NPJRZZ.js} +2 -2
- package/dist/{chunk-XO25FS24.js → chunk-LVGYWJDX.js} +2 -2
- package/dist/{chunk-T5KDRR2I.js → chunk-LXBWH5XP.js} +3 -3
- package/dist/{chunk-DLNCQO6L.js → chunk-MNFEZIRI.js} +2 -2
- package/dist/{chunk-J545CO5K.js → chunk-MNWYIYEZ.js} +2 -2
- package/dist/{chunk-V2C2MC6H.js → chunk-NAKDVIXS.js} +3 -3
- package/dist/{chunk-EWJRZNDC.js → chunk-RIYVX4JS.js} +7 -7
- package/dist/{chunk-UWQ3BALH.js → chunk-S7R72HUB.js} +2 -2
- package/dist/{chunk-ZOBDTJNG.js → chunk-TDXLS2TY.js} +4 -4
- package/dist/{chunk-3XSEFOI5.js → chunk-VJR46M7L.js} +3 -3
- package/dist/{chunk-J76KHBF3.js → chunk-W65C5VVJ.js} +2 -2
- package/dist/{chunk-5WY3N7VX.js → chunk-Z7IQUUTZ.js} +2 -2
- package/dist/{cli-circuit-breaker-IPNNNVIT.js → cli-circuit-breaker-L647V6BR.js} +4 -4
- package/dist/cli.js +39 -39
- package/dist/{composite-router-JJNQIHX6.js → composite-router-NOTUOXFI.js} +2 -2
- package/dist/{consensus-vote-W6MIUFZK.js → consensus-vote-F5FEDUSU.js} +13 -13
- package/dist/{context-retriever-2MOJ446P.js → context-retriever-SHT7J6BT.js} +6 -6
- package/dist/{doctor-deep-D6E5IWXB.js → doctor-deep-REMLGFXP.js} +3 -3
- package/dist/{expert-bridge-L25WFHQF.js → expert-bridge-Z7XZ7ED5.js} +4 -4
- package/dist/{factory-UCRIJY6Y.js → factory-CYUNYEMU.js} +5 -5
- package/dist/{factory-PVN7DDNZ.js → factory-PPAK3TVG.js} +5 -5
- package/dist/{improvement-review-7OWJBTOC.js → improvement-review-BGFCQV4I.js} +4 -4
- package/dist/index.d.ts +7 -2
- package/dist/index.js +28 -28
- package/dist/{init-opencode-PB4G7RJR.js → init-opencode-WXY4DUFU.js} +5 -5
- package/dist/{issue-triage-EMYHDDTR.js → issue-triage-KGLNAJKH.js} +5 -5
- package/dist/{pr-reviewer-helpers-DZQDKMMF.js → pr-reviewer-helpers-2YJG6XJM.js} +4 -4
- package/dist/{registry-command-5L7I44JA.js → registry-command-ZFOGLBKF.js} +12 -172
- package/dist/registry-command-ZFOGLBKF.js.map +1 -0
- package/dist/{repo-security-plan-N2GNWFER.js → repo-security-plan-L47DDTAU.js} +3 -3
- package/dist/{research-helpers-synthesize-OKNU245Z.js → research-helpers-synthesize-IABO7LB4.js} +3 -3
- package/dist/{routing-memory-3QXWGWB5.js → routing-memory-2YWEWRMQ.js} +2 -2
- package/dist/{session-memory-AK4AJXGI.js → session-memory-YWOMPCLZ.js} +3 -3
- package/dist/{setup-command-V7M6BX2X.js → setup-command-DVG3EDY7.js} +11 -11
- package/dist/{setup-config-ANAFKZGE.js → setup-config-PYFK2GIC.js} +3 -3
- package/dist/{setup-custom-api-FUA2ZUDD.js → setup-custom-api-A4IZQ2Q4.js} +4 -4
- package/dist/{tool-memory-ZP3EMUP5.js → tool-memory-ABPSCFIH.js} +5 -5
- package/dist/{weather-report-54XDO6GO.js → weather-report-GXD6KGDS.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-M774MKHE.js.map +0 -1
- package/dist/registry-command-5L7I44JA.js.map +0 -1
- /package/dist/{child-mcp-config-OWCVT4NN.js.map → child-mcp-config-NBELOYYZ.js.map} +0 -0
- /package/dist/{chunk-JW4JGJEU.js.map → chunk-2ETX4XQW.js.map} +0 -0
- /package/dist/{chunk-P453545L.js.map → chunk-3GF52QPA.js.map} +0 -0
- /package/dist/{chunk-DQ2YK2PI.js.map → chunk-3J53EAYX.js.map} +0 -0
- /package/dist/{chunk-AH67WRET.js.map → chunk-3QFQG5QT.js.map} +0 -0
- /package/dist/{chunk-5T6S6HFY.js.map → chunk-4IWHFMCN.js.map} +0 -0
- /package/dist/{chunk-HFNHJZOK.js.map → chunk-4L7FH53H.js.map} +0 -0
- /package/dist/{chunk-A7XUXJWL.js.map → chunk-4RW6OONY.js.map} +0 -0
- /package/dist/{chunk-WYDK6V7W.js.map → chunk-5PZIMHNA.js.map} +0 -0
- /package/dist/{chunk-Q3IFS7UA.js.map → chunk-ABGRFLJ6.js.map} +0 -0
- /package/dist/{chunk-ZPCDZMLK.js.map → chunk-E47LOV6Y.js.map} +0 -0
- /package/dist/{chunk-SU7RKNIZ.js.map → chunk-EKO6XAAZ.js.map} +0 -0
- /package/dist/{chunk-HBZUXO4Q.js.map → chunk-FLUC27DF.js.map} +0 -0
- /package/dist/{chunk-BO6QUVXI.js.map → chunk-FVWKAEYH.js.map} +0 -0
- /package/dist/{chunk-BKUKBOGV.js.map → chunk-FZCB2P3F.js.map} +0 -0
- /package/dist/{chunk-VD4TXDMR.js.map → chunk-GDY23NDK.js.map} +0 -0
- /package/dist/{chunk-3OCQKZLC.js.map → chunk-KAJPY6YZ.js.map} +0 -0
- /package/dist/{chunk-H4LBBFCO.js.map → chunk-KHEQIB6P.js.map} +0 -0
- /package/dist/{chunk-D7FORQJJ.js.map → chunk-KYONCTIL.js.map} +0 -0
- /package/dist/{chunk-CJODZY4U.js.map → chunk-L2NPJRZZ.js.map} +0 -0
- /package/dist/{chunk-XO25FS24.js.map → chunk-LVGYWJDX.js.map} +0 -0
- /package/dist/{chunk-T5KDRR2I.js.map → chunk-LXBWH5XP.js.map} +0 -0
- /package/dist/{chunk-DLNCQO6L.js.map → chunk-MNFEZIRI.js.map} +0 -0
- /package/dist/{chunk-J545CO5K.js.map → chunk-MNWYIYEZ.js.map} +0 -0
- /package/dist/{chunk-V2C2MC6H.js.map → chunk-NAKDVIXS.js.map} +0 -0
- /package/dist/{chunk-EWJRZNDC.js.map → chunk-RIYVX4JS.js.map} +0 -0
- /package/dist/{chunk-UWQ3BALH.js.map → chunk-S7R72HUB.js.map} +0 -0
- /package/dist/{chunk-ZOBDTJNG.js.map → chunk-TDXLS2TY.js.map} +0 -0
- /package/dist/{chunk-3XSEFOI5.js.map → chunk-VJR46M7L.js.map} +0 -0
- /package/dist/{chunk-J76KHBF3.js.map → chunk-W65C5VVJ.js.map} +0 -0
- /package/dist/{chunk-5WY3N7VX.js.map → chunk-Z7IQUUTZ.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-IPNNNVIT.js.map → cli-circuit-breaker-L647V6BR.js.map} +0 -0
- /package/dist/{composite-router-JJNQIHX6.js.map → composite-router-NOTUOXFI.js.map} +0 -0
- /package/dist/{consensus-vote-W6MIUFZK.js.map → consensus-vote-F5FEDUSU.js.map} +0 -0
- /package/dist/{context-retriever-2MOJ446P.js.map → context-retriever-SHT7J6BT.js.map} +0 -0
- /package/dist/{doctor-deep-D6E5IWXB.js.map → doctor-deep-REMLGFXP.js.map} +0 -0
- /package/dist/{expert-bridge-L25WFHQF.js.map → expert-bridge-Z7XZ7ED5.js.map} +0 -0
- /package/dist/{factory-PVN7DDNZ.js.map → factory-CYUNYEMU.js.map} +0 -0
- /package/dist/{factory-UCRIJY6Y.js.map → factory-PPAK3TVG.js.map} +0 -0
- /package/dist/{improvement-review-7OWJBTOC.js.map → improvement-review-BGFCQV4I.js.map} +0 -0
- /package/dist/{init-opencode-PB4G7RJR.js.map → init-opencode-WXY4DUFU.js.map} +0 -0
- /package/dist/{issue-triage-EMYHDDTR.js.map → issue-triage-KGLNAJKH.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-DZQDKMMF.js.map → pr-reviewer-helpers-2YJG6XJM.js.map} +0 -0
- /package/dist/{repo-security-plan-N2GNWFER.js.map → repo-security-plan-L47DDTAU.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-OKNU245Z.js.map → research-helpers-synthesize-IABO7LB4.js.map} +0 -0
- /package/dist/{routing-memory-3QXWGWB5.js.map → routing-memory-2YWEWRMQ.js.map} +0 -0
- /package/dist/{session-memory-AK4AJXGI.js.map → session-memory-YWOMPCLZ.js.map} +0 -0
- /package/dist/{setup-command-V7M6BX2X.js.map → setup-command-DVG3EDY7.js.map} +0 -0
- /package/dist/{setup-config-ANAFKZGE.js.map → setup-config-PYFK2GIC.js.map} +0 -0
- /package/dist/{setup-custom-api-FUA2ZUDD.js.map → setup-custom-api-A4IZQ2Q4.js.map} +0 -0
- /package/dist/{tool-memory-ZP3EMUP5.js.map → tool-memory-ABPSCFIH.js.map} +0 -0
- /package/dist/{weather-report-54XDO6GO.js.map → weather-report-GXD6KGDS.js.map} +0 -0
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
createCliAdapter,
|
|
4
4
|
getAvailableClis,
|
|
5
5
|
isCliAvailable
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-3GF52QPA.js";
|
|
7
|
+
import "./chunk-4RW6OONY.js";
|
|
8
|
+
import "./chunk-3QFQG5QT.js";
|
|
9
|
+
import "./chunk-KLYBJUTK.js";
|
|
10
10
|
import "./chunk-CH7QIDHQ.js";
|
|
11
11
|
import "./chunk-PR4QN5HX.js";
|
|
12
12
|
export {
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
getAvailableClis,
|
|
16
16
|
isCliAvailable
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=factory-
|
|
18
|
+
//# sourceMappingURL=factory-PPAK3TVG.js.map
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
loadSelfEvalSignals,
|
|
9
9
|
registerImprovementReviewTool,
|
|
10
10
|
runImprovementReview
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-KYONCTIL.js";
|
|
12
|
+
import "./chunk-KAJPY6YZ.js";
|
|
13
|
+
import "./chunk-KLYBJUTK.js";
|
|
14
14
|
import "./chunk-CH7QIDHQ.js";
|
|
15
15
|
import "./chunk-PR4QN5HX.js";
|
|
16
16
|
export {
|
|
@@ -24,4 +24,4 @@ export {
|
|
|
24
24
|
registerImprovementReviewTool,
|
|
25
25
|
runImprovementReview
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=improvement-review-
|
|
27
|
+
//# sourceMappingURL=improvement-review-BGFCQV4I.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -31684,8 +31684,13 @@ interface DevPipelineStages {
|
|
|
31684
31684
|
research(task: string): Promise<string>;
|
|
31685
31685
|
/** Architect creates a plan from research + task. */
|
|
31686
31686
|
plan(task: string, research: string, priorFeedback?: string): Promise<string>;
|
|
31687
|
-
/**
|
|
31688
|
-
|
|
31687
|
+
/**
|
|
31688
|
+
* Consensus vote on the plan. Returns approval + feedback. `research` is the
|
|
31689
|
+
* research-stage context, surfaced to voters so they can weigh research
|
|
31690
|
+
* maturity (#3258) — appended to the proposal as informational, untrusted
|
|
31691
|
+
* text (never as instructions).
|
|
31692
|
+
*/
|
|
31693
|
+
vote(plan: string, research: string): Promise<VoteResult>;
|
|
31689
31694
|
/** PM decomposes approved plan into tasks. */
|
|
31690
31695
|
decompose(plan: string): Promise<PipelineTask[]>;
|
|
31691
31696
|
/** Code expert implements a task. Returns the work product. */
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createGitHubProvider,
|
|
3
3
|
createScmProvider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ABGRFLJ6.js";
|
|
5
5
|
import {
|
|
6
6
|
ALLOWED_COMMANDS,
|
|
7
7
|
ARTIFACT_TYPES,
|
|
@@ -509,27 +509,27 @@ import {
|
|
|
509
509
|
validateWorkflow,
|
|
510
510
|
validateWorkflowDependencies,
|
|
511
511
|
withLogging
|
|
512
|
-
} from "./chunk-
|
|
512
|
+
} from "./chunk-AMYO7KUK.js";
|
|
513
513
|
import "./chunk-3ACDP4E6.js";
|
|
514
514
|
import {
|
|
515
515
|
getTokenEnvVars,
|
|
516
516
|
hasToken,
|
|
517
517
|
resolveToken
|
|
518
|
-
} from "./chunk-
|
|
518
|
+
} from "./chunk-S7R72HUB.js";
|
|
519
519
|
import "./chunk-OK6U5N5Y.js";
|
|
520
520
|
import {
|
|
521
521
|
OPENAI_MODELS,
|
|
522
522
|
OPENAI_MODEL_ALIASES,
|
|
523
523
|
OpenAIAdapter,
|
|
524
524
|
createOpenAIAdapter
|
|
525
|
-
} from "./chunk-
|
|
525
|
+
} from "./chunk-EKO6XAAZ.js";
|
|
526
526
|
import {
|
|
527
527
|
CliCircuitBreakerIntegration,
|
|
528
528
|
createCliCircuitBreakerIntegration
|
|
529
|
-
} from "./chunk-
|
|
529
|
+
} from "./chunk-NAKDVIXS.js";
|
|
530
530
|
import {
|
|
531
531
|
executeExpert
|
|
532
|
-
} from "./chunk-
|
|
532
|
+
} from "./chunk-KHEQIB6P.js";
|
|
533
533
|
import {
|
|
534
534
|
AgentFindingSchema,
|
|
535
535
|
AgentPerformanceSchema,
|
|
@@ -601,7 +601,7 @@ import {
|
|
|
601
601
|
registerConsensusVoteTool,
|
|
602
602
|
withModelNotFoundFallback,
|
|
603
603
|
wrapResilientWithFallback
|
|
604
|
-
} from "./chunk-
|
|
604
|
+
} from "./chunk-2ETX4XQW.js";
|
|
605
605
|
import {
|
|
606
606
|
AdapterModelError,
|
|
607
607
|
BaseAdapter,
|
|
@@ -625,11 +625,11 @@ import {
|
|
|
625
625
|
transformStream,
|
|
626
626
|
validateApiKeyPresence,
|
|
627
627
|
withTimeout
|
|
628
|
-
} from "./chunk-
|
|
628
|
+
} from "./chunk-FVWKAEYH.js";
|
|
629
629
|
import {
|
|
630
630
|
PROVIDER_ENV_KEYS
|
|
631
|
-
} from "./chunk-
|
|
632
|
-
import "./chunk-
|
|
631
|
+
} from "./chunk-W65C5VVJ.js";
|
|
632
|
+
import "./chunk-Z7IQUUTZ.js";
|
|
633
633
|
import {
|
|
634
634
|
AgentActionSchema,
|
|
635
635
|
AuditTrail,
|
|
@@ -661,11 +661,11 @@ import {
|
|
|
661
661
|
requiresCorroboration,
|
|
662
662
|
validateAgentAction,
|
|
663
663
|
validateCorroboration
|
|
664
|
-
} from "./chunk-
|
|
664
|
+
} from "./chunk-4IWHFMCN.js";
|
|
665
665
|
import {
|
|
666
666
|
GitHubProvider,
|
|
667
667
|
ScmError
|
|
668
|
-
} from "./chunk-
|
|
668
|
+
} from "./chunk-MNWYIYEZ.js";
|
|
669
669
|
import {
|
|
670
670
|
GitHubUserRoleSchema,
|
|
671
671
|
InjectionFlagSchema,
|
|
@@ -680,8 +680,8 @@ import {
|
|
|
680
680
|
assessReputation,
|
|
681
681
|
reconcileTrustTier,
|
|
682
682
|
sanitizeInput
|
|
683
|
-
} from "./chunk-
|
|
684
|
-
import "./chunk-
|
|
683
|
+
} from "./chunk-GDY23NDK.js";
|
|
684
|
+
import "./chunk-KYONCTIL.js";
|
|
685
685
|
import {
|
|
686
686
|
NOOP_NOTIFIER,
|
|
687
687
|
PolicyConfigSchema,
|
|
@@ -705,7 +705,7 @@ import {
|
|
|
705
705
|
toolSuccess,
|
|
706
706
|
toolSuccessStructured,
|
|
707
707
|
validateToolInput
|
|
708
|
-
} from "./chunk-
|
|
708
|
+
} from "./chunk-KAJPY6YZ.js";
|
|
709
709
|
import {
|
|
710
710
|
FALLBACK_SCANNER_DATA,
|
|
711
711
|
buildPlanFromAnalysis,
|
|
@@ -713,7 +713,7 @@ import {
|
|
|
713
713
|
generateSecurityPlan,
|
|
714
714
|
getRegistryManifest,
|
|
715
715
|
resolveScannerData
|
|
716
|
-
} from "./chunk-
|
|
716
|
+
} from "./chunk-FZCB2P3F.js";
|
|
717
717
|
import {
|
|
718
718
|
analyzeGitHubRepo,
|
|
719
719
|
analyzeRepo,
|
|
@@ -722,10 +722,10 @@ import {
|
|
|
722
722
|
import {
|
|
723
723
|
PersistentStrategyDistiller,
|
|
724
724
|
RulesSnapshotSchema
|
|
725
|
-
} from "./chunk-
|
|
725
|
+
} from "./chunk-VJR46M7L.js";
|
|
726
726
|
import {
|
|
727
727
|
MemoryError
|
|
728
|
-
} from "./chunk-
|
|
728
|
+
} from "./chunk-TDXLS2TY.js";
|
|
729
729
|
import {
|
|
730
730
|
AppConfigSchema,
|
|
731
731
|
ExpertConfigSchema,
|
|
@@ -744,7 +744,7 @@ import {
|
|
|
744
744
|
getKnownNexusVarNames,
|
|
745
745
|
startStdioServer,
|
|
746
746
|
validateNexusEnv
|
|
747
|
-
} from "./chunk-
|
|
747
|
+
} from "./chunk-RIYVX4JS.js";
|
|
748
748
|
import {
|
|
749
749
|
AvailabilityCache,
|
|
750
750
|
filterAvailableModels,
|
|
@@ -753,15 +753,15 @@ import {
|
|
|
753
753
|
getFallbackChain,
|
|
754
754
|
resetAvailabilityCache,
|
|
755
755
|
resolveFallback
|
|
756
|
-
} from "./chunk-
|
|
756
|
+
} from "./chunk-FLUC27DF.js";
|
|
757
757
|
import {
|
|
758
758
|
AvailableModelsCache,
|
|
759
759
|
getDefaultAvailableModelsCache,
|
|
760
760
|
setDefaultAvailableModelsCache
|
|
761
|
-
} from "./chunk-
|
|
761
|
+
} from "./chunk-L2NPJRZZ.js";
|
|
762
762
|
import {
|
|
763
763
|
DEFAULTS
|
|
764
|
-
} from "./chunk-
|
|
764
|
+
} from "./chunk-LVGYWJDX.js";
|
|
765
765
|
import "./chunk-NUBSJGQZ.js";
|
|
766
766
|
import "./chunk-6T3EPABN.js";
|
|
767
767
|
import {
|
|
@@ -792,9 +792,9 @@ import {
|
|
|
792
792
|
isCliAvailable,
|
|
793
793
|
isRetryableError,
|
|
794
794
|
sleep
|
|
795
|
-
} from "./chunk-
|
|
796
|
-
import "./chunk-
|
|
797
|
-
import "./chunk-
|
|
795
|
+
} from "./chunk-3GF52QPA.js";
|
|
796
|
+
import "./chunk-4RW6OONY.js";
|
|
797
|
+
import "./chunk-3QFQG5QT.js";
|
|
798
798
|
import {
|
|
799
799
|
BUILT_IN_EXPERTS,
|
|
800
800
|
BuiltInExpertTypeSchema,
|
|
@@ -805,7 +805,7 @@ import {
|
|
|
805
805
|
validateExpertConfig
|
|
806
806
|
} from "./chunk-ZM4O442V.js";
|
|
807
807
|
import "./chunk-PQHVC4BD.js";
|
|
808
|
-
import "./chunk-
|
|
808
|
+
import "./chunk-MNFEZIRI.js";
|
|
809
809
|
import {
|
|
810
810
|
AgentCapability,
|
|
811
811
|
AgentError,
|
|
@@ -880,7 +880,7 @@ import {
|
|
|
880
880
|
toError,
|
|
881
881
|
unwrap,
|
|
882
882
|
unwrapOr
|
|
883
|
-
} from "./chunk-
|
|
883
|
+
} from "./chunk-KLYBJUTK.js";
|
|
884
884
|
import "./chunk-CH7QIDHQ.js";
|
|
885
885
|
import "./chunk-PR4QN5HX.js";
|
|
886
886
|
|
|
@@ -6134,7 +6134,7 @@ function buildVotingInput(plan, config) {
|
|
|
6134
6134
|
}
|
|
6135
6135
|
async function executeSingleVote(plan, config, log) {
|
|
6136
6136
|
try {
|
|
6137
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
6137
|
+
const { executeVoting } = await import("./consensus-vote-F5FEDUSU.js");
|
|
6138
6138
|
const input = buildVotingInput(plan, config);
|
|
6139
6139
|
const result = await executeVoting(input, log);
|
|
6140
6140
|
return parseVotingResult(result);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
discoverModels,
|
|
3
3
|
readOpencodeGateway
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5PZIMHNA.js";
|
|
5
|
+
import "./chunk-EKO6XAAZ.js";
|
|
6
|
+
import "./chunk-FVWKAEYH.js";
|
|
7
7
|
import {
|
|
8
8
|
createLogger
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KLYBJUTK.js";
|
|
10
10
|
import "./chunk-CH7QIDHQ.js";
|
|
11
11
|
import "./chunk-PR4QN5HX.js";
|
|
12
12
|
|
|
@@ -174,4 +174,4 @@ export {
|
|
|
174
174
|
runInitOpencode,
|
|
175
175
|
runOpencodeValidate
|
|
176
176
|
};
|
|
177
|
-
//# sourceMappingURL=init-opencode-
|
|
177
|
+
//# sourceMappingURL=init-opencode-WXY4DUFU.js.map
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
IssueTriage,
|
|
3
3
|
createIssueTriage,
|
|
4
4
|
formatTriageComment
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-4IWHFMCN.js";
|
|
6
|
+
import "./chunk-MNWYIYEZ.js";
|
|
7
|
+
import "./chunk-GDY23NDK.js";
|
|
8
|
+
import "./chunk-KLYBJUTK.js";
|
|
9
9
|
import "./chunk-CH7QIDHQ.js";
|
|
10
10
|
import "./chunk-PR4QN5HX.js";
|
|
11
11
|
export {
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
createIssueTriage,
|
|
14
14
|
formatTriageComment
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=issue-triage-
|
|
16
|
+
//# sourceMappingURL=issue-triage-KGLNAJKH.js.map
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
parseFindings,
|
|
18
18
|
parseSeverity,
|
|
19
19
|
sumFindings
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-LXBWH5XP.js";
|
|
21
21
|
import "./chunk-OK6U5N5Y.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-GDY23NDK.js";
|
|
23
|
+
import "./chunk-KLYBJUTK.js";
|
|
24
24
|
import "./chunk-CH7QIDHQ.js";
|
|
25
25
|
import "./chunk-PR4QN5HX.js";
|
|
26
26
|
export {
|
|
@@ -43,4 +43,4 @@ export {
|
|
|
43
43
|
parseSeverity,
|
|
44
44
|
sumFindings
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=pr-reviewer-helpers-
|
|
46
|
+
//# sourceMappingURL=pr-reviewer-helpers-2YJG6XJM.js.map
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
MANIFEST_MAX_BYTES,
|
|
3
|
+
USER_MANIFEST_ENV_VAR,
|
|
4
|
+
defaultUserManifestPath,
|
|
4
5
|
getDefaultRegistry,
|
|
5
|
-
loadGeneratedRegistryEntries
|
|
6
|
-
|
|
6
|
+
loadGeneratedRegistryEntries,
|
|
7
|
+
loadUserManifestOverlay
|
|
8
|
+
} from "./chunk-KLYBJUTK.js";
|
|
7
9
|
import {
|
|
8
10
|
nexusDataPath
|
|
9
11
|
} from "./chunk-CH7QIDHQ.js";
|
|
@@ -11,170 +13,8 @@ import "./chunk-PR4QN5HX.js";
|
|
|
11
13
|
|
|
12
14
|
// src/cli/registry-command.ts
|
|
13
15
|
import { createHash } from "crypto";
|
|
14
|
-
import {
|
|
16
|
+
import { mkdirSync, writeFileSync } from "fs";
|
|
15
17
|
import { dirname } from "path";
|
|
16
|
-
|
|
17
|
-
// src/config/capability-overlay.ts
|
|
18
|
-
import { existsSync, readFileSync, statSync } from "fs";
|
|
19
|
-
import { parse as parseYaml } from "yaml";
|
|
20
|
-
var OVERLAY_ENV_VAR = "NEXUS_MODEL_REGISTRY_OVERLAY";
|
|
21
|
-
var OVERLAY_MAX_BYTES = 1 * 1024 * 1024;
|
|
22
|
-
function defaultOverlayPath() {
|
|
23
|
-
return nexusDataPath("models.yaml");
|
|
24
|
-
}
|
|
25
|
-
function resolveOverlayPath(env = process.env) {
|
|
26
|
-
const override = env[OVERLAY_ENV_VAR];
|
|
27
|
-
if (override !== void 0 && override !== "") return override;
|
|
28
|
-
return defaultOverlayPath();
|
|
29
|
-
}
|
|
30
|
-
function loadCapabilityOverlay(pathOrEnv, logger) {
|
|
31
|
-
const log = logger ?? createLogger({ component: "capability-overlay" });
|
|
32
|
-
const path = resolvePath(pathOrEnv);
|
|
33
|
-
if (!existsSync(path)) {
|
|
34
|
-
return { entries: [], rejections: [], path, status: "missing" };
|
|
35
|
-
}
|
|
36
|
-
const sizeStatus = checkSize(path, log);
|
|
37
|
-
if (sizeStatus !== void 0) return sizeStatus;
|
|
38
|
-
const bodyResult = readBody(path, log);
|
|
39
|
-
if ("result" in bodyResult) return bodyResult.result;
|
|
40
|
-
const body = bodyResult.body;
|
|
41
|
-
if (body === "") {
|
|
42
|
-
log.info("Model registry overlay file is empty", { path });
|
|
43
|
-
return { entries: [], rejections: [], path, status: "empty" };
|
|
44
|
-
}
|
|
45
|
-
const parseResult = parseBody(body, path, log);
|
|
46
|
-
if ("result" in parseResult) return parseResult.result;
|
|
47
|
-
const parsed = parseResult.parsed;
|
|
48
|
-
const rawEntries = extractEntries(parsed);
|
|
49
|
-
if (rawEntries === void 0) {
|
|
50
|
-
log.warn("Model registry overlay has unrecognized shape; treated as empty", {
|
|
51
|
-
path
|
|
52
|
-
});
|
|
53
|
-
return {
|
|
54
|
-
entries: [],
|
|
55
|
-
rejections: [{ index: -1, reason: "Expected array or { models: [...] }" }],
|
|
56
|
-
path,
|
|
57
|
-
status: "malformed"
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
const { entries, rejections } = validateEntries(rawEntries, log, path);
|
|
61
|
-
return { entries, rejections, path, status: "loaded" };
|
|
62
|
-
}
|
|
63
|
-
function resolvePath(pathOrEnv) {
|
|
64
|
-
if (typeof pathOrEnv === "string") return pathOrEnv;
|
|
65
|
-
if (pathOrEnv !== void 0) return resolveOverlayPath(pathOrEnv);
|
|
66
|
-
return resolveOverlayPath();
|
|
67
|
-
}
|
|
68
|
-
function readBody(path, log) {
|
|
69
|
-
try {
|
|
70
|
-
return { body: readFileSync(path, "utf-8").trim() };
|
|
71
|
-
} catch (err) {
|
|
72
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
73
|
-
log.warn("Model registry overlay file read failed; treated as empty", {
|
|
74
|
-
path,
|
|
75
|
-
errorMessage: message
|
|
76
|
-
});
|
|
77
|
-
return {
|
|
78
|
-
result: {
|
|
79
|
-
entries: [],
|
|
80
|
-
rejections: [{ index: -1, reason: `file read error: ${message}` }],
|
|
81
|
-
path,
|
|
82
|
-
status: "malformed"
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
function parseBody(body, path, log) {
|
|
88
|
-
try {
|
|
89
|
-
return { parsed: parseYaml(body) };
|
|
90
|
-
} catch (err) {
|
|
91
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
92
|
-
log.warn("Model registry overlay YAML parse failed; treated as empty", {
|
|
93
|
-
path,
|
|
94
|
-
errorMessage: message
|
|
95
|
-
});
|
|
96
|
-
return {
|
|
97
|
-
result: {
|
|
98
|
-
entries: [],
|
|
99
|
-
rejections: [{ index: -1, reason: `YAML parse error: ${message}` }],
|
|
100
|
-
path,
|
|
101
|
-
status: "malformed"
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
function checkSize(path, log) {
|
|
107
|
-
let size;
|
|
108
|
-
try {
|
|
109
|
-
size = statSync(path).size;
|
|
110
|
-
} catch (err) {
|
|
111
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
112
|
-
log.warn("Model registry overlay statSync failed; treated as missing", {
|
|
113
|
-
path,
|
|
114
|
-
errorMessage: message
|
|
115
|
-
});
|
|
116
|
-
return { entries: [], rejections: [], path, status: "missing" };
|
|
117
|
-
}
|
|
118
|
-
if (size <= OVERLAY_MAX_BYTES) return void 0;
|
|
119
|
-
log.warn("Model registry overlay exceeds size cap; refusing to load", {
|
|
120
|
-
path,
|
|
121
|
-
size,
|
|
122
|
-
maxBytes: OVERLAY_MAX_BYTES
|
|
123
|
-
});
|
|
124
|
-
return {
|
|
125
|
-
entries: [],
|
|
126
|
-
rejections: [
|
|
127
|
-
{
|
|
128
|
-
index: -1,
|
|
129
|
-
reason: `file size ${String(size)} exceeds cap ${String(OVERLAY_MAX_BYTES)}`
|
|
130
|
-
}
|
|
131
|
-
],
|
|
132
|
-
path,
|
|
133
|
-
status: "too-large"
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
function extractIdForError(raw) {
|
|
137
|
-
if (raw === null || typeof raw !== "object" || !("id" in raw)) return void 0;
|
|
138
|
-
const idValue = raw.id;
|
|
139
|
-
if (typeof idValue === "string" && idValue !== "") return idValue;
|
|
140
|
-
return void 0;
|
|
141
|
-
}
|
|
142
|
-
function extractEntries(parsed) {
|
|
143
|
-
if (Array.isArray(parsed)) return parsed;
|
|
144
|
-
if (parsed !== null && typeof parsed === "object") {
|
|
145
|
-
const obj = parsed;
|
|
146
|
-
if (Array.isArray(obj.models)) return obj.models;
|
|
147
|
-
}
|
|
148
|
-
return void 0;
|
|
149
|
-
}
|
|
150
|
-
function validateEntries(rawEntries, log, path) {
|
|
151
|
-
const entries = [];
|
|
152
|
-
const rejections = [];
|
|
153
|
-
for (let i = 0; i < rawEntries.length; i++) {
|
|
154
|
-
const raw = rawEntries[i];
|
|
155
|
-
const idCandidate = extractIdForError(raw);
|
|
156
|
-
const parsed = ModelCapabilitySchema.safeParse(raw);
|
|
157
|
-
if (!parsed.success) {
|
|
158
|
-
const rejection = {
|
|
159
|
-
index: i,
|
|
160
|
-
...idCandidate !== void 0 && idCandidate !== "" ? { id: idCandidate } : {},
|
|
161
|
-
reason: parsed.error.message
|
|
162
|
-
};
|
|
163
|
-
rejections.push(rejection);
|
|
164
|
-
log.warn("Model registry overlay entry rejected by schema", {
|
|
165
|
-
path,
|
|
166
|
-
index: i,
|
|
167
|
-
id: idCandidate,
|
|
168
|
-
errorMessage: parsed.error.message
|
|
169
|
-
});
|
|
170
|
-
continue;
|
|
171
|
-
}
|
|
172
|
-
entries.push(parsed.data);
|
|
173
|
-
}
|
|
174
|
-
return { entries, rejections };
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// src/cli/registry-command.ts
|
|
178
18
|
var VALID_SUBCOMMANDS = ["doctor", "refresh"];
|
|
179
19
|
function isValidRegistrySubcommand(v) {
|
|
180
20
|
return v !== void 0 && VALID_SUBCOMMANDS.includes(v);
|
|
@@ -211,7 +51,7 @@ function buildDoctorReport(options) {
|
|
|
211
51
|
sourceCounts[entry.source] += 1;
|
|
212
52
|
}
|
|
213
53
|
const generated = loadGeneratedRegistryEntries();
|
|
214
|
-
const overlay =
|
|
54
|
+
const overlay = options.overlayPath !== void 0 ? loadUserManifestOverlay({ path: options.overlayPath }) : loadUserManifestOverlay();
|
|
215
55
|
return {
|
|
216
56
|
sourceCounts,
|
|
217
57
|
totalEntries: entries.length,
|
|
@@ -229,7 +69,7 @@ function buildDoctorReport(options) {
|
|
|
229
69
|
...r.id !== void 0 ? { id: r.id } : {},
|
|
230
70
|
reason: r.reason
|
|
231
71
|
})),
|
|
232
|
-
envOverride: process.env[
|
|
72
|
+
envOverride: process.env[USER_MANIFEST_ENV_VAR]
|
|
233
73
|
},
|
|
234
74
|
unknownIdFallback: {
|
|
235
75
|
contextWindow: UNKNOWN_MODEL_CONTEXT_WINDOW
|
|
@@ -393,8 +233,8 @@ function formatRegistryUsage() {
|
|
|
393
233
|
" SHA256-verify against <url>.sha256, and write to:",
|
|
394
234
|
` ${nexusDataPath("model-registry.generated.json")}`,
|
|
395
235
|
"",
|
|
396
|
-
`
|
|
397
|
-
`or whatever ${
|
|
236
|
+
`User overlay path is ${defaultUserManifestPath()} by default,`,
|
|
237
|
+
`or whatever ${USER_MANIFEST_ENV_VAR} points to. Overlay max size is ${String(MANIFEST_MAX_BYTES)} bytes.`
|
|
398
238
|
].join("\n");
|
|
399
239
|
}
|
|
400
240
|
export {
|
|
@@ -402,4 +242,4 @@ export {
|
|
|
402
242
|
isValidRegistrySubcommand,
|
|
403
243
|
registryCommand
|
|
404
244
|
};
|
|
405
|
-
//# sourceMappingURL=registry-command-
|
|
245
|
+
//# sourceMappingURL=registry-command-ZFOGLBKF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/registry-command.ts"],"sourcesContent":["/**\n * `nexus-agents registry` CLI subcommands (epic #2174 / issue #2179).\n *\n * Two subcommands:\n *\n * - `doctor` — inspect the ModelRegistry: effective per-source entry counts,\n * the bundled generated registry path/status, the user overlay (reported for\n * inspection), and the unknown-id fallback contextWindow. Surfaces whatever\n * overlay parse rejections occurred at load. Read-only. (#3293 migrated this\n * off the deleted CapabilityDiscovery four-tier chain.)\n *\n * - `refresh` — download a signed `model-registry.generated.json` from a\n * URL, SHA256-verify against a `.sha256` sidecar, write to the user's\n * overlay location. Requires `--source=<url>` today; the GitHub-latest-\n * release automation is #2180's concern.\n *\n * No runtime hot path touches the network — refresh is a one-shot,\n * user-initiated operation.\n *\n * @module cli/registry-command\n */\n\nimport { createHash } from 'node:crypto';\nimport { mkdirSync, writeFileSync } from 'node:fs';\nimport { dirname } from 'node:path';\nimport { nexusDataPath } from '../config/nexus-data-dir.js';\n\nimport { getDefaultRegistry, type EntrySource } from '../config/model-registry.js';\nimport { loadGeneratedRegistryEntries } from '../config/models-generated-loader.js';\nimport {\n USER_MANIFEST_ENV_VAR,\n MANIFEST_MAX_BYTES,\n defaultUserManifestPath,\n loadUserManifestOverlay,\n} from '../config/manifest-overlay.js';\n\n// ---------------------------------------------------------------------------\n// Dispatch\n// ---------------------------------------------------------------------------\n\nexport type RegistrySubcommand = 'doctor' | 'refresh';\n\nconst VALID_SUBCOMMANDS: readonly RegistrySubcommand[] = ['doctor', 'refresh'];\n\nexport function isValidRegistrySubcommand(v: string | undefined): v is RegistrySubcommand {\n return v !== undefined && (VALID_SUBCOMMANDS as readonly string[]).includes(v);\n}\n\nexport interface RegistryCommandOptions {\n readonly json?: boolean;\n readonly source?: string;\n readonly dryRun?: boolean;\n readonly overlayPath?: string;\n /** For tests: a fetch function. Defaults to `globalThis.fetch`. */\n readonly fetchImpl?: typeof fetch;\n /** For tests: override the default destination path. */\n readonly destPath?: string;\n}\n\nexport interface RegistryCommandResult {\n readonly text: string;\n readonly exitCode: number;\n}\n\nexport async function registryCommand(\n subcommand: RegistrySubcommand,\n options: RegistryCommandOptions = {}\n): Promise<RegistryCommandResult> {\n if (subcommand === 'doctor') return doctorCommand(options);\n return refreshCommand(options);\n}\n\n// ---------------------------------------------------------------------------\n// doctor\n// ---------------------------------------------------------------------------\n\n/**\n * ContextWindow returned for an id no registry source resolves. This is the\n * old `FAIL_CLOSED_DEFAULT.contextWindow` value (#2177), preserved here after\n * the CapabilityDiscovery four-tier chain was deleted in #3293.\n */\nconst UNKNOWN_MODEL_CONTEXT_WINDOW = 8192;\n\n/** Every registry source, in report order. */\nconst ENTRY_SOURCES: readonly EntrySource[] = [\n 'in-tree',\n 'models-dev',\n 'manifest',\n 'derived',\n 'generated',\n];\n\ninterface DoctorReport {\n /** Effective per-source counts over `getDefaultRegistry().allEntries()`. */\n readonly sourceCounts: Record<EntrySource, number>;\n readonly totalEntries: number;\n readonly bundled: {\n readonly path: string;\n readonly status: 'loaded' | 'missing' | 'malformed';\n readonly entryCount: number;\n };\n readonly overlay: {\n readonly path: string;\n readonly status: 'missing' | 'empty' | 'malformed' | 'too-large' | 'loaded';\n readonly entryCount: number;\n readonly rejections: readonly { index: number; id?: string; reason: string }[];\n readonly envOverride: string | undefined;\n };\n readonly unknownIdFallback: {\n readonly contextWindow: number;\n };\n}\n\nfunction doctorCommand(options: RegistryCommandOptions): RegistryCommandResult {\n const report = buildDoctorReport(options);\n if (options.json === true) {\n return { text: JSON.stringify(report, null, 2), exitCode: 0 };\n }\n return { text: formatDoctorReport(report), exitCode: 0 };\n}\n\nfunction buildDoctorReport(options: RegistryCommandOptions): DoctorReport {\n // Effective per-source counts over the fully-merged registry: dedup/override\n // across tiers has already happened, so `allEntries()` reflects what actually\n // wins, grouped by the surviving entry's `source`.\n const entries = getDefaultRegistry().allEntries();\n const sourceCounts: Record<EntrySource, number> = {\n 'in-tree': 0,\n 'models-dev': 0,\n manifest: 0,\n derived: 0,\n generated: 0,\n };\n for (const entry of entries) {\n sourceCounts[entry.source] += 1;\n }\n\n // The bundled generated catalog (long-tail breadth tier) — reported from the\n // same loader the registry ingests, so the path/status here matches reality.\n const generated = loadGeneratedRegistryEntries();\n\n // User overlay (`~/.nexus-agents/models.yaml`) status, reported for\n // inspection. As of #3351 this IS wired into the registry's manifest tier\n // (below the operator manifest), loaded via the same manifest-overlay loader.\n const overlay =\n options.overlayPath !== undefined\n ? loadUserManifestOverlay({ path: options.overlayPath })\n : loadUserManifestOverlay();\n\n return {\n sourceCounts,\n totalEntries: entries.length,\n bundled: {\n path: generated.path,\n status: generated.status,\n entryCount: generated.entries.length,\n },\n overlay: {\n path: overlay.path,\n status: overlay.status,\n entryCount: overlay.entries.length,\n rejections: overlay.rejections.map((r) => ({\n index: r.index,\n ...(r.id !== undefined ? { id: r.id } : {}),\n reason: r.reason,\n })),\n envOverride: process.env[USER_MANIFEST_ENV_VAR],\n },\n unknownIdFallback: {\n contextWindow: UNKNOWN_MODEL_CONTEXT_WINDOW,\n },\n };\n}\n\nfunction formatDoctorReport(r: DoctorReport): string {\n const lines: string[] = [];\n lines.push('nexus-agents registry doctor');\n lines.push('============================');\n lines.push('');\n lines.push(`Registry entries by source (total ${String(r.totalEntries)}):`);\n for (const source of ENTRY_SOURCES) {\n lines.push(` ${source.padEnd(11)}: ${String(r.sourceCounts[source])}`);\n }\n lines.push('');\n lines.push('Bundled generated registry (long-tail breadth tier):');\n lines.push(` path : ${r.bundled.path}`);\n lines.push(` status : ${r.bundled.status}`);\n lines.push(` entryCount : ${String(r.bundled.entryCount)}`);\n lines.push('');\n // User overlay reported for inspection; not consumed by the merged registry.\n lines.push('T3 user overlay (reported for inspection):');\n lines.push(` path : ${r.overlay.path}`);\n lines.push(` status : ${r.overlay.status}`);\n lines.push(` entryCount : ${String(r.overlay.entryCount)}`);\n lines.push(` env override: ${r.overlay.envOverride ?? '(not set)'}`);\n if (r.overlay.rejections.length > 0) {\n lines.push(' rejections :');\n for (const rej of r.overlay.rejections) {\n const idPart = rej.id !== undefined ? ` id=${rej.id}` : '';\n lines.push(` - [${String(rej.index)}]${idPart} ${rej.reason}`);\n }\n }\n lines.push('');\n lines.push('Unknown-id fallback (id resolves in no source):');\n lines.push(` contextWindow : ${String(r.unknownIdFallback.contextWindow)}`);\n return lines.join('\\n');\n}\n\n// ---------------------------------------------------------------------------\n// refresh\n// ---------------------------------------------------------------------------\n\nconst MAX_REFRESH_BYTES = 5 * 1024 * 1024;\n\nfunction missingSourceResult(): RegistryCommandResult {\n return {\n text: [\n 'registry refresh requires --source=<url>.',\n '',\n 'The url should point at a model-registry.generated.json file with a',\n 'matching <url>.sha256 sidecar (single line containing the SHA256 hash).',\n '',\n 'A signed GitHub release artifact is a planned default but not wired yet;',\n `that is tracked in #2180. Use --source=<your-mirror-url> in the meantime.`,\n ].join('\\n'),\n exitCode: 2,\n };\n}\n\ninterface VerifiedArtifact {\n readonly body: string;\n readonly sha256: string;\n}\n\nasync function fetchAndVerify(\n source: string,\n fetchImpl: typeof fetch\n): Promise<VerifiedArtifact | RegistryCommandResult> {\n const body = await fetchWithCap(source, fetchImpl);\n if (!body.ok || body.body === undefined) {\n return { text: `Failed to fetch ${source}: ${body.error ?? 'unknown'}`, exitCode: 1 };\n }\n const sha = await fetchWithCap(`${source}.sha256`, fetchImpl);\n if (!sha.ok || sha.body === undefined) {\n return {\n text: `Failed to fetch ${source}.sha256 for integrity check: ${sha.error ?? 'unknown'}`,\n exitCode: 1,\n };\n }\n const expected = sha.body.trim().split(/\\s+/)[0] ?? '';\n if (expected === '') {\n return { text: `SHA256 sidecar at ${source}.sha256 is empty`, exitCode: 1 };\n }\n const actual = createHash('sha256').update(body.body, 'utf-8').digest('hex');\n if (actual.toLowerCase() !== expected.toLowerCase()) {\n return {\n text: `SHA256 mismatch: expected ${expected}, got ${actual}. Aborting write.`,\n exitCode: 1,\n };\n }\n return { body: body.body, sha256: actual };\n}\n\nfunction formatRefreshReport(\n verb: 'would write to' | 'wrote to',\n source: string,\n artifact: VerifiedArtifact,\n dest: string,\n extraTail: readonly string[] = []\n): string {\n return [\n `registry refresh${verb.startsWith('would') ? ' --dry-run' : ''}`,\n `source : ${source}`,\n `sha256 : ${artifact.sha256} (verified)`,\n `bytes : ${String(artifact.body.length)}`,\n `${verb}: ${dest}`,\n ...extraTail,\n ].join('\\n');\n}\n\nasync function refreshCommand(options: RegistryCommandOptions): Promise<RegistryCommandResult> {\n const source = options.source;\n if (source === undefined || source === '') return missingSourceResult();\n\n const artifact = await fetchAndVerify(source, options.fetchImpl ?? fetch);\n if ('text' in artifact) return artifact;\n\n const dest = options.destPath ?? nexusDataPath('model-registry.generated.json');\n if (options.dryRun === true) {\n return { text: formatRefreshReport('would write to', source, artifact, dest), exitCode: 0 };\n }\n\n mkdirSync(dirname(dest), { recursive: true });\n writeFileSync(dest, artifact.body, 'utf-8');\n return {\n text: formatRefreshReport('wrote to', source, artifact, dest, [\n '',\n 'The refreshed file takes precedence over the bundled registry on the next',\n 'run. Restart any running CLI / MCP server for the change to take effect.',\n ]),\n exitCode: 0,\n };\n}\n\ninterface FetchResult {\n readonly ok: boolean;\n readonly body?: string;\n readonly error?: string;\n}\n\nconst overCapError = (bytes: number | null): FetchResult => ({\n ok: false,\n error:\n bytes === null\n ? `payload exceeds cap ${String(MAX_REFRESH_BYTES)} bytes (stream aborted)`\n : `payload ${String(bytes)} bytes exceeds cap ${String(MAX_REFRESH_BYTES)}`,\n});\n\nasync function fetchWithCap(url: string, fetchImpl: typeof fetch): Promise<FetchResult> {\n try {\n const response = await fetchImpl(url, { signal: AbortSignal.timeout(30_000) });\n if (!response.ok) {\n return { ok: false, error: `HTTP ${String(response.status)}` };\n }\n\n // Reject on the declared size before reading a single byte (#3354). A\n // compromised/typo'd mirror could otherwise stream gigabytes; the old\n // `response.text()` buffered the whole body before checking the cap and\n // could exhaust memory first.\n const declared = Number(response.headers.get('content-length'));\n if (Number.isFinite(declared) && declared > MAX_REFRESH_BYTES) {\n return overCapError(declared);\n }\n\n // No declared length we can trust: stream with a running cap and abort\n // the moment the accumulated bytes exceed it, so an undeclared or lying\n // Content-Length can't OOM the process.\n if (response.body === null) {\n const body = await response.text();\n return body.length > MAX_REFRESH_BYTES ? overCapError(body.length) : { ok: true, body };\n }\n return await readStreamWithCap(response.body);\n } catch (err: unknown) {\n const message = err instanceof Error ? err.message : String(err);\n return { ok: false, error: message };\n }\n}\n\n/**\n * Read a response body stream, aborting the moment the accumulated bytes\n * exceed {@link MAX_REFRESH_BYTES} (#3354). Keeps a hostile mirror with an\n * undeclared/lying Content-Length from buffering unbounded data into memory.\n */\nasync function readStreamWithCap(stream: ReadableStream<Uint8Array>): Promise<FetchResult> {\n const reader = stream.getReader();\n const decoder = new TextDecoder();\n let total = 0;\n let body = '';\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n total += value.byteLength;\n if (total > MAX_REFRESH_BYTES) {\n await reader.cancel();\n return overCapError(null);\n }\n body += decoder.decode(value, { stream: true });\n }\n body += decoder.decode();\n return { ok: true, body };\n}\n\n// ---------------------------------------------------------------------------\n// Usage\n// ---------------------------------------------------------------------------\n\nexport function formatRegistryUsage(): string {\n return [\n 'Usage:',\n ' nexus-agents registry doctor [--json]',\n ' Inspect the merged ModelRegistry: per-source entry counts, the',\n ' bundled generated registry, the user overlay, and the unknown-id',\n ' fallback contextWindow.',\n '',\n ' nexus-agents registry refresh --source=<url> [--dry-run]',\n ' Download a signed model-registry.generated.json from <url>,',\n ' SHA256-verify against <url>.sha256, and write to:',\n ` ${nexusDataPath('model-registry.generated.json')}`,\n '',\n `User overlay path is ${defaultUserManifestPath()} by default,`,\n `or whatever ${USER_MANIFEST_ENV_VAR} points to. Overlay max size is ${String(MANIFEST_MAX_BYTES)} bytes.`,\n ].join('\\n');\n}\n"],"mappings":";;;;;;;;;;;;;;AAsBA,SAAS,kBAAkB;AAC3B,SAAS,WAAW,qBAAqB;AACzC,SAAS,eAAe;AAkBxB,IAAM,oBAAmD,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;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,cAAc,+BAA+B,CAAC;AAAA,IACvD;AAAA,IACA,wBAAwB,wBAAwB,CAAC;AAAA,IACjD,eAAe,qBAAqB,mCAAmC,OAAO,kBAAkB,CAAC;AAAA,EACnG,EAAE,KAAK,IAAI;AACb;","names":[]}
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
buildPlanFromAnalysis,
|
|
4
4
|
generateSecurityPlan,
|
|
5
5
|
resolveScannerData
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FZCB2P3F.js";
|
|
7
7
|
import "./chunk-HFOQKCD2.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-KLYBJUTK.js";
|
|
9
9
|
import "./chunk-CH7QIDHQ.js";
|
|
10
10
|
import "./chunk-PR4QN5HX.js";
|
|
11
11
|
export {
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
generateSecurityPlan,
|
|
15
15
|
resolveScannerData
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=repo-security-plan-
|
|
17
|
+
//# sourceMappingURL=repo-security-plan-L47DDTAU.js.map
|
package/dist/{research-helpers-synthesize-OKNU245Z.js → research-helpers-synthesize-IABO7LB4.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AttributedInsightSchema,
|
|
3
3
|
synthesizeResearch
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Z7IQUUTZ.js";
|
|
5
5
|
import "./chunk-NUBSJGQZ.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-KLYBJUTK.js";
|
|
7
7
|
import "./chunk-CH7QIDHQ.js";
|
|
8
8
|
import "./chunk-PR4QN5HX.js";
|
|
9
9
|
export {
|
|
10
10
|
AttributedInsightSchema,
|
|
11
11
|
synthesizeResearch
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=research-helpers-synthesize-
|
|
13
|
+
//# sourceMappingURL=research-helpers-synthesize-IABO7LB4.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-KLYBJUTK.js";
|
|
6
6
|
import "./chunk-CH7QIDHQ.js";
|
|
7
7
|
import "./chunk-PR4QN5HX.js";
|
|
8
8
|
export {
|
|
@@ -10,4 +10,4 @@ export {
|
|
|
10
10
|
RoutingMemory,
|
|
11
11
|
createRoutingMemory
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=routing-memory-
|
|
13
|
+
//# sourceMappingURL=routing-memory-2YWEWRMQ.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-MNFEZIRI.js";
|
|
10
|
+
import "./chunk-KLYBJUTK.js";
|
|
11
11
|
import "./chunk-CH7QIDHQ.js";
|
|
12
12
|
import "./chunk-PR4QN5HX.js";
|
|
13
13
|
export {
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
SessionMemoryError,
|
|
20
20
|
createSessionMemory
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=session-memory-
|
|
22
|
+
//# sourceMappingURL=session-memory-YWOMPCLZ.js.map
|