nexus-agents 2.92.3 → 2.92.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{child-mcp-config-WUHKXBWX.js → child-mcp-config-PIDVHWJ7.js} +2 -2
- package/dist/{chunk-57HMLBYN.js → chunk-2QJJYCPD.js} +2 -2
- package/dist/{chunk-VYNNVUY6.js → chunk-3TU3RJNK.js} +3 -3
- package/dist/{chunk-V3XWWLIS.js → chunk-3XC5LFWH.js} +5 -5
- package/dist/{chunk-C6PEYEPU.js → chunk-BG4WK4UP.js} +170 -6
- package/dist/chunk-BG4WK4UP.js.map +1 -0
- package/dist/{chunk-X5BQF6HM.js → chunk-DNSBKQ7I.js} +4 -4
- package/dist/{chunk-EAT4GTMT.js → chunk-DQEREDUW.js} +2 -2
- package/dist/{chunk-3FVSYMHK.js → chunk-DSERRMPX.js} +2 -2
- package/dist/{chunk-3LKW4IEW.js → chunk-EI2E43HI.js} +3 -3
- package/dist/{chunk-7QXEK3O6.js → chunk-FL3AXIUL.js} +4 -4
- package/dist/{chunk-S6FXRXYE.js → chunk-G55LVPNH.js} +7 -7
- package/dist/{chunk-52ACUN6T.js → chunk-GKFFRRS4.js} +4 -4
- package/dist/{chunk-7UPXKDF2.js → chunk-KTJUMU2A.js} +40 -191
- package/dist/chunk-KTJUMU2A.js.map +1 -0
- package/dist/{chunk-W5I6L4UT.js → chunk-L5BXCSMP.js} +10 -3
- package/dist/{chunk-W5I6L4UT.js.map → chunk-L5BXCSMP.js.map} +1 -1
- package/dist/{chunk-JYIKPBXW.js → chunk-MBK6P4VV.js} +2 -2
- package/dist/{chunk-UYOHV3EG.js → chunk-NYWZI46K.js} +53 -32
- package/dist/chunk-NYWZI46K.js.map +1 -0
- package/dist/{chunk-YEQE7WLP.js → chunk-OXLXVSN3.js} +2 -2
- package/dist/{chunk-CGSVTROC.js → chunk-P646QQYW.js} +2 -2
- package/dist/{chunk-3HTUYAKS.js → chunk-PIDABDFE.js} +2 -2
- package/dist/{chunk-AQTHLUCP.js → chunk-QADQ4LN4.js} +2 -2
- package/dist/{chunk-TWAH7VM2.js → chunk-QQMYKFG7.js} +3 -3
- package/dist/{chunk-BFYOPX2E.js → chunk-QXGLZETS.js} +7 -7
- package/dist/{chunk-Y7E5ZWRQ.js → chunk-SIICMKBA.js} +2 -2
- package/dist/{chunk-E6W4Z6GN.js → chunk-TOQJ3UN5.js} +3 -3
- package/dist/{chunk-6Q33PBXC.js → chunk-U4RLBLNO.js} +2 -2
- package/dist/{chunk-27CNQPQ4.js → chunk-VBIAMMZZ.js} +2 -2
- package/dist/{chunk-4GOT42ZA.js → chunk-VU54VB6K.js} +3 -3
- package/dist/{chunk-2SMTCNXP.js → chunk-WXEMTPML.js} +2 -2
- package/dist/{chunk-SFZESA5O.js → chunk-YJUHVQSG.js} +2 -2
- package/dist/{chunk-EFHZHCF2.js → chunk-YQAS2EGR.js} +2 -2
- package/dist/{chunk-PRGNJRID.js → chunk-ZYYU26YH.js} +2 -2
- package/dist/{cli-circuit-breaker-4SWB6DEB.js → cli-circuit-breaker-HFSOBCPK.js} +4 -4
- package/dist/cli.js +36 -36
- package/dist/{composite-router-NLVKSTA2.js → composite-router-T2XYCQOU.js} +2 -2
- package/dist/{consensus-vote-VSRNSZ5J.js → consensus-vote-IDHQVKX2.js} +12 -12
- package/dist/{context-retriever-C4CNVKR5.js → context-retriever-5BJYPAX7.js} +6 -6
- package/dist/{doctor-deep-QSVGAHAO.js → doctor-deep-OVGRBG3Z.js} +3 -3
- package/dist/{expert-bridge-VIWFPPGZ.js → expert-bridge-JPTHFWPW.js} +4 -4
- package/dist/{factory-T3SEZUGW.js → factory-734UWF4C.js} +5 -5
- package/dist/{factory-NNSXCD25.js → factory-NE7SNW7V.js} +5 -5
- package/dist/index.d.ts +173 -157
- package/dist/index.js +74 -57
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-WEKHD7YE.js → init-opencode-2ZBDJILW.js} +5 -5
- package/dist/{issue-triage-DTCO26WG.js → issue-triage-AGGTH767.js} +5 -5
- package/dist/{pr-reviewer-helpers-CI72F4XM.js → pr-reviewer-helpers-WGPLUXPU.js} +4 -4
- package/dist/{registry-command-VNFULRTL.js → registry-command-CZZM5SF2.js} +2 -2
- package/dist/{repo-security-plan-5MFY7GGQ.js → repo-security-plan-X42KXHT2.js} +3 -3
- package/dist/{research-helpers-synthesize-CNZ4C3FN.js → research-helpers-synthesize-C7YGRQI6.js} +3 -3
- package/dist/{routing-memory-PYO46COZ.js → routing-memory-2FYZDQUC.js} +2 -2
- package/dist/{session-memory-HGCDSZ5R.js → session-memory-53NZRZB6.js} +3 -3
- package/dist/{setup-command-JQVGMAO5.js → setup-command-ZV6VZLP4.js} +11 -11
- package/dist/{setup-config-QPS4K5QU.js → setup-config-CYRK4UFF.js} +3 -3
- package/dist/{setup-custom-api-SP2ZAVGC.js → setup-custom-api-GXHPYLDR.js} +4 -4
- package/dist/{tool-memory-SDPIAV2S.js → tool-memory-AX5G67J6.js} +5 -5
- package/dist/{weather-report-RWAMQHBL.js → weather-report-AUMNGHYZ.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-7UPXKDF2.js.map +0 -1
- package/dist/chunk-C6PEYEPU.js.map +0 -1
- package/dist/chunk-UYOHV3EG.js.map +0 -1
- /package/dist/{child-mcp-config-WUHKXBWX.js.map → child-mcp-config-PIDVHWJ7.js.map} +0 -0
- /package/dist/{chunk-57HMLBYN.js.map → chunk-2QJJYCPD.js.map} +0 -0
- /package/dist/{chunk-VYNNVUY6.js.map → chunk-3TU3RJNK.js.map} +0 -0
- /package/dist/{chunk-V3XWWLIS.js.map → chunk-3XC5LFWH.js.map} +0 -0
- /package/dist/{chunk-X5BQF6HM.js.map → chunk-DNSBKQ7I.js.map} +0 -0
- /package/dist/{chunk-EAT4GTMT.js.map → chunk-DQEREDUW.js.map} +0 -0
- /package/dist/{chunk-3FVSYMHK.js.map → chunk-DSERRMPX.js.map} +0 -0
- /package/dist/{chunk-3LKW4IEW.js.map → chunk-EI2E43HI.js.map} +0 -0
- /package/dist/{chunk-7QXEK3O6.js.map → chunk-FL3AXIUL.js.map} +0 -0
- /package/dist/{chunk-S6FXRXYE.js.map → chunk-G55LVPNH.js.map} +0 -0
- /package/dist/{chunk-52ACUN6T.js.map → chunk-GKFFRRS4.js.map} +0 -0
- /package/dist/{chunk-JYIKPBXW.js.map → chunk-MBK6P4VV.js.map} +0 -0
- /package/dist/{chunk-YEQE7WLP.js.map → chunk-OXLXVSN3.js.map} +0 -0
- /package/dist/{chunk-CGSVTROC.js.map → chunk-P646QQYW.js.map} +0 -0
- /package/dist/{chunk-3HTUYAKS.js.map → chunk-PIDABDFE.js.map} +0 -0
- /package/dist/{chunk-AQTHLUCP.js.map → chunk-QADQ4LN4.js.map} +0 -0
- /package/dist/{chunk-TWAH7VM2.js.map → chunk-QQMYKFG7.js.map} +0 -0
- /package/dist/{chunk-BFYOPX2E.js.map → chunk-QXGLZETS.js.map} +0 -0
- /package/dist/{chunk-Y7E5ZWRQ.js.map → chunk-SIICMKBA.js.map} +0 -0
- /package/dist/{chunk-E6W4Z6GN.js.map → chunk-TOQJ3UN5.js.map} +0 -0
- /package/dist/{chunk-6Q33PBXC.js.map → chunk-U4RLBLNO.js.map} +0 -0
- /package/dist/{chunk-27CNQPQ4.js.map → chunk-VBIAMMZZ.js.map} +0 -0
- /package/dist/{chunk-4GOT42ZA.js.map → chunk-VU54VB6K.js.map} +0 -0
- /package/dist/{chunk-2SMTCNXP.js.map → chunk-WXEMTPML.js.map} +0 -0
- /package/dist/{chunk-SFZESA5O.js.map → chunk-YJUHVQSG.js.map} +0 -0
- /package/dist/{chunk-EFHZHCF2.js.map → chunk-YQAS2EGR.js.map} +0 -0
- /package/dist/{chunk-PRGNJRID.js.map → chunk-ZYYU26YH.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-4SWB6DEB.js.map → cli-circuit-breaker-HFSOBCPK.js.map} +0 -0
- /package/dist/{composite-router-NLVKSTA2.js.map → composite-router-T2XYCQOU.js.map} +0 -0
- /package/dist/{consensus-vote-VSRNSZ5J.js.map → consensus-vote-IDHQVKX2.js.map} +0 -0
- /package/dist/{context-retriever-C4CNVKR5.js.map → context-retriever-5BJYPAX7.js.map} +0 -0
- /package/dist/{doctor-deep-QSVGAHAO.js.map → doctor-deep-OVGRBG3Z.js.map} +0 -0
- /package/dist/{expert-bridge-VIWFPPGZ.js.map → expert-bridge-JPTHFWPW.js.map} +0 -0
- /package/dist/{factory-NNSXCD25.js.map → factory-734UWF4C.js.map} +0 -0
- /package/dist/{factory-T3SEZUGW.js.map → factory-NE7SNW7V.js.map} +0 -0
- /package/dist/{init-opencode-WEKHD7YE.js.map → init-opencode-2ZBDJILW.js.map} +0 -0
- /package/dist/{issue-triage-DTCO26WG.js.map → issue-triage-AGGTH767.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-CI72F4XM.js.map → pr-reviewer-helpers-WGPLUXPU.js.map} +0 -0
- /package/dist/{registry-command-VNFULRTL.js.map → registry-command-CZZM5SF2.js.map} +0 -0
- /package/dist/{repo-security-plan-5MFY7GGQ.js.map → repo-security-plan-X42KXHT2.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-CNZ4C3FN.js.map → research-helpers-synthesize-C7YGRQI6.js.map} +0 -0
- /package/dist/{routing-memory-PYO46COZ.js.map → routing-memory-2FYZDQUC.js.map} +0 -0
- /package/dist/{session-memory-HGCDSZ5R.js.map → session-memory-53NZRZB6.js.map} +0 -0
- /package/dist/{setup-command-JQVGMAO5.js.map → setup-command-ZV6VZLP4.js.map} +0 -0
- /package/dist/{setup-config-QPS4K5QU.js.map → setup-config-CYRK4UFF.js.map} +0 -0
- /package/dist/{setup-custom-api-SP2ZAVGC.js.map → setup-custom-api-GXHPYLDR.js.map} +0 -0
- /package/dist/{tool-memory-SDPIAV2S.js.map → tool-memory-AX5G67J6.js.map} +0 -0
- /package/dist/{weather-report-RWAMQHBL.js.map → weather-report-AUMNGHYZ.js.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createGitHubProvider,
|
|
3
3
|
createScmProvider
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-GKFFRRS4.js";
|
|
5
|
+
import "./chunk-DQEREDUW.js";
|
|
6
|
+
import "./chunk-YQAS2EGR.js";
|
|
7
|
+
import "./chunk-L5BXCSMP.js";
|
|
8
8
|
import "./chunk-CH7QIDHQ.js";
|
|
9
9
|
import "./chunk-PR4QN5HX.js";
|
|
10
10
|
export {
|
|
11
11
|
createGitHubProvider,
|
|
12
12
|
createScmProvider
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=factory-
|
|
14
|
+
//# sourceMappingURL=factory-NE7SNW7V.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -2576,6 +2576,8 @@ declare const TaskOutcomeSchema$2: z.ZodObject<{
|
|
|
2576
2576
|
family: z.ZodOptional<z.ZodString>;
|
|
2577
2577
|
voterRole: z.ZodOptional<z.ZodString>;
|
|
2578
2578
|
baselineId: z.ZodOptional<z.ZodString>;
|
|
2579
|
+
traceId: z.ZodOptional<z.ZodString>;
|
|
2580
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
2579
2581
|
}, z.core.$strip>;
|
|
2580
2582
|
/** Schema for filtering outcomes. */
|
|
2581
2583
|
declare const OutcomeQuerySchema: z.ZodObject<{
|
|
@@ -27879,6 +27881,161 @@ declare function isMutatingAction(actionType: AgentActionType): boolean;
|
|
|
27879
27881
|
*/
|
|
27880
27882
|
declare function requiresCitation(actionType: AgentActionType): boolean;
|
|
27881
27883
|
|
|
27884
|
+
/**
|
|
27885
|
+
* nexus-agents/security - Audit Trail
|
|
27886
|
+
*
|
|
27887
|
+
* Machine-readable JSON audit events for security pipeline decisions.
|
|
27888
|
+
* Every trust classification, policy gate decision, corroboration check,
|
|
27889
|
+
* and reputation assessment is recorded as a structured event.
|
|
27890
|
+
*
|
|
27891
|
+
* Satisfies CLAUDE.md requirement: "Every action on untrusted input must
|
|
27892
|
+
* log: trust tier, sources cited, policy gate decision, stripped content."
|
|
27893
|
+
*
|
|
27894
|
+
* @module security/audit-trail
|
|
27895
|
+
* (Source: Issue #832 — Security audit trail)
|
|
27896
|
+
*/
|
|
27897
|
+
|
|
27898
|
+
/**
|
|
27899
|
+
* Discriminated union of audit event types.
|
|
27900
|
+
* Each event captures a single security pipeline decision.
|
|
27901
|
+
*/
|
|
27902
|
+
type AuditEvent = TrustClassificationEvent | PolicyGateEvent | CorroborationEvent | ReputationEvent | SanitizationEvent | GraphExecutionAuditEvent;
|
|
27903
|
+
/** Base fields shared by all audit events. */
|
|
27904
|
+
interface AuditEventBase {
|
|
27905
|
+
readonly id: string;
|
|
27906
|
+
readonly timestamp: string;
|
|
27907
|
+
readonly component: string;
|
|
27908
|
+
}
|
|
27909
|
+
/** Trust classification decision. */
|
|
27910
|
+
interface TrustClassificationEvent extends AuditEventBase {
|
|
27911
|
+
readonly type: 'trust_classification';
|
|
27912
|
+
readonly username: string;
|
|
27913
|
+
readonly assignedTier: TrustTier;
|
|
27914
|
+
readonly userRole: string;
|
|
27915
|
+
readonly isAllowlisted: boolean;
|
|
27916
|
+
readonly wasDowngraded: boolean;
|
|
27917
|
+
readonly reason: string;
|
|
27918
|
+
}
|
|
27919
|
+
/** Policy gate evaluation result. */
|
|
27920
|
+
interface PolicyGateEvent extends AuditEventBase {
|
|
27921
|
+
readonly type: 'policy_gate';
|
|
27922
|
+
readonly actionType: AgentActionType;
|
|
27923
|
+
readonly allowed: boolean;
|
|
27924
|
+
readonly requiresApproval: boolean;
|
|
27925
|
+
readonly inputTrustTier: TrustTier;
|
|
27926
|
+
readonly violationRules: readonly string[];
|
|
27927
|
+
}
|
|
27928
|
+
/** Corroboration validation result. */
|
|
27929
|
+
interface CorroborationEvent extends AuditEventBase {
|
|
27930
|
+
readonly type: 'corroboration';
|
|
27931
|
+
readonly actionType: AgentActionType;
|
|
27932
|
+
readonly satisfied: boolean;
|
|
27933
|
+
readonly sourceCount: number;
|
|
27934
|
+
readonly missingRequirements: readonly string[];
|
|
27935
|
+
}
|
|
27936
|
+
/** Reputation assessment result. */
|
|
27937
|
+
interface ReputationEvent extends AuditEventBase {
|
|
27938
|
+
readonly type: 'reputation';
|
|
27939
|
+
readonly username: string;
|
|
27940
|
+
readonly reputationScore: number;
|
|
27941
|
+
readonly isSuspicious: boolean;
|
|
27942
|
+
readonly effectiveTier: TrustTier;
|
|
27943
|
+
readonly signalCount: number;
|
|
27944
|
+
}
|
|
27945
|
+
/** Summary of a single element stripped during sanitization. */
|
|
27946
|
+
interface StrippedElementSummary {
|
|
27947
|
+
/** Truncated tag text (≤30 chars + '...' from the sanitizer). */
|
|
27948
|
+
readonly tag: string;
|
|
27949
|
+
/** Reason the element was removed (e.g. 'Trail of Bits injection vector'). */
|
|
27950
|
+
readonly reason: string;
|
|
27951
|
+
}
|
|
27952
|
+
/** Input sanitization result. */
|
|
27953
|
+
interface SanitizationEvent extends AuditEventBase {
|
|
27954
|
+
readonly type: 'sanitization';
|
|
27955
|
+
readonly source: string;
|
|
27956
|
+
readonly wasModified: boolean;
|
|
27957
|
+
readonly strippedCount: number;
|
|
27958
|
+
readonly injectionFlagCount: number;
|
|
27959
|
+
/**
|
|
27960
|
+
* Per-element tag/reason details, truncated to at most
|
|
27961
|
+
* MAX_STRIPPED_ELEMENTS_PER_EVENT entries. Required by CLAUDE.md's
|
|
27962
|
+
* Untrusted Input Policy: "Log stripped elements for audit trail."
|
|
27963
|
+
*/
|
|
27964
|
+
readonly strippedElements: readonly StrippedElementSummary[];
|
|
27965
|
+
}
|
|
27966
|
+
/** Graph execution lifecycle event (Issue #839). */
|
|
27967
|
+
interface GraphExecutionAuditEvent extends AuditEventBase {
|
|
27968
|
+
readonly type: 'graph_execution';
|
|
27969
|
+
readonly graphEvent: string;
|
|
27970
|
+
readonly nodeId?: string;
|
|
27971
|
+
readonly stepNumber: number;
|
|
27972
|
+
readonly detail: string;
|
|
27973
|
+
}
|
|
27974
|
+
/** Query filter for retrieving audit events. */
|
|
27975
|
+
interface AuditQuery {
|
|
27976
|
+
readonly type?: AuditEvent['type'];
|
|
27977
|
+
readonly since?: string;
|
|
27978
|
+
readonly until?: string;
|
|
27979
|
+
readonly trustTier?: TrustTier;
|
|
27980
|
+
readonly limit?: number;
|
|
27981
|
+
}
|
|
27982
|
+
/**
|
|
27983
|
+
* Append-only audit trail for security pipeline decisions.
|
|
27984
|
+
* Events are bounded by MAX_EVENTS to prevent unbounded growth.
|
|
27985
|
+
*/
|
|
27986
|
+
declare class AuditTrail {
|
|
27987
|
+
private events;
|
|
27988
|
+
private nextId;
|
|
27989
|
+
/** Appends an event to the trail. Returns the assigned event ID. */
|
|
27990
|
+
append(event: Omit<AuditEvent, 'id' | 'timestamp'>): string;
|
|
27991
|
+
/** Queries events matching the given filter. */
|
|
27992
|
+
query(filter?: AuditQuery): readonly AuditEvent[];
|
|
27993
|
+
/** Returns the total number of events. */
|
|
27994
|
+
get size(): number;
|
|
27995
|
+
/** Clears all events. */
|
|
27996
|
+
clear(): void;
|
|
27997
|
+
/** Enforces MAX_EVENTS bound. */
|
|
27998
|
+
private enforceLimit;
|
|
27999
|
+
}
|
|
28000
|
+
/**
|
|
28001
|
+
* Records a trust classification decision.
|
|
28002
|
+
*/
|
|
28003
|
+
declare function emitTrustEvent(trail: AuditTrail, data: Omit<TrustClassificationEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
|
|
28004
|
+
/**
|
|
28005
|
+
* Records a policy gate evaluation.
|
|
28006
|
+
*/
|
|
28007
|
+
declare function emitPolicyEvent(trail: AuditTrail, data: Omit<PolicyGateEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
|
|
28008
|
+
/**
|
|
28009
|
+
* Records a corroboration validation.
|
|
28010
|
+
*/
|
|
28011
|
+
declare function emitCorroborationEvent(trail: AuditTrail, data: Omit<CorroborationEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
|
|
28012
|
+
/**
|
|
28013
|
+
* Records a reputation assessment.
|
|
28014
|
+
*/
|
|
28015
|
+
declare function emitReputationEvent(trail: AuditTrail, data: Omit<ReputationEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
|
|
28016
|
+
/**
|
|
28017
|
+
* Records an input sanitization result.
|
|
28018
|
+
*/
|
|
28019
|
+
declare function emitSanitizationEvent(trail: AuditTrail, data: Omit<SanitizationEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
|
|
28020
|
+
/**
|
|
28021
|
+
* Records a graph execution lifecycle event.
|
|
28022
|
+
*/
|
|
28023
|
+
declare function emitGraphExecutionEvent(trail: AuditTrail, data: Omit<GraphExecutionAuditEvent, 'id' | 'timestamp' | 'type' | 'component'>): string;
|
|
28024
|
+
/**
|
|
28025
|
+
* Creates an onEvent callback that bridges graph events to the audit trail.
|
|
28026
|
+
* Pass the returned function as `onEvent` in GraphExecuteOptions.
|
|
28027
|
+
*
|
|
28028
|
+
* @example
|
|
28029
|
+
* const trail = createAuditTrail();
|
|
28030
|
+
* await executeGraph(graph, inputs, { onEvent: createGraphAuditBridge(trail) });
|
|
28031
|
+
*/
|
|
28032
|
+
declare function createGraphAuditBridge(trail: AuditTrail): (event: {
|
|
28033
|
+
readonly type: string;
|
|
28034
|
+
readonly [key: string]: unknown;
|
|
28035
|
+
}) => void;
|
|
28036
|
+
/** Creates a new AuditTrail instance. */
|
|
28037
|
+
declare function createAuditTrail(): AuditTrail;
|
|
28038
|
+
|
|
27882
28039
|
/**
|
|
27883
28040
|
* nexus-agents/security - Policy Gate
|
|
27884
28041
|
*
|
|
@@ -27941,7 +28098,7 @@ interface ActionContext {
|
|
|
27941
28098
|
* @param context - The current execution context.
|
|
27942
28099
|
* @returns PolicyDecision with violations and approval requirements.
|
|
27943
28100
|
*/
|
|
27944
|
-
declare function evaluatePolicy$1(action: AgentAction, context: ActionContext): PolicyDecision$1;
|
|
28101
|
+
declare function evaluatePolicy$1(action: AgentAction, context: ActionContext, auditTrail?: AuditTrail): PolicyDecision$1;
|
|
27945
28102
|
/**
|
|
27946
28103
|
* Quick check: can this action type proceed at all given the input trust tier?
|
|
27947
28104
|
* Useful for early rejection before full policy evaluation.
|
|
@@ -28078,161 +28235,6 @@ declare class ReputationCache {
|
|
|
28078
28235
|
*/
|
|
28079
28236
|
declare function assessReputation(metadata: GitHubUserMetadata, cache?: ReputationCache): ReputationAssessment;
|
|
28080
28237
|
|
|
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
28238
|
/**
|
|
28237
28239
|
* nexus-agents/security/firewall - Types
|
|
28238
28240
|
*
|
|
@@ -28345,6 +28347,14 @@ interface FirewallResult {
|
|
|
28345
28347
|
*/
|
|
28346
28348
|
readonly effectiveTrustTier: TrustTier;
|
|
28347
28349
|
readonly atl: string;
|
|
28350
|
+
/**
|
|
28351
|
+
* Rule-of-Two assessment surfaced by the `policyEnforcement` stage (#3198):
|
|
28352
|
+
* present (with `severity: 'block'`) when the effective tier is untrusted AND
|
|
28353
|
+
* the configured context has both write and secret access. The firewall is a
|
|
28354
|
+
* signal provider — it SURFACES this for the consumer to enforce; it does not
|
|
28355
|
+
* hard-block. `undefined` when the stage is disabled or the rule holds.
|
|
28356
|
+
*/
|
|
28357
|
+
readonly ruleOfTwoViolation?: Violation;
|
|
28348
28358
|
readonly auditEvents: readonly {
|
|
28349
28359
|
readonly id: string;
|
|
28350
28360
|
readonly type: string;
|
|
@@ -28362,6 +28372,7 @@ declare class HostileInputFirewall {
|
|
|
28362
28372
|
private readonly adapter;
|
|
28363
28373
|
private readonly reputationCache;
|
|
28364
28374
|
private readonly auditTrail;
|
|
28375
|
+
private readonly context;
|
|
28365
28376
|
constructor(config: FirewallConfig);
|
|
28366
28377
|
/**
|
|
28367
28378
|
* Processes untrusted input through the firewall pipeline.
|
|
@@ -29828,6 +29839,12 @@ declare function createCorrelationTracker(config?: Partial<HigherOrderVotingConf
|
|
|
29828
29839
|
/** Options for creating OWVoting instance. */
|
|
29829
29840
|
interface OWVotingOptions {
|
|
29830
29841
|
readonly config?: Partial<HigherOrderVotingConfig>;
|
|
29842
|
+
/**
|
|
29843
|
+
* Algorithm label this instance reports (#3168). Defaults to `simple_majority`
|
|
29844
|
+
* for backward compatibility; `HigherOrderVotingStrategy` sets `opinion_wise`.
|
|
29845
|
+
* Keeps the label consistent whether constructed directly or via a factory.
|
|
29846
|
+
*/
|
|
29847
|
+
readonly algorithm?: ConsensusAlgorithm;
|
|
29831
29848
|
}
|
|
29832
29849
|
/**
|
|
29833
29850
|
* Opinion-Wise higher-order voting implementation.
|
|
@@ -29854,7 +29871,6 @@ declare function createOWVoting(options?: OWVotingOptions): IHigherOrderVoting;
|
|
|
29854
29871
|
* Wraps OWVoting to provide IVotingStrategy interface.
|
|
29855
29872
|
*/
|
|
29856
29873
|
declare class HigherOrderVotingStrategy extends OWVoting implements IVotingStrategy {
|
|
29857
|
-
readonly algorithm: ConsensusAlgorithm;
|
|
29858
29874
|
constructor(options?: OWVotingOptions);
|
|
29859
29875
|
}
|
|
29860
29876
|
/** Creates a higher-order voting strategy for use with ConsensusEngine. */
|