nexus-agents 2.92.5 → 2.93.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.
Files changed (119) hide show
  1. package/dist/{child-mcp-config-PIDVHWJ7.js → child-mcp-config-WNISXFYD.js} +2 -2
  2. package/dist/{chunk-SIICMKBA.js → chunk-2IBJC2EP.js} +2 -2
  3. package/dist/chunk-2IBJC2EP.js.map +1 -0
  4. package/dist/{chunk-WXEMTPML.js → chunk-2T4NV6QT.js} +2 -2
  5. package/dist/{chunk-PIDABDFE.js → chunk-4A4WPM75.js} +10 -126
  6. package/dist/chunk-4A4WPM75.js.map +1 -0
  7. package/dist/{chunk-U4RLBLNO.js → chunk-57OH2O2U.js} +2 -2
  8. package/dist/{chunk-3XC5LFWH.js → chunk-5BTRDVWC.js} +5 -5
  9. package/dist/{chunk-QQMYKFG7.js → chunk-AZP66FIA.js} +3 -3
  10. package/dist/{chunk-DNSBKQ7I.js → chunk-BHA6V7GK.js} +4 -4
  11. package/dist/{chunk-TOQJ3UN5.js → chunk-BNHBZRU7.js} +3 -3
  12. package/dist/{chunk-YQAS2EGR.js → chunk-CPH6LKXO.js} +2 -2
  13. package/dist/{chunk-VBIAMMZZ.js → chunk-DTFMYM3V.js} +2 -2
  14. package/dist/{chunk-QADQ4LN4.js → chunk-E3QWWP67.js} +2 -2
  15. package/dist/{chunk-FL3AXIUL.js → chunk-FTCU55O6.js} +4 -4
  16. package/dist/{chunk-BG4WK4UP.js → chunk-G5IDRWWI.js} +15 -6
  17. package/dist/chunk-G5IDRWWI.js.map +1 -0
  18. package/dist/{chunk-L5BXCSMP.js → chunk-HKISF2E7.js} +183 -10
  19. package/dist/chunk-HKISF2E7.js.map +1 -0
  20. package/dist/{chunk-KTJUMU2A.js → chunk-IJ2AZZVH.js} +66 -48
  21. package/dist/chunk-IJ2AZZVH.js.map +1 -0
  22. package/dist/{chunk-OXLXVSN3.js → chunk-JCETWDU7.js} +2 -2
  23. package/dist/{chunk-DSERRMPX.js → chunk-JEBWSHSU.js} +2 -2
  24. package/dist/{chunk-VU54VB6K.js → chunk-K7VGX37L.js} +3 -3
  25. package/dist/{chunk-NYWZI46K.js → chunk-LJMO5P6O.js} +38 -128
  26. package/dist/chunk-LJMO5P6O.js.map +1 -0
  27. package/dist/chunk-NESW2TTD.js +134 -0
  28. package/dist/chunk-NESW2TTD.js.map +1 -0
  29. package/dist/{chunk-MBK6P4VV.js → chunk-RTUZSR4R.js} +2 -2
  30. package/dist/{chunk-QXGLZETS.js → chunk-SHSKW5ML.js} +7 -7
  31. package/dist/{chunk-YJUHVQSG.js → chunk-SMGH2B3A.js} +2 -2
  32. package/dist/{chunk-ZYYU26YH.js → chunk-SORBJPRA.js} +2 -2
  33. package/dist/{chunk-EI2E43HI.js → chunk-T73G67GT.js} +3 -3
  34. package/dist/{chunk-2QJJYCPD.js → chunk-ULBKFMVO.js} +2 -2
  35. package/dist/{chunk-3TU3RJNK.js → chunk-VSG6RSE6.js} +3 -3
  36. package/dist/{chunk-DQEREDUW.js → chunk-WU3SUA35.js} +2 -2
  37. package/dist/{chunk-G55LVPNH.js → chunk-XVY3I7JT.js} +7 -7
  38. package/dist/{chunk-P646QQYW.js → chunk-ZOAU7RE4.js} +6 -4
  39. package/dist/chunk-ZOAU7RE4.js.map +1 -0
  40. package/dist/{chunk-GKFFRRS4.js → chunk-ZYHHDPFW.js} +4 -4
  41. package/dist/{cli-circuit-breaker-HFSOBCPK.js → cli-circuit-breaker-6E4E2IU7.js} +4 -4
  42. package/dist/cli.js +109 -38
  43. package/dist/cli.js.map +1 -1
  44. package/dist/{composite-router-T2XYCQOU.js → composite-router-MQOPXLVV.js} +2 -2
  45. package/dist/{consensus-vote-IDHQVKX2.js → consensus-vote-ZRADOLXH.js} +13 -12
  46. package/dist/{context-retriever-5BJYPAX7.js → context-retriever-TZGIETJO.js} +6 -6
  47. package/dist/{doctor-deep-OVGRBG3Z.js → doctor-deep-OU2WC55V.js} +3 -3
  48. package/dist/{expert-bridge-JPTHFWPW.js → expert-bridge-WP5ZWXFY.js} +4 -4
  49. package/dist/{factory-NE7SNW7V.js → factory-2TN2VZTR.js} +5 -5
  50. package/dist/{factory-734UWF4C.js → factory-RJTRVII5.js} +5 -5
  51. package/dist/index.d.ts +52 -9
  52. package/dist/index.js +199 -55
  53. package/dist/index.js.map +1 -1
  54. package/dist/{init-opencode-2ZBDJILW.js → init-opencode-AYMNMWU7.js} +5 -5
  55. package/dist/{issue-triage-AGGTH767.js → issue-triage-QIVZN3PJ.js} +5 -5
  56. package/dist/{pr-reviewer-helpers-WGPLUXPU.js → pr-reviewer-helpers-P24OBKVM.js} +4 -4
  57. package/dist/{registry-command-CZZM5SF2.js → registry-command-KWWOKJ5C.js} +2 -2
  58. package/dist/{repo-security-plan-X42KXHT2.js → repo-security-plan-KZNEXDCI.js} +3 -3
  59. package/dist/{research-helpers-synthesize-C7YGRQI6.js → research-helpers-synthesize-DH5PPX7A.js} +4 -3
  60. package/dist/{routing-memory-2FYZDQUC.js → routing-memory-AGHJQTRH.js} +2 -2
  61. package/dist/{session-memory-53NZRZB6.js → session-memory-O24IVZAW.js} +3 -3
  62. package/dist/{setup-command-ZV6VZLP4.js → setup-command-NBXZ4NGV.js} +12 -11
  63. package/dist/{setup-config-CYRK4UFF.js → setup-config-Y4JA5QWO.js} +3 -3
  64. package/dist/{setup-custom-api-GXHPYLDR.js → setup-custom-api-UNX4OJEX.js} +5 -4
  65. package/dist/{setup-custom-api-GXHPYLDR.js.map → setup-custom-api-UNX4OJEX.js.map} +1 -1
  66. package/dist/{tool-memory-AX5G67J6.js → tool-memory-UEQNXIGC.js} +5 -5
  67. package/dist/{weather-report-AUMNGHYZ.js → weather-report-S5YXRY7G.js} +2 -2
  68. package/package.json +1 -1
  69. package/dist/chunk-BG4WK4UP.js.map +0 -1
  70. package/dist/chunk-KTJUMU2A.js.map +0 -1
  71. package/dist/chunk-L5BXCSMP.js.map +0 -1
  72. package/dist/chunk-NYWZI46K.js.map +0 -1
  73. package/dist/chunk-P646QQYW.js.map +0 -1
  74. package/dist/chunk-PIDABDFE.js.map +0 -1
  75. package/dist/chunk-SIICMKBA.js.map +0 -1
  76. /package/dist/{child-mcp-config-PIDVHWJ7.js.map → child-mcp-config-WNISXFYD.js.map} +0 -0
  77. /package/dist/{chunk-WXEMTPML.js.map → chunk-2T4NV6QT.js.map} +0 -0
  78. /package/dist/{chunk-U4RLBLNO.js.map → chunk-57OH2O2U.js.map} +0 -0
  79. /package/dist/{chunk-3XC5LFWH.js.map → chunk-5BTRDVWC.js.map} +0 -0
  80. /package/dist/{chunk-QQMYKFG7.js.map → chunk-AZP66FIA.js.map} +0 -0
  81. /package/dist/{chunk-DNSBKQ7I.js.map → chunk-BHA6V7GK.js.map} +0 -0
  82. /package/dist/{chunk-TOQJ3UN5.js.map → chunk-BNHBZRU7.js.map} +0 -0
  83. /package/dist/{chunk-YQAS2EGR.js.map → chunk-CPH6LKXO.js.map} +0 -0
  84. /package/dist/{chunk-VBIAMMZZ.js.map → chunk-DTFMYM3V.js.map} +0 -0
  85. /package/dist/{chunk-QADQ4LN4.js.map → chunk-E3QWWP67.js.map} +0 -0
  86. /package/dist/{chunk-FL3AXIUL.js.map → chunk-FTCU55O6.js.map} +0 -0
  87. /package/dist/{chunk-OXLXVSN3.js.map → chunk-JCETWDU7.js.map} +0 -0
  88. /package/dist/{chunk-DSERRMPX.js.map → chunk-JEBWSHSU.js.map} +0 -0
  89. /package/dist/{chunk-VU54VB6K.js.map → chunk-K7VGX37L.js.map} +0 -0
  90. /package/dist/{chunk-MBK6P4VV.js.map → chunk-RTUZSR4R.js.map} +0 -0
  91. /package/dist/{chunk-QXGLZETS.js.map → chunk-SHSKW5ML.js.map} +0 -0
  92. /package/dist/{chunk-YJUHVQSG.js.map → chunk-SMGH2B3A.js.map} +0 -0
  93. /package/dist/{chunk-ZYYU26YH.js.map → chunk-SORBJPRA.js.map} +0 -0
  94. /package/dist/{chunk-EI2E43HI.js.map → chunk-T73G67GT.js.map} +0 -0
  95. /package/dist/{chunk-2QJJYCPD.js.map → chunk-ULBKFMVO.js.map} +0 -0
  96. /package/dist/{chunk-3TU3RJNK.js.map → chunk-VSG6RSE6.js.map} +0 -0
  97. /package/dist/{chunk-DQEREDUW.js.map → chunk-WU3SUA35.js.map} +0 -0
  98. /package/dist/{chunk-G55LVPNH.js.map → chunk-XVY3I7JT.js.map} +0 -0
  99. /package/dist/{chunk-GKFFRRS4.js.map → chunk-ZYHHDPFW.js.map} +0 -0
  100. /package/dist/{cli-circuit-breaker-HFSOBCPK.js.map → cli-circuit-breaker-6E4E2IU7.js.map} +0 -0
  101. /package/dist/{composite-router-T2XYCQOU.js.map → composite-router-MQOPXLVV.js.map} +0 -0
  102. /package/dist/{consensus-vote-IDHQVKX2.js.map → consensus-vote-ZRADOLXH.js.map} +0 -0
  103. /package/dist/{context-retriever-5BJYPAX7.js.map → context-retriever-TZGIETJO.js.map} +0 -0
  104. /package/dist/{doctor-deep-OVGRBG3Z.js.map → doctor-deep-OU2WC55V.js.map} +0 -0
  105. /package/dist/{expert-bridge-JPTHFWPW.js.map → expert-bridge-WP5ZWXFY.js.map} +0 -0
  106. /package/dist/{factory-734UWF4C.js.map → factory-2TN2VZTR.js.map} +0 -0
  107. /package/dist/{factory-NE7SNW7V.js.map → factory-RJTRVII5.js.map} +0 -0
  108. /package/dist/{init-opencode-2ZBDJILW.js.map → init-opencode-AYMNMWU7.js.map} +0 -0
  109. /package/dist/{issue-triage-AGGTH767.js.map → issue-triage-QIVZN3PJ.js.map} +0 -0
  110. /package/dist/{pr-reviewer-helpers-WGPLUXPU.js.map → pr-reviewer-helpers-P24OBKVM.js.map} +0 -0
  111. /package/dist/{registry-command-CZZM5SF2.js.map → registry-command-KWWOKJ5C.js.map} +0 -0
  112. /package/dist/{repo-security-plan-X42KXHT2.js.map → repo-security-plan-KZNEXDCI.js.map} +0 -0
  113. /package/dist/{research-helpers-synthesize-C7YGRQI6.js.map → research-helpers-synthesize-DH5PPX7A.js.map} +0 -0
  114. /package/dist/{routing-memory-2FYZDQUC.js.map → routing-memory-AGHJQTRH.js.map} +0 -0
  115. /package/dist/{session-memory-53NZRZB6.js.map → session-memory-O24IVZAW.js.map} +0 -0
  116. /package/dist/{setup-command-ZV6VZLP4.js.map → setup-command-NBXZ4NGV.js.map} +0 -0
  117. /package/dist/{setup-config-CYRK4UFF.js.map → setup-config-Y4JA5QWO.js.map} +0 -0
  118. /package/dist/{tool-memory-AX5G67J6.js.map → tool-memory-UEQNXIGC.js.map} +0 -0
  119. /package/dist/{weather-report-AUMNGHYZ.js.map → weather-report-S5YXRY7G.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-GKFFRRS4.js";
4
+ } from "./chunk-ZYHHDPFW.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
- evaluatePolicy as evaluatePolicy2,
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-KTJUMU2A.js";
512
+ } from "./chunk-IJ2AZZVH.js";
513
513
  import {
514
514
  getTokenEnvVars,
515
515
  hasToken,
516
516
  resolveToken
517
- } from "./chunk-DQEREDUW.js";
517
+ } from "./chunk-WU3SUA35.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-TOQJ3UN5.js";
524
+ } from "./chunk-BNHBZRU7.js";
525
525
  import {
526
526
  CliCircuitBreakerIntegration,
527
527
  createCliCircuitBreakerIntegration
528
- } from "./chunk-EI2E43HI.js";
528
+ } from "./chunk-T73G67GT.js";
529
529
  import {
530
530
  executeExpert
531
- } from "./chunk-G55LVPNH.js";
531
+ } from "./chunk-XVY3I7JT.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-NYWZI46K.js";
625
+ } from "./chunk-LJMO5P6O.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-DSERRMPX.js";
649
+ } from "./chunk-JEBWSHSU.js";
650
650
  import {
651
651
  PROVIDER_ENV_KEYS
652
- } from "./chunk-SIICMKBA.js";
653
- import "./chunk-P646QQYW.js";
652
+ } from "./chunk-2IBJC2EP.js";
653
+ import "./chunk-ZOAU7RE4.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 evaluatePolicy3,
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-BG4WK4UP.js";
685
+ } from "./chunk-G5IDRWWI.js";
686
686
  import {
687
687
  GitHubProvider,
688
688
  ScmError
689
- } from "./chunk-YQAS2EGR.js";
689
+ } from "./chunk-CPH6LKXO.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-VBIAMMZZ.js";
704
+ } from "./chunk-DTFMYM3V.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-2QJJYCPD.js";
712
+ } from "./chunk-ULBKFMVO.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-VU54VB6K.js";
722
+ } from "./chunk-K7VGX37L.js";
723
723
  import {
724
724
  MemoryError
725
- } from "./chunk-FL3AXIUL.js";
725
+ } from "./chunk-FTCU55O6.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-QXGLZETS.js";
744
+ } from "./chunk-SHSKW5ML.js";
745
745
  import {
746
746
  AvailabilityCache,
747
747
  filterAvailableModels,
@@ -750,16 +750,17 @@ import {
750
750
  getFallbackChain,
751
751
  resetAvailabilityCache,
752
752
  resolveFallback
753
- } from "./chunk-YJUHVQSG.js";
753
+ } from "./chunk-SMGH2B3A.js";
754
754
  import {
755
755
  AvailableModelsCache,
756
756
  getDefaultAvailableModelsCache,
757
757
  setDefaultAvailableModelsCache
758
- } from "./chunk-U4RLBLNO.js";
758
+ } from "./chunk-57OH2O2U.js";
759
759
  import {
760
760
  DEFAULTS
761
- } from "./chunk-PIDABDFE.js";
761
+ } from "./chunk-4A4WPM75.js";
762
762
  import "./chunk-NUBSJGQZ.js";
763
+ import "./chunk-NESW2TTD.js";
763
764
  import "./chunk-6T3EPABN.js";
764
765
  import {
765
766
  BaseCliAdapter,
@@ -789,9 +790,9 @@ import {
789
790
  isCliAvailable,
790
791
  isRetryableError,
791
792
  sleep
792
- } from "./chunk-DNSBKQ7I.js";
793
- import "./chunk-MBK6P4VV.js";
794
- import "./chunk-ZYYU26YH.js";
793
+ } from "./chunk-BHA6V7GK.js";
794
+ import "./chunk-RTUZSR4R.js";
795
+ import "./chunk-SORBJPRA.js";
795
796
  import {
796
797
  BUILT_IN_EXPERTS,
797
798
  BuiltInExpertTypeSchema,
@@ -802,7 +803,7 @@ import {
802
803
  validateExpertConfig
803
804
  } from "./chunk-ZM4O442V.js";
804
805
  import "./chunk-PQHVC4BD.js";
805
- import "./chunk-OXLXVSN3.js";
806
+ import "./chunk-JCETWDU7.js";
806
807
  import {
807
808
  AgentCapability,
808
809
  AgentError,
@@ -877,7 +878,7 @@ import {
877
878
  toError,
878
879
  unwrap,
879
880
  unwrapOr
880
- } from "./chunk-L5BXCSMP.js";
881
+ } from "./chunk-HKISF2E7.js";
881
882
  import "./chunk-CH7QIDHQ.js";
882
883
  import "./chunk-PR4QN5HX.js";
883
884
 
@@ -4054,6 +4055,141 @@ function getSafetyTaxonomySummary() {
4054
4055
  };
4055
4056
  }
4056
4057
 
4058
+ // src/security/audit-bridge.ts
4059
+ var logger4 = createLogger({ component: "SecurityAuditBridge" });
4060
+ function systemActor(id, name) {
4061
+ return name !== void 0 ? { type: "system", id, name } : { type: "system", id };
4062
+ }
4063
+ function userActor(username) {
4064
+ return { type: "user", id: username };
4065
+ }
4066
+ function mapTrust(e) {
4067
+ const severity = e.wasDowngraded ? "warning" : "info";
4068
+ return {
4069
+ category: "authorization",
4070
+ severity,
4071
+ outcome: "success",
4072
+ action: "security.trust_classification",
4073
+ actor: userActor(e.username),
4074
+ description: e.reason,
4075
+ metadata: {
4076
+ assignedTier: e.assignedTier,
4077
+ userRole: e.userRole,
4078
+ isAllowlisted: e.isAllowlisted,
4079
+ wasDowngraded: e.wasDowngraded,
4080
+ component: e.component
4081
+ }
4082
+ };
4083
+ }
4084
+ function mapPolicyGate(e) {
4085
+ const outcome = e.allowed ? "success" : "denied";
4086
+ return {
4087
+ category: "authorization",
4088
+ severity: e.allowed ? "info" : "warning",
4089
+ outcome,
4090
+ action: "security.policy_gate",
4091
+ actor: systemActor(e.component),
4092
+ policyName: "security.policy_gate",
4093
+ policyDecision: e.allowed ? "allow" : "deny",
4094
+ ...e.violationRules.length > 0 ? { violationType: e.violationRules.join(",") } : {},
4095
+ metadata: {
4096
+ actionType: e.actionType,
4097
+ requiresApproval: e.requiresApproval,
4098
+ inputTrustTier: e.inputTrustTier,
4099
+ violationRules: e.violationRules
4100
+ }
4101
+ };
4102
+ }
4103
+ function mapCorroboration(e) {
4104
+ return {
4105
+ category: "security",
4106
+ severity: e.satisfied ? "info" : "warning",
4107
+ outcome: e.satisfied ? "success" : "denied",
4108
+ action: "security.corroboration",
4109
+ actor: systemActor(e.component),
4110
+ metadata: {
4111
+ actionType: e.actionType,
4112
+ sourceCount: e.sourceCount,
4113
+ missingRequirements: e.missingRequirements
4114
+ }
4115
+ };
4116
+ }
4117
+ function mapReputation(e) {
4118
+ return {
4119
+ category: "security",
4120
+ severity: e.isSuspicious ? "warning" : "info",
4121
+ outcome: "success",
4122
+ action: "security.reputation",
4123
+ actor: userActor(e.username),
4124
+ metadata: {
4125
+ reputationScore: e.reputationScore,
4126
+ isSuspicious: e.isSuspicious,
4127
+ effectiveTier: e.effectiveTier,
4128
+ signalCount: e.signalCount,
4129
+ component: e.component
4130
+ }
4131
+ };
4132
+ }
4133
+ function mapSanitization(e) {
4134
+ return {
4135
+ category: "security",
4136
+ severity: e.injectionFlagCount > 0 ? "warning" : "info",
4137
+ outcome: "success",
4138
+ action: "security.sanitization",
4139
+ actor: systemActor(e.component, e.source),
4140
+ metadata: {
4141
+ source: e.source,
4142
+ wasModified: e.wasModified,
4143
+ strippedCount: e.strippedCount,
4144
+ injectionFlagCount: e.injectionFlagCount,
4145
+ strippedElements: e.strippedElements
4146
+ }
4147
+ };
4148
+ }
4149
+ function mapGraphExecution(e) {
4150
+ return {
4151
+ category: "system",
4152
+ severity: "info",
4153
+ outcome: "success",
4154
+ action: "security.graph_execution",
4155
+ actor: systemActor(e.component),
4156
+ description: e.detail,
4157
+ metadata: {
4158
+ graphEvent: e.graphEvent,
4159
+ ...e.nodeId !== void 0 ? { nodeId: e.nodeId } : {},
4160
+ stepNumber: e.stepNumber
4161
+ }
4162
+ };
4163
+ }
4164
+ function securityAuditEventToInput(event) {
4165
+ switch (event.type) {
4166
+ case "trust_classification":
4167
+ return mapTrust(event);
4168
+ case "policy_gate":
4169
+ return mapPolicyGate(event);
4170
+ case "corroboration":
4171
+ return mapCorroboration(event);
4172
+ case "reputation":
4173
+ return mapReputation(event);
4174
+ case "sanitization":
4175
+ return mapSanitization(event);
4176
+ case "graph_execution":
4177
+ return mapGraphExecution(event);
4178
+ }
4179
+ }
4180
+ function createDurableAuditSink(auditLogger) {
4181
+ return (event) => {
4182
+ try {
4183
+ auditLogger.log(securityAuditEventToInput(event));
4184
+ } catch (error) {
4185
+ logger4.warn("Failed to mirror security event to durable audit log", {
4186
+ type: event.type,
4187
+ error: getErrorMessage(error)
4188
+ });
4189
+ }
4190
+ };
4191
+ }
4192
+
4057
4193
  // src/security/firewall/firewall-types.ts
4058
4194
  import { z as z6 } from "zod";
4059
4195
  var FirewallStagesSchema = z6.object({
@@ -4153,7 +4289,7 @@ function decodeATLValue(value) {
4153
4289
  }
4154
4290
 
4155
4291
  // src/security/firewall/firewall-pipeline.ts
4156
- var logger4 = createLogger({ component: "HostileInputFirewall" });
4292
+ var logger5 = createLogger({ component: "HostileInputFirewall" });
4157
4293
  var HostileInputFirewall = class {
4158
4294
  stages;
4159
4295
  allowlisted;
@@ -4174,7 +4310,9 @@ var HostileInputFirewall = class {
4174
4310
  this.maxInputLength = validated.maxInputLength;
4175
4311
  this.adapter = config.adapter;
4176
4312
  this.reputationCache = new ReputationCache();
4177
- this.auditTrail = createAuditTrail();
4313
+ this.auditTrail = createAuditTrail(
4314
+ config.auditLogger !== void 0 ? createDurableAuditSink(config.auditLogger) : void 0
4315
+ );
4178
4316
  this.context = validated.context;
4179
4317
  }
4180
4318
  /**
@@ -4198,7 +4336,7 @@ var HostileInputFirewall = class {
4198
4336
  hasSecretAccess: this.context.hasSecretAccess
4199
4337
  }) : void 0;
4200
4338
  if (ruleOfTwoViolation !== void 0) {
4201
- logger4.warn("Firewall surfaced a Rule-of-Two violation", {
4339
+ logger5.warn("Firewall surfaced a Rule-of-Two violation", {
4202
4340
  user: meta.username,
4203
4341
  effectiveTrustTier,
4204
4342
  rule: ruleOfTwoViolation.rule
@@ -4814,7 +4952,7 @@ var DEFAULT_BENCHMARK_CONFIG = {
4814
4952
 
4815
4953
  // src/benchmarks/benchmark-runner.ts
4816
4954
  import { cpus, totalmem, platform, arch } from "os";
4817
- var logger5 = createLogger({ component: "benchmark-runner" });
4955
+ var logger6 = createLogger({ component: "benchmark-runner" });
4818
4956
  var LatencySampler = class {
4819
4957
  samples = [];
4820
4958
  startTimes = /* @__PURE__ */ new Map();
@@ -4910,11 +5048,11 @@ async function runOperationBenchmark(operation, datasetSize, fn, config = {}) {
4910
5048
  const startTime = getTimeProvider().now();
4911
5049
  const startMemory = process.memoryUsage().heapUsed;
4912
5050
  let peakMemory = startMemory;
4913
- logger5.debug("Running warmup", { operation, iterations: cfg.warmupIterations });
5051
+ logger6.debug("Running warmup", { operation, iterations: cfg.warmupIterations });
4914
5052
  for (let i = 0; i < cfg.warmupIterations; i++) {
4915
5053
  await fn();
4916
5054
  }
4917
- logger5.debug("Running measurements", { operation, iterations: cfg.measurementIterations });
5055
+ logger6.debug("Running measurements", { operation, iterations: cfg.measurementIterations });
4918
5056
  for (let i = 0; i < cfg.measurementIterations; i++) {
4919
5057
  const id = `op-${String(i)}`;
4920
5058
  sampler.start(id);
@@ -5039,7 +5177,7 @@ ${"=".repeat(60)}`);
5039
5177
  }
5040
5178
 
5041
5179
  // src/benchmarks/memory-benchmarks.ts
5042
- var logger6 = createLogger({ component: "memory-benchmarks" });
5180
+ var logger7 = createLogger({ component: "memory-benchmarks" });
5043
5181
  var DEFAULT_MEMORY_BENCHMARK_CONFIG = {
5044
5182
  ...DEFAULT_BENCHMARK_CONFIG,
5045
5183
  contentSizeBytes: 1024,
@@ -5147,9 +5285,9 @@ async function benchmarkPrune(backend, data, config) {
5147
5285
  async function runMemoryBenchmarks(backend, name, config = {}) {
5148
5286
  const cfg = { ...DEFAULT_MEMORY_BENCHMARK_CONFIG, ...config };
5149
5287
  const operations = [];
5150
- logger6.info("Starting memory benchmarks", { name, sizes: cfg.datasetSizes });
5288
+ logger7.info("Starting memory benchmarks", { name, sizes: cfg.datasetSizes });
5151
5289
  for (const size of cfg.datasetSizes) {
5152
- logger6.info("Running benchmarks for dataset size", { size });
5290
+ logger7.info("Running benchmarks for dataset size", { size });
5153
5291
  const data = generateTestData(size, cfg);
5154
5292
  try {
5155
5293
  const futureDate = new Date(getTimeProvider().now() + 365 * 24 * 60 * 60 * 1e3);
@@ -5163,7 +5301,7 @@ async function runMemoryBenchmarks(backend, name, config = {}) {
5163
5301
  }
5164
5302
  const environment = getBenchmarkEnvironment();
5165
5303
  const summary = createBenchmarkSummary(operations, cfg);
5166
- logger6.info("Benchmarks complete", {
5304
+ logger7.info("Benchmarks complete", {
5167
5305
  name,
5168
5306
  passed: summary.passed,
5169
5307
  avgP95: summary.avgP95Latency,
@@ -5209,7 +5347,7 @@ function compareBenchmarks(baseline, current) {
5209
5347
  }
5210
5348
 
5211
5349
  // src/benchmarks/token-benchmark.ts
5212
- var logger7 = createLogger({ component: "token-benchmark" });
5350
+ var logger8 = createLogger({ component: "token-benchmark" });
5213
5351
  var CHARS_PER_TOKEN2 = 4;
5214
5352
  function estimateTokens2(text) {
5215
5353
  return Math.ceil(text.length / CHARS_PER_TOKEN2);
@@ -5227,7 +5365,7 @@ async function runTokenBenchmark(backend, config = {}) {
5227
5365
  const cfg = { ...DEFAULT_MEMORY_BENCHMARK_CONFIG, ...config };
5228
5366
  const results = [];
5229
5367
  for (const size of cfg.datasetSizes) {
5230
- logger7.info("Running token benchmark", { size });
5368
+ logger8.info("Running token benchmark", { size });
5231
5369
  const data = generateTestData(size, cfg);
5232
5370
  for (const entry of data.entries) {
5233
5371
  await backend.store(entry.key, entry.content, {
@@ -5260,15 +5398,15 @@ async function runTokenBenchmark(backend, config = {}) {
5260
5398
  }
5261
5399
 
5262
5400
  // src/benchmarks/consolidation-benchmark.ts
5263
- var logger8 = createLogger({ component: "consolidation-benchmark" });
5401
+ var logger9 = createLogger({ component: "consolidation-benchmark" });
5264
5402
  async function runConsolidationBenchmark(operations, config = {}) {
5265
5403
  const cfg = { ...DEFAULT_MEMORY_BENCHMARK_CONFIG, ...config };
5266
5404
  const benchmarks = [];
5267
- logger8.info("Starting consolidation benchmarks", {
5405
+ logger9.info("Starting consolidation benchmarks", {
5268
5406
  operationCount: operations.length
5269
5407
  });
5270
5408
  for (const op of operations) {
5271
- logger8.info("Benchmarking consolidation operation", { name: op.name });
5409
+ logger9.info("Benchmarking consolidation operation", { name: op.name });
5272
5410
  const benchmark = await runOperationBenchmark(
5273
5411
  op.name,
5274
5412
  0,
@@ -5383,7 +5521,7 @@ function formatBenchmarkReport(report) {
5383
5521
  }
5384
5522
 
5385
5523
  // src/benchmarks/adapter-latency-benchmark.ts
5386
- var logger9 = createLogger({ component: "adapter-latency-benchmark" });
5524
+ var logger10 = createLogger({ component: "adapter-latency-benchmark" });
5387
5525
  var DEFAULT_ADAPTER_LATENCY_CONFIG = {
5388
5526
  warmupIterations: 3,
5389
5527
  measurementIterations: 10,
@@ -5433,7 +5571,7 @@ async function benchmarkScenario(adapter, scenario, config) {
5433
5571
  const errors = [];
5434
5572
  let successCount = 0;
5435
5573
  let failureCount = 0;
5436
- logger9.info("Benchmarking scenario", {
5574
+ logger10.info("Benchmarking scenario", {
5437
5575
  adapter: adapter.name,
5438
5576
  scenario: scenario.name,
5439
5577
  warmup: config.warmupIterations,
@@ -5685,7 +5823,13 @@ var PIPELINE_EVENT_TYPES = [
5685
5823
  "tool.invoked",
5686
5824
  "tool.completed",
5687
5825
  "wave.started",
5688
- "wave.completed"
5826
+ "wave.completed",
5827
+ // Signal events (#3147 P2 — close the loop). Push-only producers (fitness
5828
+ // audit, swarm health, consensus) emit these; the TuneStage consumes them.
5829
+ // Unlike the #3022 learning.* types, these ship WITH their consumer.
5830
+ "signal.fitness_declined",
5831
+ "signal.swarm_unhealthy",
5832
+ "signal.vote_rejected"
5689
5833
  ];
5690
5834
 
5691
5835
  // src/pipeline/artifact-store.ts
@@ -5854,10 +5998,10 @@ var GateCheckResultSchema = z16.object({
5854
5998
  });
5855
5999
 
5856
6000
  // src/pipeline/quality-pipeline.ts
5857
- var logger10 = createLogger({ component: "quality-pipeline" });
6001
+ var logger11 = createLogger({ component: "quality-pipeline" });
5858
6002
 
5859
6003
  // src/pipeline/research-trigger.ts
5860
- var logger11 = createLogger({ component: "research-trigger" });
6004
+ var logger12 = createLogger({ component: "research-trigger" });
5861
6005
  var DEFAULT_QUALITY_THRESHOLD = 7;
5862
6006
  var DEFAULT_MAX_TRIGGERS = 3;
5863
6007
  function parseDiscoveries(text) {
@@ -5889,7 +6033,7 @@ async function checkForResearchTriggers(config = {}) {
5889
6033
  `Use research_discover to find recent papers and repos about "${topic}". For each result, include: title, quality score (1-10), and source URL.`
5890
6034
  );
5891
6035
  if (!result.success) {
5892
- logger11.debug("Research trigger: expert unavailable", { error: result.error });
6036
+ logger12.debug("Research trigger: expert unavailable", { error: result.error });
5893
6037
  return [];
5894
6038
  }
5895
6039
  const discoveries = parseDiscoveries(result.text);
@@ -5905,7 +6049,7 @@ Assess this research for applicability to nexus-agents.`,
5905
6049
  status: "pending"
5906
6050
  }));
5907
6051
  if (tasks.length > 0) {
5908
- logger11.info("Research triggers created", {
6052
+ logger12.info("Research triggers created", {
5909
6053
  total: discoveries.length,
5910
6054
  qualified: qualified.length,
5911
6055
  triggered: tasks.length
@@ -5913,13 +6057,13 @@ Assess this research for applicability to nexus-agents.`,
5913
6057
  }
5914
6058
  return tasks;
5915
6059
  } catch (error) {
5916
- logger11.debug("Research trigger failed gracefully", { error: String(error) });
6060
+ logger12.debug("Research trigger failed gracefully", { error: String(error) });
5917
6061
  return [];
5918
6062
  }
5919
6063
  }
5920
6064
 
5921
6065
  // src/pipeline/research-pipeline.ts
5922
- var logger12 = createLogger({ component: "research-pipeline" });
6066
+ var logger13 = createLogger({ component: "research-pipeline" });
5923
6067
 
5924
6068
  // src/pipeline/iterative-consensus.ts
5925
6069
  var defaultLogger = createLogger({ component: "iterative-consensus" });
@@ -5988,7 +6132,7 @@ function buildVotingInput(plan, config) {
5988
6132
  }
5989
6133
  async function executeSingleVote(plan, config, log) {
5990
6134
  try {
5991
- const { executeVoting } = await import("./consensus-vote-IDHQVKX2.js");
6135
+ const { executeVoting } = await import("./consensus-vote-ZRADOLXH.js");
5992
6136
  const input = buildVotingInput(plan, config);
5993
6137
  const result = await executeVoting(input, log);
5994
6138
  return parseVotingResult(result);
@@ -6073,7 +6217,7 @@ function formatContent(content) {
6073
6217
  }
6074
6218
 
6075
6219
  // src/replay/replay-executor.ts
6076
- var logger13 = createLogger({ component: "ReplayExecutor" });
6220
+ var logger14 = createLogger({ component: "ReplayExecutor" });
6077
6221
  export {
6078
6222
  ALLOWED_COMMANDS,
6079
6223
  ARTIFACT_TYPES,
@@ -6756,9 +6900,9 @@ export {
6756
6900
  estimateTokens2 as estimateBenchmarkTokens,
6757
6901
  estimateTaskComplexity,
6758
6902
  estimateTokens,
6759
- evaluatePolicy2 as evaluatePipelinePolicy,
6903
+ evaluatePipelinePolicy,
6760
6904
  evaluatePolicy,
6761
- evaluatePolicy3 as evaluateSecurityPolicy,
6905
+ evaluatePolicy2 as evaluateSecurityPolicy,
6762
6906
  executeCliRetryLoop,
6763
6907
  executeDelegatePipeline,
6764
6908
  executeExpert,