@42ch/spoke-schemas 0.1.0-alpha.1
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 +201 -0
- package/dist/index.d.mts +2296 -0
- package/dist/index.d.ts +2296 -0
- package/dist/index.js +18 -0
- package/dist/index.mjs +0 -0
- package/package.json +48 -0
- package/src/generated/common/common.ts +159 -0
- package/src/generated/common/error-envelope.ts +36 -0
- package/src/generated/common/index.ts +8 -0
- package/src/generated/data/assemble-packet.ts +56 -0
- package/src/generated/data/finding.ts +109 -0
- package/src/generated/data/index.ts +13 -0
- package/src/generated/data/knowledge-entry.ts +111 -0
- package/src/generated/data/relation.ts +60 -0
- package/src/generated/data/rule.ts +103 -0
- package/src/generated/data/source-anchor.ts +52 -0
- package/src/generated/data/timeline-event.ts +151 -0
- package/src/generated/index.ts +9 -0
- package/src/generated/ops/assemble-request.ts +60 -0
- package/src/generated/ops/assemble-response.ts +109 -0
- package/src/generated/ops/check-request.ts +165 -0
- package/src/generated/ops/check-response.ts +165 -0
- package/src/generated/ops/compute-request.ts +41 -0
- package/src/generated/ops/compute-response.ts +90 -0
- package/src/generated/ops/index.ts +20 -0
- package/src/generated/ops/project-request.ts +37 -0
- package/src/generated/ops/project-response.ts +83 -0
- package/src/generated/ops/promote-request.ts +132 -0
- package/src/generated/ops/promote-response.ts +168 -0
- package/src/generated/ops/relate-request.ts +77 -0
- package/src/generated/ops/relate-response.ts +113 -0
- package/src/generated/ops/upsert-request.ts +137 -0
- package/src/generated/ops/upsert-response.ts +185 -0
- package/src/index.ts +4 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,2296 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
3
|
+
* Source: schemas/
|
|
4
|
+
* Generated by: pnpm run codegen
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Wire schema version (integer >= 1).
|
|
8
|
+
*
|
|
9
|
+
* This interface was referenced by `SPOKECommonTypes`'s JSON-Schema
|
|
10
|
+
* via the `definition` "SchemaVersion".
|
|
11
|
+
*/
|
|
12
|
+
type SchemaVersion = number;
|
|
13
|
+
/**
|
|
14
|
+
* RFC 3339 UTC datetime string.
|
|
15
|
+
*
|
|
16
|
+
* This interface was referenced by `SPOKECommonTypes`'s JSON-Schema
|
|
17
|
+
* via the `definition` "Timestamp".
|
|
18
|
+
*/
|
|
19
|
+
type Timestamp = string;
|
|
20
|
+
/**
|
|
21
|
+
* L5 Timeline projection tier (open string). Core vocabulary (documented, not enforced): brief, narrative, moment. Wire field name timeline_scale — not tier or projection.
|
|
22
|
+
*
|
|
23
|
+
* This interface was referenced by `SPOKECommonTypes`'s JSON-Schema
|
|
24
|
+
* via the `definition` "TimelineScale".
|
|
25
|
+
*/
|
|
26
|
+
type TimelineScale = string;
|
|
27
|
+
/**
|
|
28
|
+
* Opaque world-history branch identity (l5-fork).
|
|
29
|
+
*
|
|
30
|
+
* This interface was referenced by `SPOKECommonTypes`'s JSON-Schema
|
|
31
|
+
* via the `definition` "ForkId".
|
|
32
|
+
*/
|
|
33
|
+
type ForkId = string;
|
|
34
|
+
/**
|
|
35
|
+
* Shared type definitions for SPOKE wire schemas.
|
|
36
|
+
*/
|
|
37
|
+
interface SPOKECommonTypes {
|
|
38
|
+
[k: string]: unknown | undefined;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
42
|
+
*
|
|
43
|
+
* This interface was referenced by `SPOKECommonTypes`'s JSON-Schema
|
|
44
|
+
* via the `definition` "ExtensionMap".
|
|
45
|
+
*/
|
|
46
|
+
interface ExtensionMap$m {
|
|
47
|
+
[k: string]: {
|
|
48
|
+
[k: string]: unknown | undefined;
|
|
49
|
+
} | undefined;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* This interface was referenced by `SPOKECommonTypes`'s JSON-Schema
|
|
53
|
+
* via the `definition` "SourceSpan".
|
|
54
|
+
*/
|
|
55
|
+
interface SourceSpan$b {
|
|
56
|
+
/**
|
|
57
|
+
* Start offset (inclusive).
|
|
58
|
+
*/
|
|
59
|
+
start: number;
|
|
60
|
+
/**
|
|
61
|
+
* End offset (exclusive).
|
|
62
|
+
*/
|
|
63
|
+
end: number;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* This interface was referenced by `SPOKECommonTypes`'s JSON-Schema
|
|
67
|
+
* via the `definition` "Scope".
|
|
68
|
+
*/
|
|
69
|
+
interface Scope$2 {
|
|
70
|
+
/**
|
|
71
|
+
* Protocol-neutral opaque selector. Products map World/Book/chapter/manuscript ids via adapters or op extensions.
|
|
72
|
+
*/
|
|
73
|
+
scope_id: string;
|
|
74
|
+
/**
|
|
75
|
+
* Optional narrow scope to explicit KnowledgeEntries.
|
|
76
|
+
*/
|
|
77
|
+
entry_ids?: string[];
|
|
78
|
+
/**
|
|
79
|
+
* Optional filter by open entry_type vocabulary.
|
|
80
|
+
*/
|
|
81
|
+
entry_types?: string[];
|
|
82
|
+
/**
|
|
83
|
+
* Optional narrow scope to explicit L5 TimelineEvent ids.
|
|
84
|
+
*/
|
|
85
|
+
timeline_event_ids?: string[];
|
|
86
|
+
/**
|
|
87
|
+
* Optional provenance or manuscript locator scope.
|
|
88
|
+
*/
|
|
89
|
+
source_id?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Optional L5 tier filter (brief, narrative, moment).
|
|
92
|
+
*/
|
|
93
|
+
timeline_scale?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Optional L5 branch filter — strict equality on TimelineEvent.fork_id (l5-fork).
|
|
96
|
+
*/
|
|
97
|
+
fork_id?: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Open map of product-owned computable field names to domain values. Shared by KnowledgeEntry body.state and body.computable under l2-computable. Protocol does not require WASM bytecode or executable artifacts.
|
|
101
|
+
*
|
|
102
|
+
* This interface was referenced by `SPOKECommonTypes`'s JSON-Schema
|
|
103
|
+
* via the `definition` "ComputableFieldMap".
|
|
104
|
+
*/
|
|
105
|
+
interface ComputableFieldMap$9 {
|
|
106
|
+
[k: string]: unknown | undefined;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* This interface was referenced by `SPOKECommonTypes`'s JSON-Schema
|
|
110
|
+
* via the `definition` "ComputableLogChange".
|
|
111
|
+
*/
|
|
112
|
+
interface ComputableLogChange$1 {
|
|
113
|
+
/**
|
|
114
|
+
* Dot-path or JSON Pointer to changed field within body.computable.
|
|
115
|
+
*/
|
|
116
|
+
path: string;
|
|
117
|
+
/**
|
|
118
|
+
* Opaque JSON — value before change.
|
|
119
|
+
*/
|
|
120
|
+
previous?: {
|
|
121
|
+
[k: string]: unknown | undefined;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Opaque JSON — value after change.
|
|
125
|
+
*/
|
|
126
|
+
next?: {
|
|
127
|
+
[k: string]: unknown | undefined;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* This interface was referenced by `SPOKECommonTypes`'s JSON-Schema
|
|
132
|
+
* via the `definition` "ComputableLogEntry".
|
|
133
|
+
*/
|
|
134
|
+
interface ComputableLogEntry$1 {
|
|
135
|
+
/**
|
|
136
|
+
* When the computable field change was recorded (RFC 3339).
|
|
137
|
+
*/
|
|
138
|
+
logged_at: string;
|
|
139
|
+
/**
|
|
140
|
+
* KnowledgeEntry id whose computable fields changed.
|
|
141
|
+
*/
|
|
142
|
+
entry_id: string;
|
|
143
|
+
/**
|
|
144
|
+
* Field-level change records within body.computable.
|
|
145
|
+
*/
|
|
146
|
+
changes: ComputableLogChange$1[];
|
|
147
|
+
/**
|
|
148
|
+
* Opaque Session correlation (matches op session_id when omitted on parent context).
|
|
149
|
+
*/
|
|
150
|
+
session_id?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Human-readable presentation note (presentation only).
|
|
153
|
+
*/
|
|
154
|
+
message?: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
159
|
+
* Source: schemas/
|
|
160
|
+
* Generated by: pnpm run codegen
|
|
161
|
+
*/
|
|
162
|
+
/**
|
|
163
|
+
* Shared ops error shape. Ops responses use either a success payload or a top-level error field — not both.
|
|
164
|
+
*/
|
|
165
|
+
interface ErrorEnvelope$7 {
|
|
166
|
+
/**
|
|
167
|
+
* Machine-readable error code.
|
|
168
|
+
*/
|
|
169
|
+
code: string;
|
|
170
|
+
/**
|
|
171
|
+
* Human-readable error message.
|
|
172
|
+
*/
|
|
173
|
+
message: string;
|
|
174
|
+
/**
|
|
175
|
+
* Optional structured error context.
|
|
176
|
+
*/
|
|
177
|
+
details?: {
|
|
178
|
+
[k: string]: unknown | undefined;
|
|
179
|
+
};
|
|
180
|
+
extensions: ExtensionMap$l;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
184
|
+
*/
|
|
185
|
+
interface ExtensionMap$l {
|
|
186
|
+
[k: string]: {
|
|
187
|
+
[k: string]: unknown | undefined;
|
|
188
|
+
} | undefined;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
193
|
+
* Source: schemas/
|
|
194
|
+
* Generated by: pnpm run codegen
|
|
195
|
+
*/
|
|
196
|
+
/**
|
|
197
|
+
* Wire-only context-assembly payload. No ranking, retrieval, or token-budget fields in v0.1.
|
|
198
|
+
*/
|
|
199
|
+
interface AssemblePacket$1 {
|
|
200
|
+
/**
|
|
201
|
+
* Wire schema version (integer >= 1).
|
|
202
|
+
*/
|
|
203
|
+
schema_version: number;
|
|
204
|
+
/**
|
|
205
|
+
* Stable packet id.
|
|
206
|
+
*/
|
|
207
|
+
packet_id: string;
|
|
208
|
+
/**
|
|
209
|
+
* Slim context entries (default). Full KnowledgeEntry embedding is op-specific.
|
|
210
|
+
*/
|
|
211
|
+
entries: AssembleEntry$1[];
|
|
212
|
+
extensions: ExtensionMap$k;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* This interface was referenced by `AssemblePacket`'s JSON-Schema
|
|
216
|
+
* via the `definition` "AssembleEntry".
|
|
217
|
+
*/
|
|
218
|
+
interface AssembleEntry$1 {
|
|
219
|
+
/**
|
|
220
|
+
* Referenced KnowledgeEntry id.
|
|
221
|
+
*/
|
|
222
|
+
entry_id: string;
|
|
223
|
+
/**
|
|
224
|
+
* Open string. Same core vocabulary as KnowledgeEntry.entry_type.
|
|
225
|
+
*/
|
|
226
|
+
entry_type: string;
|
|
227
|
+
/**
|
|
228
|
+
* Display name for context window.
|
|
229
|
+
*/
|
|
230
|
+
canonical_name: string;
|
|
231
|
+
/**
|
|
232
|
+
* Optional trimmed text for context window.
|
|
233
|
+
*/
|
|
234
|
+
snippet?: string;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
238
|
+
*/
|
|
239
|
+
interface ExtensionMap$k {
|
|
240
|
+
[k: string]: {
|
|
241
|
+
[k: string]: unknown | undefined;
|
|
242
|
+
} | undefined;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
247
|
+
* Source: schemas/
|
|
248
|
+
* Generated by: pnpm run codegen
|
|
249
|
+
*/
|
|
250
|
+
/**
|
|
251
|
+
* Checker output — not a KnowledgeEntry body.
|
|
252
|
+
*/
|
|
253
|
+
interface Finding$1 {
|
|
254
|
+
/**
|
|
255
|
+
* Wire schema version (integer >= 1).
|
|
256
|
+
*/
|
|
257
|
+
schema_version: number;
|
|
258
|
+
/**
|
|
259
|
+
* Stable finding id.
|
|
260
|
+
*/
|
|
261
|
+
finding_id: string;
|
|
262
|
+
/**
|
|
263
|
+
* Open string. Core vocabulary (documented, not enforced): info, warning, error.
|
|
264
|
+
*/
|
|
265
|
+
severity: string;
|
|
266
|
+
/**
|
|
267
|
+
* Open string. Core vocabulary (documented, not enforced): open, resolved, dismissed.
|
|
268
|
+
*/
|
|
269
|
+
status: string;
|
|
270
|
+
/**
|
|
271
|
+
* Short finding title.
|
|
272
|
+
*/
|
|
273
|
+
title: string;
|
|
274
|
+
/**
|
|
275
|
+
* Finding detail text.
|
|
276
|
+
*/
|
|
277
|
+
description: string;
|
|
278
|
+
/**
|
|
279
|
+
* Optional checker kind or category.
|
|
280
|
+
*/
|
|
281
|
+
kind?: string;
|
|
282
|
+
/**
|
|
283
|
+
* Optional KnowledgeEntry the finding targets.
|
|
284
|
+
*/
|
|
285
|
+
target_entry_id?: string;
|
|
286
|
+
source_anchor?: SourceAnchor$a;
|
|
287
|
+
/**
|
|
288
|
+
* Optional suggested remediation text.
|
|
289
|
+
*/
|
|
290
|
+
suggested_fix?: string;
|
|
291
|
+
/**
|
|
292
|
+
* Optional position hint within source text.
|
|
293
|
+
*/
|
|
294
|
+
text_position?: {
|
|
295
|
+
[k: string]: unknown | undefined;
|
|
296
|
+
};
|
|
297
|
+
/**
|
|
298
|
+
* RFC 3339 UTC datetime string.
|
|
299
|
+
*/
|
|
300
|
+
created_at?: string;
|
|
301
|
+
/**
|
|
302
|
+
* RFC 3339 UTC datetime string.
|
|
303
|
+
*/
|
|
304
|
+
updated_at?: string;
|
|
305
|
+
extensions: ExtensionMap$j;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Optional provenance pointer.
|
|
309
|
+
*/
|
|
310
|
+
interface SourceAnchor$a {
|
|
311
|
+
/**
|
|
312
|
+
* Wire schema version (integer >= 1).
|
|
313
|
+
*/
|
|
314
|
+
schema_version: number;
|
|
315
|
+
/**
|
|
316
|
+
* Opaque source locator; products define grammar.
|
|
317
|
+
*/
|
|
318
|
+
source_id: string;
|
|
319
|
+
span?: SourceSpan$a;
|
|
320
|
+
/**
|
|
321
|
+
* Optional human label for the anchor.
|
|
322
|
+
*/
|
|
323
|
+
label?: string;
|
|
324
|
+
/**
|
|
325
|
+
* Optional MIME type of the referenced source.
|
|
326
|
+
*/
|
|
327
|
+
mime_type?: string;
|
|
328
|
+
extensions: ExtensionMap$j;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Optional byte or character span within the source.
|
|
332
|
+
*/
|
|
333
|
+
interface SourceSpan$a {
|
|
334
|
+
/**
|
|
335
|
+
* Start offset (inclusive).
|
|
336
|
+
*/
|
|
337
|
+
start: number;
|
|
338
|
+
/**
|
|
339
|
+
* End offset (exclusive).
|
|
340
|
+
*/
|
|
341
|
+
end: number;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
345
|
+
*/
|
|
346
|
+
interface ExtensionMap$j {
|
|
347
|
+
[k: string]: {
|
|
348
|
+
[k: string]: unknown | undefined;
|
|
349
|
+
} | undefined;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
354
|
+
* Source: schemas/
|
|
355
|
+
* Generated by: pnpm run codegen
|
|
356
|
+
*/
|
|
357
|
+
/**
|
|
358
|
+
* Atomic narrative knowledge unit: identity, typed body, provenance envelope.
|
|
359
|
+
*/
|
|
360
|
+
interface KnowledgeEntry$4 {
|
|
361
|
+
/**
|
|
362
|
+
* Wire schema version (integer >= 1).
|
|
363
|
+
*/
|
|
364
|
+
schema_version: number;
|
|
365
|
+
/**
|
|
366
|
+
* Stable KnowledgeEntry id (opaque to protocol).
|
|
367
|
+
*/
|
|
368
|
+
entry_id: string;
|
|
369
|
+
/**
|
|
370
|
+
* Open string. Core vocabulary (documented, not enforced): character, location, event (ontology label; ≠ TimelineEvent wire object), scene, act, organization, item, conflict, info_point, era, worldbuilding, note, research, ability, rule (ontology label; ≠ L6 Rule wire object). Products MAY emit values outside this list.
|
|
371
|
+
*/
|
|
372
|
+
entry_type: string;
|
|
373
|
+
/**
|
|
374
|
+
* Human-stable name.
|
|
375
|
+
*/
|
|
376
|
+
canonical_name: string;
|
|
377
|
+
/**
|
|
378
|
+
* Open string. Core vocabulary (documented, not enforced): provisional, confirmed, deprecated, merged, deleted.
|
|
379
|
+
*/
|
|
380
|
+
status: string;
|
|
381
|
+
/**
|
|
382
|
+
* Structured payload. Typed attributes (summary, tags, attributes) live here — not as protocol siblings. Under l2-computable: optional state (static durable computable) and computable (dynamic Session-scoped projection).
|
|
383
|
+
*/
|
|
384
|
+
body: {
|
|
385
|
+
state?: ComputableFieldMap$8;
|
|
386
|
+
computable?: ComputableFieldMap1$5;
|
|
387
|
+
[k: string]: unknown | undefined;
|
|
388
|
+
};
|
|
389
|
+
source_anchor?: SourceAnchor$9;
|
|
390
|
+
/**
|
|
391
|
+
* Optimistic concurrency revision.
|
|
392
|
+
*/
|
|
393
|
+
revision?: number;
|
|
394
|
+
/**
|
|
395
|
+
* RFC 3339 UTC datetime string.
|
|
396
|
+
*/
|
|
397
|
+
created_at?: string;
|
|
398
|
+
/**
|
|
399
|
+
* RFC 3339 UTC datetime string.
|
|
400
|
+
*/
|
|
401
|
+
updated_at?: string;
|
|
402
|
+
extensions: ExtensionMap$i;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Static durable computable state (l2-computable optional). Authoritative pre-Session and after settle.
|
|
406
|
+
*/
|
|
407
|
+
interface ComputableFieldMap$8 {
|
|
408
|
+
[k: string]: unknown | undefined;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Dynamic Session-scoped computable projection (l2-computable optional). Absent or inert pre-Session; mutates mid-Session only.
|
|
412
|
+
*/
|
|
413
|
+
interface ComputableFieldMap1$5 {
|
|
414
|
+
[k: string]: unknown | undefined;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Optional provenance pointer.
|
|
418
|
+
*/
|
|
419
|
+
interface SourceAnchor$9 {
|
|
420
|
+
/**
|
|
421
|
+
* Wire schema version (integer >= 1).
|
|
422
|
+
*/
|
|
423
|
+
schema_version: number;
|
|
424
|
+
/**
|
|
425
|
+
* Opaque source locator; products define grammar.
|
|
426
|
+
*/
|
|
427
|
+
source_id: string;
|
|
428
|
+
span?: SourceSpan$9;
|
|
429
|
+
/**
|
|
430
|
+
* Optional human label for the anchor.
|
|
431
|
+
*/
|
|
432
|
+
label?: string;
|
|
433
|
+
/**
|
|
434
|
+
* Optional MIME type of the referenced source.
|
|
435
|
+
*/
|
|
436
|
+
mime_type?: string;
|
|
437
|
+
extensions: ExtensionMap$i;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Optional byte or character span within the source.
|
|
441
|
+
*/
|
|
442
|
+
interface SourceSpan$9 {
|
|
443
|
+
/**
|
|
444
|
+
* Start offset (inclusive).
|
|
445
|
+
*/
|
|
446
|
+
start: number;
|
|
447
|
+
/**
|
|
448
|
+
* End offset (exclusive).
|
|
449
|
+
*/
|
|
450
|
+
end: number;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
454
|
+
*/
|
|
455
|
+
interface ExtensionMap$i {
|
|
456
|
+
[k: string]: {
|
|
457
|
+
[k: string]: unknown | undefined;
|
|
458
|
+
} | undefined;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
463
|
+
* Source: schemas/
|
|
464
|
+
* Generated by: pnpm run codegen
|
|
465
|
+
*/
|
|
466
|
+
/**
|
|
467
|
+
* Directed edge between two KnowledgeEntries (or KnowledgeEntry and source anchor).
|
|
468
|
+
*/
|
|
469
|
+
interface Relation$2 {
|
|
470
|
+
/**
|
|
471
|
+
* Wire schema version (integer >= 1).
|
|
472
|
+
*/
|
|
473
|
+
schema_version: number;
|
|
474
|
+
/**
|
|
475
|
+
* Stable relation id.
|
|
476
|
+
*/
|
|
477
|
+
relation_id: string;
|
|
478
|
+
/**
|
|
479
|
+
* Open string. Core vocabulary (documented, not enforced): related_to, parent_of, member_of, located_in, participates_in, causes, foreshadows.
|
|
480
|
+
*/
|
|
481
|
+
relation_type: string;
|
|
482
|
+
/**
|
|
483
|
+
* Source endpoint id (KnowledgeEntry or anchor id).
|
|
484
|
+
*/
|
|
485
|
+
from_id: string;
|
|
486
|
+
/**
|
|
487
|
+
* Target endpoint id (KnowledgeEntry or anchor id).
|
|
488
|
+
*/
|
|
489
|
+
to_id: string;
|
|
490
|
+
/**
|
|
491
|
+
* Optional human label.
|
|
492
|
+
*/
|
|
493
|
+
label?: string;
|
|
494
|
+
/**
|
|
495
|
+
* Optional open metadata bag.
|
|
496
|
+
*/
|
|
497
|
+
metadata?: {
|
|
498
|
+
[k: string]: unknown | undefined;
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* RFC 3339 UTC datetime string.
|
|
502
|
+
*/
|
|
503
|
+
created_at?: string;
|
|
504
|
+
/**
|
|
505
|
+
* RFC 3339 UTC datetime string.
|
|
506
|
+
*/
|
|
507
|
+
updated_at?: string;
|
|
508
|
+
extensions: ExtensionMap$h;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
512
|
+
*/
|
|
513
|
+
interface ExtensionMap$h {
|
|
514
|
+
[k: string]: {
|
|
515
|
+
[k: string]: unknown | undefined;
|
|
516
|
+
} | undefined;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
521
|
+
* Source: schemas/
|
|
522
|
+
* Generated by: pnpm run codegen
|
|
523
|
+
*/
|
|
524
|
+
/**
|
|
525
|
+
* Declarative constraint input to check — never checker output.
|
|
526
|
+
*/
|
|
527
|
+
interface Rule$1 {
|
|
528
|
+
/**
|
|
529
|
+
* Wire schema version (integer >= 1).
|
|
530
|
+
*/
|
|
531
|
+
schema_version: number;
|
|
532
|
+
/**
|
|
533
|
+
* Stable rule id (opaque to protocol).
|
|
534
|
+
*/
|
|
535
|
+
rule_id: string;
|
|
536
|
+
/**
|
|
537
|
+
* Human-stable name.
|
|
538
|
+
*/
|
|
539
|
+
canonical_name: string;
|
|
540
|
+
/**
|
|
541
|
+
* Open string. Core vocabulary (documented, not enforced): rule, prohibition, style.
|
|
542
|
+
*/
|
|
543
|
+
kind: string;
|
|
544
|
+
/**
|
|
545
|
+
* Declarative constraint text (human- or machine-readable; products choose grammar).
|
|
546
|
+
*/
|
|
547
|
+
statement?: string;
|
|
548
|
+
/**
|
|
549
|
+
* Longer explanation for integrators or authors.
|
|
550
|
+
*/
|
|
551
|
+
description?: string;
|
|
552
|
+
/**
|
|
553
|
+
* Optional ontology filter — open strings matching KnowledgeEntry entry_type vocabulary.
|
|
554
|
+
*/
|
|
555
|
+
target_entry_types?: string[];
|
|
556
|
+
/**
|
|
557
|
+
* Optional checker hint. Core vocabulary (documented, not enforced): info, warning, error.
|
|
558
|
+
*/
|
|
559
|
+
severity_hint?: string;
|
|
560
|
+
source_anchor?: SourceAnchor$8;
|
|
561
|
+
/**
|
|
562
|
+
* Open string. Core vocabulary (documented, not enforced): draft, active, deprecated.
|
|
563
|
+
*/
|
|
564
|
+
status?: string;
|
|
565
|
+
/**
|
|
566
|
+
* RFC 3339 UTC datetime string.
|
|
567
|
+
*/
|
|
568
|
+
created_at?: string;
|
|
569
|
+
/**
|
|
570
|
+
* RFC 3339 UTC datetime string.
|
|
571
|
+
*/
|
|
572
|
+
updated_at?: string;
|
|
573
|
+
extensions: ExtensionMap$g;
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Optional provenance pointer when rule is anchored to manuscript.
|
|
577
|
+
*/
|
|
578
|
+
interface SourceAnchor$8 {
|
|
579
|
+
/**
|
|
580
|
+
* Wire schema version (integer >= 1).
|
|
581
|
+
*/
|
|
582
|
+
schema_version: number;
|
|
583
|
+
/**
|
|
584
|
+
* Opaque source locator; products define grammar.
|
|
585
|
+
*/
|
|
586
|
+
source_id: string;
|
|
587
|
+
span?: SourceSpan$8;
|
|
588
|
+
/**
|
|
589
|
+
* Optional human label for the anchor.
|
|
590
|
+
*/
|
|
591
|
+
label?: string;
|
|
592
|
+
/**
|
|
593
|
+
* Optional MIME type of the referenced source.
|
|
594
|
+
*/
|
|
595
|
+
mime_type?: string;
|
|
596
|
+
extensions: ExtensionMap$g;
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Optional byte or character span within the source.
|
|
600
|
+
*/
|
|
601
|
+
interface SourceSpan$8 {
|
|
602
|
+
/**
|
|
603
|
+
* Start offset (inclusive).
|
|
604
|
+
*/
|
|
605
|
+
start: number;
|
|
606
|
+
/**
|
|
607
|
+
* End offset (exclusive).
|
|
608
|
+
*/
|
|
609
|
+
end: number;
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
613
|
+
*/
|
|
614
|
+
interface ExtensionMap$g {
|
|
615
|
+
[k: string]: {
|
|
616
|
+
[k: string]: unknown | undefined;
|
|
617
|
+
} | undefined;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
622
|
+
* Source: schemas/
|
|
623
|
+
* Generated by: pnpm run codegen
|
|
624
|
+
*/
|
|
625
|
+
/**
|
|
626
|
+
* Pointer to a source artifact span (manuscript, scene, external URI).
|
|
627
|
+
*/
|
|
628
|
+
interface SourceAnchor$7 {
|
|
629
|
+
/**
|
|
630
|
+
* Wire schema version (integer >= 1).
|
|
631
|
+
*/
|
|
632
|
+
schema_version: number;
|
|
633
|
+
/**
|
|
634
|
+
* Opaque source locator; products define grammar.
|
|
635
|
+
*/
|
|
636
|
+
source_id: string;
|
|
637
|
+
span?: SourceSpan$7;
|
|
638
|
+
/**
|
|
639
|
+
* Optional human label for the anchor.
|
|
640
|
+
*/
|
|
641
|
+
label?: string;
|
|
642
|
+
/**
|
|
643
|
+
* Optional MIME type of the referenced source.
|
|
644
|
+
*/
|
|
645
|
+
mime_type?: string;
|
|
646
|
+
extensions: ExtensionMap$f;
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* Optional byte or character span within the source.
|
|
650
|
+
*/
|
|
651
|
+
interface SourceSpan$7 {
|
|
652
|
+
/**
|
|
653
|
+
* Start offset (inclusive).
|
|
654
|
+
*/
|
|
655
|
+
start: number;
|
|
656
|
+
/**
|
|
657
|
+
* End offset (exclusive).
|
|
658
|
+
*/
|
|
659
|
+
end: number;
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
663
|
+
*/
|
|
664
|
+
interface ExtensionMap$f {
|
|
665
|
+
[k: string]: {
|
|
666
|
+
[k: string]: unknown | undefined;
|
|
667
|
+
} | undefined;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
672
|
+
* Source: schemas/
|
|
673
|
+
* Generated by: pnpm run codegen
|
|
674
|
+
*/
|
|
675
|
+
/**
|
|
676
|
+
* First-class when-axis temporal object (L5). Distinct from KnowledgeEntry ontology labels such as entry_type: "event" (KB fact node, not this wire type).
|
|
677
|
+
*/
|
|
678
|
+
interface TimelineEvent {
|
|
679
|
+
/**
|
|
680
|
+
* Wire schema version (integer >= 1).
|
|
681
|
+
*/
|
|
682
|
+
schema_version: number;
|
|
683
|
+
/**
|
|
684
|
+
* Stable TimelineEvent id (opaque to protocol).
|
|
685
|
+
*/
|
|
686
|
+
timeline_event_id: string;
|
|
687
|
+
/**
|
|
688
|
+
* Human-stable label.
|
|
689
|
+
*/
|
|
690
|
+
canonical_name: string;
|
|
691
|
+
/**
|
|
692
|
+
* Optional L5 projection tier (brief, narrative, moment).
|
|
693
|
+
*/
|
|
694
|
+
timeline_scale?: string;
|
|
695
|
+
/**
|
|
696
|
+
* When the event happened — RFC 3339 or opaque fuzzy label (e.g. Third Age).
|
|
697
|
+
*/
|
|
698
|
+
occurred_at?: string;
|
|
699
|
+
/**
|
|
700
|
+
* Longer narrative summary.
|
|
701
|
+
*/
|
|
702
|
+
description?: string;
|
|
703
|
+
/**
|
|
704
|
+
* Related KnowledgeEntry ids (characters, locations, etc.).
|
|
705
|
+
*/
|
|
706
|
+
participant_entry_ids?: string[];
|
|
707
|
+
source_anchor?: SourceAnchor$6;
|
|
708
|
+
/**
|
|
709
|
+
* Opaque ordering hint within a timeline (products define grammar).
|
|
710
|
+
*/
|
|
711
|
+
sort_key?: string;
|
|
712
|
+
/**
|
|
713
|
+
* Optional world-history branch identity (l5-fork).
|
|
714
|
+
*/
|
|
715
|
+
fork_id?: string;
|
|
716
|
+
/**
|
|
717
|
+
* Optional parent/base branch reference when product records fork lineage on the event.
|
|
718
|
+
*/
|
|
719
|
+
parent_fork_id?: string;
|
|
720
|
+
/**
|
|
721
|
+
* Optional Moment-scale presentation of computable field change history (l2-computable only). Not Finding-shaped.
|
|
722
|
+
*/
|
|
723
|
+
computable_logs?: ComputableLogEntry[];
|
|
724
|
+
/**
|
|
725
|
+
* RFC 3339 UTC datetime string.
|
|
726
|
+
*/
|
|
727
|
+
created_at?: string;
|
|
728
|
+
/**
|
|
729
|
+
* RFC 3339 UTC datetime string.
|
|
730
|
+
*/
|
|
731
|
+
updated_at?: string;
|
|
732
|
+
extensions: ExtensionMap$e;
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Optional manuscript or scene anchor.
|
|
736
|
+
*/
|
|
737
|
+
interface SourceAnchor$6 {
|
|
738
|
+
/**
|
|
739
|
+
* Wire schema version (integer >= 1).
|
|
740
|
+
*/
|
|
741
|
+
schema_version: number;
|
|
742
|
+
/**
|
|
743
|
+
* Opaque source locator; products define grammar.
|
|
744
|
+
*/
|
|
745
|
+
source_id: string;
|
|
746
|
+
span?: SourceSpan$6;
|
|
747
|
+
/**
|
|
748
|
+
* Optional human label for the anchor.
|
|
749
|
+
*/
|
|
750
|
+
label?: string;
|
|
751
|
+
/**
|
|
752
|
+
* Optional MIME type of the referenced source.
|
|
753
|
+
*/
|
|
754
|
+
mime_type?: string;
|
|
755
|
+
extensions: ExtensionMap$e;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Optional byte or character span within the source.
|
|
759
|
+
*/
|
|
760
|
+
interface SourceSpan$6 {
|
|
761
|
+
/**
|
|
762
|
+
* Start offset (inclusive).
|
|
763
|
+
*/
|
|
764
|
+
start: number;
|
|
765
|
+
/**
|
|
766
|
+
* End offset (exclusive).
|
|
767
|
+
*/
|
|
768
|
+
end: number;
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
772
|
+
*/
|
|
773
|
+
interface ExtensionMap$e {
|
|
774
|
+
[k: string]: {
|
|
775
|
+
[k: string]: unknown | undefined;
|
|
776
|
+
} | undefined;
|
|
777
|
+
}
|
|
778
|
+
interface ComputableLogEntry {
|
|
779
|
+
/**
|
|
780
|
+
* When the computable field change was recorded (RFC 3339).
|
|
781
|
+
*/
|
|
782
|
+
logged_at: string;
|
|
783
|
+
/**
|
|
784
|
+
* KnowledgeEntry id whose computable fields changed.
|
|
785
|
+
*/
|
|
786
|
+
entry_id: string;
|
|
787
|
+
/**
|
|
788
|
+
* Field-level change records within body.computable.
|
|
789
|
+
*/
|
|
790
|
+
changes: ComputableLogChange[];
|
|
791
|
+
/**
|
|
792
|
+
* Opaque Session correlation (matches op session_id when omitted on parent context).
|
|
793
|
+
*/
|
|
794
|
+
session_id?: string;
|
|
795
|
+
/**
|
|
796
|
+
* Human-readable presentation note (presentation only).
|
|
797
|
+
*/
|
|
798
|
+
message?: string;
|
|
799
|
+
}
|
|
800
|
+
interface ComputableLogChange {
|
|
801
|
+
/**
|
|
802
|
+
* Dot-path or JSON Pointer to changed field within body.computable.
|
|
803
|
+
*/
|
|
804
|
+
path: string;
|
|
805
|
+
/**
|
|
806
|
+
* Opaque JSON — value before change.
|
|
807
|
+
*/
|
|
808
|
+
previous?: {
|
|
809
|
+
[k: string]: unknown | undefined;
|
|
810
|
+
};
|
|
811
|
+
/**
|
|
812
|
+
* Opaque JSON — value after change.
|
|
813
|
+
*/
|
|
814
|
+
next?: {
|
|
815
|
+
[k: string]: unknown | undefined;
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
821
|
+
* Source: schemas/
|
|
822
|
+
* Generated by: pnpm run codegen
|
|
823
|
+
*/
|
|
824
|
+
/**
|
|
825
|
+
* Selector hints for context assembly. Wire-only — no compute semantics.
|
|
826
|
+
*/
|
|
827
|
+
interface AssembleRequest {
|
|
828
|
+
scope: Scope$1;
|
|
829
|
+
/**
|
|
830
|
+
* Optional entry limit hint (not enforced by protocol).
|
|
831
|
+
*/
|
|
832
|
+
max_entries?: number;
|
|
833
|
+
extensions?: ExtensionMap$d;
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* Assembly scope selector.
|
|
837
|
+
*/
|
|
838
|
+
interface Scope$1 {
|
|
839
|
+
/**
|
|
840
|
+
* Protocol-neutral opaque selector. Products map World/Book/chapter/manuscript ids via adapters or op extensions.
|
|
841
|
+
*/
|
|
842
|
+
scope_id: string;
|
|
843
|
+
/**
|
|
844
|
+
* Optional narrow scope to explicit KnowledgeEntries.
|
|
845
|
+
*/
|
|
846
|
+
entry_ids?: string[];
|
|
847
|
+
/**
|
|
848
|
+
* Optional filter by open entry_type vocabulary.
|
|
849
|
+
*/
|
|
850
|
+
entry_types?: string[];
|
|
851
|
+
/**
|
|
852
|
+
* Optional narrow scope to explicit L5 TimelineEvent ids.
|
|
853
|
+
*/
|
|
854
|
+
timeline_event_ids?: string[];
|
|
855
|
+
/**
|
|
856
|
+
* Optional provenance or manuscript locator scope.
|
|
857
|
+
*/
|
|
858
|
+
source_id?: string;
|
|
859
|
+
/**
|
|
860
|
+
* Optional L5 tier filter (brief, narrative, moment).
|
|
861
|
+
*/
|
|
862
|
+
timeline_scale?: string;
|
|
863
|
+
/**
|
|
864
|
+
* Optional L5 branch filter — strict equality on TimelineEvent.fork_id (l5-fork).
|
|
865
|
+
*/
|
|
866
|
+
fork_id?: string;
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Optional transport metadata.
|
|
870
|
+
*/
|
|
871
|
+
interface ExtensionMap$d {
|
|
872
|
+
[k: string]: {
|
|
873
|
+
[k: string]: unknown | undefined;
|
|
874
|
+
} | undefined;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
879
|
+
* Source: schemas/
|
|
880
|
+
* Generated by: pnpm run codegen
|
|
881
|
+
*/
|
|
882
|
+
/**
|
|
883
|
+
* Assemble success packet or wire error. Use packet OR error — not both.
|
|
884
|
+
*/
|
|
885
|
+
type AssembleResponse = {
|
|
886
|
+
packet: AssemblePacket;
|
|
887
|
+
extensions?: ExtensionMap1$a;
|
|
888
|
+
} | {
|
|
889
|
+
error: ErrorEnvelope$6;
|
|
890
|
+
extensions?: ExtensionMap2$6;
|
|
891
|
+
};
|
|
892
|
+
/**
|
|
893
|
+
* Success: assembled context packet.
|
|
894
|
+
*/
|
|
895
|
+
interface AssemblePacket {
|
|
896
|
+
/**
|
|
897
|
+
* Wire schema version (integer >= 1).
|
|
898
|
+
*/
|
|
899
|
+
schema_version: number;
|
|
900
|
+
/**
|
|
901
|
+
* Stable packet id.
|
|
902
|
+
*/
|
|
903
|
+
packet_id: string;
|
|
904
|
+
/**
|
|
905
|
+
* Slim context entries (default). Full KnowledgeEntry embedding is op-specific.
|
|
906
|
+
*/
|
|
907
|
+
entries: AssembleEntry[];
|
|
908
|
+
extensions: ExtensionMap$c;
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* This interface was referenced by `AssemblePacket`'s JSON-Schema
|
|
912
|
+
* via the `definition` "AssembleEntry".
|
|
913
|
+
*/
|
|
914
|
+
interface AssembleEntry {
|
|
915
|
+
/**
|
|
916
|
+
* Referenced KnowledgeEntry id.
|
|
917
|
+
*/
|
|
918
|
+
entry_id: string;
|
|
919
|
+
/**
|
|
920
|
+
* Open string. Same core vocabulary as KnowledgeEntry.entry_type.
|
|
921
|
+
*/
|
|
922
|
+
entry_type: string;
|
|
923
|
+
/**
|
|
924
|
+
* Display name for context window.
|
|
925
|
+
*/
|
|
926
|
+
canonical_name: string;
|
|
927
|
+
/**
|
|
928
|
+
* Optional trimmed text for context window.
|
|
929
|
+
*/
|
|
930
|
+
snippet?: string;
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
934
|
+
*/
|
|
935
|
+
interface ExtensionMap$c {
|
|
936
|
+
[k: string]: {
|
|
937
|
+
[k: string]: unknown | undefined;
|
|
938
|
+
} | undefined;
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
942
|
+
*/
|
|
943
|
+
interface ExtensionMap1$a {
|
|
944
|
+
[k: string]: {
|
|
945
|
+
[k: string]: unknown | undefined;
|
|
946
|
+
} | undefined;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* Failure: shared error envelope.
|
|
950
|
+
*/
|
|
951
|
+
interface ErrorEnvelope$6 {
|
|
952
|
+
/**
|
|
953
|
+
* Machine-readable error code.
|
|
954
|
+
*/
|
|
955
|
+
code: string;
|
|
956
|
+
/**
|
|
957
|
+
* Human-readable error message.
|
|
958
|
+
*/
|
|
959
|
+
message: string;
|
|
960
|
+
/**
|
|
961
|
+
* Optional structured error context.
|
|
962
|
+
*/
|
|
963
|
+
details?: {
|
|
964
|
+
[k: string]: unknown | undefined;
|
|
965
|
+
};
|
|
966
|
+
extensions: ExtensionMap$c;
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
969
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
970
|
+
*/
|
|
971
|
+
interface ExtensionMap2$6 {
|
|
972
|
+
[k: string]: {
|
|
973
|
+
[k: string]: unknown | undefined;
|
|
974
|
+
} | undefined;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
979
|
+
* Source: schemas/
|
|
980
|
+
* Generated by: pnpm run codegen
|
|
981
|
+
*/
|
|
982
|
+
/**
|
|
983
|
+
* Run checker(s) over a scope; returns Finding(s).
|
|
984
|
+
*/
|
|
985
|
+
interface CheckRequest {
|
|
986
|
+
scope: Scope;
|
|
987
|
+
/**
|
|
988
|
+
* Opaque rule ids or URIs. Resolved by receiver when not overridden by rules[].
|
|
989
|
+
*/
|
|
990
|
+
rule_refs?: string[];
|
|
991
|
+
/**
|
|
992
|
+
* Optional embedded Rule objects for portable interchange.
|
|
993
|
+
*/
|
|
994
|
+
rules?: Rule[];
|
|
995
|
+
/**
|
|
996
|
+
* Optional checker kind filters.
|
|
997
|
+
*/
|
|
998
|
+
checker_kinds?: string[];
|
|
999
|
+
extensions?: ExtensionMap1$9;
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* Checker scope selector.
|
|
1003
|
+
*/
|
|
1004
|
+
interface Scope {
|
|
1005
|
+
/**
|
|
1006
|
+
* Protocol-neutral opaque selector. Products map World/Book/chapter/manuscript ids via adapters or op extensions.
|
|
1007
|
+
*/
|
|
1008
|
+
scope_id: string;
|
|
1009
|
+
/**
|
|
1010
|
+
* Optional narrow scope to explicit KnowledgeEntries.
|
|
1011
|
+
*/
|
|
1012
|
+
entry_ids?: string[];
|
|
1013
|
+
/**
|
|
1014
|
+
* Optional filter by open entry_type vocabulary.
|
|
1015
|
+
*/
|
|
1016
|
+
entry_types?: string[];
|
|
1017
|
+
/**
|
|
1018
|
+
* Optional narrow scope to explicit L5 TimelineEvent ids.
|
|
1019
|
+
*/
|
|
1020
|
+
timeline_event_ids?: string[];
|
|
1021
|
+
/**
|
|
1022
|
+
* Optional provenance or manuscript locator scope.
|
|
1023
|
+
*/
|
|
1024
|
+
source_id?: string;
|
|
1025
|
+
/**
|
|
1026
|
+
* Optional L5 tier filter (brief, narrative, moment).
|
|
1027
|
+
*/
|
|
1028
|
+
timeline_scale?: string;
|
|
1029
|
+
/**
|
|
1030
|
+
* Optional L5 branch filter — strict equality on TimelineEvent.fork_id (l5-fork).
|
|
1031
|
+
*/
|
|
1032
|
+
fork_id?: string;
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Declarative constraint input to check — never checker output.
|
|
1036
|
+
*/
|
|
1037
|
+
interface Rule {
|
|
1038
|
+
/**
|
|
1039
|
+
* Wire schema version (integer >= 1).
|
|
1040
|
+
*/
|
|
1041
|
+
schema_version: number;
|
|
1042
|
+
/**
|
|
1043
|
+
* Stable rule id (opaque to protocol).
|
|
1044
|
+
*/
|
|
1045
|
+
rule_id: string;
|
|
1046
|
+
/**
|
|
1047
|
+
* Human-stable name.
|
|
1048
|
+
*/
|
|
1049
|
+
canonical_name: string;
|
|
1050
|
+
/**
|
|
1051
|
+
* Open string. Core vocabulary (documented, not enforced): rule, prohibition, style.
|
|
1052
|
+
*/
|
|
1053
|
+
kind: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* Declarative constraint text (human- or machine-readable; products choose grammar).
|
|
1056
|
+
*/
|
|
1057
|
+
statement?: string;
|
|
1058
|
+
/**
|
|
1059
|
+
* Longer explanation for integrators or authors.
|
|
1060
|
+
*/
|
|
1061
|
+
description?: string;
|
|
1062
|
+
/**
|
|
1063
|
+
* Optional ontology filter — open strings matching KnowledgeEntry entry_type vocabulary.
|
|
1064
|
+
*/
|
|
1065
|
+
target_entry_types?: string[];
|
|
1066
|
+
/**
|
|
1067
|
+
* Optional checker hint. Core vocabulary (documented, not enforced): info, warning, error.
|
|
1068
|
+
*/
|
|
1069
|
+
severity_hint?: string;
|
|
1070
|
+
source_anchor?: SourceAnchor$5;
|
|
1071
|
+
/**
|
|
1072
|
+
* Open string. Core vocabulary (documented, not enforced): draft, active, deprecated.
|
|
1073
|
+
*/
|
|
1074
|
+
status?: string;
|
|
1075
|
+
/**
|
|
1076
|
+
* RFC 3339 UTC datetime string.
|
|
1077
|
+
*/
|
|
1078
|
+
created_at?: string;
|
|
1079
|
+
/**
|
|
1080
|
+
* RFC 3339 UTC datetime string.
|
|
1081
|
+
*/
|
|
1082
|
+
updated_at?: string;
|
|
1083
|
+
extensions: ExtensionMap$b;
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Optional provenance pointer when rule is anchored to manuscript.
|
|
1087
|
+
*/
|
|
1088
|
+
interface SourceAnchor$5 {
|
|
1089
|
+
/**
|
|
1090
|
+
* Wire schema version (integer >= 1).
|
|
1091
|
+
*/
|
|
1092
|
+
schema_version: number;
|
|
1093
|
+
/**
|
|
1094
|
+
* Opaque source locator; products define grammar.
|
|
1095
|
+
*/
|
|
1096
|
+
source_id: string;
|
|
1097
|
+
span?: SourceSpan$5;
|
|
1098
|
+
/**
|
|
1099
|
+
* Optional human label for the anchor.
|
|
1100
|
+
*/
|
|
1101
|
+
label?: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* Optional MIME type of the referenced source.
|
|
1104
|
+
*/
|
|
1105
|
+
mime_type?: string;
|
|
1106
|
+
extensions: ExtensionMap$b;
|
|
1107
|
+
}
|
|
1108
|
+
/**
|
|
1109
|
+
* Optional byte or character span within the source.
|
|
1110
|
+
*/
|
|
1111
|
+
interface SourceSpan$5 {
|
|
1112
|
+
/**
|
|
1113
|
+
* Start offset (inclusive).
|
|
1114
|
+
*/
|
|
1115
|
+
start: number;
|
|
1116
|
+
/**
|
|
1117
|
+
* End offset (exclusive).
|
|
1118
|
+
*/
|
|
1119
|
+
end: number;
|
|
1120
|
+
}
|
|
1121
|
+
/**
|
|
1122
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1123
|
+
*/
|
|
1124
|
+
interface ExtensionMap$b {
|
|
1125
|
+
[k: string]: {
|
|
1126
|
+
[k: string]: unknown | undefined;
|
|
1127
|
+
} | undefined;
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1131
|
+
*/
|
|
1132
|
+
interface ExtensionMap1$9 {
|
|
1133
|
+
[k: string]: {
|
|
1134
|
+
[k: string]: unknown | undefined;
|
|
1135
|
+
} | undefined;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
1140
|
+
* Source: schemas/
|
|
1141
|
+
* Generated by: pnpm run codegen
|
|
1142
|
+
*/
|
|
1143
|
+
/**
|
|
1144
|
+
* Checker findings or wire error. Use findings OR error — not both.
|
|
1145
|
+
*/
|
|
1146
|
+
type CheckResponse = {
|
|
1147
|
+
/**
|
|
1148
|
+
* Success: checker output findings.
|
|
1149
|
+
*/
|
|
1150
|
+
findings: Finding[];
|
|
1151
|
+
extensions?: ExtensionMap1$8;
|
|
1152
|
+
} | {
|
|
1153
|
+
error: ErrorEnvelope$5;
|
|
1154
|
+
extensions?: ExtensionMap2$5;
|
|
1155
|
+
};
|
|
1156
|
+
/**
|
|
1157
|
+
* Checker output — not a KnowledgeEntry body.
|
|
1158
|
+
*/
|
|
1159
|
+
interface Finding {
|
|
1160
|
+
/**
|
|
1161
|
+
* Wire schema version (integer >= 1).
|
|
1162
|
+
*/
|
|
1163
|
+
schema_version: number;
|
|
1164
|
+
/**
|
|
1165
|
+
* Stable finding id.
|
|
1166
|
+
*/
|
|
1167
|
+
finding_id: string;
|
|
1168
|
+
/**
|
|
1169
|
+
* Open string. Core vocabulary (documented, not enforced): info, warning, error.
|
|
1170
|
+
*/
|
|
1171
|
+
severity: string;
|
|
1172
|
+
/**
|
|
1173
|
+
* Open string. Core vocabulary (documented, not enforced): open, resolved, dismissed.
|
|
1174
|
+
*/
|
|
1175
|
+
status: string;
|
|
1176
|
+
/**
|
|
1177
|
+
* Short finding title.
|
|
1178
|
+
*/
|
|
1179
|
+
title: string;
|
|
1180
|
+
/**
|
|
1181
|
+
* Finding detail text.
|
|
1182
|
+
*/
|
|
1183
|
+
description: string;
|
|
1184
|
+
/**
|
|
1185
|
+
* Optional checker kind or category.
|
|
1186
|
+
*/
|
|
1187
|
+
kind?: string;
|
|
1188
|
+
/**
|
|
1189
|
+
* Optional KnowledgeEntry the finding targets.
|
|
1190
|
+
*/
|
|
1191
|
+
target_entry_id?: string;
|
|
1192
|
+
source_anchor?: SourceAnchor$4;
|
|
1193
|
+
/**
|
|
1194
|
+
* Optional suggested remediation text.
|
|
1195
|
+
*/
|
|
1196
|
+
suggested_fix?: string;
|
|
1197
|
+
/**
|
|
1198
|
+
* Optional position hint within source text.
|
|
1199
|
+
*/
|
|
1200
|
+
text_position?: {
|
|
1201
|
+
[k: string]: unknown | undefined;
|
|
1202
|
+
};
|
|
1203
|
+
/**
|
|
1204
|
+
* RFC 3339 UTC datetime string.
|
|
1205
|
+
*/
|
|
1206
|
+
created_at?: string;
|
|
1207
|
+
/**
|
|
1208
|
+
* RFC 3339 UTC datetime string.
|
|
1209
|
+
*/
|
|
1210
|
+
updated_at?: string;
|
|
1211
|
+
extensions: ExtensionMap$a;
|
|
1212
|
+
}
|
|
1213
|
+
/**
|
|
1214
|
+
* Optional provenance pointer.
|
|
1215
|
+
*/
|
|
1216
|
+
interface SourceAnchor$4 {
|
|
1217
|
+
/**
|
|
1218
|
+
* Wire schema version (integer >= 1).
|
|
1219
|
+
*/
|
|
1220
|
+
schema_version: number;
|
|
1221
|
+
/**
|
|
1222
|
+
* Opaque source locator; products define grammar.
|
|
1223
|
+
*/
|
|
1224
|
+
source_id: string;
|
|
1225
|
+
span?: SourceSpan$4;
|
|
1226
|
+
/**
|
|
1227
|
+
* Optional human label for the anchor.
|
|
1228
|
+
*/
|
|
1229
|
+
label?: string;
|
|
1230
|
+
/**
|
|
1231
|
+
* Optional MIME type of the referenced source.
|
|
1232
|
+
*/
|
|
1233
|
+
mime_type?: string;
|
|
1234
|
+
extensions: ExtensionMap$a;
|
|
1235
|
+
}
|
|
1236
|
+
/**
|
|
1237
|
+
* Optional byte or character span within the source.
|
|
1238
|
+
*/
|
|
1239
|
+
interface SourceSpan$4 {
|
|
1240
|
+
/**
|
|
1241
|
+
* Start offset (inclusive).
|
|
1242
|
+
*/
|
|
1243
|
+
start: number;
|
|
1244
|
+
/**
|
|
1245
|
+
* End offset (exclusive).
|
|
1246
|
+
*/
|
|
1247
|
+
end: number;
|
|
1248
|
+
}
|
|
1249
|
+
/**
|
|
1250
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1251
|
+
*/
|
|
1252
|
+
interface ExtensionMap$a {
|
|
1253
|
+
[k: string]: {
|
|
1254
|
+
[k: string]: unknown | undefined;
|
|
1255
|
+
} | undefined;
|
|
1256
|
+
}
|
|
1257
|
+
/**
|
|
1258
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1259
|
+
*/
|
|
1260
|
+
interface ExtensionMap1$8 {
|
|
1261
|
+
[k: string]: {
|
|
1262
|
+
[k: string]: unknown | undefined;
|
|
1263
|
+
} | undefined;
|
|
1264
|
+
}
|
|
1265
|
+
/**
|
|
1266
|
+
* Failure: shared error envelope.
|
|
1267
|
+
*/
|
|
1268
|
+
interface ErrorEnvelope$5 {
|
|
1269
|
+
/**
|
|
1270
|
+
* Machine-readable error code.
|
|
1271
|
+
*/
|
|
1272
|
+
code: string;
|
|
1273
|
+
/**
|
|
1274
|
+
* Human-readable error message.
|
|
1275
|
+
*/
|
|
1276
|
+
message: string;
|
|
1277
|
+
/**
|
|
1278
|
+
* Optional structured error context.
|
|
1279
|
+
*/
|
|
1280
|
+
details?: {
|
|
1281
|
+
[k: string]: unknown | undefined;
|
|
1282
|
+
};
|
|
1283
|
+
extensions: ExtensionMap$a;
|
|
1284
|
+
}
|
|
1285
|
+
/**
|
|
1286
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1287
|
+
*/
|
|
1288
|
+
interface ExtensionMap2$5 {
|
|
1289
|
+
[k: string]: {
|
|
1290
|
+
[k: string]: unknown | undefined;
|
|
1291
|
+
} | undefined;
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
1296
|
+
* Source: schemas/
|
|
1297
|
+
* Generated by: pnpm run codegen
|
|
1298
|
+
*/
|
|
1299
|
+
/**
|
|
1300
|
+
* Apply / settle I/O — carry computable updates; merge to static state when settle is true.
|
|
1301
|
+
*/
|
|
1302
|
+
interface ComputeRequest {
|
|
1303
|
+
/**
|
|
1304
|
+
* Opaque Session correlation id. Products own Session stores.
|
|
1305
|
+
*/
|
|
1306
|
+
session_id: string;
|
|
1307
|
+
/**
|
|
1308
|
+
* Target KnowledgeEntry id.
|
|
1309
|
+
*/
|
|
1310
|
+
entry_id: string;
|
|
1311
|
+
computable: ComputableFieldMap$7;
|
|
1312
|
+
/**
|
|
1313
|
+
* When true, product merges computable into static state at Session end. Defaults to false when omitted.
|
|
1314
|
+
*/
|
|
1315
|
+
settle?: boolean;
|
|
1316
|
+
extensions?: ExtensionMap$9;
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1319
|
+
* Session-scoped dynamic computable payload (body.computable).
|
|
1320
|
+
*/
|
|
1321
|
+
interface ComputableFieldMap$7 {
|
|
1322
|
+
[k: string]: unknown | undefined;
|
|
1323
|
+
}
|
|
1324
|
+
/**
|
|
1325
|
+
* Optional transport metadata.
|
|
1326
|
+
*/
|
|
1327
|
+
interface ExtensionMap$9 {
|
|
1328
|
+
[k: string]: {
|
|
1329
|
+
[k: string]: unknown | undefined;
|
|
1330
|
+
} | undefined;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
1335
|
+
* Source: schemas/
|
|
1336
|
+
* Generated by: pnpm run codegen
|
|
1337
|
+
*/
|
|
1338
|
+
/**
|
|
1339
|
+
* Updated computable view (and merged static state when settle was true) or wire error. Use session_id, entry_id, and computable OR error — not both.
|
|
1340
|
+
*/
|
|
1341
|
+
type ComputeResponse = {
|
|
1342
|
+
/**
|
|
1343
|
+
* Echo of request Session correlation id.
|
|
1344
|
+
*/
|
|
1345
|
+
session_id: string;
|
|
1346
|
+
/**
|
|
1347
|
+
* Target KnowledgeEntry id.
|
|
1348
|
+
*/
|
|
1349
|
+
entry_id: string;
|
|
1350
|
+
computable: ComputableFieldMap$6;
|
|
1351
|
+
state?: ComputableFieldMap1$4;
|
|
1352
|
+
extensions?: ExtensionMap$8;
|
|
1353
|
+
} | {
|
|
1354
|
+
error: ErrorEnvelope$4;
|
|
1355
|
+
extensions?: ExtensionMap2$4;
|
|
1356
|
+
};
|
|
1357
|
+
/**
|
|
1358
|
+
* Success: updated dynamic computable view.
|
|
1359
|
+
*/
|
|
1360
|
+
interface ComputableFieldMap$6 {
|
|
1361
|
+
[k: string]: unknown | undefined;
|
|
1362
|
+
}
|
|
1363
|
+
/**
|
|
1364
|
+
* Merged static state after settle. Products MUST include when request settle was true.
|
|
1365
|
+
*/
|
|
1366
|
+
interface ComputableFieldMap1$4 {
|
|
1367
|
+
[k: string]: unknown | undefined;
|
|
1368
|
+
}
|
|
1369
|
+
/**
|
|
1370
|
+
* Optional transport metadata.
|
|
1371
|
+
*/
|
|
1372
|
+
interface ExtensionMap$8 {
|
|
1373
|
+
[k: string]: {
|
|
1374
|
+
[k: string]: unknown | undefined;
|
|
1375
|
+
} | undefined;
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Failure: shared error envelope.
|
|
1379
|
+
*/
|
|
1380
|
+
interface ErrorEnvelope$4 {
|
|
1381
|
+
/**
|
|
1382
|
+
* Machine-readable error code.
|
|
1383
|
+
*/
|
|
1384
|
+
code: string;
|
|
1385
|
+
/**
|
|
1386
|
+
* Human-readable error message.
|
|
1387
|
+
*/
|
|
1388
|
+
message: string;
|
|
1389
|
+
/**
|
|
1390
|
+
* Optional structured error context.
|
|
1391
|
+
*/
|
|
1392
|
+
details?: {
|
|
1393
|
+
[k: string]: unknown | undefined;
|
|
1394
|
+
};
|
|
1395
|
+
extensions: ExtensionMap1$7;
|
|
1396
|
+
}
|
|
1397
|
+
/**
|
|
1398
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1399
|
+
*/
|
|
1400
|
+
interface ExtensionMap1$7 {
|
|
1401
|
+
[k: string]: {
|
|
1402
|
+
[k: string]: unknown | undefined;
|
|
1403
|
+
} | undefined;
|
|
1404
|
+
}
|
|
1405
|
+
/**
|
|
1406
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1407
|
+
*/
|
|
1408
|
+
interface ExtensionMap2$4 {
|
|
1409
|
+
[k: string]: {
|
|
1410
|
+
[k: string]: unknown | undefined;
|
|
1411
|
+
} | undefined;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
/**
|
|
1415
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
1416
|
+
* Source: schemas/
|
|
1417
|
+
* Generated by: pnpm run codegen
|
|
1418
|
+
*/
|
|
1419
|
+
/**
|
|
1420
|
+
* Init / projection — materialize Session dynamic computable view from static state.
|
|
1421
|
+
*/
|
|
1422
|
+
interface ProjectRequest {
|
|
1423
|
+
/**
|
|
1424
|
+
* Opaque Session correlation id. Products own Session stores.
|
|
1425
|
+
*/
|
|
1426
|
+
session_id: string;
|
|
1427
|
+
/**
|
|
1428
|
+
* Target KnowledgeEntry id.
|
|
1429
|
+
*/
|
|
1430
|
+
entry_id: string;
|
|
1431
|
+
state: ComputableFieldMap$5;
|
|
1432
|
+
extensions?: ExtensionMap$7;
|
|
1433
|
+
}
|
|
1434
|
+
/**
|
|
1435
|
+
* Static computable source (body.state).
|
|
1436
|
+
*/
|
|
1437
|
+
interface ComputableFieldMap$5 {
|
|
1438
|
+
[k: string]: unknown | undefined;
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
* Optional transport metadata.
|
|
1442
|
+
*/
|
|
1443
|
+
interface ExtensionMap$7 {
|
|
1444
|
+
[k: string]: {
|
|
1445
|
+
[k: string]: unknown | undefined;
|
|
1446
|
+
} | undefined;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
/**
|
|
1450
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
1451
|
+
* Source: schemas/
|
|
1452
|
+
* Generated by: pnpm run codegen
|
|
1453
|
+
*/
|
|
1454
|
+
/**
|
|
1455
|
+
* Projected computable view or wire error. Use session_id, entry_id, and computable OR error — not both.
|
|
1456
|
+
*/
|
|
1457
|
+
type ProjectResponse = {
|
|
1458
|
+
/**
|
|
1459
|
+
* Echo of request Session correlation id.
|
|
1460
|
+
*/
|
|
1461
|
+
session_id: string;
|
|
1462
|
+
/**
|
|
1463
|
+
* Target KnowledgeEntry id.
|
|
1464
|
+
*/
|
|
1465
|
+
entry_id: string;
|
|
1466
|
+
computable: ComputableFieldMap$4;
|
|
1467
|
+
extensions?: ExtensionMap$6;
|
|
1468
|
+
} | {
|
|
1469
|
+
error: ErrorEnvelope$3;
|
|
1470
|
+
extensions?: ExtensionMap2$3;
|
|
1471
|
+
};
|
|
1472
|
+
/**
|
|
1473
|
+
* Success: materialized dynamic computable view (body.computable).
|
|
1474
|
+
*/
|
|
1475
|
+
interface ComputableFieldMap$4 {
|
|
1476
|
+
[k: string]: unknown | undefined;
|
|
1477
|
+
}
|
|
1478
|
+
/**
|
|
1479
|
+
* Optional transport metadata.
|
|
1480
|
+
*/
|
|
1481
|
+
interface ExtensionMap$6 {
|
|
1482
|
+
[k: string]: {
|
|
1483
|
+
[k: string]: unknown | undefined;
|
|
1484
|
+
} | undefined;
|
|
1485
|
+
}
|
|
1486
|
+
/**
|
|
1487
|
+
* Failure: shared error envelope.
|
|
1488
|
+
*/
|
|
1489
|
+
interface ErrorEnvelope$3 {
|
|
1490
|
+
/**
|
|
1491
|
+
* Machine-readable error code.
|
|
1492
|
+
*/
|
|
1493
|
+
code: string;
|
|
1494
|
+
/**
|
|
1495
|
+
* Human-readable error message.
|
|
1496
|
+
*/
|
|
1497
|
+
message: string;
|
|
1498
|
+
/**
|
|
1499
|
+
* Optional structured error context.
|
|
1500
|
+
*/
|
|
1501
|
+
details?: {
|
|
1502
|
+
[k: string]: unknown | undefined;
|
|
1503
|
+
};
|
|
1504
|
+
extensions: ExtensionMap1$6;
|
|
1505
|
+
}
|
|
1506
|
+
/**
|
|
1507
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1508
|
+
*/
|
|
1509
|
+
interface ExtensionMap1$6 {
|
|
1510
|
+
[k: string]: {
|
|
1511
|
+
[k: string]: unknown | undefined;
|
|
1512
|
+
} | undefined;
|
|
1513
|
+
}
|
|
1514
|
+
/**
|
|
1515
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1516
|
+
*/
|
|
1517
|
+
interface ExtensionMap2$3 {
|
|
1518
|
+
[k: string]: {
|
|
1519
|
+
[k: string]: unknown | undefined;
|
|
1520
|
+
} | undefined;
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
/**
|
|
1524
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
1525
|
+
* Source: schemas/
|
|
1526
|
+
* Generated by: pnpm run codegen
|
|
1527
|
+
*/
|
|
1528
|
+
/**
|
|
1529
|
+
* Extract-to-promote: promote a candidate KnowledgeEntry to durable storage.
|
|
1530
|
+
*/
|
|
1531
|
+
interface PromoteRequest {
|
|
1532
|
+
candidate: KnowledgeEntry$3;
|
|
1533
|
+
/**
|
|
1534
|
+
* Optional merge target KnowledgeEntry id.
|
|
1535
|
+
*/
|
|
1536
|
+
target_entry_id?: string;
|
|
1537
|
+
extensions?: ExtensionMap1$5;
|
|
1538
|
+
}
|
|
1539
|
+
/**
|
|
1540
|
+
* Candidate KnowledgeEntry (typically status provisional).
|
|
1541
|
+
*/
|
|
1542
|
+
interface KnowledgeEntry$3 {
|
|
1543
|
+
/**
|
|
1544
|
+
* Wire schema version (integer >= 1).
|
|
1545
|
+
*/
|
|
1546
|
+
schema_version: number;
|
|
1547
|
+
/**
|
|
1548
|
+
* Stable KnowledgeEntry id (opaque to protocol).
|
|
1549
|
+
*/
|
|
1550
|
+
entry_id: string;
|
|
1551
|
+
/**
|
|
1552
|
+
* Open string. Core vocabulary (documented, not enforced): character, location, event (ontology label; ≠ TimelineEvent wire object), scene, act, organization, item, conflict, info_point, era, worldbuilding, note, research, ability, rule (ontology label; ≠ L6 Rule wire object). Products MAY emit values outside this list.
|
|
1553
|
+
*/
|
|
1554
|
+
entry_type: string;
|
|
1555
|
+
/**
|
|
1556
|
+
* Human-stable name.
|
|
1557
|
+
*/
|
|
1558
|
+
canonical_name: string;
|
|
1559
|
+
/**
|
|
1560
|
+
* Open string. Core vocabulary (documented, not enforced): provisional, confirmed, deprecated, merged, deleted.
|
|
1561
|
+
*/
|
|
1562
|
+
status: string;
|
|
1563
|
+
/**
|
|
1564
|
+
* Structured payload. Typed attributes (summary, tags, attributes) live here — not as protocol siblings. Under l2-computable: optional state (static durable computable) and computable (dynamic Session-scoped projection).
|
|
1565
|
+
*/
|
|
1566
|
+
body: {
|
|
1567
|
+
state?: ComputableFieldMap$3;
|
|
1568
|
+
computable?: ComputableFieldMap1$3;
|
|
1569
|
+
[k: string]: unknown | undefined;
|
|
1570
|
+
};
|
|
1571
|
+
source_anchor?: SourceAnchor$3;
|
|
1572
|
+
/**
|
|
1573
|
+
* Optimistic concurrency revision.
|
|
1574
|
+
*/
|
|
1575
|
+
revision?: number;
|
|
1576
|
+
/**
|
|
1577
|
+
* RFC 3339 UTC datetime string.
|
|
1578
|
+
*/
|
|
1579
|
+
created_at?: string;
|
|
1580
|
+
/**
|
|
1581
|
+
* RFC 3339 UTC datetime string.
|
|
1582
|
+
*/
|
|
1583
|
+
updated_at?: string;
|
|
1584
|
+
extensions: ExtensionMap$5;
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* Static durable computable state (l2-computable optional). Authoritative pre-Session and after settle.
|
|
1588
|
+
*/
|
|
1589
|
+
interface ComputableFieldMap$3 {
|
|
1590
|
+
[k: string]: unknown | undefined;
|
|
1591
|
+
}
|
|
1592
|
+
/**
|
|
1593
|
+
* Dynamic Session-scoped computable projection (l2-computable optional). Absent or inert pre-Session; mutates mid-Session only.
|
|
1594
|
+
*/
|
|
1595
|
+
interface ComputableFieldMap1$3 {
|
|
1596
|
+
[k: string]: unknown | undefined;
|
|
1597
|
+
}
|
|
1598
|
+
/**
|
|
1599
|
+
* Optional provenance pointer.
|
|
1600
|
+
*/
|
|
1601
|
+
interface SourceAnchor$3 {
|
|
1602
|
+
/**
|
|
1603
|
+
* Wire schema version (integer >= 1).
|
|
1604
|
+
*/
|
|
1605
|
+
schema_version: number;
|
|
1606
|
+
/**
|
|
1607
|
+
* Opaque source locator; products define grammar.
|
|
1608
|
+
*/
|
|
1609
|
+
source_id: string;
|
|
1610
|
+
span?: SourceSpan$3;
|
|
1611
|
+
/**
|
|
1612
|
+
* Optional human label for the anchor.
|
|
1613
|
+
*/
|
|
1614
|
+
label?: string;
|
|
1615
|
+
/**
|
|
1616
|
+
* Optional MIME type of the referenced source.
|
|
1617
|
+
*/
|
|
1618
|
+
mime_type?: string;
|
|
1619
|
+
extensions: ExtensionMap$5;
|
|
1620
|
+
}
|
|
1621
|
+
/**
|
|
1622
|
+
* Optional byte or character span within the source.
|
|
1623
|
+
*/
|
|
1624
|
+
interface SourceSpan$3 {
|
|
1625
|
+
/**
|
|
1626
|
+
* Start offset (inclusive).
|
|
1627
|
+
*/
|
|
1628
|
+
start: number;
|
|
1629
|
+
/**
|
|
1630
|
+
* End offset (exclusive).
|
|
1631
|
+
*/
|
|
1632
|
+
end: number;
|
|
1633
|
+
}
|
|
1634
|
+
/**
|
|
1635
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1636
|
+
*/
|
|
1637
|
+
interface ExtensionMap$5 {
|
|
1638
|
+
[k: string]: {
|
|
1639
|
+
[k: string]: unknown | undefined;
|
|
1640
|
+
} | undefined;
|
|
1641
|
+
}
|
|
1642
|
+
/**
|
|
1643
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1644
|
+
*/
|
|
1645
|
+
interface ExtensionMap1$5 {
|
|
1646
|
+
[k: string]: {
|
|
1647
|
+
[k: string]: unknown | undefined;
|
|
1648
|
+
} | undefined;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
1653
|
+
* Source: schemas/
|
|
1654
|
+
* Generated by: pnpm run codegen
|
|
1655
|
+
*/
|
|
1656
|
+
/**
|
|
1657
|
+
* Promoted KnowledgeEntry or wire error. Use knowledge_entry OR error — not both.
|
|
1658
|
+
*/
|
|
1659
|
+
type PromoteResponse = {
|
|
1660
|
+
knowledge_entry: KnowledgeEntry$2;
|
|
1661
|
+
/**
|
|
1662
|
+
* Optional id of KnowledgeEntry superseded during merge.
|
|
1663
|
+
*/
|
|
1664
|
+
superseded_id?: string;
|
|
1665
|
+
extensions?: ExtensionMap1$4;
|
|
1666
|
+
} | {
|
|
1667
|
+
error: ErrorEnvelope$2;
|
|
1668
|
+
extensions?: ExtensionMap2$2;
|
|
1669
|
+
};
|
|
1670
|
+
/**
|
|
1671
|
+
* Success: promoted KnowledgeEntry.
|
|
1672
|
+
*/
|
|
1673
|
+
interface KnowledgeEntry$2 {
|
|
1674
|
+
/**
|
|
1675
|
+
* Wire schema version (integer >= 1).
|
|
1676
|
+
*/
|
|
1677
|
+
schema_version: number;
|
|
1678
|
+
/**
|
|
1679
|
+
* Stable KnowledgeEntry id (opaque to protocol).
|
|
1680
|
+
*/
|
|
1681
|
+
entry_id: string;
|
|
1682
|
+
/**
|
|
1683
|
+
* Open string. Core vocabulary (documented, not enforced): character, location, event (ontology label; ≠ TimelineEvent wire object), scene, act, organization, item, conflict, info_point, era, worldbuilding, note, research, ability, rule (ontology label; ≠ L6 Rule wire object). Products MAY emit values outside this list.
|
|
1684
|
+
*/
|
|
1685
|
+
entry_type: string;
|
|
1686
|
+
/**
|
|
1687
|
+
* Human-stable name.
|
|
1688
|
+
*/
|
|
1689
|
+
canonical_name: string;
|
|
1690
|
+
/**
|
|
1691
|
+
* Open string. Core vocabulary (documented, not enforced): provisional, confirmed, deprecated, merged, deleted.
|
|
1692
|
+
*/
|
|
1693
|
+
status: string;
|
|
1694
|
+
/**
|
|
1695
|
+
* Structured payload. Typed attributes (summary, tags, attributes) live here — not as protocol siblings. Under l2-computable: optional state (static durable computable) and computable (dynamic Session-scoped projection).
|
|
1696
|
+
*/
|
|
1697
|
+
body: {
|
|
1698
|
+
state?: ComputableFieldMap$2;
|
|
1699
|
+
computable?: ComputableFieldMap1$2;
|
|
1700
|
+
[k: string]: unknown | undefined;
|
|
1701
|
+
};
|
|
1702
|
+
source_anchor?: SourceAnchor$2;
|
|
1703
|
+
/**
|
|
1704
|
+
* Optimistic concurrency revision.
|
|
1705
|
+
*/
|
|
1706
|
+
revision?: number;
|
|
1707
|
+
/**
|
|
1708
|
+
* RFC 3339 UTC datetime string.
|
|
1709
|
+
*/
|
|
1710
|
+
created_at?: string;
|
|
1711
|
+
/**
|
|
1712
|
+
* RFC 3339 UTC datetime string.
|
|
1713
|
+
*/
|
|
1714
|
+
updated_at?: string;
|
|
1715
|
+
extensions: ExtensionMap$4;
|
|
1716
|
+
}
|
|
1717
|
+
/**
|
|
1718
|
+
* Static durable computable state (l2-computable optional). Authoritative pre-Session and after settle.
|
|
1719
|
+
*/
|
|
1720
|
+
interface ComputableFieldMap$2 {
|
|
1721
|
+
[k: string]: unknown | undefined;
|
|
1722
|
+
}
|
|
1723
|
+
/**
|
|
1724
|
+
* Dynamic Session-scoped computable projection (l2-computable optional). Absent or inert pre-Session; mutates mid-Session only.
|
|
1725
|
+
*/
|
|
1726
|
+
interface ComputableFieldMap1$2 {
|
|
1727
|
+
[k: string]: unknown | undefined;
|
|
1728
|
+
}
|
|
1729
|
+
/**
|
|
1730
|
+
* Optional provenance pointer.
|
|
1731
|
+
*/
|
|
1732
|
+
interface SourceAnchor$2 {
|
|
1733
|
+
/**
|
|
1734
|
+
* Wire schema version (integer >= 1).
|
|
1735
|
+
*/
|
|
1736
|
+
schema_version: number;
|
|
1737
|
+
/**
|
|
1738
|
+
* Opaque source locator; products define grammar.
|
|
1739
|
+
*/
|
|
1740
|
+
source_id: string;
|
|
1741
|
+
span?: SourceSpan$2;
|
|
1742
|
+
/**
|
|
1743
|
+
* Optional human label for the anchor.
|
|
1744
|
+
*/
|
|
1745
|
+
label?: string;
|
|
1746
|
+
/**
|
|
1747
|
+
* Optional MIME type of the referenced source.
|
|
1748
|
+
*/
|
|
1749
|
+
mime_type?: string;
|
|
1750
|
+
extensions: ExtensionMap$4;
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* Optional byte or character span within the source.
|
|
1754
|
+
*/
|
|
1755
|
+
interface SourceSpan$2 {
|
|
1756
|
+
/**
|
|
1757
|
+
* Start offset (inclusive).
|
|
1758
|
+
*/
|
|
1759
|
+
start: number;
|
|
1760
|
+
/**
|
|
1761
|
+
* End offset (exclusive).
|
|
1762
|
+
*/
|
|
1763
|
+
end: number;
|
|
1764
|
+
}
|
|
1765
|
+
/**
|
|
1766
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1767
|
+
*/
|
|
1768
|
+
interface ExtensionMap$4 {
|
|
1769
|
+
[k: string]: {
|
|
1770
|
+
[k: string]: unknown | undefined;
|
|
1771
|
+
} | undefined;
|
|
1772
|
+
}
|
|
1773
|
+
/**
|
|
1774
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1775
|
+
*/
|
|
1776
|
+
interface ExtensionMap1$4 {
|
|
1777
|
+
[k: string]: {
|
|
1778
|
+
[k: string]: unknown | undefined;
|
|
1779
|
+
} | undefined;
|
|
1780
|
+
}
|
|
1781
|
+
/**
|
|
1782
|
+
* Failure: shared error envelope.
|
|
1783
|
+
*/
|
|
1784
|
+
interface ErrorEnvelope$2 {
|
|
1785
|
+
/**
|
|
1786
|
+
* Machine-readable error code.
|
|
1787
|
+
*/
|
|
1788
|
+
code: string;
|
|
1789
|
+
/**
|
|
1790
|
+
* Human-readable error message.
|
|
1791
|
+
*/
|
|
1792
|
+
message: string;
|
|
1793
|
+
/**
|
|
1794
|
+
* Optional structured error context.
|
|
1795
|
+
*/
|
|
1796
|
+
details?: {
|
|
1797
|
+
[k: string]: unknown | undefined;
|
|
1798
|
+
};
|
|
1799
|
+
extensions: ExtensionMap$4;
|
|
1800
|
+
}
|
|
1801
|
+
/**
|
|
1802
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1803
|
+
*/
|
|
1804
|
+
interface ExtensionMap2$2 {
|
|
1805
|
+
[k: string]: {
|
|
1806
|
+
[k: string]: unknown | undefined;
|
|
1807
|
+
} | undefined;
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
/**
|
|
1811
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
1812
|
+
* Source: schemas/
|
|
1813
|
+
* Generated by: pnpm run codegen
|
|
1814
|
+
*/
|
|
1815
|
+
/**
|
|
1816
|
+
* Create or update a Relation.
|
|
1817
|
+
*/
|
|
1818
|
+
interface RelateRequest {
|
|
1819
|
+
relation: Relation$1;
|
|
1820
|
+
extensions?: ExtensionMap1$3;
|
|
1821
|
+
}
|
|
1822
|
+
/**
|
|
1823
|
+
* Relation to create or update.
|
|
1824
|
+
*/
|
|
1825
|
+
interface Relation$1 {
|
|
1826
|
+
/**
|
|
1827
|
+
* Wire schema version (integer >= 1).
|
|
1828
|
+
*/
|
|
1829
|
+
schema_version: number;
|
|
1830
|
+
/**
|
|
1831
|
+
* Stable relation id.
|
|
1832
|
+
*/
|
|
1833
|
+
relation_id: string;
|
|
1834
|
+
/**
|
|
1835
|
+
* Open string. Core vocabulary (documented, not enforced): related_to, parent_of, member_of, located_in, participates_in, causes, foreshadows.
|
|
1836
|
+
*/
|
|
1837
|
+
relation_type: string;
|
|
1838
|
+
/**
|
|
1839
|
+
* Source endpoint id (KnowledgeEntry or anchor id).
|
|
1840
|
+
*/
|
|
1841
|
+
from_id: string;
|
|
1842
|
+
/**
|
|
1843
|
+
* Target endpoint id (KnowledgeEntry or anchor id).
|
|
1844
|
+
*/
|
|
1845
|
+
to_id: string;
|
|
1846
|
+
/**
|
|
1847
|
+
* Optional human label.
|
|
1848
|
+
*/
|
|
1849
|
+
label?: string;
|
|
1850
|
+
/**
|
|
1851
|
+
* Optional open metadata bag.
|
|
1852
|
+
*/
|
|
1853
|
+
metadata?: {
|
|
1854
|
+
[k: string]: unknown | undefined;
|
|
1855
|
+
};
|
|
1856
|
+
/**
|
|
1857
|
+
* RFC 3339 UTC datetime string.
|
|
1858
|
+
*/
|
|
1859
|
+
created_at?: string;
|
|
1860
|
+
/**
|
|
1861
|
+
* RFC 3339 UTC datetime string.
|
|
1862
|
+
*/
|
|
1863
|
+
updated_at?: string;
|
|
1864
|
+
extensions: ExtensionMap$3;
|
|
1865
|
+
}
|
|
1866
|
+
/**
|
|
1867
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1868
|
+
*/
|
|
1869
|
+
interface ExtensionMap$3 {
|
|
1870
|
+
[k: string]: {
|
|
1871
|
+
[k: string]: unknown | undefined;
|
|
1872
|
+
} | undefined;
|
|
1873
|
+
}
|
|
1874
|
+
/**
|
|
1875
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1876
|
+
*/
|
|
1877
|
+
interface ExtensionMap1$3 {
|
|
1878
|
+
[k: string]: {
|
|
1879
|
+
[k: string]: unknown | undefined;
|
|
1880
|
+
} | undefined;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
/**
|
|
1884
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
1885
|
+
* Source: schemas/
|
|
1886
|
+
* Generated by: pnpm run codegen
|
|
1887
|
+
*/
|
|
1888
|
+
/**
|
|
1889
|
+
* Persisted Relation or wire error. Use relation OR error — not both.
|
|
1890
|
+
*/
|
|
1891
|
+
type RelateResponse = {
|
|
1892
|
+
relation: Relation;
|
|
1893
|
+
extensions?: ExtensionMap1$2;
|
|
1894
|
+
} | {
|
|
1895
|
+
error: ErrorEnvelope$1;
|
|
1896
|
+
extensions?: ExtensionMap2$1;
|
|
1897
|
+
};
|
|
1898
|
+
/**
|
|
1899
|
+
* Success: persisted Relation.
|
|
1900
|
+
*/
|
|
1901
|
+
interface Relation {
|
|
1902
|
+
/**
|
|
1903
|
+
* Wire schema version (integer >= 1).
|
|
1904
|
+
*/
|
|
1905
|
+
schema_version: number;
|
|
1906
|
+
/**
|
|
1907
|
+
* Stable relation id.
|
|
1908
|
+
*/
|
|
1909
|
+
relation_id: string;
|
|
1910
|
+
/**
|
|
1911
|
+
* Open string. Core vocabulary (documented, not enforced): related_to, parent_of, member_of, located_in, participates_in, causes, foreshadows.
|
|
1912
|
+
*/
|
|
1913
|
+
relation_type: string;
|
|
1914
|
+
/**
|
|
1915
|
+
* Source endpoint id (KnowledgeEntry or anchor id).
|
|
1916
|
+
*/
|
|
1917
|
+
from_id: string;
|
|
1918
|
+
/**
|
|
1919
|
+
* Target endpoint id (KnowledgeEntry or anchor id).
|
|
1920
|
+
*/
|
|
1921
|
+
to_id: string;
|
|
1922
|
+
/**
|
|
1923
|
+
* Optional human label.
|
|
1924
|
+
*/
|
|
1925
|
+
label?: string;
|
|
1926
|
+
/**
|
|
1927
|
+
* Optional open metadata bag.
|
|
1928
|
+
*/
|
|
1929
|
+
metadata?: {
|
|
1930
|
+
[k: string]: unknown | undefined;
|
|
1931
|
+
};
|
|
1932
|
+
/**
|
|
1933
|
+
* RFC 3339 UTC datetime string.
|
|
1934
|
+
*/
|
|
1935
|
+
created_at?: string;
|
|
1936
|
+
/**
|
|
1937
|
+
* RFC 3339 UTC datetime string.
|
|
1938
|
+
*/
|
|
1939
|
+
updated_at?: string;
|
|
1940
|
+
extensions: ExtensionMap$2;
|
|
1941
|
+
}
|
|
1942
|
+
/**
|
|
1943
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1944
|
+
*/
|
|
1945
|
+
interface ExtensionMap$2 {
|
|
1946
|
+
[k: string]: {
|
|
1947
|
+
[k: string]: unknown | undefined;
|
|
1948
|
+
} | undefined;
|
|
1949
|
+
}
|
|
1950
|
+
/**
|
|
1951
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1952
|
+
*/
|
|
1953
|
+
interface ExtensionMap1$2 {
|
|
1954
|
+
[k: string]: {
|
|
1955
|
+
[k: string]: unknown | undefined;
|
|
1956
|
+
} | undefined;
|
|
1957
|
+
}
|
|
1958
|
+
/**
|
|
1959
|
+
* Failure: shared error envelope.
|
|
1960
|
+
*/
|
|
1961
|
+
interface ErrorEnvelope$1 {
|
|
1962
|
+
/**
|
|
1963
|
+
* Machine-readable error code.
|
|
1964
|
+
*/
|
|
1965
|
+
code: string;
|
|
1966
|
+
/**
|
|
1967
|
+
* Human-readable error message.
|
|
1968
|
+
*/
|
|
1969
|
+
message: string;
|
|
1970
|
+
/**
|
|
1971
|
+
* Optional structured error context.
|
|
1972
|
+
*/
|
|
1973
|
+
details?: {
|
|
1974
|
+
[k: string]: unknown | undefined;
|
|
1975
|
+
};
|
|
1976
|
+
extensions: ExtensionMap$2;
|
|
1977
|
+
}
|
|
1978
|
+
/**
|
|
1979
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
1980
|
+
*/
|
|
1981
|
+
interface ExtensionMap2$1 {
|
|
1982
|
+
[k: string]: {
|
|
1983
|
+
[k: string]: unknown | undefined;
|
|
1984
|
+
} | undefined;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
/**
|
|
1988
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
1989
|
+
* Source: schemas/
|
|
1990
|
+
* Generated by: pnpm run codegen
|
|
1991
|
+
*/
|
|
1992
|
+
/**
|
|
1993
|
+
* Create or update one or more KnowledgeEntries by stable id.
|
|
1994
|
+
*/
|
|
1995
|
+
interface UpsertRequest {
|
|
1996
|
+
/**
|
|
1997
|
+
* KnowledgeEntries to create or update.
|
|
1998
|
+
*
|
|
1999
|
+
* @minItems 1
|
|
2000
|
+
*/
|
|
2001
|
+
knowledge_entries: [KnowledgeEntry$1, ...KnowledgeEntry$1[]];
|
|
2002
|
+
/**
|
|
2003
|
+
* Opaque idempotency hint (no server semantics in v0.1).
|
|
2004
|
+
*/
|
|
2005
|
+
idempotency_key?: string;
|
|
2006
|
+
extensions?: ExtensionMap1$1;
|
|
2007
|
+
}
|
|
2008
|
+
/**
|
|
2009
|
+
* Atomic narrative knowledge unit: identity, typed body, provenance envelope.
|
|
2010
|
+
*/
|
|
2011
|
+
interface KnowledgeEntry$1 {
|
|
2012
|
+
/**
|
|
2013
|
+
* Wire schema version (integer >= 1).
|
|
2014
|
+
*/
|
|
2015
|
+
schema_version: number;
|
|
2016
|
+
/**
|
|
2017
|
+
* Stable KnowledgeEntry id (opaque to protocol).
|
|
2018
|
+
*/
|
|
2019
|
+
entry_id: string;
|
|
2020
|
+
/**
|
|
2021
|
+
* Open string. Core vocabulary (documented, not enforced): character, location, event (ontology label; ≠ TimelineEvent wire object), scene, act, organization, item, conflict, info_point, era, worldbuilding, note, research, ability, rule (ontology label; ≠ L6 Rule wire object). Products MAY emit values outside this list.
|
|
2022
|
+
*/
|
|
2023
|
+
entry_type: string;
|
|
2024
|
+
/**
|
|
2025
|
+
* Human-stable name.
|
|
2026
|
+
*/
|
|
2027
|
+
canonical_name: string;
|
|
2028
|
+
/**
|
|
2029
|
+
* Open string. Core vocabulary (documented, not enforced): provisional, confirmed, deprecated, merged, deleted.
|
|
2030
|
+
*/
|
|
2031
|
+
status: string;
|
|
2032
|
+
/**
|
|
2033
|
+
* Structured payload. Typed attributes (summary, tags, attributes) live here — not as protocol siblings. Under l2-computable: optional state (static durable computable) and computable (dynamic Session-scoped projection).
|
|
2034
|
+
*/
|
|
2035
|
+
body: {
|
|
2036
|
+
state?: ComputableFieldMap$1;
|
|
2037
|
+
computable?: ComputableFieldMap1$1;
|
|
2038
|
+
[k: string]: unknown | undefined;
|
|
2039
|
+
};
|
|
2040
|
+
source_anchor?: SourceAnchor$1;
|
|
2041
|
+
/**
|
|
2042
|
+
* Optimistic concurrency revision.
|
|
2043
|
+
*/
|
|
2044
|
+
revision?: number;
|
|
2045
|
+
/**
|
|
2046
|
+
* RFC 3339 UTC datetime string.
|
|
2047
|
+
*/
|
|
2048
|
+
created_at?: string;
|
|
2049
|
+
/**
|
|
2050
|
+
* RFC 3339 UTC datetime string.
|
|
2051
|
+
*/
|
|
2052
|
+
updated_at?: string;
|
|
2053
|
+
extensions: ExtensionMap$1;
|
|
2054
|
+
}
|
|
2055
|
+
/**
|
|
2056
|
+
* Static durable computable state (l2-computable optional). Authoritative pre-Session and after settle.
|
|
2057
|
+
*/
|
|
2058
|
+
interface ComputableFieldMap$1 {
|
|
2059
|
+
[k: string]: unknown | undefined;
|
|
2060
|
+
}
|
|
2061
|
+
/**
|
|
2062
|
+
* Dynamic Session-scoped computable projection (l2-computable optional). Absent or inert pre-Session; mutates mid-Session only.
|
|
2063
|
+
*/
|
|
2064
|
+
interface ComputableFieldMap1$1 {
|
|
2065
|
+
[k: string]: unknown | undefined;
|
|
2066
|
+
}
|
|
2067
|
+
/**
|
|
2068
|
+
* Optional provenance pointer.
|
|
2069
|
+
*/
|
|
2070
|
+
interface SourceAnchor$1 {
|
|
2071
|
+
/**
|
|
2072
|
+
* Wire schema version (integer >= 1).
|
|
2073
|
+
*/
|
|
2074
|
+
schema_version: number;
|
|
2075
|
+
/**
|
|
2076
|
+
* Opaque source locator; products define grammar.
|
|
2077
|
+
*/
|
|
2078
|
+
source_id: string;
|
|
2079
|
+
span?: SourceSpan$1;
|
|
2080
|
+
/**
|
|
2081
|
+
* Optional human label for the anchor.
|
|
2082
|
+
*/
|
|
2083
|
+
label?: string;
|
|
2084
|
+
/**
|
|
2085
|
+
* Optional MIME type of the referenced source.
|
|
2086
|
+
*/
|
|
2087
|
+
mime_type?: string;
|
|
2088
|
+
extensions: ExtensionMap$1;
|
|
2089
|
+
}
|
|
2090
|
+
/**
|
|
2091
|
+
* Optional byte or character span within the source.
|
|
2092
|
+
*/
|
|
2093
|
+
interface SourceSpan$1 {
|
|
2094
|
+
/**
|
|
2095
|
+
* Start offset (inclusive).
|
|
2096
|
+
*/
|
|
2097
|
+
start: number;
|
|
2098
|
+
/**
|
|
2099
|
+
* End offset (exclusive).
|
|
2100
|
+
*/
|
|
2101
|
+
end: number;
|
|
2102
|
+
}
|
|
2103
|
+
/**
|
|
2104
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
2105
|
+
*/
|
|
2106
|
+
interface ExtensionMap$1 {
|
|
2107
|
+
[k: string]: {
|
|
2108
|
+
[k: string]: unknown | undefined;
|
|
2109
|
+
} | undefined;
|
|
2110
|
+
}
|
|
2111
|
+
/**
|
|
2112
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
2113
|
+
*/
|
|
2114
|
+
interface ExtensionMap1$1 {
|
|
2115
|
+
[k: string]: {
|
|
2116
|
+
[k: string]: unknown | undefined;
|
|
2117
|
+
} | undefined;
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
/**
|
|
2121
|
+
* AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
|
|
2122
|
+
* Source: schemas/
|
|
2123
|
+
* Generated by: pnpm run codegen
|
|
2124
|
+
*/
|
|
2125
|
+
/**
|
|
2126
|
+
* Persisted KnowledgeEntry view or wire error. Use knowledge_entries OR error — not both.
|
|
2127
|
+
*/
|
|
2128
|
+
type UpsertResponse = {
|
|
2129
|
+
/**
|
|
2130
|
+
* Success: persisted KnowledgeEntries.
|
|
2131
|
+
*/
|
|
2132
|
+
knowledge_entries: KnowledgeEntry[];
|
|
2133
|
+
/**
|
|
2134
|
+
* Optional per-KnowledgeEntry rejections (success branch only).
|
|
2135
|
+
*/
|
|
2136
|
+
rejected?: UpsertRejected[];
|
|
2137
|
+
extensions?: ExtensionMap1;
|
|
2138
|
+
} | {
|
|
2139
|
+
error: ErrorEnvelope;
|
|
2140
|
+
extensions?: ExtensionMap2;
|
|
2141
|
+
};
|
|
2142
|
+
/**
|
|
2143
|
+
* Atomic narrative knowledge unit: identity, typed body, provenance envelope.
|
|
2144
|
+
*/
|
|
2145
|
+
interface KnowledgeEntry {
|
|
2146
|
+
/**
|
|
2147
|
+
* Wire schema version (integer >= 1).
|
|
2148
|
+
*/
|
|
2149
|
+
schema_version: number;
|
|
2150
|
+
/**
|
|
2151
|
+
* Stable KnowledgeEntry id (opaque to protocol).
|
|
2152
|
+
*/
|
|
2153
|
+
entry_id: string;
|
|
2154
|
+
/**
|
|
2155
|
+
* Open string. Core vocabulary (documented, not enforced): character, location, event (ontology label; ≠ TimelineEvent wire object), scene, act, organization, item, conflict, info_point, era, worldbuilding, note, research, ability, rule (ontology label; ≠ L6 Rule wire object). Products MAY emit values outside this list.
|
|
2156
|
+
*/
|
|
2157
|
+
entry_type: string;
|
|
2158
|
+
/**
|
|
2159
|
+
* Human-stable name.
|
|
2160
|
+
*/
|
|
2161
|
+
canonical_name: string;
|
|
2162
|
+
/**
|
|
2163
|
+
* Open string. Core vocabulary (documented, not enforced): provisional, confirmed, deprecated, merged, deleted.
|
|
2164
|
+
*/
|
|
2165
|
+
status: string;
|
|
2166
|
+
/**
|
|
2167
|
+
* Structured payload. Typed attributes (summary, tags, attributes) live here — not as protocol siblings. Under l2-computable: optional state (static durable computable) and computable (dynamic Session-scoped projection).
|
|
2168
|
+
*/
|
|
2169
|
+
body: {
|
|
2170
|
+
state?: ComputableFieldMap;
|
|
2171
|
+
computable?: ComputableFieldMap1;
|
|
2172
|
+
[k: string]: unknown | undefined;
|
|
2173
|
+
};
|
|
2174
|
+
source_anchor?: SourceAnchor;
|
|
2175
|
+
/**
|
|
2176
|
+
* Optimistic concurrency revision.
|
|
2177
|
+
*/
|
|
2178
|
+
revision?: number;
|
|
2179
|
+
/**
|
|
2180
|
+
* RFC 3339 UTC datetime string.
|
|
2181
|
+
*/
|
|
2182
|
+
created_at?: string;
|
|
2183
|
+
/**
|
|
2184
|
+
* RFC 3339 UTC datetime string.
|
|
2185
|
+
*/
|
|
2186
|
+
updated_at?: string;
|
|
2187
|
+
extensions: ExtensionMap;
|
|
2188
|
+
}
|
|
2189
|
+
/**
|
|
2190
|
+
* Static durable computable state (l2-computable optional). Authoritative pre-Session and after settle.
|
|
2191
|
+
*/
|
|
2192
|
+
interface ComputableFieldMap {
|
|
2193
|
+
[k: string]: unknown | undefined;
|
|
2194
|
+
}
|
|
2195
|
+
/**
|
|
2196
|
+
* Dynamic Session-scoped computable projection (l2-computable optional). Absent or inert pre-Session; mutates mid-Session only.
|
|
2197
|
+
*/
|
|
2198
|
+
interface ComputableFieldMap1 {
|
|
2199
|
+
[k: string]: unknown | undefined;
|
|
2200
|
+
}
|
|
2201
|
+
/**
|
|
2202
|
+
* Optional provenance pointer.
|
|
2203
|
+
*/
|
|
2204
|
+
interface SourceAnchor {
|
|
2205
|
+
/**
|
|
2206
|
+
* Wire schema version (integer >= 1).
|
|
2207
|
+
*/
|
|
2208
|
+
schema_version: number;
|
|
2209
|
+
/**
|
|
2210
|
+
* Opaque source locator; products define grammar.
|
|
2211
|
+
*/
|
|
2212
|
+
source_id: string;
|
|
2213
|
+
span?: SourceSpan;
|
|
2214
|
+
/**
|
|
2215
|
+
* Optional human label for the anchor.
|
|
2216
|
+
*/
|
|
2217
|
+
label?: string;
|
|
2218
|
+
/**
|
|
2219
|
+
* Optional MIME type of the referenced source.
|
|
2220
|
+
*/
|
|
2221
|
+
mime_type?: string;
|
|
2222
|
+
extensions: ExtensionMap;
|
|
2223
|
+
}
|
|
2224
|
+
/**
|
|
2225
|
+
* Optional byte or character span within the source.
|
|
2226
|
+
*/
|
|
2227
|
+
interface SourceSpan {
|
|
2228
|
+
/**
|
|
2229
|
+
* Start offset (inclusive).
|
|
2230
|
+
*/
|
|
2231
|
+
start: number;
|
|
2232
|
+
/**
|
|
2233
|
+
* End offset (exclusive).
|
|
2234
|
+
*/
|
|
2235
|
+
end: number;
|
|
2236
|
+
}
|
|
2237
|
+
/**
|
|
2238
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
2239
|
+
*/
|
|
2240
|
+
interface ExtensionMap {
|
|
2241
|
+
[k: string]: {
|
|
2242
|
+
[k: string]: unknown | undefined;
|
|
2243
|
+
} | undefined;
|
|
2244
|
+
}
|
|
2245
|
+
interface UpsertRejected {
|
|
2246
|
+
/**
|
|
2247
|
+
* Rejected KnowledgeEntry id.
|
|
2248
|
+
*/
|
|
2249
|
+
entry_id: string;
|
|
2250
|
+
/**
|
|
2251
|
+
* Machine-readable rejection code.
|
|
2252
|
+
*/
|
|
2253
|
+
code: string;
|
|
2254
|
+
/**
|
|
2255
|
+
* Human-readable rejection message.
|
|
2256
|
+
*/
|
|
2257
|
+
message: string;
|
|
2258
|
+
}
|
|
2259
|
+
/**
|
|
2260
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
2261
|
+
*/
|
|
2262
|
+
interface ExtensionMap1 {
|
|
2263
|
+
[k: string]: {
|
|
2264
|
+
[k: string]: unknown | undefined;
|
|
2265
|
+
} | undefined;
|
|
2266
|
+
}
|
|
2267
|
+
/**
|
|
2268
|
+
* Failure: shared error envelope.
|
|
2269
|
+
*/
|
|
2270
|
+
interface ErrorEnvelope {
|
|
2271
|
+
/**
|
|
2272
|
+
* Machine-readable error code.
|
|
2273
|
+
*/
|
|
2274
|
+
code: string;
|
|
2275
|
+
/**
|
|
2276
|
+
* Human-readable error message.
|
|
2277
|
+
*/
|
|
2278
|
+
message: string;
|
|
2279
|
+
/**
|
|
2280
|
+
* Optional structured error context.
|
|
2281
|
+
*/
|
|
2282
|
+
details?: {
|
|
2283
|
+
[k: string]: unknown | undefined;
|
|
2284
|
+
};
|
|
2285
|
+
extensions: ExtensionMap;
|
|
2286
|
+
}
|
|
2287
|
+
/**
|
|
2288
|
+
* Product namespace bag keyed by product-chosen ids matching ^[a-z][a-z0-9_-]*$. Values are opaque JSON objects. Adapters MUST preserve unknown namespaces and keys on round-trip.
|
|
2289
|
+
*/
|
|
2290
|
+
interface ExtensionMap2 {
|
|
2291
|
+
[k: string]: {
|
|
2292
|
+
[k: string]: unknown | undefined;
|
|
2293
|
+
} | undefined;
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
export type { AssemblePacket$1 as AssemblePacket, AssembleRequest, AssembleResponse, CheckRequest, CheckResponse, ComputableFieldMap$9 as ComputableFieldMap, ComputableLogChange$1 as ComputableLogChange, ComputableLogEntry$1 as ComputableLogEntry, ComputeRequest, ComputeResponse, ErrorEnvelope$7 as ErrorEnvelope, ExtensionMap$m as ExtensionMap, Finding$1 as Finding, ForkId, KnowledgeEntry$4 as KnowledgeEntry, ProjectRequest, ProjectResponse, PromoteRequest, PromoteResponse, RelateRequest, RelateResponse, Relation$2 as Relation, Rule$1 as Rule, SPOKECommonTypes, SchemaVersion, Scope$2 as Scope, SourceAnchor$7 as SourceAnchor, SourceSpan$b as SourceSpan, TimelineEvent, TimelineScale, Timestamp, UpsertRequest, UpsertResponse };
|