deepdebug-local-agent 1.4.0 → 1.6.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 +69 -5
- package/env.example +4 -0
- package/package.json +1 -1
- package/scripts/sync-la-protocol-v2-contract.mjs +3 -3
- package/src/la-protocol-v2/content-handlers/audit.js +36 -0
- package/src/la-protocol-v2/content-handlers/config.js +54 -0
- package/src/la-protocol-v2/content-handlers/content-index.js +161 -0
- package/src/la-protocol-v2/content-handlers/egress.js +65 -0
- package/src/la-protocol-v2/content-handlers/git-diff.js +142 -0
- package/src/la-protocol-v2/content-handlers/handler.js +182 -0
- package/src/la-protocol-v2/content-handlers/index.js +6 -0
- package/src/la-protocol-v2/content-handlers/install.js +65 -0
- package/src/la-protocol-v2/content-handlers/path-guard.js +183 -0
- package/src/la-protocol-v2/content-handlers/ref-registry.js +105 -0
- package/src/la-protocol-v2/content.js +7 -1
- package/src/la-protocol-v2/contract/CONTRACT_SOURCE.json +9 -6
- package/src/la-protocol-v2/contract/README.md +49 -2
- package/src/la-protocol-v2/contract/content.index.schema.json +92 -0
- package/src/la-protocol-v2/contract/envelope.schema.json +1 -0
- package/src/la-protocol-v2/contract/index.json +7 -0
- package/src/la-protocol-v2/runtime.js +23 -4
- package/src/server.js +4 -1
- package/test/contract/la-protocol-v2/vectors/content.index.vectors.json +3777 -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 +608 -0
- package/test/la-protocol-v2/content-handlers.test.js +627 -0
- package/test/la-protocol-v2/content-path-guard.test.js +219 -0
- package/test/la-protocol-v2/content-wiring.test.js +250 -0
- package/test/la-protocol-v2/contract.test.js +5 -5
- package/test/la-protocol-v2/helpers/content-rig.js +94 -0
- package/test/la-protocol-v2/helpers/reference-cp.js +8 -0
- package/test/la-protocol-v2/helpers/spawn-agent.js +2 -1
- package/test/la-protocol-v2/traces.test.js +29 -4
- package/tools/interop/LaV2NodeContentInteropTest.java +262 -0
- package/tools/interop/LaV2NodeContentRelayE2ETest.java +374 -0
- package/tools/interop/README.md +17 -0
- package/tools/interop/la-interop-content-client.mjs +102 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "invalid-content-index-before-ready",
|
|
3
|
+
"why": "content.index before hello/ready",
|
|
4
|
+
"session": {
|
|
5
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
6
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
7
|
+
"requireEnforce": true,
|
|
8
|
+
"now": "2026-10-29T10:00:00Z"
|
|
9
|
+
},
|
|
10
|
+
"frames": [
|
|
11
|
+
{
|
|
12
|
+
"dir": "la->cp",
|
|
13
|
+
"frame": {
|
|
14
|
+
"schemaVersion": 2,
|
|
15
|
+
"type": "register",
|
|
16
|
+
"msgId": "00000000-0000-4000-8000-000000009000",
|
|
17
|
+
"seq": 0,
|
|
18
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
19
|
+
"workspaceId": "ws-1",
|
|
20
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
21
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
22
|
+
"payload": {
|
|
23
|
+
"protocol": 2,
|
|
24
|
+
"laVersion": "2.4.0",
|
|
25
|
+
"capabilities": [
|
|
26
|
+
"content.request",
|
|
27
|
+
"job.assign",
|
|
28
|
+
"incident.detect"
|
|
29
|
+
],
|
|
30
|
+
"signatureMode": "enforce",
|
|
31
|
+
"workspaces": [
|
|
32
|
+
{
|
|
33
|
+
"workspaceId": "ws-1",
|
|
34
|
+
"pathSha256": "abababababababababababababababababababababababababababababababab"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"dir": "la->cp",
|
|
42
|
+
"frame": {
|
|
43
|
+
"schemaVersion": 2,
|
|
44
|
+
"type": "content.index",
|
|
45
|
+
"msgId": "00000000-0000-4000-8000-000000000001",
|
|
46
|
+
"seq": 1,
|
|
47
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
48
|
+
"workspaceId": "ws-1",
|
|
49
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
50
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
51
|
+
"payload": {
|
|
52
|
+
"entries": [
|
|
53
|
+
{
|
|
54
|
+
"kind": "file",
|
|
55
|
+
"ref": "ypeBEsobvcr6wjGzmiPcTaeG7_gUfE5yuYB3ha_uSLs",
|
|
56
|
+
"size": 1024
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"expect": {
|
|
64
|
+
"ok": false,
|
|
65
|
+
"error": "not_ready",
|
|
66
|
+
"atFrame": 1
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "valid-content-index",
|
|
3
|
+
"why": "content.index (opaque ids, no names) after ready: two inventories acked in order",
|
|
4
|
+
"session": {
|
|
5
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
6
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
7
|
+
"requireEnforce": true,
|
|
8
|
+
"now": "2026-10-29T10:00:00Z"
|
|
9
|
+
},
|
|
10
|
+
"frames": [
|
|
11
|
+
{
|
|
12
|
+
"dir": "la->cp",
|
|
13
|
+
"frame": {
|
|
14
|
+
"schemaVersion": 2,
|
|
15
|
+
"type": "register",
|
|
16
|
+
"msgId": "00000000-0000-4000-8000-000000009000",
|
|
17
|
+
"seq": 0,
|
|
18
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
19
|
+
"workspaceId": "ws-1",
|
|
20
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
21
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
22
|
+
"payload": {
|
|
23
|
+
"protocol": 2,
|
|
24
|
+
"laVersion": "2.4.0",
|
|
25
|
+
"capabilities": [
|
|
26
|
+
"content.request",
|
|
27
|
+
"job.assign",
|
|
28
|
+
"incident.detect"
|
|
29
|
+
],
|
|
30
|
+
"signatureMode": "enforce",
|
|
31
|
+
"workspaces": [
|
|
32
|
+
{
|
|
33
|
+
"workspaceId": "ws-1",
|
|
34
|
+
"pathSha256": "abababababababababababababababababababababababababababababababab"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"dir": "la->cp",
|
|
42
|
+
"frame": {
|
|
43
|
+
"schemaVersion": 2,
|
|
44
|
+
"type": "hello",
|
|
45
|
+
"msgId": "00000000-0000-4000-8000-000000009000",
|
|
46
|
+
"seq": 0,
|
|
47
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
48
|
+
"workspaceId": "ws-1",
|
|
49
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
50
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
51
|
+
"payload": {
|
|
52
|
+
"laVersion": "2.4.0",
|
|
53
|
+
"capabilities": [
|
|
54
|
+
"content.request",
|
|
55
|
+
"job.assign"
|
|
56
|
+
],
|
|
57
|
+
"signatureMode": "enforce",
|
|
58
|
+
"graphify": {
|
|
59
|
+
"state": "ready",
|
|
60
|
+
"nodes": 12840,
|
|
61
|
+
"edges": 40211,
|
|
62
|
+
"commit": "9fceb02d",
|
|
63
|
+
"ageSeconds": 300
|
|
64
|
+
},
|
|
65
|
+
"diskFreeBytes": 52428800000,
|
|
66
|
+
"queueDepth": 0,
|
|
67
|
+
"clockEpochMs": 1793268000000
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"dir": "cp->la",
|
|
73
|
+
"frame": {
|
|
74
|
+
"schemaVersion": 2,
|
|
75
|
+
"type": "ready",
|
|
76
|
+
"msgId": "00000000-0000-4000-8000-000000009000",
|
|
77
|
+
"seq": 0,
|
|
78
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
79
|
+
"workspaceId": "ws-1",
|
|
80
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
81
|
+
"paramsRaw": "{\"protocol\":2,\"sessionId\":\"e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091\",\"resumed\":false,\"peerLastSeq\":0,\"limits\":{\"maxFrameBytes\":49152,\"chunkRawBytes\":32768,\"maxChunks\":64,\"ackTimeoutMs\":5000,\"maxRetries\":3,\"heartbeatSeconds\":30,\"contentFirstByteMs\":10000,\"contentTotalMs\":30000}}",
|
|
82
|
+
"sig": {
|
|
83
|
+
"keyId": "vh-cp-2026-10",
|
|
84
|
+
"timestamp": "1793268000",
|
|
85
|
+
"nonce": "Zm9vYmFyYmF6cXV4MTIzNDU2",
|
|
86
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
87
|
+
"workspaceId": "ws-1",
|
|
88
|
+
"signature": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="
|
|
89
|
+
},
|
|
90
|
+
"payload": {
|
|
91
|
+
"protocol": 2,
|
|
92
|
+
"sessionId": "e5f6a7b8-c9d0-4e1f-8a2b-4c5d6e7f8091",
|
|
93
|
+
"resumed": false,
|
|
94
|
+
"peerLastSeq": 0,
|
|
95
|
+
"limits": {
|
|
96
|
+
"maxFrameBytes": 49152,
|
|
97
|
+
"chunkRawBytes": 32768,
|
|
98
|
+
"maxChunks": 64,
|
|
99
|
+
"ackTimeoutMs": 5000,
|
|
100
|
+
"maxRetries": 3,
|
|
101
|
+
"heartbeatSeconds": 30,
|
|
102
|
+
"contentFirstByteMs": 10000,
|
|
103
|
+
"contentTotalMs": 30000
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"dir": "la->cp",
|
|
110
|
+
"frame": {
|
|
111
|
+
"schemaVersion": 2,
|
|
112
|
+
"type": "content.index",
|
|
113
|
+
"msgId": "00000000-0000-4000-8000-000000000001",
|
|
114
|
+
"seq": 1,
|
|
115
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
116
|
+
"workspaceId": "ws-1",
|
|
117
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
118
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
119
|
+
"payload": {
|
|
120
|
+
"entries": [
|
|
121
|
+
{
|
|
122
|
+
"kind": "file",
|
|
123
|
+
"ref": "ypeBEsobvcr6wjGzmiPcTaeG7_gUfE5yuYB3ha_uSLs",
|
|
124
|
+
"size": 1024
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"kind": "diff",
|
|
128
|
+
"ref": "PiPoFgA5WUoziU9lZOGxNIu9egCI1CxKy3PurtWcAJ0",
|
|
129
|
+
"size": 0
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"dir": "la->cp",
|
|
137
|
+
"frame": {
|
|
138
|
+
"schemaVersion": 2,
|
|
139
|
+
"type": "content.index",
|
|
140
|
+
"msgId": "00000000-0000-4000-8000-000000000002",
|
|
141
|
+
"seq": 2,
|
|
142
|
+
"tenantId": "3f2b8c1e-5a4d-4e7b-9c21-0a1b2c3d4e5f",
|
|
143
|
+
"workspaceId": "ws-1",
|
|
144
|
+
"ts": "2026-10-29T10:00:00Z",
|
|
145
|
+
"agentId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
|
146
|
+
"payload": {
|
|
147
|
+
"entries": [
|
|
148
|
+
{
|
|
149
|
+
"kind": "log.window",
|
|
150
|
+
"ref": "Ln0sA6lQeuJl7PW1NWiFpTOTogKdJBOUmXJloaJa78Y",
|
|
151
|
+
"size": 65536
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"expect": {
|
|
159
|
+
"ok": true
|
|
160
|
+
}
|
|
161
|
+
}
|