deepdebug-local-agent 1.2.0 → 1.4.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/.github/workflows/deploy-gcp.yml +58 -26
- package/CHANGELOG.md +13 -0
- package/docs/la-protocol-v2.md +68 -0
- package/docs/ws-metadata-only.md +44 -0
- package/env.example +7 -0
- package/package.json +2 -1
- package/scripts/sync-la-protocol-v2-contract.mjs +58 -0
- package/src/la-protocol-v2/chunks.js +45 -0
- package/src/la-protocol-v2/config.js +27 -0
- package/src/la-protocol-v2/content.js +57 -0
- package/src/la-protocol-v2/contract/CONTRACT_SOURCE.json +81 -0
- package/src/la-protocol-v2/contract/README.md +103 -0
- package/src/la-protocol-v2/contract/ack.schema.json +51 -0
- package/src/la-protocol-v2/contract/alert.schema.json +62 -0
- package/src/la-protocol-v2/contract/approval.decision.schema.json +57 -0
- package/src/la-protocol-v2/contract/audit.event.schema.json +86 -0
- package/src/la-protocol-v2/contract/config.update.schema.json +73 -0
- package/src/la-protocol-v2/contract/content.request.schema.json +110 -0
- package/src/la-protocol-v2/contract/content.response.schema.json +90 -0
- package/src/la-protocol-v2/contract/defs.schema.json +191 -0
- package/src/la-protocol-v2/contract/envelope.schema.json +89 -0
- package/src/la-protocol-v2/contract/error.schema.json +59 -0
- package/src/la-protocol-v2/contract/heartbeat.schema.json +100 -0
- package/src/la-protocol-v2/contract/hello.schema.json +111 -0
- package/src/la-protocol-v2/contract/incident.candidate.schema.json +102 -0
- package/src/la-protocol-v2/contract/index.json +166 -0
- package/src/la-protocol-v2/contract/job.assign.schema.json +212 -0
- package/src/la-protocol-v2/contract/job.cancel.schema.json +52 -0
- package/src/la-protocol-v2/contract/job.event.schema.json +115 -0
- package/src/la-protocol-v2/contract/job.result.schema.json +100 -0
- package/src/la-protocol-v2/contract/log.stats.schema.json +79 -0
- package/src/la-protocol-v2/contract/ready.schema.json +106 -0
- package/src/la-protocol-v2/contract/register.schema.json +92 -0
- package/src/la-protocol-v2/contract/scan.upload.schema.json +59 -0
- package/src/la-protocol-v2/contract/scan.uploaded.schema.json +51 -0
- package/src/la-protocol-v2/contract/webhook.forward.schema.json +69 -0
- package/src/la-protocol-v2/contract.js +90 -0
- package/src/la-protocol-v2/errors.js +34 -0
- package/src/la-protocol-v2/index.js +8 -0
- package/src/la-protocol-v2/link.js +93 -0
- package/src/la-protocol-v2/runtime.js +72 -0
- package/src/la-protocol-v2/session.js +650 -0
- package/src/la-protocol-v2/strict-json.js +47 -0
- package/src/mcp-http-server.js +5 -3
- package/src/server.js +70 -9
- package/src/utils/exec-policy.js +8 -1
- package/src/ws-channel/allowlist.js +143 -0
- package/src/ws-channel/config.js +22 -0
- package/src/ws-channel/connection-state.js +18 -0
- package/src/ws-channel/index.js +6 -0
- package/src/ws-channel/metadata-guard.js +78 -0
- package/src/ws-channel/policy-offline.js +40 -0
- package/src/ws-channel/transit-guard.js +55 -0
- package/test/contract/la-protocol-v2/vectors/ack.vectors.json +149 -0
- package/test/contract/la-protocol-v2/vectors/alert.vectors.json +101 -0
- package/test/contract/la-protocol-v2/vectors/approval.decision.vectors.json +165 -0
- package/test/contract/la-protocol-v2/vectors/audit.event.vectors.json +156 -0
- package/test/contract/la-protocol-v2/vectors/config.update.vectors.json +189 -0
- package/test/contract/la-protocol-v2/vectors/content.request.vectors.json +325 -0
- package/test/contract/la-protocol-v2/vectors/content.response.vectors.json +413 -0
- package/test/contract/la-protocol-v2/vectors/cross-type.vectors.json +260 -0
- package/test/contract/la-protocol-v2/vectors/error.vectors.json +179 -0
- package/test/contract/la-protocol-v2/vectors/heartbeat.vectors.json +109 -0
- package/test/contract/la-protocol-v2/vectors/hello.vectors.json +224 -0
- package/test/contract/la-protocol-v2/vectors/incident.candidate.vectors.json +186 -0
- package/test/contract/la-protocol-v2/vectors/job.assign.vectors.json +631 -0
- package/test/contract/la-protocol-v2/vectors/job.cancel.vectors.json +133 -0
- package/test/contract/la-protocol-v2/vectors/job.event.vectors.json +233 -0
- package/test/contract/la-protocol-v2/vectors/job.result.vectors.json +137 -0
- package/test/contract/la-protocol-v2/vectors/log.stats.vectors.json +137 -0
- package/test/contract/la-protocol-v2/vectors/ready.vectors.json +177 -0
- package/test/contract/la-protocol-v2/vectors/register.vectors.json +399 -0
- package/test/contract/la-protocol-v2/vectors/scan.upload.vectors.json +137 -0
- package/test/contract/la-protocol-v2/vectors/scan.uploaded.vectors.json +101 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-agent-mismatch.json +140 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-chunk-after-last.json +200 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-chunk-byte-length-mismatch.json +174 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-chunk-last-flag.json +200 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-chunk-out-of-order.json +200 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-chunk-total-changes.json +200 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-clock-skew.json +46 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-event-before-ready.json +72 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-first-frame-not-register.json +48 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-frame-over-48kib.json +141 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-la-sends-job-assign.json +173 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-params-raw-differs-from-payload.json +172 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-payload-above-limit.json +174 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-resume-restarts-seq.json +144 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-seq-gap.json +166 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-seq-repeated.json +166 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-sig-tenant-mismatch.json +172 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-signature-warn-with-enforce-required.json +77 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-tenant-mismatch.json +140 -0
- package/test/contract/la-protocol-v2/vectors/traces/invalid-type-outside-allowlist.json +140 -0
- package/test/contract/la-protocol-v2/vectors/traces/valid-content-chunks-in-order.json +224 -0
- package/test/contract/la-protocol-v2/vectors/traces/valid-handshake-and-job.json +266 -0
- package/test/contract/la-protocol-v2/vectors/traces/valid-resume-continues-seq.json +168 -0
- package/test/contract/la-protocol-v2/vectors/traces/valid-retransmit-is-idempotent.json +193 -0
- package/test/contract/la-protocol-v2/vectors/webhook.forward.vectors.json +170 -0
- package/test/la-protocol-v2/contract.test.js +131 -0
- package/test/la-protocol-v2/helpers/la-rig.js +83 -0
- package/test/la-protocol-v2/helpers/reference-cp.js +349 -0
- package/test/la-protocol-v2/helpers/spawn-agent.js +35 -0
- package/test/la-protocol-v2/link.test.js +141 -0
- package/test/la-protocol-v2/session-inbound.test.js +279 -0
- package/test/la-protocol-v2/session-outbound.test.js +382 -0
- package/test/la-protocol-v2/traces.test.js +270 -0
- package/test/la-protocol-v2/tunnel-e2e.test.js +124 -0
- package/test/ws-channel/allowlist.test.js +67 -0
- package/test/ws-channel/metadata-guard.test.js +104 -0
- package/test/ws-channel/policy-offline.test.js +99 -0
- package/test/ws-channel/tunnel-e2e.test.js +88 -0
- package/tools/graphify-validation/extras/README.md +19 -0
- package/tools/graphify-validation/extras/bymethod.py +35 -0
- package/tools/graphify-validation/extras/docker/Dockerfile +16 -0
- package/tools/graphify-validation/extras/docker/inner.sh +7 -0
- package/tools/graphify-validation/extras/g10.py +59 -0
- package/tools/graphify-validation/extras/g3aug.py +49 -0
- package/tools/graphify-validation/extras/hybrid.py +34 -0
- package/tools/graphify-validation/extras/truth2.py +44 -0
- package/tools/interop/LaV2NodeInteropTest.java +266 -0
- package/tools/interop/README.md +21 -0
- package/tools/interop/la-interop-client.mjs +97 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.visionhammer.io/la-protocol-v2/defs.schema.json",
|
|
4
|
+
"title": "LA protocol v2 shared definitions",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"uuid": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"minLength": 36,
|
|
9
|
+
"maxLength": 36,
|
|
10
|
+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
11
|
+
},
|
|
12
|
+
"tenantId": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 36,
|
|
15
|
+
"maxLength": 36,
|
|
16
|
+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
|
|
17
|
+
},
|
|
18
|
+
"workspaceId": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"maxLength": 64,
|
|
21
|
+
"pattern": "^[A-Za-z0-9_.-]{0,64}$"
|
|
22
|
+
},
|
|
23
|
+
"shortId": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 1,
|
|
26
|
+
"maxLength": 64,
|
|
27
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$"
|
|
28
|
+
},
|
|
29
|
+
"sha256": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 64,
|
|
32
|
+
"maxLength": 64,
|
|
33
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
34
|
+
},
|
|
35
|
+
"gitSha": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 7,
|
|
38
|
+
"maxLength": 64,
|
|
39
|
+
"pattern": "^[0-9a-f]{7,64}$"
|
|
40
|
+
},
|
|
41
|
+
"semver": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"maxLength": 48,
|
|
45
|
+
"pattern": "^[0-9]{1,4}\\.[0-9]{1,4}\\.[0-9]{1,4}([-+][0-9A-Za-z.-]{1,32})?$"
|
|
46
|
+
},
|
|
47
|
+
"ts": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 20,
|
|
50
|
+
"maxLength": 30,
|
|
51
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{1,6})?Z$"
|
|
52
|
+
},
|
|
53
|
+
"seq": {
|
|
54
|
+
"type": "integer",
|
|
55
|
+
"minimum": 0,
|
|
56
|
+
"maximum": 9007199254740991
|
|
57
|
+
},
|
|
58
|
+
"count": {
|
|
59
|
+
"type": "integer",
|
|
60
|
+
"minimum": 0,
|
|
61
|
+
"maximum": 9007199254740991
|
|
62
|
+
},
|
|
63
|
+
"chunk": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": false,
|
|
66
|
+
"properties": {
|
|
67
|
+
"index": {
|
|
68
|
+
"type": "integer",
|
|
69
|
+
"minimum": 0,
|
|
70
|
+
"maximum": 63
|
|
71
|
+
},
|
|
72
|
+
"total": {
|
|
73
|
+
"type": "integer",
|
|
74
|
+
"minimum": 1,
|
|
75
|
+
"maximum": 64
|
|
76
|
+
},
|
|
77
|
+
"last": {
|
|
78
|
+
"type": "boolean"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": [
|
|
82
|
+
"index",
|
|
83
|
+
"total",
|
|
84
|
+
"last"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"sig": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"properties": {
|
|
91
|
+
"keyId": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1,
|
|
94
|
+
"maxLength": 64,
|
|
95
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$"
|
|
96
|
+
},
|
|
97
|
+
"timestamp": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"minLength": 9,
|
|
100
|
+
"maxLength": 16,
|
|
101
|
+
"pattern": "^[0-9]{9,12}$"
|
|
102
|
+
},
|
|
103
|
+
"nonce": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"minLength": 16,
|
|
106
|
+
"maxLength": 64,
|
|
107
|
+
"pattern": "^[A-Za-z0-9_-]{16,64}$"
|
|
108
|
+
},
|
|
109
|
+
"tenantId": {
|
|
110
|
+
"$ref": "defs.schema.json#/$defs/tenantId"
|
|
111
|
+
},
|
|
112
|
+
"workspaceId": {
|
|
113
|
+
"$ref": "defs.schema.json#/$defs/workspaceId"
|
|
114
|
+
},
|
|
115
|
+
"signature": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"minLength": 64,
|
|
118
|
+
"maxLength": 128,
|
|
119
|
+
"pattern": "^[A-Za-z0-9+/_-]{64,128}={0,2}$"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"required": [
|
|
123
|
+
"keyId",
|
|
124
|
+
"timestamp",
|
|
125
|
+
"nonce",
|
|
126
|
+
"tenantId",
|
|
127
|
+
"workspaceId",
|
|
128
|
+
"signature"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"errorCode": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"enum": [
|
|
134
|
+
"bad_frame",
|
|
135
|
+
"unknown_type",
|
|
136
|
+
"schema_violation",
|
|
137
|
+
"frame_too_large",
|
|
138
|
+
"payload_too_large",
|
|
139
|
+
"wrong_direction",
|
|
140
|
+
"handshake_violation",
|
|
141
|
+
"not_ready",
|
|
142
|
+
"seq_gap",
|
|
143
|
+
"seq_replayed",
|
|
144
|
+
"chunk_out_of_order",
|
|
145
|
+
"chunk_inconsistent",
|
|
146
|
+
"tenant_mismatch",
|
|
147
|
+
"agent_mismatch",
|
|
148
|
+
"params_mismatch",
|
|
149
|
+
"signature_mode_insufficient",
|
|
150
|
+
"clock_skew",
|
|
151
|
+
"protocol_unsupported",
|
|
152
|
+
"unauthorized",
|
|
153
|
+
"agent_offline",
|
|
154
|
+
"timeout",
|
|
155
|
+
"rate_limited",
|
|
156
|
+
"internal"
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
"signatureMode": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"enum": [
|
|
162
|
+
"off",
|
|
163
|
+
"warn",
|
|
164
|
+
"enforce"
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
"operationMode": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"enum": [
|
|
170
|
+
"observe",
|
|
171
|
+
"assist",
|
|
172
|
+
"autonomous",
|
|
173
|
+
"none"
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
"dataPlaneMode": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"enum": [
|
|
179
|
+
"vh",
|
|
180
|
+
"hybrid",
|
|
181
|
+
"client"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"capability": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"minLength": 1,
|
|
187
|
+
"maxLength": 48,
|
|
188
|
+
"pattern": "^[a-z0-9]+([._-][a-z0-9]+)*$"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.visionhammer.io/la-protocol-v2/envelope.schema.json",
|
|
4
|
+
"title": "LA protocol v2 envelope",
|
|
5
|
+
"description": "Common frame. All client-visible data lives in payload; top level is closed. Per-type schemas ($ref this one) close payload.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"schemaVersion",
|
|
10
|
+
"type",
|
|
11
|
+
"msgId",
|
|
12
|
+
"seq",
|
|
13
|
+
"tenantId",
|
|
14
|
+
"workspaceId",
|
|
15
|
+
"ts",
|
|
16
|
+
"payload"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"schemaVersion": {
|
|
20
|
+
"const": 2
|
|
21
|
+
},
|
|
22
|
+
"type": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": [
|
|
25
|
+
"register",
|
|
26
|
+
"hello",
|
|
27
|
+
"heartbeat",
|
|
28
|
+
"ready",
|
|
29
|
+
"ack",
|
|
30
|
+
"error",
|
|
31
|
+
"job.assign",
|
|
32
|
+
"job.cancel",
|
|
33
|
+
"job.event",
|
|
34
|
+
"job.result",
|
|
35
|
+
"content.request",
|
|
36
|
+
"content.response",
|
|
37
|
+
"approval.decision",
|
|
38
|
+
"config.update",
|
|
39
|
+
"scan.upload",
|
|
40
|
+
"scan.uploaded",
|
|
41
|
+
"webhook.forward",
|
|
42
|
+
"incident.candidate",
|
|
43
|
+
"log.stats",
|
|
44
|
+
"audit.event",
|
|
45
|
+
"alert"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"msgId": {
|
|
49
|
+
"$ref": "defs.schema.json#/$defs/uuid"
|
|
50
|
+
},
|
|
51
|
+
"seq": {
|
|
52
|
+
"$ref": "defs.schema.json#/$defs/seq"
|
|
53
|
+
},
|
|
54
|
+
"ack": {
|
|
55
|
+
"$ref": "defs.schema.json#/$defs/seq"
|
|
56
|
+
},
|
|
57
|
+
"requestId": {
|
|
58
|
+
"$ref": "defs.schema.json#/$defs/uuid"
|
|
59
|
+
},
|
|
60
|
+
"tenantId": {
|
|
61
|
+
"$ref": "defs.schema.json#/$defs/tenantId"
|
|
62
|
+
},
|
|
63
|
+
"agentId": {
|
|
64
|
+
"$ref": "defs.schema.json#/$defs/uuid"
|
|
65
|
+
},
|
|
66
|
+
"workspaceId": {
|
|
67
|
+
"$ref": "defs.schema.json#/$defs/workspaceId"
|
|
68
|
+
},
|
|
69
|
+
"ts": {
|
|
70
|
+
"$ref": "defs.schema.json#/$defs/ts"
|
|
71
|
+
},
|
|
72
|
+
"chunk": {
|
|
73
|
+
"$ref": "defs.schema.json#/$defs/chunk"
|
|
74
|
+
},
|
|
75
|
+
"paramsRaw": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"minLength": 2,
|
|
78
|
+
"maxLength": 24576,
|
|
79
|
+
"x-large-metadata": true
|
|
80
|
+
},
|
|
81
|
+
"sig": {
|
|
82
|
+
"$ref": "defs.schema.json#/$defs/sig"
|
|
83
|
+
},
|
|
84
|
+
"payload": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"maxProperties": 32
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.visionhammer.io/la-protocol-v2/error.schema.json",
|
|
4
|
+
"title": "LA protocol v2: error (both)",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "envelope.schema.json"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"type": {
|
|
13
|
+
"const": "error"
|
|
14
|
+
},
|
|
15
|
+
"payload": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"properties": {
|
|
19
|
+
"code": {
|
|
20
|
+
"$ref": "defs.schema.json#/$defs/errorCode"
|
|
21
|
+
},
|
|
22
|
+
"retryable": {
|
|
23
|
+
"type": "boolean"
|
|
24
|
+
},
|
|
25
|
+
"refSeq": {
|
|
26
|
+
"$ref": "defs.schema.json#/$defs/seq"
|
|
27
|
+
},
|
|
28
|
+
"refMsgId": {
|
|
29
|
+
"$ref": "defs.schema.json#/$defs/uuid"
|
|
30
|
+
},
|
|
31
|
+
"closeCode": {
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"minimum": 4000,
|
|
34
|
+
"maximum": 4499
|
|
35
|
+
},
|
|
36
|
+
"detail": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"maxLength": 200,
|
|
39
|
+
"pattern": "^[^\\u0000-\\u001f]{0,200}$"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"code",
|
|
44
|
+
"retryable"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"seq": {
|
|
48
|
+
"const": 0
|
|
49
|
+
},
|
|
50
|
+
"chunk": false,
|
|
51
|
+
"sig": false,
|
|
52
|
+
"paramsRaw": false,
|
|
53
|
+
"agentId": true
|
|
54
|
+
},
|
|
55
|
+
"required": [
|
|
56
|
+
"payload",
|
|
57
|
+
"agentId"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.visionhammer.io/la-protocol-v2/heartbeat.schema.json",
|
|
4
|
+
"title": "LA protocol v2: heartbeat (la->cp)",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "envelope.schema.json"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"type": {
|
|
13
|
+
"const": "heartbeat"
|
|
14
|
+
},
|
|
15
|
+
"payload": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"properties": {
|
|
19
|
+
"signatureMode": {
|
|
20
|
+
"$ref": "defs.schema.json#/$defs/signatureMode"
|
|
21
|
+
},
|
|
22
|
+
"graphify": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"properties": {
|
|
26
|
+
"state": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"enum": [
|
|
29
|
+
"absent",
|
|
30
|
+
"building",
|
|
31
|
+
"ready",
|
|
32
|
+
"stale"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"nodes": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"minimum": 0,
|
|
38
|
+
"maximum": 9007199254740991
|
|
39
|
+
},
|
|
40
|
+
"edges": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"minimum": 0,
|
|
43
|
+
"maximum": 9007199254740991
|
|
44
|
+
},
|
|
45
|
+
"commit": {
|
|
46
|
+
"$ref": "defs.schema.json#/$defs/gitSha"
|
|
47
|
+
},
|
|
48
|
+
"ageSeconds": {
|
|
49
|
+
"type": "integer",
|
|
50
|
+
"minimum": 0,
|
|
51
|
+
"maximum": 9007199254740991
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": [
|
|
55
|
+
"state"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"diskFreeBytes": {
|
|
59
|
+
"type": "integer",
|
|
60
|
+
"minimum": 0,
|
|
61
|
+
"maximum": 9007199254740991
|
|
62
|
+
},
|
|
63
|
+
"queueDepth": {
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"minimum": 0,
|
|
66
|
+
"maximum": 100000
|
|
67
|
+
},
|
|
68
|
+
"clockEpochMs": {
|
|
69
|
+
"type": "integer",
|
|
70
|
+
"minimum": 0,
|
|
71
|
+
"maximum": 9007199254740991
|
|
72
|
+
},
|
|
73
|
+
"inflight": {
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"minimum": 0,
|
|
76
|
+
"maximum": 10000
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"required": [
|
|
80
|
+
"signatureMode",
|
|
81
|
+
"clockEpochMs",
|
|
82
|
+
"diskFreeBytes",
|
|
83
|
+
"queueDepth"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"seq": {
|
|
87
|
+
"type": "integer",
|
|
88
|
+
"minimum": 1,
|
|
89
|
+
"maximum": 9007199254740991
|
|
90
|
+
},
|
|
91
|
+
"chunk": false,
|
|
92
|
+
"sig": false,
|
|
93
|
+
"paramsRaw": false,
|
|
94
|
+
"agentId": true
|
|
95
|
+
},
|
|
96
|
+
"required": [
|
|
97
|
+
"payload",
|
|
98
|
+
"agentId"
|
|
99
|
+
]
|
|
100
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.visionhammer.io/la-protocol-v2/hello.schema.json",
|
|
4
|
+
"title": "LA protocol v2: hello (la->cp)",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "envelope.schema.json"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"type": {
|
|
13
|
+
"const": "hello"
|
|
14
|
+
},
|
|
15
|
+
"payload": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"properties": {
|
|
19
|
+
"signatureMode": {
|
|
20
|
+
"$ref": "defs.schema.json#/$defs/signatureMode"
|
|
21
|
+
},
|
|
22
|
+
"graphify": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"properties": {
|
|
26
|
+
"state": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"enum": [
|
|
29
|
+
"absent",
|
|
30
|
+
"building",
|
|
31
|
+
"ready",
|
|
32
|
+
"stale"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"nodes": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"minimum": 0,
|
|
38
|
+
"maximum": 9007199254740991
|
|
39
|
+
},
|
|
40
|
+
"edges": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"minimum": 0,
|
|
43
|
+
"maximum": 9007199254740991
|
|
44
|
+
},
|
|
45
|
+
"commit": {
|
|
46
|
+
"$ref": "defs.schema.json#/$defs/gitSha"
|
|
47
|
+
},
|
|
48
|
+
"ageSeconds": {
|
|
49
|
+
"type": "integer",
|
|
50
|
+
"minimum": 0,
|
|
51
|
+
"maximum": 9007199254740991
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": [
|
|
55
|
+
"state"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"diskFreeBytes": {
|
|
59
|
+
"type": "integer",
|
|
60
|
+
"minimum": 0,
|
|
61
|
+
"maximum": 9007199254740991
|
|
62
|
+
},
|
|
63
|
+
"queueDepth": {
|
|
64
|
+
"type": "integer",
|
|
65
|
+
"minimum": 0,
|
|
66
|
+
"maximum": 100000
|
|
67
|
+
},
|
|
68
|
+
"clockEpochMs": {
|
|
69
|
+
"type": "integer",
|
|
70
|
+
"minimum": 0,
|
|
71
|
+
"maximum": 9007199254740991
|
|
72
|
+
},
|
|
73
|
+
"inflight": {
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"minimum": 0,
|
|
76
|
+
"maximum": 10000
|
|
77
|
+
},
|
|
78
|
+
"laVersion": {
|
|
79
|
+
"$ref": "defs.schema.json#/$defs/semver"
|
|
80
|
+
},
|
|
81
|
+
"capabilities": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"maxItems": 32,
|
|
84
|
+
"uniqueItems": true,
|
|
85
|
+
"items": {
|
|
86
|
+
"$ref": "defs.schema.json#/$defs/capability"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": [
|
|
91
|
+
"laVersion",
|
|
92
|
+
"capabilities",
|
|
93
|
+
"signatureMode",
|
|
94
|
+
"clockEpochMs",
|
|
95
|
+
"diskFreeBytes",
|
|
96
|
+
"queueDepth"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"seq": {
|
|
100
|
+
"const": 0
|
|
101
|
+
},
|
|
102
|
+
"chunk": false,
|
|
103
|
+
"sig": false,
|
|
104
|
+
"paramsRaw": false,
|
|
105
|
+
"agentId": true
|
|
106
|
+
},
|
|
107
|
+
"required": [
|
|
108
|
+
"payload",
|
|
109
|
+
"agentId"
|
|
110
|
+
]
|
|
111
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.visionhammer.io/la-protocol-v2/incident.candidate.schema.json",
|
|
4
|
+
"title": "LA protocol v2: incident.candidate (la->cp)",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"allOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "envelope.schema.json"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"type": {
|
|
13
|
+
"const": "incident.candidate"
|
|
14
|
+
},
|
|
15
|
+
"payload": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"properties": {
|
|
19
|
+
"errorHash": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 8,
|
|
22
|
+
"maxLength": 64,
|
|
23
|
+
"pattern": "^[0-9a-f]{8,64}$"
|
|
24
|
+
},
|
|
25
|
+
"fingerprint": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 8,
|
|
28
|
+
"maxLength": 64,
|
|
29
|
+
"pattern": "^[0-9a-f]{8,64}$"
|
|
30
|
+
},
|
|
31
|
+
"severity": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"enum": [
|
|
34
|
+
"critical",
|
|
35
|
+
"high",
|
|
36
|
+
"medium",
|
|
37
|
+
"low",
|
|
38
|
+
"info"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"service": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"maxLength": 128,
|
|
45
|
+
"pattern": "^[A-Za-z0-9._:/-]{1,128}$"
|
|
46
|
+
},
|
|
47
|
+
"environment": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"minLength": 1,
|
|
50
|
+
"maxLength": 32,
|
|
51
|
+
"pattern": "^[a-z0-9][a-z0-9_-]{0,31}$"
|
|
52
|
+
},
|
|
53
|
+
"count": {
|
|
54
|
+
"type": "integer",
|
|
55
|
+
"minimum": 0,
|
|
56
|
+
"maximum": 9007199254740991
|
|
57
|
+
},
|
|
58
|
+
"firstSeen": {
|
|
59
|
+
"$ref": "defs.schema.json#/$defs/ts"
|
|
60
|
+
},
|
|
61
|
+
"lastSeen": {
|
|
62
|
+
"$ref": "defs.schema.json#/$defs/ts"
|
|
63
|
+
},
|
|
64
|
+
"logCategory": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"enum": [
|
|
67
|
+
"exception",
|
|
68
|
+
"timeout",
|
|
69
|
+
"http_5xx",
|
|
70
|
+
"db",
|
|
71
|
+
"oom",
|
|
72
|
+
"security",
|
|
73
|
+
"other"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"errorHash",
|
|
79
|
+
"fingerprint",
|
|
80
|
+
"severity",
|
|
81
|
+
"service",
|
|
82
|
+
"environment",
|
|
83
|
+
"count",
|
|
84
|
+
"firstSeen",
|
|
85
|
+
"lastSeen"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"seq": {
|
|
89
|
+
"type": "integer",
|
|
90
|
+
"minimum": 1,
|
|
91
|
+
"maximum": 9007199254740991
|
|
92
|
+
},
|
|
93
|
+
"chunk": false,
|
|
94
|
+
"sig": false,
|
|
95
|
+
"paramsRaw": false,
|
|
96
|
+
"agentId": true
|
|
97
|
+
},
|
|
98
|
+
"required": [
|
|
99
|
+
"payload",
|
|
100
|
+
"agentId"
|
|
101
|
+
]
|
|
102
|
+
}
|