deepdebug-local-agent 1.8.0 → 1.10.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.
- package/.claude/context.md +2 -1
- package/AGENTS.md +1 -1
- package/CLAUDE.md +1 -1
- package/docs/la-jobs-and-llm.md +56 -0
- package/docs/la-protocol-v2.md +19 -2
- package/env.example +11 -0
- package/package.json +1 -1
- package/src/incident-detector/README.md +2 -1
- package/src/incident-detector/aggregator.js +8 -3
- package/src/incident-detector/detector.js +2 -1
- package/src/incident-detector/emitter.js +16 -6
- package/src/incident-detector/index.js +3 -3
- package/src/incident-detector/sources/webhook-source.js +109 -0
- package/src/la-protocol-v2/content-handlers/install.js +27 -1
- package/src/la-protocol-v2/contract/CONTRACT_SOURCE.json +26 -18
- package/src/la-protocol-v2/contract/README.md +127 -3
- package/src/la-protocol-v2/contract/config.update.schema.json +85 -1
- package/src/la-protocol-v2/contract/hello.schema.json +26 -1
- package/src/la-protocol-v2/contract/incident.candidate.schema.json +11 -0
- package/src/la-protocol-v2/contract/index.json +9 -2
- package/src/la-protocol-v2/contract/job.assign.schema.json +31 -0
- package/src/la-protocol-v2/contract/ready.schema.json +8 -0
- package/src/la-protocol-v2/contract/register.schema.json +26 -1
- package/src/la-protocol-v2/contract/webhook.forward.schema.json +72 -3
- package/src/la-protocol-v2/contract.js +45 -7
- package/src/la-protocol-v2/jobs/config.js +60 -0
- package/src/la-protocol-v2/jobs/events.js +106 -0
- package/src/la-protocol-v2/jobs/install.js +37 -0
- package/src/la-protocol-v2/jobs/manager.js +276 -0
- package/src/la-protocol-v2/jobs/options.js +56 -0
- package/src/la-protocol-v2/jobs/smoke-runner.js +39 -0
- package/src/la-protocol-v2/llm/client.js +311 -0
- package/src/la-protocol-v2/llm/config.js +61 -0
- package/src/la-protocol-v2/llm/install.js +17 -0
- package/src/la-protocol-v2/llm-key/config.js +29 -0
- package/src/la-protocol-v2/llm-key/handler.js +33 -0
- package/src/la-protocol-v2/llm-key/install.js +21 -0
- package/src/la-protocol-v2/llm-key/store.js +183 -0
- package/src/la-protocol-v2/runtime.js +71 -4
- package/src/la-protocol-v2/session.js +47 -13
- package/src/la-protocol-v2/webhooks/assembler.js +85 -0
- package/src/la-protocol-v2/webhooks/config.js +51 -0
- package/src/la-protocol-v2/webhooks/handler.js +125 -0
- package/src/la-protocol-v2/webhooks/install.js +22 -0
- package/test/contract/la-protocol-v2/vectors/ack.vectors.json +91 -0
- package/test/contract/la-protocol-v2/vectors/config.update.vectors.json +1339 -0
- package/test/contract/la-protocol-v2/vectors/hello.vectors.json +261 -0
- package/test/contract/la-protocol-v2/vectors/incident.candidate.vectors.json +623 -0
- package/test/contract/la-protocol-v2/vectors/job.assign.vectors.json +1538 -0
- package/test/contract/la-protocol-v2/vectors/ready.vectors.json +599 -0
- package/test/contract/la-protocol-v2/vectors/register.vectors.json +275 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-after-last.json +186 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-body-hash-changes.json +186 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-last-flag-wrong.json +186 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-non-last-too-short.json +152 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-out-of-order.json +152 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-sha-mismatch.json +186 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-webhook-chunk-total-changes.json +186 -0
- package/test/contract/la-protocol-v2/vectors/traces/valid-webhook-chunks-in-order.json +218 -0
- package/test/contract/la-protocol-v2/vectors/webhook.forward.vectors.json +1263 -0
- package/test/incident-detector/size-model.test.js +127 -0
- package/test/la-protocol-v2/contract-v21.test.js +107 -0
- package/test/la-protocol-v2/contract.test.js +6 -4
- package/test/la-protocol-v2/helpers/fake-llm.js +64 -0
- package/test/la-protocol-v2/helpers/reference-cp.js +8 -4
- package/test/la-protocol-v2/jobs-e2e.test.js +405 -0
- package/test/la-protocol-v2/jobs-manager.test.js +370 -0
- package/test/la-protocol-v2/jobs-options.test.js +288 -0
- package/test/la-protocol-v2/llm-client.test.js +380 -0
- package/test/la-protocol-v2/llm-key.test.js +509 -0
- package/test/la-protocol-v2/traces.test.js +3 -3
- package/test/la-protocol-v2/webhook-receiver.test.js +702 -0
|
@@ -219,6 +219,267 @@
|
|
|
219
219
|
"queueDepth": 0
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"name": "capability-llm-key-held",
|
|
225
|
+
"why": "v2.1 LA with a live, unexpired LLM key in use announces llm.key.held next to llm.key",
|
|
226
|
+
"expect": {
|
|
227
|
+
"valid": true
|
|
228
|
+
},
|
|
229
|
+
"message": {
|
|
230
|
+
"schemaVersion": 2,
|
|
231
|
+
"type": "hello",
|
|
232
|
+
"msgId": "00000000-0000-4000-8000-000000000001",
|
|
233
|
+
"seq": 0,
|
|
234
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
235
|
+
"workspaceId": "ws-1",
|
|
236
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
237
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
238
|
+
"payload": {
|
|
239
|
+
"laVersion": "2.4.0",
|
|
240
|
+
"capabilities": [
|
|
241
|
+
"content.request",
|
|
242
|
+
"webhook.forward",
|
|
243
|
+
"webhook.chunked",
|
|
244
|
+
"llm.key",
|
|
245
|
+
"llm.key.held",
|
|
246
|
+
"contract.v2.1"
|
|
247
|
+
],
|
|
248
|
+
"signatureMode": "enforce",
|
|
249
|
+
"graphify": {
|
|
250
|
+
"state": "ready",
|
|
251
|
+
"nodes": 12840,
|
|
252
|
+
"edges": 40211,
|
|
253
|
+
"commit": "9fceb02d",
|
|
254
|
+
"ageSeconds": 300
|
|
255
|
+
},
|
|
256
|
+
"diskFreeBytes": 52428800000,
|
|
257
|
+
"queueDepth": 0,
|
|
258
|
+
"clockEpochMs": 1793268000000
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"name": "capability-llm-key-without-held-after-restart",
|
|
264
|
+
"why": "the same LA after a restart (memory-only key lost): llm.key but NOT llm.key.held, so the CP delivers a key again (2.0 behaviour for the key)",
|
|
265
|
+
"expect": {
|
|
266
|
+
"valid": true
|
|
267
|
+
},
|
|
268
|
+
"message": {
|
|
269
|
+
"schemaVersion": 2,
|
|
270
|
+
"type": "hello",
|
|
271
|
+
"msgId": "00000000-0000-4000-8000-000000000001",
|
|
272
|
+
"seq": 0,
|
|
273
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
274
|
+
"workspaceId": "ws-1",
|
|
275
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
276
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
277
|
+
"payload": {
|
|
278
|
+
"laVersion": "2.4.0",
|
|
279
|
+
"capabilities": [
|
|
280
|
+
"content.request",
|
|
281
|
+
"webhook.forward",
|
|
282
|
+
"webhook.chunked",
|
|
283
|
+
"llm.key",
|
|
284
|
+
"contract.v2.1"
|
|
285
|
+
],
|
|
286
|
+
"signatureMode": "enforce",
|
|
287
|
+
"graphify": {
|
|
288
|
+
"state": "ready",
|
|
289
|
+
"nodes": 12840,
|
|
290
|
+
"edges": 40211,
|
|
291
|
+
"commit": "9fceb02d",
|
|
292
|
+
"ageSeconds": 300
|
|
293
|
+
},
|
|
294
|
+
"diskFreeBytes": 52428800000,
|
|
295
|
+
"queueDepth": 0,
|
|
296
|
+
"clockEpochMs": 1793268000000
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "capability-llm-key-held-without-llm-key",
|
|
302
|
+
"why": "llm.key.held is only meaningful for an LA that handles llm.key: it must announce both",
|
|
303
|
+
"expect": {
|
|
304
|
+
"valid": false,
|
|
305
|
+
"code": "schema_violation"
|
|
306
|
+
},
|
|
307
|
+
"message": {
|
|
308
|
+
"schemaVersion": 2,
|
|
309
|
+
"type": "hello",
|
|
310
|
+
"msgId": "00000000-0000-4000-8000-000000000001",
|
|
311
|
+
"seq": 0,
|
|
312
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
313
|
+
"workspaceId": "ws-1",
|
|
314
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
315
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
316
|
+
"payload": {
|
|
317
|
+
"laVersion": "2.4.0",
|
|
318
|
+
"capabilities": [
|
|
319
|
+
"content.request",
|
|
320
|
+
"llm.key.held",
|
|
321
|
+
"contract.v2.1"
|
|
322
|
+
],
|
|
323
|
+
"signatureMode": "enforce",
|
|
324
|
+
"graphify": {
|
|
325
|
+
"state": "ready",
|
|
326
|
+
"nodes": 12840,
|
|
327
|
+
"edges": 40211,
|
|
328
|
+
"commit": "9fceb02d",
|
|
329
|
+
"ageSeconds": 300
|
|
330
|
+
},
|
|
331
|
+
"diskFreeBytes": 52428800000,
|
|
332
|
+
"queueDepth": 0,
|
|
333
|
+
"clockEpochMs": 1793268000000
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"name": "capability-llm-key-held-alone",
|
|
339
|
+
"why": "llm.key.held with no llm.key and no other capability",
|
|
340
|
+
"expect": {
|
|
341
|
+
"valid": false,
|
|
342
|
+
"code": "schema_violation"
|
|
343
|
+
},
|
|
344
|
+
"message": {
|
|
345
|
+
"schemaVersion": 2,
|
|
346
|
+
"type": "hello",
|
|
347
|
+
"msgId": "00000000-0000-4000-8000-000000000001",
|
|
348
|
+
"seq": 0,
|
|
349
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
350
|
+
"workspaceId": "ws-1",
|
|
351
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
352
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
353
|
+
"payload": {
|
|
354
|
+
"laVersion": "2.4.0",
|
|
355
|
+
"capabilities": [
|
|
356
|
+
"llm.key.held"
|
|
357
|
+
],
|
|
358
|
+
"signatureMode": "enforce",
|
|
359
|
+
"graphify": {
|
|
360
|
+
"state": "ready",
|
|
361
|
+
"nodes": 12840,
|
|
362
|
+
"edges": 40211,
|
|
363
|
+
"commit": "9fceb02d",
|
|
364
|
+
"ageSeconds": 300
|
|
365
|
+
},
|
|
366
|
+
"diskFreeBytes": 52428800000,
|
|
367
|
+
"queueDepth": 0,
|
|
368
|
+
"clockEpochMs": 1793268000000
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"name": "capability-llm-key-held-uppercase",
|
|
374
|
+
"why": "capability names are lower-case: LLM.key.held does not match the name pattern",
|
|
375
|
+
"expect": {
|
|
376
|
+
"valid": false,
|
|
377
|
+
"code": "schema_violation",
|
|
378
|
+
"keyword": "pattern"
|
|
379
|
+
},
|
|
380
|
+
"message": {
|
|
381
|
+
"schemaVersion": 2,
|
|
382
|
+
"type": "hello",
|
|
383
|
+
"msgId": "00000000-0000-4000-8000-000000000001",
|
|
384
|
+
"seq": 0,
|
|
385
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
386
|
+
"workspaceId": "ws-1",
|
|
387
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
388
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
389
|
+
"payload": {
|
|
390
|
+
"laVersion": "2.4.0",
|
|
391
|
+
"capabilities": [
|
|
392
|
+
"llm.key",
|
|
393
|
+
"LLM.key.held"
|
|
394
|
+
],
|
|
395
|
+
"signatureMode": "enforce",
|
|
396
|
+
"graphify": {
|
|
397
|
+
"state": "ready",
|
|
398
|
+
"nodes": 12840,
|
|
399
|
+
"edges": 40211,
|
|
400
|
+
"commit": "9fceb02d",
|
|
401
|
+
"ageSeconds": 300
|
|
402
|
+
},
|
|
403
|
+
"diskFreeBytes": 52428800000,
|
|
404
|
+
"queueDepth": 0,
|
|
405
|
+
"clockEpochMs": 1793268000000
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"name": "capability-llm-key-held-trailing-dot",
|
|
411
|
+
"why": "a trailing separator is not a valid capability name",
|
|
412
|
+
"expect": {
|
|
413
|
+
"valid": false,
|
|
414
|
+
"code": "schema_violation",
|
|
415
|
+
"keyword": "pattern"
|
|
416
|
+
},
|
|
417
|
+
"message": {
|
|
418
|
+
"schemaVersion": 2,
|
|
419
|
+
"type": "hello",
|
|
420
|
+
"msgId": "00000000-0000-4000-8000-000000000001",
|
|
421
|
+
"seq": 0,
|
|
422
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
423
|
+
"workspaceId": "ws-1",
|
|
424
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
425
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
426
|
+
"payload": {
|
|
427
|
+
"laVersion": "2.4.0",
|
|
428
|
+
"capabilities": [
|
|
429
|
+
"llm.key",
|
|
430
|
+
"llm.key.held."
|
|
431
|
+
],
|
|
432
|
+
"signatureMode": "enforce",
|
|
433
|
+
"graphify": {
|
|
434
|
+
"state": "ready",
|
|
435
|
+
"nodes": 12840,
|
|
436
|
+
"edges": 40211,
|
|
437
|
+
"commit": "9fceb02d",
|
|
438
|
+
"ageSeconds": 300
|
|
439
|
+
},
|
|
440
|
+
"diskFreeBytes": 52428800000,
|
|
441
|
+
"queueDepth": 0,
|
|
442
|
+
"clockEpochMs": 1793268000000
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"name": "capability-llm-key-held-duplicated",
|
|
448
|
+
"why": "a capability is announced once",
|
|
449
|
+
"expect": {
|
|
450
|
+
"valid": false,
|
|
451
|
+
"code": "schema_violation",
|
|
452
|
+
"keyword": "uniqueItems"
|
|
453
|
+
},
|
|
454
|
+
"message": {
|
|
455
|
+
"schemaVersion": 2,
|
|
456
|
+
"type": "hello",
|
|
457
|
+
"msgId": "00000000-0000-4000-8000-000000000001",
|
|
458
|
+
"seq": 0,
|
|
459
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
460
|
+
"workspaceId": "ws-1",
|
|
461
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
462
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
463
|
+
"payload": {
|
|
464
|
+
"laVersion": "2.4.0",
|
|
465
|
+
"capabilities": [
|
|
466
|
+
"llm.key",
|
|
467
|
+
"llm.key.held",
|
|
468
|
+
"llm.key.held"
|
|
469
|
+
],
|
|
470
|
+
"signatureMode": "enforce",
|
|
471
|
+
"graphify": {
|
|
472
|
+
"state": "ready",
|
|
473
|
+
"nodes": 12840,
|
|
474
|
+
"edges": 40211,
|
|
475
|
+
"commit": "9fceb02d",
|
|
476
|
+
"ageSeconds": 300
|
|
477
|
+
},
|
|
478
|
+
"diskFreeBytes": 52428800000,
|
|
479
|
+
"queueDepth": 0,
|
|
480
|
+
"clockEpochMs": 1793268000000
|
|
481
|
+
}
|
|
482
|
+
}
|
|
222
483
|
}
|
|
223
484
|
]
|
|
224
485
|
}
|