@agentshouse/mdruntime 0.1.0-alpha.9 → 0.1.0-c3903a68dcbbf

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