@agentshouse/mdruntime 0.1.0-cf28918c2bf91 → 0.1.0-cf6d5f0a5c9c8

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 (79) hide show
  1. package/AGENTS.md +68 -22
  2. package/README.md +10 -10
  3. package/dist/adapter.d.ts +58 -25
  4. package/dist/adapter.d.ts.map +1 -1
  5. package/dist/adapter.js +1 -9
  6. package/dist/attached-model.d.ts +11 -0
  7. package/dist/attached-model.d.ts.map +1 -0
  8. package/dist/attached-model.js +47 -0
  9. package/dist/bootstrap.d.ts +20 -6
  10. package/dist/bootstrap.d.ts.map +1 -1
  11. package/dist/bootstrap.js +89 -35
  12. package/dist/change-set.d.ts.map +1 -1
  13. package/dist/change-set.js +13 -7
  14. package/dist/client.d.ts +6 -3
  15. package/dist/client.d.ts.map +1 -1
  16. package/dist/client.js +38 -10
  17. package/dist/collection.d.ts +6 -11
  18. package/dist/collection.d.ts.map +1 -1
  19. package/dist/collection.js +56 -19
  20. package/dist/connection.d.ts +13 -13
  21. package/dist/connection.d.ts.map +1 -1
  22. package/dist/connection.js +643 -542
  23. package/dist/conversation.d.ts +18 -6
  24. package/dist/conversation.d.ts.map +1 -1
  25. package/dist/conversation.js +179 -78
  26. package/dist/host.d.ts +8 -1
  27. package/dist/host.d.ts.map +1 -1
  28. package/dist/host.js +35 -31
  29. package/dist/identity.d.ts +1 -0
  30. package/dist/identity.d.ts.map +1 -1
  31. package/dist/identity.js +7 -1
  32. package/dist/index.d.ts +3 -3
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/memory.d.ts +12 -5
  35. package/dist/memory.d.ts.map +1 -1
  36. package/dist/memory.js +92 -31
  37. package/dist/model.d.ts +11 -11
  38. package/dist/model.d.ts.map +1 -1
  39. package/dist/model.js +6 -3
  40. package/dist/observation.d.ts +2 -0
  41. package/dist/observation.d.ts.map +1 -1
  42. package/dist/observation.js +24 -14
  43. package/dist/paths.d.ts +0 -1
  44. package/dist/paths.d.ts.map +1 -1
  45. package/dist/paths.js +0 -16
  46. package/dist/query.d.ts +8 -3
  47. package/dist/query.d.ts.map +1 -1
  48. package/dist/query.js +75 -36
  49. package/dist/reach.d.ts +40 -0
  50. package/dist/reach.d.ts.map +1 -0
  51. package/dist/reach.js +270 -0
  52. package/dist/react.d.ts +39 -0
  53. package/dist/react.d.ts.map +1 -0
  54. package/dist/react.js +63 -0
  55. package/dist/read-side.d.ts +4 -0
  56. package/dist/read-side.d.ts.map +1 -1
  57. package/dist/read-side.js +116 -54
  58. package/dist/refresh.d.ts +12 -1
  59. package/dist/refresh.d.ts.map +1 -1
  60. package/dist/refresh.js +35 -22
  61. package/dist/replica.d.ts +6 -6
  62. package/dist/replica.d.ts.map +1 -1
  63. package/dist/replica.js +41 -36
  64. package/dist/room-draft.d.ts +3 -0
  65. package/dist/room-draft.d.ts.map +1 -1
  66. package/dist/room-draft.js +7 -5
  67. package/dist/rows.d.ts +4 -1
  68. package/dist/rows.d.ts.map +1 -1
  69. package/dist/rows.js +82 -39
  70. package/dist/save.d.ts +1 -2
  71. package/dist/save.d.ts.map +1 -1
  72. package/dist/save.js +106 -58
  73. package/dist/store.d.ts +25 -2
  74. package/dist/store.d.ts.map +1 -1
  75. package/dist/store.js +206 -90
  76. package/dist/wire.d.ts +52 -16
  77. package/dist/wire.d.ts.map +1 -1
  78. package/dist/wire.js +51 -59
  79. package/package.json +14 -2
package/AGENTS.md CHANGED
@@ -10,7 +10,16 @@ App code reaches the MD Runtime through the remote client. The surfaces are
10
10
  Rooms, Query, Search, Observe, Types, Room Draft, Save, History, Call, Reached, Log,
11
11
  the reported persistence answer, reauthorization, conversation, the chat draft,
12
12
  and Presentation State. Sync Status, the Service Mode, the storage-loss
13
- statement and the deployment facts are observations only.
13
+ statement, the deployment facts and the signed-in member are observations only.
14
+
15
+ The host attaches each port with its reach, and every member and observation
16
+ answers within it: a Room outside it answers as one the replica does not hold,
17
+ Rooms lists only the Rooms reached whole, a Room reached for single Documents
18
+ shows only those Documents and the Types of the models that govern them, and
19
+ without conversations the conversation members, the chat draft and the
20
+ conversation observation hold none.
21
+ A change of the reach reaches every open observation as its new value, a query
22
+ keeping every unchanged Document the same object.
14
23
 
15
24
  Every `observe` resolves, once its first value has arrived, to a handle:
16
25
  `current()` is the latest complete value, `subscribe(listener)` hears each later
@@ -18,7 +27,11 @@ value whole and returns its unsubscribe, and `close()` ends the observation.
18
27
  Closing the port ends every handle and rejects every pending call and
19
28
  observation; a client that reconnects observes again.
20
29
 
21
- Each conversation a Provider card names is held complete in the browser.
30
+ Each conversation the Provider's conversation list names is held complete in the
31
+ browser. `conversation.list()` and `observe('conversations')` answer each with its
32
+ Agent's identity and name, its name, created and finished times, last outcome and live
33
+ `state`: `asking` while a question waits, `working` while a turn runs, else `idle`,
34
+ and `started`, when the running turn began, or `null`.
22
35
  Observe one with `observe('conversation', id, { limit })`: the view
23
36
  holds its latest `limit` messages, or all of them, oldest first, its chat
24
37
  draft, and what the Provider streams for it whether or not anything views it:
@@ -44,7 +57,10 @@ effect the Provider places in a Room carries `at`, that Room and Room Version;
44
57
  reached it, and the MD Runtime keeps refreshing that Room until it has;
45
58
  `reached(room, roomVersion, path)` answers whether the held confirmed copy of
46
59
  that document was written at a later Room Version. Each History revision
47
- names its author, `{ kind: 'user', id }` or `{ kind: 'site', id, name }`. Every
60
+ names its author, `{ kind: 'user', id }` or `{ kind: 'site', id, name }`.
61
+ History of a Path no current document holds answers the removed document's
62
+ revisions with `deleted: true`, newest first; that revision is what a link to
63
+ the Path opens. Every
48
64
  member of the
49
65
  client is asynchronous. Results are detached snapshots. Nothing in this
50
66
  surface returns the authorization, performs a request the App's code
@@ -53,6 +69,15 @@ composes, or exposes the browser store.
53
69
  Read the deployment facts with `observe('deployment-facts')`. Interpret the
54
70
  opaque value using the host's contract.
55
71
 
72
+ `observe('member')` answers who uses the App: the User the Provider signed in,
73
+ `{ kind: 'user', id, name }` in the shape of a change's `author`, so a Document
74
+ whose `change.author.id` equals its `id` is that User's own. It is `null` until
75
+ the Provider first names one, and where it names none, such as a Site. The
76
+ MD Runtime keeps it with the Local Replicas, so it answers offline once known,
77
+ and every port hears the next member the Provider names; signing out answers
78
+ `null`, then ends the observation with the authorization. It is the only way App code learns who
79
+ uses it.
80
+
56
81
  The in-memory Adapter at `@agentshouse/mdruntime/memory` is for tests and
57
82
  ships in no bundle.
58
83
 
@@ -66,22 +91,28 @@ data:
66
91
  - **Filter.** `rooms` names Room locators and defaults to every Room. `types`
67
92
  names MD Types, and `any` names untyped Markdown Documents. `pathPrefix` is a
68
93
  directory: `notes` keeps `notes/a.md` and not `notes2/a.md`.
69
- - **Fields.** `where` names frontmatter fields, ANDs them, and nests `$and` and
70
- `$or`. A bare value is equality; the operators are `$eq`, `$ne`, `$in`, `$nin`,
71
- `$gt`, `$gte`, `$lt`, `$lte`, `$all`, `$size` and `$exists`. Equality on a list
72
- asks whether it contains the value. Missing, null and empty differ:
94
+ - **Fields.** Every frontmatter value is named by JSON Pointer: `/status`,
95
+ `/shipping/city`, `~1` for a `/` and `~0` for a `~` in a key. A segment that
96
+ meets a list applies to every item and a number names one item. `where` names
97
+ pointers, ANDs them, and nests `$and` and `$or`; a pointer through a list holds
98
+ when any item satisfies it. A bare value is equality; the operators are `$eq`,
99
+ `$ne`, `$in`, `$nin`, `$gt`, `$gte`, `$lt`, `$lte`, `$all`, `$size` and
100
+ `$exists`. Equality on a list asks whether it contains the value. Missing, null and empty differ:
73
101
  `$exists: false` keeps a missing field, `null` an explicit null, `''` empty
74
102
  text and `$size: 0` an empty list. A date compares in calendar order and never
75
103
  with a date-time. A reference compares by the Room Path it resolves to.
76
- Untyped frontmatter is plain values. There is no text containment or regular
104
+ Untyped frontmatter, and a value under `oneOf` or a conditional, is plain
105
+ values. There is no text containment or regular
77
106
  expression.
78
107
  - **Relations.** `hop: { field, types, where, pathPrefix }` keeps Documents whose
79
- reference `field` points to a matching Document of the same Room.
80
- `backlinks: { field, types, where, pathPrefix }` keeps Documents that a
108
+ reference at pointer `field`, at any depth, points to a matching Document of the
109
+ same Room. `backlinks: { field, types, where, pathPrefix }` keeps Documents that a
81
110
  matching Document of the same Room references. Each keeps a Document once.
82
111
  - **Parts.** A Document query must `select`: `'all'`, or `fields`, `sections`,
83
- `preamble`, `markdown`, `backlinks` and `change`, where `fields` and `sections`
84
- are `'all'` or a list of names. Room and Path always return; a Markdown
112
+ `preamble`, `markdown`, `backlinks` and `change`, where `fields` is `'all'` or a
113
+ list of pointers and `sections` `'all'` or a list of names. Selected pointers
114
+ return the frontmatter holding only them, nested as written. A backlink names
115
+ the referring Path, MD Type and the pointer it came from as `field`. Room and Path always return; a Markdown
85
116
  Document also returns its MD Type. A non-Markdown Document or binary link
86
117
  target returns only Room and Path. An unselected part is absent. Select only
87
118
  what a screen shows: a list that selects the Markdown hears every edit of it.
@@ -90,13 +121,13 @@ data:
90
121
  or `null` for a write the Provider made itself, and `time` is the Provider's
91
122
  ISO 8601 change time. It is `null` where the Provider delivered no time, as at
92
123
  a Site. An unsent edit or move keeps it, an unsent creation has none, and a
93
- saved write takes the Provider's own once it is Accepted and refreshed. A
124
+ saved write takes the Provider's own once it is Accepted. A
94
125
  Room's last change is its Document with the latest `time`.
95
126
  - **Order and groups.** `orderBy` sorts by `room`, `path`, `type` or `{ field }`
96
127
  with TanStack DB's own options, and ties end with Room, then Path. `groupBy` by
97
128
  `room`, `type` or `{ field }` answers `{ groups: [{ key, count }] }`, counted
98
- over every match and ordered by `count` or a key. `limit` bounds the Documents
99
- or the groups.
129
+ over every match and ordered by `count` or a key. A sort or group takes only a
130
+ pointer that holds one value. `limit` bounds the Documents or the groups.
100
131
  - **Results and errors.** A result carries no Room Version: read freshness from
101
132
  Rooms and Sync Status. An invalid query fails with `invalid-query`,
102
133
  `unknown-type`, `unknown-field` or `wrong-kind`, naming where, and never
@@ -193,13 +224,28 @@ an App's override respected. What an App Creator's agent adds carries none
193
224
  of these promises by itself. Reading, querying and searching never wait for
194
225
  the network. Data lives only in the App Creator's browser and with the Provider.
195
226
 
196
- ## App code imports only the client entry and never constructs a Runtime
197
-
198
- App code imports only `@agentshouse/mdruntime/client` and calls
199
- `connectMdRuntime` on the port the host hands it. It never constructs a
200
- Runtime. It does not import the package main, the host entry, or the Adapter
201
- package, and it does not call `serveMdRuntime`. Hosts
202
- and tests use those entries; the served App does not.
227
+ ## App code takes the client its host hands it and never constructs a Runtime
228
+
229
+ App code takes the client its host hands it: in House,
230
+ `houseBridge().runtime` from `@agentshouse/app-bridge` resolves to the
231
+ client House built into the page. It never constructs a Runtime or a client.
232
+ It imports only types from `@agentshouse/mdruntime/client`, does not call
233
+ `connectMdRuntime` or `serveMdRuntime`, and does not import the package main,
234
+ the host entry, or the Adapter package. Hosts and tests use those entries; the
235
+ served App does not.
236
+
237
+ A React App may observe and save through `@agentshouse/mdruntime/react`, which
238
+ names React as a peer dependency. `useObserve(client, topic, ...input)` takes
239
+ the arguments of `observe` and returns `{ state: 'loading' }` until the topic's
240
+ first value arrives, then `{ state: 'ready', value }`, re-rendering on each
241
+ change; a `null` client observes nothing and stays loading. `useSave(client)` returns `busy`, the last `outcome` or `failure`, and
242
+ `save(room, roomDrafts)`, which writes each Path's parts onto the Room Draft
243
+ already there, keeping the bases its parts have, or onto a new one, and saves
244
+ them together. A refused Save leaves the Room Drafts for the App to save again
245
+ or discard; a failure is recorded and rejects. `saveRoomDrafts(client, room,
246
+ roomDrafts)` is that save outside a component. A react-admin or Refine App
247
+ reads and writes its Rooms through the data providers of
248
+ `@agentshouse/mdruntime-families`.
203
249
 
204
250
  ## What an agent must never do
205
251
 
package/README.md CHANGED
@@ -12,22 +12,22 @@ npm install @agentshouse/mdruntime
12
12
 
13
13
  ## Entries
14
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 |
15
+ | Entry | For |
16
+ | ------------------------------- | ---------------------------------------------------------------- |
17
+ | `@agentshouse/mdruntime/client` | The host's client: `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
+ | `@agentshouse/mdruntime/react` | React over the client: `useObserve`, `useSave`, `saveRoomDrafts` |
21
22
 
22
23
  ## Usage
23
24
 
24
- App code imports only the client entry and connects on the port its host hands
25
- it:
25
+ App code takes the client its host hands it; in House the App bridge hands it:
26
26
 
27
27
  ```ts
28
- import { connectMdRuntime } from '@agentshouse/mdruntime/client';
28
+ import { houseBridge } from '@agentshouse/app-bridge';
29
29
 
30
- const runtime = connectMdRuntime(port);
30
+ const runtime = await houseBridge().runtime;
31
31
  const rooms = await runtime.rooms();
32
32
  const notes = await runtime.query({ types: ['note'], select: 'all', limit: 20 });
33
33
  ```
package/dist/adapter.d.ts CHANGED
@@ -1,15 +1,12 @@
1
- import type { ModelIdentity, ModelResult } from './model.js';
1
+ import type { ModelResult } from './model.js';
2
2
  import type { ChangeBatch } from './change.js';
3
3
  export type Authorization = object;
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', 'move-reference-rewrites'];
6
4
  export type MdModelIdentity = {
7
5
  identity: string;
8
6
  version: string;
9
7
  };
10
8
  export type TypedSelection = {
11
9
  roots: readonly string[];
12
- attachedModel: ModelIdentity | null;
13
10
  };
14
11
  export type OperationScopes = {
15
12
  read: readonly string[];
@@ -24,10 +21,10 @@ export type ReplicaAdmission = {
24
21
  export type DiscoveredRoom = {
25
22
  name: string;
26
23
  locator: string;
24
+ handle: string;
27
25
  roomVersion: string;
28
26
  operations: OperationScopes;
29
27
  replica: ReplicaAdmission;
30
- attachedModel: ModelIdentity | null;
31
28
  typedSelection?: TypedSelection;
32
29
  providerOwnedPaths: readonly string[];
33
30
  };
@@ -35,13 +32,21 @@ export type Capability = {
35
32
  name: string;
36
33
  limits?: readonly ProviderLimit[];
37
34
  actions?: readonly ActionDeclaration[];
38
- conversationCards?: ConversationCards;
35
+ conversationAgents?: ConversationAgents;
39
36
  };
40
- export type ConversationCards = {
37
+ export type ConversationAgents = {
41
38
  locator: string;
42
39
  type: string;
43
40
  identity: string;
41
+ name: string;
42
+ };
43
+ export type ListedConversation = {
44
+ conversation: string;
44
45
  agent: string;
46
+ name: string;
47
+ created: string;
48
+ finished: string | null;
49
+ outcome: string | null;
45
50
  };
46
51
  export type ConversationAction = 'conversation.create' | 'conversation.send' | 'conversation.answer' | 'conversation.interrupt' | 'conversation.kill' | 'conversation.cancel' | 'conversation.delete' | 'conversation.history';
47
52
  export type ConversationMessage = {
@@ -72,6 +77,9 @@ export type TurnContext = {
72
77
  window: number;
73
78
  };
74
79
  export type TurnOperation = {
80
+ op: 'begin';
81
+ at: string;
82
+ } | {
75
83
  op: 'start';
76
84
  index: number;
77
85
  part: unknown;
@@ -159,6 +167,15 @@ export type ConversationEvent = {
159
167
  } | {
160
168
  kind: 'gap';
161
169
  conversation: string;
170
+ } | {
171
+ kind: 'list';
172
+ entries: readonly ListedConversation[];
173
+ } | {
174
+ kind: 'listed';
175
+ entry: ListedConversation;
176
+ } | {
177
+ kind: 'unlisted';
178
+ conversation: string;
162
179
  };
163
180
  export type ConversationStream = {
164
181
  replicate(conversations: readonly string[]): void;
@@ -186,12 +203,11 @@ export type Retention = {
186
203
  };
187
204
  export type Discovery = {
188
205
  kind: 'discovery';
189
- supportedVersions: readonly number[];
190
- mdModel: MdModelIdentity;
191
206
  rooms: readonly DiscoveredRoom[];
192
207
  capabilities: readonly Capability[];
193
208
  providerLimits: readonly ProviderLimit[];
194
209
  retention: Retention;
210
+ member?: Member;
195
211
  };
196
212
  export type TransportUncertainty = {
197
213
  kind: 'transport-uncertainty';
@@ -227,6 +243,9 @@ export type ChangeAuthor = {
227
243
  id: string;
228
244
  name: string;
229
245
  };
246
+ export type Member = Extract<ChangeAuthor, {
247
+ kind: 'user';
248
+ }>;
230
249
  export type HeadChange = {
231
250
  author: ChangeAuthor | null;
232
251
  time: string;
@@ -243,9 +262,14 @@ export type BootstrapRequest = {
243
262
  selection: string;
244
263
  pageToken?: PageToken;
245
264
  };
265
+ export type RoomModels = {
266
+ collection?: ModelResult;
267
+ selection?: ModelResult;
268
+ };
246
269
  export type BootstrapPage = {
247
270
  kind: 'bootstrap';
248
271
  roomVersion: string;
272
+ models?: RoomModels;
249
273
  documents: Readonly<Record<string, string>>;
250
274
  revisions: Readonly<Record<string, string>>;
251
275
  changes: Readonly<Record<string, HeadChange>>;
@@ -258,12 +282,12 @@ export type RefreshRequest = {
258
282
  locator: string;
259
283
  selection: string;
260
284
  fromRoomVersion: string;
261
- minPosition?: string;
262
285
  pageToken?: PageToken;
263
286
  };
264
287
  export type RefreshPage = {
265
288
  kind: 'net-advancement';
266
289
  roomVersion: string;
290
+ models?: RoomModels;
267
291
  documents: Readonly<Record<string, string>>;
268
292
  revisions: Readonly<Record<string, string>>;
269
293
  changes: Readonly<Record<string, HeadChange>>;
@@ -295,7 +319,9 @@ export type MutationResult = {
295
319
  roomVersion: string;
296
320
  documents: Readonly<Record<string, string>>;
297
321
  revisions: Readonly<Record<string, string>>;
322
+ changes: Readonly<Record<string, HeadChange>>;
298
323
  removals: readonly string[];
324
+ attachments?: readonly RoomAttachment[];
299
325
  author?: string;
300
326
  time?: string;
301
327
  } | (ProviderRefusal & {
@@ -333,6 +359,7 @@ export type HistoryResult = {
333
359
  kind: 'history';
334
360
  revisions: readonly HistoryRevision[];
335
361
  pageToken?: PageToken;
362
+ deleted?: true;
336
363
  } | {
337
364
  kind: 'revision';
338
365
  content: string;
@@ -354,27 +381,32 @@ export type ActionResult = {
354
381
  } | (ProviderRefusal & {
355
382
  kind: 'rejected';
356
383
  }) | AdapterFailure;
357
- export type ModelRequest = {
358
- locator: string;
359
- attached: 'collection';
360
- model: ModelIdentity | null;
361
- } | {
384
+ export type HeldRoom = {
362
385
  locator: string;
363
- attached: 'typed-selection';
364
- roots: readonly string[];
365
- model: ModelIdentity | null;
386
+ roomVersion: string;
387
+ documents: Readonly<Record<string, string>>;
388
+ revisions: Readonly<Record<string, string>>;
389
+ attachments: readonly RoomAttachment[];
366
390
  };
367
- export type RoomVersionNotification = {
391
+ export type RoomStreamEvent = {
392
+ kind: 'opened';
393
+ } | {
394
+ kind: 'closed';
395
+ revoked: boolean;
396
+ } | {
397
+ kind: 'opening';
398
+ expired: readonly string[];
399
+ } | {
400
+ kind: 'room-version';
368
401
  locator: string;
369
402
  roomVersion: string;
370
- modelChanged?: true;
371
403
  };
372
- export type SelectedRooms = {
373
- select(locators: readonly string[]): void;
374
- observe(notify: (notification: RoomVersionNotification) => void): () => void;
404
+ export type RoomStream = {
405
+ hold(rooms: readonly HeldRoom[]): void;
406
+ reopen(): void;
407
+ observe(notify: (event: RoomStreamEvent) => void): () => void;
375
408
  };
376
409
  export type Adapter = {
377
- model(authorization: Authorization, request: ModelRequest): Promise<ModelResult>;
378
410
  authorize(): Promise<Authorization>;
379
411
  discover(authorization: Authorization): Promise<DiscoverResult>;
380
412
  bootstrap(authorization: Authorization, request: BootstrapRequest): Promise<BootstrapResult>;
@@ -383,7 +415,8 @@ export type Adapter = {
383
415
  history(authorization: Authorization, request: HistoryRequest): Promise<HistoryResult>;
384
416
  action(authorization: Authorization, request: ActionRequest): Promise<ActionResult>;
385
417
  reached(locator: string, roomVersion: string, target: string): boolean;
386
- roomVersions?: SelectedRooms;
418
+ follows(locator: string, roomVersion: string, next: string): boolean;
419
+ roomStream?: RoomStream;
387
420
  conversations?: ConversationStream;
388
421
  serviceMode?: ServiceModeSignal;
389
422
  };
@@ -1 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AAG,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,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACrE,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC,CAAC"}
package/dist/adapter.js CHANGED
@@ -1,9 +1 @@
1
- export const ROOM_CONTRACT_VERSION = 1;
2
- export const VERSION_1_CAPABILITIES = [
3
- 'stable-file-ids',
4
- 'ranked-provider-search',
5
- 'room-version-notifications',
6
- 'room-history',
7
- 'provider-actions',
8
- 'move-reference-rewrites',
9
- ];
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { type ModelResult, type ModelState } from './model.js';
2
+ export type AttachedModel = {
3
+ state: ModelState;
4
+ refused: {
5
+ identity: string;
6
+ rule: string;
7
+ location?: string;
8
+ } | null;
9
+ };
10
+ export declare function attachedModel(answer: ModelResult, previous: ModelState): AttachedModel;
11
+ //# sourceMappingURL=attached-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attached-model.d.ts","sourceRoot":"","sources":["../src/attached-model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAI1E,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACvE,CAAC;AAEF,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,GAAG,aAAa,CA4CtF"}
@@ -0,0 +1,47 @@
1
+ import { verify } from '@agentshouse/mdmodel';
2
+ import { MD_MODEL } from './collection.js';
3
+ import { sameModel } from './model.js';
4
+ const EMPTY_SCHEMA = { verdict: 'accept', model: { types: {} } };
5
+ export function attachedModel(answer, previous) {
6
+ if (answer.kind === 'model-unavailable') {
7
+ return { state: { status: 'unavailable', reason: answer.reason }, refused: null };
8
+ }
9
+ if (previous.status !== 'unavailable' &&
10
+ sameModel(previous.snapshot, answer.snapshot) &&
11
+ previous.snapshot.schema !== answer.snapshot.schema) {
12
+ return {
13
+ state: {
14
+ status: 'unavailable',
15
+ reason: 'invalid',
16
+ schema: answer.snapshot.schema,
17
+ revision: answer.snapshot.revision,
18
+ },
19
+ refused: null,
20
+ };
21
+ }
22
+ const verified = answer.snapshot.schema === null ? EMPTY_SCHEMA : verify(answer.snapshot.schema);
23
+ if (verified.verdict === 'refuse') {
24
+ return {
25
+ state: {
26
+ status: 'unavailable',
27
+ reason: 'invalid',
28
+ schema: answer.snapshot.schema,
29
+ revision: answer.snapshot.revision,
30
+ },
31
+ refused: {
32
+ identity: answer.snapshot.identity,
33
+ rule: verified.rule,
34
+ ...(verified.location === undefined ? {} : { location: verified.location }),
35
+ },
36
+ };
37
+ }
38
+ return {
39
+ state: {
40
+ status: 'current',
41
+ snapshot: structuredClone(answer.snapshot),
42
+ verifiedWith: MD_MODEL,
43
+ types: verified.model.types,
44
+ },
45
+ refused: null,
46
+ };
47
+ }
@@ -1,10 +1,24 @@
1
1
  import type { ModelState } from './model.js';
2
- import type { Adapter, AdapterFailure, Authorization, DiscoveredRoom } from './adapter.js';
3
- import { type Staged } from './replica.js';
4
- import { type Unconfirmed } from './transfer.js';
5
- export type BootstrapOutcome = Staged | Unconfirmed | AdapterFailure;
6
- export declare function bootstrapRoom(adapter: Adapter, authorization: Authorization, room: DiscoveredRoom, models: {
2
+ import type { Adapter, AdapterFailure, Authorization, DiscoveredRoom, RetryableRefusal, RoomModels } from './adapter.js';
3
+ import { type ConfirmedLayer } from './replica.js';
4
+ import type { StagedLayer, TransferRecord } from './store.js';
5
+ import { type Refused, type Unconfirmed } from './transfer.js';
6
+ export type Bootstrapped = {
7
+ kind: 'staged';
8
+ confirmed: ConfirmedLayer;
9
+ stored: StagedLayer;
10
+ };
11
+ export type BootstrapOutcome = Bootstrapped | Refused | Unconfirmed | RetryableRefusal | AdapterFailure;
12
+ export type HeldModels = {
7
13
  collection: ModelState;
8
14
  selection: ModelState;
9
- }, continuing: () => boolean): Promise<BootstrapOutcome>;
15
+ };
16
+ export type Remodel = (models: RoomModels | undefined, held: HeldModels) => HeldModels;
17
+ export type Staging = {
18
+ held(locator: string): TransferRecord | null;
19
+ staged(record: TransferRecord): Promise<StagedLayer>;
20
+ stage(record: TransferRecord, page: StagedLayer): Promise<boolean>;
21
+ abandon(locator: string): Promise<void>;
22
+ };
23
+ export declare function bootstrapRoom(adapter: Adapter, authorization: Authorization, room: DiscoveredRoom, held: HeldModels, remodel: Remodel, continuing: () => boolean, staging: Staging): Promise<BootstrapOutcome>;
10
24
  //# 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,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7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