hackmyagent 0.16.5 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/.integrity-manifest.json +1 -1
  2. package/dist/arp/crypto/hybrid-signing.d.ts +107 -0
  3. package/dist/arp/crypto/hybrid-signing.d.ts.map +1 -0
  4. package/dist/arp/crypto/hybrid-signing.js +321 -0
  5. package/dist/arp/crypto/hybrid-signing.js.map +1 -0
  6. package/dist/arp/crypto/index.d.ts +13 -0
  7. package/dist/arp/crypto/index.d.ts.map +1 -0
  8. package/dist/arp/crypto/index.js +33 -0
  9. package/dist/arp/crypto/index.js.map +1 -0
  10. package/dist/arp/crypto/manifest-loader.d.ts +117 -0
  11. package/dist/arp/crypto/manifest-loader.d.ts.map +1 -0
  12. package/dist/arp/crypto/manifest-loader.js +361 -0
  13. package/dist/arp/crypto/manifest-loader.js.map +1 -0
  14. package/dist/arp/crypto/types.d.ts +69 -0
  15. package/dist/arp/crypto/types.d.ts.map +1 -0
  16. package/dist/arp/crypto/types.js +11 -0
  17. package/dist/arp/crypto/types.js.map +1 -0
  18. package/dist/arp/index.d.ts +28 -1
  19. package/dist/arp/index.d.ts.map +1 -1
  20. package/dist/arp/index.js +97 -4
  21. package/dist/arp/index.js.map +1 -1
  22. package/dist/arp/intelligence/behavioral-risk-server.d.ts +82 -0
  23. package/dist/arp/intelligence/behavioral-risk-server.d.ts.map +1 -0
  24. package/dist/arp/intelligence/behavioral-risk-server.js +258 -0
  25. package/dist/arp/intelligence/behavioral-risk-server.js.map +1 -0
  26. package/dist/arp/intelligence/behavioral-risk.d.ts +217 -0
  27. package/dist/arp/intelligence/behavioral-risk.d.ts.map +1 -0
  28. package/dist/arp/intelligence/behavioral-risk.js +429 -0
  29. package/dist/arp/intelligence/behavioral-risk.js.map +1 -0
  30. package/dist/arp/intelligence/coordinator.d.ts +93 -2
  31. package/dist/arp/intelligence/coordinator.d.ts.map +1 -1
  32. package/dist/arp/intelligence/coordinator.js +281 -1
  33. package/dist/arp/intelligence/coordinator.js.map +1 -1
  34. package/dist/arp/intelligence/guard-anomaly.d.ts +349 -0
  35. package/dist/arp/intelligence/guard-anomaly.d.ts.map +1 -0
  36. package/dist/arp/intelligence/guard-anomaly.js +399 -0
  37. package/dist/arp/intelligence/guard-anomaly.js.map +1 -0
  38. package/dist/arp/intelligence/nanomind-l1.d.ts +37 -0
  39. package/dist/arp/intelligence/nanomind-l1.d.ts.map +1 -1
  40. package/dist/arp/intelligence/nanomind-l1.js +78 -0
  41. package/dist/arp/intelligence/nanomind-l1.js.map +1 -1
  42. package/dist/arp/intelligence/runtime-twin.d.ts +157 -0
  43. package/dist/arp/intelligence/runtime-twin.d.ts.map +1 -0
  44. package/dist/arp/intelligence/runtime-twin.js +479 -0
  45. package/dist/arp/intelligence/runtime-twin.js.map +1 -0
  46. package/dist/arp/intelligence/verify-classification.d.ts +124 -0
  47. package/dist/arp/intelligence/verify-classification.d.ts.map +1 -0
  48. package/dist/arp/intelligence/verify-classification.js +329 -0
  49. package/dist/arp/intelligence/verify-classification.js.map +1 -0
  50. package/dist/arp/proxy/server.d.ts +38 -8
  51. package/dist/arp/proxy/server.d.ts.map +1 -1
  52. package/dist/arp/proxy/server.js +89 -0
  53. package/dist/arp/proxy/server.js.map +1 -1
  54. package/dist/arp/types.d.ts +229 -1
  55. package/dist/arp/types.d.ts.map +1 -1
  56. package/dist/cli.js +691 -154
  57. package/dist/cli.js.map +1 -1
  58. package/dist/hardening/scanner.d.ts.map +1 -1
  59. package/dist/hardening/scanner.js +11 -1
  60. package/dist/hardening/scanner.js.map +1 -1
  61. package/dist/nanomind-core/compiler/semantic-compiler.d.ts.map +1 -1
  62. package/dist/nanomind-core/compiler/semantic-compiler.js +170 -10
  63. package/dist/nanomind-core/compiler/semantic-compiler.js.map +1 -1
  64. package/dist/nanomind-core/compiler/source-code-preprocessor.d.ts +64 -0
  65. package/dist/nanomind-core/compiler/source-code-preprocessor.d.ts.map +1 -0
  66. package/dist/nanomind-core/compiler/source-code-preprocessor.js +656 -0
  67. package/dist/nanomind-core/compiler/source-code-preprocessor.js.map +1 -0
  68. package/dist/nanomind-core/ingestion/artifact-parser.d.ts.map +1 -1
  69. package/dist/nanomind-core/ingestion/artifact-parser.js +15 -6
  70. package/dist/nanomind-core/ingestion/artifact-parser.js.map +1 -1
  71. package/package.json +3 -1
@@ -0,0 +1,361 @@
1
+ "use strict";
2
+ /**
3
+ * Capability manifest YAML loader with hybrid Ed25519+ML-DSA-65 signature
4
+ * verification.
5
+ *
6
+ * The loader implements parse-to-deny (CR-001): any failure at any step --
7
+ * I/O, oversized file, YAML parse error, schema mismatch, missing signature,
8
+ * wrong algorithm, malformed public key, signature rejection, or expiry --
9
+ * raises a `CapabilityManifestError`. Callers must treat the thrown error as
10
+ * an authoritative signal to refuse loading the manifest. There is no
11
+ * partial-success path.
12
+ *
13
+ * Wire format (YAML on disk):
14
+ *
15
+ * version: "1.0.0"
16
+ * agentId: "example-agent"
17
+ * tier: "execute"
18
+ * comply:
19
+ * permitted_classes: ["class-a", "class-b"]
20
+ * prohibited_classes: ["class-c"]
21
+ * on_violation: "deny"
22
+ * issuedAt: "2026-04-13T00:00:00.000Z"
23
+ * expiresAt: "2027-04-13T00:00:00.000Z"
24
+ * ed25519PublicKey: "<base64>"
25
+ * mldsa65PublicKey: "<base64>"
26
+ * signature:
27
+ * alg: "Ed25519+ML-DSA-65"
28
+ * ed25519Sig: "<base64>"
29
+ * mldsaSig: "<base64>"
30
+ * ts: 1712880000000
31
+ *
32
+ * The signed payload is the manifest object with the `signature` field
33
+ * stripped, serialized to canonical JSON (sorted keys, no whitespace). Signer
34
+ * and verifier must produce byte-identical canonical output or round-tripping
35
+ * will not work. The closed schema (scalars + string arrays + one nested
36
+ * object) is simple enough that full RFC 8785 JCS is unnecessary; the
37
+ * `stableStringify` helper below is deterministic for the shapes we accept.
38
+ *
39
+ * Integration points (deferred to follow-up sessions, not wired yet):
40
+ * - `src/arp/proxy/server.ts`: load manifest on agent registration, fail
41
+ * closed if verification raises.
42
+ * - `src/arp/intelligence/coordinator.ts`: consult the `comply` envelope
43
+ * when an event's classification lands outside permitted classes.
44
+ */
45
+ var __importDefault = (this && this.__importDefault) || function (mod) {
46
+ return (mod && mod.__esModule) ? mod : { "default": mod };
47
+ };
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.CapabilityManifestError = exports.MAX_MANIFEST_SIZE_BYTES = exports.MANIFEST_SIGNATURE_ALGORITHM = exports.MANIFEST_VERSION = void 0;
50
+ exports.canonicalizeManifestPayload = canonicalizeManifestPayload;
51
+ exports.loadCapabilityManifest = loadCapabilityManifest;
52
+ exports.parseCapabilityManifest = parseCapabilityManifest;
53
+ const fs_1 = require("fs");
54
+ const js_yaml_1 = __importDefault(require("js-yaml"));
55
+ const hybrid_signing_1 = require("./hybrid-signing");
56
+ /** Only wire format version currently accepted. */
57
+ exports.MANIFEST_VERSION = '1.0.0';
58
+ /**
59
+ * Only hybrid algorithm permitted for capability manifests. ML-DSA-65 is the
60
+ * NIST category 3 parameter set, matching the AIM SDK default for manifests.
61
+ * ML-DSA-44 is reserved for high-throughput identity signals; ML-DSA-87 for
62
+ * root keys. Manifests that claim a different algorithm are refused.
63
+ */
64
+ exports.MANIFEST_SIGNATURE_ALGORITHM = 'Ed25519+ML-DSA-65';
65
+ /**
66
+ * Hard cap on the manifest file size. Anything larger is rejected before
67
+ * YAML parsing to bound worst-case memory and CPU for a malicious file. 64
68
+ * KiB is ample: a realistic manifest with a few hundred permitted classes
69
+ * and base64 public keys sits well under 8 KiB.
70
+ */
71
+ exports.MAX_MANIFEST_SIZE_BYTES = 64 * 1024;
72
+ /** Allowed capability tiers (kept in sync with `CapabilityTier` in ../types). */
73
+ const ALLOWED_TIERS = new Set([
74
+ 'minimal',
75
+ 'read',
76
+ 'execute',
77
+ 'mutate',
78
+ 'privileged',
79
+ ]);
80
+ /** Allowed on_violation actions (kept in sync with `ComplyOnViolation`). */
81
+ const ALLOWED_ON_VIOLATION = new Set(['log', 'alert', 'pause', 'kill', 'deny']);
82
+ /**
83
+ * Error raised on any loader failure. Callers MUST treat a thrown
84
+ * `CapabilityManifestError` as an authoritative parse-to-deny signal. Do not
85
+ * fall through to a "load without verification" path under any circumstance.
86
+ */
87
+ class CapabilityManifestError extends Error {
88
+ constructor(code, message, details) {
89
+ super(`[arp/crypto/manifest] ${code}: ${message}`);
90
+ this.code = code;
91
+ this.details = details;
92
+ this.name = 'CapabilityManifestError';
93
+ }
94
+ }
95
+ exports.CapabilityManifestError = CapabilityManifestError;
96
+ /**
97
+ * Produce canonical signed-payload bytes for a parsed manifest object.
98
+ *
99
+ * Canonicalization:
100
+ * 1. Remove the `signature` field if present.
101
+ * 2. Serialize as JSON with recursively sorted object keys and no
102
+ * whitespace between tokens.
103
+ * 3. Encode the result as UTF-8.
104
+ *
105
+ * Exported because fixture generators and out-of-repo signers need to
106
+ * produce the exact same bytes as the verifier. Duplicating this logic in a
107
+ * signer is a recipe for drift.
108
+ */
109
+ function canonicalizeManifestPayload(payload) {
110
+ const stripped = { ...payload };
111
+ delete stripped.signature;
112
+ return new TextEncoder().encode(stableStringify(stripped));
113
+ }
114
+ /**
115
+ * Deterministic JSON serializer: sorted object keys, no whitespace. Accepts
116
+ * the closed set of JSON-compatible values that manifest payloads contain
117
+ * (string, number, boolean, null, array, plain object). Any other value
118
+ * type is serialized via `JSON.stringify`, which will produce `undefined`
119
+ * for functions or symbols -- the schema guards prevent those from reaching
120
+ * this helper in practice.
121
+ */
122
+ function stableStringify(value) {
123
+ if (value === null || typeof value !== 'object')
124
+ return JSON.stringify(value);
125
+ if (Array.isArray(value)) {
126
+ return `[${value.map((v) => stableStringify(v)).join(',')}]`;
127
+ }
128
+ const obj = value;
129
+ const keys = Object.keys(obj).sort();
130
+ const pairs = keys.map((k) => `${JSON.stringify(k)}:${stableStringify(obj[k])}`);
131
+ return `{${pairs.join(',')}}`;
132
+ }
133
+ /**
134
+ * Load and verify a capability manifest from a YAML file on disk.
135
+ *
136
+ * On success, returns the verified `CapabilityManifest` shape (without the
137
+ * signature block, which is not part of the runtime type). On any failure
138
+ * throws a `CapabilityManifestError` -- the caller fails closed.
139
+ *
140
+ * The file is read once, size-checked, then parsed and verified. I/O errors
141
+ * are reported with `code: 'IO_ERROR'` and the underlying error exposed via
142
+ * `details.cause` so callers can log the root cause without re-throwing.
143
+ */
144
+ async function loadCapabilityManifest(filePath) {
145
+ let raw;
146
+ try {
147
+ const stat = await fs_1.promises.stat(filePath);
148
+ if (stat.size > exports.MAX_MANIFEST_SIZE_BYTES) {
149
+ throw new CapabilityManifestError('SIZE_EXCEEDED', `manifest file exceeds ${exports.MAX_MANIFEST_SIZE_BYTES} bytes`, { reason: `size=${stat.size}` });
150
+ }
151
+ raw = await fs_1.promises.readFile(filePath, 'utf8');
152
+ }
153
+ catch (err) {
154
+ if (err instanceof CapabilityManifestError)
155
+ throw err;
156
+ throw new CapabilityManifestError('IO_ERROR', `unable to read manifest at ${filePath}`, { reason: err.message, cause: err });
157
+ }
158
+ return parseCapabilityManifest(raw);
159
+ }
160
+ /**
161
+ * Parse and verify a capability manifest from YAML text.
162
+ *
163
+ * Separated from `loadCapabilityManifest` so callers that already have the
164
+ * text in memory (pulled from a database, stdin, IPC channel) can verify
165
+ * without a filesystem round trip.
166
+ */
167
+ async function parseCapabilityManifest(yamlText) {
168
+ if (typeof yamlText !== 'string') {
169
+ throw new CapabilityManifestError('PARSE_ERROR', 'manifest text must be a string');
170
+ }
171
+ if (Buffer.byteLength(yamlText, 'utf8') > exports.MAX_MANIFEST_SIZE_BYTES) {
172
+ throw new CapabilityManifestError('SIZE_EXCEEDED', `manifest text exceeds ${exports.MAX_MANIFEST_SIZE_BYTES} bytes`);
173
+ }
174
+ let parsed;
175
+ try {
176
+ parsed = js_yaml_1.default.load(yamlText, {
177
+ // FAILSAFE_SCHEMA would reject base64 strings that look like YAML
178
+ // booleans. CORE_SCHEMA accepts the scalars we use (string, number,
179
+ // bool, null) without executing YAML type coercions like !!js/function.
180
+ schema: js_yaml_1.default.CORE_SCHEMA,
181
+ filename: 'capability-manifest.yaml',
182
+ });
183
+ }
184
+ catch (err) {
185
+ throw new CapabilityManifestError('PARSE_ERROR', 'YAML parse failed', { reason: err.message, cause: err });
186
+ }
187
+ if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {
188
+ throw new CapabilityManifestError('SCHEMA_ERROR', 'manifest root must be a YAML mapping');
189
+ }
190
+ const obj = parsed;
191
+ // Version gate first. Rejecting unsupported versions before touching any
192
+ // other field lets us evolve the wire format without leaking half-parsed
193
+ // data from a newer schema into a validator that does not understand it.
194
+ const version = obj.version;
195
+ if (version !== exports.MANIFEST_VERSION) {
196
+ throw new CapabilityManifestError('VERSION_UNSUPPORTED', `unsupported manifest version`, { reason: `got=${JSON.stringify(version)} expected=${exports.MANIFEST_VERSION}` });
197
+ }
198
+ // Signature block presence check comes before schema validation so that a
199
+ // manifest missing a signature fails with the more specific error code.
200
+ // An attacker who strips the signature block should see the same rejection
201
+ // regardless of whether the remaining schema is well-formed.
202
+ const sigRaw = obj.signature;
203
+ if (sigRaw === undefined || sigRaw === null) {
204
+ throw new CapabilityManifestError('SIGNATURE_MISSING', 'manifest has no signature block');
205
+ }
206
+ if (typeof sigRaw !== 'object' || Array.isArray(sigRaw)) {
207
+ throw new CapabilityManifestError('SIGNATURE_MISSING', 'signature block must be a mapping');
208
+ }
209
+ // Schema validation of the payload itself. Narrow order: every required
210
+ // field must be present and of the correct shape before we run any crypto.
211
+ const schemaError = validateManifestSchema(obj);
212
+ if (schemaError) {
213
+ throw new CapabilityManifestError('SCHEMA_ERROR', schemaError);
214
+ }
215
+ // Structural signature checks. Algorithm gate is strict: anything other
216
+ // than the required manifest algorithm is refused outright rather than
217
+ // downgraded.
218
+ const sig = sigRaw;
219
+ const alg = sig.alg;
220
+ if (alg !== exports.MANIFEST_SIGNATURE_ALGORITHM) {
221
+ throw new CapabilityManifestError('ALGORITHM_UNSUPPORTED', `signature algorithm must be ${exports.MANIFEST_SIGNATURE_ALGORITHM}`, { reason: `got=${JSON.stringify(alg)}` });
222
+ }
223
+ if (typeof sig.ed25519Sig !== 'string' ||
224
+ typeof sig.mldsaSig !== 'string' ||
225
+ typeof sig.ts !== 'number') {
226
+ throw new CapabilityManifestError('SCHEMA_ERROR', 'signature block fields malformed', {
227
+ reason: `ed25519Sig=${typeof sig.ed25519Sig} mldsaSig=${typeof sig.mldsaSig} ts=${typeof sig.ts}`,
228
+ });
229
+ }
230
+ // Decode keys and signature into raw bytes. Any failure here (bad base64,
231
+ // wrong size after decode) becomes a KEY_FORMAT_ERROR so callers can
232
+ // distinguish "signature cryptographically wrong" from "signature bytes
233
+ // structurally invalid".
234
+ let publicKeyBytes;
235
+ let signatureBytes;
236
+ try {
237
+ const encodedPk = {
238
+ algorithm: exports.MANIFEST_SIGNATURE_ALGORITHM,
239
+ ed25519PublicKey: obj.ed25519PublicKey,
240
+ mldsaPublicKey: obj.mldsa65PublicKey,
241
+ mldsaVariant: 'ML-DSA-65',
242
+ };
243
+ publicKeyBytes = (0, hybrid_signing_1.decodeHybridPublicKey)(encodedPk);
244
+ const encodedSig = {
245
+ alg: exports.MANIFEST_SIGNATURE_ALGORITHM,
246
+ ed25519Sig: sig.ed25519Sig,
247
+ mldsaSig: sig.mldsaSig,
248
+ ts: sig.ts,
249
+ };
250
+ signatureBytes = (0, hybrid_signing_1.decodeHybridSignature)(encodedSig);
251
+ }
252
+ catch (err) {
253
+ throw new CapabilityManifestError('KEY_FORMAT_ERROR', 'failed to decode hybrid key or signature bytes', { reason: err.message, cause: err });
254
+ }
255
+ // Node's `Buffer.from(_, 'base64')` is permissive: invalid characters are
256
+ // silently dropped and the result is whatever byte length falls out. Catch
257
+ // size mismatches here so the caller sees KEY_FORMAT_ERROR rather than a
258
+ // downstream SIGNATURE_INVALID that hides a structurally malformed key.
259
+ if (!(0, hybrid_signing_1.validateKeySize)('Ed25519', 'publicKey', publicKeyBytes.ed25519PublicKey)) {
260
+ throw new CapabilityManifestError('KEY_FORMAT_ERROR', 'ed25519 public key has wrong length after base64 decode', { reason: `length=${publicKeyBytes.ed25519PublicKey.length}` });
261
+ }
262
+ if (!(0, hybrid_signing_1.validateKeySize)('ML-DSA-65', 'publicKey', publicKeyBytes.mldsaPublicKey)) {
263
+ throw new CapabilityManifestError('KEY_FORMAT_ERROR', 'ml-dsa-65 public key has wrong length after base64 decode', { reason: `length=${publicKeyBytes.mldsaPublicKey.length}` });
264
+ }
265
+ if (!(0, hybrid_signing_1.validateKeySize)('Ed25519', 'signature', signatureBytes.ed25519Sig)) {
266
+ throw new CapabilityManifestError('KEY_FORMAT_ERROR', 'ed25519 signature has wrong length after base64 decode', { reason: `length=${signatureBytes.ed25519Sig.length}` });
267
+ }
268
+ if (!(0, hybrid_signing_1.validateKeySize)('ML-DSA-65', 'signature', signatureBytes.mldsaSig)) {
269
+ throw new CapabilityManifestError('KEY_FORMAT_ERROR', 'ml-dsa-65 signature has wrong length after base64 decode', { reason: `length=${signatureBytes.mldsaSig.length}` });
270
+ }
271
+ // Canonicalize the signed payload (the original parsed object minus the
272
+ // signature block) and run the non-short-circuit hybrid verifier. Both
273
+ // halves are evaluated on every call; a structured `{valid: false, reason}`
274
+ // result comes back on any mismatch and becomes SIGNATURE_INVALID here.
275
+ const canonical = canonicalizeManifestPayload(obj);
276
+ const result = await (0, hybrid_signing_1.hybridVerify)(canonical, signatureBytes, publicKeyBytes);
277
+ if (!result.valid) {
278
+ throw new CapabilityManifestError('SIGNATURE_INVALID', 'hybrid signature rejected', { reason: result.reason ?? 'no reason provided by verifier' });
279
+ }
280
+ // Expiry check runs LAST, after signature verification, so an attacker who
281
+ // manipulates expiresAt cannot force a cheap rejection path that reveals
282
+ // anything about the signature state. Even a valid signature over an
283
+ // expired manifest is denied.
284
+ if (typeof obj.expiresAt === 'string') {
285
+ const expiresAtMs = Date.parse(obj.expiresAt);
286
+ if (!Number.isFinite(expiresAtMs)) {
287
+ throw new CapabilityManifestError('SCHEMA_ERROR', 'expiresAt is not a valid ISO timestamp', { reason: `got=${obj.expiresAt}` });
288
+ }
289
+ if (expiresAtMs <= Date.now()) {
290
+ throw new CapabilityManifestError('EXPIRED', 'manifest expiresAt has passed', { reason: `expiresAt=${obj.expiresAt}` });
291
+ }
292
+ }
293
+ // The runtime shape: everything except the signature block.
294
+ const manifest = {
295
+ version: exports.MANIFEST_VERSION,
296
+ agentId: obj.agentId,
297
+ tier: obj.tier,
298
+ comply: {
299
+ permitted_classes: obj.comply
300
+ .permitted_classes.slice(),
301
+ prohibited_classes: obj.comply
302
+ .prohibited_classes.slice(),
303
+ on_violation: obj.comply
304
+ .on_violation,
305
+ },
306
+ issuedAt: obj.issuedAt,
307
+ ...(typeof obj.expiresAt === 'string'
308
+ ? { expiresAt: obj.expiresAt }
309
+ : {}),
310
+ ed25519PublicKey: obj.ed25519PublicKey,
311
+ mldsa65PublicKey: obj.mldsa65PublicKey,
312
+ };
313
+ return manifest;
314
+ }
315
+ /**
316
+ * Schema validation for the non-signature fields. Returns a human-readable
317
+ * error string if validation fails, or `null` on success. Kept as a
318
+ * string-returning helper (rather than throwing) so the caller can wrap the
319
+ * result in a single typed error with the correct code.
320
+ */
321
+ function validateManifestSchema(obj) {
322
+ if (typeof obj.agentId !== 'string' || obj.agentId.length === 0) {
323
+ return 'agentId must be a non-empty string';
324
+ }
325
+ if (typeof obj.tier !== 'string' || !ALLOWED_TIERS.has(obj.tier)) {
326
+ return `tier must be one of ${Array.from(ALLOWED_TIERS).join(', ')}`;
327
+ }
328
+ if (typeof obj.issuedAt !== 'string' || !Number.isFinite(Date.parse(obj.issuedAt))) {
329
+ return 'issuedAt must be an ISO timestamp string';
330
+ }
331
+ if (obj.expiresAt !== undefined &&
332
+ obj.expiresAt !== null &&
333
+ typeof obj.expiresAt !== 'string') {
334
+ return 'expiresAt must be an ISO timestamp string or omitted';
335
+ }
336
+ if (typeof obj.ed25519PublicKey !== 'string' || obj.ed25519PublicKey.length === 0) {
337
+ return 'ed25519PublicKey must be a non-empty base64 string';
338
+ }
339
+ if (typeof obj.mldsa65PublicKey !== 'string' || obj.mldsa65PublicKey.length === 0) {
340
+ return 'mldsa65PublicKey must be a non-empty base64 string';
341
+ }
342
+ const comply = obj.comply;
343
+ if (comply === null || typeof comply !== 'object' || Array.isArray(comply)) {
344
+ return 'comply must be a mapping';
345
+ }
346
+ const c = comply;
347
+ if (!Array.isArray(c.permitted_classes) ||
348
+ !c.permitted_classes.every((v) => typeof v === 'string')) {
349
+ return 'comply.permitted_classes must be an array of strings';
350
+ }
351
+ if (!Array.isArray(c.prohibited_classes) ||
352
+ !c.prohibited_classes.every((v) => typeof v === 'string')) {
353
+ return 'comply.prohibited_classes must be an array of strings';
354
+ }
355
+ if (typeof c.on_violation !== 'string' ||
356
+ !ALLOWED_ON_VIOLATION.has(c.on_violation)) {
357
+ return `comply.on_violation must be one of ${Array.from(ALLOWED_ON_VIOLATION).join(', ')}`;
358
+ }
359
+ return null;
360
+ }
361
+ //# sourceMappingURL=manifest-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-loader.js","sourceRoot":"","sources":["../../../src/arp/crypto/manifest-loader.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;;;;;;AAqGH,kEAMC;AAkCD,wDAuBC;AASD,0DAiOC;AA5YD,2BAAoC;AAEpC,sDAA2B;AAO3B,qDAK0B;AAO1B,mDAAmD;AACtC,QAAA,gBAAgB,GAAG,OAAgB,CAAC;AAEjD;;;;;GAKG;AACU,QAAA,4BAA4B,GACvC,mBAAmB,CAAC;AAEtB;;;;;GAKG;AACU,QAAA,uBAAuB,GAAG,EAAE,GAAG,IAAI,CAAC;AAEjD,iFAAiF;AACjF,MAAM,aAAa,GAAgC,IAAI,GAAG,CAAiB;IACzE,SAAS;IACT,MAAM;IACN,SAAS;IACT,QAAQ;IACR,YAAY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,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,EACxD,CAAC;QACD,OAAO,sDAAsD,CAAC;IAChE,CAAC;IACD,IACE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC;QACpC,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,EACzD,CAAC;QACD,OAAO,uDAAuD,CAAC;IACjE,CAAC;IACD,IACE,OAAO,CAAC,CAAC,YAAY,KAAK,QAAQ;QAClC,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,YAAiC,CAAC,EAC9D,CAAC;QACD,OAAO,sCAAsC,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAC7F,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * ARP crypto types (scaffolding, AIComply P1).
3
+ *
4
+ * Shared shapes for hybrid Ed25519 + ML-DSA signing. The first commit lands only
5
+ * these types and stub functions. The follow-up commit wires real signing against
6
+ * `@noble/ed25519` and `@noble/post-quantum`, mirroring
7
+ * `agent-identity-management/sdk/typescript/src/crypto/pqc.ts`.
8
+ */
9
+ /** Supported ML-DSA parameter sets (FIPS 204). */
10
+ export type MLDsaVariant = 'ML-DSA-44' | 'ML-DSA-65' | 'ML-DSA-87';
11
+ /** Hybrid algorithm identifier, matching the AIM SDK and Go backend wire format. */
12
+ export type HybridAlgorithm = 'Ed25519+ML-DSA-44' | 'Ed25519+ML-DSA-65' | 'Ed25519+ML-DSA-87';
13
+ /**
14
+ * Hybrid key pair: Ed25519 (classical) plus ML-DSA (post-quantum).
15
+ * Both halves co-sign every payload; verification requires both to pass.
16
+ */
17
+ export interface HybridKeyPair {
18
+ algorithm: HybridAlgorithm;
19
+ ed25519: {
20
+ publicKey: Uint8Array;
21
+ privateKey: Uint8Array;
22
+ };
23
+ mldsa: {
24
+ variant: MLDsaVariant;
25
+ publicKey: Uint8Array;
26
+ privateKey: Uint8Array;
27
+ };
28
+ createdAt: Date;
29
+ }
30
+ /** Hybrid public key in raw (non-encoded) form, used for verification. */
31
+ export interface HybridPublicKey {
32
+ algorithm: HybridAlgorithm;
33
+ ed25519PublicKey: Uint8Array;
34
+ mldsaPublicKey: Uint8Array;
35
+ mldsaVariant: MLDsaVariant;
36
+ }
37
+ /** Hybrid signature: both halves must validate for the signature to be accepted. */
38
+ export interface HybridSignature {
39
+ algorithm: HybridAlgorithm;
40
+ ed25519Sig: Uint8Array;
41
+ mldsaSig: Uint8Array;
42
+ /** Unix ms timestamp when the signature was produced */
43
+ timestamp: number;
44
+ }
45
+ /** Base64-encoded form of a hybrid signature (for YAML/JSON transport). */
46
+ export interface EncodedHybridSignature {
47
+ alg: HybridAlgorithm;
48
+ ed25519Sig: string;
49
+ mldsaSig: string;
50
+ ts: number;
51
+ }
52
+ /** Base64-encoded form of a hybrid public key (for YAML/JSON transport). */
53
+ export interface EncodedHybridPublicKey {
54
+ algorithm: HybridAlgorithm;
55
+ ed25519PublicKey: string;
56
+ mldsaPublicKey: string;
57
+ mldsaVariant: MLDsaVariant;
58
+ }
59
+ /** Result of a hybrid signature verification. */
60
+ export interface HybridVerifyResult {
61
+ /** True only if BOTH ed25519 and mldsa halves verify successfully. */
62
+ valid: boolean;
63
+ /** Per-half breakdown, for diagnostics and structured logging. */
64
+ ed25519Valid: boolean;
65
+ mldsaValid: boolean;
66
+ /** Human-readable reason when `valid` is false. */
67
+ reason?: string;
68
+ }
69
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/arp/crypto/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,kDAAkD;AAClD,MAAM,MA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IACf,kEAAkE;IAClE,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * ARP crypto types (scaffolding, AIComply P1).
4
+ *
5
+ * Shared shapes for hybrid Ed25519 + ML-DSA signing. The first commit lands only
6
+ * these types and stub functions. The follow-up commit wires real signing against
7
+ * `@noble/ed25519` and `@noble/post-quantum`, mirroring
8
+ * `agent-identity-management/sdk/typescript/src/crypto/pqc.ts`.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/arp/crypto/types.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
@@ -5,7 +5,7 @@ export { CorrelationEngine } from './engine/correlation';
5
5
  export { IntelligenceCoordinator } from './intelligence/coordinator';
6
6
  export { BudgetController } from './intelligence/budget';
7
7
  export { AnomalyDetector } from './intelligence/anomaly';
8
- export { NanoMindL1 } from './intelligence/nanomind-l1';
8
+ export { RuntimeTwin } from './intelligence/runtime-twin';
9
9
  export { AnthropicAdapter, OpenAIAdapter, OllamaAdapter, createAdapter, autoDetectAdapter } from './intelligence/adapters';
10
10
  export { ProcessMonitor } from './monitors/process';
11
11
  export { NetworkMonitor } from './monitors/network';
@@ -28,6 +28,7 @@ export { GTINForwarder, generateSensorToken, buildGTINPayload, submitGTINEvent,
28
28
  import type { ARPConfig, ARPEvent } from './types';
29
29
  import { EventEngine } from './engine/event-engine';
30
30
  import { IntelligenceCoordinator } from './intelligence/coordinator';
31
+ import { RuntimeTwin } from './intelligence/runtime-twin';
31
32
  import { EnforcementEngine, type AlertCallback } from './enforcement/kill-switch';
32
33
  /**
33
34
  * Agent Runtime Protection — the main entry point.
@@ -52,6 +53,23 @@ export declare class AgentRuntimeProtection {
52
53
  private readonly monitors;
53
54
  private gtinForwarder;
54
55
  private running;
56
+ /**
57
+ * In-process runtime twin (behavioral anomaly scorer). Held for the
58
+ * lifetime of the ARP instance, attached to the event engine in
59
+ * start() so every event trains the twin's baseline. Null when the
60
+ * runtime twin is disabled in config.
61
+ */
62
+ private readonly runtimeTwin;
63
+ /**
64
+ * Transport-agnostic view of the runtime twin passed to the
65
+ * coordinator. Null when the twin is disabled.
66
+ */
67
+ private readonly behavioralRiskSource;
68
+ /**
69
+ * Classification drift detector. Non-null only when the caller
70
+ * provided a baseline in `config.intelligence.guardAnomaly.baseline`.
71
+ */
72
+ private readonly guardAnomaly;
55
73
  constructor(configOrPath?: ARPConfig | string);
56
74
  /** Start all monitors */
57
75
  start(): Promise<void>;
@@ -83,5 +101,14 @@ export declare class AgentRuntimeProtection {
83
101
  getEngine(): EventEngine;
84
102
  /** Get the enforcement engine (for test harnesses) */
85
103
  getEnforcement(): EnforcementEngine;
104
+ /**
105
+ * Get the intelligence coordinator. Exposed so tests can assert the
106
+ * coordinator was constructed with the expected behavioral risk and
107
+ * guard anomaly sources, and so advanced integrations can swap
108
+ * sources at runtime via `setBehavioralRiskSource` / `setGuardAnomaly`.
109
+ */
110
+ getIntelligence(): IntelligenceCoordinator;
111
+ /** The runtime twin instance, or null when disabled. */
112
+ getRuntimeTwin(): RuntimeTwin | null;
86
113
  }
87
114
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/arp/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC;AAG/B,YAAY,EACV,SAAS,EACT,QAAQ,EACR,WAAW,EACX,aAAa,EACb,aAAa,EACb,UAAU,EACV,cAAc,EACd,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,aAAa,EACb,iBAAiB,E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