@equationalapplications/mcp-server 0.0.0-stage → 7.15.2
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/LICENSE +21 -0
- package/README.md +159 -2
- package/contract/synapsetree-openapi.subset.json +3842 -0
- package/dist/cli.js +4771 -0
- package/dist/cli.js.map +1 -0
- package/dist/cli.mjs +4769 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/index.d.mts +113 -0
- package/dist/index.d.ts +113 -0
- package/dist/index.js +4406 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4391 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +66 -4
|
@@ -0,0 +1,3842 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "SynapseTree Memory API (subset for @equationalapplications/mcp-server)",
|
|
5
|
+
"version": "1.0.0-alpha.1",
|
|
6
|
+
"summary": "Hosted shared memory for LLM agents, one SQLite database per tenant.",
|
|
7
|
+
"description": "SynapseTree hosts `core-llm-wiki` memory databases. Each API key reaches exactly one\ntenant database; inside it, data lives in **namespaces** (the engine's `entity_id`).\n\nDesign: `docs/superpowers/specs/2026-09-30-openapi-contract-design.md`.\n\n**Key scope.** Every operation declares `x-synapsetree-scope`: `read` operations accept\n`read` and `read_write` keys; `read_write` operations refuse a `read` key with\n`403 insufficient_scope`. Agent keys issued through auth.md carry `memory:full`\n(`memory:admin` is accepted but not issued in v1); both pass `read` and `read_write`\noperations, except that the export\nand destructive operations (`exportMemory`, `forgetFact`, `forgetSource`,\n`deleteNamespace`) refuse a `memory:full` key with `403 insufficient_scope`; a\n`memory:admin` key passes them.\n\n**Errors.** Errors produced by SynapseTree are RFC 7807 `application/problem+json` with a\nstable `code`. Two responses come from the AWS API Gateway authorizer itself and keep the\ngateway's native shape `{\"message\": \"...\"}`: `401` (missing or malformed bearer token) and\n`403` (unknown or revoked key, or a database that is not routable).\n\n**Writes and billing.** Writes are refused with `402 subscription_inactive` when the\norganization is on a paid plan whose subscription is not `trialing`, `active` or\n`past_due`. Reads always work.\n\n**Inference is bring-your-own-key (BYOK).** SynapseTree runs no inference on its own\naccount: server-side extraction and semantic embeddings run against the organization's own\nprovider keys. Owner/admin register, rotate and delete two custodial registrations per\norganization in the dashboard — an **extraction** registration (required for\n`server_extraction` ingest and consolidation) and an optional **embeddings** registration —\neach envelope-encrypted with KMS, never logged or echoed, surfaced only as `keyLast4`.\nRotation overwrites in place and takes effect on the next call. With no extraction\nregistration `server_extraction` answers `409 inference_not_configured`; a key the provider\nrejects answers `409 inference_config_invalid` and surfaces as failing key health. With no\nembeddings registration namespaces serve **keyword-only** search — a supported\nconfiguration, reported via `diagnostics`, never an error. Provider calls are metered\nagainst the plan's tier caps (one shared window, first-come-first-served); usage is\ndisplayed as token counts, never dollars. Changing a namespace's embedding model is gated by\nits stored fingerprint and takes effect only through a maintenance run\n(`POST /v1/namespaces/{namespace}/maintenance/runs`); while a run is active, vector search\non that namespace pauses to keyword-only.\n\n**Engine extensions.** `x-synapsetree-engine` names the engine entry point. Entries marked\n`upstream:` depend on a core-llm-wiki API that has been requested but not yet released;\nuntil it ships the operation or field answers `501 not_implemented`.\n",
|
|
8
|
+
"license": {
|
|
9
|
+
"name": "Proprietary",
|
|
10
|
+
"identifier": "LicenseRef-Proprietary"
|
|
11
|
+
},
|
|
12
|
+
"contact": {
|
|
13
|
+
"name": "Equational Applications LLC",
|
|
14
|
+
"url": "https://equationalapplications.com/"
|
|
15
|
+
},
|
|
16
|
+
"x-subset-of": "SynapseTree openapi/openapi.yaml",
|
|
17
|
+
"x-generated-by": "scripts/mcp-contract-subset.py (SynapseTree repo); regenerate, do not hand-edit",
|
|
18
|
+
"x-operations": [
|
|
19
|
+
"createEvent",
|
|
20
|
+
"ingestDocument",
|
|
21
|
+
"listNamespaces",
|
|
22
|
+
"oauthRevoke",
|
|
23
|
+
"oauthToken",
|
|
24
|
+
"queryMemory",
|
|
25
|
+
"registerAgentIdentity",
|
|
26
|
+
"rememberFact",
|
|
27
|
+
"supersedeFact",
|
|
28
|
+
"traverseGraph",
|
|
29
|
+
"whoami"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"servers": [
|
|
33
|
+
{
|
|
34
|
+
"url": "https://api.synapsetree.dev",
|
|
35
|
+
"description": "Production"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"security": [
|
|
39
|
+
{
|
|
40
|
+
"bearerAuth": []
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"paths": {
|
|
44
|
+
"/v1/memory/query": {
|
|
45
|
+
"post": {
|
|
46
|
+
"operationId": "queryMemory",
|
|
47
|
+
"tags": [
|
|
48
|
+
"memory"
|
|
49
|
+
],
|
|
50
|
+
"summary": "Search memory",
|
|
51
|
+
"description": "Ranked top-k hybrid search (semantic + keyword) across one or more namespaces. Returns\nthe highest-scoring facts plus pending tasks and recent events. **Not paginated**: the\nranking is not a stable order; raise `limit` (max 100) for more results.\n\nSemantic scoring needs embeddings. In namespaces under server extraction the query is\nembedded with the organization's embeddings registration (BYOK); an organization without\none serves keyword-only search. When the embeddings path is unavailable — no\nregistration, a key or provider fault, the tier cap exhausted, or a maintenance run\nre-embedding the namespace — the search degrades to keyword-only and reports why via\n`diagnostics`. That degradation is normal operation, not an error. Alternatively pass\n`queryEmbedding` (same dimension as the stored fact vectors) to supply the vector\nyourself.\n",
|
|
52
|
+
"x-synapsetree-scope": "read",
|
|
53
|
+
"x-synapsetree-engine": "read",
|
|
54
|
+
"requestBody": {
|
|
55
|
+
"required": true,
|
|
56
|
+
"content": {
|
|
57
|
+
"application/json": {
|
|
58
|
+
"schema": {
|
|
59
|
+
"$ref": "#/components/schemas/QueryRequest"
|
|
60
|
+
},
|
|
61
|
+
"examples": {
|
|
62
|
+
"single": {
|
|
63
|
+
"summary": "One namespace",
|
|
64
|
+
"value": {
|
|
65
|
+
"namespaces": [
|
|
66
|
+
"repo:synapsetree"
|
|
67
|
+
],
|
|
68
|
+
"query": "how are API keys hashed",
|
|
69
|
+
"limit": 5
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"weighted": {
|
|
73
|
+
"summary": "Two namespaces, weighted, point in time",
|
|
74
|
+
"value": {
|
|
75
|
+
"namespaces": [
|
|
76
|
+
"repo:synapsetree",
|
|
77
|
+
"team:platform"
|
|
78
|
+
],
|
|
79
|
+
"query": "deployment region",
|
|
80
|
+
"weights": {
|
|
81
|
+
"repo:synapsetree": 2,
|
|
82
|
+
"team:platform": 1
|
|
83
|
+
},
|
|
84
|
+
"floors": {
|
|
85
|
+
"team:platform": 1
|
|
86
|
+
},
|
|
87
|
+
"asOf": "2026-09-01T00:00:00Z",
|
|
88
|
+
"excludeDrafts": true
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"responses": {
|
|
96
|
+
"200": {
|
|
97
|
+
"description": "Ranked facts with pending tasks and recent events.",
|
|
98
|
+
"headers": {
|
|
99
|
+
"Request-Id": {
|
|
100
|
+
"$ref": "#/components/headers/Request-Id"
|
|
101
|
+
},
|
|
102
|
+
"RateLimit-Policy": {
|
|
103
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
104
|
+
},
|
|
105
|
+
"RateLimit": {
|
|
106
|
+
"$ref": "#/components/headers/RateLimit"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"content": {
|
|
110
|
+
"application/json": {
|
|
111
|
+
"schema": {
|
|
112
|
+
"$ref": "#/components/schemas/QueryResponse"
|
|
113
|
+
},
|
|
114
|
+
"example": {
|
|
115
|
+
"facts": [
|
|
116
|
+
{
|
|
117
|
+
"id": "fact_01j9x7k2m3",
|
|
118
|
+
"namespace": "repo:synapsetree",
|
|
119
|
+
"sourceType": "immutable_document",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"sourceRef": "infra__stack.ts",
|
|
122
|
+
"sourceHash": "9f2c4b8e1a7d3f6c5b0e2d4a8c1f3e5b7d9a0c2e4f6b8d0a1c3e5f7b9d1a3c5e",
|
|
123
|
+
"title": "SynapseTree",
|
|
124
|
+
"body": "Hosted LLM memory API. status active.",
|
|
125
|
+
"tags": [],
|
|
126
|
+
"confidence": "certain",
|
|
127
|
+
"okfType": "software_application",
|
|
128
|
+
"lifecycleStatus": "stable",
|
|
129
|
+
"trustTier": "unverified",
|
|
130
|
+
"isStale": false,
|
|
131
|
+
"generatedBy": null,
|
|
132
|
+
"lastVerifiedAt": null,
|
|
133
|
+
"lastVerifiedBy": null,
|
|
134
|
+
"validFrom": null,
|
|
135
|
+
"validTo": null,
|
|
136
|
+
"supersededBy": null,
|
|
137
|
+
"supersededAt": null,
|
|
138
|
+
"accessCount": 3,
|
|
139
|
+
"lastAccessedAt": "2026-09-30T08:00:00Z",
|
|
140
|
+
"createdAt": "2026-09-29T10:00:00Z",
|
|
141
|
+
"updatedAt": "2026-09-29T10:00:00Z"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"scores": {
|
|
145
|
+
"fact_01j9x7k2m3": 0.82
|
|
146
|
+
},
|
|
147
|
+
"tasks": [
|
|
148
|
+
{
|
|
149
|
+
"id": "task_01j9x8a1b2",
|
|
150
|
+
"namespace": "repo:synapsetree",
|
|
151
|
+
"description": "Register the stree_ prefix with GitHub secret scanning",
|
|
152
|
+
"status": "pending",
|
|
153
|
+
"priority": 5,
|
|
154
|
+
"okfType": null,
|
|
155
|
+
"createdAt": "2026-09-29T10:00:00Z",
|
|
156
|
+
"updatedAt": "2026-09-29T10:00:00Z",
|
|
157
|
+
"resolvedAt": null
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"events": [
|
|
161
|
+
{
|
|
162
|
+
"id": "evt_01j9x8c3d4",
|
|
163
|
+
"namespace": "repo:synapsetree",
|
|
164
|
+
"eventType": "decision",
|
|
165
|
+
"summary": "Chose DynamoDB for the control plane",
|
|
166
|
+
"relatedFactId": null,
|
|
167
|
+
"occurredAt": "2026-09-29T09:00:00Z",
|
|
168
|
+
"createdAt": "2026-09-29T09:05:00Z"
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"400": {
|
|
176
|
+
"$ref": "#/components/responses/BadRequest"
|
|
177
|
+
},
|
|
178
|
+
"401": {
|
|
179
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
180
|
+
},
|
|
181
|
+
"403": {
|
|
182
|
+
"$ref": "#/components/responses/Forbidden"
|
|
183
|
+
},
|
|
184
|
+
"429": {
|
|
185
|
+
"$ref": "#/components/responses/TooManyRequests"
|
|
186
|
+
},
|
|
187
|
+
"500": {
|
|
188
|
+
"$ref": "#/components/responses/InternalError"
|
|
189
|
+
},
|
|
190
|
+
"501": {
|
|
191
|
+
"$ref": "#/components/responses/NotImplemented"
|
|
192
|
+
},
|
|
193
|
+
"503": {
|
|
194
|
+
"description": "Temporarily unavailable: `unavailable` (tenant cold start or writer handoff)\nor `fenced` (the writer lost its lease). Upstream inference failure never\nsurfaces on the query path — spec §5.2 degrade-never-fail: provider trouble\ndegrades to keyword search with `diagnostics` instead of failing.\n",
|
|
195
|
+
"headers": {
|
|
196
|
+
"Request-Id": {
|
|
197
|
+
"$ref": "#/components/headers/Request-Id"
|
|
198
|
+
},
|
|
199
|
+
"Retry-After": {
|
|
200
|
+
"$ref": "#/components/headers/Retry-After"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"content": {
|
|
204
|
+
"application/problem+json": {
|
|
205
|
+
"schema": {
|
|
206
|
+
"$ref": "#/components/schemas/Problem"
|
|
207
|
+
},
|
|
208
|
+
"examples": {
|
|
209
|
+
"fenced": {
|
|
210
|
+
"value": {
|
|
211
|
+
"type": "urn:synapsetree:problem:fenced",
|
|
212
|
+
"title": "Writer fenced",
|
|
213
|
+
"status": 503,
|
|
214
|
+
"code": "fenced",
|
|
215
|
+
"detail": "The write did not commit; retry.",
|
|
216
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
217
|
+
"retryable": true,
|
|
218
|
+
"retryAfterSeconds": 1
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"/v1/memory/facts": {
|
|
229
|
+
"post": {
|
|
230
|
+
"operationId": "rememberFact",
|
|
231
|
+
"tags": [
|
|
232
|
+
"facts"
|
|
233
|
+
],
|
|
234
|
+
"summary": "Store a fact directly",
|
|
235
|
+
"description": "Stores one mutable fact (`user_stated` by default) without an LLM step. To replace an\nexisting fact, use `supersedeFact` instead so history is kept.\n",
|
|
236
|
+
"x-synapsetree-scope": "read_write",
|
|
237
|
+
"x-synapsetree-engine": "remember",
|
|
238
|
+
"parameters": [
|
|
239
|
+
{
|
|
240
|
+
"$ref": "#/components/parameters/IdempotencyKey"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"requestBody": {
|
|
244
|
+
"required": true,
|
|
245
|
+
"content": {
|
|
246
|
+
"application/json": {
|
|
247
|
+
"schema": {
|
|
248
|
+
"$ref": "#/components/schemas/RememberRequest"
|
|
249
|
+
},
|
|
250
|
+
"examples": {
|
|
251
|
+
"preference": {
|
|
252
|
+
"value": {
|
|
253
|
+
"namespace": "user:kurt",
|
|
254
|
+
"title": "Prefers merge commits",
|
|
255
|
+
"body": "Kurt wants PRs merged with merge commits, never squashed.",
|
|
256
|
+
"tags": [
|
|
257
|
+
"git"
|
|
258
|
+
],
|
|
259
|
+
"confidence": "certain"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"responses": {
|
|
267
|
+
"201": {
|
|
268
|
+
"description": "The stored fact.",
|
|
269
|
+
"headers": {
|
|
270
|
+
"Request-Id": {
|
|
271
|
+
"$ref": "#/components/headers/Request-Id"
|
|
272
|
+
},
|
|
273
|
+
"RateLimit-Policy": {
|
|
274
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
275
|
+
},
|
|
276
|
+
"RateLimit": {
|
|
277
|
+
"$ref": "#/components/headers/RateLimit"
|
|
278
|
+
},
|
|
279
|
+
"Idempotent-Replayed": {
|
|
280
|
+
"$ref": "#/components/headers/Idempotent-Replayed"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"content": {
|
|
284
|
+
"application/json": {
|
|
285
|
+
"schema": {
|
|
286
|
+
"$ref": "#/components/schemas/Fact"
|
|
287
|
+
},
|
|
288
|
+
"example": {
|
|
289
|
+
"id": "fact_01j9xa0000",
|
|
290
|
+
"namespace": "user:kurt",
|
|
291
|
+
"sourceType": "user_stated",
|
|
292
|
+
"mutable": true,
|
|
293
|
+
"sourceRef": null,
|
|
294
|
+
"sourceHash": null,
|
|
295
|
+
"title": "Lives in San Francisco",
|
|
296
|
+
"body": "Moved in March.",
|
|
297
|
+
"tags": [],
|
|
298
|
+
"confidence": "certain",
|
|
299
|
+
"okfType": "place",
|
|
300
|
+
"lifecycleStatus": "stable",
|
|
301
|
+
"trustTier": "unverified",
|
|
302
|
+
"isStale": false,
|
|
303
|
+
"generatedBy": null,
|
|
304
|
+
"lastVerifiedAt": null,
|
|
305
|
+
"lastVerifiedBy": null,
|
|
306
|
+
"validFrom": "2026-03-01T00:00:00Z",
|
|
307
|
+
"validTo": null,
|
|
308
|
+
"supersededBy": null,
|
|
309
|
+
"supersededAt": null,
|
|
310
|
+
"accessCount": 0,
|
|
311
|
+
"lastAccessedAt": null,
|
|
312
|
+
"createdAt": "2026-09-30T09:00:00Z",
|
|
313
|
+
"updatedAt": "2026-09-30T09:00:00Z"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"400": {
|
|
319
|
+
"$ref": "#/components/responses/BadRequest"
|
|
320
|
+
},
|
|
321
|
+
"401": {
|
|
322
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
323
|
+
},
|
|
324
|
+
"402": {
|
|
325
|
+
"$ref": "#/components/responses/PaymentRequired"
|
|
326
|
+
},
|
|
327
|
+
"403": {
|
|
328
|
+
"$ref": "#/components/responses/Forbidden"
|
|
329
|
+
},
|
|
330
|
+
"409": {
|
|
331
|
+
"$ref": "#/components/responses/Conflict"
|
|
332
|
+
},
|
|
333
|
+
"413": {
|
|
334
|
+
"$ref": "#/components/responses/PayloadTooLarge"
|
|
335
|
+
},
|
|
336
|
+
"422": {
|
|
337
|
+
"$ref": "#/components/responses/UnprocessableContent"
|
|
338
|
+
},
|
|
339
|
+
"429": {
|
|
340
|
+
"$ref": "#/components/responses/TooManyRequests"
|
|
341
|
+
},
|
|
342
|
+
"500": {
|
|
343
|
+
"$ref": "#/components/responses/InternalError"
|
|
344
|
+
},
|
|
345
|
+
"503": {
|
|
346
|
+
"$ref": "#/components/responses/ServiceUnavailable"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"/v1/memory/facts/{factId}/supersede": {
|
|
352
|
+
"post": {
|
|
353
|
+
"operationId": "supersedeFact",
|
|
354
|
+
"tags": [
|
|
355
|
+
"facts"
|
|
356
|
+
],
|
|
357
|
+
"summary": "Replace a fact, keeping its history",
|
|
358
|
+
"description": "Ends the fact's validity at `validFrom` (default: now) and makes the replacement current\nfrom that instant. The replacement is a new mutable fact or an existing fact id.\n\nRefused with `409 invalid_state` for `immutable_document` facts (re-ingest the document\ninstead), and with `409 conflict` for a fact already superseded or a replacement that\nwould form a cycle.\n",
|
|
359
|
+
"x-synapsetree-scope": "read_write",
|
|
360
|
+
"x-synapsetree-engine": "supersede",
|
|
361
|
+
"parameters": [
|
|
362
|
+
{
|
|
363
|
+
"$ref": "#/components/parameters/FactId"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"$ref": "#/components/parameters/IdempotencyKey"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"requestBody": {
|
|
370
|
+
"required": true,
|
|
371
|
+
"content": {
|
|
372
|
+
"application/json": {
|
|
373
|
+
"schema": {
|
|
374
|
+
"$ref": "#/components/schemas/SupersedeRequest"
|
|
375
|
+
},
|
|
376
|
+
"examples": {
|
|
377
|
+
"newFact": {
|
|
378
|
+
"summary": "Replace with a new fact, backdated",
|
|
379
|
+
"value": {
|
|
380
|
+
"namespace": "user:kurt",
|
|
381
|
+
"validFrom": "2026-03-01T00:00:00Z",
|
|
382
|
+
"replacement": {
|
|
383
|
+
"kind": "new",
|
|
384
|
+
"title": "Lives in San Francisco",
|
|
385
|
+
"body": "Moved in March."
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"existingFact": {
|
|
390
|
+
"summary": "Replace with a fact that already exists",
|
|
391
|
+
"value": {
|
|
392
|
+
"namespace": "user:kurt",
|
|
393
|
+
"replacement": {
|
|
394
|
+
"kind": "existing",
|
|
395
|
+
"factId": "fact_01j9xa0000"
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"responses": {
|
|
404
|
+
"200": {
|
|
405
|
+
"description": "The superseded fact and its replacement.",
|
|
406
|
+
"headers": {
|
|
407
|
+
"Request-Id": {
|
|
408
|
+
"$ref": "#/components/headers/Request-Id"
|
|
409
|
+
},
|
|
410
|
+
"RateLimit-Policy": {
|
|
411
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
412
|
+
},
|
|
413
|
+
"RateLimit": {
|
|
414
|
+
"$ref": "#/components/headers/RateLimit"
|
|
415
|
+
},
|
|
416
|
+
"Idempotent-Replayed": {
|
|
417
|
+
"$ref": "#/components/headers/Idempotent-Replayed"
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
"content": {
|
|
421
|
+
"application/json": {
|
|
422
|
+
"schema": {
|
|
423
|
+
"$ref": "#/components/schemas/SupersedeResponse"
|
|
424
|
+
},
|
|
425
|
+
"example": {
|
|
426
|
+
"superseded": {
|
|
427
|
+
"id": "fact_01j8z9y8x7",
|
|
428
|
+
"namespace": "user:kurt",
|
|
429
|
+
"sourceType": "user_stated",
|
|
430
|
+
"mutable": true,
|
|
431
|
+
"sourceRef": null,
|
|
432
|
+
"sourceHash": null,
|
|
433
|
+
"title": "Lives in Seattle",
|
|
434
|
+
"body": "Rents in Capitol Hill.",
|
|
435
|
+
"tags": [],
|
|
436
|
+
"confidence": "certain",
|
|
437
|
+
"okfType": "place",
|
|
438
|
+
"lifecycleStatus": "stable",
|
|
439
|
+
"trustTier": "unverified",
|
|
440
|
+
"isStale": false,
|
|
441
|
+
"generatedBy": null,
|
|
442
|
+
"lastVerifiedAt": null,
|
|
443
|
+
"lastVerifiedBy": null,
|
|
444
|
+
"validFrom": null,
|
|
445
|
+
"validTo": "2026-03-01T00:00:00Z",
|
|
446
|
+
"supersededBy": "fact_01j9xa0000",
|
|
447
|
+
"supersededAt": "2026-09-30T09:00:00Z",
|
|
448
|
+
"accessCount": 5,
|
|
449
|
+
"lastAccessedAt": "2026-09-28T12:00:00Z",
|
|
450
|
+
"createdAt": "2026-01-10T12:00:00Z",
|
|
451
|
+
"updatedAt": "2026-01-10T12:00:00Z"
|
|
452
|
+
},
|
|
453
|
+
"replacement": {
|
|
454
|
+
"id": "fact_01j9xa0000",
|
|
455
|
+
"namespace": "user:kurt",
|
|
456
|
+
"sourceType": "user_stated",
|
|
457
|
+
"mutable": true,
|
|
458
|
+
"sourceRef": null,
|
|
459
|
+
"sourceHash": null,
|
|
460
|
+
"title": "Lives in San Francisco",
|
|
461
|
+
"body": "Moved in March.",
|
|
462
|
+
"tags": [],
|
|
463
|
+
"confidence": "certain",
|
|
464
|
+
"okfType": "place",
|
|
465
|
+
"lifecycleStatus": "stable",
|
|
466
|
+
"trustTier": "unverified",
|
|
467
|
+
"isStale": false,
|
|
468
|
+
"generatedBy": null,
|
|
469
|
+
"lastVerifiedAt": null,
|
|
470
|
+
"lastVerifiedBy": null,
|
|
471
|
+
"validFrom": "2026-03-01T00:00:00Z",
|
|
472
|
+
"validTo": null,
|
|
473
|
+
"supersededBy": null,
|
|
474
|
+
"supersededAt": null,
|
|
475
|
+
"accessCount": 0,
|
|
476
|
+
"lastAccessedAt": null,
|
|
477
|
+
"createdAt": "2026-09-30T09:00:00Z",
|
|
478
|
+
"updatedAt": "2026-09-30T09:00:00Z"
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
"400": {
|
|
485
|
+
"$ref": "#/components/responses/BadRequest"
|
|
486
|
+
},
|
|
487
|
+
"401": {
|
|
488
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
489
|
+
},
|
|
490
|
+
"402": {
|
|
491
|
+
"$ref": "#/components/responses/PaymentRequired"
|
|
492
|
+
},
|
|
493
|
+
"403": {
|
|
494
|
+
"$ref": "#/components/responses/Forbidden"
|
|
495
|
+
},
|
|
496
|
+
"404": {
|
|
497
|
+
"$ref": "#/components/responses/NotFound"
|
|
498
|
+
},
|
|
499
|
+
"409": {
|
|
500
|
+
"$ref": "#/components/responses/Conflict"
|
|
501
|
+
},
|
|
502
|
+
"413": {
|
|
503
|
+
"$ref": "#/components/responses/PayloadTooLarge"
|
|
504
|
+
},
|
|
505
|
+
"422": {
|
|
506
|
+
"$ref": "#/components/responses/UnprocessableContent"
|
|
507
|
+
},
|
|
508
|
+
"429": {
|
|
509
|
+
"$ref": "#/components/responses/TooManyRequests"
|
|
510
|
+
},
|
|
511
|
+
"500": {
|
|
512
|
+
"$ref": "#/components/responses/InternalError"
|
|
513
|
+
},
|
|
514
|
+
"503": {
|
|
515
|
+
"$ref": "#/components/responses/ServiceUnavailable"
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
"/v1/memory/ingest": {
|
|
521
|
+
"post": {
|
|
522
|
+
"operationId": "ingestDocument",
|
|
523
|
+
"tags": [
|
|
524
|
+
"memory"
|
|
525
|
+
],
|
|
526
|
+
"summary": "Ingest a document",
|
|
527
|
+
"description": "Extracts facts from a document and stores them as `immutable_document` facts under\n`sourceRef`, replacing any earlier version.\n\n- `server_extraction`: SynapseTree runs extraction with the organization's registered\n provider key (BYOK; envelope-encrypted, managed in the dashboard by owner/admin).\n `409 inference_not_configured` when the organization has no extraction registration.\n- `client_extraction`: the client ran the extraction itself against an\n [extraction plan](#operation/createExtractionPlan) and posts each chunk's model\n output. A plan whose fingerprint no longer matches is refused with\n `409 extraction_plan_stale`.\n",
|
|
528
|
+
"x-synapsetree-scope": "read_write",
|
|
529
|
+
"x-synapsetree-engine": "ingestDocument (server_extraction); upstream:ingestExtracted (client_extraction)",
|
|
530
|
+
"parameters": [
|
|
531
|
+
{
|
|
532
|
+
"$ref": "#/components/parameters/IdempotencyKey"
|
|
533
|
+
}
|
|
534
|
+
],
|
|
535
|
+
"requestBody": {
|
|
536
|
+
"required": true,
|
|
537
|
+
"content": {
|
|
538
|
+
"application/json": {
|
|
539
|
+
"schema": {
|
|
540
|
+
"$ref": "#/components/schemas/IngestRequest"
|
|
541
|
+
},
|
|
542
|
+
"examples": {
|
|
543
|
+
"clientExtraction": {
|
|
544
|
+
"summary": "Client-side extraction (BYOI)",
|
|
545
|
+
"value": {
|
|
546
|
+
"mode": "client_extraction",
|
|
547
|
+
"namespace": "repo:synapsetree",
|
|
548
|
+
"sourceRef": "docs__runbook.md",
|
|
549
|
+
"sourceHash": "1b3d5f7a9c0e2b4d6f8a0c2e4b6d8f0a1c3e5b7d9f1a3c5e7b9d1f3a5c7e9b1d",
|
|
550
|
+
"planFingerprint": "sha256:4e6a8c0b2d4f6a8c0e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a4c6e8b0d2f4a6c",
|
|
551
|
+
"chunks": [
|
|
552
|
+
{
|
|
553
|
+
"index": 0,
|
|
554
|
+
"response": {
|
|
555
|
+
"facts": [
|
|
556
|
+
{
|
|
557
|
+
"title": "Deploys go to us-east-1",
|
|
558
|
+
"body": "The test stage deploys to us-east-1.",
|
|
559
|
+
"tags": [
|
|
560
|
+
"deploy"
|
|
561
|
+
],
|
|
562
|
+
"confidence": "certain",
|
|
563
|
+
"okfType": "procedure",
|
|
564
|
+
"evidence": [
|
|
565
|
+
"Region: us-east-1 (Kurt, 2026-09-29)."
|
|
566
|
+
],
|
|
567
|
+
"edges": [
|
|
568
|
+
{
|
|
569
|
+
"edgeType": "documents",
|
|
570
|
+
"targetTitle": "SynapseTree"
|
|
571
|
+
}
|
|
572
|
+
]
|
|
573
|
+
}
|
|
574
|
+
],
|
|
575
|
+
"tasks": []
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
]
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
"serverExtraction": {
|
|
582
|
+
"summary": "Server-side extraction (BYOK)",
|
|
583
|
+
"value": {
|
|
584
|
+
"mode": "server_extraction",
|
|
585
|
+
"namespace": "repo:synapsetree",
|
|
586
|
+
"sourceRef": "docs__runbook.md",
|
|
587
|
+
"sourceHash": "1b3d5f7a9c0e2b4d6f8a0c2e4b6d8f0a1c3e5b7d9f1a3c5e7b9d1f3a5c7e9b1d",
|
|
588
|
+
"content": "# Deploy the test stage ...",
|
|
589
|
+
"onDuplicateHash": "skip"
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
"responses": {
|
|
597
|
+
"200": {
|
|
598
|
+
"description": "Ingest summary.",
|
|
599
|
+
"headers": {
|
|
600
|
+
"Request-Id": {
|
|
601
|
+
"$ref": "#/components/headers/Request-Id"
|
|
602
|
+
},
|
|
603
|
+
"RateLimit-Policy": {
|
|
604
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
605
|
+
},
|
|
606
|
+
"RateLimit": {
|
|
607
|
+
"$ref": "#/components/headers/RateLimit"
|
|
608
|
+
},
|
|
609
|
+
"Idempotent-Replayed": {
|
|
610
|
+
"$ref": "#/components/headers/Idempotent-Replayed"
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
"content": {
|
|
614
|
+
"application/json": {
|
|
615
|
+
"schema": {
|
|
616
|
+
"$ref": "#/components/schemas/IngestResponse"
|
|
617
|
+
},
|
|
618
|
+
"example": {
|
|
619
|
+
"chunks": 1,
|
|
620
|
+
"ingestedChunks": 1,
|
|
621
|
+
"failedChunks": 0,
|
|
622
|
+
"truncated": false,
|
|
623
|
+
"duplicateOf": null,
|
|
624
|
+
"parseFailures": []
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
"400": {
|
|
630
|
+
"$ref": "#/components/responses/BadRequest"
|
|
631
|
+
},
|
|
632
|
+
"401": {
|
|
633
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
634
|
+
},
|
|
635
|
+
"402": {
|
|
636
|
+
"$ref": "#/components/responses/PaymentRequired"
|
|
637
|
+
},
|
|
638
|
+
"403": {
|
|
639
|
+
"$ref": "#/components/responses/Forbidden"
|
|
640
|
+
},
|
|
641
|
+
"409": {
|
|
642
|
+
"description": "The write conflicts with current state: `conflict`, `extraction_plan_stale`,\n`source_hash_conflict` (another sourceRef already holds this content hash),\n`namespace_busy` (the namespace is under another write; retry),\n`inference_not_configured` (server extraction requested but the organization has\nno extraction registration), or `inference_config_invalid` (the provider rejected\nthe organization's key as configuration-invalid — auth or bad option — on every\nextraction call; nothing was written and the response is not retried).\n",
|
|
643
|
+
"headers": {
|
|
644
|
+
"Request-Id": {
|
|
645
|
+
"$ref": "#/components/headers/Request-Id"
|
|
646
|
+
},
|
|
647
|
+
"Retry-After": {
|
|
648
|
+
"$ref": "#/components/headers/Retry-After"
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
"content": {
|
|
652
|
+
"application/problem+json": {
|
|
653
|
+
"schema": {
|
|
654
|
+
"$ref": "#/components/schemas/Problem"
|
|
655
|
+
},
|
|
656
|
+
"examples": {
|
|
657
|
+
"sourceHashConflict": {
|
|
658
|
+
"value": {
|
|
659
|
+
"type": "urn:synapsetree:problem:source_hash_conflict",
|
|
660
|
+
"title": "Source hash already stored",
|
|
661
|
+
"status": 409,
|
|
662
|
+
"code": "source_hash_conflict",
|
|
663
|
+
"detail": "Another sourceRef in this namespace already holds this content.",
|
|
664
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
665
|
+
"retryable": false,
|
|
666
|
+
"duplicateOf": "docs__runbook-old.md"
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
"inferenceConfigInvalid": {
|
|
670
|
+
"value": {
|
|
671
|
+
"type": "urn:synapsetree:problem:inference_config_invalid",
|
|
672
|
+
"title": "Inference configuration invalid",
|
|
673
|
+
"status": 409,
|
|
674
|
+
"code": "inference_config_invalid",
|
|
675
|
+
"detail": "The provider rejected the tenant's model key as configuration-invalid on every extraction call; nothing was written.",
|
|
676
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
677
|
+
"retryable": false
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
"413": {
|
|
685
|
+
"$ref": "#/components/responses/PayloadTooLarge"
|
|
686
|
+
},
|
|
687
|
+
"422": {
|
|
688
|
+
"description": "Well-formed but refused: `ontology_violation`, `ingest_failed`,\n`idempotency_key_reused`, `embedding_dimension_mismatch` (client vector with a\ndifferent dimension), or `embedding_model_mismatch` (the tenant's configured\nembedding model differs from the namespace's stored-vector fingerprint; the\nrefusal precedes any write and points at the re-embed maintenance path).\n",
|
|
689
|
+
"headers": {
|
|
690
|
+
"Request-Id": {
|
|
691
|
+
"$ref": "#/components/headers/Request-Id"
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
"content": {
|
|
695
|
+
"application/problem+json": {
|
|
696
|
+
"schema": {
|
|
697
|
+
"$ref": "#/components/schemas/Problem"
|
|
698
|
+
},
|
|
699
|
+
"examples": {
|
|
700
|
+
"ontologyViolation": {
|
|
701
|
+
"value": {
|
|
702
|
+
"type": "urn:synapsetree:problem:ontology_violation",
|
|
703
|
+
"title": "Ontology violation",
|
|
704
|
+
"status": 422,
|
|
705
|
+
"code": "ontology_violation",
|
|
706
|
+
"detail": "Node type \"microservice\" is not in this namespace's strict manifest.",
|
|
707
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
708
|
+
"retryable": false,
|
|
709
|
+
"kind": "node",
|
|
710
|
+
"ontologyType": "microservice"
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
"embeddingModelMismatch": {
|
|
714
|
+
"value": {
|
|
715
|
+
"type": "urn:synapsetree:problem:embedding_model_mismatch",
|
|
716
|
+
"title": "Embedding model mismatch",
|
|
717
|
+
"status": 422,
|
|
718
|
+
"code": "embedding_model_mismatch",
|
|
719
|
+
"detail": "The configured embedding model differs from the namespace's stored-vector fingerprint; run maintenance to re-embed.",
|
|
720
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
721
|
+
"retryable": false
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
"429": {
|
|
729
|
+
"$ref": "#/components/responses/TooManyRequests"
|
|
730
|
+
},
|
|
731
|
+
"500": {
|
|
732
|
+
"$ref": "#/components/responses/InternalError"
|
|
733
|
+
},
|
|
734
|
+
"501": {
|
|
735
|
+
"$ref": "#/components/responses/NotImplemented"
|
|
736
|
+
},
|
|
737
|
+
"503": {
|
|
738
|
+
"description": "Temporarily unavailable: `unavailable` (tenant cold start or writer handoff),\n`fenced` (the writer lost its lease; the write did not commit), or\n`upstream_inference_unavailable` (the tenant's inference provider failed on\nevery extraction call, or either BYOK rate cap (extraction or embeddings)\nis exhausted for the window (429/5xx/timeout; nothing was written; safe\nto retry)). When the embeddings rate cap is exhausted by an active\nmaintenance run, the problem `detail` names the run (`mrun_…`) as the\nconsumer.\n",
|
|
739
|
+
"headers": {
|
|
740
|
+
"Request-Id": {
|
|
741
|
+
"$ref": "#/components/headers/Request-Id"
|
|
742
|
+
},
|
|
743
|
+
"Retry-After": {
|
|
744
|
+
"$ref": "#/components/headers/Retry-After"
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
"content": {
|
|
748
|
+
"application/problem+json": {
|
|
749
|
+
"schema": {
|
|
750
|
+
"$ref": "#/components/schemas/Problem"
|
|
751
|
+
},
|
|
752
|
+
"examples": {
|
|
753
|
+
"fenced": {
|
|
754
|
+
"value": {
|
|
755
|
+
"type": "urn:synapsetree:problem:fenced",
|
|
756
|
+
"title": "Writer fenced",
|
|
757
|
+
"status": 503,
|
|
758
|
+
"code": "fenced",
|
|
759
|
+
"detail": "The write did not commit; retry.",
|
|
760
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
761
|
+
"retryable": true,
|
|
762
|
+
"retryAfterSeconds": 1
|
|
763
|
+
}
|
|
764
|
+
},
|
|
765
|
+
"upstreamInferenceUnavailable": {
|
|
766
|
+
"value": {
|
|
767
|
+
"type": "urn:synapsetree:problem:upstream_inference_unavailable",
|
|
768
|
+
"title": "Upstream inference unavailable",
|
|
769
|
+
"status": 503,
|
|
770
|
+
"code": "upstream_inference_unavailable",
|
|
771
|
+
"detail": "The tenant's inference provider failed on every extraction call (429/5xx/timeout); nothing was written.",
|
|
772
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
773
|
+
"retryable": true,
|
|
774
|
+
"retryAfterSeconds": 30
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
"/v1/memory/events": {
|
|
785
|
+
"post": {
|
|
786
|
+
"operationId": "createEvent",
|
|
787
|
+
"tags": [
|
|
788
|
+
"memory"
|
|
789
|
+
],
|
|
790
|
+
"summary": "Record an event",
|
|
791
|
+
"description": "Appends an observation, decision, action, or outcome to a namespace's event log. Events\nare the input to later consolidation into facts; recording one never runs inference.\nA relatedFactId that does not exist in the namespace (superseded facts count as existing)\nis refused with 404.\n",
|
|
792
|
+
"x-synapsetree-scope": "read_write",
|
|
793
|
+
"x-synapsetree-engine": "write",
|
|
794
|
+
"parameters": [
|
|
795
|
+
{
|
|
796
|
+
"$ref": "#/components/parameters/IdempotencyKey"
|
|
797
|
+
}
|
|
798
|
+
],
|
|
799
|
+
"requestBody": {
|
|
800
|
+
"required": true,
|
|
801
|
+
"content": {
|
|
802
|
+
"application/json": {
|
|
803
|
+
"schema": {
|
|
804
|
+
"$ref": "#/components/schemas/CreateEventRequest"
|
|
805
|
+
},
|
|
806
|
+
"examples": {
|
|
807
|
+
"decision": {
|
|
808
|
+
"value": {
|
|
809
|
+
"namespace": "repo:synapsetree",
|
|
810
|
+
"eventType": "decision",
|
|
811
|
+
"summary": "Chose DynamoDB for the control plane",
|
|
812
|
+
"occurredAt": "2026-09-29T09:00:00Z"
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
},
|
|
819
|
+
"responses": {
|
|
820
|
+
"201": {
|
|
821
|
+
"description": "The recorded event.",
|
|
822
|
+
"headers": {
|
|
823
|
+
"Request-Id": {
|
|
824
|
+
"$ref": "#/components/headers/Request-Id"
|
|
825
|
+
},
|
|
826
|
+
"RateLimit-Policy": {
|
|
827
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
828
|
+
},
|
|
829
|
+
"RateLimit": {
|
|
830
|
+
"$ref": "#/components/headers/RateLimit"
|
|
831
|
+
},
|
|
832
|
+
"Idempotent-Replayed": {
|
|
833
|
+
"$ref": "#/components/headers/Idempotent-Replayed"
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
"content": {
|
|
837
|
+
"application/json": {
|
|
838
|
+
"schema": {
|
|
839
|
+
"$ref": "#/components/schemas/Event"
|
|
840
|
+
},
|
|
841
|
+
"example": {
|
|
842
|
+
"id": "evt_01j9x8c3d4",
|
|
843
|
+
"namespace": "repo:synapsetree",
|
|
844
|
+
"eventType": "decision",
|
|
845
|
+
"summary": "Chose DynamoDB for the control plane",
|
|
846
|
+
"relatedFactId": null,
|
|
847
|
+
"occurredAt": "2026-09-29T09:00:00Z",
|
|
848
|
+
"createdAt": "2026-09-29T09:05:00Z"
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
},
|
|
853
|
+
"400": {
|
|
854
|
+
"$ref": "#/components/responses/BadRequest"
|
|
855
|
+
},
|
|
856
|
+
"401": {
|
|
857
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
858
|
+
},
|
|
859
|
+
"402": {
|
|
860
|
+
"$ref": "#/components/responses/PaymentRequired"
|
|
861
|
+
},
|
|
862
|
+
"403": {
|
|
863
|
+
"$ref": "#/components/responses/Forbidden"
|
|
864
|
+
},
|
|
865
|
+
"404": {
|
|
866
|
+
"$ref": "#/components/responses/NotFound"
|
|
867
|
+
},
|
|
868
|
+
"409": {
|
|
869
|
+
"$ref": "#/components/responses/Conflict"
|
|
870
|
+
},
|
|
871
|
+
"413": {
|
|
872
|
+
"$ref": "#/components/responses/PayloadTooLarge"
|
|
873
|
+
},
|
|
874
|
+
"422": {
|
|
875
|
+
"$ref": "#/components/responses/UnprocessableContent"
|
|
876
|
+
},
|
|
877
|
+
"429": {
|
|
878
|
+
"$ref": "#/components/responses/TooManyRequests"
|
|
879
|
+
},
|
|
880
|
+
"500": {
|
|
881
|
+
"$ref": "#/components/responses/InternalError"
|
|
882
|
+
},
|
|
883
|
+
"503": {
|
|
884
|
+
"$ref": "#/components/responses/ServiceUnavailable"
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
},
|
|
889
|
+
"/v1/graph/traverse": {
|
|
890
|
+
"post": {
|
|
891
|
+
"operationId": "traverseGraph",
|
|
892
|
+
"tags": [
|
|
893
|
+
"graph"
|
|
894
|
+
],
|
|
895
|
+
"summary": "Traverse the graph from an anchor fact",
|
|
896
|
+
"description": "Walks edges from `sourceId` up to `maxDepth` hops (1–3). The anchor is always returned\nfirst; discovered nodes follow in depth order. Only edges whose both endpoints are\nreturned are included. With `asOf`, only facts live at that instant are walked.\nBounded by `maxNodes`; not paginated.\n",
|
|
897
|
+
"x-synapsetree-scope": "read",
|
|
898
|
+
"x-synapsetree-engine": "traverseGraph",
|
|
899
|
+
"requestBody": {
|
|
900
|
+
"required": true,
|
|
901
|
+
"content": {
|
|
902
|
+
"application/json": {
|
|
903
|
+
"schema": {
|
|
904
|
+
"$ref": "#/components/schemas/TraverseRequest"
|
|
905
|
+
},
|
|
906
|
+
"examples": {
|
|
907
|
+
"twoHops": {
|
|
908
|
+
"summary": "Two hops, outbound, dependency edges only",
|
|
909
|
+
"value": {
|
|
910
|
+
"namespace": "repo:synapsetree",
|
|
911
|
+
"sourceId": "app_synapsetree",
|
|
912
|
+
"maxDepth": 2,
|
|
913
|
+
"direction": "outbound",
|
|
914
|
+
"edgeTypes": [
|
|
915
|
+
"dependsOn"
|
|
916
|
+
],
|
|
917
|
+
"maxNodes": 50
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
"responses": {
|
|
925
|
+
"200": {
|
|
926
|
+
"description": "The anchor's neighbourhood.",
|
|
927
|
+
"headers": {
|
|
928
|
+
"Request-Id": {
|
|
929
|
+
"$ref": "#/components/headers/Request-Id"
|
|
930
|
+
},
|
|
931
|
+
"RateLimit-Policy": {
|
|
932
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
933
|
+
},
|
|
934
|
+
"RateLimit": {
|
|
935
|
+
"$ref": "#/components/headers/RateLimit"
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
"content": {
|
|
939
|
+
"application/json": {
|
|
940
|
+
"schema": {
|
|
941
|
+
"$ref": "#/components/schemas/TraverseResponse"
|
|
942
|
+
},
|
|
943
|
+
"example": {
|
|
944
|
+
"nodes": [
|
|
945
|
+
{
|
|
946
|
+
"id": "fact_01j9x7k2m3",
|
|
947
|
+
"namespace": "repo:synapsetree",
|
|
948
|
+
"sourceType": "immutable_document",
|
|
949
|
+
"mutable": false,
|
|
950
|
+
"sourceRef": "infra__stack.ts",
|
|
951
|
+
"sourceHash": "9f2c4b8e1a7d3f6c5b0e2d4a8c1f3e5b7d9a0c2e4f6b8d0a1c3e5f7b9d1a3c5e",
|
|
952
|
+
"title": "SynapseTree",
|
|
953
|
+
"body": "Hosted LLM memory API. status active.",
|
|
954
|
+
"tags": [],
|
|
955
|
+
"confidence": "certain",
|
|
956
|
+
"okfType": "software_application",
|
|
957
|
+
"lifecycleStatus": "stable",
|
|
958
|
+
"trustTier": "unverified",
|
|
959
|
+
"isStale": false,
|
|
960
|
+
"generatedBy": null,
|
|
961
|
+
"lastVerifiedAt": null,
|
|
962
|
+
"lastVerifiedBy": null,
|
|
963
|
+
"validFrom": null,
|
|
964
|
+
"validTo": null,
|
|
965
|
+
"supersededBy": null,
|
|
966
|
+
"supersededAt": null,
|
|
967
|
+
"accessCount": 3,
|
|
968
|
+
"lastAccessedAt": "2026-09-30T08:00:00Z",
|
|
969
|
+
"createdAt": "2026-09-29T10:00:00Z",
|
|
970
|
+
"updatedAt": "2026-09-29T10:00:00Z"
|
|
971
|
+
}
|
|
972
|
+
],
|
|
973
|
+
"edges": [
|
|
974
|
+
{
|
|
975
|
+
"id": "edge_01j9x9e5f6",
|
|
976
|
+
"namespace": "repo:synapsetree",
|
|
977
|
+
"sourceId": "app_synapsetree",
|
|
978
|
+
"targetId": "svc_dynamodb",
|
|
979
|
+
"edgeType": "dependsOn",
|
|
980
|
+
"createdAt": "2026-09-29T10:00:00Z"
|
|
981
|
+
}
|
|
982
|
+
]
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
},
|
|
987
|
+
"400": {
|
|
988
|
+
"$ref": "#/components/responses/BadRequest"
|
|
989
|
+
},
|
|
990
|
+
"401": {
|
|
991
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
992
|
+
},
|
|
993
|
+
"403": {
|
|
994
|
+
"$ref": "#/components/responses/Forbidden"
|
|
995
|
+
},
|
|
996
|
+
"404": {
|
|
997
|
+
"$ref": "#/components/responses/NotFound"
|
|
998
|
+
},
|
|
999
|
+
"409": {
|
|
1000
|
+
"$ref": "#/components/responses/Conflict"
|
|
1001
|
+
},
|
|
1002
|
+
"429": {
|
|
1003
|
+
"$ref": "#/components/responses/TooManyRequests"
|
|
1004
|
+
},
|
|
1005
|
+
"500": {
|
|
1006
|
+
"$ref": "#/components/responses/InternalError"
|
|
1007
|
+
},
|
|
1008
|
+
"503": {
|
|
1009
|
+
"$ref": "#/components/responses/ServiceUnavailable"
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
1014
|
+
"/v1/namespaces": {
|
|
1015
|
+
"get": {
|
|
1016
|
+
"operationId": "listNamespaces",
|
|
1017
|
+
"tags": [
|
|
1018
|
+
"namespaces"
|
|
1019
|
+
],
|
|
1020
|
+
"summary": "List namespaces",
|
|
1021
|
+
"description": "Namespaces with at least one row, ordered by name (binary ascending). Includes namespaces\nwhose rows are all deleted, until they are pruned.\n",
|
|
1022
|
+
"x-synapsetree-scope": "read",
|
|
1023
|
+
"x-synapsetree-engine": "listEntityIds",
|
|
1024
|
+
"parameters": [
|
|
1025
|
+
{
|
|
1026
|
+
"name": "prefix",
|
|
1027
|
+
"in": "query",
|
|
1028
|
+
"required": false,
|
|
1029
|
+
"description": "Only namespaces starting with this string.",
|
|
1030
|
+
"schema": {
|
|
1031
|
+
"type": "string",
|
|
1032
|
+
"maxLength": 128
|
|
1033
|
+
},
|
|
1034
|
+
"example": "repo:"
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
"$ref": "#/components/parameters/After"
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
"$ref": "#/components/parameters/Limit"
|
|
1041
|
+
}
|
|
1042
|
+
],
|
|
1043
|
+
"responses": {
|
|
1044
|
+
"200": {
|
|
1045
|
+
"description": "One page of namespaces.",
|
|
1046
|
+
"headers": {
|
|
1047
|
+
"Request-Id": {
|
|
1048
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1049
|
+
},
|
|
1050
|
+
"RateLimit-Policy": {
|
|
1051
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
1052
|
+
},
|
|
1053
|
+
"RateLimit": {
|
|
1054
|
+
"$ref": "#/components/headers/RateLimit"
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
"content": {
|
|
1058
|
+
"application/json": {
|
|
1059
|
+
"schema": {
|
|
1060
|
+
"$ref": "#/components/schemas/NamespaceList"
|
|
1061
|
+
},
|
|
1062
|
+
"example": {
|
|
1063
|
+
"data": [
|
|
1064
|
+
{
|
|
1065
|
+
"namespace": "repo:synapsetree"
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
"namespace": "user:kurt"
|
|
1069
|
+
}
|
|
1070
|
+
],
|
|
1071
|
+
"hasMore": false,
|
|
1072
|
+
"nextCursor": null
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
},
|
|
1077
|
+
"400": {
|
|
1078
|
+
"$ref": "#/components/responses/BadRequest"
|
|
1079
|
+
},
|
|
1080
|
+
"401": {
|
|
1081
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
1082
|
+
},
|
|
1083
|
+
"403": {
|
|
1084
|
+
"$ref": "#/components/responses/Forbidden"
|
|
1085
|
+
},
|
|
1086
|
+
"429": {
|
|
1087
|
+
"$ref": "#/components/responses/TooManyRequests"
|
|
1088
|
+
},
|
|
1089
|
+
"500": {
|
|
1090
|
+
"$ref": "#/components/responses/InternalError"
|
|
1091
|
+
},
|
|
1092
|
+
"503": {
|
|
1093
|
+
"$ref": "#/components/responses/ServiceUnavailable"
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
},
|
|
1098
|
+
"/v1/whoami": {
|
|
1099
|
+
"get": {
|
|
1100
|
+
"operationId": "whoami",
|
|
1101
|
+
"tags": [
|
|
1102
|
+
"account"
|
|
1103
|
+
],
|
|
1104
|
+
"summary": "Describe the calling key",
|
|
1105
|
+
"description": "The routing context the authorizer resolved for this key.",
|
|
1106
|
+
"x-synapsetree-scope": "read",
|
|
1107
|
+
"x-synapsetree-engine": "none (control plane)",
|
|
1108
|
+
"responses": {
|
|
1109
|
+
"200": {
|
|
1110
|
+
"description": "The key's routing context.",
|
|
1111
|
+
"headers": {
|
|
1112
|
+
"Request-Id": {
|
|
1113
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1114
|
+
},
|
|
1115
|
+
"RateLimit-Policy": {
|
|
1116
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
1117
|
+
},
|
|
1118
|
+
"RateLimit": {
|
|
1119
|
+
"$ref": "#/components/headers/RateLimit"
|
|
1120
|
+
}
|
|
1121
|
+
},
|
|
1122
|
+
"content": {
|
|
1123
|
+
"application/json": {
|
|
1124
|
+
"schema": {
|
|
1125
|
+
"$ref": "#/components/schemas/Whoami"
|
|
1126
|
+
},
|
|
1127
|
+
"example": {
|
|
1128
|
+
"apiKeyId": "key_01j9x5v7w8",
|
|
1129
|
+
"organizationId": "org_01j9x5t3u4",
|
|
1130
|
+
"tenantDatabaseId": "db_01j9x5r1s2",
|
|
1131
|
+
"scope": "read_write",
|
|
1132
|
+
"planCode": "hobby",
|
|
1133
|
+
"subscriptionStatus": "inactive"
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
},
|
|
1138
|
+
"401": {
|
|
1139
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
1140
|
+
},
|
|
1141
|
+
"403": {
|
|
1142
|
+
"$ref": "#/components/responses/Forbidden"
|
|
1143
|
+
},
|
|
1144
|
+
"429": {
|
|
1145
|
+
"$ref": "#/components/responses/TooManyRequests"
|
|
1146
|
+
},
|
|
1147
|
+
"500": {
|
|
1148
|
+
"$ref": "#/components/responses/InternalError"
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
},
|
|
1153
|
+
"/agent/identity": {
|
|
1154
|
+
"post": {
|
|
1155
|
+
"operationId": "registerAgentIdentity",
|
|
1156
|
+
"tags": [
|
|
1157
|
+
"agent"
|
|
1158
|
+
],
|
|
1159
|
+
"summary": "Start agent registration for an email",
|
|
1160
|
+
"description": "First step of auth.md agent registration: an agent without an API key\nasks SynapseTree to email the human a claim link. The endpoint is\nunauthenticated; the response is byte-equal for known and unknown\nemails (anti-enumeration). At most 5 claim tokens may be outstanding\nfor one email — the 6th answers `quota_exceeded` (an existing\nProblemCode; errors here are problem+json only). Success returns the\n`stclaim_…` claim token the agent polls with, a short `user_code` the\nhuman confirms on the consent interstitial, and the poll parameters. The\noutstanding-token cap responds `quota_exceeded`.\n",
|
|
1161
|
+
"security": [],
|
|
1162
|
+
"x-synapsetree-engine": "registerAgentIdentity (control plane)",
|
|
1163
|
+
"requestBody": {
|
|
1164
|
+
"required": true,
|
|
1165
|
+
"content": {
|
|
1166
|
+
"application/json": {
|
|
1167
|
+
"schema": {
|
|
1168
|
+
"$ref": "#/components/schemas/AgentIdentityRequest"
|
|
1169
|
+
},
|
|
1170
|
+
"example": {
|
|
1171
|
+
"email": "ada@example.com"
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
},
|
|
1176
|
+
"responses": {
|
|
1177
|
+
"200": {
|
|
1178
|
+
"description": "The claim is pending; a confirmation email is on its way to the\nhuman. Byte-equal whether or not the email is known to SynapseTree.\n",
|
|
1179
|
+
"headers": {
|
|
1180
|
+
"Request-Id": {
|
|
1181
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1182
|
+
},
|
|
1183
|
+
"RateLimit-Policy": {
|
|
1184
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
1185
|
+
},
|
|
1186
|
+
"RateLimit": {
|
|
1187
|
+
"$ref": "#/components/headers/RateLimit"
|
|
1188
|
+
}
|
|
1189
|
+
},
|
|
1190
|
+
"content": {
|
|
1191
|
+
"application/json": {
|
|
1192
|
+
"schema": {
|
|
1193
|
+
"$ref": "#/components/schemas/AgentIdentityResponse"
|
|
1194
|
+
},
|
|
1195
|
+
"example": {
|
|
1196
|
+
"claim_token": "stclaim_exampleclaimtoken01",
|
|
1197
|
+
"user_code": "482913",
|
|
1198
|
+
"poll": {
|
|
1199
|
+
"token_endpoint": "https://api.synapsetree.dev/oauth2/token",
|
|
1200
|
+
"grant": "urn:synapsetree:claim",
|
|
1201
|
+
"interval": 5
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
},
|
|
1207
|
+
"400": {
|
|
1208
|
+
"$ref": "#/components/responses/BadRequest"
|
|
1209
|
+
},
|
|
1210
|
+
"403": {
|
|
1211
|
+
"$ref": "#/components/responses/QuotaExceeded"
|
|
1212
|
+
},
|
|
1213
|
+
"500": {
|
|
1214
|
+
"$ref": "#/components/responses/InternalError"
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
},
|
|
1219
|
+
"/oauth2/token": {
|
|
1220
|
+
"post": {
|
|
1221
|
+
"operationId": "oauthToken",
|
|
1222
|
+
"tags": [
|
|
1223
|
+
"agent"
|
|
1224
|
+
],
|
|
1225
|
+
"summary": "Poll the claim grant for the minted API key",
|
|
1226
|
+
"description": "Device-flow style poll (RFC 8628 §3.4/§3.5) with a claim grant: the\nagent presents the `stclaim_…` token from POST /agent/identity as the\n`assertion` (RFC 7523 jwt-bearer shape) with grant type\n`urn:synapsetree:claim`. Before the human approves, the endpoint\nanswers `authorization_pending` (with `interval`) or `slow_down`;\nafter approval the FIRST poll mints exactly one API key (and, in the\nsame transaction, frees the claim token) and answers with it — later\npolls answer `invalid_grant`, as do expiry and absence. If the\norganization already holds 10 live agent keys the poll answers\n`key_limit_reached`, a documented extension of the RFC 6749 §5.2\n`error` member (not a problem+json code). Errors here are RFC 6749\n§5.2 bodies, never problem+json. No per-IP rate limit exists in v1.\n",
|
|
1227
|
+
"security": [],
|
|
1228
|
+
"x-synapsetree-engine": "oauthToken (control plane)",
|
|
1229
|
+
"requestBody": {
|
|
1230
|
+
"required": true,
|
|
1231
|
+
"content": {
|
|
1232
|
+
"application/x-www-form-urlencoded": {
|
|
1233
|
+
"schema": {
|
|
1234
|
+
"$ref": "#/components/schemas/ClaimGrantRequest"
|
|
1235
|
+
},
|
|
1236
|
+
"example": {
|
|
1237
|
+
"grant_type": "urn:synapsetree:claim",
|
|
1238
|
+
"assertion": "stclaim_exampleclaimtoken01"
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
"responses": {
|
|
1244
|
+
"200": {
|
|
1245
|
+
"description": "The claim was approved and redeemed; exactly one API key was\nminted. Polling again answers `invalid_grant`.\n",
|
|
1246
|
+
"headers": {
|
|
1247
|
+
"Request-Id": {
|
|
1248
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1249
|
+
},
|
|
1250
|
+
"RateLimit-Policy": {
|
|
1251
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
1252
|
+
},
|
|
1253
|
+
"RateLimit": {
|
|
1254
|
+
"$ref": "#/components/headers/RateLimit"
|
|
1255
|
+
}
|
|
1256
|
+
},
|
|
1257
|
+
"content": {
|
|
1258
|
+
"application/json": {
|
|
1259
|
+
"schema": {
|
|
1260
|
+
"$ref": "#/components/schemas/TokenResponse"
|
|
1261
|
+
},
|
|
1262
|
+
"example": {
|
|
1263
|
+
"access_token": "stree_Tq3-vZ8_kLm2NpR5sUw7YxA9bC1dE4fG6hJ0iKlMnOp",
|
|
1264
|
+
"token_type": "Bearer",
|
|
1265
|
+
"account_id": "01890a5d-ac96-774b-bcce-b302099a8057",
|
|
1266
|
+
"scope": "memory:full"
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
},
|
|
1271
|
+
"400": {
|
|
1272
|
+
"$ref": "#/components/responses/OauthErrorResponse"
|
|
1273
|
+
},
|
|
1274
|
+
"500": {
|
|
1275
|
+
"$ref": "#/components/responses/OauthServerError"
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
"/oauth2/revoke": {
|
|
1281
|
+
"post": {
|
|
1282
|
+
"operationId": "oauthRevoke",
|
|
1283
|
+
"tags": [
|
|
1284
|
+
"agent"
|
|
1285
|
+
],
|
|
1286
|
+
"summary": "Revoke a token (RFC 7009)",
|
|
1287
|
+
"description": "RFC 7009 revocation, bearer-authenticated like every other key-bearing\nendpoint. Revoking an agent key frees its seat against the\norganization's 10-key cap. The endpoint answers 200 on every\nrequest carrying a LIVE bearer — the response is byte-equal whether the\ntoken was revoked or was unknown. A revoked, deleted or unknown CLIENT\nbearer never reaches the handler: the edge answers 401 (the shared\n`unauthorized` problem, RFC 6750 — byte-equal for unknown and revoked\nbearers, anti-enumeration). A request with an ABSENT or MALFORMED\n`Authorization` header is refused by the API Gateway authorizer before\nthe handler runs, with the gateway's default native body\n`{\"message\":\"Unauthorized\"}` (not problem+json, no `WWW-Authenticate`\nchallenge). Errors from the handler are RFC 6749 §5.2 bodies, never\nproblem+json (the two 401 bodies above excepted).\n",
|
|
1288
|
+
"x-synapsetree-engine": "oauthRevoke (control plane)",
|
|
1289
|
+
"requestBody": {
|
|
1290
|
+
"required": true,
|
|
1291
|
+
"content": {
|
|
1292
|
+
"application/x-www-form-urlencoded": {
|
|
1293
|
+
"schema": {
|
|
1294
|
+
"$ref": "#/components/schemas/RevokeRequest"
|
|
1295
|
+
},
|
|
1296
|
+
"example": {
|
|
1297
|
+
"token": "stree_Tq3-vZ8_kLm2NpR5sUw7YxA9bC1dE4fG6hJ0iKlMnOp",
|
|
1298
|
+
"token_type_hint": "access_token"
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
},
|
|
1303
|
+
"responses": {
|
|
1304
|
+
"200": {
|
|
1305
|
+
"description": "The token is revoked, or was unknown; byte-equal either way. Requires a live bearer.\n",
|
|
1306
|
+
"headers": {
|
|
1307
|
+
"Request-Id": {
|
|
1308
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1309
|
+
},
|
|
1310
|
+
"RateLimit-Policy": {
|
|
1311
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
1312
|
+
},
|
|
1313
|
+
"RateLimit": {
|
|
1314
|
+
"$ref": "#/components/headers/RateLimit"
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
"content": {
|
|
1318
|
+
"application/json": {
|
|
1319
|
+
"schema": {
|
|
1320
|
+
"type": "object",
|
|
1321
|
+
"description": "Empty body (RFC 7009 §2.2 — 200 confirms processing).",
|
|
1322
|
+
"additionalProperties": false,
|
|
1323
|
+
"required": [],
|
|
1324
|
+
"properties": {}
|
|
1325
|
+
},
|
|
1326
|
+
"example": {}
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
},
|
|
1330
|
+
"400": {
|
|
1331
|
+
"$ref": "#/components/responses/OauthErrorResponse"
|
|
1332
|
+
},
|
|
1333
|
+
"401": {
|
|
1334
|
+
"description": "The CLIENT bearer is unknown, revoked or invalid (RFC 6750). Emitted by the\napplication's shared 401 emitter, byte-equal to the pool's — anti-enumeration\n(unknown and revoked bearers are indistinguishable). A missing/malformed\n`Authorization` header instead yields the API Gateway default 401 body\n`{\"message\":\"Unauthorized\"}` — see the operation description.\n",
|
|
1335
|
+
"headers": {
|
|
1336
|
+
"Request-Id": {
|
|
1337
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1338
|
+
},
|
|
1339
|
+
"WWW-Authenticate": {
|
|
1340
|
+
"$ref": "#/components/headers/WWW-Authenticate"
|
|
1341
|
+
}
|
|
1342
|
+
},
|
|
1343
|
+
"content": {
|
|
1344
|
+
"application/problem+json": {
|
|
1345
|
+
"schema": {
|
|
1346
|
+
"$ref": "#/components/schemas/Problem"
|
|
1347
|
+
},
|
|
1348
|
+
"example": {
|
|
1349
|
+
"type": "urn:synapsetree:problem:unauthorized",
|
|
1350
|
+
"title": "Unauthorized",
|
|
1351
|
+
"status": 401,
|
|
1352
|
+
"code": "unauthorized",
|
|
1353
|
+
"detail": "The API key is missing, invalid, or revoked.",
|
|
1354
|
+
"requestId": "req_01j9x5v7w8example",
|
|
1355
|
+
"retryable": false
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
},
|
|
1360
|
+
"429": {
|
|
1361
|
+
"description": "Per-key throttle (60 requests/min) exceeded.",
|
|
1362
|
+
"headers": {
|
|
1363
|
+
"Request-Id": {
|
|
1364
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1365
|
+
},
|
|
1366
|
+
"Retry-After": {
|
|
1367
|
+
"$ref": "#/components/headers/Retry-After"
|
|
1368
|
+
}
|
|
1369
|
+
},
|
|
1370
|
+
"content": {
|
|
1371
|
+
"application/json": {
|
|
1372
|
+
"schema": {
|
|
1373
|
+
"$ref": "#/components/schemas/OauthErrorBody"
|
|
1374
|
+
},
|
|
1375
|
+
"example": {
|
|
1376
|
+
"error": "server_error",
|
|
1377
|
+
"error_description": "Too many requests for this key; retry later."
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
},
|
|
1382
|
+
"500": {
|
|
1383
|
+
"$ref": "#/components/responses/OauthServerError"
|
|
1384
|
+
},
|
|
1385
|
+
"503": {
|
|
1386
|
+
"description": "Authorization store unavailable; the request fails closed (RFC 6749 `server_error`).",
|
|
1387
|
+
"headers": {
|
|
1388
|
+
"Request-Id": {
|
|
1389
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1390
|
+
}
|
|
1391
|
+
},
|
|
1392
|
+
"content": {
|
|
1393
|
+
"application/json": {
|
|
1394
|
+
"schema": {
|
|
1395
|
+
"$ref": "#/components/schemas/OauthErrorBody"
|
|
1396
|
+
},
|
|
1397
|
+
"example": {
|
|
1398
|
+
"error": "server_error",
|
|
1399
|
+
"error_description": "Authorization is temporarily unavailable; retry later."
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
},
|
|
1408
|
+
"components": {
|
|
1409
|
+
"headers": {
|
|
1410
|
+
"Idempotent-Replayed": {
|
|
1411
|
+
"description": "Present and `true` when the response was replayed for a repeated `Idempotency-Key`.",
|
|
1412
|
+
"schema": {
|
|
1413
|
+
"type": "boolean"
|
|
1414
|
+
},
|
|
1415
|
+
"example": true
|
|
1416
|
+
},
|
|
1417
|
+
"RateLimit": {
|
|
1418
|
+
"description": "Remaining quota in the current window (draft-ietf-httpapi-ratelimit-headers).",
|
|
1419
|
+
"schema": {
|
|
1420
|
+
"type": "string",
|
|
1421
|
+
"maxLength": 256
|
|
1422
|
+
},
|
|
1423
|
+
"example": "\"default\";r=412;t=17"
|
|
1424
|
+
},
|
|
1425
|
+
"RateLimit-Policy": {
|
|
1426
|
+
"description": "Rate-limit policy (draft-ietf-httpapi-ratelimit-headers, structured fields).",
|
|
1427
|
+
"schema": {
|
|
1428
|
+
"type": "string",
|
|
1429
|
+
"maxLength": 256
|
|
1430
|
+
},
|
|
1431
|
+
"example": "\"default\";q=600;w=60"
|
|
1432
|
+
},
|
|
1433
|
+
"Request-Id": {
|
|
1434
|
+
"description": "Identifies this request in logs and support requests.",
|
|
1435
|
+
"schema": {
|
|
1436
|
+
"type": "string",
|
|
1437
|
+
"pattern": "^req_[A-Za-z0-9]{8,64}$"
|
|
1438
|
+
},
|
|
1439
|
+
"example": "req_01j9xb7c8d9e"
|
|
1440
|
+
},
|
|
1441
|
+
"Retry-After": {
|
|
1442
|
+
"description": "Seconds to wait before retrying.",
|
|
1443
|
+
"schema": {
|
|
1444
|
+
"type": "integer",
|
|
1445
|
+
"minimum": 0
|
|
1446
|
+
},
|
|
1447
|
+
"example": 5
|
|
1448
|
+
},
|
|
1449
|
+
"WWW-Authenticate": {
|
|
1450
|
+
"description": "RFC 6750 challenge emitted with application-level 401s on key-bearing\nroutes, pointing at the OAuth 2.0 Protected Resource Metadata document.\n",
|
|
1451
|
+
"schema": {
|
|
1452
|
+
"type": "string",
|
|
1453
|
+
"maxLength": 512
|
|
1454
|
+
},
|
|
1455
|
+
"example": "Bearer resource_metadata=\"https://api.synapsetree.dev/.well-known/oauth-protected-resource\""
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
"parameters": {
|
|
1459
|
+
"After": {
|
|
1460
|
+
"name": "after",
|
|
1461
|
+
"in": "query",
|
|
1462
|
+
"required": false,
|
|
1463
|
+
"description": "The `nextCursor` from the previous page. Opaque; never an offset.",
|
|
1464
|
+
"schema": {
|
|
1465
|
+
"type": "string",
|
|
1466
|
+
"minLength": 1,
|
|
1467
|
+
"maxLength": 512
|
|
1468
|
+
},
|
|
1469
|
+
"example": "c_eyJrIjoiZG9jc19fcnVuYm9vay5tZCJ9.k3Jf"
|
|
1470
|
+
},
|
|
1471
|
+
"FactId": {
|
|
1472
|
+
"name": "factId",
|
|
1473
|
+
"in": "path",
|
|
1474
|
+
"required": true,
|
|
1475
|
+
"description": "A fact id.",
|
|
1476
|
+
"schema": {
|
|
1477
|
+
"$ref": "#/components/schemas/FactId"
|
|
1478
|
+
},
|
|
1479
|
+
"example": "fact_01j9x7k2m3"
|
|
1480
|
+
},
|
|
1481
|
+
"IdempotencyKey": {
|
|
1482
|
+
"name": "Idempotency-Key",
|
|
1483
|
+
"in": "header",
|
|
1484
|
+
"required": false,
|
|
1485
|
+
"description": "Makes a retry safe. Retained 24 hours per API key. A replay returns the stored response\nwith `Idempotent-Replayed: true`; the same key with a different body is refused with\n`422 idempotency_key_reused`.\n",
|
|
1486
|
+
"schema": {
|
|
1487
|
+
"type": "string",
|
|
1488
|
+
"pattern": "^[A-Za-z0-9_-]{1,255}$"
|
|
1489
|
+
},
|
|
1490
|
+
"example": "7f1c2e9a-ingest-runbook"
|
|
1491
|
+
},
|
|
1492
|
+
"Limit": {
|
|
1493
|
+
"name": "limit",
|
|
1494
|
+
"in": "query",
|
|
1495
|
+
"required": false,
|
|
1496
|
+
"description": "Page size.",
|
|
1497
|
+
"schema": {
|
|
1498
|
+
"type": "integer",
|
|
1499
|
+
"minimum": 1,
|
|
1500
|
+
"maximum": 100,
|
|
1501
|
+
"default": 50
|
|
1502
|
+
},
|
|
1503
|
+
"example": 50
|
|
1504
|
+
}
|
|
1505
|
+
},
|
|
1506
|
+
"responses": {
|
|
1507
|
+
"BadRequest": {
|
|
1508
|
+
"description": "The request is invalid (`invalid_request`).",
|
|
1509
|
+
"headers": {
|
|
1510
|
+
"Request-Id": {
|
|
1511
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1512
|
+
}
|
|
1513
|
+
},
|
|
1514
|
+
"content": {
|
|
1515
|
+
"application/problem+json": {
|
|
1516
|
+
"schema": {
|
|
1517
|
+
"$ref": "#/components/schemas/Problem"
|
|
1518
|
+
},
|
|
1519
|
+
"example": {
|
|
1520
|
+
"type": "urn:synapsetree:problem:invalid_request",
|
|
1521
|
+
"title": "Invalid request",
|
|
1522
|
+
"status": 400,
|
|
1523
|
+
"code": "invalid_request",
|
|
1524
|
+
"detail": "The request body does not match the schema.",
|
|
1525
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
1526
|
+
"retryable": false,
|
|
1527
|
+
"errors": [
|
|
1528
|
+
{
|
|
1529
|
+
"path": "/sourceRef",
|
|
1530
|
+
"message": "must match pattern \"^[A-Za-z0-9._\\- ]{1,255}$\""
|
|
1531
|
+
}
|
|
1532
|
+
]
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
},
|
|
1537
|
+
"Conflict": {
|
|
1538
|
+
"description": "The write conflicts with current state: `conflict`, `invalid_state`,\n`source_hash_conflict`, `node_id_unavailable`, `namespace_busy`,\n`namespace_exists`, `idempotency_in_progress`, `extraction_plan_stale`, or\n`inference_not_configured`.\n",
|
|
1539
|
+
"headers": {
|
|
1540
|
+
"Request-Id": {
|
|
1541
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1542
|
+
},
|
|
1543
|
+
"Retry-After": {
|
|
1544
|
+
"$ref": "#/components/headers/Retry-After"
|
|
1545
|
+
}
|
|
1546
|
+
},
|
|
1547
|
+
"content": {
|
|
1548
|
+
"application/problem+json": {
|
|
1549
|
+
"schema": {
|
|
1550
|
+
"$ref": "#/components/schemas/Problem"
|
|
1551
|
+
},
|
|
1552
|
+
"example": {
|
|
1553
|
+
"type": "urn:synapsetree:problem:source_hash_conflict",
|
|
1554
|
+
"title": "Source hash already stored",
|
|
1555
|
+
"status": 409,
|
|
1556
|
+
"code": "source_hash_conflict",
|
|
1557
|
+
"detail": "Another sourceRef in this namespace already holds this content.",
|
|
1558
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
1559
|
+
"retryable": false,
|
|
1560
|
+
"duplicateOf": "docs__runbook-old.md"
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
},
|
|
1565
|
+
"Forbidden": {
|
|
1566
|
+
"description": "`application/json` (API Gateway): the key is unknown or revoked, or its database is not\nroutable. `application/problem+json`: `insufficient_scope` (a `read` key on a\n`read_write` operation, or a `memory:full` key on an export or destructive operation)\nor `quota_exceeded` (the organization is over its storage quota).\n",
|
|
1567
|
+
"content": {
|
|
1568
|
+
"application/json": {
|
|
1569
|
+
"schema": {
|
|
1570
|
+
"$ref": "#/components/schemas/GatewayError"
|
|
1571
|
+
},
|
|
1572
|
+
"example": {
|
|
1573
|
+
"message": "Forbidden"
|
|
1574
|
+
}
|
|
1575
|
+
},
|
|
1576
|
+
"application/problem+json": {
|
|
1577
|
+
"schema": {
|
|
1578
|
+
"$ref": "#/components/schemas/Problem"
|
|
1579
|
+
},
|
|
1580
|
+
"example": {
|
|
1581
|
+
"type": "urn:synapsetree:problem:insufficient_scope",
|
|
1582
|
+
"title": "Insufficient scope",
|
|
1583
|
+
"status": 403,
|
|
1584
|
+
"code": "insufficient_scope",
|
|
1585
|
+
"detail": "This operation needs a read_write key.",
|
|
1586
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
1587
|
+
"retryable": false
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
},
|
|
1592
|
+
"InternalError": {
|
|
1593
|
+
"description": "Unexpected server error (`internal`).",
|
|
1594
|
+
"headers": {
|
|
1595
|
+
"Request-Id": {
|
|
1596
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1597
|
+
}
|
|
1598
|
+
},
|
|
1599
|
+
"content": {
|
|
1600
|
+
"application/problem+json": {
|
|
1601
|
+
"schema": {
|
|
1602
|
+
"$ref": "#/components/schemas/Problem"
|
|
1603
|
+
},
|
|
1604
|
+
"example": {
|
|
1605
|
+
"type": "urn:synapsetree:problem:internal",
|
|
1606
|
+
"title": "Internal error",
|
|
1607
|
+
"status": 500,
|
|
1608
|
+
"code": "internal",
|
|
1609
|
+
"detail": "An unexpected error occurred.",
|
|
1610
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
1611
|
+
"retryable": true
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
},
|
|
1616
|
+
"NotFound": {
|
|
1617
|
+
"description": "The fact or draft does not exist in this namespace (`not_found`).",
|
|
1618
|
+
"headers": {
|
|
1619
|
+
"Request-Id": {
|
|
1620
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1621
|
+
}
|
|
1622
|
+
},
|
|
1623
|
+
"content": {
|
|
1624
|
+
"application/problem+json": {
|
|
1625
|
+
"schema": {
|
|
1626
|
+
"$ref": "#/components/schemas/Problem"
|
|
1627
|
+
},
|
|
1628
|
+
"example": {
|
|
1629
|
+
"type": "urn:synapsetree:problem:not_found",
|
|
1630
|
+
"title": "Not found",
|
|
1631
|
+
"status": 404,
|
|
1632
|
+
"code": "not_found",
|
|
1633
|
+
"detail": "No fact with that id exists in this namespace.",
|
|
1634
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
1635
|
+
"retryable": false
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
},
|
|
1640
|
+
"NotImplemented": {
|
|
1641
|
+
"description": "The operation or option depends on an engine release that has not shipped (`not_implemented`).",
|
|
1642
|
+
"headers": {
|
|
1643
|
+
"Request-Id": {
|
|
1644
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1645
|
+
}
|
|
1646
|
+
},
|
|
1647
|
+
"content": {
|
|
1648
|
+
"application/problem+json": {
|
|
1649
|
+
"schema": {
|
|
1650
|
+
"$ref": "#/components/schemas/Problem"
|
|
1651
|
+
},
|
|
1652
|
+
"example": {
|
|
1653
|
+
"type": "urn:synapsetree:problem:not_implemented",
|
|
1654
|
+
"title": "Not implemented",
|
|
1655
|
+
"status": 501,
|
|
1656
|
+
"code": "not_implemented",
|
|
1657
|
+
"detail": "tokenBudget is not available yet.",
|
|
1658
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
1659
|
+
"retryable": false
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
},
|
|
1664
|
+
"OauthErrorResponse": {
|
|
1665
|
+
"description": "RFC 6749 §5.2 error (or an RFC 8628 §3.5 polling signal). JSON with an\n`error` member — never problem+json.\n",
|
|
1666
|
+
"headers": {
|
|
1667
|
+
"Request-Id": {
|
|
1668
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1669
|
+
}
|
|
1670
|
+
},
|
|
1671
|
+
"content": {
|
|
1672
|
+
"application/json": {
|
|
1673
|
+
"schema": {
|
|
1674
|
+
"$ref": "#/components/schemas/OauthErrorBody"
|
|
1675
|
+
},
|
|
1676
|
+
"examples": {
|
|
1677
|
+
"authorization_pending": {
|
|
1678
|
+
"value": {
|
|
1679
|
+
"error": "authorization_pending",
|
|
1680
|
+
"error_description": "The claim is awaiting human approval.",
|
|
1681
|
+
"interval": 5
|
|
1682
|
+
}
|
|
1683
|
+
},
|
|
1684
|
+
"slow_down": {
|
|
1685
|
+
"value": {
|
|
1686
|
+
"error": "slow_down",
|
|
1687
|
+
"error_description": "Polling faster than the granted interval."
|
|
1688
|
+
}
|
|
1689
|
+
},
|
|
1690
|
+
"invalid_grant": {
|
|
1691
|
+
"value": {
|
|
1692
|
+
"error": "invalid_grant",
|
|
1693
|
+
"error_description": "The claim grant is expired, unknown, or already redeemed."
|
|
1694
|
+
}
|
|
1695
|
+
},
|
|
1696
|
+
"key_limit_reached": {
|
|
1697
|
+
"value": {
|
|
1698
|
+
"error": "key_limit_reached",
|
|
1699
|
+
"error_description": "The organization already holds the maximum number of live agent keys."
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
},
|
|
1706
|
+
"OauthServerError": {
|
|
1707
|
+
"description": "A transient provisioning failure with the claim grant still\nredeemable. RFC 6749 §5.2 `server_error` — retry with the same grant.\n",
|
|
1708
|
+
"headers": {
|
|
1709
|
+
"Request-Id": {
|
|
1710
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1711
|
+
}
|
|
1712
|
+
},
|
|
1713
|
+
"content": {
|
|
1714
|
+
"application/json": {
|
|
1715
|
+
"schema": {
|
|
1716
|
+
"$ref": "#/components/schemas/OauthErrorBody"
|
|
1717
|
+
},
|
|
1718
|
+
"example": {
|
|
1719
|
+
"error": "server_error",
|
|
1720
|
+
"error_description": "Provisioning failed transiently; retry with the same claim grant."
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
},
|
|
1725
|
+
"PayloadTooLarge": {
|
|
1726
|
+
"description": "The request body is over the limit for this operation (`payload_too_large`).",
|
|
1727
|
+
"headers": {
|
|
1728
|
+
"Request-Id": {
|
|
1729
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1730
|
+
}
|
|
1731
|
+
},
|
|
1732
|
+
"content": {
|
|
1733
|
+
"application/problem+json": {
|
|
1734
|
+
"schema": {
|
|
1735
|
+
"$ref": "#/components/schemas/Problem"
|
|
1736
|
+
},
|
|
1737
|
+
"example": {
|
|
1738
|
+
"type": "urn:synapsetree:problem:payload_too_large",
|
|
1739
|
+
"title": "Payload too large",
|
|
1740
|
+
"status": 413,
|
|
1741
|
+
"code": "payload_too_large",
|
|
1742
|
+
"detail": "Request bodies are limited to 1 MiB.",
|
|
1743
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
1744
|
+
"retryable": false
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
},
|
|
1749
|
+
"PaymentRequired": {
|
|
1750
|
+
"description": "The organization's paid subscription is not active (`subscription_inactive`). Reads still work.",
|
|
1751
|
+
"headers": {
|
|
1752
|
+
"Request-Id": {
|
|
1753
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1754
|
+
}
|
|
1755
|
+
},
|
|
1756
|
+
"content": {
|
|
1757
|
+
"application/problem+json": {
|
|
1758
|
+
"schema": {
|
|
1759
|
+
"$ref": "#/components/schemas/Problem"
|
|
1760
|
+
},
|
|
1761
|
+
"example": {
|
|
1762
|
+
"type": "urn:synapsetree:problem:subscription_inactive",
|
|
1763
|
+
"title": "Subscription inactive",
|
|
1764
|
+
"status": 402,
|
|
1765
|
+
"code": "subscription_inactive",
|
|
1766
|
+
"detail": "The organization's subscription is canceled; writes are disabled.",
|
|
1767
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
1768
|
+
"retryable": false
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
"QuotaExceeded": {
|
|
1774
|
+
"description": "The email already has the maximum number of outstanding claim tokens (`quota_exceeded`).",
|
|
1775
|
+
"headers": {
|
|
1776
|
+
"Request-Id": {
|
|
1777
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
"content": {
|
|
1781
|
+
"application/problem+json": {
|
|
1782
|
+
"schema": {
|
|
1783
|
+
"$ref": "#/components/schemas/Problem"
|
|
1784
|
+
},
|
|
1785
|
+
"example": {
|
|
1786
|
+
"type": "urn:synapsetree:problem:quota_exceeded",
|
|
1787
|
+
"title": "Quota exceeded",
|
|
1788
|
+
"status": 403,
|
|
1789
|
+
"code": "quota_exceeded",
|
|
1790
|
+
"detail": "This email already has the maximum number of pending claim tokens.",
|
|
1791
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
1792
|
+
"retryable": false
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
},
|
|
1797
|
+
"ServiceUnavailable": {
|
|
1798
|
+
"description": "Temporarily unavailable: `unavailable` (tenant cold start or writer handoff) or `fenced`\n(the writer lost its lease; the write did not commit). Safe to retry.\n",
|
|
1799
|
+
"headers": {
|
|
1800
|
+
"Request-Id": {
|
|
1801
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1802
|
+
},
|
|
1803
|
+
"Retry-After": {
|
|
1804
|
+
"$ref": "#/components/headers/Retry-After"
|
|
1805
|
+
}
|
|
1806
|
+
},
|
|
1807
|
+
"content": {
|
|
1808
|
+
"application/problem+json": {
|
|
1809
|
+
"schema": {
|
|
1810
|
+
"$ref": "#/components/schemas/Problem"
|
|
1811
|
+
},
|
|
1812
|
+
"example": {
|
|
1813
|
+
"type": "urn:synapsetree:problem:fenced",
|
|
1814
|
+
"title": "Writer fenced",
|
|
1815
|
+
"status": 503,
|
|
1816
|
+
"code": "fenced",
|
|
1817
|
+
"detail": "The write did not commit; retry.",
|
|
1818
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
1819
|
+
"retryable": true,
|
|
1820
|
+
"retryAfterSeconds": 1
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
},
|
|
1825
|
+
"TooManyRequests": {
|
|
1826
|
+
"description": "Rate limit exceeded (`rate_limited`).",
|
|
1827
|
+
"headers": {
|
|
1828
|
+
"Request-Id": {
|
|
1829
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1830
|
+
},
|
|
1831
|
+
"Retry-After": {
|
|
1832
|
+
"$ref": "#/components/headers/Retry-After"
|
|
1833
|
+
},
|
|
1834
|
+
"RateLimit-Policy": {
|
|
1835
|
+
"$ref": "#/components/headers/RateLimit-Policy"
|
|
1836
|
+
},
|
|
1837
|
+
"RateLimit": {
|
|
1838
|
+
"$ref": "#/components/headers/RateLimit"
|
|
1839
|
+
}
|
|
1840
|
+
},
|
|
1841
|
+
"content": {
|
|
1842
|
+
"application/problem+json": {
|
|
1843
|
+
"schema": {
|
|
1844
|
+
"$ref": "#/components/schemas/Problem"
|
|
1845
|
+
},
|
|
1846
|
+
"example": {
|
|
1847
|
+
"type": "urn:synapsetree:problem:rate_limited",
|
|
1848
|
+
"title": "Rate limited",
|
|
1849
|
+
"status": 429,
|
|
1850
|
+
"code": "rate_limited",
|
|
1851
|
+
"detail": "Too many requests for this key.",
|
|
1852
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
1853
|
+
"retryable": true,
|
|
1854
|
+
"retryAfterSeconds": 17
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
},
|
|
1859
|
+
"Unauthorized": {
|
|
1860
|
+
"description": "Missing or malformed bearer token. Produced by API Gateway, so the body is the gateway's\nnative shape, not problem+json.\n",
|
|
1861
|
+
"content": {
|
|
1862
|
+
"application/json": {
|
|
1863
|
+
"schema": {
|
|
1864
|
+
"$ref": "#/components/schemas/GatewayError"
|
|
1865
|
+
},
|
|
1866
|
+
"example": {
|
|
1867
|
+
"message": "Unauthorized"
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
},
|
|
1872
|
+
"UnprocessableContent": {
|
|
1873
|
+
"description": "Well-formed but refused: `ontology_violation`, `ingest_failed`,\n`idempotency_key_reused`, or `embedding_dimension_mismatch`.\n",
|
|
1874
|
+
"headers": {
|
|
1875
|
+
"Request-Id": {
|
|
1876
|
+
"$ref": "#/components/headers/Request-Id"
|
|
1877
|
+
}
|
|
1878
|
+
},
|
|
1879
|
+
"content": {
|
|
1880
|
+
"application/problem+json": {
|
|
1881
|
+
"schema": {
|
|
1882
|
+
"$ref": "#/components/schemas/Problem"
|
|
1883
|
+
},
|
|
1884
|
+
"example": {
|
|
1885
|
+
"type": "urn:synapsetree:problem:ontology_violation",
|
|
1886
|
+
"title": "Ontology violation",
|
|
1887
|
+
"status": 422,
|
|
1888
|
+
"code": "ontology_violation",
|
|
1889
|
+
"detail": "Node type \"microservice\" is not in this namespace's strict manifest.",
|
|
1890
|
+
"requestId": "req_01j9xb7c8d9e",
|
|
1891
|
+
"retryable": false,
|
|
1892
|
+
"kind": "node",
|
|
1893
|
+
"ontologyType": "microservice"
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
},
|
|
1899
|
+
"schemas": {
|
|
1900
|
+
"AgentIdentityRequest": {
|
|
1901
|
+
"type": "object",
|
|
1902
|
+
"description": "Who the human behind the agent is. `assertion` carries whatever identity assertion the agent can present (it is logged, never used to change the flow).",
|
|
1903
|
+
"additionalProperties": false,
|
|
1904
|
+
"required": [
|
|
1905
|
+
"email"
|
|
1906
|
+
],
|
|
1907
|
+
"properties": {
|
|
1908
|
+
"email": {
|
|
1909
|
+
"type": "string",
|
|
1910
|
+
"format": "email",
|
|
1911
|
+
"description": "The human's email; the claim link is sent here."
|
|
1912
|
+
},
|
|
1913
|
+
"assertion": {
|
|
1914
|
+
"type": "string",
|
|
1915
|
+
"description": "Optional identity assertion from the agent's provider, parsed and logged for audit only."
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
},
|
|
1919
|
+
"AgentIdentityResponse": {
|
|
1920
|
+
"type": "object",
|
|
1921
|
+
"description": "The pending claim's poll parameters. Byte-equal for known and unknown emails.",
|
|
1922
|
+
"additionalProperties": false,
|
|
1923
|
+
"required": [
|
|
1924
|
+
"claim_token",
|
|
1925
|
+
"user_code",
|
|
1926
|
+
"poll"
|
|
1927
|
+
],
|
|
1928
|
+
"properties": {
|
|
1929
|
+
"claim_token": {
|
|
1930
|
+
"type": "string",
|
|
1931
|
+
"pattern": "^stclaim_[A-Za-z0-9._-]{8,128}$",
|
|
1932
|
+
"description": "The claim grant to present as the OAuth `assertion` at POST /oauth2/token."
|
|
1933
|
+
},
|
|
1934
|
+
"user_code": {
|
|
1935
|
+
"type": "string",
|
|
1936
|
+
"pattern": "^[0-9]{6}$",
|
|
1937
|
+
"description": "Six-digit code the human confirms on the consent interstitial."
|
|
1938
|
+
},
|
|
1939
|
+
"poll": {
|
|
1940
|
+
"$ref": "#/components/schemas/PollGrant"
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
},
|
|
1944
|
+
"ChunkExtraction": {
|
|
1945
|
+
"type": "object",
|
|
1946
|
+
"description": "One chunk's model output, as described by the plan's `outputSchema`.",
|
|
1947
|
+
"additionalProperties": false,
|
|
1948
|
+
"required": [
|
|
1949
|
+
"facts",
|
|
1950
|
+
"tasks"
|
|
1951
|
+
],
|
|
1952
|
+
"properties": {
|
|
1953
|
+
"facts": {
|
|
1954
|
+
"type": "array",
|
|
1955
|
+
"maxItems": 200,
|
|
1956
|
+
"items": {
|
|
1957
|
+
"$ref": "#/components/schemas/ExtractedFact"
|
|
1958
|
+
}
|
|
1959
|
+
},
|
|
1960
|
+
"tasks": {
|
|
1961
|
+
"type": "array",
|
|
1962
|
+
"maxItems": 100,
|
|
1963
|
+
"items": {
|
|
1964
|
+
"$ref": "#/components/schemas/ExtractedTask"
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
},
|
|
1969
|
+
"ChunkFailure": {
|
|
1970
|
+
"type": "object",
|
|
1971
|
+
"additionalProperties": false,
|
|
1972
|
+
"required": [
|
|
1973
|
+
"chunkIndex",
|
|
1974
|
+
"reason"
|
|
1975
|
+
],
|
|
1976
|
+
"properties": {
|
|
1977
|
+
"chunkIndex": {
|
|
1978
|
+
"type": "integer",
|
|
1979
|
+
"minimum": 0
|
|
1980
|
+
},
|
|
1981
|
+
"reason": {
|
|
1982
|
+
"type": "string",
|
|
1983
|
+
"enum": [
|
|
1984
|
+
"parse",
|
|
1985
|
+
"llm",
|
|
1986
|
+
"schema"
|
|
1987
|
+
],
|
|
1988
|
+
"description": "Why the chunk was not ingested. Messages never include content."
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
},
|
|
1992
|
+
"ChunkResult": {
|
|
1993
|
+
"type": "object",
|
|
1994
|
+
"additionalProperties": false,
|
|
1995
|
+
"required": [
|
|
1996
|
+
"index",
|
|
1997
|
+
"response"
|
|
1998
|
+
],
|
|
1999
|
+
"properties": {
|
|
2000
|
+
"index": {
|
|
2001
|
+
"type": "integer",
|
|
2002
|
+
"minimum": 0,
|
|
2003
|
+
"description": "The chunk's position in the plan's chunking of the source."
|
|
2004
|
+
},
|
|
2005
|
+
"response": {
|
|
2006
|
+
"$ref": "#/components/schemas/ChunkExtraction"
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
},
|
|
2010
|
+
"Chunking": {
|
|
2011
|
+
"type": "object",
|
|
2012
|
+
"additionalProperties": false,
|
|
2013
|
+
"required": [
|
|
2014
|
+
"maxChunkLength",
|
|
2015
|
+
"chunkOverlap"
|
|
2016
|
+
],
|
|
2017
|
+
"properties": {
|
|
2018
|
+
"maxChunkLength": {
|
|
2019
|
+
"type": "integer",
|
|
2020
|
+
"minimum": 2,
|
|
2021
|
+
"maximum": 100000
|
|
2022
|
+
},
|
|
2023
|
+
"chunkOverlap": {
|
|
2024
|
+
"type": "integer",
|
|
2025
|
+
"minimum": 0,
|
|
2026
|
+
"maximum": 99999
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
},
|
|
2030
|
+
"ClaimGrantRequest": {
|
|
2031
|
+
"type": "object",
|
|
2032
|
+
"description": "Form-urlencoded claim-grant poll body (RFC 8628-style poll with an\nRFC 7523 jwt-bearer-shaped assertion).\n",
|
|
2033
|
+
"additionalProperties": false,
|
|
2034
|
+
"required": [
|
|
2035
|
+
"grant_type",
|
|
2036
|
+
"assertion"
|
|
2037
|
+
],
|
|
2038
|
+
"properties": {
|
|
2039
|
+
"grant_type": {
|
|
2040
|
+
"type": "string",
|
|
2041
|
+
"const": "urn:synapsetree:claim",
|
|
2042
|
+
"description": "The claim-grant flow's only grant type."
|
|
2043
|
+
},
|
|
2044
|
+
"assertion": {
|
|
2045
|
+
"type": "string",
|
|
2046
|
+
"pattern": "^stclaim_[A-Za-z0-9._-]{8,128}$",
|
|
2047
|
+
"description": "The `stclaim_…` claim token from POST /agent/identity."
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
},
|
|
2051
|
+
"ClientExtractionIngest": {
|
|
2052
|
+
"type": "object",
|
|
2053
|
+
"additionalProperties": false,
|
|
2054
|
+
"required": [
|
|
2055
|
+
"mode",
|
|
2056
|
+
"namespace",
|
|
2057
|
+
"sourceRef",
|
|
2058
|
+
"sourceHash",
|
|
2059
|
+
"planFingerprint",
|
|
2060
|
+
"chunks"
|
|
2061
|
+
],
|
|
2062
|
+
"properties": {
|
|
2063
|
+
"mode": {
|
|
2064
|
+
"type": "string",
|
|
2065
|
+
"const": "client_extraction"
|
|
2066
|
+
},
|
|
2067
|
+
"namespace": {
|
|
2068
|
+
"$ref": "#/components/schemas/Namespace"
|
|
2069
|
+
},
|
|
2070
|
+
"sourceRef": {
|
|
2071
|
+
"$ref": "#/components/schemas/SourceRef"
|
|
2072
|
+
},
|
|
2073
|
+
"sourceHash": {
|
|
2074
|
+
"$ref": "#/components/schemas/SourceHash"
|
|
2075
|
+
},
|
|
2076
|
+
"planFingerprint": {
|
|
2077
|
+
"$ref": "#/components/schemas/PlanFingerprint"
|
|
2078
|
+
},
|
|
2079
|
+
"onDuplicateHash": {
|
|
2080
|
+
"$ref": "#/components/schemas/OnDuplicateHash"
|
|
2081
|
+
},
|
|
2082
|
+
"chunks": {
|
|
2083
|
+
"type": "array",
|
|
2084
|
+
"minItems": 1,
|
|
2085
|
+
"maxItems": 1000,
|
|
2086
|
+
"items": {
|
|
2087
|
+
"$ref": "#/components/schemas/ChunkResult"
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
},
|
|
2092
|
+
"Confidence": {
|
|
2093
|
+
"type": "string",
|
|
2094
|
+
"enum": [
|
|
2095
|
+
"certain",
|
|
2096
|
+
"inferred",
|
|
2097
|
+
"tentative"
|
|
2098
|
+
]
|
|
2099
|
+
},
|
|
2100
|
+
"CreateEventRequest": {
|
|
2101
|
+
"type": "object",
|
|
2102
|
+
"additionalProperties": false,
|
|
2103
|
+
"required": [
|
|
2104
|
+
"namespace",
|
|
2105
|
+
"eventType",
|
|
2106
|
+
"summary"
|
|
2107
|
+
],
|
|
2108
|
+
"properties": {
|
|
2109
|
+
"namespace": {
|
|
2110
|
+
"$ref": "#/components/schemas/Namespace"
|
|
2111
|
+
},
|
|
2112
|
+
"eventType": {
|
|
2113
|
+
"$ref": "#/components/schemas/EventType"
|
|
2114
|
+
},
|
|
2115
|
+
"summary": {
|
|
2116
|
+
"type": "string",
|
|
2117
|
+
"minLength": 1,
|
|
2118
|
+
"maxLength": 4000,
|
|
2119
|
+
"description": "Trimmed of surrounding whitespace, then at most 4000 UTF-16 code units (the engine's limit; JSON Schema's maxLength counts code points, so astral characters count twice). Narrowed from 8000 by the dated 2026-11-01 D12 exception."
|
|
2120
|
+
},
|
|
2121
|
+
"relatedFactId": {
|
|
2122
|
+
"$ref": "#/components/schemas/FactId"
|
|
2123
|
+
},
|
|
2124
|
+
"occurredAt": {
|
|
2125
|
+
"description": "When it happened. Defaults to now.",
|
|
2126
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
},
|
|
2130
|
+
"Cursor": {
|
|
2131
|
+
"type": "string",
|
|
2132
|
+
"description": "Opaque pagination cursor.",
|
|
2133
|
+
"minLength": 1,
|
|
2134
|
+
"maxLength": 512,
|
|
2135
|
+
"examples": [
|
|
2136
|
+
"c_eyJrIjoiZG9jc19fcnVuYm9vay5tZCJ9.k3Jf"
|
|
2137
|
+
]
|
|
2138
|
+
},
|
|
2139
|
+
"Direction": {
|
|
2140
|
+
"type": "string",
|
|
2141
|
+
"enum": [
|
|
2142
|
+
"inbound",
|
|
2143
|
+
"outbound",
|
|
2144
|
+
"both"
|
|
2145
|
+
]
|
|
2146
|
+
},
|
|
2147
|
+
"Edge": {
|
|
2148
|
+
"type": "object",
|
|
2149
|
+
"additionalProperties": false,
|
|
2150
|
+
"required": [
|
|
2151
|
+
"id",
|
|
2152
|
+
"namespace",
|
|
2153
|
+
"sourceId",
|
|
2154
|
+
"targetId",
|
|
2155
|
+
"edgeType",
|
|
2156
|
+
"createdAt"
|
|
2157
|
+
],
|
|
2158
|
+
"properties": {
|
|
2159
|
+
"id": {
|
|
2160
|
+
"type": "string",
|
|
2161
|
+
"minLength": 1,
|
|
2162
|
+
"maxLength": 255
|
|
2163
|
+
},
|
|
2164
|
+
"namespace": {
|
|
2165
|
+
"$ref": "#/components/schemas/Namespace"
|
|
2166
|
+
},
|
|
2167
|
+
"sourceId": {
|
|
2168
|
+
"$ref": "#/components/schemas/FactId"
|
|
2169
|
+
},
|
|
2170
|
+
"targetId": {
|
|
2171
|
+
"$ref": "#/components/schemas/FactId"
|
|
2172
|
+
},
|
|
2173
|
+
"edgeType": {
|
|
2174
|
+
"$ref": "#/components/schemas/EdgeType"
|
|
2175
|
+
},
|
|
2176
|
+
"createdAt": {
|
|
2177
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
2178
|
+
}
|
|
2179
|
+
}
|
|
2180
|
+
},
|
|
2181
|
+
"EdgeType": {
|
|
2182
|
+
"description": "Edge type. Open, like OkfType; the listed values are the schema-software-org edges.",
|
|
2183
|
+
"anyOf": [
|
|
2184
|
+
{
|
|
2185
|
+
"type": "string",
|
|
2186
|
+
"enum": [
|
|
2187
|
+
"knows",
|
|
2188
|
+
"spouse",
|
|
2189
|
+
"parent",
|
|
2190
|
+
"worksFor",
|
|
2191
|
+
"memberOf",
|
|
2192
|
+
"homeLocation",
|
|
2193
|
+
"workLocation",
|
|
2194
|
+
"location",
|
|
2195
|
+
"containedInPlace",
|
|
2196
|
+
"subOrganization",
|
|
2197
|
+
"object",
|
|
2198
|
+
"agent",
|
|
2199
|
+
"attendee",
|
|
2200
|
+
"organizer",
|
|
2201
|
+
"author",
|
|
2202
|
+
"publisher",
|
|
2203
|
+
"about",
|
|
2204
|
+
"itemReviewed",
|
|
2205
|
+
"owns",
|
|
2206
|
+
"dependsOn",
|
|
2207
|
+
"specifies",
|
|
2208
|
+
"documents",
|
|
2209
|
+
"handoffFor",
|
|
2210
|
+
"supersedes",
|
|
2211
|
+
"hasRole",
|
|
2212
|
+
"operates",
|
|
2213
|
+
"provides",
|
|
2214
|
+
"maintains"
|
|
2215
|
+
]
|
|
2216
|
+
},
|
|
2217
|
+
{
|
|
2218
|
+
"type": "string",
|
|
2219
|
+
"minLength": 1,
|
|
2220
|
+
"maxLength": 128
|
|
2221
|
+
}
|
|
2222
|
+
]
|
|
2223
|
+
},
|
|
2224
|
+
"Embedding": {
|
|
2225
|
+
"type": "array",
|
|
2226
|
+
"description": "A client-computed embedding vector. All vectors in a namespace must share one model and\ndimension; a different dimension is refused with `422 embedding_dimension_mismatch`.\n",
|
|
2227
|
+
"minItems": 1,
|
|
2228
|
+
"maxItems": 8192,
|
|
2229
|
+
"items": {
|
|
2230
|
+
"type": "number"
|
|
2231
|
+
},
|
|
2232
|
+
"examples": [
|
|
2233
|
+
[
|
|
2234
|
+
0.0123,
|
|
2235
|
+
-0.0456,
|
|
2236
|
+
0.0789
|
|
2237
|
+
]
|
|
2238
|
+
]
|
|
2239
|
+
},
|
|
2240
|
+
"Event": {
|
|
2241
|
+
"type": "object",
|
|
2242
|
+
"additionalProperties": false,
|
|
2243
|
+
"required": [
|
|
2244
|
+
"id",
|
|
2245
|
+
"namespace",
|
|
2246
|
+
"eventType",
|
|
2247
|
+
"summary",
|
|
2248
|
+
"relatedFactId",
|
|
2249
|
+
"occurredAt",
|
|
2250
|
+
"createdAt"
|
|
2251
|
+
],
|
|
2252
|
+
"properties": {
|
|
2253
|
+
"id": {
|
|
2254
|
+
"type": "string",
|
|
2255
|
+
"minLength": 1,
|
|
2256
|
+
"maxLength": 255
|
|
2257
|
+
},
|
|
2258
|
+
"namespace": {
|
|
2259
|
+
"$ref": "#/components/schemas/Namespace"
|
|
2260
|
+
},
|
|
2261
|
+
"eventType": {
|
|
2262
|
+
"$ref": "#/components/schemas/EventType"
|
|
2263
|
+
},
|
|
2264
|
+
"summary": {
|
|
2265
|
+
"type": "string",
|
|
2266
|
+
"minLength": 1,
|
|
2267
|
+
"maxLength": 8000
|
|
2268
|
+
},
|
|
2269
|
+
"relatedFactId": {
|
|
2270
|
+
"anyOf": [
|
|
2271
|
+
{
|
|
2272
|
+
"$ref": "#/components/schemas/FactId"
|
|
2273
|
+
},
|
|
2274
|
+
{
|
|
2275
|
+
"type": "null"
|
|
2276
|
+
}
|
|
2277
|
+
]
|
|
2278
|
+
},
|
|
2279
|
+
"occurredAt": {
|
|
2280
|
+
"description": "When the event happened. Null means at `createdAt`.",
|
|
2281
|
+
"anyOf": [
|
|
2282
|
+
{
|
|
2283
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
"type": "null"
|
|
2287
|
+
}
|
|
2288
|
+
]
|
|
2289
|
+
},
|
|
2290
|
+
"createdAt": {
|
|
2291
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
},
|
|
2295
|
+
"EventType": {
|
|
2296
|
+
"type": "string",
|
|
2297
|
+
"enum": [
|
|
2298
|
+
"observation",
|
|
2299
|
+
"decision",
|
|
2300
|
+
"action",
|
|
2301
|
+
"outcome"
|
|
2302
|
+
]
|
|
2303
|
+
},
|
|
2304
|
+
"ExistingFactReplacement": {
|
|
2305
|
+
"type": "object",
|
|
2306
|
+
"additionalProperties": false,
|
|
2307
|
+
"required": [
|
|
2308
|
+
"kind",
|
|
2309
|
+
"factId"
|
|
2310
|
+
],
|
|
2311
|
+
"properties": {
|
|
2312
|
+
"kind": {
|
|
2313
|
+
"type": "string",
|
|
2314
|
+
"const": "existing"
|
|
2315
|
+
},
|
|
2316
|
+
"factId": {
|
|
2317
|
+
"$ref": "#/components/schemas/FactId"
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
},
|
|
2321
|
+
"ExtractedEdge": {
|
|
2322
|
+
"type": "object",
|
|
2323
|
+
"additionalProperties": false,
|
|
2324
|
+
"required": [
|
|
2325
|
+
"edgeType",
|
|
2326
|
+
"targetTitle"
|
|
2327
|
+
],
|
|
2328
|
+
"properties": {
|
|
2329
|
+
"edgeType": {
|
|
2330
|
+
"$ref": "#/components/schemas/EdgeType"
|
|
2331
|
+
},
|
|
2332
|
+
"targetTitle": {
|
|
2333
|
+
"type": "string",
|
|
2334
|
+
"minLength": 1,
|
|
2335
|
+
"maxLength": 1000,
|
|
2336
|
+
"description": "Title of another fact in this response or already in the namespace."
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
},
|
|
2340
|
+
"ExtractedFact": {
|
|
2341
|
+
"type": "object",
|
|
2342
|
+
"additionalProperties": false,
|
|
2343
|
+
"required": [
|
|
2344
|
+
"title",
|
|
2345
|
+
"body",
|
|
2346
|
+
"tags",
|
|
2347
|
+
"confidence"
|
|
2348
|
+
],
|
|
2349
|
+
"properties": {
|
|
2350
|
+
"title": {
|
|
2351
|
+
"type": "string",
|
|
2352
|
+
"minLength": 1,
|
|
2353
|
+
"maxLength": 1000
|
|
2354
|
+
},
|
|
2355
|
+
"body": {
|
|
2356
|
+
"type": "string",
|
|
2357
|
+
"minLength": 1,
|
|
2358
|
+
"maxLength": 100000
|
|
2359
|
+
},
|
|
2360
|
+
"tags": {
|
|
2361
|
+
"type": "array",
|
|
2362
|
+
"maxItems": 100,
|
|
2363
|
+
"items": {
|
|
2364
|
+
"type": "string",
|
|
2365
|
+
"minLength": 1,
|
|
2366
|
+
"maxLength": 100
|
|
2367
|
+
}
|
|
2368
|
+
},
|
|
2369
|
+
"confidence": {
|
|
2370
|
+
"$ref": "#/components/schemas/Confidence"
|
|
2371
|
+
},
|
|
2372
|
+
"okfType": {
|
|
2373
|
+
"$ref": "#/components/schemas/OkfType"
|
|
2374
|
+
},
|
|
2375
|
+
"evidence": {
|
|
2376
|
+
"type": "array",
|
|
2377
|
+
"description": "Quotes copied from the chunk, checked when grounding is on. Never stored.",
|
|
2378
|
+
"maxItems": 10,
|
|
2379
|
+
"items": {
|
|
2380
|
+
"type": "string",
|
|
2381
|
+
"minLength": 1,
|
|
2382
|
+
"maxLength": 2000
|
|
2383
|
+
}
|
|
2384
|
+
},
|
|
2385
|
+
"edges": {
|
|
2386
|
+
"type": "array",
|
|
2387
|
+
"maxItems": 50,
|
|
2388
|
+
"items": {
|
|
2389
|
+
"$ref": "#/components/schemas/ExtractedEdge"
|
|
2390
|
+
}
|
|
2391
|
+
},
|
|
2392
|
+
"embedding": {
|
|
2393
|
+
"$ref": "#/components/schemas/Embedding"
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
},
|
|
2397
|
+
"ExtractedTask": {
|
|
2398
|
+
"type": "object",
|
|
2399
|
+
"additionalProperties": false,
|
|
2400
|
+
"required": [
|
|
2401
|
+
"description",
|
|
2402
|
+
"priority"
|
|
2403
|
+
],
|
|
2404
|
+
"properties": {
|
|
2405
|
+
"description": {
|
|
2406
|
+
"type": "string",
|
|
2407
|
+
"minLength": 1,
|
|
2408
|
+
"maxLength": 4000
|
|
2409
|
+
},
|
|
2410
|
+
"priority": {
|
|
2411
|
+
"type": "integer",
|
|
2412
|
+
"minimum": 0,
|
|
2413
|
+
"maximum": 10
|
|
2414
|
+
}
|
|
2415
|
+
}
|
|
2416
|
+
},
|
|
2417
|
+
"Fact": {
|
|
2418
|
+
"description": "A fact, discriminated by `sourceType`.",
|
|
2419
|
+
"oneOf": [
|
|
2420
|
+
{
|
|
2421
|
+
"$ref": "#/components/schemas/ImmutableDocumentFact"
|
|
2422
|
+
},
|
|
2423
|
+
{
|
|
2424
|
+
"$ref": "#/components/schemas/LibrarianInferredFact"
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
"$ref": "#/components/schemas/UserStatedFact"
|
|
2428
|
+
},
|
|
2429
|
+
{
|
|
2430
|
+
"$ref": "#/components/schemas/UserConfirmedFact"
|
|
2431
|
+
}
|
|
2432
|
+
],
|
|
2433
|
+
"discriminator": {
|
|
2434
|
+
"propertyName": "sourceType",
|
|
2435
|
+
"mapping": {
|
|
2436
|
+
"immutable_document": "#/components/schemas/ImmutableDocumentFact",
|
|
2437
|
+
"librarian_inferred": "#/components/schemas/LibrarianInferredFact",
|
|
2438
|
+
"user_stated": "#/components/schemas/UserStatedFact",
|
|
2439
|
+
"user_confirmed": "#/components/schemas/UserConfirmedFact"
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
},
|
|
2443
|
+
"FactBase": {
|
|
2444
|
+
"type": "object",
|
|
2445
|
+
"description": "Fields shared by every fact. Not used on its own; see `Fact`.",
|
|
2446
|
+
"required": [
|
|
2447
|
+
"id",
|
|
2448
|
+
"namespace",
|
|
2449
|
+
"title",
|
|
2450
|
+
"body",
|
|
2451
|
+
"tags",
|
|
2452
|
+
"confidence",
|
|
2453
|
+
"okfType",
|
|
2454
|
+
"lifecycleStatus",
|
|
2455
|
+
"trustTier",
|
|
2456
|
+
"isStale",
|
|
2457
|
+
"generatedBy",
|
|
2458
|
+
"lastVerifiedAt",
|
|
2459
|
+
"lastVerifiedBy",
|
|
2460
|
+
"validFrom",
|
|
2461
|
+
"validTo",
|
|
2462
|
+
"supersededBy",
|
|
2463
|
+
"supersededAt",
|
|
2464
|
+
"accessCount",
|
|
2465
|
+
"lastAccessedAt",
|
|
2466
|
+
"createdAt",
|
|
2467
|
+
"updatedAt"
|
|
2468
|
+
],
|
|
2469
|
+
"properties": {
|
|
2470
|
+
"id": {
|
|
2471
|
+
"$ref": "#/components/schemas/FactId"
|
|
2472
|
+
},
|
|
2473
|
+
"namespace": {
|
|
2474
|
+
"$ref": "#/components/schemas/Namespace"
|
|
2475
|
+
},
|
|
2476
|
+
"title": {
|
|
2477
|
+
"type": "string",
|
|
2478
|
+
"minLength": 1,
|
|
2479
|
+
"maxLength": 1000
|
|
2480
|
+
},
|
|
2481
|
+
"body": {
|
|
2482
|
+
"type": "string",
|
|
2483
|
+
"maxLength": 100000
|
|
2484
|
+
},
|
|
2485
|
+
"tags": {
|
|
2486
|
+
"type": "array",
|
|
2487
|
+
"maxItems": 100,
|
|
2488
|
+
"items": {
|
|
2489
|
+
"type": "string",
|
|
2490
|
+
"minLength": 1,
|
|
2491
|
+
"maxLength": 100
|
|
2492
|
+
}
|
|
2493
|
+
},
|
|
2494
|
+
"confidence": {
|
|
2495
|
+
"$ref": "#/components/schemas/Confidence"
|
|
2496
|
+
},
|
|
2497
|
+
"okfType": {
|
|
2498
|
+
"description": "Ontology node type, or null when untyped.",
|
|
2499
|
+
"anyOf": [
|
|
2500
|
+
{
|
|
2501
|
+
"$ref": "#/components/schemas/OkfType"
|
|
2502
|
+
},
|
|
2503
|
+
{
|
|
2504
|
+
"type": "null"
|
|
2505
|
+
}
|
|
2506
|
+
]
|
|
2507
|
+
},
|
|
2508
|
+
"lifecycleStatus": {
|
|
2509
|
+
"$ref": "#/components/schemas/LifecycleStatus"
|
|
2510
|
+
},
|
|
2511
|
+
"trustTier": {
|
|
2512
|
+
"$ref": "#/components/schemas/TrustTier"
|
|
2513
|
+
},
|
|
2514
|
+
"isStale": {
|
|
2515
|
+
"type": "boolean"
|
|
2516
|
+
},
|
|
2517
|
+
"generatedBy": {
|
|
2518
|
+
"type": [
|
|
2519
|
+
"string",
|
|
2520
|
+
"null"
|
|
2521
|
+
],
|
|
2522
|
+
"maxLength": 256,
|
|
2523
|
+
"description": "Producing actor, e.g. `process:librarian` or `human:kurt`."
|
|
2524
|
+
},
|
|
2525
|
+
"lastVerifiedAt": {
|
|
2526
|
+
"anyOf": [
|
|
2527
|
+
{
|
|
2528
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
2529
|
+
},
|
|
2530
|
+
{
|
|
2531
|
+
"type": "null"
|
|
2532
|
+
}
|
|
2533
|
+
]
|
|
2534
|
+
},
|
|
2535
|
+
"lastVerifiedBy": {
|
|
2536
|
+
"type": [
|
|
2537
|
+
"string",
|
|
2538
|
+
"null"
|
|
2539
|
+
],
|
|
2540
|
+
"maxLength": 256
|
|
2541
|
+
},
|
|
2542
|
+
"validFrom": {
|
|
2543
|
+
"description": "When the fact became true in the world. Null means since `createdAt`.",
|
|
2544
|
+
"anyOf": [
|
|
2545
|
+
{
|
|
2546
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
2547
|
+
},
|
|
2548
|
+
{
|
|
2549
|
+
"type": "null"
|
|
2550
|
+
}
|
|
2551
|
+
]
|
|
2552
|
+
},
|
|
2553
|
+
"validTo": {
|
|
2554
|
+
"description": "When the fact stopped being true. Null means still current.",
|
|
2555
|
+
"anyOf": [
|
|
2556
|
+
{
|
|
2557
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
2558
|
+
},
|
|
2559
|
+
{
|
|
2560
|
+
"type": "null"
|
|
2561
|
+
}
|
|
2562
|
+
]
|
|
2563
|
+
},
|
|
2564
|
+
"supersededBy": {
|
|
2565
|
+
"description": "The fact that replaced this one.",
|
|
2566
|
+
"anyOf": [
|
|
2567
|
+
{
|
|
2568
|
+
"$ref": "#/components/schemas/FactId"
|
|
2569
|
+
},
|
|
2570
|
+
{
|
|
2571
|
+
"type": "null"
|
|
2572
|
+
}
|
|
2573
|
+
]
|
|
2574
|
+
},
|
|
2575
|
+
"supersededAt": {
|
|
2576
|
+
"description": "When the replacement was recorded.",
|
|
2577
|
+
"anyOf": [
|
|
2578
|
+
{
|
|
2579
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
2580
|
+
},
|
|
2581
|
+
{
|
|
2582
|
+
"type": "null"
|
|
2583
|
+
}
|
|
2584
|
+
]
|
|
2585
|
+
},
|
|
2586
|
+
"accessCount": {
|
|
2587
|
+
"type": "integer",
|
|
2588
|
+
"minimum": 0
|
|
2589
|
+
},
|
|
2590
|
+
"lastAccessedAt": {
|
|
2591
|
+
"anyOf": [
|
|
2592
|
+
{
|
|
2593
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
2594
|
+
},
|
|
2595
|
+
{
|
|
2596
|
+
"type": "null"
|
|
2597
|
+
}
|
|
2598
|
+
]
|
|
2599
|
+
},
|
|
2600
|
+
"createdAt": {
|
|
2601
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
2602
|
+
},
|
|
2603
|
+
"updatedAt": {
|
|
2604
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
},
|
|
2608
|
+
"FactId": {
|
|
2609
|
+
"type": "string",
|
|
2610
|
+
"description": "An opaque fact id. Engine-generated ids start with `fact_`; graph node ids are caller-chosen.",
|
|
2611
|
+
"minLength": 1,
|
|
2612
|
+
"maxLength": 255,
|
|
2613
|
+
"examples": [
|
|
2614
|
+
"fact_01j9x7k2m3"
|
|
2615
|
+
]
|
|
2616
|
+
},
|
|
2617
|
+
"GatewayError": {
|
|
2618
|
+
"type": "object",
|
|
2619
|
+
"description": "API Gateway's native error body (authorizer denials). Not problem+json.",
|
|
2620
|
+
"additionalProperties": false,
|
|
2621
|
+
"required": [
|
|
2622
|
+
"message"
|
|
2623
|
+
],
|
|
2624
|
+
"properties": {
|
|
2625
|
+
"message": {
|
|
2626
|
+
"type": "string"
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2629
|
+
},
|
|
2630
|
+
"ImmutableDocumentFact": {
|
|
2631
|
+
"type": "object",
|
|
2632
|
+
"description": "A fact extracted from or written for a source document. Changes only by re-ingesting the source.",
|
|
2633
|
+
"allOf": [
|
|
2634
|
+
{
|
|
2635
|
+
"$ref": "#/components/schemas/FactBase"
|
|
2636
|
+
},
|
|
2637
|
+
{
|
|
2638
|
+
"type": "object",
|
|
2639
|
+
"required": [
|
|
2640
|
+
"sourceType",
|
|
2641
|
+
"mutable",
|
|
2642
|
+
"sourceRef",
|
|
2643
|
+
"sourceHash"
|
|
2644
|
+
],
|
|
2645
|
+
"properties": {
|
|
2646
|
+
"sourceType": {
|
|
2647
|
+
"type": "string",
|
|
2648
|
+
"const": "immutable_document"
|
|
2649
|
+
},
|
|
2650
|
+
"mutable": {
|
|
2651
|
+
"type": "boolean",
|
|
2652
|
+
"const": false
|
|
2653
|
+
},
|
|
2654
|
+
"sourceRef": {
|
|
2655
|
+
"$ref": "#/components/schemas/SourceRef"
|
|
2656
|
+
},
|
|
2657
|
+
"sourceHash": {
|
|
2658
|
+
"description": "Null after a partially failed ingest; re-ingest to complete it.",
|
|
2659
|
+
"anyOf": [
|
|
2660
|
+
{
|
|
2661
|
+
"$ref": "#/components/schemas/SourceHash"
|
|
2662
|
+
},
|
|
2663
|
+
{
|
|
2664
|
+
"type": "null"
|
|
2665
|
+
}
|
|
2666
|
+
]
|
|
2667
|
+
}
|
|
2668
|
+
}
|
|
2669
|
+
}
|
|
2670
|
+
],
|
|
2671
|
+
"unevaluatedProperties": false
|
|
2672
|
+
},
|
|
2673
|
+
"IngestRequest": {
|
|
2674
|
+
"oneOf": [
|
|
2675
|
+
{
|
|
2676
|
+
"$ref": "#/components/schemas/ServerExtractionIngest"
|
|
2677
|
+
},
|
|
2678
|
+
{
|
|
2679
|
+
"$ref": "#/components/schemas/ClientExtractionIngest"
|
|
2680
|
+
}
|
|
2681
|
+
],
|
|
2682
|
+
"discriminator": {
|
|
2683
|
+
"propertyName": "mode",
|
|
2684
|
+
"mapping": {
|
|
2685
|
+
"server_extraction": "#/components/schemas/ServerExtractionIngest",
|
|
2686
|
+
"client_extraction": "#/components/schemas/ClientExtractionIngest"
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
},
|
|
2690
|
+
"IngestResponse": {
|
|
2691
|
+
"type": "object",
|
|
2692
|
+
"additionalProperties": false,
|
|
2693
|
+
"required": [
|
|
2694
|
+
"chunks",
|
|
2695
|
+
"ingestedChunks",
|
|
2696
|
+
"failedChunks",
|
|
2697
|
+
"truncated",
|
|
2698
|
+
"duplicateOf",
|
|
2699
|
+
"parseFailures"
|
|
2700
|
+
],
|
|
2701
|
+
"properties": {
|
|
2702
|
+
"chunks": {
|
|
2703
|
+
"type": "integer",
|
|
2704
|
+
"minimum": 0
|
|
2705
|
+
},
|
|
2706
|
+
"ingestedChunks": {
|
|
2707
|
+
"type": "integer",
|
|
2708
|
+
"minimum": 0
|
|
2709
|
+
},
|
|
2710
|
+
"failedChunks": {
|
|
2711
|
+
"type": "integer",
|
|
2712
|
+
"minimum": 0
|
|
2713
|
+
},
|
|
2714
|
+
"truncated": {
|
|
2715
|
+
"type": "boolean",
|
|
2716
|
+
"description": "True when chunking had to hard-cut text with no natural break."
|
|
2717
|
+
},
|
|
2718
|
+
"duplicateOf": {
|
|
2719
|
+
"description": "Set when `onDuplicateHash` is `skip` and another sourceRef already holds the content.",
|
|
2720
|
+
"anyOf": [
|
|
2721
|
+
{
|
|
2722
|
+
"$ref": "#/components/schemas/SourceRef"
|
|
2723
|
+
},
|
|
2724
|
+
{
|
|
2725
|
+
"type": "null"
|
|
2726
|
+
}
|
|
2727
|
+
]
|
|
2728
|
+
},
|
|
2729
|
+
"parseFailures": {
|
|
2730
|
+
"type": "array",
|
|
2731
|
+
"items": {
|
|
2732
|
+
"$ref": "#/components/schemas/ChunkFailure"
|
|
2733
|
+
}
|
|
2734
|
+
},
|
|
2735
|
+
"embeddingFailures": {
|
|
2736
|
+
"type": "integer",
|
|
2737
|
+
"minimum": 0,
|
|
2738
|
+
"description": "Write-phase embed failures counted during this ingest (`{ok: false}` per fact);\nthe facts commit keyword-only and the re-embed maintenance path repairs them.\nAbsent when every embed succeeded.\n"
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2741
|
+
},
|
|
2742
|
+
"LibrarianInferredFact": {
|
|
2743
|
+
"type": "object",
|
|
2744
|
+
"description": "A fact consolidated from events by the librarian.",
|
|
2745
|
+
"allOf": [
|
|
2746
|
+
{
|
|
2747
|
+
"$ref": "#/components/schemas/FactBase"
|
|
2748
|
+
},
|
|
2749
|
+
{
|
|
2750
|
+
"$ref": "#/components/schemas/MutableFactFields"
|
|
2751
|
+
},
|
|
2752
|
+
{
|
|
2753
|
+
"type": "object",
|
|
2754
|
+
"required": [
|
|
2755
|
+
"sourceType"
|
|
2756
|
+
],
|
|
2757
|
+
"properties": {
|
|
2758
|
+
"sourceType": {
|
|
2759
|
+
"type": "string",
|
|
2760
|
+
"const": "librarian_inferred"
|
|
2761
|
+
}
|
|
2762
|
+
}
|
|
2763
|
+
}
|
|
2764
|
+
],
|
|
2765
|
+
"unevaluatedProperties": false
|
|
2766
|
+
},
|
|
2767
|
+
"LifecycleStatus": {
|
|
2768
|
+
"type": "string",
|
|
2769
|
+
"enum": [
|
|
2770
|
+
"draft",
|
|
2771
|
+
"stable",
|
|
2772
|
+
"deprecated"
|
|
2773
|
+
]
|
|
2774
|
+
},
|
|
2775
|
+
"MutableFactFields": {
|
|
2776
|
+
"type": "object",
|
|
2777
|
+
"description": "Fields shared by mutable facts. Not used on its own; see `Fact`.",
|
|
2778
|
+
"required": [
|
|
2779
|
+
"mutable",
|
|
2780
|
+
"sourceRef",
|
|
2781
|
+
"sourceHash"
|
|
2782
|
+
],
|
|
2783
|
+
"properties": {
|
|
2784
|
+
"mutable": {
|
|
2785
|
+
"type": "boolean",
|
|
2786
|
+
"const": true
|
|
2787
|
+
},
|
|
2788
|
+
"sourceRef": {
|
|
2789
|
+
"type": "null"
|
|
2790
|
+
},
|
|
2791
|
+
"sourceHash": {
|
|
2792
|
+
"type": "null"
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
},
|
|
2796
|
+
"MutableSourceType": {
|
|
2797
|
+
"type": "string",
|
|
2798
|
+
"enum": [
|
|
2799
|
+
"user_stated",
|
|
2800
|
+
"user_confirmed",
|
|
2801
|
+
"librarian_inferred"
|
|
2802
|
+
]
|
|
2803
|
+
},
|
|
2804
|
+
"Namespace": {
|
|
2805
|
+
"type": "string",
|
|
2806
|
+
"description": "A namespace inside the tenant database (the engine's entity_id).",
|
|
2807
|
+
"pattern": "^[a-z0-9][a-z0-9._:-]{0,127}$",
|
|
2808
|
+
"examples": [
|
|
2809
|
+
"repo:synapsetree"
|
|
2810
|
+
]
|
|
2811
|
+
},
|
|
2812
|
+
"NamespaceList": {
|
|
2813
|
+
"type": "object",
|
|
2814
|
+
"additionalProperties": false,
|
|
2815
|
+
"required": [
|
|
2816
|
+
"data",
|
|
2817
|
+
"hasMore",
|
|
2818
|
+
"nextCursor"
|
|
2819
|
+
],
|
|
2820
|
+
"properties": {
|
|
2821
|
+
"data": {
|
|
2822
|
+
"type": "array",
|
|
2823
|
+
"items": {
|
|
2824
|
+
"$ref": "#/components/schemas/NamespaceSummary"
|
|
2825
|
+
}
|
|
2826
|
+
},
|
|
2827
|
+
"hasMore": {
|
|
2828
|
+
"type": "boolean"
|
|
2829
|
+
},
|
|
2830
|
+
"nextCursor": {
|
|
2831
|
+
"anyOf": [
|
|
2832
|
+
{
|
|
2833
|
+
"$ref": "#/components/schemas/Cursor"
|
|
2834
|
+
},
|
|
2835
|
+
{
|
|
2836
|
+
"type": "null"
|
|
2837
|
+
}
|
|
2838
|
+
]
|
|
2839
|
+
}
|
|
2840
|
+
}
|
|
2841
|
+
},
|
|
2842
|
+
"NamespaceSummary": {
|
|
2843
|
+
"type": "object",
|
|
2844
|
+
"additionalProperties": false,
|
|
2845
|
+
"required": [
|
|
2846
|
+
"namespace"
|
|
2847
|
+
],
|
|
2848
|
+
"properties": {
|
|
2849
|
+
"namespace": {
|
|
2850
|
+
"$ref": "#/components/schemas/Namespace"
|
|
2851
|
+
}
|
|
2852
|
+
}
|
|
2853
|
+
},
|
|
2854
|
+
"NewFactReplacement": {
|
|
2855
|
+
"type": "object",
|
|
2856
|
+
"additionalProperties": false,
|
|
2857
|
+
"required": [
|
|
2858
|
+
"kind",
|
|
2859
|
+
"title",
|
|
2860
|
+
"body"
|
|
2861
|
+
],
|
|
2862
|
+
"properties": {
|
|
2863
|
+
"kind": {
|
|
2864
|
+
"type": "string",
|
|
2865
|
+
"const": "new"
|
|
2866
|
+
},
|
|
2867
|
+
"title": {
|
|
2868
|
+
"type": "string",
|
|
2869
|
+
"minLength": 1,
|
|
2870
|
+
"maxLength": 1000
|
|
2871
|
+
},
|
|
2872
|
+
"body": {
|
|
2873
|
+
"type": "string",
|
|
2874
|
+
"minLength": 1,
|
|
2875
|
+
"maxLength": 100000
|
|
2876
|
+
},
|
|
2877
|
+
"tags": {
|
|
2878
|
+
"type": "array",
|
|
2879
|
+
"maxItems": 100,
|
|
2880
|
+
"items": {
|
|
2881
|
+
"type": "string",
|
|
2882
|
+
"minLength": 1,
|
|
2883
|
+
"maxLength": 100
|
|
2884
|
+
}
|
|
2885
|
+
},
|
|
2886
|
+
"confidence": {
|
|
2887
|
+
"$ref": "#/components/schemas/Confidence"
|
|
2888
|
+
},
|
|
2889
|
+
"sourceType": {
|
|
2890
|
+
"$ref": "#/components/schemas/MutableSourceType"
|
|
2891
|
+
},
|
|
2892
|
+
"embedding": {
|
|
2893
|
+
"$ref": "#/components/schemas/Embedding"
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2896
|
+
},
|
|
2897
|
+
"OauthErrorBody": {
|
|
2898
|
+
"type": "object",
|
|
2899
|
+
"description": "RFC 6749 §5.2 error body: `error` plus optional `error_description`;\n`interval` rides on `authorization_pending` (RFC 8628 §3.5).\n`key_limit_reached`, `database_name_taken` and `database_quota_exceeded`\nare documented SynapseTree extensions of the `error` member — account\nwalls a human must clear, after which the agent resumes polling (the\nclaim grant survives until its TTL):\n`key_limit_reached` (the organization's 10-key cap — prune keys in the\ndashboard), `database_name_taken` (the default database name is held by\na deleted database until GC cleanup — create a differently-named\ndatabase in the dashboard), `database_quota_exceeded` (the plan has no\nfree database slot — delete a database or upgrade, then poll again).\nThey are error-member values here, not problem+json ProblemCodes.\n",
|
|
2900
|
+
"additionalProperties": false,
|
|
2901
|
+
"required": [
|
|
2902
|
+
"error"
|
|
2903
|
+
],
|
|
2904
|
+
"properties": {
|
|
2905
|
+
"error": {
|
|
2906
|
+
"type": "string",
|
|
2907
|
+
"description": "An RFC 6749 §5.2 code, an RFC 8628 §3.5 code, or a documented SynapseTree extension (`key_limit_reached`, `database_name_taken`, `database_quota_exceeded`).",
|
|
2908
|
+
"enum": [
|
|
2909
|
+
"invalid_request",
|
|
2910
|
+
"invalid_grant",
|
|
2911
|
+
"authorization_pending",
|
|
2912
|
+
"slow_down",
|
|
2913
|
+
"unsupported_grant_type",
|
|
2914
|
+
"server_error",
|
|
2915
|
+
"key_limit_reached",
|
|
2916
|
+
"database_name_taken",
|
|
2917
|
+
"database_quota_exceeded"
|
|
2918
|
+
]
|
|
2919
|
+
},
|
|
2920
|
+
"error_description": {
|
|
2921
|
+
"type": "string",
|
|
2922
|
+
"description": "Human-readable detail (RFC 6749 §5.2)."
|
|
2923
|
+
},
|
|
2924
|
+
"error_uri": {
|
|
2925
|
+
"type": "string",
|
|
2926
|
+
"format": "uri",
|
|
2927
|
+
"description": "Optional RFC 6749 §5.2 pointer to the dashboard page that clears the wall."
|
|
2928
|
+
},
|
|
2929
|
+
"interval": {
|
|
2930
|
+
"type": "integer",
|
|
2931
|
+
"minimum": 1,
|
|
2932
|
+
"description": "Seconds to wait before polling again (RFC 8628 §3.5)."
|
|
2933
|
+
}
|
|
2934
|
+
}
|
|
2935
|
+
},
|
|
2936
|
+
"OkfType": {
|
|
2937
|
+
"description": "Ontology node type. Open: each namespace's manifest defines its own types and `emergent`\nmode adds more; facts imported from OKF bundles keep their original type string. The\nlisted values are the schema-software-org types.\n",
|
|
2938
|
+
"anyOf": [
|
|
2939
|
+
{
|
|
2940
|
+
"type": "string",
|
|
2941
|
+
"enum": [
|
|
2942
|
+
"person",
|
|
2943
|
+
"organization",
|
|
2944
|
+
"place",
|
|
2945
|
+
"event",
|
|
2946
|
+
"project",
|
|
2947
|
+
"action",
|
|
2948
|
+
"creativework",
|
|
2949
|
+
"review",
|
|
2950
|
+
"product",
|
|
2951
|
+
"software_application",
|
|
2952
|
+
"service",
|
|
2953
|
+
"role",
|
|
2954
|
+
"design_spec",
|
|
2955
|
+
"handoff",
|
|
2956
|
+
"procedure",
|
|
2957
|
+
"session_recap",
|
|
2958
|
+
"reference_doc"
|
|
2959
|
+
]
|
|
2960
|
+
},
|
|
2961
|
+
{
|
|
2962
|
+
"type": "string",
|
|
2963
|
+
"minLength": 1,
|
|
2964
|
+
"maxLength": 128
|
|
2965
|
+
}
|
|
2966
|
+
]
|
|
2967
|
+
},
|
|
2968
|
+
"OnDuplicateHash": {
|
|
2969
|
+
"type": "string",
|
|
2970
|
+
"description": "When another sourceRef already holds this content: `skip` (write nothing), `ingest` anyway, or `error` (409 source_hash_conflict).",
|
|
2971
|
+
"enum": [
|
|
2972
|
+
"skip",
|
|
2973
|
+
"ingest",
|
|
2974
|
+
"error"
|
|
2975
|
+
],
|
|
2976
|
+
"default": "skip"
|
|
2977
|
+
},
|
|
2978
|
+
"PlanFingerprint": {
|
|
2979
|
+
"type": "string",
|
|
2980
|
+
"pattern": "^sha256:[0-9a-f]{64}$",
|
|
2981
|
+
"examples": [
|
|
2982
|
+
"sha256:4e6a8c0b2d4f6a8c0e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a4c6e8b0d2f4a6c"
|
|
2983
|
+
]
|
|
2984
|
+
},
|
|
2985
|
+
"PollGrant": {
|
|
2986
|
+
"type": "object",
|
|
2987
|
+
"description": "Where and how to poll for the minted key.",
|
|
2988
|
+
"additionalProperties": false,
|
|
2989
|
+
"required": [
|
|
2990
|
+
"token_endpoint",
|
|
2991
|
+
"grant",
|
|
2992
|
+
"interval"
|
|
2993
|
+
],
|
|
2994
|
+
"properties": {
|
|
2995
|
+
"token_endpoint": {
|
|
2996
|
+
"type": "string",
|
|
2997
|
+
"format": "uri",
|
|
2998
|
+
"description": "The api.-host token endpoint."
|
|
2999
|
+
},
|
|
3000
|
+
"grant": {
|
|
3001
|
+
"type": "string",
|
|
3002
|
+
"const": "urn:synapsetree:claim",
|
|
3003
|
+
"description": "The claim-grant type to send as `grant_type`."
|
|
3004
|
+
},
|
|
3005
|
+
"interval": {
|
|
3006
|
+
"type": "integer",
|
|
3007
|
+
"minimum": 1,
|
|
3008
|
+
"description": "Seconds to wait between polls of `token_endpoint` (ruled\n2026-11-01). Modeled on the RFC 8628 §3.2 `interval`, but nested in\n`poll` rather than at the top level. An `authorization_pending` or\n`slow_down` answer carries an `interval` too (`slow_down` a larger\none), which replaces this one from then on.\n"
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
},
|
|
3012
|
+
"Problem": {
|
|
3013
|
+
"type": "object",
|
|
3014
|
+
"description": "RFC 7807 problem details.",
|
|
3015
|
+
"additionalProperties": false,
|
|
3016
|
+
"required": [
|
|
3017
|
+
"type",
|
|
3018
|
+
"title",
|
|
3019
|
+
"status",
|
|
3020
|
+
"code",
|
|
3021
|
+
"detail",
|
|
3022
|
+
"requestId",
|
|
3023
|
+
"retryable"
|
|
3024
|
+
],
|
|
3025
|
+
"properties": {
|
|
3026
|
+
"type": {
|
|
3027
|
+
"type": "string",
|
|
3028
|
+
"format": "uri",
|
|
3029
|
+
"description": "`urn:synapsetree:problem:<code>`.",
|
|
3030
|
+
"pattern": "^urn:synapsetree:problem:[a-z_]+$"
|
|
3031
|
+
},
|
|
3032
|
+
"title": {
|
|
3033
|
+
"type": "string",
|
|
3034
|
+
"minLength": 1
|
|
3035
|
+
},
|
|
3036
|
+
"status": {
|
|
3037
|
+
"type": "integer",
|
|
3038
|
+
"minimum": 400,
|
|
3039
|
+
"maximum": 599
|
|
3040
|
+
},
|
|
3041
|
+
"code": {
|
|
3042
|
+
"$ref": "#/components/schemas/ProblemCode"
|
|
3043
|
+
},
|
|
3044
|
+
"detail": {
|
|
3045
|
+
"type": "string"
|
|
3046
|
+
},
|
|
3047
|
+
"requestId": {
|
|
3048
|
+
"type": "string",
|
|
3049
|
+
"pattern": "^req_[A-Za-z0-9]{8,64}$"
|
|
3050
|
+
},
|
|
3051
|
+
"retryable": {
|
|
3052
|
+
"type": "boolean"
|
|
3053
|
+
},
|
|
3054
|
+
"retryAfterSeconds": {
|
|
3055
|
+
"type": "integer",
|
|
3056
|
+
"minimum": 0
|
|
3057
|
+
},
|
|
3058
|
+
"errors": {
|
|
3059
|
+
"type": "array",
|
|
3060
|
+
"description": "Validation failures (`invalid_request`).",
|
|
3061
|
+
"items": {
|
|
3062
|
+
"type": "object",
|
|
3063
|
+
"additionalProperties": false,
|
|
3064
|
+
"required": [
|
|
3065
|
+
"path",
|
|
3066
|
+
"message"
|
|
3067
|
+
],
|
|
3068
|
+
"properties": {
|
|
3069
|
+
"path": {
|
|
3070
|
+
"type": "string",
|
|
3071
|
+
"description": "JSON Pointer into the request."
|
|
3072
|
+
},
|
|
3073
|
+
"message": {
|
|
3074
|
+
"type": "string"
|
|
3075
|
+
}
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
},
|
|
3079
|
+
"parseFailures": {
|
|
3080
|
+
"type": "array",
|
|
3081
|
+
"description": "Per-chunk failures (`ingest_failed`).",
|
|
3082
|
+
"items": {
|
|
3083
|
+
"$ref": "#/components/schemas/ChunkFailure"
|
|
3084
|
+
}
|
|
3085
|
+
},
|
|
3086
|
+
"duplicateOf": {
|
|
3087
|
+
"description": "The sourceRef already holding this content (`source_hash_conflict`).",
|
|
3088
|
+
"$ref": "#/components/schemas/SourceRef"
|
|
3089
|
+
},
|
|
3090
|
+
"kind": {
|
|
3091
|
+
"type": "string",
|
|
3092
|
+
"enum": [
|
|
3093
|
+
"node",
|
|
3094
|
+
"edge"
|
|
3095
|
+
],
|
|
3096
|
+
"description": "What violated the ontology (`ontology_violation`)."
|
|
3097
|
+
},
|
|
3098
|
+
"ontologyType": {
|
|
3099
|
+
"type": "string",
|
|
3100
|
+
"description": "The out-of-manifest type (`ontology_violation`)."
|
|
3101
|
+
},
|
|
3102
|
+
"reason": {
|
|
3103
|
+
"type": "string",
|
|
3104
|
+
"description": "Machine-readable sub-reason, e.g. `immutable_target` for `invalid_state`."
|
|
3105
|
+
}
|
|
3106
|
+
}
|
|
3107
|
+
},
|
|
3108
|
+
"ProblemCode": {
|
|
3109
|
+
"description": "Stable machine-readable error code. Open: new codes may be added in minor versions, so\nclients must treat an unlisted code as a generic error of its HTTP status. The listed\nvalues are the codes this version defines.\n",
|
|
3110
|
+
"anyOf": [
|
|
3111
|
+
{
|
|
3112
|
+
"type": "string",
|
|
3113
|
+
"enum": [
|
|
3114
|
+
"invalid_request",
|
|
3115
|
+
"insufficient_scope",
|
|
3116
|
+
"subscription_inactive",
|
|
3117
|
+
"quota_exceeded",
|
|
3118
|
+
"not_found",
|
|
3119
|
+
"namespace_exists",
|
|
3120
|
+
"conflict",
|
|
3121
|
+
"invalid_state",
|
|
3122
|
+
"source_hash_conflict",
|
|
3123
|
+
"node_id_unavailable",
|
|
3124
|
+
"namespace_busy",
|
|
3125
|
+
"idempotency_in_progress",
|
|
3126
|
+
"extraction_plan_stale",
|
|
3127
|
+
"inference_not_configured",
|
|
3128
|
+
"inference_config_invalid",
|
|
3129
|
+
"payload_too_large",
|
|
3130
|
+
"idempotency_key_reused",
|
|
3131
|
+
"ontology_violation",
|
|
3132
|
+
"ingest_failed",
|
|
3133
|
+
"embedding_dimension_mismatch",
|
|
3134
|
+
"embedding_model_mismatch",
|
|
3135
|
+
"rate_limited",
|
|
3136
|
+
"internal",
|
|
3137
|
+
"not_implemented",
|
|
3138
|
+
"unavailable",
|
|
3139
|
+
"upstream_inference_unavailable",
|
|
3140
|
+
"fenced",
|
|
3141
|
+
"unauthorized"
|
|
3142
|
+
]
|
|
3143
|
+
},
|
|
3144
|
+
{
|
|
3145
|
+
"type": "string",
|
|
3146
|
+
"pattern": "^[a-z_]+$",
|
|
3147
|
+
"maxLength": 64
|
|
3148
|
+
}
|
|
3149
|
+
]
|
|
3150
|
+
},
|
|
3151
|
+
"QueryDiagnostics": {
|
|
3152
|
+
"type": "object",
|
|
3153
|
+
"description": "Named BYOK diagnostics for a query response. A typed map: keys are diagnostic\nnames, values are scalars; unknown names are legal and clients must ignore them.\nReported reasons include `keyword_only: true` (the organization has no embeddings\nregistration) and `embed_unavailable: <reason>` (key or provider fault, or the tier\ncap exhausted). While a maintenance run holds the namespace, vector search is\npaused and reads answer keyword-only; the run itself is surfaced through\n`currentRunId` and `currentRunState` on the pending-maintenance object. All of\nthese are normal keyword-only degradation, not errors.\n",
|
|
3154
|
+
"additionalProperties": {
|
|
3155
|
+
"description": "A named diagnostic flag, count or label.",
|
|
3156
|
+
"anyOf": [
|
|
3157
|
+
{
|
|
3158
|
+
"type": "string"
|
|
3159
|
+
},
|
|
3160
|
+
{
|
|
3161
|
+
"type": "number"
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
"type": "boolean"
|
|
3165
|
+
},
|
|
3166
|
+
{
|
|
3167
|
+
"type": "null"
|
|
3168
|
+
}
|
|
3169
|
+
]
|
|
3170
|
+
},
|
|
3171
|
+
"examples": [
|
|
3172
|
+
{
|
|
3173
|
+
"keyword_only": true
|
|
3174
|
+
}
|
|
3175
|
+
]
|
|
3176
|
+
},
|
|
3177
|
+
"QueryRequest": {
|
|
3178
|
+
"type": "object",
|
|
3179
|
+
"additionalProperties": false,
|
|
3180
|
+
"required": [
|
|
3181
|
+
"namespaces",
|
|
3182
|
+
"query"
|
|
3183
|
+
],
|
|
3184
|
+
"properties": {
|
|
3185
|
+
"namespaces": {
|
|
3186
|
+
"type": "array",
|
|
3187
|
+
"minItems": 1,
|
|
3188
|
+
"maxItems": 20,
|
|
3189
|
+
"uniqueItems": true,
|
|
3190
|
+
"items": {
|
|
3191
|
+
"$ref": "#/components/schemas/Namespace"
|
|
3192
|
+
}
|
|
3193
|
+
},
|
|
3194
|
+
"query": {
|
|
3195
|
+
"type": "string",
|
|
3196
|
+
"maxLength": 4096,
|
|
3197
|
+
"description": "Search text. Empty returns the most recent facts."
|
|
3198
|
+
},
|
|
3199
|
+
"queryEmbedding": {
|
|
3200
|
+
"$ref": "#/components/schemas/Embedding"
|
|
3201
|
+
},
|
|
3202
|
+
"limit": {
|
|
3203
|
+
"type": "integer",
|
|
3204
|
+
"minimum": 1,
|
|
3205
|
+
"maximum": 100,
|
|
3206
|
+
"default": 10
|
|
3207
|
+
},
|
|
3208
|
+
"hybridWeight": {
|
|
3209
|
+
"type": "number",
|
|
3210
|
+
"minimum": 0,
|
|
3211
|
+
"maximum": 1,
|
|
3212
|
+
"description": "0 = keyword only, 1 = semantic only. Omit for the default semantic ranking."
|
|
3213
|
+
},
|
|
3214
|
+
"excludeDrafts": {
|
|
3215
|
+
"type": "boolean",
|
|
3216
|
+
"default": false
|
|
3217
|
+
},
|
|
3218
|
+
"asOf": {
|
|
3219
|
+
"description": "Return facts that were true at this instant, using current knowledge.",
|
|
3220
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
3221
|
+
},
|
|
3222
|
+
"weights": {
|
|
3223
|
+
"type": "object",
|
|
3224
|
+
"description": "Per-namespace score multipliers (default 1; 0 skips the namespace).",
|
|
3225
|
+
"propertyNames": {
|
|
3226
|
+
"$ref": "#/components/schemas/Namespace"
|
|
3227
|
+
},
|
|
3228
|
+
"additionalProperties": {
|
|
3229
|
+
"type": "number",
|
|
3230
|
+
"minimum": 0
|
|
3231
|
+
}
|
|
3232
|
+
},
|
|
3233
|
+
"floors": {
|
|
3234
|
+
"type": "object",
|
|
3235
|
+
"description": "Minimum results reserved per namespace before the global `limit` cut.",
|
|
3236
|
+
"propertyNames": {
|
|
3237
|
+
"$ref": "#/components/schemas/Namespace"
|
|
3238
|
+
},
|
|
3239
|
+
"additionalProperties": {
|
|
3240
|
+
"type": "integer",
|
|
3241
|
+
"minimum": 0,
|
|
3242
|
+
"maximum": 100
|
|
3243
|
+
}
|
|
3244
|
+
},
|
|
3245
|
+
"tokenBudget": {
|
|
3246
|
+
"type": "integer",
|
|
3247
|
+
"minimum": 1,
|
|
3248
|
+
"maximum": 200000,
|
|
3249
|
+
"description": "Pack facts into this many estimated tokens.",
|
|
3250
|
+
"x-synapsetree-engine": "read({ tokenBudget }) (core-llm-wiki 7.8.0 phase D)"
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3253
|
+
},
|
|
3254
|
+
"QueryResponse": {
|
|
3255
|
+
"type": "object",
|
|
3256
|
+
"additionalProperties": false,
|
|
3257
|
+
"required": [
|
|
3258
|
+
"facts",
|
|
3259
|
+
"scores",
|
|
3260
|
+
"tasks",
|
|
3261
|
+
"events"
|
|
3262
|
+
],
|
|
3263
|
+
"properties": {
|
|
3264
|
+
"facts": {
|
|
3265
|
+
"type": "array",
|
|
3266
|
+
"items": {
|
|
3267
|
+
"$ref": "#/components/schemas/Fact"
|
|
3268
|
+
}
|
|
3269
|
+
},
|
|
3270
|
+
"scores": {
|
|
3271
|
+
"type": "object",
|
|
3272
|
+
"description": "Score per returned fact id (empty for recency reads).",
|
|
3273
|
+
"additionalProperties": {
|
|
3274
|
+
"type": "number"
|
|
3275
|
+
}
|
|
3276
|
+
},
|
|
3277
|
+
"tasks": {
|
|
3278
|
+
"type": "array",
|
|
3279
|
+
"items": {
|
|
3280
|
+
"$ref": "#/components/schemas/Task"
|
|
3281
|
+
}
|
|
3282
|
+
},
|
|
3283
|
+
"events": {
|
|
3284
|
+
"type": "array",
|
|
3285
|
+
"items": {
|
|
3286
|
+
"$ref": "#/components/schemas/Event"
|
|
3287
|
+
}
|
|
3288
|
+
},
|
|
3289
|
+
"diagnostics": {
|
|
3290
|
+
"description": "Additive BYOK diagnostics; present only when there is something to report\n(e.g. the searched namespaces serve keyword-only facts because the org has\nno embeddings registration).\n",
|
|
3291
|
+
"$ref": "#/components/schemas/QueryDiagnostics"
|
|
3292
|
+
}
|
|
3293
|
+
}
|
|
3294
|
+
},
|
|
3295
|
+
"RememberRequest": {
|
|
3296
|
+
"type": "object",
|
|
3297
|
+
"additionalProperties": false,
|
|
3298
|
+
"required": [
|
|
3299
|
+
"namespace",
|
|
3300
|
+
"title",
|
|
3301
|
+
"body"
|
|
3302
|
+
],
|
|
3303
|
+
"properties": {
|
|
3304
|
+
"namespace": {
|
|
3305
|
+
"$ref": "#/components/schemas/Namespace"
|
|
3306
|
+
},
|
|
3307
|
+
"title": {
|
|
3308
|
+
"type": "string",
|
|
3309
|
+
"minLength": 1,
|
|
3310
|
+
"maxLength": 1000
|
|
3311
|
+
},
|
|
3312
|
+
"body": {
|
|
3313
|
+
"type": "string",
|
|
3314
|
+
"minLength": 1,
|
|
3315
|
+
"maxLength": 100000
|
|
3316
|
+
},
|
|
3317
|
+
"tags": {
|
|
3318
|
+
"type": "array",
|
|
3319
|
+
"maxItems": 100,
|
|
3320
|
+
"items": {
|
|
3321
|
+
"type": "string",
|
|
3322
|
+
"minLength": 1,
|
|
3323
|
+
"maxLength": 100
|
|
3324
|
+
}
|
|
3325
|
+
},
|
|
3326
|
+
"confidence": {
|
|
3327
|
+
"$ref": "#/components/schemas/Confidence"
|
|
3328
|
+
},
|
|
3329
|
+
"sourceType": {
|
|
3330
|
+
"type": "string",
|
|
3331
|
+
"enum": [
|
|
3332
|
+
"user_stated",
|
|
3333
|
+
"user_confirmed"
|
|
3334
|
+
],
|
|
3335
|
+
"default": "user_stated"
|
|
3336
|
+
},
|
|
3337
|
+
"okfType": {
|
|
3338
|
+
"$ref": "#/components/schemas/OkfType"
|
|
3339
|
+
},
|
|
3340
|
+
"validFrom": {
|
|
3341
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
3342
|
+
},
|
|
3343
|
+
"embedding": {
|
|
3344
|
+
"$ref": "#/components/schemas/Embedding"
|
|
3345
|
+
}
|
|
3346
|
+
}
|
|
3347
|
+
},
|
|
3348
|
+
"RevokeRequest": {
|
|
3349
|
+
"type": "object",
|
|
3350
|
+
"description": "Form-urlencoded revocation body (RFC 7009 §2.1).",
|
|
3351
|
+
"additionalProperties": false,
|
|
3352
|
+
"required": [
|
|
3353
|
+
"token"
|
|
3354
|
+
],
|
|
3355
|
+
"properties": {
|
|
3356
|
+
"token": {
|
|
3357
|
+
"type": "string",
|
|
3358
|
+
"minLength": 1,
|
|
3359
|
+
"description": "The API key to revoke (revocation is defined for keys only)."
|
|
3360
|
+
},
|
|
3361
|
+
"token_type_hint": {
|
|
3362
|
+
"type": "string",
|
|
3363
|
+
"enum": [
|
|
3364
|
+
"access_token"
|
|
3365
|
+
],
|
|
3366
|
+
"description": "Optional RFC 7009 §2.1 hint."
|
|
3367
|
+
}
|
|
3368
|
+
}
|
|
3369
|
+
},
|
|
3370
|
+
"ServerExtractionIngest": {
|
|
3371
|
+
"type": "object",
|
|
3372
|
+
"additionalProperties": false,
|
|
3373
|
+
"required": [
|
|
3374
|
+
"mode",
|
|
3375
|
+
"namespace",
|
|
3376
|
+
"sourceRef",
|
|
3377
|
+
"sourceHash",
|
|
3378
|
+
"content"
|
|
3379
|
+
],
|
|
3380
|
+
"properties": {
|
|
3381
|
+
"mode": {
|
|
3382
|
+
"type": "string",
|
|
3383
|
+
"const": "server_extraction"
|
|
3384
|
+
},
|
|
3385
|
+
"namespace": {
|
|
3386
|
+
"$ref": "#/components/schemas/Namespace"
|
|
3387
|
+
},
|
|
3388
|
+
"sourceRef": {
|
|
3389
|
+
"$ref": "#/components/schemas/SourceRef"
|
|
3390
|
+
},
|
|
3391
|
+
"sourceHash": {
|
|
3392
|
+
"$ref": "#/components/schemas/SourceHash"
|
|
3393
|
+
},
|
|
3394
|
+
"content": {
|
|
3395
|
+
"type": "string",
|
|
3396
|
+
"minLength": 1,
|
|
3397
|
+
"maxLength": 524288
|
|
3398
|
+
},
|
|
3399
|
+
"onDuplicateHash": {
|
|
3400
|
+
"$ref": "#/components/schemas/OnDuplicateHash"
|
|
3401
|
+
},
|
|
3402
|
+
"chunking": {
|
|
3403
|
+
"$ref": "#/components/schemas/Chunking"
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
},
|
|
3407
|
+
"SourceHash": {
|
|
3408
|
+
"type": "string",
|
|
3409
|
+
"description": "Lowercase hex SHA-256 of the source's bytes.",
|
|
3410
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
3411
|
+
"examples": [
|
|
3412
|
+
"9f2c4b8e1a7d3f6c5b0e2d4a8c1f3e5b7d9a0c2e4f6b8d0a1c3e5f7b9d1a3c5e"
|
|
3413
|
+
]
|
|
3414
|
+
},
|
|
3415
|
+
"SourceRef": {
|
|
3416
|
+
"type": "string",
|
|
3417
|
+
"description": "Identifies one source document within a namespace. Restricted to characters the engine\nstores unchanged; the SDK's `toSourceRef(path)` encodes `/` as `__`.\n",
|
|
3418
|
+
"pattern": "^[A-Za-z0-9._\\- ]{1,255}$",
|
|
3419
|
+
"examples": [
|
|
3420
|
+
"infra__stack.ts"
|
|
3421
|
+
]
|
|
3422
|
+
},
|
|
3423
|
+
"SourceType": {
|
|
3424
|
+
"type": "string",
|
|
3425
|
+
"description": "How a fact was produced. `immutable_document` facts change only by re-ingesting their source.",
|
|
3426
|
+
"enum": [
|
|
3427
|
+
"immutable_document",
|
|
3428
|
+
"librarian_inferred",
|
|
3429
|
+
"user_stated",
|
|
3430
|
+
"user_confirmed"
|
|
3431
|
+
]
|
|
3432
|
+
},
|
|
3433
|
+
"SupersedeRequest": {
|
|
3434
|
+
"type": "object",
|
|
3435
|
+
"additionalProperties": false,
|
|
3436
|
+
"required": [
|
|
3437
|
+
"namespace",
|
|
3438
|
+
"replacement"
|
|
3439
|
+
],
|
|
3440
|
+
"properties": {
|
|
3441
|
+
"namespace": {
|
|
3442
|
+
"$ref": "#/components/schemas/Namespace"
|
|
3443
|
+
},
|
|
3444
|
+
"validFrom": {
|
|
3445
|
+
"description": "When the old fact stopped being true and the replacement became true. Defaults to now.",
|
|
3446
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
3447
|
+
},
|
|
3448
|
+
"replacement": {
|
|
3449
|
+
"oneOf": [
|
|
3450
|
+
{
|
|
3451
|
+
"$ref": "#/components/schemas/NewFactReplacement"
|
|
3452
|
+
},
|
|
3453
|
+
{
|
|
3454
|
+
"$ref": "#/components/schemas/ExistingFactReplacement"
|
|
3455
|
+
}
|
|
3456
|
+
],
|
|
3457
|
+
"discriminator": {
|
|
3458
|
+
"propertyName": "kind",
|
|
3459
|
+
"mapping": {
|
|
3460
|
+
"new": "#/components/schemas/NewFactReplacement",
|
|
3461
|
+
"existing": "#/components/schemas/ExistingFactReplacement"
|
|
3462
|
+
}
|
|
3463
|
+
}
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3466
|
+
},
|
|
3467
|
+
"SupersedeResponse": {
|
|
3468
|
+
"type": "object",
|
|
3469
|
+
"additionalProperties": false,
|
|
3470
|
+
"required": [
|
|
3471
|
+
"superseded",
|
|
3472
|
+
"replacement"
|
|
3473
|
+
],
|
|
3474
|
+
"properties": {
|
|
3475
|
+
"superseded": {
|
|
3476
|
+
"$ref": "#/components/schemas/Fact"
|
|
3477
|
+
},
|
|
3478
|
+
"replacement": {
|
|
3479
|
+
"$ref": "#/components/schemas/Fact"
|
|
3480
|
+
}
|
|
3481
|
+
}
|
|
3482
|
+
},
|
|
3483
|
+
"Task": {
|
|
3484
|
+
"type": "object",
|
|
3485
|
+
"additionalProperties": false,
|
|
3486
|
+
"required": [
|
|
3487
|
+
"id",
|
|
3488
|
+
"namespace",
|
|
3489
|
+
"description",
|
|
3490
|
+
"status",
|
|
3491
|
+
"priority",
|
|
3492
|
+
"okfType",
|
|
3493
|
+
"createdAt",
|
|
3494
|
+
"updatedAt",
|
|
3495
|
+
"resolvedAt"
|
|
3496
|
+
],
|
|
3497
|
+
"properties": {
|
|
3498
|
+
"id": {
|
|
3499
|
+
"type": "string",
|
|
3500
|
+
"minLength": 1,
|
|
3501
|
+
"maxLength": 255
|
|
3502
|
+
},
|
|
3503
|
+
"namespace": {
|
|
3504
|
+
"$ref": "#/components/schemas/Namespace"
|
|
3505
|
+
},
|
|
3506
|
+
"description": {
|
|
3507
|
+
"type": "string",
|
|
3508
|
+
"minLength": 1,
|
|
3509
|
+
"maxLength": 4000
|
|
3510
|
+
},
|
|
3511
|
+
"status": {
|
|
3512
|
+
"type": "string",
|
|
3513
|
+
"enum": [
|
|
3514
|
+
"pending",
|
|
3515
|
+
"in_progress",
|
|
3516
|
+
"done",
|
|
3517
|
+
"abandoned"
|
|
3518
|
+
]
|
|
3519
|
+
},
|
|
3520
|
+
"priority": {
|
|
3521
|
+
"type": "integer",
|
|
3522
|
+
"minimum": 0,
|
|
3523
|
+
"maximum": 10
|
|
3524
|
+
},
|
|
3525
|
+
"okfType": {
|
|
3526
|
+
"anyOf": [
|
|
3527
|
+
{
|
|
3528
|
+
"$ref": "#/components/schemas/OkfType"
|
|
3529
|
+
},
|
|
3530
|
+
{
|
|
3531
|
+
"type": "null"
|
|
3532
|
+
}
|
|
3533
|
+
]
|
|
3534
|
+
},
|
|
3535
|
+
"createdAt": {
|
|
3536
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
3537
|
+
},
|
|
3538
|
+
"updatedAt": {
|
|
3539
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
3540
|
+
},
|
|
3541
|
+
"resolvedAt": {
|
|
3542
|
+
"anyOf": [
|
|
3543
|
+
{
|
|
3544
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
3545
|
+
},
|
|
3546
|
+
{
|
|
3547
|
+
"type": "null"
|
|
3548
|
+
}
|
|
3549
|
+
]
|
|
3550
|
+
}
|
|
3551
|
+
}
|
|
3552
|
+
},
|
|
3553
|
+
"Timestamp": {
|
|
3554
|
+
"type": "string",
|
|
3555
|
+
"format": "date-time",
|
|
3556
|
+
"description": "RFC 3339 timestamp, UTC.",
|
|
3557
|
+
"examples": [
|
|
3558
|
+
"2026-09-29T10:00:00Z"
|
|
3559
|
+
]
|
|
3560
|
+
},
|
|
3561
|
+
"TokenResponse": {
|
|
3562
|
+
"type": "object",
|
|
3563
|
+
"description": "RFC 6749 §5.1 success response — exactly one freshly minted API key.",
|
|
3564
|
+
"additionalProperties": false,
|
|
3565
|
+
"required": [
|
|
3566
|
+
"access_token",
|
|
3567
|
+
"token_type",
|
|
3568
|
+
"account_id",
|
|
3569
|
+
"scope"
|
|
3570
|
+
],
|
|
3571
|
+
"properties": {
|
|
3572
|
+
"access_token": {
|
|
3573
|
+
"type": "string",
|
|
3574
|
+
"pattern": "^stree_[A-Za-z0-9_-]{43}$",
|
|
3575
|
+
"description": "The minted API key. The only time it is ever shown."
|
|
3576
|
+
},
|
|
3577
|
+
"token_type": {
|
|
3578
|
+
"type": "string",
|
|
3579
|
+
"enum": [
|
|
3580
|
+
"Bearer"
|
|
3581
|
+
],
|
|
3582
|
+
"description": "RFC 6749 §5.1 — keys authenticate as bearer tokens."
|
|
3583
|
+
},
|
|
3584
|
+
"account_id": {
|
|
3585
|
+
"type": "string",
|
|
3586
|
+
"description": "The organization the key belongs to (its `account_id` context)."
|
|
3587
|
+
},
|
|
3588
|
+
"scope": {
|
|
3589
|
+
"type": "string",
|
|
3590
|
+
"const": "memory:full",
|
|
3591
|
+
"description": "Agent keys always carry the full memory scope."
|
|
3592
|
+
}
|
|
3593
|
+
}
|
|
3594
|
+
},
|
|
3595
|
+
"TraverseRequest": {
|
|
3596
|
+
"type": "object",
|
|
3597
|
+
"additionalProperties": false,
|
|
3598
|
+
"required": [
|
|
3599
|
+
"namespace",
|
|
3600
|
+
"sourceId"
|
|
3601
|
+
],
|
|
3602
|
+
"properties": {
|
|
3603
|
+
"namespace": {
|
|
3604
|
+
"$ref": "#/components/schemas/Namespace"
|
|
3605
|
+
},
|
|
3606
|
+
"sourceId": {
|
|
3607
|
+
"$ref": "#/components/schemas/FactId"
|
|
3608
|
+
},
|
|
3609
|
+
"maxDepth": {
|
|
3610
|
+
"type": "integer",
|
|
3611
|
+
"minimum": 1,
|
|
3612
|
+
"maximum": 3,
|
|
3613
|
+
"default": 1
|
|
3614
|
+
},
|
|
3615
|
+
"direction": {
|
|
3616
|
+
"$ref": "#/components/schemas/Direction"
|
|
3617
|
+
},
|
|
3618
|
+
"edgeTypes": {
|
|
3619
|
+
"type": "array",
|
|
3620
|
+
"description": "Allowed edge types. Omit for all; an empty array matches none.",
|
|
3621
|
+
"maxItems": 100,
|
|
3622
|
+
"items": {
|
|
3623
|
+
"$ref": "#/components/schemas/EdgeType"
|
|
3624
|
+
}
|
|
3625
|
+
},
|
|
3626
|
+
"maxNodes": {
|
|
3627
|
+
"type": "integer",
|
|
3628
|
+
"minimum": 1,
|
|
3629
|
+
"maximum": 200,
|
|
3630
|
+
"default": 20
|
|
3631
|
+
},
|
|
3632
|
+
"minConfidence": {
|
|
3633
|
+
"$ref": "#/components/schemas/Confidence"
|
|
3634
|
+
},
|
|
3635
|
+
"excludeSourceTypes": {
|
|
3636
|
+
"type": "array",
|
|
3637
|
+
"maxItems": 4,
|
|
3638
|
+
"uniqueItems": true,
|
|
3639
|
+
"items": {
|
|
3640
|
+
"$ref": "#/components/schemas/SourceType"
|
|
3641
|
+
}
|
|
3642
|
+
},
|
|
3643
|
+
"excludeDrafts": {
|
|
3644
|
+
"type": "boolean",
|
|
3645
|
+
"default": false
|
|
3646
|
+
},
|
|
3647
|
+
"asOf": {
|
|
3648
|
+
"$ref": "#/components/schemas/Timestamp"
|
|
3649
|
+
},
|
|
3650
|
+
"tokenBudget": {
|
|
3651
|
+
"type": "integer",
|
|
3652
|
+
"minimum": 1,
|
|
3653
|
+
"maximum": 200000,
|
|
3654
|
+
"x-synapsetree-engine": "traverseGraph({ tokenBudget }) (core-llm-wiki 7.8.0 phase D)"
|
|
3655
|
+
}
|
|
3656
|
+
}
|
|
3657
|
+
},
|
|
3658
|
+
"TraverseResponse": {
|
|
3659
|
+
"type": "object",
|
|
3660
|
+
"additionalProperties": false,
|
|
3661
|
+
"required": [
|
|
3662
|
+
"nodes",
|
|
3663
|
+
"edges"
|
|
3664
|
+
],
|
|
3665
|
+
"properties": {
|
|
3666
|
+
"nodes": {
|
|
3667
|
+
"type": "array",
|
|
3668
|
+
"description": "Anchor first, then neighbours by depth.",
|
|
3669
|
+
"items": {
|
|
3670
|
+
"$ref": "#/components/schemas/Fact"
|
|
3671
|
+
}
|
|
3672
|
+
},
|
|
3673
|
+
"edges": {
|
|
3674
|
+
"type": "array",
|
|
3675
|
+
"items": {
|
|
3676
|
+
"$ref": "#/components/schemas/Edge"
|
|
3677
|
+
}
|
|
3678
|
+
}
|
|
3679
|
+
}
|
|
3680
|
+
},
|
|
3681
|
+
"TrustTier": {
|
|
3682
|
+
"type": "string",
|
|
3683
|
+
"enum": [
|
|
3684
|
+
"unverified",
|
|
3685
|
+
"machine-confirmed",
|
|
3686
|
+
"human-reviewed"
|
|
3687
|
+
]
|
|
3688
|
+
},
|
|
3689
|
+
"UserConfirmedFact": {
|
|
3690
|
+
"type": "object",
|
|
3691
|
+
"description": "A fact a user has confirmed.",
|
|
3692
|
+
"allOf": [
|
|
3693
|
+
{
|
|
3694
|
+
"$ref": "#/components/schemas/FactBase"
|
|
3695
|
+
},
|
|
3696
|
+
{
|
|
3697
|
+
"$ref": "#/components/schemas/MutableFactFields"
|
|
3698
|
+
},
|
|
3699
|
+
{
|
|
3700
|
+
"type": "object",
|
|
3701
|
+
"required": [
|
|
3702
|
+
"sourceType"
|
|
3703
|
+
],
|
|
3704
|
+
"properties": {
|
|
3705
|
+
"sourceType": {
|
|
3706
|
+
"type": "string",
|
|
3707
|
+
"const": "user_confirmed"
|
|
3708
|
+
}
|
|
3709
|
+
}
|
|
3710
|
+
}
|
|
3711
|
+
],
|
|
3712
|
+
"unevaluatedProperties": false
|
|
3713
|
+
},
|
|
3714
|
+
"UserStatedFact": {
|
|
3715
|
+
"type": "object",
|
|
3716
|
+
"description": "A fact stated directly by a user or agent.",
|
|
3717
|
+
"allOf": [
|
|
3718
|
+
{
|
|
3719
|
+
"$ref": "#/components/schemas/FactBase"
|
|
3720
|
+
},
|
|
3721
|
+
{
|
|
3722
|
+
"$ref": "#/components/schemas/MutableFactFields"
|
|
3723
|
+
},
|
|
3724
|
+
{
|
|
3725
|
+
"type": "object",
|
|
3726
|
+
"required": [
|
|
3727
|
+
"sourceType"
|
|
3728
|
+
],
|
|
3729
|
+
"properties": {
|
|
3730
|
+
"sourceType": {
|
|
3731
|
+
"type": "string",
|
|
3732
|
+
"const": "user_stated"
|
|
3733
|
+
}
|
|
3734
|
+
}
|
|
3735
|
+
}
|
|
3736
|
+
],
|
|
3737
|
+
"unevaluatedProperties": false
|
|
3738
|
+
},
|
|
3739
|
+
"Whoami": {
|
|
3740
|
+
"type": "object",
|
|
3741
|
+
"additionalProperties": false,
|
|
3742
|
+
"required": [
|
|
3743
|
+
"apiKeyId",
|
|
3744
|
+
"organizationId",
|
|
3745
|
+
"tenantDatabaseId",
|
|
3746
|
+
"scope",
|
|
3747
|
+
"planCode",
|
|
3748
|
+
"subscriptionStatus"
|
|
3749
|
+
],
|
|
3750
|
+
"properties": {
|
|
3751
|
+
"apiKeyId": {
|
|
3752
|
+
"type": "string",
|
|
3753
|
+
"minLength": 1
|
|
3754
|
+
},
|
|
3755
|
+
"organizationId": {
|
|
3756
|
+
"type": "string",
|
|
3757
|
+
"minLength": 1
|
|
3758
|
+
},
|
|
3759
|
+
"tenantDatabaseId": {
|
|
3760
|
+
"type": "string",
|
|
3761
|
+
"minLength": 1
|
|
3762
|
+
},
|
|
3763
|
+
"scope": {
|
|
3764
|
+
"type": "string",
|
|
3765
|
+
"enum": [
|
|
3766
|
+
"read",
|
|
3767
|
+
"read_write",
|
|
3768
|
+
"memory:full",
|
|
3769
|
+
"memory:admin"
|
|
3770
|
+
],
|
|
3771
|
+
"description": "The key's scope. `read` and `read_write` are dashboard-issued keys; `memory:full`\nis the agent key issued through auth.md; `memory:admin` is accepted but not issued\nin v1. A `memory:full` key is refused the export and destructive operations;\n`memory:admin` passes them.\n"
|
|
3772
|
+
},
|
|
3773
|
+
"planCode": {
|
|
3774
|
+
"description": "Open; new plans may be added.",
|
|
3775
|
+
"anyOf": [
|
|
3776
|
+
{
|
|
3777
|
+
"type": "string",
|
|
3778
|
+
"enum": [
|
|
3779
|
+
"hobby",
|
|
3780
|
+
"pro",
|
|
3781
|
+
"team"
|
|
3782
|
+
]
|
|
3783
|
+
},
|
|
3784
|
+
{
|
|
3785
|
+
"type": "string",
|
|
3786
|
+
"minLength": 1
|
|
3787
|
+
}
|
|
3788
|
+
]
|
|
3789
|
+
},
|
|
3790
|
+
"subscriptionStatus": {
|
|
3791
|
+
"type": "string",
|
|
3792
|
+
"enum": [
|
|
3793
|
+
"inactive",
|
|
3794
|
+
"trialing",
|
|
3795
|
+
"active",
|
|
3796
|
+
"past_due",
|
|
3797
|
+
"canceled",
|
|
3798
|
+
"unpaid",
|
|
3799
|
+
"incomplete",
|
|
3800
|
+
"incomplete_expired",
|
|
3801
|
+
"paused"
|
|
3802
|
+
]
|
|
3803
|
+
}
|
|
3804
|
+
}
|
|
3805
|
+
}
|
|
3806
|
+
},
|
|
3807
|
+
"securitySchemes": {
|
|
3808
|
+
"bearerAuth": {
|
|
3809
|
+
"type": "http",
|
|
3810
|
+
"scheme": "bearer",
|
|
3811
|
+
"bearerFormat": "stree_<43 base64url chars>",
|
|
3812
|
+
"description": "A SynapseTree API key: `Authorization: Bearer stree_…`."
|
|
3813
|
+
}
|
|
3814
|
+
}
|
|
3815
|
+
},
|
|
3816
|
+
"tags": [
|
|
3817
|
+
{
|
|
3818
|
+
"name": "memory",
|
|
3819
|
+
"description": "Search, ingest, and record memory."
|
|
3820
|
+
},
|
|
3821
|
+
{
|
|
3822
|
+
"name": "facts",
|
|
3823
|
+
"description": "Individual facts, their history, and temporal supersession."
|
|
3824
|
+
},
|
|
3825
|
+
{
|
|
3826
|
+
"name": "graph",
|
|
3827
|
+
"description": "Graph traversal and deterministic graph writes."
|
|
3828
|
+
},
|
|
3829
|
+
{
|
|
3830
|
+
"name": "namespaces",
|
|
3831
|
+
"description": "Namespaces inside the tenant database."
|
|
3832
|
+
},
|
|
3833
|
+
{
|
|
3834
|
+
"name": "account",
|
|
3835
|
+
"description": "The calling key's routing context."
|
|
3836
|
+
},
|
|
3837
|
+
{
|
|
3838
|
+
"name": "agent",
|
|
3839
|
+
"description": "auth.md agent registration — an AI agent signs a user up and the human\nstays in charge. Unauthenticated registration, the RFC 8628-style claim\npoll, and RFC 7009 revocation.\n"
|
|
3840
|
+
}
|
|
3841
|
+
]
|
|
3842
|
+
}
|