@agentshouse/mdruntime 0.1.0-c69ca0e865e0b → 0.1.0-c6fd2cbbff187
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.
- package/AGENTS.md +275 -275
- package/dist/acquisition.d.ts +14 -0
- package/dist/acquisition.d.ts.map +1 -0
- package/dist/acquisition.js +24 -0
- package/dist/adapter.d.ts +50 -9
- package/dist/adapter.d.ts.map +1 -1
- package/dist/bootstrap.d.ts +3 -2
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +26 -4
- package/dist/change-set.d.ts +2 -0
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +36 -10
- package/dist/chat/acts.d.ts +3 -4
- package/dist/chat/acts.d.ts.map +1 -1
- package/dist/chat/acts.js +10 -10
- package/dist/chat/earlier.d.ts +10 -0
- package/dist/chat/earlier.d.ts.map +1 -0
- package/dist/chat/earlier.js +54 -0
- package/dist/chat/kit.d.ts +2 -1
- package/dist/chat/kit.d.ts.map +1 -1
- package/dist/chat/kit.js +3 -3
- package/dist/chat/list.d.ts +2 -1
- package/dist/chat/list.d.ts.map +1 -1
- package/dist/chat/list.js +42 -5
- package/dist/chat/message.d.ts.map +1 -1
- package/dist/chat/message.js +2 -2
- package/dist/chat/messages.d.ts +1 -0
- package/dist/chat/messages.d.ts.map +1 -1
- package/dist/chat/messages.js +4 -0
- package/dist/chat/provider.d.ts +1 -1
- package/dist/chat/provider.d.ts.map +1 -1
- package/dist/chat/provider.js +59 -69
- package/dist/chat/question.d.ts +1 -1
- package/dist/chat/question.d.ts.map +1 -1
- package/dist/chat/question.js +7 -18
- package/dist/chat/ready.d.ts +1 -0
- package/dist/chat/ready.d.ts.map +1 -1
- package/dist/chat/ready.js +2 -2
- package/dist/chat/style.js +1 -1
- package/dist/client.d.ts +14 -8
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +17 -6
- package/dist/collection.d.ts +17 -3
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +230 -19
- package/dist/connection.d.ts +27 -8
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +1567 -362
- package/dist/conversation.d.ts +19 -7
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +438 -152
- package/dist/durability.d.ts +7 -1
- package/dist/durability.d.ts.map +1 -1
- package/dist/entry.d.ts +2 -2
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +3 -3
- package/dist/fence.d.ts +6 -0
- package/dist/fence.d.ts.map +1 -0
- package/dist/fence.js +10 -0
- package/dist/host.d.ts +17 -2
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +90 -9
- package/dist/identity.d.ts +2 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +6 -0
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/memory.d.ts +9 -2
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +36 -7
- package/dist/model.d.ts +4 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +10 -1
- package/dist/observation.d.ts +7 -2
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +29 -12
- package/dist/outcome.d.ts +12 -2
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +4 -0
- package/dist/overlay.d.ts +2 -0
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +58 -55
- package/dist/query.d.ts +56 -4
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +36 -7
- package/dist/reach.d.ts +6 -3
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +20 -5
- package/dist/react.d.ts +7 -4
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +6 -4
- package/dist/read-side.d.ts +13 -6
- package/dist/read-side.d.ts.map +1 -1
- package/dist/read-side.js +419 -92
- package/dist/readiness.d.ts +53 -0
- package/dist/readiness.d.ts.map +1 -0
- package/dist/readiness.js +33 -0
- package/dist/reads.d.ts +11 -0
- package/dist/reads.d.ts.map +1 -0
- package/dist/reads.js +98 -0
- package/dist/recovery.d.ts +25 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +197 -0
- package/dist/refresh.d.ts +4 -4
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +17 -10
- package/dist/replica.d.ts +6 -2
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +76 -23
- package/dist/room-draft.d.ts +13 -1
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +2 -2
- package/dist/rows.d.ts +6 -13
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +10 -13
- package/dist/save.d.ts +6 -0
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +53 -14
- package/dist/search.d.ts +49 -6
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +192 -47
- package/dist/seed.d.ts +16 -0
- package/dist/seed.d.ts.map +1 -0
- package/dist/seed.js +75 -0
- package/dist/shared.d.ts +11 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +368 -0
- package/dist/status.d.ts +4 -0
- package/dist/status.d.ts.map +1 -1
- package/dist/store.d.ts +56 -11
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +311 -84
- package/dist/turn.d.ts +7 -0
- package/dist/turn.d.ts.map +1 -0
- package/dist/turn.js +45 -0
- package/dist/windows.d.ts +19 -0
- package/dist/windows.d.ts.map +1 -0
- package/dist/windows.js +83 -0
- package/dist/wire.d.ts +144 -32
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +50 -31
- package/package.json +2 -2
package/dist/client.d.ts
CHANGED
|
@@ -3,17 +3,18 @@ import type { Member, ServiceMode } from './adapter.js';
|
|
|
3
3
|
import type { ChatDraft, ConversationAgent, ConversationEntry, ConversationOptions, ConversationView } from './conversation.js';
|
|
4
4
|
import { type Observation } from './observation.js';
|
|
5
5
|
import type { BinaryReference } from './binary.js';
|
|
6
|
-
import type { BinaryAnswer, CallResult, HistoryAnswer, QueueEntry } from './outcome.js';
|
|
7
|
-
import type { DocumentQuery, DocumentResult, GroupQuery, GroupResult } from './query.js';
|
|
6
|
+
import type { BinaryAnswer, BinaryLinkAnswer, CallResult, HistoryAnswer, Offline, QueueEntry } from './outcome.js';
|
|
7
|
+
import type { DocumentQuery, DocumentResult, GroupQuery, GroupResult, PendingResult } from './query.js';
|
|
8
8
|
import type { RoomDraft, RoomDraftParts, RoomDraftWrite } from './room-draft.js';
|
|
9
9
|
import type { SearchRequest, SearchResult } from './search.js';
|
|
10
|
+
import type { Readiness } from './readiness.js';
|
|
10
11
|
import type { SyncStatus } from './status.js';
|
|
11
12
|
import { type RuntimePort } from './wire.js';
|
|
12
13
|
export type MdRuntimeClient = {
|
|
13
14
|
rooms(): Promise<readonly AppRoom[]>;
|
|
14
15
|
query: {
|
|
15
|
-
(query: DocumentQuery): Promise<DocumentResult>;
|
|
16
|
-
(query: GroupQuery): Promise<GroupResult>;
|
|
16
|
+
(query: DocumentQuery): Promise<DocumentResult | PendingResult>;
|
|
17
|
+
(query: GroupQuery): Promise<GroupResult | PendingResult>;
|
|
17
18
|
};
|
|
18
19
|
search(request: SearchRequest): Promise<SearchResult>;
|
|
19
20
|
types(locator: string): Promise<RoomSchemas>;
|
|
@@ -27,12 +28,13 @@ export type MdRuntimeClient = {
|
|
|
27
28
|
presentation: {
|
|
28
29
|
read(): Promise<unknown>;
|
|
29
30
|
write(value: unknown): Promise<void>;
|
|
31
|
+
edit(members: Readonly<Record<string, unknown>>): Promise<void>;
|
|
30
32
|
};
|
|
31
33
|
conversation: {
|
|
32
34
|
list(): Promise<readonly ConversationEntry[]>;
|
|
33
35
|
read(conversation: string, options?: ConversationOptions): Promise<ConversationView>;
|
|
34
36
|
create(input: unknown): Promise<CallResult>;
|
|
35
|
-
send(conversation: string): Promise<CallResult>;
|
|
37
|
+
send(conversation: string, operation?: string, draft?: ChatDraft): Promise<CallResult | Offline>;
|
|
36
38
|
answer(conversation: string, answer: unknown): Promise<CallResult>;
|
|
37
39
|
interrupt(conversation: string): Promise<CallResult>;
|
|
38
40
|
kill(conversation: string): Promise<CallResult>;
|
|
@@ -46,22 +48,25 @@ export type MdRuntimeClient = {
|
|
|
46
48
|
history(locator: string, path: string, query?: HistoryQuery): Promise<HistoryAnswer>;
|
|
47
49
|
binaryFile: {
|
|
48
50
|
read(room: string, path: string, revision?: string): Promise<BinaryAnswer>;
|
|
51
|
+
link(room: string, path: string, revision?: string): Promise<BinaryLinkAnswer>;
|
|
49
52
|
readReference(reference: BinaryReference): Promise<BinaryAnswer>;
|
|
50
53
|
};
|
|
51
54
|
call(name: string, input: unknown): Promise<CallResult>;
|
|
52
55
|
reached(locator: string, roomVersion: string, path?: string): Promise<boolean>;
|
|
53
56
|
log(): Promise<string>;
|
|
54
57
|
persistence(): Promise<boolean>;
|
|
58
|
+
retry(): Promise<void>;
|
|
55
59
|
observe: {
|
|
56
60
|
(topic: 'deployment-facts'): Promise<Observation<unknown>>;
|
|
57
61
|
(topic: 'rooms'): Promise<Observation<readonly AppRoom[]>>;
|
|
62
|
+
(topic: 'readiness'): Promise<Observation<Readiness>>;
|
|
58
63
|
(topic: 'connection-refusal'): Promise<Observation<ConnectionRefusal | null>>;
|
|
59
64
|
(topic: 'storage-loss'): Promise<Observation<string | null>>;
|
|
60
65
|
(topic: 'sync-status'): Promise<Observation<SyncStatus>>;
|
|
61
66
|
(topic: 'service-mode'): Promise<Observation<ServiceMode>>;
|
|
62
67
|
(topic: 'member'): Promise<Observation<Member | null>>;
|
|
63
|
-
(topic: 'query', query: DocumentQuery): Promise<Observation<DocumentResult>>;
|
|
64
|
-
(topic: 'query', query: GroupQuery): Promise<Observation<GroupResult>>;
|
|
68
|
+
(topic: 'query', query: DocumentQuery): Promise<Observation<DocumentResult | PendingResult>>;
|
|
69
|
+
(topic: 'query', query: GroupQuery): Promise<Observation<GroupResult | PendingResult>>;
|
|
65
70
|
(topic: 'queue', locator: string): Promise<Observation<readonly QueueEntry[]>>;
|
|
66
71
|
(topic: 'room-drafts'): Promise<Observation<readonly RoomDraft[]>>;
|
|
67
72
|
(topic: 'presentation'): Promise<Observation<unknown>>;
|
|
@@ -75,5 +80,6 @@ export type MdRuntimeClient = {
|
|
|
75
80
|
export declare function connectMdRuntime(port: RuntimePort): MdRuntimeClient;
|
|
76
81
|
export declare function inTurn(client: MdRuntimeClient, work: () => Promise<void>): Promise<void>;
|
|
77
82
|
export type { Observation } from './observation.js';
|
|
78
|
-
export type {
|
|
83
|
+
export type { Open } from './open.js';
|
|
84
|
+
export { unanswered, type RuntimePort, type WireMember } from './wire.js';
|
|
79
85
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,cAAc,EACd,UAAU,EACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAY,KAAK,WAAW,EAAiB,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,cAAc,EACd,UAAU,EACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EACV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
3
|
import { answer, AUTHORIZATION_ENDED, PORT_CLOSED, } from './wire.js';
|
|
4
|
+
// React renders an arrived value in a later task and opens what that render observes as it commits, so this many frames opening nothing mean the page drew what it observes.
|
|
5
|
+
const SETTLED_FRAMES = 2;
|
|
4
6
|
function refused(refusal) {
|
|
5
7
|
return runtimeError(refusal.code, refusal.code, refusal.retryable);
|
|
6
8
|
}
|
|
@@ -141,14 +143,19 @@ export function connectMdRuntime(port) {
|
|
|
141
143
|
if (opening.size > 0)
|
|
142
144
|
return;
|
|
143
145
|
const at = moved;
|
|
144
|
-
|
|
146
|
+
const waited = (frames) => {
|
|
145
147
|
requestAnimationFrame(() => {
|
|
148
|
+
if (frames < SETTLED_FRAMES) {
|
|
149
|
+
waited(frames + 1);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
146
152
|
if (moved !== at || opening.size > 0)
|
|
147
153
|
return;
|
|
148
154
|
drawing = null;
|
|
149
155
|
resolve();
|
|
150
156
|
});
|
|
151
|
-
}
|
|
157
|
+
};
|
|
158
|
+
waited(1);
|
|
152
159
|
};
|
|
153
160
|
drawing = check;
|
|
154
161
|
check();
|
|
@@ -170,12 +177,13 @@ export function connectMdRuntime(port) {
|
|
|
170
177
|
presentation: {
|
|
171
178
|
read: () => ask('presentation.read', []),
|
|
172
179
|
write: (value) => ask('presentation.write', [value]),
|
|
180
|
+
edit: (members) => ask('presentation.edit', [members]),
|
|
173
181
|
},
|
|
174
182
|
conversation: {
|
|
175
183
|
list: () => ask('conversation.list', []),
|
|
176
184
|
read: (conversation, options) => ask('conversation.read', [conversation, options]),
|
|
177
185
|
create: (input) => ask('conversation.create', [input]),
|
|
178
|
-
send: (conversation) => ask('conversation.send', [conversation]),
|
|
186
|
+
send: (conversation, operation, draft) => ask('conversation.send', [conversation, operation, draft]),
|
|
179
187
|
answer: (conversation, answer) => ask('conversation.answer', [conversation, answer]),
|
|
180
188
|
interrupt: (conversation) => ask('conversation.interrupt', [conversation]),
|
|
181
189
|
kill: (conversation) => ask('conversation.kill', [conversation]),
|
|
@@ -189,12 +197,14 @@ export function connectMdRuntime(port) {
|
|
|
189
197
|
history: (locator, path, query) => ask('history', [locator, path, query]),
|
|
190
198
|
binaryFile: {
|
|
191
199
|
read: (room, path, revision) => ask('binaryFile.read', [room, path, revision]),
|
|
200
|
+
link: (room, path, revision) => ask('binaryFile.link', [room, path, revision]),
|
|
192
201
|
readReference: (reference) => ask('binaryFile.readReference', [reference]),
|
|
193
202
|
},
|
|
194
203
|
call: (name, input) => ask('call', [name, input]),
|
|
195
204
|
reached: (locator, roomVersion, path) => ask('reached', [locator, roomVersion, path]),
|
|
196
205
|
log: () => ask('log', []),
|
|
197
206
|
persistence: () => ask('persistence', []),
|
|
207
|
+
retry: () => ask('retry', []),
|
|
198
208
|
observe: ((topic, ...input) => watch(topic, input)),
|
|
199
209
|
reauthorize: () => ask('reauthorize', []),
|
|
200
210
|
settled,
|
|
@@ -202,7 +212,8 @@ export function connectMdRuntime(port) {
|
|
|
202
212
|
}
|
|
203
213
|
const turns = new WeakMap();
|
|
204
214
|
export function inTurn(client, work) {
|
|
205
|
-
const
|
|
206
|
-
turns.set(client,
|
|
207
|
-
return
|
|
215
|
+
const turn = (turns.get(client) ?? Promise.resolve()).then(work);
|
|
216
|
+
turns.set(client, turn.then(() => undefined, () => undefined));
|
|
217
|
+
return turn;
|
|
208
218
|
}
|
|
219
|
+
export { unanswered } from './wire.js';
|
package/dist/collection.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { type Document, type Validation } from '@agentshouse/mdmodel';
|
|
2
|
-
import type
|
|
1
|
+
import { type Document, type Frontmatter, type Validation } from '@agentshouse/mdmodel';
|
|
2
|
+
import { type ModelState } from './model.js';
|
|
3
3
|
import type { MdModelIdentity } from './adapter.js';
|
|
4
|
+
import { type Paths } from './shared.js';
|
|
4
5
|
import type { Refused } from './transfer.js';
|
|
6
|
+
import { type Later } from './turn.js';
|
|
5
7
|
export declare const MD_MODEL: MdModelIdentity;
|
|
6
8
|
export type Collection = {
|
|
7
9
|
text: Readonly<Record<string, string>>;
|
|
@@ -17,9 +19,21 @@ export type Composition = {
|
|
|
17
19
|
};
|
|
18
20
|
export declare function governing(composition: Composition, path: string): ModelState;
|
|
19
21
|
export declare function collectionOf(text: Readonly<Record<string, string>>, composition: Composition, previous?: Collection): Collection;
|
|
20
|
-
export declare function
|
|
22
|
+
export declare function passingFrontmatter(collection: Collection, path: string): Frontmatter | undefined;
|
|
21
23
|
export declare function documentsOf(collection: Collection): Generator<readonly [string, Document]>;
|
|
22
24
|
export declare function unreadable(text: Readonly<Record<string, string>>, previous?: Readonly<Record<string, string>>): Refused | null;
|
|
23
25
|
export declare function validRoot(root: unknown): root is string;
|
|
24
26
|
export declare function validateCollection(text: Readonly<Record<string, string>>, binaryTargets: readonly string[], composition: Composition): Validation;
|
|
27
|
+
type Held = {
|
|
28
|
+
text: Paths<string>;
|
|
29
|
+
binaries: Paths<unknown>;
|
|
30
|
+
};
|
|
31
|
+
export declare function indexReferrers(held: Held, composition: Composition): Later<void>;
|
|
32
|
+
export declare function referencesIndexed(held: Held, composition: Composition): boolean;
|
|
33
|
+
export declare function referring(held: Held, composition: Composition, targets: Iterable<string>): ReadonlySet<string> | null;
|
|
34
|
+
export declare function available(composition: Composition): boolean;
|
|
35
|
+
export declare function changedCleanly(next: Held, previous: Held & {
|
|
36
|
+
composition: Composition;
|
|
37
|
+
}, composition: Composition): boolean;
|
|
38
|
+
export {};
|
|
25
39
|
//# sourceMappingURL=collection.d.ts.map
|
package/dist/collection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../src/collection.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../src/collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,QAAQ,EAEb,KAAK,WAAW,EAChB,KAAK,UAAU,EA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ION, } from '@agentshouse/mdmodel';
|
|
1
|
+
import { checkDocument, parseFrontmatter, references, sectionReferences, target, parse, resolves, validate, VERSION, } from '@agentshouse/mdmodel';
|
|
2
2
|
import { beneath, normalize } from './paths.js';
|
|
3
|
+
import { sameTyping } from './model.js';
|
|
4
|
+
import { differing, patched, shared } from './shared.js';
|
|
5
|
+
import { inUnits, ROW_WEIGHT } from './turn.js';
|
|
3
6
|
export const MD_MODEL = { identity: '@agentshouse/mdmodel', version: VERSION };
|
|
4
7
|
const NO_TYPES = { types: {} };
|
|
5
8
|
function selected(composition, path) {
|
|
@@ -12,46 +15,59 @@ export function governing(composition, path) {
|
|
|
12
15
|
: composition.model;
|
|
13
16
|
}
|
|
14
17
|
const parsedIn = new WeakMap();
|
|
18
|
+
function carried(previous, text) {
|
|
19
|
+
const held = parsedIn.get(previous);
|
|
20
|
+
if (held === undefined)
|
|
21
|
+
return shared({});
|
|
22
|
+
const kept = patched(held.base, held.added);
|
|
23
|
+
held.base = kept;
|
|
24
|
+
held.added = new Map();
|
|
25
|
+
return patched(kept, [], differing(previous.text, text));
|
|
26
|
+
}
|
|
27
|
+
function cachedIn(collection, path) {
|
|
28
|
+
const held = parsedIn.get(collection);
|
|
29
|
+
if (held === undefined)
|
|
30
|
+
return undefined;
|
|
31
|
+
if (held.added.has(path))
|
|
32
|
+
return held.added.get(path);
|
|
33
|
+
return Object.hasOwn(held.base, path) ? held.base[path] : undefined;
|
|
34
|
+
}
|
|
15
35
|
export function collectionOf(text, composition, previous) {
|
|
16
|
-
const parsed =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
parsed.set(path, held);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
36
|
+
const parsed = {
|
|
37
|
+
base: previous === undefined ? shared({}) : carried(previous, text),
|
|
38
|
+
added: new Map(),
|
|
39
|
+
};
|
|
23
40
|
const collection = {
|
|
24
41
|
text,
|
|
25
42
|
composition,
|
|
26
43
|
document(path) {
|
|
27
|
-
const held =
|
|
44
|
+
const held = cachedIn(collection, path);
|
|
28
45
|
if (held !== undefined)
|
|
29
46
|
return held ?? undefined;
|
|
30
47
|
const content = text[path];
|
|
31
48
|
if (content === undefined)
|
|
32
49
|
return undefined;
|
|
33
50
|
const read = parse(content, path);
|
|
34
|
-
parsed.set(path, read.ok ? read.document : null);
|
|
51
|
+
parsed.added.set(path, read.ok ? read.document : null);
|
|
35
52
|
return read.ok ? read.document : undefined;
|
|
36
53
|
},
|
|
37
54
|
};
|
|
38
55
|
parsedIn.set(collection, parsed);
|
|
39
56
|
return collection;
|
|
40
57
|
}
|
|
41
|
-
export function
|
|
42
|
-
const held =
|
|
58
|
+
export function passingFrontmatter(collection, path) {
|
|
59
|
+
const held = cachedIn(collection, path);
|
|
43
60
|
if (held !== undefined)
|
|
44
61
|
return held ?? undefined;
|
|
45
62
|
const content = collection.text[path];
|
|
46
63
|
if (content === undefined)
|
|
47
64
|
return undefined;
|
|
48
|
-
const read =
|
|
49
|
-
return read.ok ? read.
|
|
65
|
+
const read = parseFrontmatter(content, path);
|
|
66
|
+
return read.ok ? read.frontmatter : undefined;
|
|
50
67
|
}
|
|
51
68
|
export function* documentsOf(collection) {
|
|
52
|
-
const parsed = parsedIn.get(collection);
|
|
53
69
|
for (const path of Object.keys(collection.text).sort()) {
|
|
54
|
-
const held =
|
|
70
|
+
const held = cachedIn(collection, path);
|
|
55
71
|
if (held === null)
|
|
56
72
|
continue;
|
|
57
73
|
if (held !== undefined) {
|
|
@@ -64,9 +80,10 @@ export function* documentsOf(collection) {
|
|
|
64
80
|
}
|
|
65
81
|
}
|
|
66
82
|
export function unreadable(text, previous) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
83
|
+
const paths = previous === undefined
|
|
84
|
+
? Object.keys(text)
|
|
85
|
+
: [...differing(previous, text)].filter((path) => text[path] !== undefined);
|
|
86
|
+
for (const path of paths.sort()) {
|
|
70
87
|
const read = parse(text[path], path);
|
|
71
88
|
if (!read.ok)
|
|
72
89
|
return { kind: 'refused', refusal: read.refusal };
|
|
@@ -107,3 +124,197 @@ export function validateCollection(text, binaryTargets, composition) {
|
|
|
107
124
|
return verdicts[0];
|
|
108
125
|
return refusals.find((refusal) => refusal.rule !== 'model-unavailable') ?? refusals[0];
|
|
109
126
|
}
|
|
127
|
+
const referrersOf = new WeakMap();
|
|
128
|
+
function typing(left, right) {
|
|
129
|
+
return (sameTyping(left.model, right.model) &&
|
|
130
|
+
(left.selection === null || right.selection === null
|
|
131
|
+
? left.selection === right.selection
|
|
132
|
+
: sameTyping(left.selection.model, right.selection.model)) &&
|
|
133
|
+
JSON.stringify(left.selection?.roots ?? null) === JSON.stringify(right.selection?.roots ?? null));
|
|
134
|
+
}
|
|
135
|
+
function declared(content) {
|
|
136
|
+
if (content === undefined)
|
|
137
|
+
return undefined;
|
|
138
|
+
const read = parseFrontmatter(content);
|
|
139
|
+
return read.ok ? (read.frontmatter.type ?? 'any') : undefined;
|
|
140
|
+
}
|
|
141
|
+
function typedIn(content) {
|
|
142
|
+
const type = declared(content);
|
|
143
|
+
return type !== undefined && type !== 'any';
|
|
144
|
+
}
|
|
145
|
+
function modelOf(composition, path) {
|
|
146
|
+
const model = governing(composition, path);
|
|
147
|
+
return model.status === 'unavailable' ? null : { types: model.types };
|
|
148
|
+
}
|
|
149
|
+
function checked(path, content, composition) {
|
|
150
|
+
return checkDocument(path, content, modelOf(composition, path) ?? NO_TYPES);
|
|
151
|
+
}
|
|
152
|
+
function targetsOf(check) {
|
|
153
|
+
if (!check.ok)
|
|
154
|
+
return [];
|
|
155
|
+
return [...new Set(check.references.flatMap(({ target }) => (target === null ? [] : [target])))];
|
|
156
|
+
}
|
|
157
|
+
function referencedBy(path, content, composition) {
|
|
158
|
+
const model = modelOf(composition, path);
|
|
159
|
+
if (model === null)
|
|
160
|
+
return [];
|
|
161
|
+
const read = parseFrontmatter(content, path);
|
|
162
|
+
const type = read.ok ? read.frontmatter.type : undefined;
|
|
163
|
+
if (!read.ok || type === undefined || !Object.hasOwn(model.types, type))
|
|
164
|
+
return [];
|
|
165
|
+
const definition = model.types[type];
|
|
166
|
+
return [
|
|
167
|
+
...new Set([
|
|
168
|
+
...references(read.frontmatter, definition).flatMap(({ value }) => {
|
|
169
|
+
const found = target(path, value);
|
|
170
|
+
return found === null ? [] : [found];
|
|
171
|
+
}),
|
|
172
|
+
...sectionReferences(path, content, definition).flatMap(({ target }) => target === null ? [] : [target]),
|
|
173
|
+
]),
|
|
174
|
+
];
|
|
175
|
+
}
|
|
176
|
+
function reindexed(index, changed) {
|
|
177
|
+
const referrers = new Map();
|
|
178
|
+
const touch = (target) => {
|
|
179
|
+
let held = referrers.get(target);
|
|
180
|
+
if (held === undefined) {
|
|
181
|
+
held = new Set(Object.hasOwn(index.referrers, target) ? index.referrers[target] : []);
|
|
182
|
+
referrers.set(target, held);
|
|
183
|
+
}
|
|
184
|
+
return held;
|
|
185
|
+
};
|
|
186
|
+
for (const [path, found] of changed) {
|
|
187
|
+
const before = Object.hasOwn(index.targets, path) ? index.targets[path] : [];
|
|
188
|
+
for (const target of before)
|
|
189
|
+
touch(target).delete(path);
|
|
190
|
+
for (const target of found)
|
|
191
|
+
touch(target).add(path);
|
|
192
|
+
}
|
|
193
|
+
const emptied = [...referrers].filter(([, held]) => held.size === 0).map(([target]) => target);
|
|
194
|
+
return {
|
|
195
|
+
composition: index.composition,
|
|
196
|
+
targets: patched(index.targets, [...changed].filter(([, found]) => found.length > 0), [...changed].filter(([, found]) => found.length === 0).map(([path]) => path)),
|
|
197
|
+
referrers: patched(index.referrers, [...referrers]
|
|
198
|
+
.filter(([, held]) => held.size > 0)
|
|
199
|
+
.map(([target, held]) => [target, [...held]]), emptied),
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function heldIndex(held, composition) {
|
|
203
|
+
const index = referrersOf.get(held.text);
|
|
204
|
+
return index !== undefined && typing(index.composition, composition) ? index : null;
|
|
205
|
+
}
|
|
206
|
+
const indexing = new WeakMap();
|
|
207
|
+
export function indexReferrers(held, composition) {
|
|
208
|
+
if (heldIndex(held, composition) !== null)
|
|
209
|
+
return;
|
|
210
|
+
const running = indexing.get(held.text);
|
|
211
|
+
if (running !== undefined)
|
|
212
|
+
return running;
|
|
213
|
+
const targets = new Map();
|
|
214
|
+
const referrers = new Map();
|
|
215
|
+
const filled = inUnits(Object.keys(held.text), (path) => {
|
|
216
|
+
const content = held.text[path];
|
|
217
|
+
const found = referencedBy(path, content, composition);
|
|
218
|
+
if (found.length > 0)
|
|
219
|
+
targets.set(path, found);
|
|
220
|
+
for (const target of found)
|
|
221
|
+
referrers.set(target, [...(referrers.get(target) ?? []), path]);
|
|
222
|
+
return ROW_WEIGHT + content.length;
|
|
223
|
+
});
|
|
224
|
+
const indexed = () => {
|
|
225
|
+
referrersOf.set(held.text, {
|
|
226
|
+
composition,
|
|
227
|
+
targets: patched(shared({}), targets),
|
|
228
|
+
referrers: patched(shared({}), referrers),
|
|
229
|
+
});
|
|
230
|
+
};
|
|
231
|
+
if (!(filled instanceof Promise))
|
|
232
|
+
return indexed();
|
|
233
|
+
const building = filled.then(indexed).finally(() => indexing.delete(held.text));
|
|
234
|
+
indexing.set(held.text, building);
|
|
235
|
+
return building;
|
|
236
|
+
}
|
|
237
|
+
export function referencesIndexed(held, composition) {
|
|
238
|
+
return heldIndex(held, composition) !== null;
|
|
239
|
+
}
|
|
240
|
+
export function referring(held, composition, targets) {
|
|
241
|
+
const index = heldIndex(held, composition);
|
|
242
|
+
if (index === null)
|
|
243
|
+
return null;
|
|
244
|
+
const found = new Set();
|
|
245
|
+
for (const target of targets) {
|
|
246
|
+
if (!Object.hasOwn(index.referrers, target))
|
|
247
|
+
continue;
|
|
248
|
+
for (const file of index.referrers[target])
|
|
249
|
+
found.add(file);
|
|
250
|
+
}
|
|
251
|
+
return found;
|
|
252
|
+
}
|
|
253
|
+
export function available(composition) {
|
|
254
|
+
return (composition.model.status !== 'unavailable' &&
|
|
255
|
+
(composition.selection === null || composition.selection.model.status !== 'unavailable'));
|
|
256
|
+
}
|
|
257
|
+
export function changedCleanly(next, previous, composition) {
|
|
258
|
+
if (!typing(previous.composition, composition))
|
|
259
|
+
return false;
|
|
260
|
+
const paths = new Set([
|
|
261
|
+
...differing(previous.text, next.text),
|
|
262
|
+
...differing(previous.binaries, next.binaries, () => true),
|
|
263
|
+
]);
|
|
264
|
+
const binary = (path) => Object.hasOwn(next.binaries, path);
|
|
265
|
+
const within = (file) => (path) => selected(composition, path) === selected(composition, file);
|
|
266
|
+
const reaching = (file, check) => {
|
|
267
|
+
if (!check.ok)
|
|
268
|
+
return false;
|
|
269
|
+
const part = within(file);
|
|
270
|
+
return check.references.every((reference) => resolves(reference, (path) => (part(path) ? declared(next.text[path]) : undefined), (path) => part(path) && binary(path)));
|
|
271
|
+
};
|
|
272
|
+
const changedTargets = new Map();
|
|
273
|
+
const shifted = [];
|
|
274
|
+
for (const path of paths) {
|
|
275
|
+
const now = next.text[path];
|
|
276
|
+
const was = previous.text[path];
|
|
277
|
+
const modeled = modelOf(composition, path) !== null;
|
|
278
|
+
if ((now === undefined) !== (was === undefined) ||
|
|
279
|
+
declared(now) !== declared(was) ||
|
|
280
|
+
binary(path) !== Object.hasOwn(previous.binaries, path)) {
|
|
281
|
+
shifted.push(path);
|
|
282
|
+
}
|
|
283
|
+
if (!modeled && typedIn(was) && !typedIn(now))
|
|
284
|
+
return false;
|
|
285
|
+
if (now === undefined) {
|
|
286
|
+
if (modeled)
|
|
287
|
+
changedTargets.set(path, []);
|
|
288
|
+
continue;
|
|
289
|
+
}
|
|
290
|
+
if (binary(path))
|
|
291
|
+
return false;
|
|
292
|
+
if (!modeled) {
|
|
293
|
+
if (declared(now) === undefined)
|
|
294
|
+
return false;
|
|
295
|
+
if (!typedIn(now) && !checked(path, now, composition).ok)
|
|
296
|
+
return false;
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
const check = checked(path, now, composition);
|
|
300
|
+
if (!reaching(path, check))
|
|
301
|
+
return false;
|
|
302
|
+
changedTargets.set(path, targetsOf(check));
|
|
303
|
+
}
|
|
304
|
+
const index = heldIndex(previous, composition);
|
|
305
|
+
if (index === null && shifted.length > 0)
|
|
306
|
+
return false;
|
|
307
|
+
for (const target of shifted) {
|
|
308
|
+
const files = index !== null && Object.hasOwn(index.referrers, target) ? index.referrers[target] : [];
|
|
309
|
+
for (const file of files) {
|
|
310
|
+
if (paths.has(file))
|
|
311
|
+
continue;
|
|
312
|
+
if (!reaching(file, checked(file, next.text[file], composition)))
|
|
313
|
+
return false;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (index !== null) {
|
|
317
|
+
referrersOf.set(next.text, changedTargets.size === 0 ? index : reindexed(index, changedTargets));
|
|
318
|
+
}
|
|
319
|
+
return true;
|
|
320
|
+
}
|
package/dist/connection.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { type TypesResult } from './model.js';
|
|
2
2
|
import { type Observation } from './observation.js';
|
|
3
|
-
import { type DocumentQuery, type DocumentResult, type GroupQuery, type GroupResult } from './query.js';
|
|
3
|
+
import { type DocumentQuery, type DocumentResult, type GroupQuery, type GroupResult, type PendingResult } from './query.js';
|
|
4
|
+
import { type EntrySeed } from './seed.js';
|
|
4
5
|
import { type SearchRequest, type SearchResult } from './search.js';
|
|
5
6
|
import { type Adapter, type Authorization, type Member, type ProviderRefusal, type ServiceMode } from './adapter.js';
|
|
6
7
|
import { type ChatDraftSurface, type ConversationAgent, type ConversationEntry, type ConversationOptions, type ConversationSurface, type ConversationView } from './conversation.js';
|
|
7
8
|
import { type WrittenBy } from './change.js';
|
|
8
9
|
import type { Open } from './open.js';
|
|
9
10
|
import { type BinaryReference } from './binary.js';
|
|
10
|
-
import { type BinaryAnswer, type CallResult, type HistoryAnswer, type QueueEntry } from './outcome.js';
|
|
11
|
+
import { type BinaryAnswer, type BinaryLinkAnswer, type CallResult, type HistoryAnswer, type QueueEntry } from './outcome.js';
|
|
12
|
+
import { type Recovery } from './recovery.js';
|
|
11
13
|
import { type SaveRefusal } from './save.js';
|
|
12
14
|
import { type RoomDraft, type RoomDraftWrite } from './room-draft.js';
|
|
13
15
|
import { type SyncStatus } from './status.js';
|
|
14
16
|
import { type RuntimeShell } from './durability.js';
|
|
17
|
+
import { type RuntimeDemand } from './acquisition.js';
|
|
18
|
+
import { type CapacityCause, type CodeAvailability, type Persistence, type Readiness, type SearchObligation } from './readiness.js';
|
|
15
19
|
import { type NarrowedView, type PortReach, type RuntimeView } from './reach.js';
|
|
16
20
|
export type AppTypedSelection = {
|
|
17
21
|
roots: readonly string[];
|
|
@@ -48,6 +52,7 @@ export type MdRuntimeOptions = {
|
|
|
48
52
|
shell: RuntimeShell;
|
|
49
53
|
authorization?: Authorization;
|
|
50
54
|
signal?: AbortSignal;
|
|
55
|
+
recovery?: Recovery;
|
|
51
56
|
};
|
|
52
57
|
export type SaveResult = {
|
|
53
58
|
outcome: 'saved';
|
|
@@ -68,9 +73,11 @@ export type RoomDraftSurface = {
|
|
|
68
73
|
export type PresentationSurface = {
|
|
69
74
|
read(app: string): Promise<unknown>;
|
|
70
75
|
write(app: string, value: unknown): Promise<void>;
|
|
76
|
+
edit(app: string, members: Readonly<Record<string, unknown>>): Promise<void>;
|
|
71
77
|
};
|
|
72
78
|
export type BinaryFileSurface = {
|
|
73
79
|
read(room: string, path: string, revision?: string): Promise<BinaryAnswer>;
|
|
80
|
+
link(room: string, path: string, revision?: string): Promise<BinaryLinkAnswer>;
|
|
74
81
|
readReference(reference: BinaryReference): Promise<BinaryAnswer>;
|
|
75
82
|
};
|
|
76
83
|
export type HistoryQuery = {
|
|
@@ -81,8 +88,8 @@ export type MdRuntime = {
|
|
|
81
88
|
loaded(): Promise<void>;
|
|
82
89
|
rooms(): readonly AppRoom[];
|
|
83
90
|
query: {
|
|
84
|
-
(query: DocumentQuery): Promise<DocumentResult>;
|
|
85
|
-
(query: GroupQuery): Promise<GroupResult>;
|
|
91
|
+
(query: DocumentQuery): Promise<DocumentResult | PendingResult>;
|
|
92
|
+
(query: GroupQuery): Promise<GroupResult | PendingResult>;
|
|
86
93
|
};
|
|
87
94
|
search(request: SearchRequest): Promise<SearchResult>;
|
|
88
95
|
types(locator: string): RoomSchemas;
|
|
@@ -97,15 +104,17 @@ export type MdRuntime = {
|
|
|
97
104
|
reached(locator: string, roomVersion: string, path?: string): boolean;
|
|
98
105
|
log(): string;
|
|
99
106
|
persistence(): boolean;
|
|
107
|
+
retry(): Promise<void>;
|
|
100
108
|
observe: {
|
|
101
109
|
(topic: 'rooms'): Promise<Observation<readonly AppRoom[]>>;
|
|
110
|
+
(topic: 'readiness'): Promise<Observation<Readiness>>;
|
|
102
111
|
(topic: 'connection-refusal'): Promise<Observation<ConnectionRefusal | null>>;
|
|
103
112
|
(topic: 'storage-loss'): Promise<Observation<string | null>>;
|
|
104
113
|
(topic: 'sync-status'): Promise<Observation<SyncStatus>>;
|
|
105
114
|
(topic: 'service-mode'): Promise<Observation<ServiceMode>>;
|
|
106
115
|
(topic: 'member'): Promise<Observation<Member | null>>;
|
|
107
|
-
(topic: 'query', query: DocumentQuery): Promise<Observation<DocumentResult>>;
|
|
108
|
-
(topic: 'query', query: GroupQuery): Promise<Observation<GroupResult>>;
|
|
116
|
+
(topic: 'query', query: DocumentQuery): Promise<Observation<DocumentResult | PendingResult>>;
|
|
117
|
+
(topic: 'query', query: GroupQuery): Promise<Observation<GroupResult | PendingResult>>;
|
|
109
118
|
(topic: 'queue', locator: string): Promise<Observation<readonly QueueEntry[]>>;
|
|
110
119
|
(topic: 'room-drafts'): Promise<Observation<readonly RoomDraft[]>>;
|
|
111
120
|
(topic: 'presentation', app: string): Promise<Observation<unknown>>;
|
|
@@ -115,10 +124,20 @@ export type MdRuntime = {
|
|
|
115
124
|
};
|
|
116
125
|
reauthorize(): Promise<void>;
|
|
117
126
|
};
|
|
118
|
-
export type RuntimeTopic = 'rooms' | 'connection-refusal' | 'storage-loss' | 'sync-status' | 'service-mode' | 'member' | 'query' | 'queue' | 'room-drafts' | 'presentation' | 'conversation' | 'conversations' | 'agents';
|
|
127
|
+
export type RuntimeTopic = 'rooms' | 'readiness' | 'connection-refusal' | 'storage-loss' | 'sync-status' | 'service-mode' | 'member' | 'query' | 'queue' | 'room-drafts' | 'presentation' | 'conversation' | 'conversations' | 'agents';
|
|
128
|
+
export type ReadinessPort = {
|
|
129
|
+
readonly target: string;
|
|
130
|
+
readonly code: CodeAvailability;
|
|
131
|
+
readonly capacity: CapacityCause | null;
|
|
132
|
+
readonly search: SearchObligation;
|
|
133
|
+
};
|
|
119
134
|
export type ComposedRuntime = RuntimeView & {
|
|
135
|
+
seed(entry: EntrySeed): void;
|
|
120
136
|
stop(): Promise<void>;
|
|
121
|
-
|
|
137
|
+
lose(locators: readonly string[]): Promise<void>;
|
|
138
|
+
acquire(demand: RuntimeDemand): void;
|
|
139
|
+
persisted(answer: Persistence): void;
|
|
140
|
+
within(reach: PortReach | null, port: ReadinessPort): NarrowedView;
|
|
122
141
|
};
|
|
123
142
|
export declare function composeRuntime(options: MdRuntimeOptions): ComposedRuntime;
|
|
124
143
|
export {};
|
package/dist/connection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAoB,KAAK,WAAW,EAAqB,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAML,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,WAAW,EAEhB,KAAK,aAAa,EAInB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAgB,KAAK,SAAS,EAAe,MAAM,WA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