nexus-agents 8.2.0 → 8.3.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/chunk-7IDMD4IN.js +7 -0
- package/dist/{chunk-T26NTTAX.js → chunk-K5GYF2LP.js} +3 -3
- package/dist/{chunk-RFK7OJGI.js → chunk-L2BM3TGM.js} +2 -2
- package/dist/{chunk-BH6TCBVV.js → chunk-LY2FJKYX.js} +2 -2
- package/dist/{chunk-FBVOBOHS.js → chunk-PDROJ5FZ.js} +2 -2
- package/dist/{chunk-FR37BYKI.js → chunk-R5F7Y5UY.js} +2 -2
- package/dist/{chunk-7WDNGR7M.js → chunk-S7UZUGS7.js} +9 -9
- package/dist/{chunk-HS43MFL4.js → chunk-ULQFMQE7.js} +1 -2
- package/dist/{chunk-LTTUQNP2.js → chunk-UPEBXNNC.js} +2 -2
- package/dist/cli.js +11 -11
- package/dist/{consensus-vote-ZOGBRT5Z.js → consensus-vote-ZDBL2EA4.js} +4 -4
- package/dist/{improvement-review-H5HBGUKX.js → improvement-review-ZTF544Y7.js} +4 -4
- package/dist/index.d.ts +83 -1
- package/dist/index.js +44 -12
- package/dist/index.js.map +1 -1
- package/dist/{issue-triage-ATDH5B5W.js → issue-triage-MGYUQ7WN.js} +3 -3
- package/dist/{pr-reviewer-helpers-XRAYFBTQ.js → pr-reviewer-helpers-74SUOXOV.js} +3 -3
- package/dist/{setup-data-dir-PSYK3JXR.js → setup-data-dir-GQ4QQKHZ.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-325ZUIUK.js +0 -7
- /package/dist/{chunk-325ZUIUK.js.map → chunk-7IDMD4IN.js.map} +0 -0
- /package/dist/{chunk-T26NTTAX.js.map → chunk-K5GYF2LP.js.map} +0 -0
- /package/dist/{chunk-RFK7OJGI.js.map → chunk-L2BM3TGM.js.map} +0 -0
- /package/dist/{chunk-BH6TCBVV.js.map → chunk-LY2FJKYX.js.map} +0 -0
- /package/dist/{chunk-FBVOBOHS.js.map → chunk-PDROJ5FZ.js.map} +0 -0
- /package/dist/{chunk-FR37BYKI.js.map → chunk-R5F7Y5UY.js.map} +0 -0
- /package/dist/{chunk-7WDNGR7M.js.map → chunk-S7UZUGS7.js.map} +0 -0
- /package/dist/{chunk-HS43MFL4.js.map → chunk-ULQFMQE7.js.map} +0 -0
- /package/dist/{chunk-LTTUQNP2.js.map → chunk-UPEBXNNC.js.map} +0 -0
- /package/dist/{consensus-vote-ZOGBRT5Z.js.map → consensus-vote-ZDBL2EA4.js.map} +0 -0
- /package/dist/{improvement-review-H5HBGUKX.js.map → improvement-review-ZTF544Y7.js.map} +0 -0
- /package/dist/{issue-triage-ATDH5B5W.js.map → issue-triage-MGYUQ7WN.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-XRAYFBTQ.js.map → pr-reviewer-helpers-74SUOXOV.js.map} +0 -0
- /package/dist/{setup-data-dir-PSYK3JXR.js.map → setup-data-dir-GQ4QQKHZ.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -553,7 +553,7 @@ import {
|
|
|
553
553
|
withLogging,
|
|
554
554
|
withRetry,
|
|
555
555
|
withRetryWrapper
|
|
556
|
-
} from "./chunk-
|
|
556
|
+
} from "./chunk-S7UZUGS7.js";
|
|
557
557
|
import {
|
|
558
558
|
FALLBACK_SCANNER_DATA,
|
|
559
559
|
buildPlanFromAnalysis,
|
|
@@ -574,7 +574,7 @@ import {
|
|
|
574
574
|
connectTransport,
|
|
575
575
|
createServer,
|
|
576
576
|
startStdioServer
|
|
577
|
-
} from "./chunk-
|
|
577
|
+
} from "./chunk-K5GYF2LP.js";
|
|
578
578
|
import {
|
|
579
579
|
OPENAI_MODELS,
|
|
580
580
|
OPENAI_MODEL_ALIASES,
|
|
@@ -632,7 +632,7 @@ import {
|
|
|
632
632
|
generateProposalId,
|
|
633
633
|
parseAgentPairKey,
|
|
634
634
|
registerConsensusVoteTool
|
|
635
|
-
} from "./chunk-
|
|
635
|
+
} from "./chunk-LY2FJKYX.js";
|
|
636
636
|
import "./chunk-6LDUEA4I.js";
|
|
637
637
|
import {
|
|
638
638
|
allOf
|
|
@@ -660,7 +660,7 @@ import {
|
|
|
660
660
|
requiresHumanApproval,
|
|
661
661
|
validateAgentAction,
|
|
662
662
|
validateCorroboration
|
|
663
|
-
} from "./chunk-
|
|
663
|
+
} from "./chunk-PDROJ5FZ.js";
|
|
664
664
|
import {
|
|
665
665
|
GitHubProvider,
|
|
666
666
|
ScmError
|
|
@@ -677,14 +677,15 @@ import {
|
|
|
677
677
|
TRUST_TIER_NUMERIC,
|
|
678
678
|
TrustTierSchema,
|
|
679
679
|
assessReputation,
|
|
680
|
-
|
|
680
|
+
gateWithReputation,
|
|
681
681
|
resolveEnvMode,
|
|
682
|
+
resolveReputationGatingMode,
|
|
682
683
|
sanitizeInput
|
|
683
|
-
} from "./chunk-
|
|
684
|
+
} from "./chunk-ULQFMQE7.js";
|
|
684
685
|
import {
|
|
685
686
|
ImprovementReviewInputSchema,
|
|
686
687
|
registerImprovementReviewTool
|
|
687
|
-
} from "./chunk-
|
|
688
|
+
} from "./chunk-R5F7Y5UY.js";
|
|
688
689
|
import {
|
|
689
690
|
AgentPerformanceSchema,
|
|
690
691
|
ConsensusAlgorithmSchema,
|
|
@@ -720,10 +721,10 @@ import {
|
|
|
720
721
|
toolSuccess,
|
|
721
722
|
toolSuccessStructured,
|
|
722
723
|
validateToolInput
|
|
723
|
-
} from "./chunk-
|
|
724
|
+
} from "./chunk-L2BM3TGM.js";
|
|
724
725
|
import {
|
|
725
726
|
VERSION
|
|
726
|
-
} from "./chunk-
|
|
727
|
+
} from "./chunk-7IDMD4IN.js";
|
|
727
728
|
import {
|
|
728
729
|
AuditTrail,
|
|
729
730
|
MAX_STRIPPED_ELEMENTS_PER_EVENT,
|
|
@@ -2702,6 +2703,10 @@ var HostileInputFirewall = class {
|
|
|
2702
2703
|
context;
|
|
2703
2704
|
/** #5382 rollout gate; resolved once at construction, not per call. */
|
|
2704
2705
|
policyMode;
|
|
2706
|
+
/** #5381 reputation-demotion gate; a DIFFERENT knob from `policyMode`. */
|
|
2707
|
+
reputationGatingMode;
|
|
2708
|
+
/** #5405 seam: how a reputation assessment is obtained. */
|
|
2709
|
+
assessReputationFn;
|
|
2705
2710
|
constructor(config) {
|
|
2706
2711
|
const validated = FirewallConfigSchema.parse({
|
|
2707
2712
|
stages: config.stages,
|
|
@@ -2719,6 +2724,8 @@ var HostileInputFirewall = class {
|
|
|
2719
2724
|
);
|
|
2720
2725
|
this.context = validated.context;
|
|
2721
2726
|
this.policyMode = config.policyMode ?? resolveFirewallPolicyMode(config.env ?? process.env);
|
|
2727
|
+
this.reputationGatingMode = config.reputationGatingMode ?? resolveReputationGatingMode(config.env ?? process.env);
|
|
2728
|
+
this.assessReputationFn = config.reputationAssessor ?? ((metadata) => assessReputation(metadata, this.reputationCache));
|
|
2722
2729
|
}
|
|
2723
2730
|
/**
|
|
2724
2731
|
* Processes untrusted input through the firewall pipeline.
|
|
@@ -2733,7 +2740,10 @@ var HostileInputFirewall = class {
|
|
|
2733
2740
|
const sanitized = this.runSanitization(meta);
|
|
2734
2741
|
const trust = this.runClassification(meta, sanitized);
|
|
2735
2742
|
const reputation = this.runReputation(meta, sanitized);
|
|
2736
|
-
const effectiveTrustTier =
|
|
2743
|
+
const { tier: effectiveTrustTier, gate: reputationGate } = this.runReputationGate(
|
|
2744
|
+
trust.trustTier,
|
|
2745
|
+
reputation
|
|
2746
|
+
);
|
|
2737
2747
|
const atl = this.buildATL(meta, effectiveTrustTier, sanitized, reputation);
|
|
2738
2748
|
const ruleOfTwoViolation = this.stages.policyEnforcement ? checkRuleOfTwo({
|
|
2739
2749
|
inputTrustTier: effectiveTrustTier,
|
|
@@ -2756,6 +2766,7 @@ var HostileInputFirewall = class {
|
|
|
2756
2766
|
trust,
|
|
2757
2767
|
...reputation !== void 0 ? { reputation } : {},
|
|
2758
2768
|
effectiveTrustTier,
|
|
2769
|
+
...reputationGate !== void 0 ? { reputationGate } : {},
|
|
2759
2770
|
atl,
|
|
2760
2771
|
...ruleOfTwoViolation !== void 0 ? { ruleOfTwoViolation } : {},
|
|
2761
2772
|
policyMode: this.policyMode,
|
|
@@ -2912,6 +2923,26 @@ var HostileInputFirewall = class {
|
|
|
2912
2923
|
}
|
|
2913
2924
|
return result;
|
|
2914
2925
|
}
|
|
2926
|
+
/**
|
|
2927
|
+
* Reconcile the classifier tier with reputation, under the rollout mode
|
|
2928
|
+
* production honours (#3106 reconciliation, #5381 gating).
|
|
2929
|
+
*
|
|
2930
|
+
* #3106's reconciliation is demotion-only; Tier-1/allowlist wins; it equals
|
|
2931
|
+
* the classifier tier when reputation is absent. #5381 puts it behind
|
|
2932
|
+
* `NEXUS_REPUTATION_GATING`, so `audit` is audit-only here too — previously
|
|
2933
|
+
* the firewall enforced unconditionally while production suppressed, on
|
|
2934
|
+
* identical configuration.
|
|
2935
|
+
*
|
|
2936
|
+
* Returns no gate at all when the stage is off, so absence in the result
|
|
2937
|
+
* means "not evaluated" rather than "evaluated, nothing suppressed" —
|
|
2938
|
+
* `demotionSuppressed` is a required boolean and would otherwise report
|
|
2939
|
+
* `false` for a check that never ran.
|
|
2940
|
+
*/
|
|
2941
|
+
runReputationGate(classifierTier, reputation) {
|
|
2942
|
+
if (!this.stages.reputationAssessment) return { tier: classifierTier };
|
|
2943
|
+
const gate = gateWithReputation(classifierTier, reputation, this.reputationGatingMode);
|
|
2944
|
+
return { tier: gate.enforcedTier, gate };
|
|
2945
|
+
}
|
|
2915
2946
|
runReputation(meta, sanitized) {
|
|
2916
2947
|
if (!this.stages.reputationAssessment) return void 0;
|
|
2917
2948
|
const metadata = {
|
|
@@ -2919,7 +2950,7 @@ var HostileInputFirewall = class {
|
|
|
2919
2950
|
authorAssociation: meta.authorAssociation.toUpperCase(),
|
|
2920
2951
|
injectionFlags: sanitized.injectionFlags
|
|
2921
2952
|
};
|
|
2922
|
-
const result =
|
|
2953
|
+
const result = this.assessReputationFn(metadata);
|
|
2923
2954
|
if (this.stages.audit) {
|
|
2924
2955
|
emitReputationEvent(this.auditTrail, {
|
|
2925
2956
|
username: meta.username,
|
|
@@ -4848,7 +4879,7 @@ function buildVotingInput(plan, config) {
|
|
|
4848
4879
|
}
|
|
4849
4880
|
async function executeSingleVote(plan, config, log) {
|
|
4850
4881
|
try {
|
|
4851
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
4882
|
+
const { executeVoting } = await import("./consensus-vote-ZDBL2EA4.js");
|
|
4852
4883
|
const input = buildVotingInput(plan, config);
|
|
4853
4884
|
const result = await executeVoting(input, log);
|
|
4854
4885
|
return parseVotingResult(result);
|
|
@@ -5767,6 +5798,7 @@ export {
|
|
|
5767
5798
|
resolveFirewallPolicyMode,
|
|
5768
5799
|
resolveInput,
|
|
5769
5800
|
resolvePipelineDeps,
|
|
5801
|
+
resolveReputationGatingMode,
|
|
5770
5802
|
resolveScannerData,
|
|
5771
5803
|
resolveStringExpressions,
|
|
5772
5804
|
resolveToken,
|