@agentshouse/mdruntime 0.1.0-alpha.8 → 0.1.0-c009335e08279

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 (121) hide show
  1. package/AGENTS.md +208 -0
  2. package/README.md +44 -0
  3. package/dist/adapter.d.ts +215 -25
  4. package/dist/adapter.d.ts.map +1 -1
  5. package/dist/adapter.js +2 -3
  6. package/dist/attachment.d.ts +3 -0
  7. package/dist/attachment.d.ts.map +1 -0
  8. package/dist/attachment.js +8 -0
  9. package/dist/bootstrap.d.ts +6 -7
  10. package/dist/bootstrap.d.ts.map +1 -1
  11. package/dist/bootstrap.js +31 -28
  12. package/dist/change-set.d.ts +33 -0
  13. package/dist/change-set.d.ts.map +1 -0
  14. package/dist/change-set.js +83 -0
  15. package/dist/change.d.ts +9 -0
  16. package/dist/change.d.ts.map +1 -1
  17. package/dist/change.js +6 -5
  18. package/dist/client.d.ts +69 -0
  19. package/dist/client.d.ts.map +1 -0
  20. package/dist/client.js +165 -0
  21. package/dist/collection.d.ts +22 -15
  22. package/dist/collection.d.ts.map +1 -1
  23. package/dist/collection.js +60 -78
  24. package/dist/connection.d.ts +68 -40
  25. package/dist/connection.d.ts.map +1 -1
  26. package/dist/connection.js +1597 -961
  27. package/dist/conversation.d.ts +79 -0
  28. package/dist/conversation.d.ts.map +1 -0
  29. package/dist/conversation.js +557 -0
  30. package/dist/durability.d.ts +8 -3
  31. package/dist/durability.d.ts.map +1 -1
  32. package/dist/durability.js +7 -61
  33. package/dist/file.d.ts +20 -0
  34. package/dist/file.d.ts.map +1 -0
  35. package/dist/file.js +126 -0
  36. package/dist/host.d.ts +13 -0
  37. package/dist/host.d.ts.map +1 -0
  38. package/dist/host.js +175 -0
  39. package/dist/identity.d.ts +1 -0
  40. package/dist/identity.d.ts.map +1 -1
  41. package/dist/identity.js +10 -9
  42. package/dist/index.d.ts +14 -10
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +1 -3
  45. package/dist/log.js +5 -6
  46. package/dist/memory.d.ts +17 -2
  47. package/dist/memory.d.ts.map +1 -1
  48. package/dist/memory.js +268 -113
  49. package/dist/model.d.ts +10 -25
  50. package/dist/model.d.ts.map +1 -1
  51. package/dist/model.js +18 -21
  52. package/dist/observation.d.ts +25 -0
  53. package/dist/observation.d.ts.map +1 -0
  54. package/dist/observation.js +85 -0
  55. package/dist/outcome.d.ts +12 -24
  56. package/dist/outcome.d.ts.map +1 -1
  57. package/dist/outcome.js +1 -13
  58. package/dist/overlay.d.ts +9 -2
  59. package/dist/overlay.d.ts.map +1 -1
  60. package/dist/overlay.js +187 -43
  61. package/dist/paths.d.ts +0 -1
  62. package/dist/paths.d.ts.map +1 -1
  63. package/dist/paths.js +12 -19
  64. package/dist/query.d.ts +210 -9
  65. package/dist/query.d.ts.map +1 -1
  66. package/dist/query.js +420 -15
  67. package/dist/read-side.d.ts +14 -0
  68. package/dist/read-side.d.ts.map +1 -0
  69. package/dist/read-side.js +371 -0
  70. package/dist/refresh.d.ts +4 -5
  71. package/dist/refresh.d.ts.map +1 -1
  72. package/dist/refresh.js +45 -30
  73. package/dist/replica.d.ts +27 -6
  74. package/dist/replica.d.ts.map +1 -1
  75. package/dist/replica.js +233 -30
  76. package/dist/room-draft.d.ts +124 -0
  77. package/dist/room-draft.d.ts.map +1 -0
  78. package/dist/room-draft.js +327 -0
  79. package/dist/rows.d.ts +41 -0
  80. package/dist/rows.d.ts.map +1 -0
  81. package/dist/rows.js +100 -0
  82. package/dist/save.d.ts +10 -6
  83. package/dist/save.d.ts.map +1 -1
  84. package/dist/save.js +266 -333
  85. package/dist/search.d.ts +61 -0
  86. package/dist/search.d.ts.map +1 -0
  87. package/dist/search.js +125 -0
  88. package/dist/status.d.ts +9 -2
  89. package/dist/status.d.ts.map +1 -1
  90. package/dist/status.js +11 -14
  91. package/dist/store.d.ts +75 -18
  92. package/dist/store.d.ts.map +1 -1
  93. package/dist/store.js +358 -97
  94. package/dist/transfer.d.ts +5 -0
  95. package/dist/transfer.d.ts.map +1 -1
  96. package/dist/transfer.js +1 -5
  97. package/dist/wire.d.ts +64 -0
  98. package/dist/wire.d.ts.map +1 -0
  99. package/dist/wire.js +118 -0
  100. package/package.json +15 -13
  101. package/dist/adapter.js.map +0 -1
  102. package/dist/bootstrap.js.map +0 -1
  103. package/dist/change.js.map +0 -1
  104. package/dist/collection.js.map +0 -1
  105. package/dist/connection.js.map +0 -1
  106. package/dist/durability.js.map +0 -1
  107. package/dist/identity.js.map +0 -1
  108. package/dist/index.js.map +0 -1
  109. package/dist/log.js.map +0 -1
  110. package/dist/memory.js.map +0 -1
  111. package/dist/model.js.map +0 -1
  112. package/dist/outcome.js.map +0 -1
  113. package/dist/overlay.js.map +0 -1
  114. package/dist/paths.js.map +0 -1
  115. package/dist/query.js.map +0 -1
  116. package/dist/refresh.js.map +0 -1
  117. package/dist/replica.js.map +0 -1
  118. package/dist/save.js.map +0 -1
  119. package/dist/status.js.map +0 -1
  120. package/dist/store.js.map +0 -1
  121. package/dist/transfer.js.map +0 -1
package/AGENTS.md ADDED
@@ -0,0 +1,208 @@
1
+ # Instructions for the App Creator's agent
2
+
3
+ These instructions address an agent in an environment with Git. Obtain the
4
+ App Repository, change it, build, and push. They are documentation, not
5
+ enforcement.
6
+
7
+ ## The MD Runtime API
8
+
9
+ App code reaches the MD Runtime through the remote client. The surfaces are
10
+ Rooms, Query, Search, Observe, Types, Room Draft, Save, History, Call, Reached, Log,
11
+ the reported persistence answer, reauthorization, conversation, the chat draft,
12
+ and Presentation State. Sync Status, the Service Mode, the storage-loss
13
+ statement and the deployment facts are observations only.
14
+
15
+ Every `observe` resolves, once its first value has arrived, to a handle:
16
+ `current()` is the latest complete value, `subscribe(listener)` hears each later
17
+ value whole and returns its unsubscribe, and `close()` ends the observation.
18
+ Closing the port ends every handle and rejects every pending call and
19
+ observation; a client that reconnects observes again.
20
+
21
+ Each conversation a Provider card names is held complete in the browser.
22
+ Observe one with `observe('conversation', id, { limit })`: the view
23
+ holds its latest `limit` messages, or all of them, oldest first, its chat
24
+ draft, and what the Provider streams for it whether or not anything views it:
25
+ the growing text and plan of the running turn, the open questions, the process
26
+ state, the CLI's commands and options, and the latest `workingNote`. These live
27
+ only in memory: the turn's accepted message replaces its growing text and plan,
28
+ a working note is never part of a message, and none of them is stored or
29
+ searchable.
30
+ `chatDraft.write` and `chatDraft.discard` keep what the App Creator composes;
31
+ sending it is a Provider Action that needs the Provider reachable and is never
32
+ queued.
33
+
34
+ Each Room in Rooms lists its `attachments`, the files the Provider holds for it
35
+ that its Documents link by the Provider's reference, ordered by `reference`,
36
+ each with `name`, `byteLength`, `mediaType` and the Provider's own entry as
37
+ `entry`. They are as the Provider last declared them and hold no bytes;
38
+ open one through the Provider Action that serves it.
39
+
40
+ Rooms, Query, Search, Observe, Types, Room Draft, Save, and Reached never
41
+ touch the network.
42
+ History and Call go to the Provider through the Adapter. A Call result whose
43
+ effect the Provider places in a Room carries `at`, that Room and Room Version;
44
+ `reached(room, roomVersion)` answers whether the Room's confirmed state has
45
+ reached it, and the MD Runtime keeps refreshing that Room until it has;
46
+ `reached(room, roomVersion, path)` answers whether the held confirmed copy of
47
+ that document was written at a later Room Version. Each History revision
48
+ names its author, `{ kind: 'user', id }` or `{ kind: 'site', id, name }`. Every
49
+ member of the
50
+ client is asynchronous. Results are detached snapshots. Nothing in this
51
+ surface returns the authorization, performs a request the App's code
52
+ composes, or exposes the browser store.
53
+
54
+ Read the deployment facts with `observe('deployment-facts')`. Interpret the
55
+ opaque value using the host's contract.
56
+
57
+ The in-memory Adapter at `@agentshouse/mdruntime/memory` is for tests and
58
+ ships in no bundle.
59
+
60
+ ## Local Query rules
61
+
62
+ `query(q)` answers once from local state; `observe('query', q)` holds the whole
63
+ result and hears it again only when it changes, keeping every unchanged Document
64
+ the same object, so a component can tell what changed by identity. A query is
65
+ data:
66
+
67
+ - **Filter.** `rooms` names Room locators and defaults to every Room. `types`
68
+ names MD Types, and `any` names untyped Markdown Documents. `pathPrefix` is a
69
+ directory: `notes` keeps `notes/a.md` and not `notes2/a.md`.
70
+ - **Fields.** `where` names frontmatter fields, ANDs them, and nests `$and` and
71
+ `$or`. A bare value is equality; the operators are `$eq`, `$ne`, `$in`, `$nin`,
72
+ `$gt`, `$gte`, `$lt`, `$lte`, `$all`, `$size` and `$exists`. Equality on a list
73
+ asks whether it contains the value. Missing, null and empty differ:
74
+ `$exists: false` keeps a missing field, `null` an explicit null, `''` empty
75
+ text and `$size: 0` an empty list. A date compares in calendar order and never
76
+ with a date-time. A reference compares by the Room Path it resolves to.
77
+ Untyped frontmatter is plain values. There is no text containment or regular
78
+ expression.
79
+ - **Relations.** `hop: { field, types, where, pathPrefix }` keeps Documents whose
80
+ reference `field` points to a matching Document of the same Room.
81
+ `backlinks: { field, types, where, pathPrefix }` keeps Documents that a
82
+ matching Document of the same Room references. Each keeps a Document once.
83
+ - **Parts.** A Document query must `select`: `'all'`, or `fields`, `sections`,
84
+ `preamble`, `markdown`, `backlinks` and `change`, where `fields` and `sections`
85
+ are `'all'` or a list of names. Room and Path always return; a Markdown
86
+ Document also returns its MD Type. A non-Markdown Document or binary link
87
+ target returns only Room and Path. An unselected part is absent. Select only
88
+ what a screen shows: a list that selects the Markdown hears every edit of it.
89
+ - **Change.** `change` is `{ author, time }` of the Document's head revision as
90
+ the Provider last delivered it: `author` is `{ kind: 'user' | 'site', id, name }`
91
+ or `null` for a write the Provider made itself, and `time` is the Provider's
92
+ ISO 8601 change time. It is `null` where the Provider delivered no time, as at
93
+ a Site. An unsent edit or move keeps it, an unsent creation has none, and a
94
+ saved write takes the Provider's own once it is Accepted and refreshed. A
95
+ Room's last change is its Document with the latest `time`.
96
+ - **Order and groups.** `orderBy` sorts by `room`, `path`, `type` or `{ field }`
97
+ with TanStack DB's own options, and ties end with Room, then Path. `groupBy` by
98
+ `room`, `type` or `{ field }` answers `{ groups: [{ key, count }] }`, counted
99
+ over every match and ordered by `count` or a key. `limit` bounds the Documents
100
+ or the groups.
101
+ - **Results and errors.** A result carries no Room Version: read freshness from
102
+ Rooms and Sync Status. An invalid query fails with `invalid-query`,
103
+ `unknown-type`, `unknown-field` or `wrong-kind`, naming where, and never
104
+ answers an empty result in its place.
105
+
106
+ ## Local Search rules
107
+
108
+ `search({ text, documents, conversations, limit })` answers once, by words, from
109
+ local state, with MiniSearch at its default configuration. There is no observed
110
+ search.
111
+
112
+ - **What is found.** A Document by its field values, its sections' headings and
113
+ text, its preamble and its Path; a message by its text. Frontmatter keys, Room
114
+ Drafts, chat drafts and growing text are never found. There are no phrases,
115
+ word forms, typo tolerance or prefix matching.
116
+ - **Narrowing.** `documents` is a Local Query filter: `rooms`, `types`, `where`,
117
+ `pathPrefix`, `hop` and `backlinks`. `conversations` names conversations. Both
118
+ apply before `limit`, which bounds each list; without it every hit returns.
119
+ - **Results.** `{ documents, messages }`, each ranked by `score`, which compares
120
+ hits of one list of one search. A Document hit names its `room`, `path` and
121
+ `type`, a message hit its `conversation` and `identity`, and `matches` maps each
122
+ matched word to the parts it matched in: `fields`, `sections`, `preamble` or
123
+ `path`, or `text`. A hit carries no position; mark the words in the text you
124
+ show. An invalid filter fails with its Local Query error.
125
+
126
+ ## Room Draft, Save, and outcome rules
127
+
128
+ The MD Runtime owns one Room Draft per Room and Path, shared by every App and
129
+ tab. It is durable: it survives reload and navigation. A Room that Discovery
130
+ stops listing takes its Room Drafts and its queue with it.
131
+ Write a Room Draft with `roomDraft.write(room, path, revision, parts)`, naming
132
+ the revision you read, or `null` when there was none, and every part it should
133
+ now change: fields, sections and the preamble, or the whole Markdown, a
134
+ creation, a move, or a removal. A part new to the Room Draft names its base,
135
+ the value you showed when it was opened; the MD Runtime keeps a part's first
136
+ base. A binary link target has a Room Draft too, for a move or a removal, with
137
+ `null` as its base. A write or a discard from an older revision is refused as `stale` with
138
+ the current Room Draft; read it and write again.
139
+
140
+ Save takes one Room and the Room Drafts of it to save, each with its revision,
141
+ validates locally, and on success appends one Change Batch to that Room's
142
+ queue and removes those Room Drafts. It is refused as `stale`, as
143
+ `changed-underneath` naming each part whose base no longer matches the visible
144
+ state, or by a local validation rule, and then creates nothing and leaves every
145
+ Room Draft in place. A directory move or removal is a move or removal part on
146
+ each Document and binary link target beneath it, saved together.
147
+
148
+ Outcomes follow the Provider's answer. An Accepted Change Batch stays in the
149
+ queue, drawn over the confirmed layer, until the confirmed layer reaches the
150
+ Room Version it was accepted at, and then leaves it. Conflicted and Rejected, an expired operation, and a change that no
151
+ longer applies over the Room each leave the queue and return as Room Drafts on
152
+ the Documents they changed, marked with why: the Provider's structured refusal
153
+ code and fields as returned, not known to have applied, or withdrawn locally.
154
+ The rest of the queue keeps synchronizing, and Sync Status requires attention
155
+ until each returned Room Draft is saved again or discarded. A Change Batch
156
+ keeps no outcome once it leaves the queue; `observe('queue', room)` shows each
157
+ Pending one, and a returned Room Draft says why it returned. Transport
158
+ failure and Provider unavailability keep work Pending and do not infer a
159
+ rejection. A refusal the Provider marks retryable stays Pending until the reset
160
+ it names; the MD Runtime retries the same Change Batch identity and payload and
161
+ never infers an outcome from transport uncertainty. The MD Runtime never
162
+ combines, reorders, or rebases.
163
+
164
+ `observe('service-mode')` answers the Provider's Service
165
+ Mode, `open` or `write-halted`. While writes are halted, Save still succeeds,
166
+ its Change Batch waits unsent, and the queue is submitted in order once the
167
+ Provider reopens writes. An Action is never held: a write the Provider refuses
168
+ for the halt returns that refusal to its caller. Show the Provider as read-only
169
+ instead of retrying.
170
+
171
+ ## The neutrality rule
172
+
173
+ No module outside an Adapter package imports, names, or special-cases a
174
+ Provider. MD UI and every App reach data only through the client entry.
175
+
176
+ ## Content-safety rules
177
+
178
+ The Provider authorization belongs to the Runtime host and is never readable
179
+ by the App's code. The App's code reaches the network only at the external
180
+ origins its manifest declares, empty by default, and the Provider enforces
181
+ that set. Every request to the Provider itself goes through the MD Runtime.
182
+ Rendered Markdown never executes scripts, renders raw HTML only for the
183
+ details and summary elements, and loads images and other resources only from
184
+ origins the Provider's policy allows.
185
+
186
+ ## Launch promises MD UI keeps
187
+
188
+ MD UI uses semantic HTML, is fully operable from a keyboard with visible
189
+ focus and labelled controls, and lays out from a 360 pixel wide viewport to
190
+ a desktop. Its strings are English only, dates and numbers follow the
191
+ browser locale, and content is never translated. Light and dark themes come
192
+ from CSS custom properties with the browser's preference as the default and
193
+ an App's override respected. What an App Creator's agent adds carries none
194
+ of these promises by itself. Reading, querying and searching never wait for
195
+ the network. Data lives only in the App Creator's browser and with the Provider.
196
+
197
+ ## App code imports only the client entry and never constructs a Runtime
198
+
199
+ App code imports only `@agentshouse/mdruntime/client` and calls
200
+ `connectMdRuntime` on the port the host hands it. It never constructs a
201
+ Runtime. It does not import the package main, the host entry, or the Adapter
202
+ package, and it does not call `serveMdRuntime`. Hosts
203
+ and tests use those entries; the served App does not.
204
+
205
+ ## What an agent must never do
206
+
207
+ An agent must never read the authorization, load code from a Room, call the
208
+ Provider directly, or rebase a refused Change Batch.
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # `@agentshouse/mdruntime`
2
+
3
+ The headless core of MD App: local Rooms of typed Markdown Documents with
4
+ query, search, observation, Room Drafts, and queued saves that synchronize
5
+ with a Provider through an Adapter.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install @agentshouse/mdruntime
11
+ ```
12
+
13
+ ## Entries
14
+
15
+ | Entry | For |
16
+ | ------------------------------- | -------------------------------------------------- |
17
+ | `@agentshouse/mdruntime/client` | App code: `connectMdRuntime(port)` |
18
+ | `@agentshouse/mdruntime/host` | The host that serves a Runtime: `serveMdRuntime` |
19
+ | `@agentshouse/mdruntime` | Shared types |
20
+ | `@agentshouse/mdruntime/memory` | Tests: `createMemoryAdapter`, an in-memory Adapter |
21
+
22
+ ## Usage
23
+
24
+ App code imports only the client entry and connects on the port its host hands
25
+ it:
26
+
27
+ ```ts
28
+ import { connectMdRuntime } from '@agentshouse/mdruntime/client';
29
+
30
+ const runtime = connectMdRuntime(port);
31
+ const rooms = await runtime.rooms();
32
+ const notes = await runtime.query({ types: ['note'], select: 'all', limit: 20 });
33
+ ```
34
+
35
+ `observe('storage-loss')` reports `null` or the stable code
36
+ `storage-loss` when unsynchronized Room Drafts and Pending Changes were lost.
37
+ The host supplies the user-facing wording.
38
+
39
+ The rules an App's agent follows, including Local Query, Local Search, Room
40
+ Draft and Save, are in [`AGENTS.md`](AGENTS.md).
41
+
42
+ ## License
43
+
44
+ MIT
package/dist/adapter.d.ts CHANGED
@@ -2,11 +2,15 @@ import type { ModelIdentity, ModelResult } from './model.js';
2
2
  import type { ChangeBatch } from './change.js';
3
3
  export type Authorization = object;
4
4
  export declare const ROOM_CONTRACT_VERSION = 1;
5
- export declare const VERSION_1_CAPABILITIES: readonly ['stable-file-ids', 'ranked-provider-search', 'room-version-notifications', 'room-history', 'provider-actions'];
5
+ export declare const VERSION_1_CAPABILITIES: readonly ['stable-file-ids', 'ranked-provider-search', 'room-version-notifications', 'room-history', 'provider-actions', 'move-reference-rewrites'];
6
6
  export type MdModelIdentity = {
7
7
  identity: string;
8
8
  version: string;
9
9
  };
10
+ export type TypedSelection = {
11
+ roots: readonly string[];
12
+ attachedModel: ModelIdentity | null;
13
+ };
10
14
  export type OperationScopes = {
11
15
  read: readonly string[];
12
16
  sync: readonly string[];
@@ -18,19 +22,137 @@ export type ReplicaAdmission = {
18
22
  admission: 'admitted' | 'unavailable';
19
23
  };
20
24
  export type DiscoveredRoom = {
21
- collectionRoot: string;
22
25
  name: string;
23
26
  locator: string;
24
27
  roomVersion: string;
25
28
  operations: OperationScopes;
26
29
  replica: ReplicaAdmission;
27
30
  attachedModel: ModelIdentity | null;
31
+ typedSelection?: TypedSelection;
28
32
  providerOwnedPaths: readonly string[];
29
33
  };
30
34
  export type Capability = {
31
35
  name: string;
32
36
  limits?: readonly ProviderLimit[];
33
37
  actions?: readonly ActionDeclaration[];
38
+ conversationCards?: ConversationCards;
39
+ };
40
+ export type ConversationCards = {
41
+ locator: string;
42
+ type: string;
43
+ identity: string;
44
+ agent: string;
45
+ };
46
+ export type ConversationAction = 'conversation.create' | 'conversation.send' | 'conversation.answer' | 'conversation.interrupt' | 'conversation.kill' | 'conversation.cancel' | 'conversation.delete' | 'conversation.history';
47
+ export type ConversationMessage = {
48
+ identity: string;
49
+ turn: string;
50
+ text: string;
51
+ message: unknown;
52
+ };
53
+ export type AcceptedMessage = ConversationMessage & {
54
+ position: string;
55
+ };
56
+ export type ConversationHistoryRequest = {
57
+ conversations: readonly {
58
+ conversation: string;
59
+ after?: string;
60
+ }[];
61
+ };
62
+ export type ConversationHistoryPage = {
63
+ conversation: string;
64
+ messages: readonly AcceptedMessage[];
65
+ next?: string;
66
+ };
67
+ export type ConversationHistories = {
68
+ histories: readonly ConversationHistoryPage[];
69
+ };
70
+ export type WorkingNote = {
71
+ noteId: string;
72
+ text: string;
73
+ };
74
+ export type PlanStep = {
75
+ label: string;
76
+ priority?: string;
77
+ status: string;
78
+ };
79
+ export type ProcessCommand = {
80
+ [field: string]: unknown;
81
+ name: string;
82
+ description: string;
83
+ input?: {
84
+ [field: string]: unknown;
85
+ hint: string;
86
+ } | null;
87
+ };
88
+ type SelectValue = {
89
+ [field: string]: unknown;
90
+ value: string;
91
+ name: string;
92
+ description?: string | null;
93
+ };
94
+ type SelectGroup = {
95
+ [field: string]: unknown;
96
+ group: string;
97
+ name: string;
98
+ options: readonly SelectValue[];
99
+ };
100
+ type SessionOptionNaming = {
101
+ [field: string]: unknown;
102
+ id: string;
103
+ name: string;
104
+ description?: string | null;
105
+ category?: string | null;
106
+ };
107
+ export type SessionOption = (SessionOptionNaming & {
108
+ type: 'select';
109
+ currentValue: string;
110
+ options: readonly SelectValue[] | readonly SelectGroup[];
111
+ }) | (SessionOptionNaming & {
112
+ type: 'boolean';
113
+ currentValue: boolean;
114
+ });
115
+ export type ConversationEvent = {
116
+ kind: 'growing-text';
117
+ conversation: string;
118
+ turn: string;
119
+ text: string;
120
+ } | {
121
+ kind: 'plan';
122
+ conversation: string;
123
+ turn: string;
124
+ plan: readonly PlanStep[];
125
+ } | {
126
+ kind: 'working-note';
127
+ conversation: string;
128
+ note: WorkingNote | null;
129
+ } | {
130
+ kind: 'questions';
131
+ conversation: string;
132
+ questions: readonly unknown[];
133
+ } | {
134
+ kind: 'process';
135
+ conversation: string;
136
+ running: boolean;
137
+ } | {
138
+ kind: 'commands';
139
+ conversation: string;
140
+ commands: readonly ProcessCommand[];
141
+ } | {
142
+ kind: 'options';
143
+ conversation: string;
144
+ options: readonly SessionOption[];
145
+ } | {
146
+ kind: 'accepted-message';
147
+ conversation: string;
148
+ message: AcceptedMessage;
149
+ } | {
150
+ kind: 'gap';
151
+ conversation: string;
152
+ };
153
+ export type ConversationStream = {
154
+ replicate(conversations: readonly string[]): void;
155
+ observe(notify: (event: ConversationEvent) => void): () => void;
34
156
  };
35
157
  export type ActionDeclaration = {
36
158
  name: string;
@@ -60,7 +182,6 @@ export type Discovery = {
60
182
  capabilities: readonly Capability[];
61
183
  providerLimits: readonly ProviderLimit[];
62
184
  retention: Retention;
63
- origins: readonly string[];
64
185
  };
65
186
  export type TransportUncertainty = {
66
187
  kind: 'transport-uncertainty';
@@ -72,18 +193,41 @@ export type RoomNotReadable = {
72
193
  export type RevokedAuthorization = {
73
194
  kind: 'revoked-authorization';
74
195
  };
75
- export type ScopedRefusal = {
196
+ export type ProviderRefusal = {
197
+ code: string;
198
+ fields: Readonly<Record<string, unknown>>;
199
+ };
200
+ export type ScopedRefusal = ProviderRefusal & {
76
201
  kind: 'scoped-refusal';
77
202
  locator: string;
78
203
  scope: 'content' | 'sync' | 'model' | 'operation' | 'undisclosed';
79
- text: string;
80
204
  };
81
205
  export type AdapterFailure = TransportUncertainty | RoomNotReadable | RevokedAuthorization | ScopedRefusal;
82
- export type DiscoverResult = Discovery | TransportUncertainty | RevokedAuthorization | {
206
+ export type ContractUnavailable = ProviderRefusal & {
83
207
  kind: 'contract-unavailable';
84
- text: string;
85
208
  };
209
+ export type DiscoverResult = Discovery | TransportUncertainty | RevokedAuthorization | ContractUnavailable;
86
210
  export type PageToken = string;
211
+ export type ChangeAuthor = {
212
+ kind: 'user';
213
+ id: string;
214
+ name: string;
215
+ } | {
216
+ kind: 'site';
217
+ id: string;
218
+ name: string;
219
+ };
220
+ export type HeadChange = {
221
+ author: ChangeAuthor | null;
222
+ time: string;
223
+ };
224
+ export type RoomAttachment = {
225
+ reference: string;
226
+ name: string;
227
+ byteLength: number;
228
+ mediaType: string | null;
229
+ entry: unknown;
230
+ };
87
231
  export type BootstrapRequest = {
88
232
  locator: string;
89
233
  selection: string;
@@ -94,7 +238,9 @@ export type BootstrapPage = {
94
238
  roomVersion: string;
95
239
  documents: Readonly<Record<string, string>>;
96
240
  revisions: Readonly<Record<string, string>>;
241
+ changes: Readonly<Record<string, HeadChange>>;
97
242
  binaryTargets: readonly string[];
243
+ attachments?: readonly RoomAttachment[];
98
244
  pageToken?: PageToken;
99
245
  };
100
246
  export type BootstrapResult = BootstrapPage | AdapterFailure;
@@ -102,6 +248,7 @@ export type RefreshRequest = {
102
248
  locator: string;
103
249
  selection: string;
104
250
  fromRoomVersion: string;
251
+ minPosition?: string;
105
252
  pageToken?: PageToken;
106
253
  };
107
254
  export type RefreshPage = {
@@ -109,18 +256,29 @@ export type RefreshPage = {
109
256
  roomVersion: string;
110
257
  documents: Readonly<Record<string, string>>;
111
258
  revisions: Readonly<Record<string, string>>;
259
+ changes: Readonly<Record<string, HeadChange>>;
112
260
  binaryTargets: readonly string[];
113
261
  removals: readonly string[];
262
+ attachments?: readonly RoomAttachment[];
114
263
  pageToken?: PageToken;
115
264
  };
116
265
  export type RefreshResult = {
117
266
  kind: 'still-current';
118
267
  } | RefreshPage | {
119
268
  kind: 'beyond-horizon';
120
- } | AdapterFailure;
269
+ } | RetryableRefusal | AdapterFailure;
121
270
  export type MutationRequest = {
122
271
  locator: string;
123
272
  changeBatch: ChangeBatch;
273
+ upload?: unknown;
274
+ };
275
+ export type RetryableRefusal = ProviderRefusal & {
276
+ kind: 'retryable-refusal';
277
+ reset?: string;
278
+ };
279
+ export type ServiceMode = 'open' | 'write-halted';
280
+ export type ServiceModeSignal = {
281
+ observe(notify: (mode: ServiceMode) => void): () => void;
124
282
  };
125
283
  export type MutationResult = {
126
284
  kind: 'accepted';
@@ -128,23 +286,31 @@ export type MutationResult = {
128
286
  documents: Readonly<Record<string, string>>;
129
287
  revisions: Readonly<Record<string, string>>;
130
288
  removals: readonly string[];
131
- author: string;
132
- time: string;
133
- } | {
289
+ author?: string;
290
+ time?: string;
291
+ } | (ProviderRefusal & {
134
292
  kind: 'conflicted';
135
- roomVersion: string;
293
+ roomVersion?: string;
136
294
  affected: Readonly<Record<string, string>>;
137
- text: string;
138
- } | {
295
+ }) | (ProviderRefusal & {
139
296
  kind: 'rejected';
140
297
  affected: Readonly<Record<string, string>>;
141
- text: string;
298
+ }) | RetryableRefusal | {
299
+ kind: 'write-halted';
142
300
  } | {
143
301
  kind: 'expired';
144
302
  } | AdapterFailure;
303
+ export type HistoryAuthor = {
304
+ kind: 'user';
305
+ id: string;
306
+ } | {
307
+ kind: 'site';
308
+ id: string;
309
+ name: string;
310
+ };
145
311
  export type HistoryRevision = {
146
312
  revision: string;
147
- author: string;
313
+ author: HistoryAuthor;
148
314
  time: string;
149
315
  };
150
316
  export type HistoryRequest = {
@@ -167,25 +333,49 @@ export type ActionRequest = {
167
333
  name: string;
168
334
  input: unknown;
169
335
  };
336
+ export type RoomVersionAt = {
337
+ locator: string;
338
+ roomVersion: string;
339
+ };
170
340
  export type ActionResult = {
171
341
  kind: 'action';
172
342
  result: unknown;
173
- } | {
343
+ at?: RoomVersionAt;
344
+ } | (ProviderRefusal & {
174
345
  kind: 'rejected';
175
- text: string;
176
- } | AdapterFailure;
346
+ }) | AdapterFailure;
347
+ export type ModelRequest = {
348
+ locator: string;
349
+ attached: 'collection';
350
+ model: ModelIdentity | null;
351
+ } | {
352
+ locator: string;
353
+ attached: 'typed-selection';
354
+ roots: readonly string[];
355
+ model: ModelIdentity | null;
356
+ };
357
+ export type RoomVersionNotification = {
358
+ locator: string;
359
+ roomVersion: string;
360
+ modelChanged?: true;
361
+ };
362
+ export type SelectedRooms = {
363
+ select(locators: readonly string[]): void;
364
+ observe(notify: (notification: RoomVersionNotification) => void): () => void;
365
+ };
177
366
  export type Adapter = {
178
- model(authorization: Authorization, request: {
179
- locator: string;
180
- collectionRoot: string;
181
- model: ModelIdentity | null;
182
- }): Promise<ModelResult>;
367
+ model(authorization: Authorization, request: ModelRequest): Promise<ModelResult>;
183
368
  authorize(): Promise<Authorization>;
184
369
  discover(authorization: Authorization): Promise<DiscoverResult>;
185
370
  bootstrap(authorization: Authorization, request: BootstrapRequest): Promise<BootstrapResult>;
186
371
  refresh(authorization: Authorization, request: RefreshRequest): Promise<RefreshResult>;
187
- mutate(authorization: Authorization, request: MutationRequest): Promise<MutationResult>;
372
+ mutate(authorization: Authorization, request: MutationRequest, keep: (upload: unknown) => Promise<void>): Promise<MutationResult>;
188
373
  history(authorization: Authorization, request: HistoryRequest): Promise<HistoryResult>;
189
374
  action(authorization: Authorization, request: ActionRequest): Promise<ActionResult>;
375
+ reached(locator: string, roomVersion: string, target: string): boolean;
376
+ roomVersions?: SelectedRooms;
377
+ conversations?: ConversationStream;
378
+ serviceMode?: ServiceModeSignal;
190
379
  };
380
+ export {};
191
381
  //# sourceMappingURL=adapter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,eAAO,MAAM,sBAAsB,YACjC,iBAAiB,EACjB,wBAAwB,EACxB,4BAA4B,EAC5B,cAAc,EACd,kBAAkB,CACV,CAAC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I,GAAG,MAAM,IAAI,CAAC;CAC9E,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACjF,SAAS,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAChE,SAAS,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAC7F,OAAO,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACvF,MAAM,CACJ,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,eAAe,EACxB,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,GACvC,OAAO,CAAC,cAAc,CAAC,CAAC;IAC3B,OAAO,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACvF,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACpF,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACvE,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC,CAAC"}
package/dist/adapter.js CHANGED
@@ -4,7 +4,6 @@ export const VERSION_1_CAPABILITIES = [
4
4
  'ranked-provider-search',
5
5
  'room-version-notifications',
6
6
  'room-history',
7
- 'provider-actions'
7
+ 'provider-actions',
8
+ 'move-reference-rewrites',
8
9
  ];
9
-
10
- //# sourceMappingURL=adapter.js.map
@@ -0,0 +1,3 @@
1
+ import type { RoomAttachment } from './adapter.js';
2
+ export declare function declaredAttachments(pages: readonly (readonly RoomAttachment[])[]): readonly RoomAttachment[];
3
+ //# sourceMappingURL=attachment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../src/attachment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,CAAC,SAAS,cAAc,EAAE,CAAC,EAAE,GAC5C,SAAS,cAAc,EAAE,CAQ3B"}
@@ -0,0 +1,8 @@
1
+ export function declaredAttachments(pages) {
2
+ const byReference = new Map();
3
+ for (const page of pages) {
4
+ for (const attachment of page)
5
+ byReference.set(attachment.reference, attachment);
6
+ }
7
+ return [...byReference.values()].sort((left, right) => left.reference < right.reference ? -1 : left.reference > right.reference ? 1 : 0);
8
+ }