deepdebug-local-agent 1.5.0 → 1.7.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/docs/la-protocol-v2.md +70 -16
- package/env.example +6 -0
- package/package.json +1 -1
- package/scripts/sync-la-protocol-v2-contract.mjs +3 -3
- package/src/la-protocol-v2/content-handlers/config.js +10 -2
- package/src/la-protocol-v2/content-handlers/content-index.js +196 -0
- package/src/la-protocol-v2/content-handlers/egress.js +22 -0
- package/src/la-protocol-v2/content-handlers/file-list.js +174 -0
- package/src/la-protocol-v2/content-handlers/git-diff.js +95 -10
- package/src/la-protocol-v2/content-handlers/handler.js +52 -16
- package/src/la-protocol-v2/content-handlers/install.js +35 -15
- package/src/la-protocol-v2/content-handlers/path-guard.js +120 -10
- package/src/la-protocol-v2/content-handlers/ref-registry.js +41 -13
- package/src/la-protocol-v2/contract/CONTRACT_SOURCE.json +13 -8
- package/src/la-protocol-v2/contract/README.md +87 -2
- package/src/la-protocol-v2/contract/content.index.schema.json +93 -0
- package/src/la-protocol-v2/contract/content.request.schema.json +1 -0
- package/src/la-protocol-v2/contract/envelope.schema.json +1 -0
- package/src/la-protocol-v2/contract/file.list.body.schema.json +69 -0
- package/src/la-protocol-v2/contract/index.json +7 -0
- package/src/la-protocol-v2/contract.js +9 -0
- package/src/la-protocol-v2/runtime.js +12 -2
- package/test/contract/la-protocol-v2/vectors/content.index.vectors.json +3809 -0
- package/test/contract/la-protocol-v2/vectors/content.request.vectors.json +215 -0
- package/test/contract/la-protocol-v2/vectors/content.response.vectors.json +30 -0
- package/test/contract/la-protocol-v2/vectors/file.list.body.vectors.json +1645 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-content-index-before-ready.json +68 -0
- package/test/contract/la-protocol-v2/vectors/traces/valid-content-index.json +161 -0
- package/test/la-protocol-v2/content-alignment.test.js +669 -0
- package/test/la-protocol-v2/content-deny-list.test.js +138 -0
- package/test/la-protocol-v2/content-diff-symlink.test.js +83 -0
- package/test/la-protocol-v2/content-file-list.test.js +385 -0
- package/test/la-protocol-v2/content-handlers.test.js +55 -61
- package/test/la-protocol-v2/content-path-guard.test.js +10 -5
- package/test/la-protocol-v2/content-wiring.test.js +39 -14
- package/test/la-protocol-v2/contract.test.js +15 -5
- package/test/la-protocol-v2/helpers/reference-cp.js +8 -0
- package/test/la-protocol-v2/traces.test.js +29 -4
- package/tools/interop/LaV2NodeContentInteropTest.java +18 -4
- package/tools/interop/LaV2NodeContentRelayE2ETest.java +374 -0
- package/tools/interop/LaV2NodeFileListE2ETest.java +369 -0
- package/tools/interop/README.md +16 -0
- package/tools/interop/la-interop-content-client.mjs +19 -8
- 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
|
}
|