@tenphi/akno-protocol 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/LICENSE +83 -0
  2. package/README.md +26 -0
  3. package/dist/common.d.ts +1553 -0
  4. package/dist/common.d.ts.map +1 -0
  5. package/dist/common.js +309 -0
  6. package/dist/common.js.map +1 -0
  7. package/dist/errors.d.ts +24 -0
  8. package/dist/errors.d.ts.map +1 -0
  9. package/dist/errors.js +69 -0
  10. package/dist/errors.js.map +1 -0
  11. package/dist/index.d.ts +16 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +16 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/ops/answer.d.ts +207 -0
  16. package/dist/ops/answer.d.ts.map +1 -0
  17. package/dist/ops/answer.js +90 -0
  18. package/dist/ops/answer.js.map +1 -0
  19. package/dist/ops/context.d.ts +845 -0
  20. package/dist/ops/context.d.ts.map +1 -0
  21. package/dist/ops/context.js +82 -0
  22. package/dist/ops/context.js.map +1 -0
  23. package/dist/ops/folder.d.ts +85 -0
  24. package/dist/ops/folder.d.ts.map +1 -0
  25. package/dist/ops/folder.js +56 -0
  26. package/dist/ops/folder.js.map +1 -0
  27. package/dist/ops/graph.d.ts +352 -0
  28. package/dist/ops/graph.d.ts.map +1 -0
  29. package/dist/ops/graph.js +63 -0
  30. package/dist/ops/graph.js.map +1 -0
  31. package/dist/ops/list.d.ts +136 -0
  32. package/dist/ops/list.d.ts.map +1 -0
  33. package/dist/ops/list.js +57 -0
  34. package/dist/ops/list.js.map +1 -0
  35. package/dist/ops/mutate.d.ts +432 -0
  36. package/dist/ops/mutate.d.ts.map +1 -0
  37. package/dist/ops/mutate.js +234 -0
  38. package/dist/ops/mutate.js.map +1 -0
  39. package/dist/ops/read.d.ts +242 -0
  40. package/dist/ops/read.d.ts.map +1 -0
  41. package/dist/ops/read.js +65 -0
  42. package/dist/ops/read.js.map +1 -0
  43. package/dist/ops/recall.d.ts +531 -0
  44. package/dist/ops/recall.d.ts.map +1 -0
  45. package/dist/ops/recall.js +59 -0
  46. package/dist/ops/recall.js.map +1 -0
  47. package/dist/ops/timeline.d.ts +264 -0
  48. package/dist/ops/timeline.d.ts.map +1 -0
  49. package/dist/ops/timeline.js +68 -0
  50. package/dist/ops/timeline.js.map +1 -0
  51. package/dist/ops/write.d.ts +182 -0
  52. package/dist/ops/write.d.ts.map +1 -0
  53. package/dist/ops/write.js +114 -0
  54. package/dist/ops/write.js.map +1 -0
  55. package/dist/registry.d.ts +2657 -0
  56. package/dist/registry.d.ts.map +1 -0
  57. package/dist/registry.js +191 -0
  58. package/dist/registry.js.map +1 -0
  59. package/dist/version.d.ts +14 -0
  60. package/dist/version.d.ts.map +1 -0
  61. package/dist/version.js +14 -0
  62. package/dist/version.js.map +1 -0
  63. package/dist/wire.d.ts +112 -0
  64. package/dist/wire.d.ts.map +1 -0
  65. package/dist/wire.js +102 -0
  66. package/dist/wire.js.map +1 -0
  67. package/package.json +38 -0
@@ -0,0 +1,264 @@
1
+ import { z } from 'zod';
2
+ /** Reading is always filtered — a ledger spans years. */
3
+ export declare const TimelineInput: z.ZodObject<{
4
+ since: z.ZodOptional<z.ZodString>;
5
+ until: z.ZodOptional<z.ZodString>;
6
+ match: z.ZodOptional<z.ZodString>;
7
+ subject: z.ZodOptional<z.ZodString>;
8
+ source: z.ZodOptional<z.ZodEnum<{
9
+ document: "document";
10
+ event: "event";
11
+ both: "both";
12
+ }>>;
13
+ limit: z.ZodOptional<z.ZodNumber>;
14
+ order: z.ZodOptional<z.ZodEnum<{
15
+ newest: "newest";
16
+ oldest: "oldest";
17
+ }>>;
18
+ }, z.core.$strip>;
19
+ export type TimelineInput = z.infer<typeof TimelineInput>;
20
+ export declare const Event: z.ZodObject<{
21
+ id: z.ZodString;
22
+ date: z.ZodString;
23
+ summary: z.ZodString;
24
+ slug: z.ZodNullable<z.ZodString>;
25
+ source: z.ZodString;
26
+ line: z.ZodNullable<z.ZodNumber>;
27
+ }, z.core.$strip>;
28
+ export type Event = z.infer<typeof Event>;
29
+ export declare const TimelineEvent: z.ZodObject<{
30
+ id: z.ZodString;
31
+ date: z.ZodString;
32
+ summary: z.ZodString;
33
+ slug: z.ZodNullable<z.ZodString>;
34
+ source: z.ZodString;
35
+ line: z.ZodNullable<z.ZodNumber>;
36
+ type: z.ZodLiteral<"event">;
37
+ }, z.core.$strip>;
38
+ export type TimelineEvent = z.infer<typeof TimelineEvent>;
39
+ /**
40
+ * A date evidenced by an unfiled document. It is deliberately not an `Event`:
41
+ * a date in source material or filesystem metadata is not an authored claim
42
+ * about what happened.
43
+ */
44
+ export declare const DocumentTimelineEvidence: z.ZodObject<{
45
+ type: z.ZodLiteral<"document_evidence">;
46
+ id: z.ZodString;
47
+ date: z.ZodString;
48
+ date_basis: z.ZodEnum<{
49
+ extracted: "extracted";
50
+ file_created: "file_created";
51
+ file_modified: "file_modified";
52
+ }>;
53
+ document_id: z.ZodString;
54
+ path: z.ZodString;
55
+ label: z.ZodString;
56
+ mime: z.ZodNullable<z.ZodString>;
57
+ matched_page: z.ZodOptional<z.ZodNumber>;
58
+ quote: z.ZodOptional<z.ZodString>;
59
+ text_source: z.ZodOptional<z.ZodObject<{
60
+ kind: z.ZodEnum<{
61
+ none: "none";
62
+ original_text: "original_text";
63
+ ocr_text: "ocr_text";
64
+ model_description: "model_description";
65
+ }>;
66
+ via: z.ZodEnum<{
67
+ none: "none";
68
+ plain: "plain";
69
+ textutil: "textutil";
70
+ "text-layer": "text-layer";
71
+ ocr: "ocr";
72
+ vision: "vision";
73
+ }>;
74
+ confidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
75
+ }, z.core.$strip>>;
76
+ availability: z.ZodObject<{
77
+ status: z.ZodEnum<{
78
+ degraded: "degraded";
79
+ unavailable: "unavailable";
80
+ available: "available";
81
+ }>;
82
+ available_from: z.ZodArray<z.ZodEnum<{
83
+ original: "original";
84
+ indexed_text: "indexed_text";
85
+ rendition: "rendition";
86
+ }>>;
87
+ missing_originals: z.ZodArray<z.ZodString>;
88
+ available_renditions: z.ZodArray<z.ZodString>;
89
+ missing_since: z.ZodOptional<z.ZodString>;
90
+ }, z.core.$strip>;
91
+ suggested_actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
92
+ op: z.ZodLiteral<"adopt">;
93
+ args: z.ZodObject<{
94
+ documentId: z.ZodString;
95
+ }, z.core.$strip>;
96
+ }, z.core.$strip>>>;
97
+ }, z.core.$strip>;
98
+ export type DocumentTimelineEvidence = z.infer<typeof DocumentTimelineEvidence>;
99
+ export declare const TimelineResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
100
+ id: z.ZodString;
101
+ date: z.ZodString;
102
+ summary: z.ZodString;
103
+ slug: z.ZodNullable<z.ZodString>;
104
+ source: z.ZodString;
105
+ line: z.ZodNullable<z.ZodNumber>;
106
+ type: z.ZodLiteral<"event">;
107
+ }, z.core.$strip>, z.ZodObject<{
108
+ type: z.ZodLiteral<"document_evidence">;
109
+ id: z.ZodString;
110
+ date: z.ZodString;
111
+ date_basis: z.ZodEnum<{
112
+ extracted: "extracted";
113
+ file_created: "file_created";
114
+ file_modified: "file_modified";
115
+ }>;
116
+ document_id: z.ZodString;
117
+ path: z.ZodString;
118
+ label: z.ZodString;
119
+ mime: z.ZodNullable<z.ZodString>;
120
+ matched_page: z.ZodOptional<z.ZodNumber>;
121
+ quote: z.ZodOptional<z.ZodString>;
122
+ text_source: z.ZodOptional<z.ZodObject<{
123
+ kind: z.ZodEnum<{
124
+ none: "none";
125
+ original_text: "original_text";
126
+ ocr_text: "ocr_text";
127
+ model_description: "model_description";
128
+ }>;
129
+ via: z.ZodEnum<{
130
+ none: "none";
131
+ plain: "plain";
132
+ textutil: "textutil";
133
+ "text-layer": "text-layer";
134
+ ocr: "ocr";
135
+ vision: "vision";
136
+ }>;
137
+ confidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
138
+ }, z.core.$strip>>;
139
+ availability: z.ZodObject<{
140
+ status: z.ZodEnum<{
141
+ degraded: "degraded";
142
+ unavailable: "unavailable";
143
+ available: "available";
144
+ }>;
145
+ available_from: z.ZodArray<z.ZodEnum<{
146
+ original: "original";
147
+ indexed_text: "indexed_text";
148
+ rendition: "rendition";
149
+ }>>;
150
+ missing_originals: z.ZodArray<z.ZodString>;
151
+ available_renditions: z.ZodArray<z.ZodString>;
152
+ missing_since: z.ZodOptional<z.ZodString>;
153
+ }, z.core.$strip>;
154
+ suggested_actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
155
+ op: z.ZodLiteral<"adopt">;
156
+ args: z.ZodObject<{
157
+ documentId: z.ZodString;
158
+ }, z.core.$strip>;
159
+ }, z.core.$strip>>>;
160
+ }, z.core.$strip>], "type">;
161
+ export type TimelineResult = z.infer<typeof TimelineResult>;
162
+ export declare function isTimelineEvent(result: TimelineResult): result is TimelineEvent;
163
+ export declare function isDocumentTimelineEvidence(result: TimelineResult): result is DocumentTimelineEvidence;
164
+ export declare const TimelineOutput: z.ZodObject<{
165
+ status: z.ZodEnum<{
166
+ ok: "ok";
167
+ empty: "empty";
168
+ degraded: "degraded";
169
+ unavailable: "unavailable";
170
+ }>;
171
+ degraded: z.ZodOptional<z.ZodArray<z.ZodEnum<{
172
+ no_embedding_model: "no_embedding_model";
173
+ no_reranker: "no_reranker";
174
+ no_derive_model: "no_derive_model";
175
+ no_expansion_model: "no_expansion_model";
176
+ embedding_failed: "embedding_failed";
177
+ rerank_failed: "rerank_failed";
178
+ derive_failed: "derive_failed";
179
+ expansion_failed: "expansion_failed";
180
+ no_vector_index: "no_vector_index";
181
+ partial_index: "partial_index";
182
+ no_document_text: "no_document_text";
183
+ document_source_missing: "document_source_missing";
184
+ no_graph_index: "no_graph_index";
185
+ no_entity_index: "no_entity_index";
186
+ entity_resolution_failed: "entity_resolution_failed";
187
+ partial_graph_index: "partial_graph_index";
188
+ graph_traversal_limited: "graph_traversal_limited";
189
+ no_answer_model: "no_answer_model";
190
+ answer_failed: "answer_failed";
191
+ answer_verification_failed: "answer_verification_failed";
192
+ answer_truncated: "answer_truncated";
193
+ }>>>;
194
+ note: z.ZodOptional<z.ZodString>;
195
+ results: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
196
+ id: z.ZodString;
197
+ date: z.ZodString;
198
+ summary: z.ZodString;
199
+ slug: z.ZodNullable<z.ZodString>;
200
+ source: z.ZodString;
201
+ line: z.ZodNullable<z.ZodNumber>;
202
+ type: z.ZodLiteral<"event">;
203
+ }, z.core.$strip>, z.ZodObject<{
204
+ type: z.ZodLiteral<"document_evidence">;
205
+ id: z.ZodString;
206
+ date: z.ZodString;
207
+ date_basis: z.ZodEnum<{
208
+ extracted: "extracted";
209
+ file_created: "file_created";
210
+ file_modified: "file_modified";
211
+ }>;
212
+ document_id: z.ZodString;
213
+ path: z.ZodString;
214
+ label: z.ZodString;
215
+ mime: z.ZodNullable<z.ZodString>;
216
+ matched_page: z.ZodOptional<z.ZodNumber>;
217
+ quote: z.ZodOptional<z.ZodString>;
218
+ text_source: z.ZodOptional<z.ZodObject<{
219
+ kind: z.ZodEnum<{
220
+ none: "none";
221
+ original_text: "original_text";
222
+ ocr_text: "ocr_text";
223
+ model_description: "model_description";
224
+ }>;
225
+ via: z.ZodEnum<{
226
+ none: "none";
227
+ plain: "plain";
228
+ textutil: "textutil";
229
+ "text-layer": "text-layer";
230
+ ocr: "ocr";
231
+ vision: "vision";
232
+ }>;
233
+ confidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
234
+ }, z.core.$strip>>;
235
+ availability: z.ZodObject<{
236
+ status: z.ZodEnum<{
237
+ degraded: "degraded";
238
+ unavailable: "unavailable";
239
+ available: "available";
240
+ }>;
241
+ available_from: z.ZodArray<z.ZodEnum<{
242
+ original: "original";
243
+ indexed_text: "indexed_text";
244
+ rendition: "rendition";
245
+ }>>;
246
+ missing_originals: z.ZodArray<z.ZodString>;
247
+ available_renditions: z.ZodArray<z.ZodString>;
248
+ missing_since: z.ZodOptional<z.ZodString>;
249
+ }, z.core.$strip>;
250
+ suggested_actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
251
+ op: z.ZodLiteral<"adopt">;
252
+ args: z.ZodObject<{
253
+ documentId: z.ZodString;
254
+ }, z.core.$strip>;
255
+ }, z.core.$strip>>>;
256
+ }, z.core.$strip>], "type">>;
257
+ total: z.ZodNumber;
258
+ range: z.ZodObject<{
259
+ since: z.ZodNullable<z.ZodString>;
260
+ until: z.ZodNullable<z.ZodString>;
261
+ }, z.core.$strip>;
262
+ }, z.core.$strip>;
263
+ export type TimelineOutput = z.infer<typeof TimelineOutput>;
264
+ //# sourceMappingURL=timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../src/ops/timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yDAAyD;AACzD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;iBAUxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,KAAK;;;;;;;iBAWhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AAE1C,eAAO,MAAM,aAAa;;;;;;;;iBAA6C,CAAC;AACxE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsBnC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAA0E,CAAC;AACtG,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,IAAI,aAAa,CAE/E;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,IAAI,wBAAwB,CAErG;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { z } from 'zod';
2
+ import { DatePrefix, DocumentAvailability, DocumentTextSource, ResultEnvelope } from "../common.js";
3
+ /** Reading is always filtered — a ledger spans years. */
4
+ export const TimelineInput = z.object({
5
+ since: DatePrefix.optional(),
6
+ until: DatePrefix.optional(),
7
+ match: z.string().optional(),
8
+ /** A page slug, or an orphan document id/path. */
9
+ subject: z.string().optional(),
10
+ /** Restrict results to authored events, orphan document evidence, or both. */
11
+ source: z.enum(['event', 'document', 'both']).optional(),
12
+ limit: z.number().int().positive().max(2000).optional(),
13
+ order: z.enum(['newest', 'oldest']).optional(),
14
+ });
15
+ export const Event = z.object({
16
+ id: z.string(),
17
+ date: z.string(),
18
+ summary: z.string(),
19
+ /** The page this event links to, when it has one. Plenty of events never will. */
20
+ slug: z.string().nullable(),
21
+ /** Where the line lives — `timeline` for the ledger, otherwise the page it was
22
+ * written on. Dated lines are indexed from any page, so someone typing events
23
+ * into their own daily notes gets them for free. */
24
+ source: z.string(),
25
+ line: z.number().int().positive().nullable(),
26
+ });
27
+ export const TimelineEvent = Event.extend({ type: z.literal('event') });
28
+ /**
29
+ * A date evidenced by an unfiled document. It is deliberately not an `Event`:
30
+ * a date in source material or filesystem metadata is not an authored claim
31
+ * about what happened.
32
+ */
33
+ export const DocumentTimelineEvidence = z.object({
34
+ type: z.literal('document_evidence'),
35
+ id: z.string(),
36
+ date: z.string(),
37
+ date_basis: z.enum(['extracted', 'file_created', 'file_modified']),
38
+ document_id: z.string(),
39
+ path: z.string(),
40
+ label: z.string(),
41
+ mime: z.string().nullable(),
42
+ matched_page: z.number().int().positive().optional(),
43
+ /** Required for an extracted date; absent when the date is filesystem metadata. */
44
+ quote: z.string().optional(),
45
+ text_source: DocumentTextSource.optional(),
46
+ availability: DocumentAvailability,
47
+ suggested_actions: z
48
+ .array(z.object({
49
+ op: z.literal('adopt'),
50
+ args: z.object({ documentId: z.string() }),
51
+ }))
52
+ .optional(),
53
+ });
54
+ export const TimelineResult = z.discriminatedUnion('type', [TimelineEvent, DocumentTimelineEvidence]);
55
+ export function isTimelineEvent(result) {
56
+ return result.type === 'event';
57
+ }
58
+ export function isDocumentTimelineEvidence(result) {
59
+ return result.type === 'document_evidence';
60
+ }
61
+ export const TimelineOutput = ResultEnvelope.extend({
62
+ /** Authoritative mixed authored-event and document-evidence results. */
63
+ results: z.array(TimelineResult),
64
+ total: z.number().int().nonnegative(),
65
+ /** The window actually read, after defaults were applied. */
66
+ range: z.object({ since: z.string().nullable(), until: z.string().nullable() }),
67
+ });
68
+ //# sourceMappingURL=timeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.js","sourceRoot":"","sources":["../../src/ops/timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEpG,yDAAyD;AACzD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,UAAU,CAAC,QAAQ,EAAE;IAC5B,KAA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AAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAC,MAAM,CAAC;IAClD,wEAAwE;IACxE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;IAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACrC,6DAA6D;IAC7D,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;CAChF,CAAC,CAAC"}
@@ -0,0 +1,182 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * There is no `add_event` op, and nothing about line syntax reaches a
4
+ * prompt. The caller hands over a date and a summary; Akno formats and files
5
+ * the ledger line.
6
+ */
7
+ export declare const EventInput: z.ZodObject<{
8
+ date: z.ZodString;
9
+ summary: z.ZodString;
10
+ }, z.core.$strip>;
11
+ export type EventInput = z.infer<typeof EventInput>;
12
+ export declare const DocumentInput: z.ZodObject<{
13
+ path: z.ZodString;
14
+ label: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strip>;
16
+ export type DocumentInput = z.infer<typeof DocumentInput>;
17
+ /**
18
+ * Create, append, patch or replace a page. Carries documents, events, tags and
19
+ * links. A write with only an `event` and no slug appends a ledger line with no
20
+ * link — still a real line in a real file, addressable as `timeline:47`.
21
+ */
22
+ export declare const WriteInput: z.ZodObject<{
23
+ slug: z.ZodOptional<z.ZodString>;
24
+ propose_slug: z.ZodOptional<z.ZodString>;
25
+ title: z.ZodOptional<z.ZodString>;
26
+ type: z.ZodOptional<z.ZodString>;
27
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ content: z.ZodOptional<z.ZodString>;
29
+ append: z.ZodOptional<z.ZodString>;
30
+ patch: z.ZodOptional<z.ZodString>;
31
+ replace: z.ZodOptional<z.ZodObject<{
32
+ find: z.ZodString;
33
+ with: z.ZodString;
34
+ }, z.core.$strip>>;
35
+ section: z.ZodOptional<z.ZodString>;
36
+ event: z.ZodOptional<z.ZodObject<{
37
+ date: z.ZodString;
38
+ summary: z.ZodString;
39
+ }, z.core.$strip>>;
40
+ documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
41
+ path: z.ZodString;
42
+ label: z.ZodOptional<z.ZodString>;
43
+ }, z.core.$strip>>>;
44
+ links: z.ZodOptional<z.ZodArray<z.ZodString>>;
45
+ dry_run: z.ZodOptional<z.ZodBoolean>;
46
+ resolve_conflict: z.ZodOptional<z.ZodString>;
47
+ }, z.core.$strip>;
48
+ export type WriteInput = z.infer<typeof WriteInput>;
49
+ export declare const WriteTarget: z.ZodObject<{
50
+ slug: z.ZodString;
51
+ line: z.ZodOptional<z.ZodNumber>;
52
+ action: z.ZodEnum<{
53
+ event: "event";
54
+ superseded: "superseded";
55
+ created: "created";
56
+ appended: "appended";
57
+ patched: "patched";
58
+ replaced: "replaced";
59
+ attached: "attached";
60
+ }>;
61
+ }, z.core.$strip>;
62
+ export type WriteTarget = z.infer<typeof WriteTarget>;
63
+ /** A conflict is two live claims on one attribute, surfaced *before* the write. */
64
+ export declare const ConflictReport: z.ZodObject<{
65
+ slug: z.ZodString;
66
+ line: z.ZodNumber;
67
+ existing: z.ZodString;
68
+ incoming: z.ZodString;
69
+ subject: z.ZodOptional<z.ZodString>;
70
+ token: z.ZodString;
71
+ }, z.core.$strip>;
72
+ export type ConflictReport = z.infer<typeof ConflictReport>;
73
+ /** A declined proposal is remembered, so the agent stops re-asking. */
74
+ export declare const ApprovalRequest: z.ZodObject<{
75
+ proposal_id: z.ZodString;
76
+ reason: z.ZodString;
77
+ reason_code: z.ZodOptional<z.ZodEnum<{
78
+ conflict: "conflict";
79
+ routing_uncertain: "routing_uncertain";
80
+ no_writable_destination: "no_writable_destination";
81
+ }>>;
82
+ nearest: z.ZodArray<z.ZodString>;
83
+ }, z.core.$strip>;
84
+ export type ApprovalRequest = z.infer<typeof ApprovalRequest>;
85
+ /**
86
+ * The write named a folder that does not exist and has no rule.
87
+ *
88
+ * **Nothing is waiting on the user here** — this is not an approval under another name. It is
89
+ * the caller being asked to say what the folder is for, with `folder`, and then repeat the
90
+ * write. The declaration is ungated; only the silence is refused.
91
+ */
92
+ export declare const FolderRequired: z.ZodObject<{
93
+ folder: z.ZodString;
94
+ nearest: z.ZodArray<z.ZodString>;
95
+ }, z.core.$strip>;
96
+ export type FolderRequired = z.infer<typeof FolderRequired>;
97
+ export declare const WriteOutput: z.ZodObject<{
98
+ status: z.ZodEnum<{
99
+ ok: "ok";
100
+ empty: "empty";
101
+ degraded: "degraded";
102
+ unavailable: "unavailable";
103
+ }>;
104
+ degraded: z.ZodOptional<z.ZodArray<z.ZodEnum<{
105
+ no_embedding_model: "no_embedding_model";
106
+ no_reranker: "no_reranker";
107
+ no_derive_model: "no_derive_model";
108
+ no_expansion_model: "no_expansion_model";
109
+ embedding_failed: "embedding_failed";
110
+ rerank_failed: "rerank_failed";
111
+ derive_failed: "derive_failed";
112
+ expansion_failed: "expansion_failed";
113
+ no_vector_index: "no_vector_index";
114
+ partial_index: "partial_index";
115
+ no_document_text: "no_document_text";
116
+ document_source_missing: "document_source_missing";
117
+ no_graph_index: "no_graph_index";
118
+ no_entity_index: "no_entity_index";
119
+ entity_resolution_failed: "entity_resolution_failed";
120
+ partial_graph_index: "partial_graph_index";
121
+ graph_traversal_limited: "graph_traversal_limited";
122
+ no_answer_model: "no_answer_model";
123
+ answer_failed: "answer_failed";
124
+ answer_verification_failed: "answer_verification_failed";
125
+ answer_truncated: "answer_truncated";
126
+ }>>>;
127
+ note: z.ZodOptional<z.ZodString>;
128
+ outcome: z.ZodEnum<{
129
+ ok: "ok";
130
+ requires_approval: "requires_approval";
131
+ conflict: "conflict";
132
+ requires_folder: "requires_folder";
133
+ noop: "noop";
134
+ }>;
135
+ change_id: z.ZodOptional<z.ZodString>;
136
+ wrote: z.ZodOptional<z.ZodArray<z.ZodObject<{
137
+ slug: z.ZodString;
138
+ line: z.ZodOptional<z.ZodNumber>;
139
+ action: z.ZodEnum<{
140
+ event: "event";
141
+ superseded: "superseded";
142
+ created: "created";
143
+ appended: "appended";
144
+ patched: "patched";
145
+ replaced: "replaced";
146
+ attached: "attached";
147
+ }>;
148
+ }, z.core.$strip>>>;
149
+ facts: z.ZodOptional<z.ZodObject<{
150
+ retired: z.ZodNumber;
151
+ added: z.ZodNumber;
152
+ }, z.core.$strip>>;
153
+ documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
154
+ id: z.ZodString;
155
+ rel_path: z.ZodString;
156
+ text_from: z.ZodOptional<z.ZodString>;
157
+ }, z.core.$strip>>>;
158
+ conflict: z.ZodOptional<z.ZodObject<{
159
+ slug: z.ZodString;
160
+ line: z.ZodNumber;
161
+ existing: z.ZodString;
162
+ incoming: z.ZodString;
163
+ subject: z.ZodOptional<z.ZodString>;
164
+ token: z.ZodString;
165
+ }, z.core.$strip>>;
166
+ approval: z.ZodOptional<z.ZodObject<{
167
+ proposal_id: z.ZodString;
168
+ reason: z.ZodString;
169
+ reason_code: z.ZodOptional<z.ZodEnum<{
170
+ conflict: "conflict";
171
+ routing_uncertain: "routing_uncertain";
172
+ no_writable_destination: "no_writable_destination";
173
+ }>>;
174
+ nearest: z.ZodArray<z.ZodString>;
175
+ }, z.core.$strip>>;
176
+ requires_folder: z.ZodOptional<z.ZodObject<{
177
+ folder: z.ZodString;
178
+ nearest: z.ZodArray<z.ZodString>;
179
+ }, z.core.$strip>>;
180
+ }, z.core.$strip>;
181
+ export type WriteOutput = z.infer<typeof WriteOutput>;
182
+ //# sourceMappingURL=write.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../src/ops/write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;GAIG;AACH,eAAO,MAAM,UAAU;;;iBAGrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,aAAa;;;iBAMxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;iBAqCnB,CAAC;AACL,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,WAAW;;;;;;;;;;;;iBAItB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,mFAAmF;AACnF,eAAO,MAAM,cAAc;;;;;;;iBAQzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,uEAAuE;AACvE,eAAO,MAAM,eAAe;;;;;;;;;iBAO1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;GAMG;AACH,eAAO,MAAM,cAAc;;;iBAKzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBActB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -0,0 +1,114 @@
1
+ import { z } from 'zod';
2
+ import { ResultEnvelope } from "../common.js";
3
+ /**
4
+ * There is no `add_event` op, and nothing about line syntax reaches a
5
+ * prompt. The caller hands over a date and a summary; Akno formats and files
6
+ * the ledger line.
7
+ */
8
+ export const EventInput = z.object({
9
+ date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'expected YYYY-MM-DD'),
10
+ summary: z.string().min(1),
11
+ });
12
+ export const DocumentInput = z.object({
13
+ /** Path on disk to attach. Stored content-addressed as
14
+ * `<page-basename>-<sha8>.<ext>`, so files are unique by construction and
15
+ * `label` is a description rather than a disambiguator. */
16
+ path: z.string(),
17
+ label: z.string().optional(),
18
+ });
19
+ /**
20
+ * Create, append, patch or replace a page. Carries documents, events, tags and
21
+ * links. A write with only an `event` and no slug appends a ledger line with no
22
+ * link — still a real line in a real file, addressable as `timeline:47`.
23
+ */
24
+ export const WriteInput = z
25
+ .object({
26
+ slug: z.string().optional(),
27
+ /** Akno proposes the slug when the caller does not; the caller may suggest. */
28
+ propose_slug: z.string().optional(),
29
+ title: z.string().optional(),
30
+ type: z.string().optional(),
31
+ tags: z.array(z.string()).optional(),
32
+ /** Exactly one body operation. */
33
+ content: z.string().optional(),
34
+ append: z.string().optional(),
35
+ patch: z.string().optional(),
36
+ replace: z.object({ find: z.string(), with: z.string() }).optional(),
37
+ /**
38
+ * Heading to append under, with `append`. The text lands at the end of that section rather
39
+ * than at the end of the page.
40
+ *
41
+ * Matched on the heading's own text, at any level and case-insensitively, so a caller can
42
+ * say `"Rent"` without knowing whether the page wrote it as `##` or `###`. A heading that
43
+ * is absent, or that appears more than once, is an error rather than a guess — the same
44
+ * rule `replace` follows, and for the same reason: the wrong guess edits a part of the page
45
+ * nobody was looking at.
46
+ */
47
+ section: z.string().optional(),
48
+ event: EventInput.optional(),
49
+ documents: z.array(DocumentInput).optional(),
50
+ links: z.array(z.string()).optional(),
51
+ /** Report what would happen without touching disk. */
52
+ dry_run: z.boolean().optional(),
53
+ /** Approve past a conflict the caller has already resolved with the user. */
54
+ resolve_conflict: z.string().optional(),
55
+ })
56
+ .refine((v) => Boolean(v.slug || v.propose_slug || v.event), {
57
+ message: 'write requires a slug, a proposed slug, or an event',
58
+ })
59
+ .refine((v) => [v.content, v.append, v.patch, v.replace].filter((x) => x !== undefined).length <= 1, {
60
+ message: 'write takes at most one of: content, append, patch, replace',
61
+ });
62
+ export const WriteTarget = z.object({
63
+ slug: z.string(),
64
+ line: z.number().int().positive().optional(),
65
+ action: z.enum(['created', 'appended', 'patched', 'replaced', 'superseded', 'event', 'attached']),
66
+ });
67
+ /** A conflict is two live claims on one attribute, surfaced *before* the write. */
68
+ export const ConflictReport = z.object({
69
+ slug: z.string(),
70
+ line: z.number().int().positive(),
71
+ existing: z.string(),
72
+ incoming: z.string(),
73
+ subject: z.string().optional(),
74
+ /** Echo this back as `resolve_conflict` to proceed. */
75
+ token: z.string(),
76
+ });
77
+ /** A declined proposal is remembered, so the agent stops re-asking. */
78
+ export const ApprovalRequest = z.object({
79
+ proposal_id: z.string(),
80
+ reason: z.string(),
81
+ /** Stable caller-facing reason. Older proposal producers may omit it. */
82
+ reason_code: z.enum(['routing_uncertain', 'no_writable_destination', 'conflict']).optional(),
83
+ /** Where this could go instead, so the agent has something to offer the user. */
84
+ nearest: z.array(z.string()),
85
+ });
86
+ /**
87
+ * The write named a folder that does not exist and has no rule.
88
+ *
89
+ * **Nothing is waiting on the user here** — this is not an approval under another name. It is
90
+ * the caller being asked to say what the folder is for, with `folder`, and then repeat the
91
+ * write. The declaration is ungated; only the silence is refused.
92
+ */
93
+ export const FolderRequired = z.object({
94
+ /** The shallowest undeclared folder on the way to the slug. */
95
+ folder: z.string(),
96
+ /** Folders that already exist and might be the intended home, so a new one is a choice. */
97
+ nearest: z.array(z.string()),
98
+ });
99
+ export const WriteOutput = ResultEnvelope.extend({
100
+ /** Distinguishes a committed write from one waiting on the user. */
101
+ outcome: z.enum(['ok', 'requires_approval', 'requires_folder', 'conflict', 'noop']),
102
+ /** Durable — `undo` takes an id that outlives the session. */
103
+ change_id: z.string().optional(),
104
+ wrote: z.array(WriteTarget).optional(),
105
+ facts: z.object({ retired: z.number().int(), added: z.number().int() }).optional(),
106
+ /** Attachments stored by this write, content-addressed and extracted. */
107
+ documents: z
108
+ .array(z.object({ id: z.string(), rel_path: z.string(), text_from: z.string().optional() }))
109
+ .optional(),
110
+ conflict: ConflictReport.optional(),
111
+ approval: ApprovalRequest.optional(),
112
+ requires_folder: FolderRequired.optional(),
113
+ });
114
+ //# sourceMappingURL=write.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write.js","sourceRoot":"","sources":["../../src/ops/write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IACpE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC;;gEAE4D;IAC5D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,+EAA+E;IAC/E,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,IAAI,EAAE,C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