@agentshouse/mdruntime 0.1.0-c3903a68dcbbf → 0.1.0-c56daf494ecb4
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 +184 -92
- package/README.md +22 -12
- package/dist/adapter.d.ts +125 -63
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js +1 -9
- package/dist/attached-model.d.ts +11 -0
- package/dist/attached-model.d.ts.map +1 -0
- package/dist/attached-model.js +47 -0
- package/dist/attempt.d.ts +16 -0
- package/dist/attempt.d.ts.map +1 -0
- package/dist/attempt.js +70 -0
- package/dist/binary.d.ts +23 -0
- package/dist/binary.d.ts.map +1 -0
- package/dist/binary.js +8 -0
- package/dist/bootstrap.d.ts +20 -6
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +93 -39
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +20 -17
- package/dist/change.d.ts +15 -0
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +26 -1
- package/dist/chat/acts.d.ts +34 -0
- package/dist/chat/acts.d.ts.map +1 -0
- package/dist/chat/acts.js +36 -0
- package/dist/chat/context.d.ts +3 -0
- package/dist/chat/context.d.ts.map +1 -0
- package/dist/chat/context.js +10 -0
- package/dist/chat/input.d.ts +9 -0
- package/dist/chat/input.d.ts.map +1 -0
- package/dist/chat/input.js +99 -0
- package/dist/chat/kit.d.ts +60 -0
- package/dist/chat/kit.d.ts.map +1 -0
- package/dist/chat/kit.js +123 -0
- package/dist/chat/lasting.d.ts +6 -0
- package/dist/chat/lasting.d.ts.map +1 -0
- package/dist/chat/lasting.js +19 -0
- package/dist/chat/list.d.ts +26 -0
- package/dist/chat/list.d.ts.map +1 -0
- package/dist/chat/list.js +62 -0
- package/dist/chat/markdown.d.ts +20 -0
- package/dist/chat/markdown.d.ts.map +1 -0
- package/dist/chat/markdown.js +188 -0
- package/dist/chat/message.d.ts +6 -0
- package/dist/chat/message.d.ts.map +1 -0
- package/dist/chat/message.js +192 -0
- package/dist/chat/messages.d.ts +21 -0
- package/dist/chat/messages.d.ts.map +1 -0
- package/dist/chat/messages.js +151 -0
- package/dist/chat/name.d.ts +6 -0
- package/dist/chat/name.d.ts.map +1 -0
- package/dist/chat/name.js +37 -0
- package/dist/chat/opened.d.ts +11 -0
- package/dist/chat/opened.d.ts.map +1 -0
- package/dist/chat/opened.js +17 -0
- package/dist/chat/overlay.d.ts +31 -0
- package/dist/chat/overlay.d.ts.map +1 -0
- package/dist/chat/overlay.js +97 -0
- package/dist/chat/parts.d.ts +57 -0
- package/dist/chat/parts.d.ts.map +1 -0
- package/dist/chat/parts.js +119 -0
- package/dist/chat/process.d.ts +20 -0
- package/dist/chat/process.d.ts.map +1 -0
- package/dist/chat/process.js +32 -0
- package/dist/chat/provider.d.ts +63 -0
- package/dist/chat/provider.d.ts.map +1 -0
- package/dist/chat/provider.js +645 -0
- package/dist/chat/question.d.ts +9 -0
- package/dist/chat/question.d.ts.map +1 -0
- package/dist/chat/question.js +80 -0
- package/dist/chat/questions.d.ts +31 -0
- package/dist/chat/questions.d.ts.map +1 -0
- package/dist/chat/questions.js +111 -0
- package/dist/chat/read.d.ts +5 -0
- package/dist/chat/read.d.ts.map +1 -0
- package/dist/chat/read.js +13 -0
- package/dist/chat/ready.d.ts +33 -0
- package/dist/chat/ready.d.ts.map +1 -0
- package/dist/chat/ready.js +91 -0
- package/dist/chat/style.d.ts +4 -0
- package/dist/chat/style.d.ts.map +1 -0
- package/dist/chat/style.js +302 -0
- package/dist/chat.d.ts +14 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +8 -0
- package/dist/client.d.ts +17 -13
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +68 -31
- package/dist/collection.d.ts +6 -13
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +56 -29
- package/dist/connection.d.ts +28 -33
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +951 -745
- package/dist/conversation.d.ts +32 -13
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +293 -108
- package/dist/entry.d.ts +17 -0
- package/dist/entry.d.ts.map +1 -0
- package/dist/entry.js +156 -0
- package/dist/expectation.d.ts +21 -0
- package/dist/expectation.d.ts.map +1 -0
- package/dist/expectation.js +70 -0
- package/dist/failure.d.ts +13 -0
- package/dist/failure.d.ts.map +1 -0
- package/dist/failure.js +19 -0
- package/dist/host.d.ts +9 -3
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +49 -68
- package/dist/identity.d.ts +3 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +13 -1
- package/dist/index.d.ts +9 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/memory.d.ts +14 -7
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +137 -46
- package/dist/model.d.ts +13 -12
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +6 -3
- package/dist/observation.d.ts +2 -0
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +24 -14
- package/dist/open.d.ts +2 -0
- package/dist/open.d.ts.map +1 -0
- package/dist/open.js +1 -0
- package/dist/outcome.d.ts +32 -23
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +41 -1
- package/dist/overlay.d.ts +14 -3
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +75 -37
- package/dist/paths.d.ts +0 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +0 -16
- package/dist/query.d.ts +12 -3
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +78 -36
- package/dist/reach.d.ts +42 -0
- package/dist/reach.d.ts.map +1 -0
- package/dist/reach.js +294 -0
- package/dist/react.d.ts +41 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +64 -0
- package/dist/read-side.d.ts +4 -0
- package/dist/read-side.d.ts.map +1 -1
- package/dist/read-side.js +125 -56
- package/dist/refresh.d.ts +12 -1
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +44 -36
- package/dist/replica.d.ts +9 -6
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +83 -68
- package/dist/room-draft.d.ts +29 -9
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +137 -26
- package/dist/rows.d.ts +7 -2
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +85 -40
- package/dist/save.d.ts +27 -3
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +435 -86
- package/dist/search.d.ts +3 -2
- package/dist/search.d.ts.map +1 -1
- package/dist/status.d.ts +2 -2
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +0 -8
- package/dist/store.d.ts +41 -25
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +315 -191
- package/dist/wire.d.ts +58 -19
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +65 -67
- package/package.json +31 -7
- package/dist/attachment.d.ts +0 -3
- package/dist/attachment.d.ts.map +0 -1
- package/dist/attachment.js +0 -8
package/dist/client.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { observed } from './observation.js';
|
|
2
|
-
import {
|
|
2
|
+
import { runtimeError } from './failure.js';
|
|
3
|
+
import { answer, AUTHORIZATION_ENDED, PORT_CLOSED, } from './wire.js';
|
|
4
|
+
function refused(refusal) {
|
|
5
|
+
return runtimeError(refusal.code, refusal.code, refusal.retryable);
|
|
6
|
+
}
|
|
3
7
|
export function connectMdRuntime(port) {
|
|
4
8
|
let sequence = 0;
|
|
5
9
|
let refusal = null;
|
|
@@ -7,8 +11,10 @@ export function connectMdRuntime(port) {
|
|
|
7
11
|
const calls = new Map();
|
|
8
12
|
const opening = new Map();
|
|
9
13
|
const observations = new Map();
|
|
14
|
+
let drawing = null;
|
|
15
|
+
let settling = null;
|
|
10
16
|
const send = (message) => {
|
|
11
|
-
port.postMessage(
|
|
17
|
+
port.postMessage(message);
|
|
12
18
|
};
|
|
13
19
|
function begin(id, topic, first) {
|
|
14
20
|
const handle = observed(first, () => {
|
|
@@ -25,7 +31,7 @@ export function connectMdRuntime(port) {
|
|
|
25
31
|
if (topic === 'connection-refusal')
|
|
26
32
|
handle.receive(reported);
|
|
27
33
|
}
|
|
28
|
-
const failure =
|
|
34
|
+
const failure = refused(reported);
|
|
29
35
|
for (const [id, waiting] of opening) {
|
|
30
36
|
if (waiting.topic === 'connection-refusal')
|
|
31
37
|
waiting.settle(begin(id, waiting.topic, reported));
|
|
@@ -36,12 +42,12 @@ export function connectMdRuntime(port) {
|
|
|
36
42
|
for (const waiting of calls.values())
|
|
37
43
|
waiting.fail(failure);
|
|
38
44
|
calls.clear();
|
|
45
|
+
drawing?.();
|
|
39
46
|
}
|
|
40
|
-
function end(
|
|
47
|
+
function end(failure) {
|
|
41
48
|
if (ended !== null)
|
|
42
49
|
return;
|
|
43
|
-
ended =
|
|
44
|
-
const failure = new Error(reason);
|
|
50
|
+
ended = failure;
|
|
45
51
|
for (const waiting of opening.values())
|
|
46
52
|
waiting.fail(failure);
|
|
47
53
|
opening.clear();
|
|
@@ -51,16 +57,10 @@ export function connectMdRuntime(port) {
|
|
|
51
57
|
for (const { handle } of observations.values())
|
|
52
58
|
handle.end();
|
|
53
59
|
observations.clear();
|
|
60
|
+
drawing?.();
|
|
54
61
|
}
|
|
55
62
|
port.addEventListener('message', (event) => {
|
|
56
|
-
const
|
|
57
|
-
if (wire === null)
|
|
58
|
-
return;
|
|
59
|
-
if (!wire.matching) {
|
|
60
|
-
refuse(PROTOCOL_MISMATCH);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
const message = answer(wire.message);
|
|
63
|
+
const message = answer(event.data);
|
|
64
64
|
if (message === null)
|
|
65
65
|
return;
|
|
66
66
|
if (message.kind === 'refusal') {
|
|
@@ -68,7 +68,11 @@ export function connectMdRuntime(port) {
|
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
if (message.kind === 'ended') {
|
|
71
|
-
|
|
71
|
+
for (const { topic, handle } of observations.values()) {
|
|
72
|
+
if (topic === 'member')
|
|
73
|
+
handle.receive(null);
|
|
74
|
+
}
|
|
75
|
+
end(runtimeError('authorization-ended', AUTHORIZATION_ENDED));
|
|
72
76
|
return;
|
|
73
77
|
}
|
|
74
78
|
if (message.kind === 'event') {
|
|
@@ -78,31 +82,34 @@ export function connectMdRuntime(port) {
|
|
|
78
82
|
const waiting = opening.get(message.id);
|
|
79
83
|
if (waiting !== undefined) {
|
|
80
84
|
opening.delete(message.id);
|
|
81
|
-
if (message.kind === 'failure')
|
|
82
|
-
waiting.fail(
|
|
85
|
+
if (message.kind === 'failure') {
|
|
86
|
+
waiting.fail(runtimeError(message.code, message.message, message.retryable));
|
|
87
|
+
}
|
|
83
88
|
else
|
|
84
89
|
waiting.settle(begin(message.id, waiting.topic, message.value));
|
|
90
|
+
drawing?.();
|
|
85
91
|
return;
|
|
86
92
|
}
|
|
87
93
|
const called = calls.get(message.id);
|
|
88
94
|
if (called === undefined)
|
|
89
95
|
return;
|
|
90
96
|
calls.delete(message.id);
|
|
91
|
-
if (message.kind === 'failure')
|
|
92
|
-
called.fail(
|
|
97
|
+
if (message.kind === 'failure') {
|
|
98
|
+
called.fail(runtimeError(message.code, message.message, message.retryable));
|
|
99
|
+
}
|
|
93
100
|
else
|
|
94
101
|
called.settle(message.value);
|
|
95
102
|
});
|
|
96
103
|
port.addEventListener('close', () => {
|
|
97
|
-
end(PORT_CLOSED);
|
|
104
|
+
end(runtimeError('port-closed', PORT_CLOSED));
|
|
98
105
|
});
|
|
99
106
|
port.start();
|
|
100
107
|
send({ kind: 'hello' });
|
|
101
108
|
function ask(member, input) {
|
|
102
109
|
if (ended !== null)
|
|
103
|
-
return Promise.reject(
|
|
110
|
+
return Promise.reject(ended);
|
|
104
111
|
if (refusal !== null)
|
|
105
|
-
return Promise.reject(
|
|
112
|
+
return Promise.reject(refused(refusal));
|
|
106
113
|
const id = (sequence += 1);
|
|
107
114
|
return new Promise((settle, fail) => {
|
|
108
115
|
calls.set(id, { settle: settle, fail });
|
|
@@ -111,26 +118,48 @@ export function connectMdRuntime(port) {
|
|
|
111
118
|
}
|
|
112
119
|
function watch(topic, input) {
|
|
113
120
|
if (ended !== null)
|
|
114
|
-
return Promise.reject(
|
|
121
|
+
return Promise.reject(ended);
|
|
115
122
|
const id = (sequence += 1);
|
|
116
123
|
if (refusal !== null) {
|
|
117
124
|
return topic === 'connection-refusal'
|
|
118
125
|
? Promise.resolve(begin(id, topic, refusal))
|
|
119
|
-
: Promise.reject(
|
|
126
|
+
: Promise.reject(refused(refusal));
|
|
120
127
|
}
|
|
121
128
|
return new Promise((settle, fail) => {
|
|
122
129
|
opening.set(id, { topic, settle, fail });
|
|
123
130
|
send({ kind: 'observe', id, topic, input });
|
|
131
|
+
drawing?.();
|
|
124
132
|
});
|
|
125
133
|
}
|
|
134
|
+
function settled() {
|
|
135
|
+
if (settling !== null)
|
|
136
|
+
return settling;
|
|
137
|
+
settling = new Promise((resolve) => {
|
|
138
|
+
let moved = 0;
|
|
139
|
+
const check = () => {
|
|
140
|
+
moved += 1;
|
|
141
|
+
if (opening.size > 0)
|
|
142
|
+
return;
|
|
143
|
+
const at = moved;
|
|
144
|
+
requestAnimationFrame(() => {
|
|
145
|
+
requestAnimationFrame(() => {
|
|
146
|
+
if (moved !== at || opening.size > 0)
|
|
147
|
+
return;
|
|
148
|
+
drawing = null;
|
|
149
|
+
resolve();
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
drawing = check;
|
|
154
|
+
check();
|
|
155
|
+
});
|
|
156
|
+
return settling;
|
|
157
|
+
}
|
|
126
158
|
return {
|
|
127
159
|
rooms: () => ask('rooms', []),
|
|
128
|
-
slots: () => ask('slots', []),
|
|
129
160
|
query: ((query) => ask('query', [query])),
|
|
130
161
|
search: (request) => ask('search', [request]),
|
|
131
162
|
types: (locator) => ask('types', [locator]),
|
|
132
|
-
syncStatus: () => ask('syncStatus', []),
|
|
133
|
-
serviceMode: () => ask('serviceMode', []),
|
|
134
163
|
roomDraft: {
|
|
135
164
|
list: () => ask('roomDraft.list', []),
|
|
136
165
|
read: (room, path) => ask('roomDraft.read', [room, path]),
|
|
@@ -138,7 +167,6 @@ export function connectMdRuntime(port) {
|
|
|
138
167
|
discard: (room, path, revision) => ask('roomDraft.discard', [room, path, revision]),
|
|
139
168
|
},
|
|
140
169
|
save: (room, roomDrafts) => ask('save', [room, roomDrafts]),
|
|
141
|
-
outcome: (identifier) => ask('outcome', [identifier]),
|
|
142
170
|
presentation: {
|
|
143
171
|
read: () => ask('presentation.read', []),
|
|
144
172
|
write: (value) => ask('presentation.write', [value]),
|
|
@@ -155,17 +183,26 @@ export function connectMdRuntime(port) {
|
|
|
155
183
|
delete: (conversation) => ask('conversation.delete', [conversation]),
|
|
156
184
|
},
|
|
157
185
|
chatDraft: {
|
|
158
|
-
write: (conversation, draft) => ask('chatDraft.write', [conversation, draft]),
|
|
186
|
+
write: (conversation, draft, revision) => ask('chatDraft.write', [conversation, draft, revision]),
|
|
159
187
|
discard: (conversation) => ask('chatDraft.discard', [conversation]),
|
|
160
188
|
},
|
|
161
189
|
history: (locator, path, query) => ask('history', [locator, path, query]),
|
|
190
|
+
binaryFile: {
|
|
191
|
+
read: (room, path, revision) => ask('binaryFile.read', [room, path, revision]),
|
|
192
|
+
readReference: (reference) => ask('binaryFile.readReference', [reference]),
|
|
193
|
+
},
|
|
162
194
|
call: (name, input) => ask('call', [name, input]),
|
|
163
195
|
reached: (locator, roomVersion, path) => ask('reached', [locator, roomVersion, path]),
|
|
164
196
|
log: () => ask('log', []),
|
|
165
|
-
storageLoss: () => ask('storageLoss', []),
|
|
166
197
|
persistence: () => ask('persistence', []),
|
|
167
|
-
deploymentFacts: () => ask('deploymentFacts', []),
|
|
168
198
|
observe: ((topic, ...input) => watch(topic, input)),
|
|
169
199
|
reauthorize: () => ask('reauthorize', []),
|
|
200
|
+
settled,
|
|
170
201
|
};
|
|
171
202
|
}
|
|
203
|
+
const turns = new WeakMap();
|
|
204
|
+
export function inTurn(client, work) {
|
|
205
|
+
const next = (turns.get(client) ?? Promise.resolve()).then(work).catch(() => undefined);
|
|
206
|
+
turns.set(client, next);
|
|
207
|
+
return next;
|
|
208
|
+
}
|
package/dist/collection.d.ts
CHANGED
|
@@ -4,8 +4,9 @@ import type { MdModelIdentity } from './adapter.js';
|
|
|
4
4
|
import type { Refused } from './transfer.js';
|
|
5
5
|
export declare const MD_MODEL: MdModelIdentity;
|
|
6
6
|
export type Collection = {
|
|
7
|
-
|
|
7
|
+
text: Readonly<Record<string, string>>;
|
|
8
8
|
composition: Composition;
|
|
9
|
+
document(path: string): Document | undefined;
|
|
9
10
|
};
|
|
10
11
|
export type Composition = {
|
|
11
12
|
model: ModelState;
|
|
@@ -13,20 +14,12 @@ export type Composition = {
|
|
|
13
14
|
roots: readonly string[];
|
|
14
15
|
model: ModelState;
|
|
15
16
|
} | null;
|
|
16
|
-
untypedFolders: readonly string[];
|
|
17
17
|
};
|
|
18
|
-
export declare function untyped(roots: readonly string[], path: string): boolean;
|
|
19
18
|
export declare function governing(composition: Composition, path: string): ModelState;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export declare function parseCollection(text: Readonly<Record<string, string>>, composition: Composition, previous?: Previous): Collection;
|
|
25
|
-
export declare function readCollection(text: Readonly<Record<string, string>>, composition: Composition, previous?: Previous): {
|
|
26
|
-
kind: 'read';
|
|
27
|
-
collection: Collection;
|
|
28
|
-
} | Refused;
|
|
19
|
+
export declare function collectionOf(text: Readonly<Record<string, string>>, composition: Composition, previous?: Collection): Collection;
|
|
20
|
+
export declare function passingDocument(collection: Collection, path: string): Document | undefined;
|
|
21
|
+
export declare function documentsOf(collection: Collection): Generator<readonly [string, Document]>;
|
|
22
|
+
export declare function unreadable(text: Readonly<Record<string, string>>, previous?: Readonly<Record<string, string>>): Refused | null;
|
|
29
23
|
export declare function validRoot(root: unknown): root is string;
|
|
30
24
|
export declare function validateCollection(text: Readonly<Record<string, string>>, binaryTargets: readonly string[], composition: Composition): Validation;
|
|
31
|
-
export {};
|
|
32
25
|
//# 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,EAIL,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../src/collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,UAAU,EAEhB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAO,MAAM,QAAQ,EAAE,eAAwE,CAAC;AAIhG,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACvC,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE;QAAE,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,UAAU,CAAA;KAAE,GAAG,IAAI,CAAC;CACnE,CAAC;AASF,wBAAgB,SAAS,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAI5E;AAID,wBAAgB,YAAY,CAC1B,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACtC,WAAW,EAAE,WAAW,EACxB,QAAQ,CAAC,EAAE,UAAU,GACpB,UAAU,CAsBZ;AAED,wBAAgB,eAAe,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAO1F;AAED,wBAAiB,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAY3F;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACtC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAC1C,OAAO,GAAG,IAAI,CAOhB;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,MAAM,CAEvD;AAwBD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACtC,aAAa,EAAE,SAAS,MAAM,EAAE,EAChC,WAAW,EAAE,WAAW,GACvB,UAAU,CA0BZ"}
|
package/dist/collection.js
CHANGED
|
@@ -6,42 +6,72 @@ function selected(composition, path) {
|
|
|
6
6
|
return (composition.selection !== null &&
|
|
7
7
|
composition.selection.roots.some((root) => beneath(root, path)));
|
|
8
8
|
}
|
|
9
|
-
export function untyped(roots, path) {
|
|
10
|
-
return roots.some((root) => beneath(root, path));
|
|
11
|
-
}
|
|
12
9
|
export function governing(composition, path) {
|
|
13
10
|
return composition.selection !== null && selected(composition, path)
|
|
14
11
|
? composition.selection.model
|
|
15
12
|
: composition.model;
|
|
16
13
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
const parsedIn = new WeakMap();
|
|
15
|
+
export function collectionOf(text, composition, previous) {
|
|
16
|
+
const parsed = new Map();
|
|
17
|
+
if (previous !== undefined) {
|
|
18
|
+
for (const [path, held] of parsedIn.get(previous) ?? []) {
|
|
19
|
+
if (previous.text[path] === text[path])
|
|
20
|
+
parsed.set(path, held);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const collection = {
|
|
24
|
+
text,
|
|
25
|
+
composition,
|
|
26
|
+
document(path) {
|
|
27
|
+
const held = parsed.get(path);
|
|
28
|
+
if (held !== undefined)
|
|
29
|
+
return held ?? undefined;
|
|
30
|
+
const content = text[path];
|
|
31
|
+
if (content === undefined)
|
|
32
|
+
return undefined;
|
|
33
|
+
const read = parse(content, path);
|
|
34
|
+
parsed.set(path, read.ok ? read.document : null);
|
|
35
|
+
return read.ok ? read.document : undefined;
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
parsedIn.set(collection, parsed);
|
|
39
|
+
return collection;
|
|
22
40
|
}
|
|
23
|
-
export function
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
41
|
+
export function passingDocument(collection, path) {
|
|
42
|
+
const held = parsedIn.get(collection)?.get(path);
|
|
43
|
+
if (held !== undefined)
|
|
44
|
+
return held ?? undefined;
|
|
45
|
+
const content = collection.text[path];
|
|
46
|
+
if (content === undefined)
|
|
47
|
+
return undefined;
|
|
48
|
+
const read = parse(content, path);
|
|
49
|
+
return read.ok ? read.document : undefined;
|
|
50
|
+
}
|
|
51
|
+
export function* documentsOf(collection) {
|
|
52
|
+
const parsed = parsedIn.get(collection);
|
|
53
|
+
for (const path of Object.keys(collection.text).sort()) {
|
|
54
|
+
const held = parsed?.get(path);
|
|
55
|
+
if (held === null)
|
|
56
|
+
continue;
|
|
57
|
+
if (held !== undefined) {
|
|
58
|
+
yield [path, held];
|
|
27
59
|
continue;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
60
|
+
}
|
|
61
|
+
const read = parse(collection.text[path], path);
|
|
62
|
+
if (read.ok)
|
|
63
|
+
yield [path, read.document];
|
|
31
64
|
}
|
|
32
|
-
return { documents, composition };
|
|
33
65
|
}
|
|
34
|
-
export function
|
|
35
|
-
const documents = {};
|
|
66
|
+
export function unreadable(text, previous) {
|
|
36
67
|
for (const path of Object.keys(text).sort()) {
|
|
37
|
-
if (
|
|
68
|
+
if (previous?.[path] === text[path])
|
|
38
69
|
continue;
|
|
39
|
-
const
|
|
40
|
-
if (!
|
|
41
|
-
return { kind: 'refused', refusal:
|
|
42
|
-
documents[path] = parsed.document;
|
|
70
|
+
const read = parse(text[path], path);
|
|
71
|
+
if (!read.ok)
|
|
72
|
+
return { kind: 'refused', refusal: read.refusal };
|
|
43
73
|
}
|
|
44
|
-
return
|
|
74
|
+
return null;
|
|
45
75
|
}
|
|
46
76
|
export function validRoot(root) {
|
|
47
77
|
return typeof root === 'string' && normalize(root) === root;
|
|
@@ -61,19 +91,16 @@ export function validateCollection(text, binaryTargets, composition) {
|
|
|
61
91
|
const collection = {};
|
|
62
92
|
const selection = {};
|
|
63
93
|
for (const [path, content] of Object.entries(text)) {
|
|
64
|
-
if (untyped(composition.untypedFolders, path))
|
|
65
|
-
continue;
|
|
66
94
|
if (selected(composition, path))
|
|
67
95
|
selection[path] = content;
|
|
68
96
|
else
|
|
69
97
|
collection[path] = content;
|
|
70
98
|
}
|
|
71
|
-
const linked = binaryTargets.filter((path) => !untyped(composition.untypedFolders, path));
|
|
72
99
|
const verdicts = [
|
|
73
|
-
validateAgainst(collection,
|
|
100
|
+
validateAgainst(collection, binaryTargets.filter((path) => !selected(composition, path)), composition.model),
|
|
74
101
|
];
|
|
75
102
|
if (composition.selection !== null) {
|
|
76
|
-
verdicts.push(validateAgainst(selection,
|
|
103
|
+
verdicts.push(validateAgainst(selection, binaryTargets.filter((path) => selected(composition, path)), composition.selection.model));
|
|
77
104
|
}
|
|
78
105
|
const refusals = verdicts.filter((verdict) => verdict.verdict === 'refuse');
|
|
79
106
|
if (refusals.length === 0)
|
package/dist/connection.d.ts
CHANGED
|
@@ -2,58 +2,51 @@ import { type TypesResult } from './model.js';
|
|
|
2
2
|
import { type Observation } from './observation.js';
|
|
3
3
|
import { type DocumentQuery, type DocumentResult, type GroupQuery, type GroupResult } from './query.js';
|
|
4
4
|
import { type SearchRequest, type SearchResult } from './search.js';
|
|
5
|
-
import { type Adapter, type Authorization, type
|
|
6
|
-
import { type ChatDraftSurface, type ConversationOptions, type ConversationSurface, type ConversationView } from './conversation.js';
|
|
7
|
-
import type
|
|
8
|
-
import type {
|
|
5
|
+
import { type Adapter, type Authorization, type Member, type ProviderRefusal, type ServiceMode } from './adapter.js';
|
|
6
|
+
import { type ChatDraftSurface, type ConversationAgent, type ConversationEntry, type ConversationOptions, type ConversationSurface, type ConversationView } from './conversation.js';
|
|
7
|
+
import { type WrittenBy } from './change.js';
|
|
8
|
+
import type { Open } from './open.js';
|
|
9
|
+
import { type BinaryReference } from './binary.js';
|
|
10
|
+
import { type BinaryAnswer, type CallResult, type HistoryAnswer, type QueueEntry } from './outcome.js';
|
|
9
11
|
import { type SaveRefusal } from './save.js';
|
|
10
12
|
import { type RoomDraft, type RoomDraftWrite } from './room-draft.js';
|
|
11
13
|
import { type SyncStatus } from './status.js';
|
|
12
14
|
import { type RuntimeShell } from './durability.js';
|
|
15
|
+
import { type NarrowedView, type PortReach, type RuntimeView } from './reach.js';
|
|
13
16
|
export type AppTypedSelection = {
|
|
14
17
|
roots: readonly string[];
|
|
15
|
-
attachedModel: import('./model.js').ModelIdentity | null;
|
|
16
18
|
model: TypesResult;
|
|
17
19
|
};
|
|
18
20
|
export type AppRoom = {
|
|
19
21
|
name: string;
|
|
20
22
|
locator: string;
|
|
23
|
+
handle: string;
|
|
21
24
|
operations: import('./adapter.js').OperationScopes;
|
|
22
25
|
replica: import('./adapter.js').ReplicaAdmission;
|
|
23
|
-
attachedModel: import('./model.js').ModelIdentity | null;
|
|
24
26
|
model: TypesResult;
|
|
25
27
|
typedSelection: AppTypedSelection | null;
|
|
26
|
-
untypedFolders: readonly string[];
|
|
27
28
|
providerOwnedPaths: readonly string[];
|
|
28
29
|
roomVersion: string | null;
|
|
29
|
-
|
|
30
|
+
documents: number;
|
|
30
31
|
synchronizationAvailable: boolean;
|
|
31
32
|
refusal: ProviderRefusal | null;
|
|
32
33
|
};
|
|
33
|
-
export type
|
|
34
|
-
room: AppRoom;
|
|
35
|
-
segment: string | null;
|
|
36
|
-
};
|
|
37
|
-
export type AppSlot = {
|
|
38
|
-
slot: string;
|
|
39
|
-
entries: readonly AppSlotEntry[];
|
|
40
|
-
};
|
|
41
|
-
export type RoomTypes = {
|
|
34
|
+
export type RoomSchemas = {
|
|
42
35
|
collection: TypesResult;
|
|
43
36
|
typedSelection: TypesResult | null;
|
|
44
37
|
};
|
|
45
|
-
|
|
38
|
+
type RefusalReason = 'missing-required-guarantee' | 'revoked-authorization';
|
|
39
|
+
export type ConnectionRefusalCode = Open<RefusalReason>;
|
|
46
40
|
export type ConnectionRefusal = {
|
|
47
|
-
|
|
41
|
+
code: ConnectionRefusalCode;
|
|
42
|
+
retryable: boolean;
|
|
48
43
|
reauthorizationOffered: boolean;
|
|
49
44
|
refusal: ProviderRefusal | null;
|
|
50
45
|
};
|
|
51
46
|
export type MdRuntimeOptions = {
|
|
52
47
|
adapter: Adapter;
|
|
53
48
|
shell: RuntimeShell;
|
|
54
|
-
requiredGuarantees: readonly string[];
|
|
55
49
|
authorization?: Authorization;
|
|
56
|
-
discoveryIntervalMs?: number;
|
|
57
50
|
signal?: AbortSignal;
|
|
58
51
|
};
|
|
59
52
|
export type SaveResult = {
|
|
@@ -76,6 +69,10 @@ export type PresentationSurface = {
|
|
|
76
69
|
read(app: string): Promise<unknown>;
|
|
77
70
|
write(app: string, value: unknown): Promise<void>;
|
|
78
71
|
};
|
|
72
|
+
export type BinaryFileSurface = {
|
|
73
|
+
read(room: string, path: string, revision?: string): Promise<BinaryAnswer>;
|
|
74
|
+
readReference(reference: BinaryReference): Promise<BinaryAnswer>;
|
|
75
|
+
};
|
|
79
76
|
export type HistoryQuery = {
|
|
80
77
|
revision?: string;
|
|
81
78
|
pageToken?: string;
|
|
@@ -83,26 +80,22 @@ export type HistoryQuery = {
|
|
|
83
80
|
export type MdRuntime = {
|
|
84
81
|
loaded(): Promise<void>;
|
|
85
82
|
rooms(): readonly AppRoom[];
|
|
86
|
-
slots(): readonly AppSlot[];
|
|
87
83
|
query: {
|
|
88
84
|
(query: DocumentQuery): Promise<DocumentResult>;
|
|
89
85
|
(query: GroupQuery): Promise<GroupResult>;
|
|
90
86
|
};
|
|
91
87
|
search(request: SearchRequest): Promise<SearchResult>;
|
|
92
|
-
types(locator: string):
|
|
93
|
-
syncStatus(): SyncStatus;
|
|
94
|
-
serviceMode(): ServiceMode;
|
|
88
|
+
types(locator: string): RoomSchemas;
|
|
95
89
|
roomDraft: RoomDraftSurface;
|
|
96
90
|
conversation: ConversationSurface;
|
|
97
91
|
chatDraft: ChatDraftSurface;
|
|
98
92
|
presentation: PresentationSurface;
|
|
99
93
|
save(room: string, roomDrafts: readonly SavedRoomDraft[], writtenBy?: WrittenBy): Promise<SaveResult>;
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
history(locator: string, path: string, query?: HistoryQuery): Promise<HistoryAnswer>;
|
|
95
|
+
binaryFile: BinaryFileSurface;
|
|
102
96
|
call(name: string, input: unknown): Promise<CallResult>;
|
|
103
97
|
reached(locator: string, roomVersion: string, path?: string): boolean;
|
|
104
98
|
log(): string;
|
|
105
|
-
storageLoss(): string | null;
|
|
106
99
|
persistence(): boolean;
|
|
107
100
|
observe: {
|
|
108
101
|
(topic: 'rooms'): Promise<Observation<readonly AppRoom[]>>;
|
|
@@ -110,21 +103,23 @@ export type MdRuntime = {
|
|
|
110
103
|
(topic: 'storage-loss'): Promise<Observation<string | null>>;
|
|
111
104
|
(topic: 'sync-status'): Promise<Observation<SyncStatus>>;
|
|
112
105
|
(topic: 'service-mode'): Promise<Observation<ServiceMode>>;
|
|
106
|
+
(topic: 'member'): Promise<Observation<Member | null>>;
|
|
113
107
|
(topic: 'query', query: DocumentQuery): Promise<Observation<DocumentResult>>;
|
|
114
108
|
(topic: 'query', query: GroupQuery): Promise<Observation<GroupResult>>;
|
|
115
109
|
(topic: 'queue', locator: string): Promise<Observation<readonly QueueEntry[]>>;
|
|
116
110
|
(topic: 'room-drafts'): Promise<Observation<readonly RoomDraft[]>>;
|
|
117
111
|
(topic: 'presentation', app: string): Promise<Observation<unknown>>;
|
|
118
112
|
(topic: 'conversation', conversation: string, options: ConversationOptions): Promise<Observation<ConversationView>>;
|
|
113
|
+
(topic: 'conversations'): Promise<Observation<readonly ConversationEntry[]>>;
|
|
114
|
+
(topic: 'agents'): Promise<Observation<readonly ConversationAgent[]>>;
|
|
119
115
|
};
|
|
120
116
|
reauthorize(): Promise<void>;
|
|
121
117
|
};
|
|
122
|
-
export type RuntimeTopic = 'rooms' | 'connection-refusal' | 'storage-loss' | 'sync-status' | 'service-mode' | 'query' | 'queue' | 'room-drafts' | 'presentation' | 'conversation';
|
|
123
|
-
export type ComposedRuntime = {
|
|
124
|
-
md: MdRuntime;
|
|
118
|
+
export type RuntimeTopic = 'rooms' | 'connection-refusal' | 'storage-loss' | 'sync-status' | 'service-mode' | 'member' | 'query' | 'queue' | 'room-drafts' | 'presentation' | 'conversation' | 'conversations' | 'agents';
|
|
119
|
+
export type ComposedRuntime = RuntimeView & {
|
|
125
120
|
stop(): Promise<void>;
|
|
126
|
-
|
|
121
|
+
within(reach: PortReach | null): NarrowedView;
|
|
127
122
|
};
|
|
128
|
-
export declare function createMdRuntime(options: MdRuntimeOptions): MdRuntime;
|
|
129
123
|
export declare function composeRuntime(options: MdRuntimeOptions): ComposedRuntime;
|
|
124
|
+
export {};
|
|
130
125
|
//# sourceMappingURL=connection.d.ts.map
|
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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