@agentshouse/mdruntime 0.1.0-c09bf842921ff → 0.1.0-c0b4d0492dec3

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 (108) hide show
  1. package/README.md +1 -1
  2. package/dist/adapter.d.ts +15 -16
  3. package/dist/adapter.d.ts.map +1 -1
  4. package/dist/bootstrap.d.ts +8 -4
  5. package/dist/bootstrap.d.ts.map +1 -1
  6. package/dist/bootstrap.js +206 -76
  7. package/dist/change.d.ts +1 -0
  8. package/dist/change.d.ts.map +1 -1
  9. package/dist/chat-types.d.ts +3 -0
  10. package/dist/chat-types.d.ts.map +1 -0
  11. package/dist/chat-types.js +2 -0
  12. package/dist/client.d.ts +5 -0
  13. package/dist/client.d.ts.map +1 -1
  14. package/dist/client.js +1 -0
  15. package/dist/compile.d.ts +5 -0
  16. package/dist/compile.d.ts.map +1 -1
  17. package/dist/compile.js +186 -55
  18. package/dist/connection.d.ts +8 -2
  19. package/dist/connection.d.ts.map +1 -1
  20. package/dist/connection.js +1386 -1040
  21. package/dist/conversation-row.d.ts +33 -0
  22. package/dist/conversation-row.d.ts.map +1 -0
  23. package/dist/conversation-row.js +47 -0
  24. package/dist/conversation.d.ts +13 -5
  25. package/dist/conversation.d.ts.map +1 -1
  26. package/dist/conversation.js +354 -192
  27. package/dist/entry.d.ts.map +1 -1
  28. package/dist/entry.js +1 -0
  29. package/dist/figures.d.ts +48 -0
  30. package/dist/figures.d.ts.map +1 -0
  31. package/dist/figures.js +197 -0
  32. package/dist/host.d.ts.map +1 -1
  33. package/dist/host.js +3 -3
  34. package/dist/index.d.ts +9 -4
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +3 -1
  37. package/dist/job.d.ts +20 -1
  38. package/dist/job.d.ts.map +1 -1
  39. package/dist/job.js +26 -0
  40. package/dist/live.d.ts +4 -4
  41. package/dist/live.d.ts.map +1 -1
  42. package/dist/live.js +53 -15
  43. package/dist/memory.d.ts +1 -0
  44. package/dist/memory.d.ts.map +1 -1
  45. package/dist/memory.js +11 -3
  46. package/dist/messages.d.ts +25 -1
  47. package/dist/messages.d.ts.map +1 -1
  48. package/dist/messages.js +82 -3
  49. package/dist/model.d.ts +0 -2
  50. package/dist/model.d.ts.map +1 -1
  51. package/dist/model.js +0 -6
  52. package/dist/outcome.d.ts +1 -0
  53. package/dist/outcome.d.ts.map +1 -1
  54. package/dist/outcome.js +3 -0
  55. package/dist/overlay.d.ts +1 -0
  56. package/dist/overlay.d.ts.map +1 -1
  57. package/dist/overlay.js +11 -0
  58. package/dist/parts.d.ts +59 -0
  59. package/dist/parts.d.ts.map +1 -0
  60. package/dist/parts.js +118 -0
  61. package/dist/query.d.ts +10 -0
  62. package/dist/query.d.ts.map +1 -1
  63. package/dist/questions.d.ts +32 -0
  64. package/dist/questions.d.ts.map +1 -0
  65. package/dist/questions.js +118 -0
  66. package/dist/reach.d.ts +5 -5
  67. package/dist/reach.d.ts.map +1 -1
  68. package/dist/reach.js +156 -99
  69. package/dist/read.d.ts +7 -0
  70. package/dist/read.d.ts.map +1 -0
  71. package/dist/read.js +17 -0
  72. package/dist/reads.d.ts +35 -0
  73. package/dist/reads.d.ts.map +1 -0
  74. package/dist/reads.js +128 -0
  75. package/dist/recovery.d.ts.map +1 -1
  76. package/dist/recovery.js +9 -1
  77. package/dist/refresh.d.ts +1 -1
  78. package/dist/refresh.d.ts.map +1 -1
  79. package/dist/refresh.js +4 -0
  80. package/dist/replica.d.ts.map +1 -1
  81. package/dist/replica.js +23 -6
  82. package/dist/save.d.ts.map +1 -1
  83. package/dist/save.js +10 -7
  84. package/dist/source.d.ts +61 -0
  85. package/dist/source.d.ts.map +1 -0
  86. package/dist/source.js +81 -0
  87. package/dist/status.d.ts +0 -2
  88. package/dist/status.d.ts.map +1 -1
  89. package/dist/status.js +0 -6
  90. package/dist/store.d.ts +85 -25
  91. package/dist/store.d.ts.map +1 -1
  92. package/dist/store.js +136 -98
  93. package/dist/stored.d.ts +55 -28
  94. package/dist/stored.d.ts.map +1 -1
  95. package/dist/stored.js +187 -74
  96. package/dist/tables.d.ts +99 -19
  97. package/dist/tables.d.ts.map +1 -1
  98. package/dist/tables.js +171 -34
  99. package/dist/tallies.d.ts +18 -0
  100. package/dist/tallies.d.ts.map +1 -0
  101. package/dist/tallies.js +129 -0
  102. package/dist/wire.d.ts +6 -0
  103. package/dist/wire.d.ts.map +1 -1
  104. package/dist/wire.js +3 -0
  105. package/package.json +2 -2
  106. package/dist/fence.d.ts +0 -6
  107. package/dist/fence.d.ts.map +0 -1
  108. package/dist/fence.js +0 -10
package/dist/store.d.ts CHANGED
@@ -6,7 +6,8 @@ import type { ReplicaRecord } from './replica.js';
6
6
  import type { Submission } from './outcome.js';
7
7
  import type { RoomDraftRecord, SavedDraft } from './room-draft.js';
8
8
  import type { ModelState, StoredModel } from './model.js';
9
- import type { CommittedWrite, ConversationWrite, CountedRoom, HeldConversation, HeldEntry, MessageWindow, QueryAnswer, QueryRoom, Referrer, RoomCommit, RuntimeDatabase, StoredEntry, StoredFile, TypedEntry, View } from './tables.js';
9
+ import type { CommittedWrite, ConversationWrite, HeldConversation, HeldRow, HeldEntry, MessageWindow, QueryAnswer, QueryRoom, Referrer, ReplicaOpened, RoomCommit, RuntimeDatabase, StoredEntry, StoredFile, TypedEntry, View } from './tables.js';
10
+ import type { JobMarker } from './job.js';
10
11
  export type { ConversationWrite, HeldConversation, MessageWindow } from './tables.js';
11
12
  export type TransferRecord = {
12
13
  readonly locator: string;
@@ -32,13 +33,6 @@ export type PendingState = {
32
33
  export type TargetRecord = {
33
34
  established: boolean;
34
35
  };
35
- export type QueueRecord = {
36
- locator: string;
37
- pending: readonly {
38
- batch: ChangeBatch;
39
- state: PendingState;
40
- }[];
41
- };
42
36
  export type PresentationRecord = {
43
37
  app: string;
44
38
  value: unknown;
@@ -63,6 +57,7 @@ export type CallRecord = {
63
57
  export type AuthoredWrite = {
64
58
  locator: string;
65
59
  queue?: readonly ChangeBatch[];
60
+ stored?: readonly ChangeBatch[];
66
61
  founded?: readonly ChangeBatch[];
67
62
  saved?: ReadonlyMap<string, readonly SavedDraft[]>;
68
63
  roomDrafts?: readonly RoomDraftRecord[];
@@ -71,23 +66,64 @@ export type AuthoredWrite = {
71
66
  export type StagedPage = {
72
67
  readonly entries: readonly StoredEntry[];
73
68
  readonly folders: readonly string[];
69
+ readonly part?: string;
70
+ };
71
+ export type ResumedTransfer = {
72
+ readonly key: number | null;
73
+ readonly transfer: string;
74
+ readonly staged: readonly string[];
74
75
  };
75
76
  export type RefreshedPage = StagedPage & {
76
77
  readonly removals: readonly string[];
77
78
  readonly folderRemovals: readonly string[];
78
79
  };
79
- export type Opened = {
80
- readonly rooms: ReadonlyMap<string, StoredReplica>;
81
- readonly unindexed: ReadonlySet<number>;
82
- readonly overlaid: ReadonlyMap<number, ReadonlySet<string>>;
83
- readonly erasing: boolean;
84
- readonly orphans: readonly number[];
80
+ export type HeldRoom = {
81
+ readonly record: StoredReplica;
82
+ readonly indexed: boolean;
83
+ readonly documents: number;
84
+ };
85
+ export type QueuedChange = {
86
+ readonly batch: ChangeBatch;
87
+ readonly state: PendingState;
88
+ };
89
+ export type HeldWork = {
90
+ readonly room: (HeldRoom & {
91
+ readonly overlaid: ReadonlySet<string>;
92
+ }) | null;
93
+ readonly queue: readonly QueuedChange[];
94
+ };
95
+ export type CoveredRoom = {
96
+ readonly key: number;
97
+ readonly transfer: string;
98
+ readonly roomVersion: string;
99
+ readonly indexed: boolean;
100
+ readonly documents: number;
101
+ readonly bytes: number;
102
+ readonly offline: string;
103
+ };
104
+ export type HeldCover = {
105
+ readonly rooms: ReadonlyMap<string, CoveredRoom>;
106
+ readonly queues: ReadonlyMap<string, readonly string[]>;
107
+ };
108
+ export type HeldStatus = {
109
+ readonly queued: readonly string[];
110
+ readonly lastCompleted: string | null;
111
+ readonly unsent: readonly {
112
+ readonly room: string;
113
+ readonly path: string;
114
+ }[];
115
+ readonly resets: readonly {
116
+ readonly locator: string;
117
+ readonly reset: string;
118
+ }[];
119
+ readonly returned: readonly RoomDraftRecord[];
120
+ };
121
+ export type Facts = {
85
122
  readonly lastCompleted: string | null;
86
123
  readonly providerLimits: readonly ProviderLimit[];
87
124
  readonly capabilities: readonly Capability[];
88
125
  readonly member: Member | null;
89
126
  readonly targets: Readonly<Record<string, TargetRecord>>;
90
- readonly presentation: readonly PresentationRecord[];
91
127
  readonly conversationList: readonly ListedConversation[] | null;
92
128
  readonly conversationCursor: string | null;
93
129
  };
@@ -98,44 +134,68 @@ export type Commit = {
98
134
  readonly whole?: boolean;
99
135
  };
100
136
  export type RuntimeStore = {
101
- opened(): Promise<Opened>;
102
- counts(rooms: readonly CountedRoom[]): Promise<readonly number[]>;
137
+ opened(): Promise<ReplicaOpened>;
138
+ rooms(locators?: readonly string[]): Promise<readonly HeldRoom[]>;
139
+ room(locator: string): Promise<HeldWork>;
140
+ covering(): Promise<HeldCover>;
141
+ offline(locator: string): Promise<string | null>;
142
+ held(): Promise<{
143
+ readonly held: ReadonlySet<string>;
144
+ readonly staged: ReadonlySet<string>;
145
+ }>;
146
+ status(): Promise<HeldStatus>;
147
+ batch(locator: string, id: string): Promise<ChangeBatch | null>;
148
+ order(locator: string): Promise<readonly string[]>;
149
+ queued(): Promise<readonly string[]>;
150
+ moving(): Promise<{
151
+ readonly queued: ReadonlyMap<string, readonly string[]>;
152
+ readonly moving: readonly (QueuedChange & {
153
+ readonly locator: string;
154
+ })[];
155
+ }>;
156
+ pending(locator: string, id: string): Promise<{
157
+ readonly state: PendingState | undefined;
158
+ readonly room: boolean;
159
+ }>;
160
+ facts(): Promise<Facts>;
161
+ presentation(app: string): Promise<unknown>;
162
+ demote(): Promise<void>;
103
163
  query(plan: Plan, rooms: readonly QueryRoom[], budget: number | null): Promise<QueryAnswer>;
104
164
  changes(keys: readonly number[]): number;
105
165
  entries(key: number, view: View, paths: readonly string[]): Promise<readonly HeldEntry[]>;
106
166
  typed(key: number, view: View, paths: readonly string[]): Promise<readonly TypedEntry[]>;
107
167
  referrers(key: number, view: View, targets: readonly string[]): Promise<readonly Referrer[]>;
108
- files(key: number, view: View, after: string | null, limit: number): Promise<readonly {
109
- readonly path: string;
110
- readonly revision: string;
111
- }[]>;
112
168
  folders(key: number, view: View, paths: readonly string[]): Promise<readonly string[]>;
113
169
  typedWithin(key: number, view: View, roots: readonly string[], within: boolean): Promise<boolean>;
114
170
  stage(record: TransferRecord, composition: Composition, page: StagedPage): Promise<number | null>;
171
+ resume(record: TransferRecord, composition: Composition, parts: readonly string[], published: number | null): Promise<ResumedTransfer | null>;
115
172
  refresh(key: number, composition: Composition, page: RefreshedPage): Promise<void>;
116
173
  unrefresh(key: number): Promise<void>;
117
174
  commit(commit: Commit): Promise<CommittedWrite>;
118
175
  fence(locators: readonly string[]): Promise<void>;
119
176
  erase(locator: string | null, limit: number): Promise<boolean>;
120
177
  abandon(locator: string): Promise<void>;
178
+ unfence(locators: readonly string[]): Promise<ReadonlySet<string>>;
121
179
  release(key: number): Promise<void>;
122
180
  rederive(key: number, composition: Composition, bytes: number, ms: number, floor: number): Promise<{
123
181
  readonly done: boolean;
124
182
  readonly text: number;
125
183
  }>;
126
184
  fact(name: string, value: unknown): Promise<void>;
127
- queues(): Promise<readonly QueueRecord[]>;
128
185
  submit(locator: string, id: string, submission: Submission, lost: boolean): Promise<void>;
129
186
  keepUpload(locator: string, id: string, upload: unknown): Promise<void>;
130
- roomDrafts(): Promise<readonly RoomDraftRecord[]>;
187
+ roomDrafts(locator?: string, paths?: readonly string[]): Promise<readonly RoomDraftRecord[]>;
131
188
  present(record: PresentationRecord): Promise<void>;
132
- conversations(): Promise<readonly HeldConversation[]>;
189
+ conversations(conversations?: readonly string[]): Promise<readonly HeldConversation[]>;
133
190
  keepMessages(write: ConversationWrite): Promise<void>;
134
191
  messageWindow(conversation: string, limit: number, before: readonly [string, string] | null, phrase?: string | null): Promise<MessageWindow>;
135
192
  messageCount(conversation: string, phrase?: string | null): Promise<number>;
136
193
  turnArrived(conversation: string, turn: string): Promise<boolean>;
194
+ conversationRows(conversations: readonly string[]): Promise<readonly HeldRow[]>;
195
+ jobMarkers(conversation: string): Promise<readonly JobMarker[]>;
137
196
  dropConversations(conversations: readonly string[]): Promise<void>;
138
197
  chatDrafts(): Promise<readonly ChatDraftRecord[]>;
198
+ chatDraft(conversation: string): Promise<ChatDraftRecord | null>;
139
199
  keepChatDrafts(records: readonly ChatDraftRecord[]): Promise<void>;
140
200
  dropChatDraft(conversation: string): Promise<void>;
141
201
  calls(): Promise<readonly CallRecord[]>;
@@ -148,5 +208,5 @@ export type RuntimeStore = {
148
208
  rememberGeneration(value: string): Promise<void>;
149
209
  file(key: string, type: string): Promise<Blob>;
150
210
  };
151
- export declare function openRuntimeStore(fenced: (locator: string) => boolean, authored: RuntimeDatabase): RuntimeStore;
211
+ export declare function openRuntimeStore(authored: RuntimeDatabase): RuntimeStore;
152
212
  //# sourceMappingURL=store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,MAAM,EACN,aAAa,EACd,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAGV,cAAc,EACd,iBAAiB,EACjB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CAAC,IAAI,CAAC,CAAC;IACnD,KAAK,IAAI,OAAO,CAAC,SAAS,UAAU,EAAE,CAAC,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,SAAS,UAAU,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpF,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,MAAM,IAAI,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;IACrC,UAAU,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACrC,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD,CAAC;AAiHF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,YAAY,CAuTxE"}
package/dist/store.js CHANGED
@@ -1,6 +1,9 @@
1
1
  import { composedOf } from './collection.js';
2
2
  import { binaryLocalId } from './identity.js';
3
3
  const FILE = '\u0000file';
4
+ function batchFacts(batch) {
5
+ return { paths: batch.changes.map(({ path }) => path), moving: batch.between !== undefined };
6
+ }
4
7
  function batchFiles(batch) {
5
8
  return batch.changes.flatMap((change) => (change.kind === 'binary' ? [change.localId] : []));
6
9
  }
@@ -10,7 +13,8 @@ function draftFiles(drafts) {
10
13
  function roomDraftRow(record) {
11
14
  return { path: record.path, record: JSON.stringify(record), files: draftFiles([record]) };
12
15
  }
13
- function authoredRows({ locator, queue, founded, saved, roomDrafts, consumedRoomDrafts }, held) {
16
+ function authoredRows({ locator, queue, stored, founded, saved, roomDrafts, consumedRoomDrafts, }) {
17
+ const held = new Set((stored ?? []).map(({ id }) => id));
14
18
  return {
15
19
  locator,
16
20
  ...(queue === undefined
@@ -18,7 +22,7 @@ function authoredRows({ locator, queue, founded, saved, roomDrafts, consumedRoom
18
22
  : {
19
23
  order: queue.map(({ id }) => id),
20
24
  added: queue
21
- .filter(({ id }) => held?.has(id) !== true)
25
+ .filter(({ id }) => !held.has(id))
22
26
  .map((batch) => {
23
27
  const drafts = saved?.get(batch.id) ?? [];
24
28
  return {
@@ -30,6 +34,7 @@ function authoredRows({ locator, queue, founded, saved, roomDrafts, consumedRoom
30
34
  lost: false,
31
35
  }),
32
36
  files: [...batchFiles(batch), ...draftFiles(drafts)],
37
+ ...batchFacts(batch),
33
38
  };
34
39
  }),
35
40
  }),
@@ -40,6 +45,7 @@ function authoredRows({ locator, queue, founded, saved, roomDrafts, consumedRoom
40
45
  id: batch.id,
41
46
  batch: JSON.stringify(batch),
42
47
  files: batchFiles(batch),
48
+ ...batchFacts(batch),
43
49
  })),
44
50
  }),
45
51
  ...(roomDrafts === undefined ? {} : { roomDrafts: roomDrafts.map(roomDraftRow) }),
@@ -78,10 +84,17 @@ async function filed(value, read) {
78
84
  restored[name] = await filed(item, read);
79
85
  return restored;
80
86
  }
87
+ function roomOf(row) {
88
+ return {
89
+ record: { ...JSON.parse(row.record), key: row.key },
90
+ indexed: row.indexed,
91
+ documents: row.documents,
92
+ };
93
+ }
81
94
  function json(value, fallback) {
82
95
  return value === undefined ? fallback : JSON.parse(value);
83
96
  }
84
- export function openRuntimeStore(fenced, authored) {
97
+ export function openRuntimeStore(authored) {
85
98
  const keys = new WeakMap();
86
99
  const read = async (key, type) => {
87
100
  const blob = await authored.ask({ kind: 'authored.file', key, type });
@@ -90,8 +103,6 @@ export function openRuntimeStore(fenced, authored) {
90
103
  };
91
104
  const restored = async (records) => Promise.all(records.map(async (record) => (await filed(JSON.parse(record), read))));
92
105
  const amend = async (locator, id, amendment) => {
93
- if (fenced(locator))
94
- return;
95
106
  await authored.ask({
96
107
  kind: 'authored.amend',
97
108
  locator,
@@ -100,52 +111,95 @@ export function openRuntimeStore(fenced, authored) {
100
111
  });
101
112
  };
102
113
  const fact = (name) => authored.ask({ kind: 'authored.fact', name });
103
- const queued = new Map();
104
114
  const changed = new Map();
105
115
  const change = (key) => changed.set(key, (changed.get(key) ?? 0) + 1);
106
- const rows = (writes) => writes.map((write) => authoredRows(write, queued.get(write.locator)));
107
- const noted = (writes) => {
108
- for (const { locator, queue } of writes) {
109
- if (queue !== undefined)
110
- queued.set(locator, new Set(queue.map(({ id }) => id)));
111
- }
112
- };
113
116
  return {
114
- async opened() {
115
- const held = await authored.ask({ kind: 'replica.open' });
116
- const unindexed = new Set(held.keys.flatMap(({ key, rederiving }) => (rederiving === null ? [] : [key])));
117
- const overlaid = new Map();
118
- for (const { key, path } of held.overlaid) {
119
- const paths = overlaid.get(key) ?? new Set();
120
- paths.add(path);
121
- overlaid.set(key, paths);
122
- }
117
+ opened() {
118
+ return authored.ask({ kind: 'replica.open' });
119
+ },
120
+ async rooms(locators) {
121
+ const held = await authored.ask({ kind: 'replica.rooms', locators: locators ?? null });
122
+ return held.map(roomOf);
123
+ },
124
+ async room(locator) {
125
+ const { room, queue } = await authored.ask({ kind: 'replica.room', locator });
126
+ return {
127
+ room: room === null ? null : { ...roomOf(room), overlaid: new Set(room.overlaid) },
128
+ queue: queue.map(({ batch, state }) => ({
129
+ batch: JSON.parse(batch),
130
+ state: JSON.parse(state),
131
+ })),
132
+ };
133
+ },
134
+ async covering() {
135
+ const { rooms, queues } = await authored.ask({ kind: 'replica.covering' });
136
+ return {
137
+ rooms: new Map(rooms.map(({ locator, ...room }) => [locator, room])),
138
+ queues: new Map(queues.map(({ locator, ids }) => [locator, ids])),
139
+ };
140
+ },
141
+ offline(locator) {
142
+ return authored.ask({ kind: 'replica.offline', locator });
143
+ },
144
+ async held() {
145
+ const { held, staged } = await authored.ask({ kind: 'replica.held' });
146
+ return { held: new Set(held), staged: new Set(staged) };
147
+ },
148
+ async status() {
149
+ const { queued, lastCompleted, changes, resets, returned } = await authored.ask({
150
+ kind: 'authored.status',
151
+ });
152
+ return {
153
+ queued,
154
+ lastCompleted: json(lastCompleted ?? undefined, null),
155
+ unsent: changes.map(({ locator, path }) => ({ room: locator, path })),
156
+ resets,
157
+ returned: returned.map((record) => JSON.parse(record)),
158
+ };
159
+ },
160
+ async batch(locator, id) {
161
+ const held = await authored.ask({ kind: 'authored.batch', locator, id });
162
+ return held === null ? null : JSON.parse(held);
163
+ },
164
+ order(locator) {
165
+ return authored.ask({ kind: 'authored.order', locator });
166
+ },
167
+ queued() {
168
+ return authored.ask({ kind: 'authored.queued' });
169
+ },
170
+ async moving() {
171
+ const { queues, pending } = await authored.ask({ kind: 'authored.moving' });
123
172
  return {
124
- rooms: new Map(held.rooms
125
- .filter(({ locator }) => !fenced(locator))
126
- .map(({ locator, key, record }) => [
173
+ queued: new Map(queues.map(({ locator, ids }) => [locator, ids])),
174
+ moving: pending.map(({ locator, batch, state }) => ({
127
175
  locator,
128
- { ...JSON.parse(record), key },
129
- ])),
130
- unindexed,
131
- overlaid,
132
- erasing: held.erasing.length > 0,
133
- orphans: held.orphans,
134
- lastCompleted: json(held.facts.lastCompleted, null),
135
- providerLimits: json(held.facts.providerLimits, []),
136
- capabilities: json(held.facts.capabilities, []),
137
- member: json(held.facts.member, null),
138
- targets: json(held.facts.targets, {}),
139
- presentation: held.presentation.map(({ app, value }) => ({
140
- app,
141
- value: JSON.parse(value),
176
+ batch: JSON.parse(batch),
177
+ state: JSON.parse(state),
142
178
  })),
143
- conversationList: json(held.facts.conversationList, null),
144
- conversationCursor: json(held.facts.conversationCursor, null),
145
179
  };
146
180
  },
147
- counts(rooms) {
148
- return authored.ask({ kind: 'replica.counts', rooms });
181
+ async pending(locator, id) {
182
+ const { state, room } = await authored.ask({ kind: 'authored.pending', locator, id });
183
+ return { state: state === null ? undefined : JSON.parse(state), room };
184
+ },
185
+ async facts() {
186
+ const held = await authored.ask({ kind: 'replica.facts' });
187
+ return {
188
+ lastCompleted: json(held.lastCompleted, null),
189
+ providerLimits: json(held.providerLimits, []),
190
+ capabilities: json(held.capabilities, []),
191
+ member: json(held.member, null),
192
+ targets: json(held.targets, {}),
193
+ conversationList: json(held.conversationList, null),
194
+ conversationCursor: json(held.conversationCursor, null),
195
+ };
196
+ },
197
+ async presentation(app) {
198
+ const held = await authored.ask({ kind: 'replica.presentation', app });
199
+ return held === null ? undefined : JSON.parse(held);
200
+ },
201
+ async demote() {
202
+ await authored.ask({ kind: 'replica.demote' });
149
203
  },
150
204
  query(plan, rooms, budget) {
151
205
  return authored.ask({ kind: 'replica.query', plan, rooms, budget });
@@ -162,18 +216,13 @@ export function openRuntimeStore(fenced, authored) {
162
216
  referrers(key, view, targets) {
163
217
  return authored.ask({ kind: 'replica.referrers', key, view, targets });
164
218
  },
165
- files(key, view, after, limit) {
166
- return authored.ask({ kind: 'replica.files', key, view, after, limit });
167
- },
168
219
  folders(key, view, paths) {
169
220
  return authored.ask({ kind: 'replica.folders', key, view, paths });
170
221
  },
171
222
  typedWithin(key, view, roots, within) {
172
223
  return authored.ask({ kind: 'replica.typedWithin', key, view, roots, within });
173
224
  },
174
- async stage(record, composition, page) {
175
- if (fenced(record.locator))
176
- return null;
225
+ stage(record, composition, page) {
177
226
  return authored.ask({
178
227
  kind: 'replica.stage',
179
228
  locator: record.locator,
@@ -182,6 +231,17 @@ export function openRuntimeStore(fenced, authored) {
182
231
  fingerprint: composedOf(composition).fingerprint,
183
232
  entries: page.entries,
184
233
  folders: page.folders,
234
+ part: page.part ?? null,
235
+ });
236
+ },
237
+ resume(record, composition, parts, published) {
238
+ return authored.ask({
239
+ kind: 'replica.resume',
240
+ locator: record.locator,
241
+ transfer: record.transfer,
242
+ fingerprint: composedOf(composition).fingerprint,
243
+ parts,
244
+ published,
185
245
  });
186
246
  },
187
247
  async refresh(key, composition, page) {
@@ -198,38 +258,29 @@ export function openRuntimeStore(fenced, authored) {
198
258
  async unrefresh(key) {
199
259
  await authored.ask({ kind: 'replica.unrefresh', key });
200
260
  },
201
- async commit({ rooms, writes = [], files = [], whole = false }) {
202
- const kept = whole ? writes : writes.filter(({ locator }) => !fenced(locator));
203
- const refused = whole ? kept.find(({ locator }) => fenced(locator)) : undefined;
204
- if (refused !== undefined) {
205
- return { fenced: refused.locator, counts: {}, changed: {}, indexed: {} };
206
- }
261
+ commit({ rooms, writes = [], files = [], whole = false }) {
207
262
  for (const room of rooms)
208
263
  change(room.key);
209
- const committed = await authored.ask({
264
+ return authored.ask({
210
265
  kind: 'replica.commit',
211
- ...(kept.length === 0 && files.length === 0
266
+ ...(writes.length === 0 && files.length === 0
212
267
  ? {}
213
- : { authored: { writes: rows(kept), files, whole } }),
214
- rooms: rooms.filter(({ locator }) => !fenced(locator)),
268
+ : { authored: { writes: writes.map(authoredRows), files, whole } }),
269
+ rooms,
215
270
  });
216
- if (committed.fenced === null || !whole)
217
- noted(kept);
218
- return committed;
219
271
  },
220
272
  async fence(locators) {
221
273
  await authored.ask({ kind: 'replica.fence', locators });
222
- for (const locator of locators)
223
- queued.delete(locator);
224
274
  },
225
275
  async erase(locator, limit) {
226
276
  return (await authored.ask({ kind: 'replica.erase', locator, limit })).remaining;
227
277
  },
228
278
  async abandon(locator) {
229
- if (fenced(locator))
230
- return;
231
279
  await authored.ask({ kind: 'replica.abandon', locator });
232
280
  },
281
+ async unfence(locators) {
282
+ return new Set(await authored.ask({ kind: 'replica.unfence', locators }));
283
+ },
233
284
  async release(key) {
234
285
  await authored.ask({ kind: 'replica.release', key });
235
286
  },
@@ -247,38 +298,19 @@ export function openRuntimeStore(fenced, authored) {
247
298
  async fact(name, value) {
248
299
  await authored.ask({ kind: 'replica.fact', name, value: JSON.stringify(value) });
249
300
  },
250
- async queues() {
251
- const { queues, pending } = await authored.ask({ kind: 'authored.queues' });
252
- queued.clear();
253
- for (const queue of queues)
254
- queued.set(queue.locator, new Set(queue.ids));
255
- const byId = new Map(pending.map((record) => [`${record.locator}\0${record.id}`, record]));
256
- return queues
257
- .filter((queue) => !fenced(queue.locator))
258
- .map((queue) => ({
259
- locator: queue.locator,
260
- pending: queue.ids.map((id) => {
261
- const record = byId.get(`${queue.locator}\0${id}`);
262
- if (record === undefined)
263
- throw new Error(`Missing Pending Change ${queue.locator}/${id}`);
264
- return {
265
- batch: JSON.parse(record.batch),
266
- state: JSON.parse(record.state),
267
- };
268
- }),
269
- }));
270
- },
271
301
  submit(locator, id, submission, lost) {
272
302
  return amend(locator, id, { submission, lost });
273
303
  },
274
304
  keepUpload(locator, id, upload) {
275
305
  return amend(locator, id, { upload });
276
306
  },
277
- async roomDrafts() {
278
- const held = await authored.ask({ kind: 'authored.roomDrafts' });
279
- return held
280
- .map((record) => JSON.parse(record))
281
- .filter((record) => !fenced(record.locator));
307
+ async roomDrafts(locator, paths) {
308
+ const held = await authored.ask({
309
+ kind: 'authored.roomDrafts',
310
+ locator: locator ?? null,
311
+ paths: paths ?? null,
312
+ });
313
+ return held.map((record) => JSON.parse(record));
282
314
  },
283
315
  async present(record) {
284
316
  await authored.ask({
@@ -287,8 +319,8 @@ export function openRuntimeStore(fenced, authored) {
287
319
  value: JSON.stringify(record.value ?? null),
288
320
  });
289
321
  },
290
- conversations() {
291
- return authored.ask({ kind: 'conversation.held' });
322
+ conversations(conversations) {
323
+ return authored.ask({ kind: 'conversation.held', conversations: conversations ?? null });
292
324
  },
293
325
  async keepMessages(write) {
294
326
  await authored.ask({ kind: 'conversation.keep', ...write });
@@ -302,6 +334,12 @@ export function openRuntimeStore(fenced, authored) {
302
334
  turnArrived(conversation, turn) {
303
335
  return authored.ask({ kind: 'conversation.turn', conversation, turn });
304
336
  },
337
+ conversationRows(conversations) {
338
+ return authored.ask({ kind: 'conversation.rows', conversations });
339
+ },
340
+ jobMarkers(conversation) {
341
+ return authored.ask({ kind: 'conversation.jobs', conversation });
342
+ },
305
343
  async dropConversations(conversations) {
306
344
  await authored.ask({ kind: 'conversation.drop', conversations });
307
345
  },
@@ -309,6 +347,10 @@ export function openRuntimeStore(fenced, authored) {
309
347
  const records = await authored.ask({ kind: 'authored.chatDrafts' });
310
348
  return records.map((record) => JSON.parse(record));
311
349
  },
350
+ async chatDraft(conversation) {
351
+ const record = await authored.ask({ kind: 'authored.chatDraft.read', conversation });
352
+ return record === null ? null : JSON.parse(record);
353
+ },
312
354
  async keepChatDrafts(records) {
313
355
  await authored.ask({
314
356
  kind: 'authored.chatDraft',
@@ -338,8 +380,6 @@ export function openRuntimeStore(fenced, authored) {
338
380
  await authored.ask({ kind: 'authored.call', operation, kept: null, files: [] });
339
381
  },
340
382
  async keepRoomDraft(record, files) {
341
- if (fenced(record.locator))
342
- return;
343
383
  const { path, ...kept } = roomDraftRow(record);
344
384
  await authored.ask({
345
385
  kind: 'authored.roomDraft',
@@ -350,8 +390,6 @@ export function openRuntimeStore(fenced, authored) {
350
390
  });
351
391
  },
352
392
  async discardRoomDraft(locator, path) {
353
- if (fenced(locator))
354
- return;
355
393
  await authored.ask({ kind: 'authored.roomDraft', locator, path, kept: null, files: [] });
356
394
  },
357
395
  fences() {