@agentshouse/mdruntime 0.1.0-c009335e08279 → 0.1.0-c0e5d05c64ed4

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 (70) hide show
  1. package/AGENTS.md +62 -26
  2. package/README.md +10 -10
  3. package/dist/adapter.d.ts +80 -43
  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 +5 -3
  10. package/dist/bootstrap.d.ts.map +1 -1
  11. package/dist/bootstrap.js +3 -2
  12. package/dist/client.d.ts +3 -2
  13. package/dist/client.d.ts.map +1 -1
  14. package/dist/client.js +3 -10
  15. package/dist/connection.d.ts +10 -12
  16. package/dist/connection.d.ts.map +1 -1
  17. package/dist/connection.js +501 -512
  18. package/dist/conversation.d.ts +22 -11
  19. package/dist/conversation.d.ts.map +1 -1
  20. package/dist/conversation.js +250 -105
  21. package/dist/host.d.ts +7 -1
  22. package/dist/host.d.ts.map +1 -1
  23. package/dist/host.js +34 -31
  24. package/dist/index.d.ts +3 -3
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/memory.d.ts +11 -5
  27. package/dist/memory.d.ts.map +1 -1
  28. package/dist/memory.js +78 -26
  29. package/dist/model.d.ts +11 -11
  30. package/dist/model.d.ts.map +1 -1
  31. package/dist/model.js +6 -3
  32. package/dist/observation.d.ts +2 -0
  33. package/dist/observation.d.ts.map +1 -1
  34. package/dist/observation.js +24 -14
  35. package/dist/paths.d.ts +0 -1
  36. package/dist/paths.d.ts.map +1 -1
  37. package/dist/paths.js +0 -16
  38. package/dist/query.d.ts +8 -3
  39. package/dist/query.d.ts.map +1 -1
  40. package/dist/query.js +104 -36
  41. package/dist/reach.d.ts +40 -0
  42. package/dist/reach.d.ts.map +1 -0
  43. package/dist/reach.js +270 -0
  44. package/dist/react.d.ts +32 -0
  45. package/dist/react.d.ts.map +1 -0
  46. package/dist/react.js +62 -0
  47. package/dist/read-side.d.ts +4 -0
  48. package/dist/read-side.d.ts.map +1 -1
  49. package/dist/read-side.js +116 -54
  50. package/dist/refresh.d.ts +2 -1
  51. package/dist/refresh.d.ts.map +1 -1
  52. package/dist/refresh.js +7 -3
  53. package/dist/replica.d.ts +4 -4
  54. package/dist/replica.d.ts.map +1 -1
  55. package/dist/replica.js +12 -13
  56. package/dist/room-draft.d.ts +3 -0
  57. package/dist/room-draft.d.ts.map +1 -1
  58. package/dist/room-draft.js +6 -4
  59. package/dist/rows.d.ts +2 -1
  60. package/dist/rows.d.ts.map +1 -1
  61. package/dist/rows.js +75 -38
  62. package/dist/save.d.ts +1 -2
  63. package/dist/save.d.ts.map +1 -1
  64. package/dist/save.js +90 -48
  65. package/dist/store.d.ts +1 -1
  66. package/dist/store.d.ts.map +1 -1
  67. package/dist/wire.d.ts +51 -16
  68. package/dist/wire.d.ts.map +1 -1
  69. package/dist/wire.js +50 -59
  70. package/package.json +14 -2
package/AGENTS.md CHANGED
@@ -12,21 +12,33 @@ the reported persistence answer, reauthorization, conversation, the chat draft,
12
12
  and Presentation State. Sync Status, the Service Mode, the storage-loss
13
13
  statement and the deployment facts are observations only.
14
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.
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
17
26
  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:
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.
38
+ the running `turn` with its message parts and its context in use and window, the
39
+ open questions, the process state, and the CLI's commands and options. These live
40
+ only in memory: the message accepted under the turn's id replaces the running turn,
41
+ and none of them is stored or searchable.
30
42
  `chatDraft.write` and `chatDraft.discard` keep what the App Creator composes;
31
43
  sending it is a Provider Action that needs the Provider reachable and is never
32
44
  queued.
@@ -45,7 +57,10 @@ effect the Provider places in a Room carries `at`, that Room and Room Version;
45
57
  reached it, and the MD Runtime keeps refreshing that Room until it has;
46
58
  `reached(room, roomVersion, path)` answers whether the held confirmed copy of
47
59
  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
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
49
64
  member of the
50
65
  client is asynchronous. Results are detached snapshots. Nothing in this
51
66
  surface returns the authorization, performs a request the App's code
@@ -67,22 +82,28 @@ data:
67
82
  - **Filter.** `rooms` names Room locators and defaults to every Room. `types`
68
83
  names MD Types, and `any` names untyped Markdown Documents. `pathPrefix` is a
69
84
  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:
85
+ - **Fields.** Every frontmatter value is named by JSON Pointer: `/status`,
86
+ `/shipping/city`, `~1` for a `/` and `~0` for a `~` in a key. A segment that
87
+ meets a list applies to every item and a number names one item. `where` names
88
+ pointers, ANDs them, and nests `$and` and `$or`; a pointer through a list holds
89
+ when any item satisfies it. A bare value is equality; the operators are `$eq`,
90
+ `$ne`, `$in`, `$nin`, `$gt`, `$gte`, `$lt`, `$lte`, `$all`, `$size` and
91
+ `$exists`. Equality on a list asks whether it contains the value. Missing, null and empty differ:
74
92
  `$exists: false` keeps a missing field, `null` an explicit null, `''` empty
75
93
  text and `$size: 0` an empty list. A date compares in calendar order and never
76
94
  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
95
+ Untyped frontmatter, and a value under `oneOf` or a conditional, is plain
96
+ values. There is no text containment or regular
78
97
  expression.
79
98
  - **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
99
+ reference at pointer `field`, at any depth, points to a matching Document of the
100
+ same Room. `backlinks: { field, types, where, pathPrefix }` keeps Documents that a
82
101
  matching Document of the same Room references. Each keeps a Document once.
83
102
  - **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
103
+ `preamble`, `markdown`, `backlinks` and `change`, where `fields` is `'all'` or a
104
+ list of pointers and `sections` `'all'` or a list of names. Selected pointers
105
+ return the frontmatter holding only them, nested as written. A backlink names
106
+ the referring Path, MD Type and the pointer it came from as `field`. Room and Path always return; a Markdown
86
107
  Document also returns its MD Type. A non-Markdown Document or binary link
87
108
  target returns only Room and Path. An unselected part is absent. Select only
88
109
  what a screen shows: a list that selects the Markdown hears every edit of it.
@@ -96,8 +117,8 @@ data:
96
117
  - **Order and groups.** `orderBy` sorts by `room`, `path`, `type` or `{ field }`
97
118
  with TanStack DB's own options, and ties end with Room, then Path. `groupBy` by
98
119
  `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.
120
+ over every match and ordered by `count` or a key. A sort or group takes only a
121
+ pointer that holds one value. `limit` bounds the Documents or the groups.
101
122
  - **Results and errors.** A result carries no Room Version: read freshness from
102
123
  Rooms and Sync Status. An invalid query fails with `invalid-query`,
103
124
  `unknown-type`, `unknown-field` or `wrong-kind`, naming where, and never
@@ -111,7 +132,7 @@ search.
111
132
 
112
133
  - **What is found.** A Document by its field values, its sections' headings and
113
134
  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,
135
+ Drafts, chat drafts and a running turn's parts are never found. There are no phrases,
115
136
  word forms, typo tolerance or prefix matching.
116
137
  - **Narrowing.** `documents` is a Local Query filter: `rooms`, `types`, `where`,
117
138
  `pathPrefix`, `hop` and `backlinks`. `conversations` names conversations. Both
@@ -194,13 +215,28 @@ an App's override respected. What an App Creator's agent adds carries none
194
215
  of these promises by itself. Reading, querying and searching never wait for
195
216
  the network. Data lives only in the App Creator's browser and with the Provider.
196
217
 
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.
218
+ ## App code takes the client its host hands it and never constructs a Runtime
219
+
220
+ App code takes the client its host hands it: in House,
221
+ `connectHouseBridge().runtime` from `@agentshouse/app-bridge` resolves to the
222
+ client House built into the page. It never constructs a Runtime or a client.
223
+ It imports only types from `@agentshouse/mdruntime/client`, does not call
224
+ `connectMdRuntime` or `serveMdRuntime`, and does not import the package main,
225
+ the host entry, or the Adapter package. Hosts and tests use those entries; the
226
+ served App does not.
227
+
228
+ A React App may observe and save through `@agentshouse/mdruntime/react`, which
229
+ names React as a peer dependency. `useObserve(client, topic, ...input)` takes
230
+ the arguments of `observe` and returns the topic's current value, `undefined`
231
+ until it arrives, re-rendering on each change; a `null` client observes
232
+ nothing. `useSave(client)` returns `busy`, the last `outcome` or `failure`, and
233
+ `save(room, roomDrafts)`, which writes each Path's parts onto the Room Draft
234
+ already there, keeping the bases its parts have, or onto a new one, and saves
235
+ them together. A refused Save leaves the Room Drafts for the App to save again
236
+ or discard; a failure is recorded and rejects. `saveRoomDrafts(client, room,
237
+ roomDrafts)` is that save outside a component. A react-admin or Refine App
238
+ reads and writes its Rooms through the data providers of
239
+ `@agentshouse/mdruntime-families`.
204
240
 
205
241
  ## What an agent must never do
206
242
 
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 { connectHouseBridge } from '@agentshouse/app-bridge';
29
29
 
30
- const runtime = connectMdRuntime(port);
30
+ const runtime = await connectHouseBridge().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 = {
@@ -67,15 +72,37 @@ export type ConversationHistoryPage = {
67
72
  export type ConversationHistories = {
68
73
  histories: readonly ConversationHistoryPage[];
69
74
  };
70
- export type WorkingNote = {
71
- noteId: string;
72
- text: string;
75
+ export type TurnContext = {
76
+ used: number;
77
+ window: number;
73
78
  };
74
- export type PlanStep = {
75
- label: string;
76
- priority?: string;
79
+ export type TurnOperation = {
80
+ op: 'begin';
81
+ at: string;
82
+ } | {
83
+ op: 'start';
84
+ index: number;
85
+ part: unknown;
86
+ } | {
87
+ op: 'append';
88
+ index: number;
89
+ text: string;
90
+ } | {
91
+ op: 'status';
92
+ index: number;
77
93
  status: string;
78
- };
94
+ result: unknown;
95
+ } | {
96
+ op: 'count';
97
+ index: number;
98
+ count: number;
99
+ } | {
100
+ op: 'plan';
101
+ index: number;
102
+ entries: readonly unknown[];
103
+ } | ({
104
+ op: 'context';
105
+ } & TurnContext);
79
106
  export type ProcessCommand = {
80
107
  [field: string]: unknown;
81
108
  name: string;
@@ -113,19 +140,10 @@ export type SessionOption = (SessionOptionNaming & {
113
140
  currentValue: boolean;
114
141
  });
115
142
  export type ConversationEvent = {
116
- kind: 'growing-text';
117
- conversation: string;
118
- turn: string;
119
- text: string;
120
- } | {
121
- kind: 'plan';
143
+ kind: 'turn';
122
144
  conversation: string;
123
145
  turn: string;
124
- plan: readonly PlanStep[];
125
- } | {
126
- kind: 'working-note';
127
- conversation: string;
128
- note: WorkingNote | null;
146
+ operation: TurnOperation;
129
147
  } | {
130
148
  kind: 'questions';
131
149
  conversation: string;
@@ -149,6 +167,15 @@ export type ConversationEvent = {
149
167
  } | {
150
168
  kind: 'gap';
151
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;
152
179
  };
153
180
  export type ConversationStream = {
154
181
  replicate(conversations: readonly string[]): void;
@@ -176,8 +203,6 @@ export type Retention = {
176
203
  };
177
204
  export type Discovery = {
178
205
  kind: 'discovery';
179
- supportedVersions: readonly number[];
180
- mdModel: MdModelIdentity;
181
206
  rooms: readonly DiscoveredRoom[];
182
207
  capabilities: readonly Capability[];
183
208
  providerLimits: readonly ProviderLimit[];
@@ -233,9 +258,14 @@ export type BootstrapRequest = {
233
258
  selection: string;
234
259
  pageToken?: PageToken;
235
260
  };
261
+ export type RoomModels = {
262
+ collection?: ModelResult;
263
+ selection?: ModelResult;
264
+ };
236
265
  export type BootstrapPage = {
237
266
  kind: 'bootstrap';
238
267
  roomVersion: string;
268
+ models?: RoomModels;
239
269
  documents: Readonly<Record<string, string>>;
240
270
  revisions: Readonly<Record<string, string>>;
241
271
  changes: Readonly<Record<string, HeadChange>>;
@@ -248,12 +278,12 @@ export type RefreshRequest = {
248
278
  locator: string;
249
279
  selection: string;
250
280
  fromRoomVersion: string;
251
- minPosition?: string;
252
281
  pageToken?: PageToken;
253
282
  };
254
283
  export type RefreshPage = {
255
284
  kind: 'net-advancement';
256
285
  roomVersion: string;
286
+ models?: RoomModels;
257
287
  documents: Readonly<Record<string, string>>;
258
288
  revisions: Readonly<Record<string, string>>;
259
289
  changes: Readonly<Record<string, HeadChange>>;
@@ -286,6 +316,7 @@ export type MutationResult = {
286
316
  documents: Readonly<Record<string, string>>;
287
317
  revisions: Readonly<Record<string, string>>;
288
318
  removals: readonly string[];
319
+ attachments?: readonly RoomAttachment[];
289
320
  author?: string;
290
321
  time?: string;
291
322
  } | (ProviderRefusal & {
@@ -323,6 +354,7 @@ export type HistoryResult = {
323
354
  kind: 'history';
324
355
  revisions: readonly HistoryRevision[];
325
356
  pageToken?: PageToken;
357
+ deleted?: true;
326
358
  } | {
327
359
  kind: 'revision';
328
360
  content: string;
@@ -344,27 +376,31 @@ export type ActionResult = {
344
376
  } | (ProviderRefusal & {
345
377
  kind: 'rejected';
346
378
  }) | AdapterFailure;
347
- export type ModelRequest = {
379
+ export type HeldRoom = {
348
380
  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;
381
+ roomVersion: string;
382
+ documents: Readonly<Record<string, string>>;
383
+ revisions: Readonly<Record<string, string>>;
384
+ attachments: readonly RoomAttachment[];
356
385
  };
357
- export type RoomVersionNotification = {
386
+ export type RoomStreamEvent = {
387
+ kind: 'opened';
388
+ } | {
389
+ kind: 'closed';
390
+ revoked: boolean;
391
+ } | {
392
+ kind: 'opening';
393
+ expired: readonly string[];
394
+ } | {
395
+ kind: 'room-version';
358
396
  locator: string;
359
397
  roomVersion: string;
360
- modelChanged?: true;
361
398
  };
362
- export type SelectedRooms = {
363
- select(locators: readonly string[]): void;
364
- observe(notify: (notification: RoomVersionNotification) => void): () => void;
399
+ export type RoomStream = {
400
+ hold(rooms: readonly HeldRoom[]): void;
401
+ observe(notify: (event: RoomStreamEvent) => void): () => void;
365
402
  };
366
403
  export type Adapter = {
367
- model(authorization: Authorization, request: ModelRequest): Promise<ModelResult>;
368
404
  authorize(): Promise<Authorization>;
369
405
  discover(authorization: Authorization): Promise<DiscoverResult>;
370
406
  bootstrap(authorization: Authorization, request: BootstrapRequest): Promise<BootstrapResult>;
@@ -373,7 +409,8 @@ export type Adapter = {
373
409
  history(authorization: Authorization, request: HistoryRequest): Promise<HistoryResult>;
374
410
  action(authorization: Authorization, request: ActionRequest): Promise<ActionResult>;
375
411
  reached(locator: string, roomVersion: string, target: string): boolean;
376
- roomVersions?: SelectedRooms;
412
+ follows(locator: string, roomVersion: string, next: string): boolean;
413
+ roomStream?: RoomStream;
377
414
  conversations?: ConversationStream;
378
415
  serviceMode?: ServiceModeSignal;
379
416
  };
@@ -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,EAClB,yBAAyB,CACjB,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,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,EAAE,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O,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,12 @@
1
1
  import type { ModelState } from './model.js';
2
- import type { Adapter, AdapterFailure, Authorization, DiscoveredRoom } from './adapter.js';
2
+ import type { Adapter, AdapterFailure, Authorization, DiscoveredRoom, RoomModels } from './adapter.js';
3
3
  import { type Staged } from './replica.js';
4
4
  import { type Unconfirmed } from './transfer.js';
5
5
  export type BootstrapOutcome = Staged | Unconfirmed | AdapterFailure;
6
- export declare function bootstrapRoom(adapter: Adapter, authorization: Authorization, room: DiscoveredRoom, models: {
6
+ export type HeldModels = {
7
7
  collection: ModelState;
8
8
  selection: ModelState;
9
- }, continuing: () => boolean): Promise<BootstrapOutcome>;
9
+ };
10
+ export type Remodel = (models: RoomModels | undefined, held: HeldModels) => HeldModels;
11
+ export declare function bootstrapRoom(adapter: Adapter, authorization: Authorization, room: DiscoveredRoom, held: HeldModels, remodel: Remodel, continuing: () => boolean): Promise<BootstrapOutcome>;
10
12
  //# 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;AAC7C,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,cAAc,EAGf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,WAAW,GAAG,cAAc,CAAC;AAErE,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,UAAU,EAAE,MAAM,OAAO,GACxB,OAAO,CAAC,gBAAgB,CAAC,CA+C3B"}
1
+ {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,cAAc,EAGd,UAAU,EACX,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAc,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,WAAW,GAAG,cAAc,CAAC;AAErE,MAAM,MAAM,UAAU,GAAG;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,UAAU,CAAA;CAAE,CAAC;AAE3E,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,EAAE,IAAI,EAAE,UAAU,KAAK,UAAU,CAAC;AAEvF,wBAAsB,aAAa,CACjC,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,aAAa,EAC5B,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,OAAO,GACxB,OAAO,CAAC,gBAAgB,CAAC,CAgD3B"}
package/dist/bootstrap.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { declaredAttachments } from './attachment.js';
2
2
  import { readStaged } from './replica.js';
3
3
  import { unconfirmed } from './transfer.js';
4
- export async function bootstrapRoom(adapter, authorization, room, models, continuing) {
4
+ export async function bootstrapRoom(adapter, authorization, room, held, remodel, continuing) {
5
5
  const first = await adapter.bootstrap(authorization, {
6
6
  locator: room.locator,
7
7
  selection: room.replica.selection,
@@ -9,6 +9,7 @@ export async function bootstrapRoom(adapter, authorization, room, models, contin
9
9
  if (first.kind !== 'bootstrap')
10
10
  return first;
11
11
  const roomVersion = first.roomVersion;
12
+ const models = remodel(first.models, held);
12
13
  const documents = { ...first.documents };
13
14
  const revisions = { ...first.revisions };
14
15
  const changes = { ...first.changes };
@@ -38,9 +39,9 @@ export async function bootstrapRoom(adapter, authorization, room, models, contin
38
39
  return readStaged({
39
40
  locator: room.locator,
40
41
  name: room.name,
42
+ handle: room.handle,
41
43
  operations: room.operations,
42
44
  replica: room.replica,
43
- attachedModel: room.attachedModel,
44
45
  model: models.collection,
45
46
  typedSelection: room.typedSelection ?? null,
46
47
  selectionModel: models.selection,
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { AppRoom, ConnectionRefusal, HistoryQuery, RoomTypes, SavedRoomDraft, SaveResult } from './connection.js';
1
+ import type { AppRoom, ConnectionRefusal, HistoryQuery, RoomSchemas, SavedRoomDraft, SaveResult } from './connection.js';
2
2
  import type { HistoryResult, ServiceMode } from './adapter.js';
3
3
  import type { ChatDraft, ConversationEntry, ConversationOptions, ConversationView } from './conversation.js';
4
4
  import { type Observation } from './observation.js';
@@ -15,7 +15,7 @@ export type MdRuntimeClient = {
15
15
  (query: GroupQuery): Promise<GroupResult>;
16
16
  };
17
17
  search(request: SearchRequest): Promise<SearchResult>;
18
- types(locator: string): Promise<RoomTypes>;
18
+ types(locator: string): Promise<RoomSchemas>;
19
19
  roomDraft: {
20
20
  list(): Promise<readonly RoomDraft[]>;
21
21
  read(room: string, path: string): Promise<RoomDraft | null>;
@@ -60,6 +60,7 @@ export type MdRuntimeClient = {
60
60
  (topic: 'room-drafts'): Promise<Observation<readonly RoomDraft[]>>;
61
61
  (topic: 'presentation'): Promise<Observation<unknown>>;
62
62
  (topic: 'conversation', conversation: string, options: ConversationOptions): Promise<Observation<ConversationView>>;
63
+ (topic: 'conversations'): Promise<Observation<readonly ConversationEntry[]>>;
63
64
  };
64
65
  reauthorize(): Promise<void>;
65
66
  };