nexus-agents 2.92.2 → 2.92.4

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 (31) hide show
  1. package/dist/{chunk-NR4NSTJH.js → chunk-27CNQPQ4.js} +21 -5
  2. package/dist/chunk-27CNQPQ4.js.map +1 -0
  3. package/dist/{chunk-F47QKVPH.js → chunk-4LEUIAYB.js} +26 -174
  4. package/dist/chunk-4LEUIAYB.js.map +1 -0
  5. package/dist/{chunk-L6JZCAFH.js → chunk-IHPYT6WU.js} +168 -4
  6. package/dist/chunk-IHPYT6WU.js.map +1 -0
  7. package/dist/{chunk-UYOHV3EG.js → chunk-JCYCITBK.js} +45 -24
  8. package/dist/chunk-JCYCITBK.js.map +1 -0
  9. package/dist/{chunk-3HVSXLPL.js → chunk-MZFWRU6E.js} +3 -3
  10. package/dist/{chunk-XNBPE6WG.js → chunk-VUVCSWMC.js} +2 -2
  11. package/dist/{chunk-G5XKEUAP.js → chunk-VYNNVUY6.js} +2 -2
  12. package/dist/cli.js +8 -8
  13. package/dist/{consensus-vote-VSRNSZ5J.js → consensus-vote-4RIUUEZQ.js} +2 -2
  14. package/dist/index.d.ts +171 -157
  15. package/dist/index.js +54 -37
  16. package/dist/index.js.map +1 -1
  17. package/dist/{issue-triage-FVZOVIRX.js → issue-triage-VB5CVE43.js} +3 -3
  18. package/dist/{pr-reviewer-helpers-RBUEJI6V.js → pr-reviewer-helpers-CI72F4XM.js} +3 -3
  19. package/dist/{setup-command-BMELLUUX.js → setup-command-E35O56BN.js} +3 -3
  20. package/package.json +1 -1
  21. package/dist/chunk-F47QKVPH.js.map +0 -1
  22. package/dist/chunk-L6JZCAFH.js.map +0 -1
  23. package/dist/chunk-NR4NSTJH.js.map +0 -1
  24. package/dist/chunk-UYOHV3EG.js.map +0 -1
  25. /package/dist/{chunk-3HVSXLPL.js.map → chunk-MZFWRU6E.js.map} +0 -0
  26. /package/dist/{chunk-XNBPE6WG.js.map → chunk-VUVCSWMC.js.map} +0 -0
  27. /package/dist/{chunk-G5XKEUAP.js.map → chunk-VYNNVUY6.js.map} +0 -0
  28. /package/dist/{consensus-vote-VSRNSZ5J.js.map → consensus-vote-4RIUUEZQ.js.map} +0 -0
  29. /package/dist/{issue-triage-FVZOVIRX.js.map → issue-triage-VB5CVE43.js.map} +0 -0
  30. /package/dist/{pr-reviewer-helpers-RBUEJI6V.js.map → pr-reviewer-helpers-CI72F4XM.js.map} +0 -0
  31. /package/dist/{setup-command-BMELLUUX.js.map → setup-command-E35O56BN.js.map} +0 -0
@@ -40,7 +40,7 @@ import {
40
40
  } from "./chunk-CH7QIDHQ.js";
41
41
 
42
42
  // src/version.ts
43
- var VERSION = true ? "2.92.2" : "dev";
43
+ var VERSION = true ? "2.92.4" : "dev";
44
44
 
45
45
  // src/config/schemas-core.ts
46
46
  import { z } from "zod";
@@ -2096,7 +2096,7 @@ async function runDoctorFix(result) {
2096
2096
  writeLine2("\u2500".repeat(40));
2097
2097
  let fixCount = 0;
2098
2098
  if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
2099
- const { runSetup } = await import("./setup-command-BMELLUUX.js");
2099
+ const { runSetup } = await import("./setup-command-E35O56BN.js");
2100
2100
  const setupResult = runSetup({
2101
2101
  skipMcp: true,
2102
2102
  skipRules: true,
@@ -2208,4 +2208,4 @@ export {
2208
2208
  startStdioServer,
2209
2209
  closeServer
2210
2210
  };
2211
- //# sourceMappingURL=chunk-3HVSXLPL.js.map
2211
+ //# sourceMappingURL=chunk-MZFWRU6E.js.map
@@ -8,7 +8,7 @@ import {
8
8
  checkSqlite,
9
9
  defaultConfig,
10
10
  initDataDirectories
11
- } from "./chunk-3HVSXLPL.js";
11
+ } from "./chunk-MZFWRU6E.js";
12
12
  import {
13
13
  probeAllClis
14
14
  } from "./chunk-X5BQF6HM.js";
@@ -1987,4 +1987,4 @@ export {
1987
1987
  setupCommand,
1988
1988
  setupCommandAsync
1989
1989
  };
1990
- //# sourceMappingURL=chunk-XNBPE6WG.js.map
1990
+ //# sourceMappingURL=chunk-VUVCSWMC.js.map
@@ -9,7 +9,7 @@ import {
9
9
  gateWithReputation,
10
10
  resolveReputationGatingMode,
11
11
  sanitizeInput
12
- } from "./chunk-NR4NSTJH.js";
12
+ } from "./chunk-27CNQPQ4.js";
13
13
  import {
14
14
  createLogger,
15
15
  getTimeProvider
@@ -288,4 +288,4 @@ export {
288
288
  formatReviewComment,
289
289
  createFailedReview
290
290
  };
291
- //# sourceMappingURL=chunk-G5XKEUAP.js.map
291
+ //# sourceMappingURL=chunk-VYNNVUY6.js.map
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  generateSummary,
14
14
  parseFindings,
15
15
  sumFindings
16
- } from "./chunk-G5XKEUAP.js";
16
+ } from "./chunk-VYNNVUY6.js";
17
17
  import "./chunk-AQTHLUCP.js";
18
18
  import {
19
19
  buildOpenAICompatAdapters,
@@ -24,7 +24,7 @@ import {
24
24
  import {
25
25
  setupCommandAsync,
26
26
  verifyCommand
27
- } from "./chunk-XNBPE6WG.js";
27
+ } from "./chunk-VUVCSWMC.js";
28
28
  import "./chunk-2SMTCNXP.js";
29
29
  import {
30
30
  AuthHandler,
@@ -164,7 +164,7 @@ import {
164
164
  validateCommand,
165
165
  validateWorkflow,
166
166
  wrapInMarkdownFence
167
- } from "./chunk-F47QKVPH.js";
167
+ } from "./chunk-4LEUIAYB.js";
168
168
  import {
169
169
  resolveToken
170
170
  } from "./chunk-EAT4GTMT.js";
@@ -194,7 +194,7 @@ import {
194
194
  toolSuccessStructured,
195
195
  warnIfSimulatedOutsideTests,
196
196
  wrapToolWithTimeout
197
- } from "./chunk-UYOHV3EG.js";
197
+ } from "./chunk-JCYCITBK.js";
198
198
  import "./chunk-3FVSYMHK.js";
199
199
  import "./chunk-Y7E5ZWRQ.js";
200
200
  import {
@@ -208,12 +208,12 @@ import {
208
208
  createFullGitHubProvider,
209
209
  evaluatePolicy,
210
210
  parsePRUrl
211
- } from "./chunk-L6JZCAFH.js";
211
+ } from "./chunk-IHPYT6WU.js";
212
212
  import "./chunk-EFHZHCF2.js";
213
213
  import {
214
214
  ReputationCache,
215
215
  sanitizeInput
216
- } from "./chunk-NR4NSTJH.js";
216
+ } from "./chunk-27CNQPQ4.js";
217
217
  import "./chunk-57HMLBYN.js";
218
218
  import "./chunk-HFOQKCD2.js";
219
219
  import "./chunk-3ACDP4E6.js";
@@ -240,7 +240,7 @@ import {
240
240
  loadConfig,
241
241
  runDoctor,
242
242
  validateNexusEnv
243
- } from "./chunk-3HVSXLPL.js";
243
+ } from "./chunk-MZFWRU6E.js";
244
244
  import "./chunk-SFZESA5O.js";
245
245
  import "./chunk-6Q33PBXC.js";
246
246
  import {
@@ -3109,7 +3109,7 @@ ${file.patch}
3109
3109
  violations: policyResult.violations
3110
3110
  });
3111
3111
  }
3112
- const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-RBUEJI6V.js");
3112
+ const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-CI72F4XM.js");
3113
3113
  const body = formatReviewComment2(result);
3114
3114
  const postResult = await provider.createReview(pr.prNumber, body, result.decision);
3115
3115
  if (!postResult.ok) {
@@ -6,7 +6,7 @@ import {
6
6
  executeVoting,
7
7
  registerConsensusVoteTool,
8
8
  resetCorrelationTracker
9
- } from "./chunk-UYOHV3EG.js";
9
+ } from "./chunk-JCYCITBK.js";
10
10
  import "./chunk-3FVSYMHK.js";
11
11
  import "./chunk-Y7E5ZWRQ.js";
12
12
  import "./chunk-7QXEK3O6.js";
@@ -30,4 +30,4 @@ export {
30
30
  registerConsensusVoteTool,
31
31
  resetCorrelationTracker
32
32
  };
33
- //# sourceMappingURL=consensus-vote-VSRNSZ5J.js.map
33
+ //# sourceMappingURL=consensus-vote-4RIUUEZQ.js.map
package/dist/index.d.ts CHANGED
@@ -27879,6 +27879,161 @@ declare function isMutatingAction(actionType: AgentActionType): boolean;
27879
27879
  */
27880
27880
  declare function requiresCitation(actionType: AgentActionType): boolean;
27881
27881
 
27882
+ /**
27883
+ * nexus-agents/security - Audit Trail
27884
+ *
27885
+ * Machine-readable JSON audit events for security pipeline decisions.
27886
+ * Every trust classification, policy gate decision, corroboration check,
27887
+ * and reputation assessment is recorded as a structured event.
27888
+ *
27889
+ * Satisfies CLAUDE.md requirement: "Every action on untrusted input must
27890
+ * log: trust tier, sources cited, policy gate decision, stripped content."
27891
+ *
27892
+ * @module security/audit-trail
27893
+ * (Source: Issue #832 — Security audit trail)
27894
+ */
27895
+
27896
+ /**
27897
+ * Discriminated union of audit event types.
27898
+ * Each event captures a single security pipeline decision.
27899
+ */
27900
+ type AuditEvent = TrustClassificationEvent | PolicyGateEvent | CorroborationEvent | ReputationEvent | SanitizationEvent | GraphExecutionAuditEvent;
27901
+ /** Base fields shared by all audit events. */
27902
+ interface AuditEventBase {
27903
+ readonly id: string;
27904
+ readonly timestamp: string;
27905
+ readonly component: string;
27906
+ }
27907
+ /** Trust classification decision. */
27908
+ interface TrustClassificationEvent extends AuditEventBase {
27909
+ readonly type: 'trust_classification';
27910
+ readonly username: string;
27911
+ readonly assignedTier: TrustTier;
27912
+ readonly userRole: string;
27913
+ readonly isAllowlisted: boolean;
27914
+ readonly wasDowngraded: boolean;
27915
+ readonly reason: string;
27916
+ }
27917
+ /** Policy gate evaluation result. */
27918
+ interface PolicyGateEvent extends AuditEventBase {
27919
+ readonly type: 'policy_gate';
27920
+ readonly actionType: AgentActionType;
27921
+ readonly allowed: boolean;
27922
+ readonly requiresApproval: boolean;
27923
+ readonly inputTrustTier: TrustTier;
27924
+ readonly violationRules: readonly string[];
27925
+ }
27926
+ /** Corroboration validation result. */
27927
+ interface CorroborationEvent extends AuditEventBase {
27928
+ readonly type: 'corroboration';
27929
+ readonly actionType: AgentActionType;
27930
+ readonly satisfied: boolean;
27931
+ readonly sourceCount: number;
27932
+ readonly missingRequirements: readonly string[];
27933
+ }
27934
+ /** Reputation assessment result. */
27935
+ interface ReputationEvent extends AuditEventBase {
27936
+ readonly type: 'reputation';
27937
+ readonly username: string;
27938
+ readonly reputationScore: number;
27939
+ readonly isSuspicious: boolean;
27940
+ readonly effectiveTier: TrustTier;
27941
+ readonly signalCount: number;
27942
+ }
27943
+ /** Summary of a single element stripped during sanitization. */
27944
+ interface StrippedElementSummary {
27945
+ /** Truncated tag text (≤30 chars + '...' from the sanitizer). */
27946
+ readonly tag: string;
27947
+ /** Reason the element was removed (e.g. 'Trail of Bits injection vector'). */
27948
+ readonly reason: string;
27949
+ }
27950
+ /** Input sanitization result. */
27951
+ interface SanitizationEvent extends AuditEventBase {
27952
+ readonly type: 'sanitization';
27953
+ readonly source: string;
27954
+ readonly wasModified: boolean;
27955
+ readonly strippedCount: number;
27956
+ readonly injectionFlagCount: number;
27957
+ /**
27958
+ * Per-element tag/reason details, truncated to at most
27959
+ * MAX_STRIPPED_ELEMENTS_PER_EVENT entries. Required by CLAUDE.md's
27960
+ * Untrusted Input Policy: "Log stripped elements for audit trail."
27961
+ */
27962
+ readonly strippedElements: readonly StrippedElementSummary[];
27963
+ }
27964
+ /** Graph execution lifecycle event (Issue #839). */
27965
+ interface GraphExecutionAuditEvent extends AuditEventBase {
27966
+ readonly type: 'graph_execution';
27967
+ readonly graphEvent: string;
27968
+ readonly nodeId?: string;
27969
+ readonly stepNumber: number;
27970
+ readonly detail: string;
27971
+ }
27972
+ /** Query filter for retrieving audit events. */
27973
+ interface AuditQuery {
27974
+ readonly type?: AuditEvent['type'];
27975
+ readonly since?: string;
27976
+ readonly until?: string;
27977
+ readonly trustTier?: TrustTier;
27978
+ readonly limit?: number;
27979
+ }
27980
+ /**
27981
+ * Append-only audit trail for security pipeline decisions.
27982
+ * Events are bounded by MAX_EVENTS to prevent unbounded growth.
27983
+ */
27984
+ declare class AuditTrail {
27985
+ private events;
27986
+ private nextId;
27987
+ /** Appends an event to the trail. Returns the assigned event ID. */
27988
+ append(event: Omit<AuditEvent, 'id' | 'timestamp'>): string;
27989
+ /** Queries events matching the given filter. */
27990
+ query(filter?: AuditQuery): readonly AuditEvent[];
27991
+ /** Returns the total number of events. */
27992
+ get size(): number;
27993
+ /** Clears all events. */
27994
+ clear(): void;
27995
+ /** Enforces MAX_EVENTS bound. */
27996
+ private enforceLimit;
27997
+ }
27998
+ /**
27999
+ * Records a trust classification decision.
28000
+ */
28001
+ declare function emitTrustEvent(trail: AuditTrail, data: Omit<TrustClassificationEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
28002
+ /**
28003
+ * Records a policy gate evaluation.
28004
+ */
28005
+ declare function emitPolicyEvent(trail: AuditTrail, data: Omit<PolicyGateEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
28006
+ /**
28007
+ * Records a corroboration validation.
28008
+ */
28009
+ declare function emitCorroborationEvent(trail: AuditTrail, data: Omit<CorroborationEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
28010
+ /**
28011
+ * Records a reputation assessment.
28012
+ */
28013
+ declare function emitReputationEvent(trail: AuditTrail, data: Omit<ReputationEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
28014
+ /**
28015
+ * Records an input sanitization result.
28016
+ */
28017
+ declare function emitSanitizationEvent(trail: AuditTrail, data: Omit<SanitizationEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
28018
+ /**
28019
+ * Records a graph execution lifecycle event.
28020
+ */
28021
+ declare function emitGraphExecutionEvent(trail: AuditTrail, data: Omit<GraphExecutionAuditEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
28022
+ /**
28023
+ * Creates an onEvent callback that bridges graph events to the audit trail.
28024
+ * Pass the returned function as `onEvent` in GraphExecuteOptions.
28025
+ *
28026
+ * @example
28027
+ * const trail = createAuditTrail();
28028
+ * await executeGraph(graph, inputs, { onEvent: createGraphAuditBridge(trail) });
28029
+ */
28030
+ declare function createGraphAuditBridge(trail: AuditTrail): (event: {
28031
+ readonly type: string;
28032
+ readonly [key: string]: unknown;
28033
+ }) => void;
28034
+ /** Creates a new AuditTrail instance. */
28035
+ declare function createAuditTrail(): AuditTrail;
28036
+
27882
28037
  /**
27883
28038
  * nexus-agents/security - Policy Gate
27884
28039
  *
@@ -27941,7 +28096,7 @@ interface ActionContext {
27941
28096
  * @param context - The current execution context.
27942
28097
  * @returns PolicyDecision with violations and approval requirements.
27943
28098
  */
27944
- declare function evaluatePolicy$1(action: AgentAction, context: ActionContext): PolicyDecision$1;
28099
+ declare function evaluatePolicy$1(action: AgentAction, context: ActionContext, auditTrail?: AuditTrail): PolicyDecision$1;
27945
28100
  /**
27946
28101
  * Quick check: can this action type proceed at all given the input trust tier?
27947
28102
  * Useful for early rejection before full policy evaluation.
@@ -28078,161 +28233,6 @@ declare class ReputationCache {
28078
28233
  */
28079
28234
  declare function assessReputation(metadata: GitHubUserMetadata, cache?: ReputationCache): ReputationAssessment;
28080
28235
 
28081
- /**
28082
- * nexus-agents/security - Audit Trail
28083
- *
28084
- * Machine-readable JSON audit events for security pipeline decisions.
28085
- * Every trust classification, policy gate decision, corroboration check,
28086
- * and reputation assessment is recorded as a structured event.
28087
- *
28088
- * Satisfies CLAUDE.md requirement: "Every action on untrusted input must
28089
- * log: trust tier, sources cited, policy gate decision, stripped content."
28090
- *
28091
- * @module security/audit-trail
28092
- * (Source: Issue #832 — Security audit trail)
28093
- */
28094
-
28095
- /**
28096
- * Discriminated union of audit event types.
28097
- * Each event captures a single security pipeline decision.
28098
- */
28099
- type AuditEvent = TrustClassificationEvent | PolicyGateEvent | CorroborationEvent | ReputationEvent | SanitizationEvent | GraphExecutionAuditEvent;
28100
- /** Base fields shared by all audit events. */
28101
- interface AuditEventBase {
28102
- readonly id: string;
28103
- readonly timestamp: string;
28104
- readonly component: string;
28105
- }
28106
- /** Trust classification decision. */
28107
- interface TrustClassificationEvent extends AuditEventBase {
28108
- readonly type: 'trust_classification';
28109
- readonly username: string;
28110
- readonly assignedTier: TrustTier;
28111
- readonly userRole: string;
28112
- readonly isAllowlisted: boolean;
28113
- readonly wasDowngraded: boolean;
28114
- readonly reason: string;
28115
- }
28116
- /** Policy gate evaluation result. */
28117
- interface PolicyGateEvent extends AuditEventBase {
28118
- readonly type: 'policy_gate';
28119
- readonly actionType: AgentActionType;
28120
- readonly allowed: boolean;
28121
- readonly requiresApproval: boolean;
28122
- readonly inputTrustTier: TrustTier;
28123
- readonly violationRules: readonly string[];
28124
- }
28125
- /** Corroboration validation result. */
28126
- interface CorroborationEvent extends AuditEventBase {
28127
- readonly type: 'corroboration';
28128
- readonly actionType: AgentActionType;
28129
- readonly satisfied: boolean;
28130
- readonly sourceCount: number;
28131
- readonly missingRequirements: readonly string[];
28132
- }
28133
- /** Reputation assessment result. */
28134
- interface ReputationEvent extends AuditEventBase {
28135
- readonly type: 'reputation';
28136
- readonly username: string;
28137
- readonly reputationScore: number;
28138
- readonly isSuspicious: boolean;
28139
- readonly effectiveTier: TrustTier;
28140
- readonly signalCount: number;
28141
- }
28142
- /** Summary of a single element stripped during sanitization. */
28143
- interface StrippedElementSummary {
28144
- /** Truncated tag text (≤30 chars + '...' from the sanitizer). */
28145
- readonly tag: string;
28146
- /** Reason the element was removed (e.g. 'Trail of Bits injection vector'). */
28147
- readonly reason: string;
28148
- }
28149
- /** Input sanitization result. */
28150
- interface SanitizationEvent extends AuditEventBase {
28151
- readonly type: 'sanitization';
28152
- readonly source: string;
28153
- readonly wasModified: boolean;
28154
- readonly strippedCount: number;
28155
- readonly injectionFlagCount: number;
28156
- /**
28157
- * Per-element tag/reason details, truncated to at most
28158
- * MAX_STRIPPED_ELEMENTS_PER_EVENT entries. Required by CLAUDE.md's
28159
- * Untrusted Input Policy: "Log stripped elements for audit trail."
28160
- */
28161
- readonly strippedElements: readonly StrippedElementSummary[];
28162
- }
28163
- /** Graph execution lifecycle event (Issue #839). */
28164
- interface GraphExecutionAuditEvent extends AuditEventBase {
28165
- readonly type: 'graph_execution';
28166
- readonly graphEvent: string;
28167
- readonly nodeId?: string;
28168
- readonly stepNumber: number;
28169
- readonly detail: string;
28170
- }
28171
- /** Query filter for retrieving audit events. */
28172
- interface AuditQuery {
28173
- readonly type?: AuditEvent['type'];
28174
- readonly since?: string;
28175
- readonly until?: string;
28176
- readonly trustTier?: TrustTier;
28177
- readonly limit?: number;
28178
- }
28179
- /**
28180
- * Append-only audit trail for security pipeline decisions.
28181
- * Events are bounded by MAX_EVENTS to prevent unbounded growth.
28182
- */
28183
- declare class AuditTrail {
28184
- private events;
28185
- private nextId;
28186
- /** Appends an event to the trail. Returns the assigned event ID. */
28187
- append(event: Omit<AuditEvent, 'id' | 'timestamp'>): string;
28188
- /** Queries events matching the given filter. */
28189
- query(filter?: AuditQuery): readonly AuditEvent[];
28190
- /** Returns the total number of events. */
28191
- get size(): number;
28192
- /** Clears all events. */
28193
- clear(): void;
28194
- /** Enforces MAX_EVENTS bound. */
28195
- private enforceLimit;
28196
- }
28197
- /**
28198
- * Records a trust classification decision.
28199
- */
28200
- declare function emitTrustEvent(trail: AuditTrail, data: Omit<TrustClassificationEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
28201
- /**
28202
- * Records a policy gate evaluation.
28203
- */
28204
- declare function emitPolicyEvent(trail: AuditTrail, data: Omit<PolicyGateEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
28205
- /**
28206
- * Records a corroboration validation.
28207
- */
28208
- declare function emitCorroborationEvent(trail: AuditTrail, data: Omit<CorroborationEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
28209
- /**
28210
- * Records a reputation assessment.
28211
- */
28212
- declare function emitReputationEvent(trail: AuditTrail, data: Omit<ReputationEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
28213
- /**
28214
- * Records an input sanitization result.
28215
- */
28216
- declare function emitSanitizationEvent(trail: AuditTrail, data: Omit<SanitizationEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
28217
- /**
28218
- * Records a graph execution lifecycle event.
28219
- */
28220
- declare function emitGraphExecutionEvent(trail: AuditTrail, data: Omit<GraphExecutionAuditEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
28221
- /**
28222
- * Creates an onEvent callback that bridges graph events to the audit trail.
28223
- * Pass the returned function as `onEvent` in GraphExecuteOptions.
28224
- *
28225
- * @example
28226
- * const trail = createAuditTrail();
28227
- * await executeGraph(graph, inputs, { onEvent: createGraphAuditBridge(trail) });
28228
- */
28229
- declare function createGraphAuditBridge(trail: AuditTrail): (event: {
28230
- readonly type: string;
28231
- readonly [key: string]: unknown;
28232
- }) => void;
28233
- /** Creates a new AuditTrail instance. */
28234
- declare function createAuditTrail(): AuditTrail;
28235
-
28236
28236
  /**
28237
28237
  * nexus-agents/security/firewall - Types
28238
28238
  *
@@ -28345,6 +28345,14 @@ interface FirewallResult {
28345
28345
  */
28346
28346
  readonly effectiveTrustTier: TrustTier;
28347
28347
  readonly atl: string;
28348
+ /**
28349
+ * Rule-of-Two assessment surfaced by the `policyEnforcement` stage (#3198):
28350
+ * present (with `severity: 'block'`) when the effective tier is untrusted AND
28351
+ * the configured context has both write and secret access. The firewall is a
28352
+ * signal provider — it SURFACES this for the consumer to enforce; it does not
28353
+ * hard-block. `undefined` when the stage is disabled or the rule holds.
28354
+ */
28355
+ readonly ruleOfTwoViolation?: Violation;
28348
28356
  readonly auditEvents: readonly {
28349
28357
  readonly id: string;
28350
28358
  readonly type: string;
@@ -28362,6 +28370,7 @@ declare class HostileInputFirewall {
28362
28370
  private readonly adapter;
28363
28371
  private readonly reputationCache;
28364
28372
  private readonly auditTrail;
28373
+ private readonly context;
28365
28374
  constructor(config: FirewallConfig);
28366
28375
  /**
28367
28376
  * Processes untrusted input through the firewall pipeline.
@@ -29828,6 +29837,12 @@ declare function createCorrelationTracker(config?: Partial<HigherOrderVotingConf
29828
29837
  /** Options for creating OWVoting instance. */
29829
29838
  interface OWVotingOptions {
29830
29839
  readonly config?: Partial<HigherOrderVotingConfig>;
29840
+ /**
29841
+ * Algorithm label this instance reports (#3168). Defaults to `simple_majority`
29842
+ * for backward compatibility; `HigherOrderVotingStrategy` sets `opinion_wise`.
29843
+ * Keeps the label consistent whether constructed directly or via a factory.
29844
+ */
29845
+ readonly algorithm?: ConsensusAlgorithm;
29831
29846
  }
29832
29847
  /**
29833
29848
  * Opinion-Wise higher-order voting implementation.
@@ -29854,7 +29869,6 @@ declare function createOWVoting(options?: OWVotingOptions): IHigherOrderVoting;
29854
29869
  * Wraps OWVoting to provide IVotingStrategy interface.
29855
29870
  */
29856
29871
  declare class HigherOrderVotingStrategy extends OWVoting implements IVotingStrategy {
29857
- readonly algorithm: ConsensusAlgorithm;
29858
29872
  constructor(options?: OWVotingOptions);
29859
29873
  }
29860
29874
  /** Creates a higher-order voting strategy for use with ConsensusEngine. */