@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 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyB7B;;;;GAIG;AAEH,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO;IAC5F,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,CAAC,CAAC;IACT,MAAM,EAAE,CAAC,CAAC;IACV,mFAAmF;IACnF,WAAW,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAMD,eAAO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C,CAAC,CAAC,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;CAC3D,CAAC;AAEF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,MAAM,CAEvD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAEhD"}
@@ -0,0 +1,191 @@
1
+ import { RecallInput, RecallOutput } from "./ops/recall.js";
2
+ import { AnswerInput, AnswerOutput } from "./ops/answer.js";
3
+ import { ReadInput, ReadOutput } from "./ops/read.js";
4
+ import { ListInput, ListOutput } from "./ops/list.js";
5
+ import { TimelineInput, TimelineOutput } from "./ops/timeline.js";
6
+ import { ContextInput, ContextOutput } from "./ops/context.js";
7
+ import { GraphInput, GraphOutput } from "./ops/graph.js";
8
+ import { WriteInput, WriteOutput } from "./ops/write.js";
9
+ import { FolderInput, FolderOutput } from "./ops/folder.js";
10
+ import { AdoptInput, AdoptOutput, ForgetInput, ForgetOutput, IngestInput, IngestOutput, MoveInput, MoveOutput, RememberInput, RememberOutput, UndoInput, UndoOutput, } from "./ops/mutate.js";
11
+ function op(def) {
12
+ return def;
13
+ }
14
+ export const OPS = {
15
+ recall: op({
16
+ name: 'recall',
17
+ kind: 'read',
18
+ input: RecallInput,
19
+ output: RecallOutput,
20
+ implemented: true,
21
+ description: 'Search memory. Returns typed page and document cards with exact source citations. A readable document ' +
22
+ 'does not need an owning Markdown page to be found. Handles both keyword lookups and natural ' +
23
+ 'language questions; the expansion strategy is inferred from the query. Bounded exact graph paths add ' +
24
+ 'related candidates before ordinary reranking and qualification, with compact path provenance on cards. ' +
25
+ 'An empty result is proof that ' +
26
+ 'nothing matched, not a failure: check `status` for "empty" (nothing there), "degraded" (a model was ' +
27
+ 'missing, search was weaker) or "unavailable" (the index could not be read). In question mode, ' +
28
+ '`coverage` reports which concepts from the question the results actually cover — do not answer the ' +
29
+ 'parts it reports as false.',
30
+ }),
31
+ answer: op({
32
+ name: 'answer',
33
+ kind: 'read',
34
+ input: AnswerInput,
35
+ output: AnswerOutput,
36
+ implemented: true,
37
+ description: 'Answer a direct factual question using only bounded memory evidence and an independent support ' +
38
+ 'verification pass. Returns compact exact ' +
39
+ 'citations plus ranked related page slugs and orphan document ids. It skips reranking by default to avoid ' +
40
+ 'a redundant interactive model call; request rerank for strict retrieval qualification, or include_context ' +
41
+ 'to return the exact evidence already supplied to the answer model. ' +
42
+ 'Use recall instead when evidence must be inspected, compared, or quoted. Do not call both by default: ' +
43
+ 'answer already performs recall internally. Check status and outcome: only empty/not_found proves memory ' +
44
+ 'has no matching evidence; degraded or unavailable never proves absence. When answer generation is not ' +
45
+ 'configured, it returns compact related identities with degraded/not_answered and no_answer_model. A ' +
46
+ 'failed verifier returns answer_verification_failed and no generated prose.',
47
+ }),
48
+ read: op({
49
+ name: 'read',
50
+ kind: 'read',
51
+ input: ReadInput,
52
+ output: ReadOutput,
53
+ implemented: true,
54
+ description: 'Read one exact thing: a page by slug or id, with its links and backlinks, or a document by id with ' +
55
+ 'its extracted text. Returns the full body regardless of page role — recall caps what a source ' +
56
+ 'page contributes unprompted, but read never does.',
57
+ }),
58
+ list: op({
59
+ name: 'list',
60
+ kind: 'read',
61
+ input: ListInput,
62
+ output: ListOutput,
63
+ implemented: true,
64
+ description: 'Browse structure rather than search it: folders and their page counts, a tree outline, or pages ' +
65
+ 'filtered by type, tag, role or recency. Use this to find out what exists before guessing a slug.',
66
+ }),
67
+ timeline: op({
68
+ name: 'timeline',
69
+ kind: 'read',
70
+ input: TimelineInput,
71
+ output: TimelineOutput,
72
+ implemented: true,
73
+ description: 'When things happened. Dated events, filtered by range, by subject page, or by text match. Events are ' +
74
+ 'indexed from the ledger and from dated lines on any page, so a date written on the page it belongs to ' +
75
+ 'is found too.',
76
+ }),
77
+ context: op({
78
+ name: 'context',
79
+ kind: 'read',
80
+ input: ContextInput,
81
+ output: ContextOutput,
82
+ implemented: true,
83
+ description: 'The whole pre-turn bundle against one budget: pinned pages, recent timeline, a structure outline, and ' +
84
+ "this turn's recall. Normally called by the host before the model sees the turn, not by the agent. " +
85
+ '`profile: "auto_recall"` instead returns only a small, precision-first evidence bundle for automatic ' +
86
+ 'host injection. It may return empty normally, uses recent conversation only to resolve local references, ' +
87
+ 'and conditionally qualifies ambiguous candidates rather than paying for reranking on every turn.',
88
+ }),
89
+ graph: op({
90
+ name: 'graph',
91
+ kind: 'read',
92
+ input: GraphInput,
93
+ output: GraphOutput,
94
+ implemented: true,
95
+ description: 'Inspect bounded evidence paths from one exact page slug, entity id, or query. Returns compact nodes, ' +
96
+ 'typed relationships, and line/frontmatter/document/event locators but no page bodies or copied claims. ' +
97
+ 'Traversal is limited to three hops, excludes historical facts by default, and reports ambiguity or ' +
98
+ 'truncation as typed degradation rather than guessing or claiming absence.',
99
+ }),
100
+ write: op({
101
+ name: 'write',
102
+ kind: 'write',
103
+ input: WriteInput,
104
+ output: WriteOutput,
105
+ implemented: true,
106
+ description: 'Create, append, patch or replace a page, optionally with an event, documents, tags and links. Check ' +
107
+ '`outcome`: "conflict" means an existing line claims something different — ask the user rather than ' +
108
+ 'overwriting; "requires_folder" means the folder has not been declared yet — call `folder` to say what ' +
109
+ 'belongs in it, then repeat this write, without asking anyone. The event ledger takes events only: pass ' +
110
+ '`event` and let it be filed, never `append`.',
111
+ }),
112
+ folder: op({
113
+ name: 'folder',
114
+ kind: 'write',
115
+ input: FolderInput,
116
+ output: FolderOutput,
117
+ implemented: true,
118
+ description: 'Declare a folder and what belongs in it, before writing the first page there. Never gated — nothing ' +
119
+ 'here waits on the user. Say what the folder is for in `description`, and set `role` to "source" ' +
120
+ 'when it holds evidence rather than claims (transcripts, articles, research, legal texts), because only ' +
121
+ 'claims become facts. Returns "noop" when the folder is already declared.',
122
+ }),
123
+ remember: op({
124
+ name: 'remember',
125
+ kind: 'write',
126
+ input: RememberInput,
127
+ output: RememberOutput,
128
+ implemented: true,
129
+ description: 'Hand over a transcript or notes and let memory decide what is worth keeping and where it goes. Use ' +
130
+ 'this instead of write when you do not want to choose slugs or phrasing yourself. Pass `mission` to say ' +
131
+ 'what to pay attention to in this particular text; the standing rules about what lasts still apply. ' +
132
+ '`no_writable_destination` means relevant memory was found but no authorized page or managed-page ' +
133
+ 'location could receive one or more retained claims; inspect their typed approval reasons. A configured ' +
134
+ 'fallback page is used only after ordinary routing and page creation fail, and never grants itself write ' +
135
+ 'permission.',
136
+ }),
137
+ forget: op({
138
+ name: 'forget',
139
+ kind: 'write',
140
+ input: ForgetInput,
141
+ output: ForgetOutput,
142
+ implemented: true,
143
+ description: 'Retract a fact by removing the sentence that produced it, delete a page to trash, or drop a document. ' +
144
+ 'Always journalled and always reversible with undo for the retention window.',
145
+ }),
146
+ undo: op({
147
+ name: 'undo',
148
+ kind: 'write',
149
+ input: UndoInput,
150
+ output: UndoOutput,
151
+ implemented: true,
152
+ description: 'Reverse a change by its id. The id outlives the session.',
153
+ }),
154
+ move: op({
155
+ name: 'move',
156
+ kind: 'write',
157
+ input: MoveInput,
158
+ output: MoveOutput,
159
+ implemented: true,
160
+ description: 'Relocate a page with its documents, rewriting embeds. Inbound links that now point nowhere are ' +
161
+ 'reported, never silently rewritten.',
162
+ }),
163
+ ingest: op({
164
+ name: 'ingest',
165
+ kind: 'write',
166
+ input: IngestInput,
167
+ output: IngestOutput,
168
+ implemented: true,
169
+ description: 'Pull a file, folder or URL into memory. The text is extracted for you, OCRed if there is no text layer, ' +
170
+ 'named from its contents, summarized, and routed to a folder. You never run an extraction tool.',
171
+ }),
172
+ adopt: op({
173
+ name: 'adopt',
174
+ kind: 'write',
175
+ input: AdoptInput,
176
+ output: AdoptOutput,
177
+ implemented: true,
178
+ description: 'Organize one orphan document card by proposing its exact deterministic filing page. Uses the configured ' +
179
+ 'adoption trust mode: audit returns a durable diff, review waits for an operator decision, and auto asks ' +
180
+ 'the independent curator before applying and verifying ownership. It never adopts other orphan documents ' +
181
+ 'and retrieval does not depend on accepting the proposal.',
182
+ }),
183
+ };
184
+ export const OP_NAMES = Object.keys(OPS);
185
+ export function isOpName(value) {
186
+ return Object.prototype.hasOwnProperty.call(OPS, value);
187
+ }
188
+ export function opsByKind(kind) {
189
+ return OP_NAMES.filter((name) => OPS[name].kind === kind);
190
+ }
191
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EACL,UAAU,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,SAAS,EACT,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,UAAU,GACX,MAAM,iBAAiB,CAAC;AAyBzB,SAAS,EAAE,CAA2C,GAAuB;IAC3E,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,MAAM,EAAE,EAAE,CAAC;QACT,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,WAAW;QAClB,MAAM,EAAE,YAAY;QACpB,WAAW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AAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Wire version, bumped only when an existing exchange changes in a way an older
3
+ * client cannot absorb. `connect()` handshakes on it and refuses a server it cannot
4
+ * speak to, rather than failing subtly on the third call.
5
+ *
6
+ * Adding an operation or an optional field is capability-compatible and must not
7
+ * bump this number: the handshake already advertises `hello.ops`. A needless bump
8
+ * disconnects long-lived hosts from otherwise unchanged operations until they are
9
+ * restarted, which turns a service-only deploy into lost memory calls.
10
+ */
11
+ export declare const PROTOCOL_VERSION = 1;
12
+ /** Advertised MCP server name. The spec calls for `memory`, not `akno`. */
13
+ export declare const MCP_SERVER_NAME = "memory";
14
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,2EAA2E;AAC3E,eAAO,MAAM,eAAe,WAAW,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Wire version, bumped only when an existing exchange changes in a way an older
3
+ * client cannot absorb. `connect()` handshakes on it and refuses a server it cannot
4
+ * speak to, rather than failing subtly on the third call.
5
+ *
6
+ * Adding an operation or an optional field is capability-compatible and must not
7
+ * bump this number: the handshake already advertises `hello.ops`. A needless bump
8
+ * disconnects long-lived hosts from otherwise unchanged operations until they are
9
+ * restarted, which turns a service-only deploy into lost memory calls.
10
+ */
11
+ export const PROTOCOL_VERSION = 1;
12
+ /** Advertised MCP server name. The spec calls for `memory`, not `akno`. */
13
+ export const MCP_SERVER_NAME = 'memory';
14
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC"}
package/dist/wire.d.ts ADDED
@@ -0,0 +1,112 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Newline-delimited JSON, one object per line, over a unix socket or an HTTP
4
+ * body. Deliberately boring: the measured cost of a socket round trip is 18µs
5
+ * against a recall budget of 300ms, so there is nothing here worth optimizing
6
+ * and every reason to keep it debuggable with `nc`.
7
+ */
8
+ /**
9
+ * The maintenance work a *host* asks the writer to do: reconcile the index, file what is in
10
+ * the inbox, run the cycle.
11
+ *
12
+ * Not ops, deliberately — the registry ops are what an agent calls about memory, and these are
13
+ * operator commands about the process. They travel the same wire for one reason: exactly one
14
+ * process may write, so anything that writes has to be reachable *through* it or be
15
+ * unavailable whenever the service is running. It used to be unavailable, and the nightly
16
+ * cycle would have failed every night with "another process holds the write handle".
17
+ */
18
+ /**
19
+ * Not ops. The ops are what an agent calls *about memory*; these are what an operator asks of the
20
+ * *process* — reconcile the tree, file the inbox, run the cycle — plus the four that answer a gate
21
+ * or the journal.
22
+ *
23
+ * Gates, journal reads, and maintenance plans are here for the same reason the first three are:
24
+ * exactly one process may write, so with a service running they are reachable through it or not at
25
+ * all. They are deliberately absent from the op registry — an agent does not get to approve its own
26
+ * gated proposal or approve its own maintenance rewrite, and putting them on the op surface would hand it
27
+ * exactly that.
28
+ */
29
+ export declare const COMMAND_NAMES: readonly ["index", "inbox", "dream", "approve", "decline", "changes", "proposals", "plan"];
30
+ export type CommandName = (typeof COMMAND_NAMES)[number];
31
+ export declare function isCommandName(value: string): value is CommandName;
32
+ export declare const WireRequest: z.ZodObject<{
33
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
34
+ op: z.ZodString;
35
+ kind: z.ZodOptional<z.ZodEnum<{
36
+ op: "op";
37
+ command: "command";
38
+ }>>;
39
+ input: z.ZodOptional<z.ZodUnknown>;
40
+ actor: z.ZodOptional<z.ZodEnum<{
41
+ user: "user";
42
+ agent: "agent";
43
+ akno: "akno";
44
+ }>>;
45
+ }, z.core.$strip>;
46
+ export type WireRequest = z.infer<typeof WireRequest>;
47
+ export declare const WireError: z.ZodObject<{
48
+ code: z.ZodEnum<{
49
+ empty: "empty";
50
+ degraded: "degraded";
51
+ unavailable: "unavailable";
52
+ busy: "busy";
53
+ interrupted: "interrupted";
54
+ requires_approval: "requires_approval";
55
+ conflict: "conflict";
56
+ invalid: "invalid";
57
+ forbidden: "forbidden";
58
+ not_found: "not_found";
59
+ read_only: "read_only";
60
+ not_implemented: "not_implemented";
61
+ internal: "internal";
62
+ }>;
63
+ message: z.ZodString;
64
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
65
+ }, z.core.$strip>;
66
+ export type WireError = z.infer<typeof WireError>;
67
+ export declare const WireResponse: z.ZodUnion<readonly [z.ZodObject<{
68
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
69
+ ok: z.ZodLiteral<true>;
70
+ result: z.ZodUnknown;
71
+ }, z.core.$strip>, z.ZodObject<{
72
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
73
+ ok: z.ZodLiteral<false>;
74
+ error: z.ZodObject<{
75
+ code: z.ZodEnum<{
76
+ empty: "empty";
77
+ degraded: "degraded";
78
+ unavailable: "unavailable";
79
+ busy: "busy";
80
+ interrupted: "interrupted";
81
+ requires_approval: "requires_approval";
82
+ conflict: "conflict";
83
+ invalid: "invalid";
84
+ forbidden: "forbidden";
85
+ not_found: "not_found";
86
+ read_only: "read_only";
87
+ not_implemented: "not_implemented";
88
+ internal: "internal";
89
+ }>;
90
+ message: z.ZodString;
91
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
92
+ }, z.core.$strip>;
93
+ }, z.core.$strip>]>;
94
+ export type WireResponse = z.infer<typeof WireResponse>;
95
+ /**
96
+ * Sent by the server on connect, before any request. The client refuses a
97
+ * version it cannot speak to rather than failing on the third call.
98
+ */
99
+ export declare const Hello: z.ZodObject<{
100
+ hello: z.ZodLiteral<"akno">;
101
+ protocol: z.ZodNumber;
102
+ version: z.ZodString;
103
+ writable: z.ZodBoolean;
104
+ akno_path: z.ZodString;
105
+ ops: z.ZodArray<z.ZodString>;
106
+ commands: z.ZodOptional<z.ZodArray<z.ZodString>>;
107
+ }, z.core.$strip>;
108
+ export type Hello = z.infer<typeof Hello>;
109
+ /** Splits a byte stream into complete lines, buffering the partial tail. */
110
+ export declare function createLineDecoder(): (chunk: string) => string[];
111
+ export declare function encodeLine(value: unknown): string;
112
+ //# sourceMappingURL=wire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;GAKG;AAEH;;;;;;;;;GASG;AACH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,4FAShB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAEjE;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;iBAoBtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;iBAIpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;mBAGvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,KAAK;;;;;;;;iBAUhB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AAE1C,4EAA4E;AAC5E,wBAAgB,iBAAiB,IAAI,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,EAAE,CAS/D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEjD"}
package/dist/wire.js ADDED
@@ -0,0 +1,102 @@
1
+ import { z } from 'zod';
2
+ import { ERROR_CODES } from "./errors.js";
3
+ /**
4
+ * Newline-delimited JSON, one object per line, over a unix socket or an HTTP
5
+ * body. Deliberately boring: the measured cost of a socket round trip is 18µs
6
+ * against a recall budget of 300ms, so there is nothing here worth optimizing
7
+ * and every reason to keep it debuggable with `nc`.
8
+ */
9
+ /**
10
+ * The maintenance work a *host* asks the writer to do: reconcile the index, file what is in
11
+ * the inbox, run the cycle.
12
+ *
13
+ * Not ops, deliberately — the registry ops are what an agent calls about memory, and these are
14
+ * operator commands about the process. They travel the same wire for one reason: exactly one
15
+ * process may write, so anything that writes has to be reachable *through* it or be
16
+ * unavailable whenever the service is running. It used to be unavailable, and the nightly
17
+ * cycle would have failed every night with "another process holds the write handle".
18
+ */
19
+ /**
20
+ * Not ops. The ops are what an agent calls *about memory*; these are what an operator asks of the
21
+ * *process* — reconcile the tree, file the inbox, run the cycle — plus the four that answer a gate
22
+ * or the journal.
23
+ *
24
+ * Gates, journal reads, and maintenance plans are here for the same reason the first three are:
25
+ * exactly one process may write, so with a service running they are reachable through it or not at
26
+ * all. They are deliberately absent from the op registry — an agent does not get to approve its own
27
+ * gated proposal or approve its own maintenance rewrite, and putting them on the op surface would hand it
28
+ * exactly that.
29
+ */
30
+ export const COMMAND_NAMES = [
31
+ 'index',
32
+ 'inbox',
33
+ 'dream',
34
+ 'approve',
35
+ 'decline',
36
+ 'changes',
37
+ 'proposals',
38
+ 'plan',
39
+ ];
40
+ export function isCommandName(value) {
41
+ return COMMAND_NAMES.includes(value);
42
+ }
43
+ export const WireRequest = z.object({
44
+ id: z.union([z.string(), z.number()]),
45
+ /** An op name, or — when `kind` says so — a command name. */
46
+ op: z.string(),
47
+ kind: z.enum(['op', 'command']).optional(),
48
+ input: z.unknown().optional(),
49
+ /**
50
+ * Who this call speaks for. Absent means the service's own actor, which is `agent`.
51
+ *
52
+ * On the socket and the loopback HTTP door the caller is trusted to say — filesystem permissions
53
+ * and loopback are the authentication, and a caller that can open either could write anything it
54
+ * liked regardless. The gate is not a defence against that caller; it is a policy about *whose*
55
+ * request this is, and only the caller knows. A host mediating for an agent and a person at
56
+ * a terminal both need to say "this one is the user speaking" — otherwise approving a gated
57
+ * proposal is impossible through the very door the service is meant to be reached by.
58
+ *
59
+ * The MCP door never sets it. That door faces the agent itself, which does not get to claim to be
60
+ * the user, and is why `server.mcp_allow` exists on it and not here.
61
+ */
62
+ actor: z.enum(['user', 'agent', 'akno']).optional(),
63
+ });
64
+ export const WireError = z.object({
65
+ code: z.enum(ERROR_CODES),
66
+ message: z.string(),
67
+ details: z.record(z.string(), z.unknown()).optional(),
68
+ });
69
+ export const WireResponse = z.union([
70
+ z.object({ id: z.union([z.string(), z.number()]), ok: z.literal(true), result: z.unknown() }),
71
+ z.object({ id: z.union([z.string(), z.number()]), ok: z.literal(false), error: WireError }),
72
+ ]);
73
+ /**
74
+ * Sent by the server on connect, before any request. The client refuses a
75
+ * version it cannot speak to rather than failing on the third call.
76
+ */
77
+ export const Hello = z.object({
78
+ hello: z.literal('akno'),
79
+ protocol: z.number().int(),
80
+ version: z.string(),
81
+ /** Read-only means another process holds the write handle. */
82
+ writable: z.boolean(),
83
+ akno_path: z.string(),
84
+ ops: z.array(z.string()),
85
+ /** Maintenance commands this door accepts. Absent from an older server. */
86
+ commands: z.array(z.string()).optional(),
87
+ });
88
+ /** Splits a byte stream into complete lines, buffering the partial tail. */
89
+ export function createLineDecoder() {
90
+ let buffer = '';
91
+ return (chunk) => {
92
+ buffer += chunk;
93
+ const parts = buffer.split('\n');
94
+ // The last element is either '' (chunk ended on a newline) or a partial line.
95
+ buffer = parts.pop() ?? '';
96
+ return parts.filter((line) => line.length > 0);
97
+ };
98
+ }
99
+ export function encodeLine(value) {
100
+ return `${JSON.stringify(value)}\n`;
101
+ }
102
+ //# sourceMappingURL=wire.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wire.js","sourceRoot":"","sources":["../src/wire.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C;;;;;GAKG;AAEH;;;;;;;;;GASG;AACH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO;IACP,OAAO;IACP,OAAO;IACP,SAAS;IACT,SAAS;IACT,SAAS;IACT,WAAW;IACX,MAAM;CACE,CAAC;AAGX,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAQ,aAAmC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACrC,6DAA6D;IAC7D,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC1C,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC7B;;;;;;;;;;;;OAYG;IACH,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,S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,EAAE,CAAC;IACxB,2EAA2E;IAC3E,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAGH,4EAA4E;AAC5E,MAAM,UAAU,iBAAiB;IAC/B,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,OAAO,CAAC,KAAa,EAAY,EAAE;QACjC,MAAM,IAAI,KAAK,CAAC;QAChB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACjC,8EAA8E;QAC9E,MAAM,GAAG,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACjD,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;AACtC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@tenphi/akno-protocol",
3
+ "version": "0.1.0",
4
+ "description": "Akno op registry and schemas — the single source of truth every door is generated from",
5
+ "license": "PolyForm-Noncommercial-1.0.0",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "dependencies": {
19
+ "zod": "^4.4.3"
20
+ },
21
+ "engines": {
22
+ "node": ">=22.18"
23
+ },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/tenphi/akno.git",
30
+ "directory": "packages/protocol"
31
+ },
32
+ "homepage": "https://github.com/tenphi/akno#readme",
33
+ "bugs": {
34
+ "url": "https://github.com/tenphi/akno/issues"
35
+ },
36
+ "author": "Andrey Yamanov",
37
+ "scripts": {}
38
+ }