nexus-agents 2.92.5 → 2.94.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-PIDVHWJ7.js → child-mcp-config-PPFHJZSO.js} +2 -2
- package/dist/{chunk-MBK6P4VV.js → chunk-24WC4XO2.js} +2 -2
- package/dist/{chunk-G55LVPNH.js → chunk-2YMRRZRM.js} +9 -12
- package/dist/chunk-2YMRRZRM.js.map +1 -0
- package/dist/{chunk-PIDABDFE.js → chunk-43UDRX3N.js} +9 -127
- package/dist/chunk-43UDRX3N.js.map +1 -0
- package/dist/{chunk-DNSBKQ7I.js → chunk-4QESFYGV.js} +4 -4
- package/dist/{chunk-QQMYKFG7.js → chunk-5B4VLSMP.js} +3 -3
- package/dist/{chunk-3TU3RJNK.js → chunk-5ZB3MTA7.js} +3 -3
- package/dist/{chunk-FL3AXIUL.js → chunk-63OGXDHS.js} +4 -4
- package/dist/{chunk-BG4WK4UP.js → chunk-76535ZNP.js} +15 -6
- package/dist/chunk-76535ZNP.js.map +1 -0
- package/dist/{chunk-QXGLZETS.js → chunk-77JUKFTG.js} +7 -7
- package/dist/{chunk-GKFFRRS4.js → chunk-ADRTAUJA.js} +4 -4
- package/dist/{chunk-VBIAMMZZ.js → chunk-EB43BGAR.js} +2 -2
- package/dist/{chunk-EI2E43HI.js → chunk-EDPDH5YT.js} +3 -3
- package/dist/{chunk-YQAS2EGR.js → chunk-EJR6U67L.js} +2 -2
- package/dist/{chunk-2QJJYCPD.js → chunk-FUGPKYEJ.js} +2 -2
- package/dist/{chunk-P646QQYW.js → chunk-G5EBHQ2L.js} +5 -5
- package/dist/chunk-G5EBHQ2L.js.map +1 -0
- package/dist/{chunk-YJUHVQSG.js → chunk-GMZDRTVJ.js} +20 -3
- package/dist/chunk-GMZDRTVJ.js.map +1 -0
- package/dist/{chunk-U4RLBLNO.js → chunk-KSJPDQSG.js} +2 -2
- package/dist/{chunk-DSERRMPX.js → chunk-L7I55FAN.js} +2 -2
- package/dist/{chunk-OXLXVSN3.js → chunk-LCLVSNST.js} +2 -2
- package/dist/{chunk-VU54VB6K.js → chunk-OKGHHCS5.js} +3 -3
- package/dist/{chunk-DQEREDUW.js → chunk-OSSGG7KW.js} +2 -2
- package/dist/{chunk-L5BXCSMP.js → chunk-OT6V5ROA.js} +406 -16
- package/dist/chunk-OT6V5ROA.js.map +1 -0
- package/dist/{chunk-TOQJ3UN5.js → chunk-Q3NUA7CW.js} +3 -3
- package/dist/{chunk-QADQ4LN4.js → chunk-R2NKJPUX.js} +2 -2
- package/dist/{chunk-WXEMTPML.js → chunk-ROAANOOB.js} +2 -2
- package/dist/{chunk-NYWZI46K.js → chunk-TNBWHOPY.js} +52 -132
- package/dist/chunk-TNBWHOPY.js.map +1 -0
- package/dist/{chunk-KTJUMU2A.js → chunk-UC3PVIN4.js} +179 -48
- package/dist/chunk-UC3PVIN4.js.map +1 -0
- package/dist/{chunk-ZYYU26YH.js → chunk-XBPFVWA2.js} +2 -2
- package/dist/{chunk-SIICMKBA.js → chunk-YDXGYKZJ.js} +2 -2
- package/dist/chunk-YDXGYKZJ.js.map +1 -0
- package/dist/{chunk-3XC5LFWH.js → chunk-ZY2EMD72.js} +5 -5
- package/dist/{cli-circuit-breaker-HFSOBCPK.js → cli-circuit-breaker-BAERQZ3H.js} +4 -4
- package/dist/cli.js +135 -38
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-T2XYCQOU.js → composite-router-EONKFRDD.js} +2 -2
- package/dist/{consensus-vote-IDHQVKX2.js → consensus-vote-TO5575P3.js} +12 -12
- package/dist/{context-retriever-5BJYPAX7.js → context-retriever-JM564MOV.js} +6 -6
- package/dist/{doctor-deep-OVGRBG3Z.js → doctor-deep-VFBQ7TY4.js} +3 -3
- package/dist/{expert-bridge-JPTHFWPW.js → expert-bridge-OXME7FES.js} +4 -4
- package/dist/{factory-734UWF4C.js → factory-FVZLVIYH.js} +5 -5
- package/dist/{factory-NE7SNW7V.js → factory-MDT5CFA5.js} +5 -5
- package/dist/index.d.ts +240 -189
- package/dist/index.js +198 -55
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-2ZBDJILW.js → init-opencode-Y6XKR6WS.js} +5 -5
- package/dist/{issue-triage-AGGTH767.js → issue-triage-2XVD4JQ7.js} +5 -5
- package/dist/{pr-reviewer-helpers-WGPLUXPU.js → pr-reviewer-helpers-JLWEQIN6.js} +4 -4
- package/dist/{registry-command-CZZM5SF2.js → registry-command-FYVOMCBG.js} +2 -2
- package/dist/{repo-security-plan-X42KXHT2.js → repo-security-plan-JRDHWI2R.js} +3 -3
- package/dist/{research-helpers-synthesize-C7YGRQI6.js → research-helpers-synthesize-F7L7M7FJ.js} +3 -3
- package/dist/{routing-memory-2FYZDQUC.js → routing-memory-JAV2ICXR.js} +2 -2
- package/dist/{session-memory-53NZRZB6.js → session-memory-2XAGY3PX.js} +3 -3
- package/dist/{setup-command-ZV6VZLP4.js → setup-command-6WVEOE4Q.js} +11 -11
- package/dist/{setup-config-CYRK4UFF.js → setup-config-KUZU2GFI.js} +3 -3
- package/dist/{setup-custom-api-GXHPYLDR.js → setup-custom-api-3M7CU3TF.js} +4 -4
- package/dist/{tool-memory-AX5G67J6.js → tool-memory-YWX4FTIQ.js} +5 -5
- package/dist/{weather-report-AUMNGHYZ.js → weather-report-ZZM5EU7N.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-BG4WK4UP.js.map +0 -1
- package/dist/chunk-G55LVPNH.js.map +0 -1
- package/dist/chunk-KTJUMU2A.js.map +0 -1
- package/dist/chunk-L5BXCSMP.js.map +0 -1
- package/dist/chunk-NYWZI46K.js.map +0 -1
- package/dist/chunk-P646QQYW.js.map +0 -1
- package/dist/chunk-PIDABDFE.js.map +0 -1
- package/dist/chunk-SIICMKBA.js.map +0 -1
- package/dist/chunk-YJUHVQSG.js.map +0 -1
- /package/dist/{child-mcp-config-PIDVHWJ7.js.map → child-mcp-config-PPFHJZSO.js.map} +0 -0
- /package/dist/{chunk-MBK6P4VV.js.map → chunk-24WC4XO2.js.map} +0 -0
- /package/dist/{chunk-DNSBKQ7I.js.map → chunk-4QESFYGV.js.map} +0 -0
- /package/dist/{chunk-QQMYKFG7.js.map → chunk-5B4VLSMP.js.map} +0 -0
- /package/dist/{chunk-3TU3RJNK.js.map → chunk-5ZB3MTA7.js.map} +0 -0
- /package/dist/{chunk-FL3AXIUL.js.map → chunk-63OGXDHS.js.map} +0 -0
- /package/dist/{chunk-QXGLZETS.js.map → chunk-77JUKFTG.js.map} +0 -0
- /package/dist/{chunk-GKFFRRS4.js.map → chunk-ADRTAUJA.js.map} +0 -0
- /package/dist/{chunk-VBIAMMZZ.js.map → chunk-EB43BGAR.js.map} +0 -0
- /package/dist/{chunk-EI2E43HI.js.map → chunk-EDPDH5YT.js.map} +0 -0
- /package/dist/{chunk-YQAS2EGR.js.map → chunk-EJR6U67L.js.map} +0 -0
- /package/dist/{chunk-2QJJYCPD.js.map → chunk-FUGPKYEJ.js.map} +0 -0
- /package/dist/{chunk-U4RLBLNO.js.map → chunk-KSJPDQSG.js.map} +0 -0
- /package/dist/{chunk-DSERRMPX.js.map → chunk-L7I55FAN.js.map} +0 -0
- /package/dist/{chunk-OXLXVSN3.js.map → chunk-LCLVSNST.js.map} +0 -0
- /package/dist/{chunk-VU54VB6K.js.map → chunk-OKGHHCS5.js.map} +0 -0
- /package/dist/{chunk-DQEREDUW.js.map → chunk-OSSGG7KW.js.map} +0 -0
- /package/dist/{chunk-TOQJ3UN5.js.map → chunk-Q3NUA7CW.js.map} +0 -0
- /package/dist/{chunk-QADQ4LN4.js.map → chunk-R2NKJPUX.js.map} +0 -0
- /package/dist/{chunk-WXEMTPML.js.map → chunk-ROAANOOB.js.map} +0 -0
- /package/dist/{chunk-ZYYU26YH.js.map → chunk-XBPFVWA2.js.map} +0 -0
- /package/dist/{chunk-3XC5LFWH.js.map → chunk-ZY2EMD72.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-HFSOBCPK.js.map → cli-circuit-breaker-BAERQZ3H.js.map} +0 -0
- /package/dist/{composite-router-T2XYCQOU.js.map → composite-router-EONKFRDD.js.map} +0 -0
- /package/dist/{consensus-vote-IDHQVKX2.js.map → consensus-vote-TO5575P3.js.map} +0 -0
- /package/dist/{context-retriever-5BJYPAX7.js.map → context-retriever-JM564MOV.js.map} +0 -0
- /package/dist/{doctor-deep-OVGRBG3Z.js.map → doctor-deep-VFBQ7TY4.js.map} +0 -0
- /package/dist/{expert-bridge-JPTHFWPW.js.map → expert-bridge-OXME7FES.js.map} +0 -0
- /package/dist/{factory-734UWF4C.js.map → factory-FVZLVIYH.js.map} +0 -0
- /package/dist/{factory-NE7SNW7V.js.map → factory-MDT5CFA5.js.map} +0 -0
- /package/dist/{init-opencode-2ZBDJILW.js.map → init-opencode-Y6XKR6WS.js.map} +0 -0
- /package/dist/{issue-triage-AGGTH767.js.map → issue-triage-2XVD4JQ7.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-WGPLUXPU.js.map → pr-reviewer-helpers-JLWEQIN6.js.map} +0 -0
- /package/dist/{registry-command-CZZM5SF2.js.map → registry-command-FYVOMCBG.js.map} +0 -0
- /package/dist/{repo-security-plan-X42KXHT2.js.map → repo-security-plan-JRDHWI2R.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-C7YGRQI6.js.map → research-helpers-synthesize-F7L7M7FJ.js.map} +0 -0
- /package/dist/{routing-memory-2FYZDQUC.js.map → routing-memory-JAV2ICXR.js.map} +0 -0
- /package/dist/{session-memory-53NZRZB6.js.map → session-memory-2XAGY3PX.js.map} +0 -0
- /package/dist/{setup-command-ZV6VZLP4.js.map → setup-command-6WVEOE4Q.js.map} +0 -0
- /package/dist/{setup-config-CYRK4UFF.js.map → setup-config-KUZU2GFI.js.map} +0 -0
- /package/dist/{setup-custom-api-GXHPYLDR.js.map → setup-custom-api-3M7CU3TF.js.map} +0 -0
- /package/dist/{tool-memory-AX5G67J6.js.map → tool-memory-YWX4FTIQ.js.map} +0 -0
- /package/dist/{weather-report-AUMNGHYZ.js.map → weather-report-ZZM5EU7N.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-ADRTAUJA.js";
|
|
5
5
|
import {
|
|
6
6
|
ALLOWED_COMMANDS,
|
|
7
7
|
ARTIFACT_TYPES,
|
|
@@ -378,7 +378,7 @@ import {
|
|
|
378
378
|
emitStateUpdated,
|
|
379
379
|
emitStepCompleted,
|
|
380
380
|
estimateTokens,
|
|
381
|
-
|
|
381
|
+
evaluatePipelinePolicy,
|
|
382
382
|
executeDelegatePipeline,
|
|
383
383
|
executeGraph,
|
|
384
384
|
executeOrchestratePipeline,
|
|
@@ -509,26 +509,26 @@ import {
|
|
|
509
509
|
validateWorkflow,
|
|
510
510
|
validateWorkflowDependencies,
|
|
511
511
|
withLogging
|
|
512
|
-
} from "./chunk-
|
|
512
|
+
} from "./chunk-UC3PVIN4.js";
|
|
513
513
|
import {
|
|
514
514
|
getTokenEnvVars,
|
|
515
515
|
hasToken,
|
|
516
516
|
resolveToken
|
|
517
|
-
} from "./chunk-
|
|
517
|
+
} from "./chunk-OSSGG7KW.js";
|
|
518
518
|
import "./chunk-OK6U5N5Y.js";
|
|
519
519
|
import {
|
|
520
520
|
OPENAI_MODELS,
|
|
521
521
|
OPENAI_MODEL_ALIASES,
|
|
522
522
|
OpenAIAdapter,
|
|
523
523
|
createOpenAIAdapter
|
|
524
|
-
} from "./chunk-
|
|
524
|
+
} from "./chunk-Q3NUA7CW.js";
|
|
525
525
|
import {
|
|
526
526
|
CliCircuitBreakerIntegration,
|
|
527
527
|
createCliCircuitBreakerIntegration
|
|
528
|
-
} from "./chunk-
|
|
528
|
+
} from "./chunk-EDPDH5YT.js";
|
|
529
529
|
import {
|
|
530
530
|
executeExpert
|
|
531
|
-
} from "./chunk-
|
|
531
|
+
} from "./chunk-2YMRRZRM.js";
|
|
532
532
|
import {
|
|
533
533
|
AgentFindingSchema,
|
|
534
534
|
AgentPerformanceSchema,
|
|
@@ -622,7 +622,7 @@ import {
|
|
|
622
622
|
validateToolInput,
|
|
623
623
|
withModelNotFoundFallback,
|
|
624
624
|
wrapResilientWithFallback
|
|
625
|
-
} from "./chunk-
|
|
625
|
+
} from "./chunk-TNBWHOPY.js";
|
|
626
626
|
import {
|
|
627
627
|
AdapterModelError,
|
|
628
628
|
BaseAdapter,
|
|
@@ -646,11 +646,11 @@ import {
|
|
|
646
646
|
transformStream,
|
|
647
647
|
validateApiKeyPresence,
|
|
648
648
|
withTimeout
|
|
649
|
-
} from "./chunk-
|
|
649
|
+
} from "./chunk-L7I55FAN.js";
|
|
650
650
|
import {
|
|
651
651
|
PROVIDER_ENV_KEYS
|
|
652
|
-
} from "./chunk-
|
|
653
|
-
import "./chunk-
|
|
652
|
+
} from "./chunk-YDXGYKZJ.js";
|
|
653
|
+
import "./chunk-G5EBHQ2L.js";
|
|
654
654
|
import {
|
|
655
655
|
AgentActionSchema,
|
|
656
656
|
AuditTrail,
|
|
@@ -672,7 +672,7 @@ import {
|
|
|
672
672
|
emitReputationEvent,
|
|
673
673
|
emitSanitizationEvent,
|
|
674
674
|
emitTrustEvent,
|
|
675
|
-
evaluatePolicy as
|
|
675
|
+
evaluatePolicy as evaluatePolicy2,
|
|
676
676
|
getCorroborationRules,
|
|
677
677
|
getRequiredTrustTier,
|
|
678
678
|
isMutatingAction,
|
|
@@ -682,11 +682,11 @@ import {
|
|
|
682
682
|
requiresCorroboration,
|
|
683
683
|
validateAgentAction,
|
|
684
684
|
validateCorroboration
|
|
685
|
-
} from "./chunk-
|
|
685
|
+
} from "./chunk-76535ZNP.js";
|
|
686
686
|
import {
|
|
687
687
|
GitHubProvider,
|
|
688
688
|
ScmError
|
|
689
|
-
} from "./chunk-
|
|
689
|
+
} from "./chunk-EJR6U67L.js";
|
|
690
690
|
import {
|
|
691
691
|
GitHubUserRoleSchema,
|
|
692
692
|
InjectionFlagSchema,
|
|
@@ -701,7 +701,7 @@ import {
|
|
|
701
701
|
assessReputation,
|
|
702
702
|
reconcileTrustTier,
|
|
703
703
|
sanitizeInput
|
|
704
|
-
} from "./chunk-
|
|
704
|
+
} from "./chunk-EB43BGAR.js";
|
|
705
705
|
import {
|
|
706
706
|
FALLBACK_SCANNER_DATA,
|
|
707
707
|
buildPlanFromAnalysis,
|
|
@@ -709,7 +709,7 @@ import {
|
|
|
709
709
|
generateSecurityPlan,
|
|
710
710
|
getRegistryManifest,
|
|
711
711
|
resolveScannerData
|
|
712
|
-
} from "./chunk-
|
|
712
|
+
} from "./chunk-FUGPKYEJ.js";
|
|
713
713
|
import {
|
|
714
714
|
analyzeGitHubRepo,
|
|
715
715
|
analyzeRepo,
|
|
@@ -719,10 +719,10 @@ import "./chunk-3ACDP4E6.js";
|
|
|
719
719
|
import {
|
|
720
720
|
PersistentStrategyDistiller,
|
|
721
721
|
RulesSnapshotSchema
|
|
722
|
-
} from "./chunk-
|
|
722
|
+
} from "./chunk-OKGHHCS5.js";
|
|
723
723
|
import {
|
|
724
724
|
MemoryError
|
|
725
|
-
} from "./chunk-
|
|
725
|
+
} from "./chunk-63OGXDHS.js";
|
|
726
726
|
import {
|
|
727
727
|
AppConfigSchema,
|
|
728
728
|
ExpertConfigSchema,
|
|
@@ -741,7 +741,7 @@ import {
|
|
|
741
741
|
getKnownNexusVarNames,
|
|
742
742
|
startStdioServer,
|
|
743
743
|
validateNexusEnv
|
|
744
|
-
} from "./chunk-
|
|
744
|
+
} from "./chunk-77JUKFTG.js";
|
|
745
745
|
import {
|
|
746
746
|
AvailabilityCache,
|
|
747
747
|
filterAvailableModels,
|
|
@@ -750,15 +750,15 @@ import {
|
|
|
750
750
|
getFallbackChain,
|
|
751
751
|
resetAvailabilityCache,
|
|
752
752
|
resolveFallback
|
|
753
|
-
} from "./chunk-
|
|
753
|
+
} from "./chunk-GMZDRTVJ.js";
|
|
754
754
|
import {
|
|
755
755
|
AvailableModelsCache,
|
|
756
756
|
getDefaultAvailableModelsCache,
|
|
757
757
|
setDefaultAvailableModelsCache
|
|
758
|
-
} from "./chunk-
|
|
758
|
+
} from "./chunk-KSJPDQSG.js";
|
|
759
759
|
import {
|
|
760
760
|
DEFAULTS
|
|
761
|
-
} from "./chunk-
|
|
761
|
+
} from "./chunk-43UDRX3N.js";
|
|
762
762
|
import "./chunk-NUBSJGQZ.js";
|
|
763
763
|
import "./chunk-6T3EPABN.js";
|
|
764
764
|
import {
|
|
@@ -789,9 +789,9 @@ import {
|
|
|
789
789
|
isCliAvailable,
|
|
790
790
|
isRetryableError,
|
|
791
791
|
sleep
|
|
792
|
-
} from "./chunk-
|
|
793
|
-
import "./chunk-
|
|
794
|
-
import "./chunk-
|
|
792
|
+
} from "./chunk-4QESFYGV.js";
|
|
793
|
+
import "./chunk-24WC4XO2.js";
|
|
794
|
+
import "./chunk-XBPFVWA2.js";
|
|
795
795
|
import {
|
|
796
796
|
BUILT_IN_EXPERTS,
|
|
797
797
|
BuiltInExpertTypeSchema,
|
|
@@ -802,7 +802,7 @@ import {
|
|
|
802
802
|
validateExpertConfig
|
|
803
803
|
} from "./chunk-ZM4O442V.js";
|
|
804
804
|
import "./chunk-PQHVC4BD.js";
|
|
805
|
-
import "./chunk-
|
|
805
|
+
import "./chunk-LCLVSNST.js";
|
|
806
806
|
import {
|
|
807
807
|
AgentCapability,
|
|
808
808
|
AgentError,
|
|
@@ -877,7 +877,7 @@ import {
|
|
|
877
877
|
toError,
|
|
878
878
|
unwrap,
|
|
879
879
|
unwrapOr
|
|
880
|
-
} from "./chunk-
|
|
880
|
+
} from "./chunk-OT6V5ROA.js";
|
|
881
881
|
import "./chunk-CH7QIDHQ.js";
|
|
882
882
|
import "./chunk-PR4QN5HX.js";
|
|
883
883
|
|
|
@@ -4054,6 +4054,141 @@ function getSafetyTaxonomySummary() {
|
|
|
4054
4054
|
};
|
|
4055
4055
|
}
|
|
4056
4056
|
|
|
4057
|
+
// src/security/audit-bridge.ts
|
|
4058
|
+
var logger4 = createLogger({ component: "SecurityAuditBridge" });
|
|
4059
|
+
function systemActor(id, name) {
|
|
4060
|
+
return name !== void 0 ? { type: "system", id, name } : { type: "system", id };
|
|
4061
|
+
}
|
|
4062
|
+
function userActor(username) {
|
|
4063
|
+
return { type: "user", id: username };
|
|
4064
|
+
}
|
|
4065
|
+
function mapTrust(e) {
|
|
4066
|
+
const severity = e.wasDowngraded ? "warning" : "info";
|
|
4067
|
+
return {
|
|
4068
|
+
category: "authorization",
|
|
4069
|
+
severity,
|
|
4070
|
+
outcome: "success",
|
|
4071
|
+
action: "security.trust_classification",
|
|
4072
|
+
actor: userActor(e.username),
|
|
4073
|
+
description: e.reason,
|
|
4074
|
+
metadata: {
|
|
4075
|
+
assignedTier: e.assignedTier,
|
|
4076
|
+
userRole: e.userRole,
|
|
4077
|
+
isAllowlisted: e.isAllowlisted,
|
|
4078
|
+
wasDowngraded: e.wasDowngraded,
|
|
4079
|
+
component: e.component
|
|
4080
|
+
}
|
|
4081
|
+
};
|
|
4082
|
+
}
|
|
4083
|
+
function mapPolicyGate(e) {
|
|
4084
|
+
const outcome = e.allowed ? "success" : "denied";
|
|
4085
|
+
return {
|
|
4086
|
+
category: "authorization",
|
|
4087
|
+
severity: e.allowed ? "info" : "warning",
|
|
4088
|
+
outcome,
|
|
4089
|
+
action: "security.policy_gate",
|
|
4090
|
+
actor: systemActor(e.component),
|
|
4091
|
+
policyName: "security.policy_gate",
|
|
4092
|
+
policyDecision: e.allowed ? "allow" : "deny",
|
|
4093
|
+
...e.violationRules.length > 0 ? { violationType: e.violationRules.join(",") } : {},
|
|
4094
|
+
metadata: {
|
|
4095
|
+
actionType: e.actionType,
|
|
4096
|
+
requiresApproval: e.requiresApproval,
|
|
4097
|
+
inputTrustTier: e.inputTrustTier,
|
|
4098
|
+
violationRules: e.violationRules
|
|
4099
|
+
}
|
|
4100
|
+
};
|
|
4101
|
+
}
|
|
4102
|
+
function mapCorroboration(e) {
|
|
4103
|
+
return {
|
|
4104
|
+
category: "security",
|
|
4105
|
+
severity: e.satisfied ? "info" : "warning",
|
|
4106
|
+
outcome: e.satisfied ? "success" : "denied",
|
|
4107
|
+
action: "security.corroboration",
|
|
4108
|
+
actor: systemActor(e.component),
|
|
4109
|
+
metadata: {
|
|
4110
|
+
actionType: e.actionType,
|
|
4111
|
+
sourceCount: e.sourceCount,
|
|
4112
|
+
missingRequirements: e.missingRequirements
|
|
4113
|
+
}
|
|
4114
|
+
};
|
|
4115
|
+
}
|
|
4116
|
+
function mapReputation(e) {
|
|
4117
|
+
return {
|
|
4118
|
+
category: "security",
|
|
4119
|
+
severity: e.isSuspicious ? "warning" : "info",
|
|
4120
|
+
outcome: "success",
|
|
4121
|
+
action: "security.reputation",
|
|
4122
|
+
actor: userActor(e.username),
|
|
4123
|
+
metadata: {
|
|
4124
|
+
reputationScore: e.reputationScore,
|
|
4125
|
+
isSuspicious: e.isSuspicious,
|
|
4126
|
+
effectiveTier: e.effectiveTier,
|
|
4127
|
+
signalCount: e.signalCount,
|
|
4128
|
+
component: e.component
|
|
4129
|
+
}
|
|
4130
|
+
};
|
|
4131
|
+
}
|
|
4132
|
+
function mapSanitization(e) {
|
|
4133
|
+
return {
|
|
4134
|
+
category: "security",
|
|
4135
|
+
severity: e.injectionFlagCount > 0 ? "warning" : "info",
|
|
4136
|
+
outcome: "success",
|
|
4137
|
+
action: "security.sanitization",
|
|
4138
|
+
actor: systemActor(e.component, e.source),
|
|
4139
|
+
metadata: {
|
|
4140
|
+
source: e.source,
|
|
4141
|
+
wasModified: e.wasModified,
|
|
4142
|
+
strippedCount: e.strippedCount,
|
|
4143
|
+
injectionFlagCount: e.injectionFlagCount,
|
|
4144
|
+
strippedElements: e.strippedElements
|
|
4145
|
+
}
|
|
4146
|
+
};
|
|
4147
|
+
}
|
|
4148
|
+
function mapGraphExecution(e) {
|
|
4149
|
+
return {
|
|
4150
|
+
category: "system",
|
|
4151
|
+
severity: "info",
|
|
4152
|
+
outcome: "success",
|
|
4153
|
+
action: "security.graph_execution",
|
|
4154
|
+
actor: systemActor(e.component),
|
|
4155
|
+
description: e.detail,
|
|
4156
|
+
metadata: {
|
|
4157
|
+
graphEvent: e.graphEvent,
|
|
4158
|
+
...e.nodeId !== void 0 ? { nodeId: e.nodeId } : {},
|
|
4159
|
+
stepNumber: e.stepNumber
|
|
4160
|
+
}
|
|
4161
|
+
};
|
|
4162
|
+
}
|
|
4163
|
+
function securityAuditEventToInput(event) {
|
|
4164
|
+
switch (event.type) {
|
|
4165
|
+
case "trust_classification":
|
|
4166
|
+
return mapTrust(event);
|
|
4167
|
+
case "policy_gate":
|
|
4168
|
+
return mapPolicyGate(event);
|
|
4169
|
+
case "corroboration":
|
|
4170
|
+
return mapCorroboration(event);
|
|
4171
|
+
case "reputation":
|
|
4172
|
+
return mapReputation(event);
|
|
4173
|
+
case "sanitization":
|
|
4174
|
+
return mapSanitization(event);
|
|
4175
|
+
case "graph_execution":
|
|
4176
|
+
return mapGraphExecution(event);
|
|
4177
|
+
}
|
|
4178
|
+
}
|
|
4179
|
+
function createDurableAuditSink(auditLogger) {
|
|
4180
|
+
return (event) => {
|
|
4181
|
+
try {
|
|
4182
|
+
auditLogger.log(securityAuditEventToInput(event));
|
|
4183
|
+
} catch (error) {
|
|
4184
|
+
logger4.warn("Failed to mirror security event to durable audit log", {
|
|
4185
|
+
type: event.type,
|
|
4186
|
+
error: getErrorMessage(error)
|
|
4187
|
+
});
|
|
4188
|
+
}
|
|
4189
|
+
};
|
|
4190
|
+
}
|
|
4191
|
+
|
|
4057
4192
|
// src/security/firewall/firewall-types.ts
|
|
4058
4193
|
import { z as z6 } from "zod";
|
|
4059
4194
|
var FirewallStagesSchema = z6.object({
|
|
@@ -4153,7 +4288,7 @@ function decodeATLValue(value) {
|
|
|
4153
4288
|
}
|
|
4154
4289
|
|
|
4155
4290
|
// src/security/firewall/firewall-pipeline.ts
|
|
4156
|
-
var
|
|
4291
|
+
var logger5 = createLogger({ component: "HostileInputFirewall" });
|
|
4157
4292
|
var HostileInputFirewall = class {
|
|
4158
4293
|
stages;
|
|
4159
4294
|
allowlisted;
|
|
@@ -4174,7 +4309,9 @@ var HostileInputFirewall = class {
|
|
|
4174
4309
|
this.maxInputLength = validated.maxInputLength;
|
|
4175
4310
|
this.adapter = config.adapter;
|
|
4176
4311
|
this.reputationCache = new ReputationCache();
|
|
4177
|
-
this.auditTrail = createAuditTrail(
|
|
4312
|
+
this.auditTrail = createAuditTrail(
|
|
4313
|
+
config.auditLogger !== void 0 ? createDurableAuditSink(config.auditLogger) : void 0
|
|
4314
|
+
);
|
|
4178
4315
|
this.context = validated.context;
|
|
4179
4316
|
}
|
|
4180
4317
|
/**
|
|
@@ -4198,7 +4335,7 @@ var HostileInputFirewall = class {
|
|
|
4198
4335
|
hasSecretAccess: this.context.hasSecretAccess
|
|
4199
4336
|
}) : void 0;
|
|
4200
4337
|
if (ruleOfTwoViolation !== void 0) {
|
|
4201
|
-
|
|
4338
|
+
logger5.warn("Firewall surfaced a Rule-of-Two violation", {
|
|
4202
4339
|
user: meta.username,
|
|
4203
4340
|
effectiveTrustTier,
|
|
4204
4341
|
rule: ruleOfTwoViolation.rule
|
|
@@ -4814,7 +4951,7 @@ var DEFAULT_BENCHMARK_CONFIG = {
|
|
|
4814
4951
|
|
|
4815
4952
|
// src/benchmarks/benchmark-runner.ts
|
|
4816
4953
|
import { cpus, totalmem, platform, arch } from "os";
|
|
4817
|
-
var
|
|
4954
|
+
var logger6 = createLogger({ component: "benchmark-runner" });
|
|
4818
4955
|
var LatencySampler = class {
|
|
4819
4956
|
samples = [];
|
|
4820
4957
|
startTimes = /* @__PURE__ */ new Map();
|
|
@@ -4910,11 +5047,11 @@ async function runOperationBenchmark(operation, datasetSize, fn, config = {}) {
|
|
|
4910
5047
|
const startTime = getTimeProvider().now();
|
|
4911
5048
|
const startMemory = process.memoryUsage().heapUsed;
|
|
4912
5049
|
let peakMemory = startMemory;
|
|
4913
|
-
|
|
5050
|
+
logger6.debug("Running warmup", { operation, iterations: cfg.warmupIterations });
|
|
4914
5051
|
for (let i = 0; i < cfg.warmupIterations; i++) {
|
|
4915
5052
|
await fn();
|
|
4916
5053
|
}
|
|
4917
|
-
|
|
5054
|
+
logger6.debug("Running measurements", { operation, iterations: cfg.measurementIterations });
|
|
4918
5055
|
for (let i = 0; i < cfg.measurementIterations; i++) {
|
|
4919
5056
|
const id = `op-${String(i)}`;
|
|
4920
5057
|
sampler.start(id);
|
|
@@ -5039,7 +5176,7 @@ ${"=".repeat(60)}`);
|
|
|
5039
5176
|
}
|
|
5040
5177
|
|
|
5041
5178
|
// src/benchmarks/memory-benchmarks.ts
|
|
5042
|
-
var
|
|
5179
|
+
var logger7 = createLogger({ component: "memory-benchmarks" });
|
|
5043
5180
|
var DEFAULT_MEMORY_BENCHMARK_CONFIG = {
|
|
5044
5181
|
...DEFAULT_BENCHMARK_CONFIG,
|
|
5045
5182
|
contentSizeBytes: 1024,
|
|
@@ -5147,9 +5284,9 @@ async function benchmarkPrune(backend, data, config) {
|
|
|
5147
5284
|
async function runMemoryBenchmarks(backend, name, config = {}) {
|
|
5148
5285
|
const cfg = { ...DEFAULT_MEMORY_BENCHMARK_CONFIG, ...config };
|
|
5149
5286
|
const operations = [];
|
|
5150
|
-
|
|
5287
|
+
logger7.info("Starting memory benchmarks", { name, sizes: cfg.datasetSizes });
|
|
5151
5288
|
for (const size of cfg.datasetSizes) {
|
|
5152
|
-
|
|
5289
|
+
logger7.info("Running benchmarks for dataset size", { size });
|
|
5153
5290
|
const data = generateTestData(size, cfg);
|
|
5154
5291
|
try {
|
|
5155
5292
|
const futureDate = new Date(getTimeProvider().now() + 365 * 24 * 60 * 60 * 1e3);
|
|
@@ -5163,7 +5300,7 @@ async function runMemoryBenchmarks(backend, name, config = {}) {
|
|
|
5163
5300
|
}
|
|
5164
5301
|
const environment = getBenchmarkEnvironment();
|
|
5165
5302
|
const summary = createBenchmarkSummary(operations, cfg);
|
|
5166
|
-
|
|
5303
|
+
logger7.info("Benchmarks complete", {
|
|
5167
5304
|
name,
|
|
5168
5305
|
passed: summary.passed,
|
|
5169
5306
|
avgP95: summary.avgP95Latency,
|
|
@@ -5209,7 +5346,7 @@ function compareBenchmarks(baseline, current) {
|
|
|
5209
5346
|
}
|
|
5210
5347
|
|
|
5211
5348
|
// src/benchmarks/token-benchmark.ts
|
|
5212
|
-
var
|
|
5349
|
+
var logger8 = createLogger({ component: "token-benchmark" });
|
|
5213
5350
|
var CHARS_PER_TOKEN2 = 4;
|
|
5214
5351
|
function estimateTokens2(text) {
|
|
5215
5352
|
return Math.ceil(text.length / CHARS_PER_TOKEN2);
|
|
@@ -5227,7 +5364,7 @@ async function runTokenBenchmark(backend, config = {}) {
|
|
|
5227
5364
|
const cfg = { ...DEFAULT_MEMORY_BENCHMARK_CONFIG, ...config };
|
|
5228
5365
|
const results = [];
|
|
5229
5366
|
for (const size of cfg.datasetSizes) {
|
|
5230
|
-
|
|
5367
|
+
logger8.info("Running token benchmark", { size });
|
|
5231
5368
|
const data = generateTestData(size, cfg);
|
|
5232
5369
|
for (const entry of data.entries) {
|
|
5233
5370
|
await backend.store(entry.key, entry.content, {
|
|
@@ -5260,15 +5397,15 @@ async function runTokenBenchmark(backend, config = {}) {
|
|
|
5260
5397
|
}
|
|
5261
5398
|
|
|
5262
5399
|
// src/benchmarks/consolidation-benchmark.ts
|
|
5263
|
-
var
|
|
5400
|
+
var logger9 = createLogger({ component: "consolidation-benchmark" });
|
|
5264
5401
|
async function runConsolidationBenchmark(operations, config = {}) {
|
|
5265
5402
|
const cfg = { ...DEFAULT_MEMORY_BENCHMARK_CONFIG, ...config };
|
|
5266
5403
|
const benchmarks = [];
|
|
5267
|
-
|
|
5404
|
+
logger9.info("Starting consolidation benchmarks", {
|
|
5268
5405
|
operationCount: operations.length
|
|
5269
5406
|
});
|
|
5270
5407
|
for (const op of operations) {
|
|
5271
|
-
|
|
5408
|
+
logger9.info("Benchmarking consolidation operation", { name: op.name });
|
|
5272
5409
|
const benchmark = await runOperationBenchmark(
|
|
5273
5410
|
op.name,
|
|
5274
5411
|
0,
|
|
@@ -5383,7 +5520,7 @@ function formatBenchmarkReport(report) {
|
|
|
5383
5520
|
}
|
|
5384
5521
|
|
|
5385
5522
|
// src/benchmarks/adapter-latency-benchmark.ts
|
|
5386
|
-
var
|
|
5523
|
+
var logger10 = createLogger({ component: "adapter-latency-benchmark" });
|
|
5387
5524
|
var DEFAULT_ADAPTER_LATENCY_CONFIG = {
|
|
5388
5525
|
warmupIterations: 3,
|
|
5389
5526
|
measurementIterations: 10,
|
|
@@ -5433,7 +5570,7 @@ async function benchmarkScenario(adapter, scenario, config) {
|
|
|
5433
5570
|
const errors = [];
|
|
5434
5571
|
let successCount = 0;
|
|
5435
5572
|
let failureCount = 0;
|
|
5436
|
-
|
|
5573
|
+
logger10.info("Benchmarking scenario", {
|
|
5437
5574
|
adapter: adapter.name,
|
|
5438
5575
|
scenario: scenario.name,
|
|
5439
5576
|
warmup: config.warmupIterations,
|
|
@@ -5685,7 +5822,13 @@ var PIPELINE_EVENT_TYPES = [
|
|
|
5685
5822
|
"tool.invoked",
|
|
5686
5823
|
"tool.completed",
|
|
5687
5824
|
"wave.started",
|
|
5688
|
-
"wave.completed"
|
|
5825
|
+
"wave.completed",
|
|
5826
|
+
// Signal events (#3147 P2 — close the loop). Push-only producers (fitness
|
|
5827
|
+
// audit, swarm health, consensus) emit these; the TuneStage consumes them.
|
|
5828
|
+
// Unlike the #3022 learning.* types, these ship WITH their consumer.
|
|
5829
|
+
"signal.fitness_declined",
|
|
5830
|
+
"signal.swarm_unhealthy",
|
|
5831
|
+
"signal.vote_rejected"
|
|
5689
5832
|
];
|
|
5690
5833
|
|
|
5691
5834
|
// src/pipeline/artifact-store.ts
|
|
@@ -5854,10 +5997,10 @@ var GateCheckResultSchema = z16.object({
|
|
|
5854
5997
|
});
|
|
5855
5998
|
|
|
5856
5999
|
// src/pipeline/quality-pipeline.ts
|
|
5857
|
-
var
|
|
6000
|
+
var logger11 = createLogger({ component: "quality-pipeline" });
|
|
5858
6001
|
|
|
5859
6002
|
// src/pipeline/research-trigger.ts
|
|
5860
|
-
var
|
|
6003
|
+
var logger12 = createLogger({ component: "research-trigger" });
|
|
5861
6004
|
var DEFAULT_QUALITY_THRESHOLD = 7;
|
|
5862
6005
|
var DEFAULT_MAX_TRIGGERS = 3;
|
|
5863
6006
|
function parseDiscoveries(text) {
|
|
@@ -5889,7 +6032,7 @@ async function checkForResearchTriggers(config = {}) {
|
|
|
5889
6032
|
`Use research_discover to find recent papers and repos about "${topic}". For each result, include: title, quality score (1-10), and source URL.`
|
|
5890
6033
|
);
|
|
5891
6034
|
if (!result.success) {
|
|
5892
|
-
|
|
6035
|
+
logger12.debug("Research trigger: expert unavailable", { error: result.error });
|
|
5893
6036
|
return [];
|
|
5894
6037
|
}
|
|
5895
6038
|
const discoveries = parseDiscoveries(result.text);
|
|
@@ -5905,7 +6048,7 @@ Assess this research for applicability to nexus-agents.`,
|
|
|
5905
6048
|
status: "pending"
|
|
5906
6049
|
}));
|
|
5907
6050
|
if (tasks.length > 0) {
|
|
5908
|
-
|
|
6051
|
+
logger12.info("Research triggers created", {
|
|
5909
6052
|
total: discoveries.length,
|
|
5910
6053
|
qualified: qualified.length,
|
|
5911
6054
|
triggered: tasks.length
|
|
@@ -5913,13 +6056,13 @@ Assess this research for applicability to nexus-agents.`,
|
|
|
5913
6056
|
}
|
|
5914
6057
|
return tasks;
|
|
5915
6058
|
} catch (error) {
|
|
5916
|
-
|
|
6059
|
+
logger12.debug("Research trigger failed gracefully", { error: String(error) });
|
|
5917
6060
|
return [];
|
|
5918
6061
|
}
|
|
5919
6062
|
}
|
|
5920
6063
|
|
|
5921
6064
|
// src/pipeline/research-pipeline.ts
|
|
5922
|
-
var
|
|
6065
|
+
var logger13 = createLogger({ component: "research-pipeline" });
|
|
5923
6066
|
|
|
5924
6067
|
// src/pipeline/iterative-consensus.ts
|
|
5925
6068
|
var defaultLogger = createLogger({ component: "iterative-consensus" });
|
|
@@ -5988,7 +6131,7 @@ function buildVotingInput(plan, config) {
|
|
|
5988
6131
|
}
|
|
5989
6132
|
async function executeSingleVote(plan, config, log) {
|
|
5990
6133
|
try {
|
|
5991
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
6134
|
+
const { executeVoting } = await import("./consensus-vote-TO5575P3.js");
|
|
5992
6135
|
const input = buildVotingInput(plan, config);
|
|
5993
6136
|
const result = await executeVoting(input, log);
|
|
5994
6137
|
return parseVotingResult(result);
|
|
@@ -6073,7 +6216,7 @@ function formatContent(content) {
|
|
|
6073
6216
|
}
|
|
6074
6217
|
|
|
6075
6218
|
// src/replay/replay-executor.ts
|
|
6076
|
-
var
|
|
6219
|
+
var logger14 = createLogger({ component: "ReplayExecutor" });
|
|
6077
6220
|
export {
|
|
6078
6221
|
ALLOWED_COMMANDS,
|
|
6079
6222
|
ARTIFACT_TYPES,
|
|
@@ -6756,9 +6899,9 @@ export {
|
|
|
6756
6899
|
estimateTokens2 as estimateBenchmarkTokens,
|
|
6757
6900
|
estimateTaskComplexity,
|
|
6758
6901
|
estimateTokens,
|
|
6759
|
-
|
|
6902
|
+
evaluatePipelinePolicy,
|
|
6760
6903
|
evaluatePolicy,
|
|
6761
|
-
|
|
6904
|
+
evaluatePolicy2 as evaluateSecurityPolicy,
|
|
6762
6905
|
executeCliRetryLoop,
|
|
6763
6906
|
executeDelegatePipeline,
|
|
6764
6907
|
executeExpert,
|