nexus-agents 8.59.1 → 8.60.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.
- package/dist/{ast-rule-runner-AGCWR6GP.js → ast-rule-runner-PEV2AVO5.js} +3 -3
- package/dist/{child-mcp-config-DX6SMLBF.js → child-mcp-config-MTOYKXU5.js} +2 -2
- package/dist/{chunk-HQQTTJL5.js → chunk-3BBRLDAA.js} +4 -4
- package/dist/{chunk-VTY6MN7E.js → chunk-5B3VEC52.js} +2 -2
- package/dist/{chunk-NRIH6GVC.js → chunk-5ZVGPKNO.js} +206 -13
- package/dist/chunk-5ZVGPKNO.js.map +1 -0
- package/dist/{chunk-R674GL6F.js → chunk-62DXM63I.js} +2 -2
- package/dist/{chunk-XCNNF3HH.js → chunk-64V76CYP.js} +2 -2
- package/dist/{chunk-BM3YNQKB.js → chunk-6IKX6JRV.js} +2 -2
- package/dist/{chunk-FBPDKI4Y.js → chunk-6WY5JV4V.js} +2 -2
- package/dist/{chunk-2AHN3RGZ.js → chunk-7E64JQOK.js} +2 -2
- package/dist/{chunk-IEYL7WMY.js → chunk-7MPCTKXP.js} +2 -2
- package/dist/{chunk-4FK3FGFI.js → chunk-AA5GWFVO.js} +2 -2
- package/dist/{chunk-PLCJRWLF.js → chunk-BBJ4VKDI.js} +29 -8
- package/dist/chunk-BBJ4VKDI.js.map +1 -0
- package/dist/{chunk-BYDAXNOG.js → chunk-C5CRQ5EH.js} +2 -2
- package/dist/{chunk-KLTLIQOC.js → chunk-CFHZF7BA.js} +44 -8
- package/dist/{chunk-KLTLIQOC.js.map → chunk-CFHZF7BA.js.map} +1 -1
- package/dist/{chunk-LRTSKTJJ.js → chunk-D4TL5SYZ.js} +8 -8
- package/dist/{chunk-UX2SOSH3.js → chunk-DIV6TBCN.js} +2 -2
- package/dist/{chunk-AVDNDDIN.js → chunk-E3QCG3PA.js} +5 -5
- package/dist/{chunk-WCZXHWLH.js → chunk-EICGXNLI.js} +2 -2
- package/dist/{chunk-KLZUZSON.js → chunk-GAEQEVSJ.js} +90 -43
- package/dist/chunk-GAEQEVSJ.js.map +1 -0
- package/dist/{chunk-TNRG3PNO.js → chunk-HMKX2LPT.js} +35 -300
- package/dist/chunk-HMKX2LPT.js.map +1 -0
- package/dist/{chunk-FZKP5NBV.js → chunk-KWRAT327.js} +2 -2
- package/dist/{chunk-JJR5HS4N.js → chunk-L6ZP2JI4.js} +3 -3
- package/dist/{chunk-B6DA6DX3.js → chunk-NR7PD4GN.js} +2 -2
- package/dist/{chunk-B4UNELI4.js → chunk-O24AWSIT.js} +9 -9
- package/dist/{chunk-7FULJKWG.js → chunk-ONH6NHD3.js} +2 -2
- package/dist/{chunk-TH4GPVHL.js → chunk-PBWRX22Z.js} +4 -4
- package/dist/{chunk-QHTZS3P7.js → chunk-QBVYOOEI.js} +7 -7
- package/dist/{chunk-IKCHWNE3.js → chunk-R4VZMGMA.js} +5 -5
- package/dist/{chunk-LDTHAGPF.js → chunk-R4YKACBW.js} +67 -16
- package/dist/chunk-R4YKACBW.js.map +1 -0
- package/dist/{chunk-G6XYLKH4.js → chunk-SYMBCL34.js} +3 -3
- package/dist/{chunk-YQVIROWH.js → chunk-TZN2E2WI.js} +2 -2
- package/dist/{chunk-2NOGUBQR.js → chunk-VVE5IENL.js} +2 -2
- package/dist/{chunk-MFOX2VZD.js → chunk-W7WDVF4C.js} +3 -3
- package/dist/{chunk-OP3TBV63.js → chunk-XOW6X7DI.js} +2 -2
- package/dist/{chunk-K3K4TOBA.js → chunk-Y5V2ZZOL.js} +9 -9
- package/dist/{cli-circuit-breaker-A76BGMMF.js → cli-circuit-breaker-2YZTGJAV.js} +3 -3
- package/dist/cli.js +43 -44
- package/dist/cli.js.map +1 -1
- package/dist/{composite-router-6O32SNKU.js → composite-router-XSZBOTIS.js} +2 -2
- package/dist/{consensus-vote-6K54HCI5.js → consensus-vote-2G4X4JVF.js} +16 -17
- package/dist/{context-retriever-523QPORD.js → context-retriever-DORWMNEG.js} +8 -8
- package/dist/{doctor-deep-EKGP6OPT.js → doctor-deep-ANFQPN36.js} +3 -3
- package/dist/{doctor-live-6WX2Y27P.js → doctor-live-ZY3L3EIM.js} +10 -10
- package/dist/{expert-bridge-SXREWFK6.js → expert-bridge-3QE5C2MQ.js} +4 -4
- package/dist/{factory-CDTCMMA6.js → factory-CLBGEM5X.js} +9 -9
- package/dist/{factory-HE6H5EY5.js → factory-PQONDJGG.js} +5 -5
- package/dist/{improvement-review-VE3B65NP.js → improvement-review-UG7RUEUT.js} +5 -6
- package/dist/index.d.ts +107 -10
- package/dist/index.js +40 -42
- package/dist/index.js.map +1 -1
- package/dist/{init-opencode-VLINA4BR.js → init-opencode-Y3BGDPL5.js} +6 -6
- package/dist/issue-triage-CGMODLMK.js +16 -0
- package/dist/{pr-reviewer-helpers-M23OXFLJ.js → pr-reviewer-helpers-JJGTRRKA.js} +4 -4
- package/dist/{registry-command-EVAF5WH5.js → registry-command-BFJ5SS4N.js} +2 -2
- package/dist/{repo-security-plan-4KLWND3J.js → repo-security-plan-HWAWALIF.js} +3 -3
- package/dist/{research-helpers-synthesize-32PUDB2Z.js → research-helpers-synthesize-VUJPS27Z.js} +4 -4
- package/dist/{routing-memory-7SEXK6KH.js → routing-memory-U3FJQGLV.js} +2 -2
- package/dist/{session-memory-5NFVIGCZ.js → session-memory-U3PFLUJR.js} +3 -3
- package/dist/{setup-config-SHVOW5FM.js → setup-config-U5TY4WDO.js} +3 -3
- package/dist/{setup-custom-api-UZ7REE3U.js → setup-custom-api-WK5KA3PE.js} +4 -4
- package/dist/setup-data-dir-LLB3HLXF.js +31 -0
- package/dist/{tool-memory-ZQK7CXZ4.js → tool-memory-PINER2OP.js} +5 -5
- package/dist/{unified-registry-AB3UDBKE.js → unified-registry-ZAKGP2FK.js} +10 -10
- package/dist/{weather-report-5EQLA6QW.js → weather-report-YVQ3KM3K.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-5QROFHTG.js +0 -217
- package/dist/chunk-5QROFHTG.js.map +0 -1
- package/dist/chunk-KLZUZSON.js.map +0 -1
- package/dist/chunk-LDTHAGPF.js.map +0 -1
- package/dist/chunk-NRIH6GVC.js.map +0 -1
- package/dist/chunk-PLCJRWLF.js.map +0 -1
- package/dist/chunk-TNRG3PNO.js.map +0 -1
- package/dist/issue-triage-7YCOFZXK.js +0 -17
- package/dist/setup-data-dir-RVWQ3D32.js +0 -31
- /package/dist/{ast-rule-runner-AGCWR6GP.js.map → ast-rule-runner-PEV2AVO5.js.map} +0 -0
- /package/dist/{child-mcp-config-DX6SMLBF.js.map → child-mcp-config-MTOYKXU5.js.map} +0 -0
- /package/dist/{chunk-HQQTTJL5.js.map → chunk-3BBRLDAA.js.map} +0 -0
- /package/dist/{chunk-VTY6MN7E.js.map → chunk-5B3VEC52.js.map} +0 -0
- /package/dist/{chunk-R674GL6F.js.map → chunk-62DXM63I.js.map} +0 -0
- /package/dist/{chunk-XCNNF3HH.js.map → chunk-64V76CYP.js.map} +0 -0
- /package/dist/{chunk-BM3YNQKB.js.map → chunk-6IKX6JRV.js.map} +0 -0
- /package/dist/{chunk-FBPDKI4Y.js.map → chunk-6WY5JV4V.js.map} +0 -0
- /package/dist/{chunk-2AHN3RGZ.js.map → chunk-7E64JQOK.js.map} +0 -0
- /package/dist/{chunk-IEYL7WMY.js.map → chunk-7MPCTKXP.js.map} +0 -0
- /package/dist/{chunk-4FK3FGFI.js.map → chunk-AA5GWFVO.js.map} +0 -0
- /package/dist/{chunk-BYDAXNOG.js.map → chunk-C5CRQ5EH.js.map} +0 -0
- /package/dist/{chunk-LRTSKTJJ.js.map → chunk-D4TL5SYZ.js.map} +0 -0
- /package/dist/{chunk-UX2SOSH3.js.map → chunk-DIV6TBCN.js.map} +0 -0
- /package/dist/{chunk-AVDNDDIN.js.map → chunk-E3QCG3PA.js.map} +0 -0
- /package/dist/{chunk-WCZXHWLH.js.map → chunk-EICGXNLI.js.map} +0 -0
- /package/dist/{chunk-FZKP5NBV.js.map → chunk-KWRAT327.js.map} +0 -0
- /package/dist/{chunk-JJR5HS4N.js.map → chunk-L6ZP2JI4.js.map} +0 -0
- /package/dist/{chunk-B6DA6DX3.js.map → chunk-NR7PD4GN.js.map} +0 -0
- /package/dist/{chunk-B4UNELI4.js.map → chunk-O24AWSIT.js.map} +0 -0
- /package/dist/{chunk-7FULJKWG.js.map → chunk-ONH6NHD3.js.map} +0 -0
- /package/dist/{chunk-TH4GPVHL.js.map → chunk-PBWRX22Z.js.map} +0 -0
- /package/dist/{chunk-QHTZS3P7.js.map → chunk-QBVYOOEI.js.map} +0 -0
- /package/dist/{chunk-IKCHWNE3.js.map → chunk-R4VZMGMA.js.map} +0 -0
- /package/dist/{chunk-G6XYLKH4.js.map → chunk-SYMBCL34.js.map} +0 -0
- /package/dist/{chunk-YQVIROWH.js.map → chunk-TZN2E2WI.js.map} +0 -0
- /package/dist/{chunk-2NOGUBQR.js.map → chunk-VVE5IENL.js.map} +0 -0
- /package/dist/{chunk-MFOX2VZD.js.map → chunk-W7WDVF4C.js.map} +0 -0
- /package/dist/{chunk-OP3TBV63.js.map → chunk-XOW6X7DI.js.map} +0 -0
- /package/dist/{chunk-K3K4TOBA.js.map → chunk-Y5V2ZZOL.js.map} +0 -0
- /package/dist/{cli-circuit-breaker-A76BGMMF.js.map → cli-circuit-breaker-2YZTGJAV.js.map} +0 -0
- /package/dist/{composite-router-6O32SNKU.js.map → composite-router-XSZBOTIS.js.map} +0 -0
- /package/dist/{consensus-vote-6K54HCI5.js.map → consensus-vote-2G4X4JVF.js.map} +0 -0
- /package/dist/{context-retriever-523QPORD.js.map → context-retriever-DORWMNEG.js.map} +0 -0
- /package/dist/{doctor-deep-EKGP6OPT.js.map → doctor-deep-ANFQPN36.js.map} +0 -0
- /package/dist/{doctor-live-6WX2Y27P.js.map → doctor-live-ZY3L3EIM.js.map} +0 -0
- /package/dist/{expert-bridge-SXREWFK6.js.map → expert-bridge-3QE5C2MQ.js.map} +0 -0
- /package/dist/{factory-CDTCMMA6.js.map → factory-CLBGEM5X.js.map} +0 -0
- /package/dist/{factory-HE6H5EY5.js.map → factory-PQONDJGG.js.map} +0 -0
- /package/dist/{improvement-review-VE3B65NP.js.map → improvement-review-UG7RUEUT.js.map} +0 -0
- /package/dist/{init-opencode-VLINA4BR.js.map → init-opencode-Y3BGDPL5.js.map} +0 -0
- /package/dist/{issue-triage-7YCOFZXK.js.map → issue-triage-CGMODLMK.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-M23OXFLJ.js.map → pr-reviewer-helpers-JJGTRRKA.js.map} +0 -0
- /package/dist/{registry-command-EVAF5WH5.js.map → registry-command-BFJ5SS4N.js.map} +0 -0
- /package/dist/{repo-security-plan-4KLWND3J.js.map → repo-security-plan-HWAWALIF.js.map} +0 -0
- /package/dist/{research-helpers-synthesize-32PUDB2Z.js.map → research-helpers-synthesize-VUJPS27Z.js.map} +0 -0
- /package/dist/{routing-memory-7SEXK6KH.js.map → routing-memory-U3FJQGLV.js.map} +0 -0
- /package/dist/{session-memory-5NFVIGCZ.js.map → session-memory-U3PFLUJR.js.map} +0 -0
- /package/dist/{setup-config-SHVOW5FM.js.map → setup-config-U5TY4WDO.js.map} +0 -0
- /package/dist/{setup-custom-api-UZ7REE3U.js.map → setup-custom-api-WK5KA3PE.js.map} +0 -0
- /package/dist/{setup-data-dir-RVWQ3D32.js.map → setup-data-dir-LLB3HLXF.js.map} +0 -0
- /package/dist/{tool-memory-ZQK7CXZ4.js.map → tool-memory-PINER2OP.js.map} +0 -0
- /package/dist/{unified-registry-AB3UDBKE.js.map → unified-registry-ZAKGP2FK.js.map} +0 -0
- /package/dist/{weather-report-5EQLA6QW.js.map → weather-report-YVQ3KM3K.js.map} +0 -0
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
getBuiltInAstRulesPath,
|
|
10
10
|
loadRules,
|
|
11
11
|
runAstQaRules
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-KWRAT327.js";
|
|
13
|
+
import "./chunk-BBJ4VKDI.js";
|
|
14
14
|
import "./chunk-MTYJPPIG.js";
|
|
15
15
|
import "./chunk-BTYRPZON.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-
|
|
29
|
+
//# sourceMappingURL=ast-rule-runner-PEV2AVO5.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-T46RV7Y7.js";
|
|
4
4
|
import {
|
|
5
5
|
createLogger
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BBJ4VKDI.js";
|
|
7
7
|
import "./chunk-MTYJPPIG.js";
|
|
8
8
|
import "./chunk-BTYRPZON.js";
|
|
9
9
|
import "./chunk-ZPWHCABL.js";
|
|
@@ -60,4 +60,4 @@ export {
|
|
|
60
60
|
generateMcpConfig,
|
|
61
61
|
getDefaultAllowedTools
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=child-mcp-config-
|
|
63
|
+
//# sourceMappingURL=child-mcp-config-MTOYKXU5.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GitHubProvider,
|
|
3
3
|
ScmError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7MPCTKXP.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveToken
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TZN2E2WI.js";
|
|
8
8
|
import {
|
|
9
9
|
err,
|
|
10
10
|
ok
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BBJ4VKDI.js";
|
|
12
12
|
|
|
13
13
|
// src/scm/factory.ts
|
|
14
14
|
async function createScmProvider(config) {
|
|
@@ -41,4 +41,4 @@ export {
|
|
|
41
41
|
createScmProvider,
|
|
42
42
|
createGitHubProvider
|
|
43
43
|
};
|
|
44
|
-
//# sourceMappingURL=chunk-
|
|
44
|
+
//# sourceMappingURL=chunk-3BBRLDAA.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
MCP_TIMEOUTS,
|
|
6
6
|
TEST_TIMEOUTS,
|
|
7
7
|
WORKFLOW_TIMEOUTS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BBJ4VKDI.js";
|
|
9
9
|
import {
|
|
10
10
|
createGetEnvVarDocumentation,
|
|
11
11
|
createGetTimeout,
|
|
@@ -224,4 +224,4 @@ export {
|
|
|
224
224
|
CUSTOM_API_DEFAULT_MODEL,
|
|
225
225
|
DEFAULTS
|
|
226
226
|
};
|
|
227
|
-
//# sourceMappingURL=chunk-
|
|
227
|
+
//# sourceMappingURL=chunk-5B3VEC52.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GitHubProvider,
|
|
3
3
|
ScmError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7MPCTKXP.js";
|
|
5
5
|
import {
|
|
6
6
|
ROLE_DEFAULT_TRUST,
|
|
7
7
|
ReputationCache,
|
|
@@ -12,18 +12,10 @@ import {
|
|
|
12
12
|
resolveEnvMode,
|
|
13
13
|
resolveReputationGatingMode,
|
|
14
14
|
sanitizeInput
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
MAX_STRIPPED_ELEMENTS_PER_EVENT,
|
|
18
|
-
createAuditTrail,
|
|
19
|
-
emitPolicyEvent,
|
|
20
|
-
emitReputationEvent,
|
|
21
|
-
emitSanitizationEvent,
|
|
22
|
-
emitTrustEvent
|
|
23
|
-
} from "./chunk-5QROFHTG.js";
|
|
15
|
+
} from "./chunk-DIV6TBCN.js";
|
|
24
16
|
import {
|
|
25
17
|
hasToken
|
|
26
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TZN2E2WI.js";
|
|
27
19
|
import {
|
|
28
20
|
CLI_SUBPROCESS_TIMEOUTS,
|
|
29
21
|
createLogger,
|
|
@@ -31,7 +23,7 @@ import {
|
|
|
31
23
|
getErrorMessage,
|
|
32
24
|
getTimeProvider,
|
|
33
25
|
ok
|
|
34
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-BBJ4VKDI.js";
|
|
35
27
|
|
|
36
28
|
// src/security/firewall/firewall-policy-mode.ts
|
|
37
29
|
import { z } from "zod";
|
|
@@ -59,6 +51,197 @@ function resolveFirewallPolicyMode(env = process.env, logger7) {
|
|
|
59
51
|
);
|
|
60
52
|
}
|
|
61
53
|
|
|
54
|
+
// src/security/audit-trail.ts
|
|
55
|
+
var MAX_EVENTS = 1e4;
|
|
56
|
+
var MAX_STRIPPED_ELEMENTS_PER_EVENT = 20;
|
|
57
|
+
var AuditTrail = class {
|
|
58
|
+
constructor(durableSink) {
|
|
59
|
+
this.durableSink = durableSink;
|
|
60
|
+
}
|
|
61
|
+
durableSink;
|
|
62
|
+
events = [];
|
|
63
|
+
nextId = 1;
|
|
64
|
+
/** Appends an event to the trail. Returns the assigned event ID. */
|
|
65
|
+
append(event) {
|
|
66
|
+
const id = `audit-${String(this.nextId++)}`;
|
|
67
|
+
const fullEvent = {
|
|
68
|
+
...event,
|
|
69
|
+
id,
|
|
70
|
+
timestamp: getTimeProvider().nowIso()
|
|
71
|
+
};
|
|
72
|
+
this.events.push(fullEvent);
|
|
73
|
+
this.enforceLimit();
|
|
74
|
+
if (this.durableSink !== void 0) {
|
|
75
|
+
try {
|
|
76
|
+
this.durableSink(fullEvent);
|
|
77
|
+
} catch {
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return id;
|
|
81
|
+
}
|
|
82
|
+
/** Queries events matching the given filter. */
|
|
83
|
+
query(filter = {}) {
|
|
84
|
+
let results = this.events;
|
|
85
|
+
if (filter.type !== void 0) {
|
|
86
|
+
results = results.filter((e) => e.type === filter.type);
|
|
87
|
+
}
|
|
88
|
+
if (filter.since !== void 0) {
|
|
89
|
+
results = filterSince(results, filter.since);
|
|
90
|
+
}
|
|
91
|
+
if (filter.until !== void 0) {
|
|
92
|
+
results = filterUntil(results, filter.until);
|
|
93
|
+
}
|
|
94
|
+
if (filter.trustTier !== void 0) {
|
|
95
|
+
results = filterByTrustTier(results, filter.trustTier);
|
|
96
|
+
}
|
|
97
|
+
if (filter.actionType !== void 0) {
|
|
98
|
+
results = filterByActionType(results, filter.actionType);
|
|
99
|
+
}
|
|
100
|
+
if (filter.actor !== void 0) {
|
|
101
|
+
results = filterByActor(results, filter.actor);
|
|
102
|
+
}
|
|
103
|
+
if (filter.violationRule !== void 0) {
|
|
104
|
+
results = filterByViolationRule(results, filter.violationRule);
|
|
105
|
+
}
|
|
106
|
+
const limit = filter.limit ?? results.length;
|
|
107
|
+
return results.slice(-limit);
|
|
108
|
+
}
|
|
109
|
+
/** Returns the total number of events. */
|
|
110
|
+
get size() {
|
|
111
|
+
return this.events.length;
|
|
112
|
+
}
|
|
113
|
+
/** Clears all events. */
|
|
114
|
+
clear() {
|
|
115
|
+
this.events = [];
|
|
116
|
+
}
|
|
117
|
+
/** Enforces MAX_EVENTS bound. */
|
|
118
|
+
enforceLimit() {
|
|
119
|
+
if (this.events.length > MAX_EVENTS) {
|
|
120
|
+
this.events = this.events.slice(-MAX_EVENTS);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
function filterSince(events, since) {
|
|
125
|
+
const sinceTime = new Date(since).getTime();
|
|
126
|
+
return events.filter((e) => new Date(e.timestamp).getTime() >= sinceTime);
|
|
127
|
+
}
|
|
128
|
+
function filterUntil(events, until) {
|
|
129
|
+
const untilTime = new Date(until).getTime();
|
|
130
|
+
return events.filter((e) => new Date(e.timestamp).getTime() <= untilTime);
|
|
131
|
+
}
|
|
132
|
+
function filterByTrustTier(events, tier) {
|
|
133
|
+
return events.filter((e) => {
|
|
134
|
+
if (e.type === "trust_classification") return e.assignedTier === tier;
|
|
135
|
+
if (e.type === "policy_gate") return e.inputTrustTier === tier;
|
|
136
|
+
if (e.type === "reputation") return e.effectiveTier === tier;
|
|
137
|
+
return true;
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
function filterByActionType(events, actionType) {
|
|
141
|
+
return events.filter(
|
|
142
|
+
(e) => (e.type === "policy_gate" || e.type === "corroboration") && e.actionType === actionType
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function filterByActor(events, actor) {
|
|
146
|
+
return events.filter(
|
|
147
|
+
(e) => (e.type === "trust_classification" || e.type === "reputation") && e.username === actor
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
function filterByViolationRule(events, rule) {
|
|
151
|
+
return events.filter((e) => e.type === "policy_gate" && e.violationRules.includes(rule));
|
|
152
|
+
}
|
|
153
|
+
function emitTrustEvent(trail, data) {
|
|
154
|
+
return trail.append({
|
|
155
|
+
type: "trust_classification",
|
|
156
|
+
component: "trust-classifier",
|
|
157
|
+
...data
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
function emitPolicyEvent(trail, data) {
|
|
161
|
+
return trail.append({
|
|
162
|
+
type: "policy_gate",
|
|
163
|
+
component: "policy-gate",
|
|
164
|
+
...data
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
function emitPipelinePolicyEvent(trail, data) {
|
|
168
|
+
return trail.append({
|
|
169
|
+
type: "policy_gate",
|
|
170
|
+
component: "pipeline-policy-evaluator",
|
|
171
|
+
...data
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
function emitCorroborationEvent(trail, data) {
|
|
175
|
+
return trail.append({
|
|
176
|
+
type: "corroboration",
|
|
177
|
+
component: "corroboration-validator",
|
|
178
|
+
...data
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
function emitReputationEvent(trail, data) {
|
|
182
|
+
return trail.append({
|
|
183
|
+
type: "reputation",
|
|
184
|
+
component: "reputation-model",
|
|
185
|
+
...data
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
function emitSanitizationEvent(trail, data) {
|
|
189
|
+
return trail.append({
|
|
190
|
+
type: "sanitization",
|
|
191
|
+
component: "input-sanitizer",
|
|
192
|
+
...data
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
function emitGraphExecutionEvent(trail, data) {
|
|
196
|
+
return trail.append({
|
|
197
|
+
type: "graph_execution",
|
|
198
|
+
component: "graph-executor",
|
|
199
|
+
...data
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function createGraphAuditBridge(trail) {
|
|
203
|
+
return (event) => {
|
|
204
|
+
const nodeId = typeof event["nodeId"] === "string" ? event["nodeId"] : void 0;
|
|
205
|
+
const stepNumber = typeof event["stepNumber"] === "number" ? event["stepNumber"] : 0;
|
|
206
|
+
emitGraphExecutionEvent(trail, {
|
|
207
|
+
graphEvent: event.type,
|
|
208
|
+
...nodeId !== void 0 ? { nodeId } : {},
|
|
209
|
+
stepNumber,
|
|
210
|
+
detail: formatGraphEventDetail(event)
|
|
211
|
+
});
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
function formatNotCompleted(event) {
|
|
215
|
+
const detail = event["detail"];
|
|
216
|
+
const suffix = typeof detail === "string" && detail !== "" ? `: ${detail}` : "";
|
|
217
|
+
return `Node ${String(event["nodeId"])} ${String(event["reason"])} (did not complete)${suffix}`;
|
|
218
|
+
}
|
|
219
|
+
function formatCompletion(event) {
|
|
220
|
+
return event["halted"] === true ? `HALTED awaiting input after ${String(event["totalSteps"])} steps, ${String(event["durationMs"])}ms \u2014 NOT complete` : `Complete: ${String(event["totalSteps"])} steps, ${String(event["durationMs"])}ms`;
|
|
221
|
+
}
|
|
222
|
+
function formatGraphEventDetail(event) {
|
|
223
|
+
if (event.type === "node_not_completed") return formatNotCompleted(event);
|
|
224
|
+
switch (event.type) {
|
|
225
|
+
case "node_started":
|
|
226
|
+
return `Node ${String(event["nodeId"])} starting`;
|
|
227
|
+
case "node_completed":
|
|
228
|
+
return `Node ${String(event["nodeId"])} completed in ${String(event["durationMs"])}ms`;
|
|
229
|
+
case "node_error":
|
|
230
|
+
return `Node ${String(event["nodeId"])} failed: ${String(event["error"])}`;
|
|
231
|
+
case "state_updated":
|
|
232
|
+
return `State updated: ${String(event["updatedKeys"])}`;
|
|
233
|
+
case "step_completed":
|
|
234
|
+
return `Step ${String(event["stepNumber"])}: ${String(event["nodesExecuted"])} nodes`;
|
|
235
|
+
case "execution_complete":
|
|
236
|
+
return formatCompletion(event);
|
|
237
|
+
default:
|
|
238
|
+
return event.type;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function createAuditTrail(durableSink) {
|
|
242
|
+
return new AuditTrail(durableSink);
|
|
243
|
+
}
|
|
244
|
+
|
|
62
245
|
// src/security/audit-bridge.ts
|
|
63
246
|
var logger = createLogger({ component: "SecurityAuditBridge" });
|
|
64
247
|
function systemActor(id, name) {
|
|
@@ -2163,6 +2346,16 @@ function createIssueTriage(config) {
|
|
|
2163
2346
|
}
|
|
2164
2347
|
|
|
2165
2348
|
export {
|
|
2349
|
+
AuditTrail,
|
|
2350
|
+
emitTrustEvent,
|
|
2351
|
+
emitPolicyEvent,
|
|
2352
|
+
emitPipelinePolicyEvent,
|
|
2353
|
+
emitCorroborationEvent,
|
|
2354
|
+
emitReputationEvent,
|
|
2355
|
+
emitSanitizationEvent,
|
|
2356
|
+
emitGraphExecutionEvent,
|
|
2357
|
+
createGraphAuditBridge,
|
|
2358
|
+
createAuditTrail,
|
|
2166
2359
|
createDurableAuditSink,
|
|
2167
2360
|
createDurableAuditTrail,
|
|
2168
2361
|
FirewallPolicyModeSchema,
|
|
@@ -2200,4 +2393,4 @@ export {
|
|
|
2200
2393
|
IssueTriage,
|
|
2201
2394
|
createIssueTriage
|
|
2202
2395
|
};
|
|
2203
|
-
//# sourceMappingURL=chunk-
|
|
2396
|
+
//# sourceMappingURL=chunk-5ZVGPKNO.js.map
|