deepdebug-local-agent 1.6.0 → 1.8.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 (56) hide show
  1. package/docs/la-protocol-v2.md +41 -11
  2. package/env.example +10 -1
  3. package/package.json +1 -1
  4. package/scripts/incident-parity/Gen.java +256 -0
  5. package/scripts/incident-parity/LogEntry.java +17 -0
  6. package/scripts/incident-parity/extract.py +51 -0
  7. package/scripts/incident-parity/gen.sh +32 -0
  8. package/src/incident-detector/README.md +51 -0
  9. package/src/incident-detector/aggregator.js +73 -0
  10. package/src/incident-detector/categorize.js +48 -0
  11. package/src/incident-detector/config.js +95 -0
  12. package/src/incident-detector/detector.js +92 -0
  13. package/src/incident-detector/emitter.js +154 -0
  14. package/src/incident-detector/index.js +44 -0
  15. package/src/incident-detector/java-compat.js +66 -0
  16. package/src/incident-detector/normalize.js +209 -0
  17. package/src/incident-detector/parse.js +114 -0
  18. package/src/incident-detector/sources/file-source.js +113 -0
  19. package/src/incident-detector/sources/loki-source.js +101 -0
  20. package/src/incident-detector/sources/stream-source.js +39 -0
  21. package/src/incident-detector/store.js +119 -0
  22. package/src/la-protocol-v2/content-handlers/config.js +3 -1
  23. package/src/la-protocol-v2/content-handlers/content-index.js +54 -19
  24. package/src/la-protocol-v2/content-handlers/egress.js +22 -0
  25. package/src/la-protocol-v2/content-handlers/file-list.js +174 -0
  26. package/src/la-protocol-v2/content-handlers/git-diff.js +43 -8
  27. package/src/la-protocol-v2/content-handlers/handler.js +28 -4
  28. package/src/la-protocol-v2/content-handlers/install.js +24 -19
  29. package/src/la-protocol-v2/content-handlers/path-guard.js +74 -5
  30. package/src/la-protocol-v2/content-handlers/ref-registry.js +18 -8
  31. package/src/la-protocol-v2/contract/CONTRACT_SOURCE.json +10 -8
  32. package/src/la-protocol-v2/contract/README.md +38 -0
  33. package/src/la-protocol-v2/contract/content.index.schema.json +1 -0
  34. package/src/la-protocol-v2/contract/content.request.schema.json +1 -0
  35. package/src/la-protocol-v2/contract/file.list.body.schema.json +69 -0
  36. package/src/la-protocol-v2/contract.js +9 -0
  37. package/src/la-protocol-v2/runtime.js +11 -2
  38. package/test/contract/la-protocol-v2/vectors/content.index.vectors.json +32 -0
  39. package/test/contract/la-protocol-v2/vectors/content.request.vectors.json +215 -0
  40. package/test/contract/la-protocol-v2/vectors/content.response.vectors.json +30 -0
  41. package/test/contract/la-protocol-v2/vectors/file.list.body.vectors.json +1645 -0
  42. package/test/incident-detector/parity.test.js +66 -0
  43. package/test/incident-detector/parity.vectors.json +2619 -0
  44. package/test/incident-detector/sources.test.js +179 -0
  45. package/test/incident-detector/units.test.js +430 -0
  46. package/test/incident-detector/wiring.test.js +165 -0
  47. package/test/la-protocol-v2/content-alignment.test.js +71 -10
  48. package/test/la-protocol-v2/content-deny-list.test.js +138 -0
  49. package/test/la-protocol-v2/content-diff-symlink.test.js +83 -0
  50. package/test/la-protocol-v2/content-file-list.test.js +385 -0
  51. package/test/la-protocol-v2/content-path-guard.test.js +1 -1
  52. package/test/la-protocol-v2/content-wiring.test.js +2 -2
  53. package/test/la-protocol-v2/contract.test.js +14 -4
  54. package/tools/interop/LaV2NodeFileListE2ETest.java +369 -0
  55. package/tools/interop/README.md +16 -0
  56. package/tools/interop/la-interop-list-client.mjs +93 -0
@@ -320,6 +320,221 @@
320
320
  }
321
321
  }
322
322
  }
323
+ },
324
+ {
325
+ "name": "file-list-root",
326
+ "why": "file.list of the workspace root: the symbolic ref `root` (the gateway needs a workspaceId for it)",
327
+ "expect": {
328
+ "valid": true
329
+ },
330
+ "message": {
331
+ "schemaVersion": 2,
332
+ "type": "content.request",
333
+ "msgId": "00000000-0000-4000-8000-000000000001",
334
+ "seq": 1,
335
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
336
+ "workspaceId": "ws-1",
337
+ "ts": "2026-10-29T10:00:00Z",
338
+ "paramsRaw": "{\"kind\":\"file.list\",\"ref\":\"root\",\"actor\":{\"userId\":\"usr-42\",\"role\":\"member\"}}",
339
+ "sig": {
340
+ "keyId": "vh-cp-2026-10",
341
+ "timestamp": "1793268000",
342
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
343
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
344
+ "workspaceId": "ws-1",
345
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
346
+ },
347
+ "requestId": "d4e5f6a7-b8c9-4d0e-9f1a-3b4c5d6e7f80",
348
+ "payload": {
349
+ "kind": "file.list",
350
+ "ref": "root",
351
+ "actor": {
352
+ "userId": "usr-42",
353
+ "role": "member"
354
+ }
355
+ }
356
+ }
357
+ },
358
+ {
359
+ "name": "file-list-folder-id-with-limit",
360
+ "why": "file.list of a folder (opaque id the agent minted) or a continuation id, page size 1000 (the maximum)",
361
+ "expect": {
362
+ "valid": true
363
+ },
364
+ "message": {
365
+ "schemaVersion": 2,
366
+ "type": "content.request",
367
+ "msgId": "00000000-0000-4000-8000-000000000001",
368
+ "seq": 1,
369
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
370
+ "workspaceId": "ws-1",
371
+ "ts": "2026-10-29T10:00:00Z",
372
+ "paramsRaw": "{\"kind\":\"file.list\",\"ref\":\"BwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwc\",\"limit\":1000,\"actor\":{\"userId\":\"usr-42\",\"role\":\"member\"}}",
373
+ "sig": {
374
+ "keyId": "vh-cp-2026-10",
375
+ "timestamp": "1793268000",
376
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
377
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
378
+ "workspaceId": "ws-1",
379
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
380
+ },
381
+ "requestId": "d4e5f6a7-b8c9-4d0e-9f1a-3b4c5d6e7f80",
382
+ "payload": {
383
+ "kind": "file.list",
384
+ "ref": "BwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwc",
385
+ "limit": 1000,
386
+ "actor": {
387
+ "userId": "usr-42",
388
+ "role": "member"
389
+ }
390
+ }
391
+ }
392
+ },
393
+ {
394
+ "name": "file-list-limit-above-1000",
395
+ "why": "page size is at most 1000 entries",
396
+ "expect": {
397
+ "valid": false,
398
+ "code": "schema_violation",
399
+ "keyword": "maximum"
400
+ },
401
+ "message": {
402
+ "schemaVersion": 2,
403
+ "type": "content.request",
404
+ "msgId": "00000000-0000-4000-8000-000000000001",
405
+ "seq": 1,
406
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
407
+ "workspaceId": "ws-1",
408
+ "ts": "2026-10-29T10:00:00Z",
409
+ "paramsRaw": "{\"kind\":\"file.list\",\"ref\":\"root\",\"limit\":1001,\"actor\":{\"userId\":\"usr-42\",\"role\":\"member\"}}",
410
+ "sig": {
411
+ "keyId": "vh-cp-2026-10",
412
+ "timestamp": "1793268000",
413
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
414
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
415
+ "workspaceId": "ws-1",
416
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
417
+ },
418
+ "requestId": "d4e5f6a7-b8c9-4d0e-9f1a-3b4c5d6e7f80",
419
+ "payload": {
420
+ "kind": "file.list",
421
+ "ref": "root",
422
+ "limit": 1001,
423
+ "actor": {
424
+ "userId": "usr-42",
425
+ "role": "member"
426
+ }
427
+ }
428
+ }
429
+ },
430
+ {
431
+ "name": "file-list-limit-zero",
432
+ "why": "page size is at least 1",
433
+ "expect": {
434
+ "valid": false,
435
+ "code": "schema_violation",
436
+ "keyword": "minimum"
437
+ },
438
+ "message": {
439
+ "schemaVersion": 2,
440
+ "type": "content.request",
441
+ "msgId": "00000000-0000-4000-8000-000000000001",
442
+ "seq": 1,
443
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
444
+ "workspaceId": "ws-1",
445
+ "ts": "2026-10-29T10:00:00Z",
446
+ "paramsRaw": "{\"kind\":\"file.list\",\"ref\":\"root\",\"limit\":0,\"actor\":{\"userId\":\"usr-42\",\"role\":\"member\"}}",
447
+ "sig": {
448
+ "keyId": "vh-cp-2026-10",
449
+ "timestamp": "1793268000",
450
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
451
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
452
+ "workspaceId": "ws-1",
453
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
454
+ },
455
+ "requestId": "d4e5f6a7-b8c9-4d0e-9f1a-3b4c5d6e7f80",
456
+ "payload": {
457
+ "kind": "file.list",
458
+ "ref": "root",
459
+ "limit": 0,
460
+ "actor": {
461
+ "userId": "usr-42",
462
+ "role": "member"
463
+ }
464
+ }
465
+ }
466
+ },
467
+ {
468
+ "name": "file-list-kind-upper-case",
469
+ "why": "kind names are exact and lower-case",
470
+ "expect": {
471
+ "valid": false,
472
+ "code": "schema_violation",
473
+ "keyword": "enum"
474
+ },
475
+ "message": {
476
+ "schemaVersion": 2,
477
+ "type": "content.request",
478
+ "msgId": "00000000-0000-4000-8000-000000000001",
479
+ "seq": 1,
480
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
481
+ "workspaceId": "ws-1",
482
+ "ts": "2026-10-29T10:00:00Z",
483
+ "paramsRaw": "{\"kind\":\"File.List\",\"ref\":\"root\",\"actor\":{\"userId\":\"usr-42\",\"role\":\"member\"}}",
484
+ "sig": {
485
+ "keyId": "vh-cp-2026-10",
486
+ "timestamp": "1793268000",
487
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
488
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
489
+ "workspaceId": "ws-1",
490
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
491
+ },
492
+ "requestId": "d4e5f6a7-b8c9-4d0e-9f1a-3b4c5d6e7f80",
493
+ "payload": {
494
+ "kind": "File.List",
495
+ "ref": "root",
496
+ "actor": {
497
+ "userId": "usr-42",
498
+ "role": "member"
499
+ }
500
+ }
501
+ }
502
+ },
503
+ {
504
+ "name": "file-list-kind-underscore",
505
+ "why": "only `file.list` is the wire name",
506
+ "expect": {
507
+ "valid": false,
508
+ "code": "schema_violation",
509
+ "keyword": "enum"
510
+ },
511
+ "message": {
512
+ "schemaVersion": 2,
513
+ "type": "content.request",
514
+ "msgId": "00000000-0000-4000-8000-000000000001",
515
+ "seq": 1,
516
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
517
+ "workspaceId": "ws-1",
518
+ "ts": "2026-10-29T10:00:00Z",
519
+ "paramsRaw": "{\"kind\":\"file_list\",\"ref\":\"root\",\"actor\":{\"userId\":\"usr-42\",\"role\":\"member\"}}",
520
+ "sig": {
521
+ "keyId": "vh-cp-2026-10",
522
+ "timestamp": "1793268000",
523
+ "nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
524
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
525
+ "workspaceId": "ws-1",
526
+ "signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
527
+ },
528
+ "requestId": "d4e5f6a7-b8c9-4d0e-9f1a-3b4c5d6e7f80",
529
+ "payload": {
530
+ "kind": "file_list",
531
+ "ref": "root",
532
+ "actor": {
533
+ "userId": "usr-42",
534
+ "role": "member"
535
+ }
536
+ }
537
+ }
323
538
  }
324
539
  ]
325
540
  }
@@ -408,6 +408,36 @@
408
408
  }
409
409
  },
410
410
  "why": "schema-valid but byteLength (27) != decoded size of data (26): rule byteLength-decoded, error chunk_inconsistent"
411
+ },
412
+ {
413
+ "name": "file-list-page",
414
+ "why": "the body of a file.list answer: JSON of file.list.body.schema.json, base64, application/json",
415
+ "expect": {
416
+ "valid": true
417
+ },
418
+ "message": {
419
+ "schemaVersion": 2,
420
+ "type": "content.response",
421
+ "msgId": "00000000-0000-4000-8000-000000000001",
422
+ "seq": 1,
423
+ "tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
424
+ "workspaceId": "ws-1",
425
+ "ts": "2026-10-29T10:00:00Z",
426
+ "agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
427
+ "requestId": "d4e5f6a7-b8c9-4d0e-9f1a-3b4c5d6e7f80",
428
+ "chunk": {
429
+ "index": 0,
430
+ "total": 1,
431
+ "last": true
432
+ },
433
+ "payload": {
434
+ "status": "ok",
435
+ "contentType": "application/json",
436
+ "encoding": "base64",
437
+ "data": "eyJlbnRyaWVzIjpbeyJpZCI6IkFRRUJBUUVCQVFFQkFRRUJBUUVCQVFFQkFRRUJBUUVCQVFFQkFRRUJBUUUiLCJuYW1lIjoic3JjIiwidHlwZSI6ImRpciIsInNpemUiOjAsIm10aW1lIjoiMjAyNi0xMS0wM1QwOTozMDowMFoifSx7ImlkIjoiQWdJQ0FnSUNBZ0lDQWdJQ0FnSUNBZ0lDQWdJQ0FnSUNBZ0lDQWdJQ0FnSSIsIm5hbWUiOiJjcmVkZW50aWFscy5zZXJ2aWNlLnRzIiwidHlwZSI6ImZpbGUiLCJzaXplIjoyMzEwLCJtdGltZSI6IjIwMjYtMTEtMDNUMDk6MzA6MDBaIn0seyJpZCI6IkF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd01EQXdNREF3TURBd00iLCJuYW1lIjoiUkVBRE1FLm1kIiwidHlwZSI6ImZpbGUiLCJzaXplIjo1MTIsIm10aW1lIjoiMjAyNi0xMS0wM1QwOTozMDowMFoifV0sIm5leHRSZWYiOiJCQVFFQkFRRUJBUUVCQVFFQkFRRUJBUUVCQVFFQkFRRUJBUUVCQVFFQkFRIn0=",
438
+ "byteLength": 458
439
+ }
440
+ }
411
441
  }
412
442
  ]
413
443
  }