@42ch/spoke-schemas 0.1.0-alpha.1 → 0.1.0-alpha.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.
@@ -1,52 +0,0 @@
1
- /**
2
- * AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
3
- * Source: schemas/
4
- * Generated by: pnpm run codegen
5
- */
6
-
7
- /**
8
- * Pointer to a source artifact span (manuscript, scene, external URI).
9
- */
10
- export interface SourceAnchor {
11
- /**
12
- * Wire schema version (integer >= 1).
13
- */
14
- schema_version: number;
15
- /**
16
- * Opaque source locator; products define grammar.
17
- */
18
- source_id: string;
19
- span?: SourceSpan;
20
- /**
21
- * Optional human label for the anchor.
22
- */
23
- label?: string;
24
- /**
25
- * Optional MIME type of the referenced source.
26
- */
27
- mime_type?: string;
28
- extensions: ExtensionMap;
29
- }
30
- /**
31
- * Optional byte or character span within the source.
32
- */
33
- export interface SourceSpan {
34
- /**
35
- * Start offset (inclusive).
36
- */
37
- start: number;
38
- /**
39
- * End offset (exclusive).
40
- */
41
- end: number;
42
- }
43
- /**
44
- * 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.
45
- */
46
- export interface ExtensionMap {
47
- [k: string]:
48
- | {
49
- [k: string]: unknown | undefined;
50
- }
51
- | undefined;
52
- }
@@ -1,151 +0,0 @@
1
- /**
2
- * AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
3
- * Source: schemas/
4
- * Generated by: pnpm run codegen
5
- */
6
-
7
- /**
8
- * First-class when-axis temporal object (L5). Distinct from KnowledgeEntry ontology labels such as entry_type: "event" (KB fact node, not this wire type).
9
- */
10
- export interface TimelineEvent {
11
- /**
12
- * Wire schema version (integer >= 1).
13
- */
14
- schema_version: number;
15
- /**
16
- * Stable TimelineEvent id (opaque to protocol).
17
- */
18
- timeline_event_id: string;
19
- /**
20
- * Human-stable label.
21
- */
22
- canonical_name: string;
23
- /**
24
- * Optional L5 projection tier (brief, narrative, moment).
25
- */
26
- timeline_scale?: string;
27
- /**
28
- * When the event happened — RFC 3339 or opaque fuzzy label (e.g. Third Age).
29
- */
30
- occurred_at?: string;
31
- /**
32
- * Longer narrative summary.
33
- */
34
- description?: string;
35
- /**
36
- * Related KnowledgeEntry ids (characters, locations, etc.).
37
- */
38
- participant_entry_ids?: string[];
39
- source_anchor?: SourceAnchor;
40
- /**
41
- * Opaque ordering hint within a timeline (products define grammar).
42
- */
43
- sort_key?: string;
44
- /**
45
- * Optional world-history branch identity (l5-fork).
46
- */
47
- fork_id?: string;
48
- /**
49
- * Optional parent/base branch reference when product records fork lineage on the event.
50
- */
51
- parent_fork_id?: string;
52
- /**
53
- * Optional Moment-scale presentation of computable field change history (l2-computable only). Not Finding-shaped.
54
- */
55
- computable_logs?: ComputableLogEntry[];
56
- /**
57
- * RFC 3339 UTC datetime string.
58
- */
59
- created_at?: string;
60
- /**
61
- * RFC 3339 UTC datetime string.
62
- */
63
- updated_at?: string;
64
- extensions: ExtensionMap;
65
- }
66
- /**
67
- * Optional manuscript or scene anchor.
68
- */
69
- export interface SourceAnchor {
70
- /**
71
- * Wire schema version (integer >= 1).
72
- */
73
- schema_version: number;
74
- /**
75
- * Opaque source locator; products define grammar.
76
- */
77
- source_id: string;
78
- span?: SourceSpan;
79
- /**
80
- * Optional human label for the anchor.
81
- */
82
- label?: string;
83
- /**
84
- * Optional MIME type of the referenced source.
85
- */
86
- mime_type?: string;
87
- extensions: ExtensionMap;
88
- }
89
- /**
90
- * Optional byte or character span within the source.
91
- */
92
- export interface SourceSpan {
93
- /**
94
- * Start offset (inclusive).
95
- */
96
- start: number;
97
- /**
98
- * End offset (exclusive).
99
- */
100
- end: number;
101
- }
102
- /**
103
- * 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.
104
- */
105
- export interface ExtensionMap {
106
- [k: string]:
107
- | {
108
- [k: string]: unknown | undefined;
109
- }
110
- | undefined;
111
- }
112
- export interface ComputableLogEntry {
113
- /**
114
- * When the computable field change was recorded (RFC 3339).
115
- */
116
- logged_at: string;
117
- /**
118
- * KnowledgeEntry id whose computable fields changed.
119
- */
120
- entry_id: string;
121
- /**
122
- * Field-level change records within body.computable.
123
- */
124
- changes: ComputableLogChange[];
125
- /**
126
- * Opaque Session correlation (matches op session_id when omitted on parent context).
127
- */
128
- session_id?: string;
129
- /**
130
- * Human-readable presentation note (presentation only).
131
- */
132
- message?: string;
133
- }
134
- export interface ComputableLogChange {
135
- /**
136
- * Dot-path or JSON Pointer to changed field within body.computable.
137
- */
138
- path: string;
139
- /**
140
- * Opaque JSON — value before change.
141
- */
142
- previous?: {
143
- [k: string]: unknown | undefined;
144
- };
145
- /**
146
- * Opaque JSON — value after change.
147
- */
148
- next?: {
149
- [k: string]: unknown | undefined;
150
- };
151
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
3
- * Source: schemas/
4
- * Generated by: pnpm run codegen
5
- */
6
-
7
- export * from './common';
8
- export * from './data';
9
- export * from './ops';
@@ -1,60 +0,0 @@
1
- /**
2
- * AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
3
- * Source: schemas/
4
- * Generated by: pnpm run codegen
5
- */
6
-
7
- /**
8
- * Selector hints for context assembly. Wire-only — no compute semantics.
9
- */
10
- export interface AssembleRequest {
11
- scope: Scope;
12
- /**
13
- * Optional entry limit hint (not enforced by protocol).
14
- */
15
- max_entries?: number;
16
- extensions?: ExtensionMap;
17
- }
18
- /**
19
- * Assembly scope selector.
20
- */
21
- export interface Scope {
22
- /**
23
- * Protocol-neutral opaque selector. Products map World/Book/chapter/manuscript ids via adapters or op extensions.
24
- */
25
- scope_id: string;
26
- /**
27
- * Optional narrow scope to explicit KnowledgeEntries.
28
- */
29
- entry_ids?: string[];
30
- /**
31
- * Optional filter by open entry_type vocabulary.
32
- */
33
- entry_types?: string[];
34
- /**
35
- * Optional narrow scope to explicit L5 TimelineEvent ids.
36
- */
37
- timeline_event_ids?: string[];
38
- /**
39
- * Optional provenance or manuscript locator scope.
40
- */
41
- source_id?: string;
42
- /**
43
- * Optional L5 tier filter (brief, narrative, moment).
44
- */
45
- timeline_scale?: string;
46
- /**
47
- * Optional L5 branch filter — strict equality on TimelineEvent.fork_id (l5-fork).
48
- */
49
- fork_id?: string;
50
- }
51
- /**
52
- * Optional transport metadata.
53
- */
54
- export interface ExtensionMap {
55
- [k: string]:
56
- | {
57
- [k: string]: unknown | undefined;
58
- }
59
- | undefined;
60
- }
@@ -1,109 +0,0 @@
1
- /**
2
- * AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
3
- * Source: schemas/
4
- * Generated by: pnpm run codegen
5
- */
6
-
7
- /**
8
- * Assemble success packet or wire error. Use packet OR error — not both.
9
- */
10
- export type AssembleResponse =
11
- | {
12
- packet: AssemblePacket;
13
- extensions?: ExtensionMap1;
14
- }
15
- | {
16
- error: ErrorEnvelope;
17
- extensions?: ExtensionMap2;
18
- };
19
-
20
- /**
21
- * Success: assembled context packet.
22
- */
23
- export interface AssemblePacket {
24
- /**
25
- * Wire schema version (integer >= 1).
26
- */
27
- schema_version: number;
28
- /**
29
- * Stable packet id.
30
- */
31
- packet_id: string;
32
- /**
33
- * Slim context entries (default). Full KnowledgeEntry embedding is op-specific.
34
- */
35
- entries: AssembleEntry[];
36
- extensions: ExtensionMap;
37
- }
38
- /**
39
- * This interface was referenced by `AssemblePacket`'s JSON-Schema
40
- * via the `definition` "AssembleEntry".
41
- */
42
- export interface AssembleEntry {
43
- /**
44
- * Referenced KnowledgeEntry id.
45
- */
46
- entry_id: string;
47
- /**
48
- * Open string. Same core vocabulary as KnowledgeEntry.entry_type.
49
- */
50
- entry_type: string;
51
- /**
52
- * Display name for context window.
53
- */
54
- canonical_name: string;
55
- /**
56
- * Optional trimmed text for context window.
57
- */
58
- snippet?: string;
59
- }
60
- /**
61
- * 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.
62
- */
63
- export interface ExtensionMap {
64
- [k: string]:
65
- | {
66
- [k: string]: unknown | undefined;
67
- }
68
- | undefined;
69
- }
70
- /**
71
- * 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.
72
- */
73
- export interface ExtensionMap1 {
74
- [k: string]:
75
- | {
76
- [k: string]: unknown | undefined;
77
- }
78
- | undefined;
79
- }
80
- /**
81
- * Failure: shared error envelope.
82
- */
83
- export interface ErrorEnvelope {
84
- /**
85
- * Machine-readable error code.
86
- */
87
- code: string;
88
- /**
89
- * Human-readable error message.
90
- */
91
- message: string;
92
- /**
93
- * Optional structured error context.
94
- */
95
- details?: {
96
- [k: string]: unknown | undefined;
97
- };
98
- extensions: ExtensionMap;
99
- }
100
- /**
101
- * 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.
102
- */
103
- export interface ExtensionMap2 {
104
- [k: string]:
105
- | {
106
- [k: string]: unknown | undefined;
107
- }
108
- | undefined;
109
- }
@@ -1,165 +0,0 @@
1
- /**
2
- * AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
3
- * Source: schemas/
4
- * Generated by: pnpm run codegen
5
- */
6
-
7
- /**
8
- * Run checker(s) over a scope; returns Finding(s).
9
- */
10
- export interface CheckRequest {
11
- scope: Scope;
12
- /**
13
- * Opaque rule ids or URIs. Resolved by receiver when not overridden by rules[].
14
- */
15
- rule_refs?: string[];
16
- /**
17
- * Optional embedded Rule objects for portable interchange.
18
- */
19
- rules?: Rule[];
20
- /**
21
- * Optional checker kind filters.
22
- */
23
- checker_kinds?: string[];
24
- extensions?: ExtensionMap1;
25
- }
26
- /**
27
- * Checker scope selector.
28
- */
29
- export interface Scope {
30
- /**
31
- * Protocol-neutral opaque selector. Products map World/Book/chapter/manuscript ids via adapters or op extensions.
32
- */
33
- scope_id: string;
34
- /**
35
- * Optional narrow scope to explicit KnowledgeEntries.
36
- */
37
- entry_ids?: string[];
38
- /**
39
- * Optional filter by open entry_type vocabulary.
40
- */
41
- entry_types?: string[];
42
- /**
43
- * Optional narrow scope to explicit L5 TimelineEvent ids.
44
- */
45
- timeline_event_ids?: string[];
46
- /**
47
- * Optional provenance or manuscript locator scope.
48
- */
49
- source_id?: string;
50
- /**
51
- * Optional L5 tier filter (brief, narrative, moment).
52
- */
53
- timeline_scale?: string;
54
- /**
55
- * Optional L5 branch filter — strict equality on TimelineEvent.fork_id (l5-fork).
56
- */
57
- fork_id?: string;
58
- }
59
- /**
60
- * Declarative constraint input to check — never checker output.
61
- */
62
- export interface Rule {
63
- /**
64
- * Wire schema version (integer >= 1).
65
- */
66
- schema_version: number;
67
- /**
68
- * Stable rule id (opaque to protocol).
69
- */
70
- rule_id: string;
71
- /**
72
- * Human-stable name.
73
- */
74
- canonical_name: string;
75
- /**
76
- * Open string. Core vocabulary (documented, not enforced): rule, prohibition, style.
77
- */
78
- kind: string;
79
- /**
80
- * Declarative constraint text (human- or machine-readable; products choose grammar).
81
- */
82
- statement?: string;
83
- /**
84
- * Longer explanation for integrators or authors.
85
- */
86
- description?: string;
87
- /**
88
- * Optional ontology filter — open strings matching KnowledgeEntry entry_type vocabulary.
89
- */
90
- target_entry_types?: string[];
91
- /**
92
- * Optional checker hint. Core vocabulary (documented, not enforced): info, warning, error.
93
- */
94
- severity_hint?: string;
95
- source_anchor?: SourceAnchor;
96
- /**
97
- * Open string. Core vocabulary (documented, not enforced): draft, active, deprecated.
98
- */
99
- status?: string;
100
- /**
101
- * RFC 3339 UTC datetime string.
102
- */
103
- created_at?: string;
104
- /**
105
- * RFC 3339 UTC datetime string.
106
- */
107
- updated_at?: string;
108
- extensions: ExtensionMap;
109
- }
110
- /**
111
- * Optional provenance pointer when rule is anchored to manuscript.
112
- */
113
- export interface SourceAnchor {
114
- /**
115
- * Wire schema version (integer >= 1).
116
- */
117
- schema_version: number;
118
- /**
119
- * Opaque source locator; products define grammar.
120
- */
121
- source_id: string;
122
- span?: SourceSpan;
123
- /**
124
- * Optional human label for the anchor.
125
- */
126
- label?: string;
127
- /**
128
- * Optional MIME type of the referenced source.
129
- */
130
- mime_type?: string;
131
- extensions: ExtensionMap;
132
- }
133
- /**
134
- * Optional byte or character span within the source.
135
- */
136
- export interface SourceSpan {
137
- /**
138
- * Start offset (inclusive).
139
- */
140
- start: number;
141
- /**
142
- * End offset (exclusive).
143
- */
144
- end: number;
145
- }
146
- /**
147
- * 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.
148
- */
149
- export interface ExtensionMap {
150
- [k: string]:
151
- | {
152
- [k: string]: unknown | undefined;
153
- }
154
- | undefined;
155
- }
156
- /**
157
- * 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.
158
- */
159
- export interface ExtensionMap1 {
160
- [k: string]:
161
- | {
162
- [k: string]: unknown | undefined;
163
- }
164
- | undefined;
165
- }
@@ -1,165 +0,0 @@
1
- /**
2
- * AUTO-GENERATED FROM JSON SCHEMA - DO NOT MODIFY
3
- * Source: schemas/
4
- * Generated by: pnpm run codegen
5
- */
6
-
7
- /**
8
- * Checker findings or wire error. Use findings OR error — not both.
9
- */
10
- export type CheckResponse =
11
- | {
12
- /**
13
- * Success: checker output findings.
14
- */
15
- findings: Finding[];
16
- extensions?: ExtensionMap1;
17
- }
18
- | {
19
- error: ErrorEnvelope;
20
- extensions?: ExtensionMap2;
21
- };
22
-
23
- /**
24
- * Checker output — not a KnowledgeEntry body.
25
- */
26
- export interface Finding {
27
- /**
28
- * Wire schema version (integer >= 1).
29
- */
30
- schema_version: number;
31
- /**
32
- * Stable finding id.
33
- */
34
- finding_id: string;
35
- /**
36
- * Open string. Core vocabulary (documented, not enforced): info, warning, error.
37
- */
38
- severity: string;
39
- /**
40
- * Open string. Core vocabulary (documented, not enforced): open, resolved, dismissed.
41
- */
42
- status: string;
43
- /**
44
- * Short finding title.
45
- */
46
- title: string;
47
- /**
48
- * Finding detail text.
49
- */
50
- description: string;
51
- /**
52
- * Optional checker kind or category.
53
- */
54
- kind?: string;
55
- /**
56
- * Optional KnowledgeEntry the finding targets.
57
- */
58
- target_entry_id?: string;
59
- source_anchor?: SourceAnchor;
60
- /**
61
- * Optional suggested remediation text.
62
- */
63
- suggested_fix?: string;
64
- /**
65
- * Optional position hint within source text.
66
- */
67
- text_position?: {
68
- [k: string]: unknown | undefined;
69
- };
70
- /**
71
- * RFC 3339 UTC datetime string.
72
- */
73
- created_at?: string;
74
- /**
75
- * RFC 3339 UTC datetime string.
76
- */
77
- updated_at?: string;
78
- extensions: ExtensionMap;
79
- }
80
- /**
81
- * Optional provenance pointer.
82
- */
83
- export interface SourceAnchor {
84
- /**
85
- * Wire schema version (integer >= 1).
86
- */
87
- schema_version: number;
88
- /**
89
- * Opaque source locator; products define grammar.
90
- */
91
- source_id: string;
92
- span?: SourceSpan;
93
- /**
94
- * Optional human label for the anchor.
95
- */
96
- label?: string;
97
- /**
98
- * Optional MIME type of the referenced source.
99
- */
100
- mime_type?: string;
101
- extensions: ExtensionMap;
102
- }
103
- /**
104
- * Optional byte or character span within the source.
105
- */
106
- export interface SourceSpan {
107
- /**
108
- * Start offset (inclusive).
109
- */
110
- start: number;
111
- /**
112
- * End offset (exclusive).
113
- */
114
- end: number;
115
- }
116
- /**
117
- * 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.
118
- */
119
- export interface ExtensionMap {
120
- [k: string]:
121
- | {
122
- [k: string]: unknown | undefined;
123
- }
124
- | undefined;
125
- }
126
- /**
127
- * 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.
128
- */
129
- export interface ExtensionMap1 {
130
- [k: string]:
131
- | {
132
- [k: string]: unknown | undefined;
133
- }
134
- | undefined;
135
- }
136
- /**
137
- * Failure: shared error envelope.
138
- */
139
- export interface ErrorEnvelope {
140
- /**
141
- * Machine-readable error code.
142
- */
143
- code: string;
144
- /**
145
- * Human-readable error message.
146
- */
147
- message: string;
148
- /**
149
- * Optional structured error context.
150
- */
151
- details?: {
152
- [k: string]: unknown | undefined;
153
- };
154
- extensions: ExtensionMap;
155
- }
156
- /**
157
- * 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.
158
- */
159
- export interface ExtensionMap2 {
160
- [k: string]:
161
- | {
162
- [k: string]: unknown | undefined;
163
- }
164
- | undefined;
165
- }