nexus-agents 8.8.2 → 8.9.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.
Files changed (137) hide show
  1. package/dist/{ast-rule-runner-WANOR3MX.js → ast-rule-runner-BEUFFQWL.js} +3 -3
  2. package/dist/{child-mcp-config-N4HLLCEH.js → child-mcp-config-QFPSL7Y2.js} +2 -2
  3. package/dist/{chunk-VADACTVB.js → chunk-2RZWKIDU.js} +2 -2
  4. package/dist/{chunk-QCSXKQTK.js → chunk-36BA6D6J.js} +2 -2
  5. package/dist/{chunk-BYUVLVN7.js → chunk-3W4L63ML.js} +1 -1
  6. package/dist/chunk-3W4L63ML.js.map +1 -0
  7. package/dist/{chunk-3YKFLM2B.js → chunk-46YGVSBD.js} +2 -2
  8. package/dist/chunk-46YGVSBD.js.map +1 -0
  9. package/dist/{chunk-7J7UYJXC.js → chunk-4GSFZS6M.js} +7 -7
  10. package/dist/{chunk-ERL3XHQO.js → chunk-AOBIUJX5.js} +3 -3
  11. package/dist/{chunk-276GRITW.js → chunk-BTPPGHG3.js} +4 -4
  12. package/dist/{chunk-II5NJRKH.js → chunk-CMQO6WEQ.js} +2 -2
  13. package/dist/{chunk-WXU4Y5T3.js → chunk-D3TZZO6L.js} +2 -2
  14. package/dist/chunk-DJFYMDMD.js +7 -0
  15. package/dist/{chunk-K2PVLCHR.js → chunk-DLVIES6W.js} +2 -2
  16. package/dist/{chunk-3XQK4MEF.js → chunk-FDZ3SLMV.js} +2 -2
  17. package/dist/{chunk-W6SM3MU5.js → chunk-FMKEGR6N.js} +3 -3
  18. package/dist/{chunk-F2GERNMF.js → chunk-FOYSPWOA.js} +2 -2
  19. package/dist/{chunk-MXQG3A5W.js → chunk-FPHFCZ2E.js} +976 -132
  20. package/dist/chunk-FPHFCZ2E.js.map +1 -0
  21. package/dist/{chunk-TZWJ7QLW.js → chunk-HQ2A4DGU.js} +2 -2
  22. package/dist/{chunk-3CLKYFE3.js → chunk-I3J7WUMV.js} +2 -2
  23. package/dist/{chunk-64VMTY3M.js → chunk-K2GDWPVK.js} +2 -2
  24. package/dist/{chunk-QY3HOLGD.js → chunk-KE5IGD6G.js} +7 -7
  25. package/dist/{chunk-N347WXTT.js → chunk-M33EQB7P.js} +2 -2
  26. package/dist/chunk-M33EQB7P.js.map +1 -0
  27. package/dist/{chunk-CQCVEC7P.js → chunk-MYERGZK3.js} +945 -1111
  28. package/dist/chunk-MYERGZK3.js.map +1 -0
  29. package/dist/{chunk-SNSPYZQT.js → chunk-MZUUIMRQ.js} +5 -5
  30. package/dist/{chunk-7QQ5F7T5.js → chunk-OJSG734P.js} +8 -8
  31. package/dist/{chunk-YQUM3UWK.js → chunk-P2DV7PDG.js} +4 -4
  32. package/dist/{chunk-SQCFKQUR.js → chunk-P64GQUQW.js} +9 -9
  33. package/dist/{chunk-GXLI2E4U.js → chunk-PCPQ75EC.js} +4 -4
  34. package/dist/{chunk-Q5V3KTUL.js → chunk-Q55JVMUD.js} +2 -2
  35. package/dist/{chunk-EALWAQAQ.js → chunk-S2B4UBHK.js} +5 -5
  36. package/dist/{chunk-NR62IQDC.js → chunk-SGOBMAZK.js} +4 -4
  37. package/dist/{chunk-NR62IQDC.js.map → chunk-SGOBMAZK.js.map} +1 -1
  38. package/dist/{chunk-FBWOWMEB.js → chunk-UXCE2OBL.js} +21 -19
  39. package/dist/chunk-UXCE2OBL.js.map +1 -0
  40. package/dist/{chunk-7AU5WLAJ.js → chunk-V7PXKAZD.js} +2 -2
  41. package/dist/{chunk-FKKVZRSY.js → chunk-VQRXDFVF.js} +2 -2
  42. package/dist/{chunk-6HETGJSB.js → chunk-WANBZFP2.js} +2 -2
  43. package/dist/{chunk-ZGHJMFQ6.js → chunk-WFZARRYN.js} +3 -3
  44. package/dist/{chunk-AOS7F4QR.js → chunk-WKYDGROH.js} +2 -2
  45. package/dist/{cli-circuit-breaker-AAHYLFXZ.js → cli-circuit-breaker-BOZNYIZE.js} +3 -3
  46. package/dist/cli.js +82 -64
  47. package/dist/cli.js.map +1 -1
  48. package/dist/{composite-router-VAVDLJGT.js → composite-router-NG7BLVVR.js} +2 -2
  49. package/dist/{consensus-vote-L4CN33XE.js → consensus-vote-3FCOFDON.js} +17 -17
  50. package/dist/{context-retriever-MYKBBDAN.js → context-retriever-QKMSSV6W.js} +8 -8
  51. package/dist/{doctor-deep-AKOPPCXB.js → doctor-deep-CPMR6TDF.js} +3 -3
  52. package/dist/{doctor-live-3PVIYQST.js → doctor-live-GWE5IA7D.js} +9 -9
  53. package/dist/{expert-bridge-G3KN7QWL.js → expert-bridge-6WZ333NT.js} +4 -4
  54. package/dist/{factory-KVMLFEWJ.js → factory-2DD2YGBU.js} +5 -5
  55. package/dist/{factory-ROTP63IZ.js → factory-73WKMDVR.js} +9 -9
  56. package/dist/{improvement-review-WTZ4JV5V.js → improvement-review-RMDGMKIB.js} +6 -6
  57. package/dist/index.d.ts +158 -15
  58. package/dist/index.js +169 -658
  59. package/dist/index.js.map +1 -1
  60. package/dist/{init-opencode-C63LASGX.js → init-opencode-7PKVI3LD.js} +6 -6
  61. package/dist/issue-triage-MLBUABPA.js +17 -0
  62. package/dist/{pr-reviewer-helpers-4VDGMGV5.js → pr-reviewer-helpers-7DSP3YTT.js} +5 -5
  63. package/dist/{registry-command-IRDP2L2R.js → registry-command-YXFZ7LVE.js} +2 -2
  64. package/dist/{repo-security-plan-NS47HQEF.js → repo-security-plan-M36GODNF.js} +3 -3
  65. package/dist/{research-helpers-synthesize-5NBL637T.js → research-helpers-synthesize-7CI4MFYP.js} +4 -4
  66. package/dist/{routing-memory-2IELT5GT.js → routing-memory-MIK3LGDH.js} +2 -2
  67. package/dist/{session-memory-CH3CVLIT.js → session-memory-T2X4BM33.js} +3 -3
  68. package/dist/{setup-config-MKZZDUJP.js → setup-config-6JSBY6OG.js} +3 -3
  69. package/dist/{setup-custom-api-2I52S7XU.js → setup-custom-api-2OXG6ERI.js} +4 -4
  70. package/dist/setup-data-dir-CWU367E6.js +29 -0
  71. package/dist/{tool-memory-STS3DWOK.js → tool-memory-AL3RAR67.js} +5 -5
  72. package/dist/{unified-registry-NJS4ZWC3.js → unified-registry-5YUSIEML.js} +10 -10
  73. package/dist/{weather-report-YG4T4Q23.js → weather-report-W34L4HW5.js} +2 -2
  74. package/package.json +1 -1
  75. package/dist/chunk-3YKFLM2B.js.map +0 -1
  76. package/dist/chunk-BYUVLVN7.js.map +0 -1
  77. package/dist/chunk-CQCVEC7P.js.map +0 -1
  78. package/dist/chunk-FBWOWMEB.js.map +0 -1
  79. package/dist/chunk-H5DTHO7O.js +0 -7
  80. package/dist/chunk-MXQG3A5W.js.map +0 -1
  81. package/dist/chunk-N347WXTT.js.map +0 -1
  82. package/dist/issue-triage-PIE3YVCV.js +0 -17
  83. package/dist/setup-data-dir-NU3YBIZB.js +0 -29
  84. /package/dist/{ast-rule-runner-WANOR3MX.js.map → ast-rule-runner-BEUFFQWL.js.map} +0 -0
  85. /package/dist/{child-mcp-config-N4HLLCEH.js.map → child-mcp-config-QFPSL7Y2.js.map} +0 -0
  86. /package/dist/{chunk-VADACTVB.js.map → chunk-2RZWKIDU.js.map} +0 -0
  87. /package/dist/{chunk-QCSXKQTK.js.map → chunk-36BA6D6J.js.map} +0 -0
  88. /package/dist/{chunk-7J7UYJXC.js.map → chunk-4GSFZS6M.js.map} +0 -0
  89. /package/dist/{chunk-ERL3XHQO.js.map → chunk-AOBIUJX5.js.map} +0 -0
  90. /package/dist/{chunk-276GRITW.js.map → chunk-BTPPGHG3.js.map} +0 -0
  91. /package/dist/{chunk-II5NJRKH.js.map → chunk-CMQO6WEQ.js.map} +0 -0
  92. /package/dist/{chunk-WXU4Y5T3.js.map → chunk-D3TZZO6L.js.map} +0 -0
  93. /package/dist/{chunk-H5DTHO7O.js.map → chunk-DJFYMDMD.js.map} +0 -0
  94. /package/dist/{chunk-K2PVLCHR.js.map → chunk-DLVIES6W.js.map} +0 -0
  95. /package/dist/{chunk-3XQK4MEF.js.map → chunk-FDZ3SLMV.js.map} +0 -0
  96. /package/dist/{chunk-W6SM3MU5.js.map → chunk-FMKEGR6N.js.map} +0 -0
  97. /package/dist/{chunk-F2GERNMF.js.map → chunk-FOYSPWOA.js.map} +0 -0
  98. /package/dist/{chunk-TZWJ7QLW.js.map → chunk-HQ2A4DGU.js.map} +0 -0
  99. /package/dist/{chunk-3CLKYFE3.js.map → chunk-I3J7WUMV.js.map} +0 -0
  100. /package/dist/{chunk-64VMTY3M.js.map → chunk-K2GDWPVK.js.map} +0 -0
  101. /package/dist/{chunk-QY3HOLGD.js.map → chunk-KE5IGD6G.js.map} +0 -0
  102. /package/dist/{chunk-SNSPYZQT.js.map → chunk-MZUUIMRQ.js.map} +0 -0
  103. /package/dist/{chunk-7QQ5F7T5.js.map → chunk-OJSG734P.js.map} +0 -0
  104. /package/dist/{chunk-YQUM3UWK.js.map → chunk-P2DV7PDG.js.map} +0 -0
  105. /package/dist/{chunk-SQCFKQUR.js.map → chunk-P64GQUQW.js.map} +0 -0
  106. /package/dist/{chunk-GXLI2E4U.js.map → chunk-PCPQ75EC.js.map} +0 -0
  107. /package/dist/{chunk-Q5V3KTUL.js.map → chunk-Q55JVMUD.js.map} +0 -0
  108. /package/dist/{chunk-EALWAQAQ.js.map → chunk-S2B4UBHK.js.map} +0 -0
  109. /package/dist/{chunk-7AU5WLAJ.js.map → chunk-V7PXKAZD.js.map} +0 -0
  110. /package/dist/{chunk-FKKVZRSY.js.map → chunk-VQRXDFVF.js.map} +0 -0
  111. /package/dist/{chunk-6HETGJSB.js.map → chunk-WANBZFP2.js.map} +0 -0
  112. /package/dist/{chunk-ZGHJMFQ6.js.map → chunk-WFZARRYN.js.map} +0 -0
  113. /package/dist/{chunk-AOS7F4QR.js.map → chunk-WKYDGROH.js.map} +0 -0
  114. /package/dist/{cli-circuit-breaker-AAHYLFXZ.js.map → cli-circuit-breaker-BOZNYIZE.js.map} +0 -0
  115. /package/dist/{composite-router-VAVDLJGT.js.map → composite-router-NG7BLVVR.js.map} +0 -0
  116. /package/dist/{consensus-vote-L4CN33XE.js.map → consensus-vote-3FCOFDON.js.map} +0 -0
  117. /package/dist/{context-retriever-MYKBBDAN.js.map → context-retriever-QKMSSV6W.js.map} +0 -0
  118. /package/dist/{doctor-deep-AKOPPCXB.js.map → doctor-deep-CPMR6TDF.js.map} +0 -0
  119. /package/dist/{doctor-live-3PVIYQST.js.map → doctor-live-GWE5IA7D.js.map} +0 -0
  120. /package/dist/{expert-bridge-G3KN7QWL.js.map → expert-bridge-6WZ333NT.js.map} +0 -0
  121. /package/dist/{factory-KVMLFEWJ.js.map → factory-2DD2YGBU.js.map} +0 -0
  122. /package/dist/{factory-ROTP63IZ.js.map → factory-73WKMDVR.js.map} +0 -0
  123. /package/dist/{improvement-review-WTZ4JV5V.js.map → improvement-review-RMDGMKIB.js.map} +0 -0
  124. /package/dist/{init-opencode-C63LASGX.js.map → init-opencode-7PKVI3LD.js.map} +0 -0
  125. /package/dist/{issue-triage-PIE3YVCV.js.map → issue-triage-MLBUABPA.js.map} +0 -0
  126. /package/dist/{pr-reviewer-helpers-4VDGMGV5.js.map → pr-reviewer-helpers-7DSP3YTT.js.map} +0 -0
  127. /package/dist/{registry-command-IRDP2L2R.js.map → registry-command-YXFZ7LVE.js.map} +0 -0
  128. /package/dist/{repo-security-plan-NS47HQEF.js.map → repo-security-plan-M36GODNF.js.map} +0 -0
  129. /package/dist/{research-helpers-synthesize-5NBL637T.js.map → research-helpers-synthesize-7CI4MFYP.js.map} +0 -0
  130. /package/dist/{routing-memory-2IELT5GT.js.map → routing-memory-MIK3LGDH.js.map} +0 -0
  131. /package/dist/{session-memory-CH3CVLIT.js.map → session-memory-T2X4BM33.js.map} +0 -0
  132. /package/dist/{setup-config-MKZZDUJP.js.map → setup-config-6JSBY6OG.js.map} +0 -0
  133. /package/dist/{setup-custom-api-2I52S7XU.js.map → setup-custom-api-2OXG6ERI.js.map} +0 -0
  134. /package/dist/{setup-data-dir-NU3YBIZB.js.map → setup-data-dir-CWU367E6.js.map} +0 -0
  135. /package/dist/{tool-memory-STS3DWOK.js.map → tool-memory-AL3RAR67.js.map} +0 -0
  136. /package/dist/{unified-registry-NJS4ZWC3.js.map → unified-registry-5YUSIEML.js.map} +0 -0
  137. /package/dist/{weather-report-YG4T4Q23.js.map → weather-report-W34L4HW5.js.map} +0 -0
@@ -9,8 +9,8 @@ import {
9
9
  getBuiltInAstRulesPath,
10
10
  loadRules,
11
11
  runAstQaRules
12
- } from "./chunk-3XQK4MEF.js";
13
- import "./chunk-ERL3XHQO.js";
12
+ } from "./chunk-FDZ3SLMV.js";
13
+ import "./chunk-AOBIUJX5.js";
14
14
  import "./chunk-7WJGV5DN.js";
15
15
  import "./chunk-J7QCZRVK.js";
16
16
  import "./chunk-ZPWHCABL.js";
@@ -26,4 +26,4 @@ export {
26
26
  loadRules,
27
27
  runAstQaRules
28
28
  };
29
- //# sourceMappingURL=ast-rule-runner-WANOR3MX.js.map
29
+ //# sourceMappingURL=ast-rule-runner-BEUFFQWL.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-DKHBIJO4.js";
4
4
  import {
5
5
  createLogger
6
- } from "./chunk-ERL3XHQO.js";
6
+ } from "./chunk-AOBIUJX5.js";
7
7
  import "./chunk-7WJGV5DN.js";
8
8
  import "./chunk-J7QCZRVK.js";
9
9
  import "./chunk-ZPWHCABL.js";
@@ -62,4 +62,4 @@ export {
62
62
  generateMcpConfig,
63
63
  getDefaultAllowedTools
64
64
  };
65
- //# sourceMappingURL=child-mcp-config-N4HLLCEH.js.map
65
+ //# sourceMappingURL=child-mcp-config-QFPSL7Y2.js.map
@@ -8,7 +8,7 @@ import {
8
8
  getTimeProvider,
9
9
  isRateLimitText,
10
10
  ok
11
- } from "./chunk-ERL3XHQO.js";
11
+ } from "./chunk-AOBIUJX5.js";
12
12
 
13
13
  // src/cli-adapters/circuit-breaker-types.ts
14
14
  var CircuitErrorCode = {
@@ -541,4 +541,4 @@ export {
541
541
  CliCircuitBreakerIntegration,
542
542
  createCliCircuitBreakerIntegration
543
543
  };
544
- //# sourceMappingURL=chunk-VADACTVB.js.map
544
+ //# sourceMappingURL=chunk-2RZWKIDU.js.map
@@ -11,7 +11,7 @@ import {
11
11
  createGetRetryConfig,
12
12
  createGetTimeout,
13
13
  createGetToolRateLimit
14
- } from "./chunk-ERL3XHQO.js";
14
+ } from "./chunk-AOBIUJX5.js";
15
15
 
16
16
  // src/config/defaults.ts
17
17
  var CUSTOM_API_DEFAULT_MODEL = "gpt-5.5";
@@ -230,4 +230,4 @@ export {
230
230
  CUSTOM_API_DEFAULT_MODEL,
231
231
  DEFAULTS
232
232
  };
233
- //# sourceMappingURL=chunk-QCSXKQTK.js.map
233
+ //# sourceMappingURL=chunk-36BA6D6J.js.map
@@ -112,4 +112,4 @@ export {
112
112
  SEVERITY_EMOJI,
113
113
  DECISION_EMOJI
114
114
  };
115
- //# sourceMappingURL=chunk-BYUVLVN7.js.map
115
+ //# sourceMappingURL=chunk-3W4L63ML.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dogfooding/pr-review-types.ts","../src/security/sarif-types.ts"],"sourcesContent":["/**\n * nexus-agents/dogfooding - PR Review Types\n *\n * Type definitions for automated pull request review using\n * multi-agent collaboration.\n *\n * @module dogfooding/pr-review-types\n * (Source: Issue #161, Alignment Roadmap Phase 3)\n */\n\nimport { z } from 'zod';\nimport type { FullCapableProvider } from '../scm/types.js';\nimport { FINDING_SEVERITY_LEVELS } from '../security/sarif-types.js';\n\n/**\n * Pull request file change information.\n */\nexport interface PRFileChange {\n /** File path */\n readonly filename: string;\n /** Change status */\n readonly status: 'added' | 'removed' | 'modified' | 'renamed' | 'copied';\n /** Number of additions */\n readonly additions: number;\n /** Number of deletions */\n readonly deletions: number;\n /** File patch/diff content */\n readonly patch?: string | undefined;\n /** Previous filename if renamed */\n readonly previousFilename?: string | undefined;\n}\n\n/**\n * Pull request metadata from GitHub API.\n */\nexport interface PRMetadata {\n /** PR number */\n readonly number: number;\n /** PR title */\n readonly title: string;\n /** PR description/body */\n readonly body: string;\n /** Author username */\n readonly author: string;\n /** GitHub API author_association (e.g., 'OWNER', 'COLLABORATOR', 'NONE') */\n readonly authorAssociation: string;\n /** Base branch */\n readonly base: string;\n /** Head branch */\n readonly head: string;\n /** Repository owner */\n readonly owner: string;\n /** Repository name */\n readonly repo: string;\n /** PR URL */\n readonly url: string;\n /** Whether PR is draft */\n readonly draft: boolean;\n /** PR labels */\n readonly labels: readonly string[];\n /** Changed files */\n readonly files: readonly PRFileChange[];\n /** Total additions */\n readonly additions: number;\n /** Total deletions */\n readonly deletions: number;\n /** Commit SHA of head */\n readonly headSha: string;\n}\n\n/**\n * Review severity levels.\n */\nexport type ReviewSeverity = (typeof FINDING_SEVERITY_LEVELS)[number];\n\n/**\n * Review category for organizing findings.\n */\nexport type ReviewCategory =\n 'security' | 'performance' | 'code_quality' | 'testing' | 'documentation' | 'architecture';\n\n/**\n * Individual review finding from an expert.\n */\nexport interface ReviewFinding {\n /** Unique finding ID */\n readonly id: string;\n /** Category of finding */\n readonly category: ReviewCategory;\n /** Severity level */\n readonly severity: ReviewSeverity;\n /** Finding title */\n readonly title: string;\n /** Detailed description */\n readonly description: string;\n /** Affected file (if applicable) */\n readonly file?: string | undefined;\n /** Line number (if applicable) */\n readonly line?: number | undefined;\n /** Suggested fix */\n readonly suggestion?: string | undefined;\n /** Expert that found this issue */\n readonly expertId: string;\n /** Confidence score (0-1) */\n readonly confidence: number;\n}\n\n/**\n * Review result from a single expert agent.\n */\nexport interface ExpertReviewResult {\n /** Expert ID */\n readonly expertId: string;\n /** Expert role/type */\n readonly expertType: string;\n /** Overall approval */\n readonly approved: boolean;\n /** Review summary */\n readonly summary: string;\n /** Individual findings */\n readonly findings: readonly ReviewFinding[];\n /** Execution time in ms */\n readonly durationMs: number;\n /** Confidence in review (0-1) */\n readonly confidence: number;\n /**\n * The expert never produced a verdict — its adapter failed or returned\n * nothing (#5012).\n *\n * `approved` cannot express this. A failed expert used to be recorded as\n * `approved: true` (\"don't block on failures\"), so a review in which every\n * expert failed resolved to `approve` at 100% consensus and was posted to\n * GitHub as a real APPROVE. Absence of a review is not approval — a consumer\n * must be able to tell them apart, and `confidence: 0` was already present\n * and already ignored.\n */\n readonly errored?: boolean;\n}\n\n/**\n * Aggregated review decision after multi-agent debate.\n */\nexport type ReviewDecision = 'approve' | 'request_changes' | 'comment';\n\n/**\n * Complete PR review result from multi-agent collaboration.\n */\n/**\n * Trust + reputation assessment of the PR author, surfaced for observability\n * (#3123, epic #3118 Phase 5). Mirrors `issue_triage`'s assessment.\n */\nexport interface PRTrustAssessment {\n /** Classifier trust tier (1-4) from author association. */\n readonly trustTier: string;\n /** Author's GitHub role. */\n readonly userRole: string;\n /**\n * Whether the author is on the maintainer allowlist — present only when an\n * allowlist was consulted (#4992). Absent means \"no allowlist was consulted\",\n * which is the state on every live path today; it was previously recorded\n * as `false` without being measured.\n */\n readonly isAllowlisted?: boolean;\n /**\n * Whether a durable `AuditLogger` was configured for this process (#4992\n * review). `configured` — the trust event was handed to it; delivery to the\n * hash chain is subject to the logger's own severity filter (trust events\n * are `info`), queue and fail-loud flush, and is not confirmed per call.\n * `none` — no audit logger (audit disabled, or the CLI path).\n */\n readonly auditSink: 'configured' | 'none';\n /** Reputation score (0-100) when reputation is enabled. */\n readonly reputationScore?: number | undefined;\n /** Suspicious signals detected (e.g. `new_account`, `injection_patterns_detected`). */\n readonly suspiciousSignals: readonly string[];\n /** Whether the author is flagged as suspicious. */\n readonly isSuspicious: boolean;\n /** Tier the policy gate ACTUALLY enforced (== trustTier under audit/off). */\n readonly enforcedTrustTier?: string | undefined;\n /** Tier reputation reconciliation computed — what enforce mode WOULD gate on. */\n readonly reputationReconciledTier?: string | undefined;\n /** Reputation-gating rollout mode applied: `off` | `audit` | `enforce`. */\n readonly gatingMode?: string | undefined;\n}\n\n/**\n * Result of fetching PR data plus best-effort author signals (#3133).\n */\nexport interface PRFetchData {\n readonly metadata: PRMetadata;\n readonly provider: FullCapableProvider;\n /** Author's real account age in days, when the lookup succeeded (#3133). */\n readonly accountAgeDays?: number;\n}\n\nexport interface PRReviewResult {\n /** Pull request number */\n readonly prNumber: number;\n /** Repository full name (owner/repo) */\n readonly repository: string;\n /** Overall decision */\n readonly decision: ReviewDecision;\n /** Executive summary */\n readonly summary: string;\n /** Individual expert reviews */\n readonly expertReviews: readonly ExpertReviewResult[];\n /** Aggregated findings by severity */\n readonly findingsBySeverity: Readonly<Record<ReviewSeverity, number>>;\n /** Aggregated findings by category */\n readonly findingsByCategory: Readonly<Record<ReviewCategory, number>>;\n /** Total execution time in ms */\n readonly totalDurationMs: number;\n /** Number of experts that participated */\n readonly expertCount: number;\n /**\n * Number of changed files the review covered (#4350).\n *\n * The demo command's progress line printed `expertReviews.length` under a\n * \"files\" label, so a 7-file PR reported \"3 files\" — the expert count. The\n * fetch was always correct; the result simply carried no file count to print.\n */\n readonly filesReviewed: number;\n /** Consensus score (0-1) */\n readonly consensusScore: number;\n /** Debate rounds completed */\n readonly debateRounds: number;\n /** Timestamp of review */\n readonly timestamp: string;\n /** Author trust + reputation assessment (#3123). */\n readonly trustAssessment: PRTrustAssessment;\n /**\n * What actually happened when the review was posted to GitHub (#4354).\n *\n * The review previously reported success whether or not the post landed: a\n * `createReview` rejection was logged and discarded, and a Rule-of-Two block\n * returned early, both leaving the CLI to print \"Review posted to GitHub.\"\n * over a review that does not exist. Callers must consult this rather than\n * inferring a successful post from a successful review.\n */\n readonly postOutcome: ReviewPostOutcome;\n}\n\n/**\n * A completed review before the posting step has run (#4354).\n *\n * Everything the reviewer aggregates is known before the post is attempted; the\n * outcome is stamped on afterwards. Keeping the two apart in the types is what\n * stops `postOutcome` from being defaulted to a hopeful value.\n */\nexport type PRReviewDraft = Omit<PRReviewResult, 'postOutcome'>;\n\n/** Terminal state of the GitHub review-posting step (#4354). */\nexport type ReviewPostOutcome =\n /** The review was created on GitHub. */\n | { readonly status: 'posted' }\n /** Posting was deliberately not attempted (dry-run, or a policy gate blocked it). */\n | { readonly status: 'skipped'; readonly reason: string }\n /** Posting was attempted and GitHub rejected it. */\n | { readonly status: 'failed'; readonly error: string };\n\n/**\n * Configuration for PR review.\n */\nexport interface PRReviewConfig {\n /** Experts to include in review */\n readonly experts: readonly ReviewCategory[];\n /** Maximum debate rounds */\n readonly maxDebateRounds: number;\n /** Consensus threshold (0-1) */\n readonly consensusThreshold: number;\n /** Minimum severity to report */\n readonly minSeverity: ReviewSeverity;\n /** Whether to post inline comments */\n readonly enableInlineComments: boolean;\n /** Whether to run in dry-run mode (no GitHub posting) */\n readonly dryRun: boolean;\n /** Whether to assess author reputation and gate on it (#3123). */\n readonly enableReputation: boolean;\n /** GitHub token for API access */\n readonly githubToken?: string | undefined;\n /** Model adapter configuration */\n readonly modelConfig?: {\n readonly temperature?: number;\n readonly maxTokens?: number;\n };\n}\n\n/**\n * Default PR review configuration.\n */\nexport const DEFAULT_PR_REVIEW_CONFIG: PRReviewConfig = {\n experts: ['security', 'code_quality', 'testing'],\n maxDebateRounds: 3,\n consensusThreshold: 0.7,\n minSeverity: 'low',\n enableInlineComments: true,\n dryRun: false,\n enableReputation: true,\n modelConfig: {\n temperature: 0.3,\n maxTokens: 8192,\n },\n};\n\n/**\n * Zod schema for PR review configuration.\n */\nexport const PRReviewConfigSchema = z.object({\n experts: z\n .array(\n z.enum([\n 'security',\n 'performance',\n 'code_quality',\n 'testing',\n 'documentation',\n 'architecture',\n ])\n )\n .default(['security', 'code_quality', 'testing']),\n maxDebateRounds: z.number().int().min(1).max(10).default(3),\n consensusThreshold: z.number().min(0).max(1).default(0.7),\n minSeverity: z.enum(FINDING_SEVERITY_LEVELS).default('low'),\n enableInlineComments: z.boolean().default(true),\n dryRun: z.boolean().default(false),\n enableReputation: z.boolean().default(true),\n githubToken: z.string().optional(),\n modelConfig: z\n .object({\n temperature: z.number().min(0).max(2).default(0.3),\n maxTokens: z.number().int().positive().default(8192),\n })\n .optional(),\n});\n\n/**\n * Severity order for comparison. INVERTED vs sarif-types' SEVERITY_ORDER by\n * design (higher = more severe here, for descending sort); only the KEY SET is\n * shared. Derived from the canonical {@link FINDING_SEVERITY_LEVELS} so the keys\n * can't drift (#3570): critical→5 … info→1.\n */\nexport const SEVERITY_ORDER: Record<ReviewSeverity, number> = Object.fromEntries(\n FINDING_SEVERITY_LEVELS.map((level, index) => [level, FINDING_SEVERITY_LEVELS.length - index])\n) as Record<ReviewSeverity, number>;\n\n/**\n * Category display names.\n */\nexport const CATEGORY_DISPLAY_NAMES: Record<ReviewCategory, string> = {\n security: 'Security',\n performance: 'Performance',\n code_quality: 'Code Quality',\n testing: 'Testing',\n documentation: 'Documentation',\n architecture: 'Architecture',\n};\n\n/**\n * Severity emoji for GitHub comments.\n */\nexport const SEVERITY_EMOJI: Record<ReviewSeverity, string> = {\n critical: ':rotating_light:',\n high: ':warning:',\n medium: ':yellow_circle:',\n low: ':large_blue_circle:',\n info: ':information_source:',\n};\n\n/**\n * Decision emoji for GitHub comments.\n */\nexport const DECISION_EMOJI: Record<ReviewDecision, string> = {\n approve: ':white_check_mark:',\n request_changes: ':x:',\n comment: ':speech_balloon:',\n};\n","/**\n * SARIF Types and Security Finding Schema (#1682)\n *\n * Types for parsing SARIF (Static Analysis Results Interchange Format)\n * output from security scanners (Semgrep, CodeQL, Bandit, ESLint).\n * Normalizes findings into a unified schema for MCP tool consumption.\n *\n * @module security/sarif-types\n * (Source: Issue #1681, #1682 — Proactive Defensive Security)\n */\n\nimport { z } from 'zod';\n\n// ============================================================================\n// Unified Security Finding Schema\n// ============================================================================\n\n/**\n * Canonical 5-value finding-severity vocabulary (CVSS-aligned), most→least\n * severe. THE single source of truth — every 5-value finding-severity zod enum\n * (severity-consensus, finding-triage, agents/output-schemas, expert-types\n * VulnerabilitySeverity) and both SEVERITY_ORDER maps derive from this (#3570).\n * Tuple order is authoritative: SEVERITY_ORDER below maps it to ascending ranks.\n */\nexport const FINDING_SEVERITY_LEVELS = ['critical', 'high', 'medium', 'low', 'info'] as const;\n\n/** Severity levels aligned with CVSS and common scanner output. */\nexport const FindingSeveritySchema = z.enum(FINDING_SEVERITY_LEVELS);\nexport type FindingSeverity = z.infer<typeof FindingSeveritySchema>;\n\n/** A normalized security finding from any SARIF-compatible scanner. */\nexport const SecurityFindingSchema = z.object({\n /** Unique finding ID (scanner-specific rule ID). */\n id: z.string().min(1),\n /** Scanner that produced this finding. */\n scanner: z.string().min(1),\n /** Rule identifier (e.g., 'javascript.lang.security.detect-eval'). */\n rule: z.string().min(1),\n /** Normalized severity. */\n severity: FindingSeveritySchema,\n /** Human-readable description of the finding. */\n message: z.string().min(1).max(2000),\n /** File path where the finding was detected. */\n file: z.string().min(1),\n /** Start line number (1-based). */\n startLine: z.number().int().min(1),\n /** End line number (1-based, optional). */\n endLine: z.number().int().min(1).optional(),\n /** CWE identifiers (e.g., ['CWE-79', 'CWE-89']). */\n cweIds: z.array(z.string()).default([]),\n /** Scanner confidence (0-1). */\n confidence: z.number().min(0).max(1).default(0.5),\n /** Code snippet around the finding (optional). */\n snippet: z.string().max(500).optional(),\n /** Help URL for remediation guidance. */\n helpUrl: z.string().optional(),\n});\n\nexport type SecurityFinding = z.infer<typeof SecurityFindingSchema>;\n\n/** Result of parsing a SARIF file. */\nexport interface SarifParseResult {\n /** Scanner name extracted from SARIF. */\n readonly scanner: string;\n /** Total findings parsed. */\n readonly totalFindings: number;\n /** Findings sorted by severity (critical first). */\n readonly findings: readonly SecurityFinding[];\n /** Parsing errors (non-fatal). */\n readonly errors: readonly string[];\n}\n\n// ============================================================================\n// SARIF Input Types (subset of the SARIF 2.1.0 spec we need)\n// ============================================================================\n\n/** SARIF result level → our severity mapping. */\nexport const SARIF_LEVEL_MAP: Readonly<Record<string, FindingSeverity>> = {\n error: 'high',\n warning: 'medium',\n note: 'low',\n none: 'info',\n};\n\n/**\n * Severity order for sorting (lower = more severe). Derived from the canonical\n * tuple so it can never drift from {@link FINDING_SEVERITY_LEVELS} (#3570).\n */\nexport const SEVERITY_ORDER: Readonly<Record<FindingSeverity, number>> = Object.fromEntries(\n FINDING_SEVERITY_LEVELS.map((level, index) => [level, index])\n) as Record<FindingSeverity, number>;\n"],"mappings":";AAUA,SAAS,KAAAA,UAAS;;;ACClB,SAAS,SAAS;AAaX,IAAM,0BAA0B,CAAC,YAAY,QAAQ,UAAU,OAAO,MAAM;AAG5E,IAAM,wBAAwB,EAAE,KAAK,uBAAuB;AAI5D,IAAM,wBAAwB,EAAE,OAAO;AAAA;AAAA,EAE5C,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA;AAAA,EAEpB,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA;AAAA,EAEzB,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA;AAAA,EAEtB,UAAU;AAAA;AAAA,EAEV,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAI;AAAA;AAAA,EAEnC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA;AAAA,EAEtB,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC;AAAA;AAAA,EAEjC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,SAAS;AAAA;AAAA,EAE1C,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC;AAAA;AAAA,EAEtC,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,EAAE,QAAQ,GAAG;AAAA;AAAA,EAEhD,SAAS,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA;AAAA,EAEtC,SAAS,EAAE,OAAO,EAAE,SAAS;AAC/B,CAAC;AAqBM,IAAM,kBAA6D;AAAA,EACxE,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,MAAM;AACR;AAMO,IAAM,iBAA4D,OAAO;AAAA,EAC9E,wBAAwB,IAAI,CAAC,OAAO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EACnE,wBAAwB,IAAI,CAAC,OAAO,UAAU,CAAC,OAAO,wBAAwB,SAAS,KAAK,CAAC;AAC/F;AAKO,IAAM,yBAAyD;AAAA,EACpE,UAAU;AAAA,EACV,aAAa;AAAA,EACb,cAAc;AAAA,EACd,SAAS;AAAA,EACT,eAAe;AAAA,EACf,cAAc;AAChB;AAKO,IAAM,iBAAiD;AAAA,EAC5D,UAAU;AAAA,EACV,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,MAAM;AACR;AAKO,IAAM,iBAAiD;AAAA,EAC5D,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,SAAS;AACX;","names":["z","z","SEVERITY_ORDER"]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getTimeProvider
3
- } from "./chunk-ERL3XHQO.js";
3
+ } from "./chunk-AOBIUJX5.js";
4
4
 
5
5
  // src/security/audit-trail.ts
6
6
  var MAX_EVENTS = 1e4;
@@ -205,4 +205,4 @@ export {
205
205
  createGraphAuditBridge,
206
206
  createAuditTrail
207
207
  };
208
- //# sourceMappingURL=chunk-3YKFLM2B.js.map
208
+ //# sourceMappingURL=chunk-46YGVSBD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/security/audit-trail.ts"],"sourcesContent":["/**\n * nexus-agents/security - Audit Trail\n *\n * Machine-readable JSON audit events for security pipeline decisions.\n * Every trust classification, policy gate decision, corroboration check,\n * and reputation assessment is recorded as a structured event.\n *\n * Satisfies CLAUDE.md requirement: \"Every action on untrusted input must\n * log: trust tier, sources cited, policy gate decision, stripped content.\"\n *\n * @module security/audit-trail\n * (Source: Issue #832 — Security audit trail)\n */\n\nimport { getTimeProvider } from '../core/index.js';\nimport type { TrustTier } from './trust-types.js';\nimport type { AgentActionType } from './action-schema.js';\n\n// ============================================================================\n// Types\n// ============================================================================\n\n/** Maximum stored events before oldest are evicted. */\nconst MAX_EVENTS = 10_000;\n\n/**\n * Discriminated union of audit event types.\n * Each event captures a single security pipeline decision.\n */\nexport type AuditEvent =\n | TrustClassificationEvent\n | PolicyGateEvent\n | CorroborationEvent\n | ReputationEvent\n | SanitizationEvent\n | GraphExecutionAuditEvent\n | ClawGuardViolationEvent;\n\n/** Base fields shared by all audit events. */\ninterface AuditEventBase {\n readonly id: string;\n readonly timestamp: string;\n readonly component: string;\n}\n\n/** Trust classification decision. */\nexport interface TrustClassificationEvent extends AuditEventBase {\n readonly type: 'trust_classification';\n readonly username: string;\n readonly assignedTier: TrustTier;\n readonly userRole: string;\n /**\n * Present only when a maintainer allowlist was consulted (#4992). A\n * classification that consulted no list records nothing here rather than\n * `false` — \"not measured\" and \"measured false\" must stay distinguishable in\n * the audit record.\n */\n readonly isAllowlisted?: boolean;\n readonly wasDowngraded: boolean;\n readonly reason: string;\n}\n\n/** Policy gate evaluation result. */\nexport interface PolicyGateEvent extends AuditEventBase {\n readonly type: 'policy_gate';\n /**\n * The agent action evaluated, for the security policy-gate path\n * (security/policy-gate.ts). Optional because the PIPELINE policy path\n * (pipeline/policy-evaluator.ts → #3710) records stage-boundary policy\n * decisions that have no `AgentAction` — they carry {@link stageType} +\n * {@link mode} + {@link ruleIds} instead. Security emitters always set it.\n */\n readonly actionType?: AgentActionType;\n readonly allowed: boolean;\n readonly requiresApproval: boolean;\n readonly inputTrustTier: TrustTier;\n readonly violationRules: readonly string[];\n /**\n * Pipeline-policy fields (#3710). Carried for the dev-pipeline\n * consensus→execute seam so the DURABLE record can distinguish soak (`warn`)\n * from enforce (`block`) and which rules/stage fired — without these the\n * persisted event is useless to the tune/readiness loop. Absent for the\n * security policy-gate path.\n */\n /** Enforcement mode the decision was made under: `warn` (soak) or `block` (enforce). */\n readonly mode?: 'off' | 'warn' | 'block';\n /** IDs of the policy rules that fired (mirrors `violationRules` for the pipeline path). */\n readonly ruleIds?: readonly string[];\n /** Type of the stage the gate guarded (e.g. `execute`). */\n readonly stageType?: string;\n /**\n * #3727: discriminates a per-EVALUATION SUMMARY record (`'summary'` — emitted\n * once per pipeline policy evaluation INCLUDING clean ones, the DENOMINATOR for\n * the would-block rate) from a per-VIOLATION record (`'violation'` — the\n * existing #3710 per-violation records). Absent for the security policy-gate\n * path. Denominator = count(recordKind==='summary'); numerator = summaries with\n * `violationCount > 0`. Scope the #3710 count-parity assertion to `'violation'`.\n */\n readonly recordKind?: 'summary' | 'violation';\n /** #3727: number of violations in THIS evaluation (set on the summary record). */\n readonly violationCount?: number;\n}\n\n/** Corroboration validation result. */\nexport interface CorroborationEvent extends AuditEventBase {\n readonly type: 'corroboration';\n readonly actionType: AgentActionType;\n readonly satisfied: boolean;\n readonly sourceCount: number;\n readonly missingRequirements: readonly string[];\n}\n\n/** Reputation assessment result. */\nexport interface ReputationEvent extends AuditEventBase {\n readonly type: 'reputation';\n readonly username: string;\n readonly reputationScore: number;\n readonly isSuspicious: boolean;\n readonly effectiveTier: TrustTier;\n readonly signalCount: number;\n}\n\n/** Summary of a single element stripped during sanitization. */\nexport interface StrippedElementSummary {\n /** Truncated tag text (≤30 chars + '...' from the sanitizer). */\n readonly tag: string;\n /** Reason the element was removed (e.g. 'Trail of Bits injection vector'). */\n readonly reason: string;\n}\n\n/** Max stripped-element details retained per sanitization event. */\nexport const MAX_STRIPPED_ELEMENTS_PER_EVENT = 20;\n\n/** Input sanitization result. */\nexport interface SanitizationEvent extends AuditEventBase {\n readonly type: 'sanitization';\n readonly source: string;\n readonly wasModified: boolean;\n readonly strippedCount: number;\n readonly injectionFlagCount: number;\n /**\n * Per-element tag/reason details, truncated to at most\n * MAX_STRIPPED_ELEMENTS_PER_EVENT entries. Required by CLAUDE.md's\n * Untrusted Input Policy: \"Log stripped elements for audit trail.\"\n */\n readonly strippedElements: readonly StrippedElementSummary[];\n}\n\n/**\n * ClawGuard AUDIT-mode violation (#4097). Records a tool call that VIOLATED the\n * derived access policy but was ALLOWED to proceed because the policy is in\n * `audit` mode (log-and-allow). Persisting these is what lets the audit→enforce\n * graduation loop size the real violation rate from durable telemetry rather\n * than ephemeral logs.\n */\nexport interface ClawGuardViolationEvent extends AuditEventBase {\n readonly type: 'clawguard_violation';\n /** The tool whose call violated the policy. */\n readonly toolName: string;\n /** Human-readable warning from the access decision (may be truncated). */\n readonly warning: string;\n /** Source of the derived policy (`llm` / `fallback-keyword` / `bypass`). */\n readonly policySource: string;\n /** Policy mode under which the violation was allowed (e.g. `audit`). */\n readonly mode: string;\n /** Request ID of the offending tool call, for correlation. */\n readonly requestId: string;\n /**\n * Which rule produced the verdict (#5106) — `unbypassable:tool`,\n * `unbypassable:path`, `allowedTools`, `allowedTools:confirm_risky`.\n *\n * A first-class field rather than prose inside `warning`, because `warning`\n * is truncated at 500 chars and a long attacker-selectable `path` argument\n * pushes the rule off the end. A chain reader must be able to tell an\n * unbypassable denylist hit from an allowlist miss without parsing a string\n * that may have been cut mid-word.\n *\n * Absent for verdicts that carry no rule (an audit-mode allowlist\n * observation), which is why it is optional rather than defaulted — there is\n * no rule to name, and inventing one would misreport.\n */\n readonly matchedRule?: string;\n}\n\n/** Graph execution lifecycle event (Issue #839). */\nexport interface GraphExecutionAuditEvent extends AuditEventBase {\n readonly type: 'graph_execution';\n readonly graphEvent: string;\n readonly nodeId?: string;\n readonly stepNumber: number;\n readonly detail: string;\n}\n\n/**\n * Query filter for retrieving audit events.\n *\n * The post-mortem dimensions (#3197) — `actionType`, `actor`, `violationRule`\n * — NARROW to events that actually carry the field (events lacking it are\n * excluded), unlike `trustTier`'s legacy keep-non-applicable behavior. Only\n * dimensions backed by a real event field are offered: `resource` and\n * `policyName` from the original ask were dropped because no AuditEvent\n * records them (a filter with no backing field would be dead config); the\n * policy-rule intent is served by `violationRule` (PolicyGateEvent's\n * `violationRules`).\n */\nexport interface AuditQuery {\n readonly type?: AuditEvent['type'];\n readonly since?: string;\n readonly until?: string;\n readonly trustTier?: TrustTier;\n /** Match PolicyGate/Corroboration events by their `actionType`. */\n readonly actionType?: AgentActionType;\n /** Match Trust/Reputation events by `username` (the acting/assessed user). */\n readonly actor?: string;\n /** Match PolicyGate events whose `violationRules` include this rule name. */\n readonly violationRule?: string;\n readonly limit?: number;\n}\n\n// ============================================================================\n// AuditTrail\n// ============================================================================\n\n/**\n * Append-only audit trail for security pipeline decisions.\n * Events are bounded by MAX_EVENTS to prevent unbounded growth.\n */\n/**\n * Optional durable sink: receives every fully-formed event appended to the\n * trail, so security decisions can be mirrored to a persistent, hash-chained\n * store (see security/audit-bridge.ts). Default-off — when absent, the trail\n * behaves exactly as before (#3291).\n */\nexport type DurableAuditSink = (event: AuditEvent) => void;\n\nexport class AuditTrail {\n private events: AuditEvent[] = [];\n private nextId = 1;\n\n constructor(private readonly durableSink?: DurableAuditSink) {}\n\n /** Appends an event to the trail. Returns the assigned event ID. */\n append(event: Omit<AuditEvent, 'id' | 'timestamp'>): string {\n const id = `audit-${String(this.nextId++)}`;\n const fullEvent = {\n ...event,\n id,\n timestamp: getTimeProvider().nowIso(),\n } as AuditEvent;\n\n this.events.push(fullEvent);\n this.enforceLimit();\n\n // Mirror to the durable store when wired (#3291). Best-effort: a sink\n // failure must never break the in-memory security pipeline.\n if (this.durableSink !== undefined) {\n try {\n this.durableSink(fullEvent);\n } catch {\n // Sink implementations already swallow+log; this is belt-and-suspenders.\n }\n }\n\n return id;\n }\n\n /** Queries events matching the given filter. */\n query(filter: AuditQuery = {}): readonly AuditEvent[] {\n let results = this.events as readonly AuditEvent[];\n\n if (filter.type !== undefined) {\n results = results.filter((e) => e.type === filter.type);\n }\n\n if (filter.since !== undefined) {\n results = filterSince(results, filter.since);\n }\n\n if (filter.until !== undefined) {\n results = filterUntil(results, filter.until);\n }\n\n if (filter.trustTier !== undefined) {\n results = filterByTrustTier(results, filter.trustTier);\n }\n\n if (filter.actionType !== undefined) {\n results = filterByActionType(results, filter.actionType);\n }\n\n if (filter.actor !== undefined) {\n results = filterByActor(results, filter.actor);\n }\n\n if (filter.violationRule !== undefined) {\n results = filterByViolationRule(results, filter.violationRule);\n }\n\n const limit = filter.limit ?? results.length;\n return results.slice(-limit);\n }\n\n /** Returns the total number of events. */\n get size(): number {\n return this.events.length;\n }\n\n /** Clears all events. */\n clear(): void {\n this.events = [];\n }\n\n /** Enforces MAX_EVENTS bound. */\n private enforceLimit(): void {\n if (this.events.length > MAX_EVENTS) {\n this.events = this.events.slice(-MAX_EVENTS);\n }\n }\n}\n\n// ============================================================================\n// Filter Helpers\n// ============================================================================\n\nfunction filterSince(events: readonly AuditEvent[], since: string): readonly AuditEvent[] {\n const sinceTime = new Date(since).getTime();\n return events.filter((e) => new Date(e.timestamp).getTime() >= sinceTime);\n}\n\nfunction filterUntil(events: readonly AuditEvent[], until: string): readonly AuditEvent[] {\n const untilTime = new Date(until).getTime();\n return events.filter((e) => new Date(e.timestamp).getTime() <= untilTime);\n}\n\nfunction filterByTrustTier(events: readonly AuditEvent[], tier: TrustTier): readonly AuditEvent[] {\n return events.filter((e) => {\n if (e.type === 'trust_classification') return e.assignedTier === tier;\n if (e.type === 'policy_gate') return e.inputTrustTier === tier;\n if (e.type === 'reputation') return e.effectiveTier === tier;\n return true;\n });\n}\n\n/**\n * Narrow to events carrying the given `actionType` (#3197). Only PolicyGate and\n * Corroboration events have one; all others are excluded.\n */\nfunction filterByActionType(\n events: readonly AuditEvent[],\n actionType: AgentActionType\n): readonly AuditEvent[] {\n return events.filter(\n (e) => (e.type === 'policy_gate' || e.type === 'corroboration') && e.actionType === actionType\n );\n}\n\n/**\n * Narrow to events for the given actor (#3197), matched on `username`. Only\n * Trust-classification and Reputation events carry a username; others are\n * excluded so an actor filter never returns unrelated rows.\n */\nfunction filterByActor(events: readonly AuditEvent[], actor: string): readonly AuditEvent[] {\n return events.filter(\n (e) => (e.type === 'trust_classification' || e.type === 'reputation') && e.username === actor\n );\n}\n\n/**\n * Narrow to PolicyGate events whose `violationRules` include the given rule\n * name (#3197) — the security post-mortem \"who tripped rule X\" query.\n */\nfunction filterByViolationRule(events: readonly AuditEvent[], rule: string): readonly AuditEvent[] {\n return events.filter((e) => e.type === 'policy_gate' && e.violationRules.includes(rule));\n}\n\n// ============================================================================\n// Convenience Emitters\n// ============================================================================\n\n/**\n * Records a trust classification decision.\n */\nexport function emitTrustEvent(\n trail: AuditTrail,\n data: Omit<TrustClassificationEvent, 'id' | 'timestamp' | 'type' | 'component'>\n): string {\n return trail.append({\n type: 'trust_classification',\n component: 'trust-classifier',\n ...data,\n });\n}\n\n/**\n * Records a policy gate evaluation.\n */\nexport function emitPolicyEvent(\n trail: AuditTrail,\n data: Omit<PolicyGateEvent, 'id' | 'timestamp' | 'type' | 'component'>\n): string {\n return trail.append({\n type: 'policy_gate',\n component: 'policy-gate',\n ...data,\n });\n}\n\n/**\n * Records a PIPELINE-policy gate decision (#3710) — the dev-pipeline\n * consensus→execute seam. Distinct from {@link emitPolicyEvent} (the security\n * policy-gate path with an `AgentAction`): this carries `mode`/`ruleIds`/\n * `stageType` so the durable record distinguishes soak(warn) from enforce(block)\n * and is usable by the tune/readiness loop. ONE append per call.\n */\nexport function emitPipelinePolicyEvent(\n trail: AuditTrail,\n data: Omit<PolicyGateEvent, 'id' | 'timestamp' | 'type' | 'component' | 'actionType'>\n): string {\n return trail.append({\n type: 'policy_gate',\n component: 'pipeline-policy-evaluator',\n ...data,\n });\n}\n\n/** The pipeline-policy would-block rate over a window (#3727). */\nexport interface PolicyWouldBlockRate {\n /** Total pipeline-policy evaluations (the denominator — summary records). */\n readonly evaluations: number;\n /** Evaluations that had ≥1 violation (what enforce mode WOULD block). */\n readonly wouldBlock: number;\n /** `wouldBlock / evaluations`; 0 when there are no evaluations. */\n readonly rate: number;\n}\n\n/**\n * Compute the pipeline-policy would-block RATE from durable audit events (#3727)\n * — the read-side of the per-evaluation summary records, and the signal the\n * #3769-enforce soak-readiness gate needs. Denominator = per-evaluation SUMMARY\n * records (`recordKind === 'summary'`); numerator = summaries with\n * `violationCount > 0` (the would-block fraction, independent of warn/block mode).\n * Per-violation records (`recordKind === 'violation'`) are intentionally NOT\n * counted — counting them would double-count and break the denominator.\n */\nexport function computePolicyWouldBlockRate(events: readonly AuditEvent[]): PolicyWouldBlockRate {\n let evaluations = 0;\n let wouldBlock = 0;\n for (const e of events) {\n if (e.type !== 'policy_gate' || e.recordKind !== 'summary') continue;\n evaluations += 1;\n if ((e.violationCount ?? 0) > 0) wouldBlock += 1;\n }\n return { evaluations, wouldBlock, rate: evaluations > 0 ? wouldBlock / evaluations : 0 };\n}\n\n/**\n * Records a corroboration validation.\n */\nexport function emitCorroborationEvent(\n trail: AuditTrail,\n data: Omit<CorroborationEvent, 'id' | 'timestamp' | 'type' | 'component'>\n): string {\n return trail.append({\n type: 'corroboration',\n component: 'corroboration-validator',\n ...data,\n });\n}\n\n/**\n * Records a reputation assessment.\n */\nexport function emitReputationEvent(\n trail: AuditTrail,\n data: Omit<ReputationEvent, 'id' | 'timestamp' | 'type' | 'component'>\n): string {\n return trail.append({\n type: 'reputation',\n component: 'reputation-model',\n ...data,\n });\n}\n\n/**\n * Records an input sanitization result.\n */\nexport function emitSanitizationEvent(\n trail: AuditTrail,\n data: Omit<SanitizationEvent, 'id' | 'timestamp' | 'type' | 'component'>\n): string {\n return trail.append({\n type: 'sanitization',\n component: 'input-sanitizer',\n ...data,\n });\n}\n\n/**\n * Records a graph execution lifecycle event.\n */\nexport function emitGraphExecutionEvent(\n trail: AuditTrail,\n data: Omit<GraphExecutionAuditEvent, 'id' | 'timestamp' | 'type' | 'component'>\n): string {\n return trail.append({\n type: 'graph_execution',\n component: 'graph-executor',\n ...data,\n });\n}\n\n/**\n * Records a ClawGuard AUDIT-mode violation (#4097) — a policy-violating tool\n * call that was log-and-allowed because the policy is in `audit` mode. ONE\n * append per call; mirrors to the durable sink when the trail is wired.\n */\nexport function emitClawGuardViolation(\n trail: AuditTrail,\n data: Omit<ClawGuardViolationEvent, 'id' | 'timestamp' | 'type' | 'component'>\n): string {\n return trail.append({\n type: 'clawguard_violation',\n component: 'clawguard-audit',\n ...data,\n });\n}\n\n/**\n * Creates an onEvent callback that bridges graph events to the audit trail.\n * Pass the returned function as `onEvent` in GraphExecuteOptions.\n *\n * @example\n * const trail = createAuditTrail();\n * await executeGraph(graph, inputs, { onEvent: createGraphAuditBridge(trail) });\n */\nexport function createGraphAuditBridge(\n trail: AuditTrail\n): (event: { readonly type: string; readonly [key: string]: unknown }) => void {\n return (event) => {\n const nodeId = typeof event['nodeId'] === 'string' ? event['nodeId'] : undefined;\n const stepNumber = typeof event['stepNumber'] === 'number' ? event['stepNumber'] : 0;\n emitGraphExecutionEvent(trail, {\n graphEvent: event.type,\n ...(nodeId !== undefined ? { nodeId } : {}),\n stepNumber,\n detail: formatGraphEventDetail(event),\n });\n };\n}\n\n/** Formats a brief detail string from a graph event. */\nfunction formatGraphEventDetail(event: {\n readonly type: string;\n readonly [key: string]: unknown;\n}): string {\n switch (event.type) {\n case 'node_started':\n return `Node ${String(event['nodeId'])} starting`;\n case 'node_completed':\n return `Node ${String(event['nodeId'])} completed in ${String(event['durationMs'])}ms`;\n case 'node_error':\n return `Node ${String(event['nodeId'])} failed: ${String(event['error'])}`;\n case 'state_updated':\n return `State updated: ${String(event['updatedKeys'])}`;\n case 'step_completed':\n return `Step ${String(event['stepNumber'])}: ${String(event['nodesExecuted'])} nodes`;\n case 'execution_complete':\n return `Complete: ${String(event['totalSteps'])} steps, ${String(event['durationMs'])}ms`;\n default:\n return event.type;\n }\n}\n\n/**\n * Creates a new AuditTrail instance. Pass a {@link DurableAuditSink} (e.g. from\n * `createDurableAuditSink(auditLogger)`) to mirror appended security decisions\n * to a durable, hash-chained store (#3291). Default: in-memory only.\n */\nexport function createAuditTrail(durableSink?: DurableAuditSink): AuditTrail {\n return new AuditTrail(durableSink);\n}\n"],"mappings":";;;;;AAuBA,IAAM,aAAa;AA4GZ,IAAM,kCAAkC;AAwGxC,IAAM,aAAN,MAAiB;AAAA,EAItB,YAA6B,aAAgC;AAAhC;AAAA,EAAiC;AAAA,EAAjC;AAAA,EAHrB,SAAuB,CAAC;AAAA,EACxB,SAAS;AAAA;AAAA,EAKjB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AA,MACA,QAAQ,uBAAuB,KAAK;AAAA,IACtC,CAAC;AAAA,EACH;AACF;AAGA,SAAS,uBAAuB,OAGrB;AACT,UAAQ,MAAM,MAAM;AAAA,IAClB,KAAK;AACH,aAAO,QAAQ,OAAO,MAAM,QAAQ,CAAC,CAAC;AAAA,IACxC,KAAK;AACH,aAAO,QAAQ,OAAO,MAAM,QAAQ,CAAC,CAAC,iBAAiB,OAAO,MAAM,YAAY,CAAC,CAAC;AAAA,IACpF,KAAK;AACH,aAAO,QAAQ,OAAO,MAAM,QAAQ,CAAC,CAAC,YAAY,OAAO,MAAM,OAAO,CAAC,CAAC;AAAA,IAC1E,KAAK;AACH,aAAO,kBAAkB,OAAO,MAAM,aAAa,CAAC,CAAC;AAAA,IACvD,KAAK;AACH,aAAO,QAAQ,OAAO,MAAM,YAAY,CAAC,CAAC,KAAK,OAAO,MAAM,eAAe,CAAC,CAAC;AAAA,IAC/E,KAAK;AACH,aAAO,aAAa,OAAO,MAAM,YAAY,CAAC,CAAC,WAAW,OAAO,MAAM,YAAY,CAAC,CAAC;AAAA,IACvF;AACE,aAAO,MAAM;AAAA,EACjB;AACF;AAOO,SAAS,iBAAiB,aAA4C;AAC3E,SAAO,IAAI,WAAW,WAAW;AACnC;","names":[]}
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  resolveCliSlot
3
- } from "./chunk-TZWJ7QLW.js";
3
+ } from "./chunk-HQ2A4DGU.js";
4
4
  import {
5
5
  createLogger,
6
6
  getTimeProvider,
7
7
  isRateLimitText
8
- } from "./chunk-ERL3XHQO.js";
8
+ } from "./chunk-AOBIUJX5.js";
9
9
 
10
10
  // src/pipeline/expert-bridge.ts
11
11
  function resolveCliFromModelString(model) {
@@ -21,7 +21,7 @@ async function getMcpConfigPath() {
21
21
  if (cachedMcpConfigPath !== null) return cachedMcpConfigPath;
22
22
  mcpConfigInitPromise ??= (async () => {
23
23
  try {
24
- const { generateMcpConfig } = await import("./child-mcp-config-N4HLLCEH.js");
24
+ const { generateMcpConfig } = await import("./child-mcp-config-QFPSL7Y2.js");
25
25
  const config = await generateMcpConfig();
26
26
  cachedMcpConfigPath = config.configPath;
27
27
  cachedMcpConfigCleanup = config.cleanup;
@@ -93,8 +93,8 @@ var routerInitPromise = null;
93
93
  async function getRouter() {
94
94
  if (cachedRouter !== null) return cachedRouter;
95
95
  routerInitPromise ??= (async () => {
96
- const { createAllAdapters } = await import("./factory-ROTP63IZ.js");
97
- const { createCompositeRouter } = await import("./composite-router-VAVDLJGT.js");
96
+ const { createAllAdapters } = await import("./factory-73WKMDVR.js");
97
+ const { createCompositeRouter } = await import("./composite-router-NG7BLVVR.js");
98
98
  const adapters = createAllAdapters();
99
99
  if (adapters.size === 0) {
100
100
  routerInitPromise = null;
@@ -102,7 +102,7 @@ async function getRouter() {
102
102
  }
103
103
  cachedRouter = adaptCompositeRouter(createCompositeRouter(adapters));
104
104
  try {
105
- const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-AAHYLFXZ.js");
105
+ const { createCliCircuitBreakerIntegration } = await import("./cli-circuit-breaker-BOZNYIZE.js");
106
106
  cachedCircuitBreaker = createCliCircuitBreakerIntegration([...adapters.values()]);
107
107
  } catch (error) {
108
108
  const msg = error instanceof Error ? error.message : String(error);
@@ -213,4 +213,4 @@ export {
213
213
  tokenSplitFromUsage,
214
214
  executeExpert
215
215
  };
216
- //# sourceMappingURL=chunk-7J7UYJXC.js.map
216
+ //# sourceMappingURL=chunk-4GSFZS6M.js.map
@@ -2653,7 +2653,7 @@ function setDefaultRegistry(registry) {
2653
2653
  }
2654
2654
  async function reloadDefaultRegistry() {
2655
2655
  globalRegistry = buildDefaultRegistry();
2656
- const { resetGlobalRegistry } = await import("./unified-registry-NJS4ZWC3.js");
2656
+ const { resetGlobalRegistry } = await import("./unified-registry-5YUSIEML.js");
2657
2657
  resetGlobalRegistry();
2658
2658
  return globalRegistry;
2659
2659
  }
@@ -15373,7 +15373,7 @@ var CompositeRouter = class _CompositeRouter {
15373
15373
  */
15374
15374
  async consultUnifiedContext(task) {
15375
15375
  try {
15376
- const { getContextForTask, inferTaskCategory } = await import("./context-retriever-MYKBBDAN.js");
15376
+ const { getContextForTask, inferTaskCategory } = await import("./context-retriever-QKMSSV6W.js");
15377
15377
  const ctx = await getContextForTask({
15378
15378
  task: task.content,
15379
15379
  category: inferTaskCategory(task.content),
@@ -17024,4 +17024,4 @@ export {
17024
17024
  AgentCapability,
17025
17025
  OrchestratorError
17026
17026
  };
17027
- //# sourceMappingURL=chunk-ERL3XHQO.js.map
17027
+ //# sourceMappingURL=chunk-AOBIUJX5.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createAutoAdapter
3
- } from "./chunk-7QQ5F7T5.js";
3
+ } from "./chunk-OJSG734P.js";
4
4
  import {
5
5
  getDefaultCliCircuitBreakerRegistry,
6
6
  mapModelErrorToCategory
7
- } from "./chunk-VADACTVB.js";
7
+ } from "./chunk-2RZWKIDU.js";
8
8
  import {
9
9
  CLI_NAMES,
10
10
  CircularBuffer,
@@ -24,7 +24,7 @@ import {
24
24
  recordRateLimitEvent,
25
25
  resolveModelIdentitySync,
26
26
  toRateLimitError
27
- } from "./chunk-ERL3XHQO.js";
27
+ } from "./chunk-AOBIUJX5.js";
28
28
 
29
29
  // src/config/model-equivalence.ts
30
30
  function canonicalModelKey(modelId) {
@@ -904,4 +904,4 @@ export {
904
904
  getGlobalRegistry,
905
905
  resetGlobalRegistry
906
906
  };
907
- //# sourceMappingURL=chunk-276GRITW.js.map
907
+ //# sourceMappingURL=chunk-BTPPGHG3.js.map
@@ -2,7 +2,7 @@ import {
2
2
  createLogger,
3
3
  err,
4
4
  ok
5
- } from "./chunk-ERL3XHQO.js";
5
+ } from "./chunk-AOBIUJX5.js";
6
6
 
7
7
  // src/scm/token-resolver.ts
8
8
  import { execFile } from "node:child_process";
@@ -87,4 +87,4 @@ export {
87
87
  hasToken,
88
88
  getTokenEnvVars
89
89
  };
90
- //# sourceMappingURL=chunk-II5NJRKH.js.map
90
+ //# sourceMappingURL=chunk-CMQO6WEQ.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getRandomProvider,
3
3
  getTimeProvider
4
- } from "./chunk-ERL3XHQO.js";
4
+ } from "./chunk-AOBIUJX5.js";
5
5
 
6
6
  // src/utils/id-utils.ts
7
7
  import { randomUUID } from "node:crypto";
@@ -24,4 +24,4 @@ export {
24
24
  generateHyphenId,
25
25
  generateUUID
26
26
  };
27
- //# sourceMappingURL=chunk-WXU4Y5T3.js.map
27
+ //# sourceMappingURL=chunk-D3TZZO6L.js.map
@@ -0,0 +1,7 @@
1
+ // src/version.ts
2
+ var VERSION = true ? "8.9.1" : "dev";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-DJFYMDMD.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getErrorMessage,
5
5
  getTimeProvider,
6
6
  ok
7
- } from "./chunk-ERL3XHQO.js";
7
+ } from "./chunk-AOBIUJX5.js";
8
8
 
9
9
  // src/context/session-memory.ts
10
10
  import * as fs from "node:fs";
@@ -366,4 +366,4 @@ export {
366
366
  SessionMemory,
367
367
  createSessionMemory
368
368
  };
369
- //# sourceMappingURL=chunk-K2PVLCHR.js.map
369
+ //# sourceMappingURL=chunk-DLVIES6W.js.map
@@ -3,7 +3,7 @@ import {
3
3
  ValidationError,
4
4
  createLogger,
5
5
  formatZodError
6
- } from "./chunk-ERL3XHQO.js";
6
+ } from "./chunk-AOBIUJX5.js";
7
7
 
8
8
  // src/security/ast-rule-runner.ts
9
9
  import { existsSync } from "node:fs";
@@ -241,4 +241,4 @@ export {
241
241
  collectAstQaFindings,
242
242
  runAstQaRules
243
243
  };
244
- //# sourceMappingURL=chunk-3XQK4MEF.js.map
244
+ //# sourceMappingURL=chunk-FDZ3SLMV.js.map
@@ -7,7 +7,7 @@ import {
7
7
  toolStructuredError,
8
8
  toolSuccessStructured,
9
9
  wrapToolWithTimeout
10
- } from "./chunk-YQUM3UWK.js";
10
+ } from "./chunk-P2DV7PDG.js";
11
11
  import {
12
12
  JsonlStore,
13
13
  SECURITY_KEYWORDS,
@@ -20,7 +20,7 @@ import {
20
20
  getTimeProvider,
21
21
  isDeclaredNeverDeprecate,
22
22
  isRegisteredToolName
23
- } from "./chunk-ERL3XHQO.js";
23
+ } from "./chunk-AOBIUJX5.js";
24
24
  import {
25
25
  getNexusDataDir,
26
26
  nexusDataPath
@@ -2159,4 +2159,4 @@ export {
2159
2159
  runImprovementReview,
2160
2160
  registerImprovementReviewTool
2161
2161
  };
2162
- //# sourceMappingURL=chunk-W6SM3MU5.js.map
2162
+ //# sourceMappingURL=chunk-FMKEGR6N.js.map
@@ -3,7 +3,7 @@ import {
3
3
  createLogger,
4
4
  err,
5
5
  ok
6
- } from "./chunk-ERL3XHQO.js";
6
+ } from "./chunk-AOBIUJX5.js";
7
7
 
8
8
  // src/adapters/sdk/types.ts
9
9
  var PROVIDER_ENV_KEYS = {
@@ -260,4 +260,4 @@ export {
260
260
  validateCustomApiBaseUrl,
261
261
  assertCustomApiHostResolvesPublic
262
262
  };
263
- //# sourceMappingURL=chunk-F2GERNMF.js.map
263
+ //# sourceMappingURL=chunk-FOYSPWOA.js.map