@agentshouse/mdruntime 0.1.0-cde2b99d2fcbc → 0.1.0-cdf06805b9658
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 +286 -292
- package/README.md +16 -14
- package/dist/adapter.d.ts +99 -36
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts +5 -1
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +21 -4
- package/dist/attempt.d.ts.map +1 -1
- package/dist/attempt.js +14 -1
- package/dist/binary.d.ts +0 -5
- package/dist/binary.d.ts.map +1 -1
- package/dist/binary.js +1 -1
- package/dist/bootstrap.d.ts +27 -9
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +155 -64
- package/dist/chain.d.ts +11 -0
- package/dist/chain.d.ts.map +1 -0
- package/dist/chain.js +64 -0
- package/dist/change-set.d.ts +9 -14
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +11 -63
- package/dist/change.d.ts +31 -1
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +10 -1
- package/dist/client.d.ts +24 -12
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +49 -9
- package/dist/collection.d.ts +7 -6
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +30 -77
- package/dist/compile.d.ts +16 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +721 -0
- package/dist/connection.d.ts +42 -15
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +3397 -804
- package/dist/conversation.d.ts +30 -9
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +549 -181
- package/dist/digest.d.ts +7 -0
- package/dist/digest.d.ts.map +1 -0
- package/dist/digest.js +113 -0
- package/dist/durability.d.ts +5 -1
- package/dist/durability.d.ts.map +1 -1
- package/dist/durability.js +5 -0
- package/dist/entry.d.ts +19 -0
- package/dist/entry.d.ts.map +1 -0
- package/dist/entry.js +151 -0
- package/dist/fence.d.ts +6 -0
- package/dist/fence.d.ts.map +1 -0
- package/dist/fence.js +10 -0
- package/dist/file.d.ts +2 -10
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +3 -120
- package/dist/fulltext.d.ts +27 -0
- package/dist/fulltext.d.ts.map +1 -0
- package/dist/fulltext.js +368 -0
- package/dist/host.d.ts +15 -3
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +126 -16
- package/dist/identity.d.ts +1 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +3 -0
- package/dist/index.d.ts +15 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/live.d.ts +22 -0
- package/dist/live.d.ts.map +1 -0
- package/dist/live.js +123 -0
- package/dist/memory.d.ts +10 -3
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +54 -26
- package/dist/messages.d.ts +28 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +90 -0
- package/dist/model.d.ts +4 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +11 -2
- package/dist/name.d.ts +4 -0
- package/dist/name.d.ts.map +1 -0
- package/dist/name.js +122 -0
- package/dist/observation.d.ts +19 -2
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +113 -12
- package/dist/opened.d.ts +22 -0
- package/dist/opened.d.ts.map +1 -0
- package/dist/opened.js +107 -0
- package/dist/outcome.d.ts +38 -4
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +26 -0
- package/dist/overlay.d.ts +3 -4
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +100 -182
- package/dist/query.d.ts +60 -4
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +48 -7
- package/dist/reach.d.ts +11 -6
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +182 -62
- package/dist/react.d.ts +8 -6
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +7 -17
- package/dist/readiness.d.ts +64 -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 +100 -0
- package/dist/recovery.d.ts +25 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +198 -0
- package/dist/refresh.d.ts +16 -15
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +113 -49
- package/dist/replica.d.ts +56 -33
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +297 -162
- package/dist/room-draft.d.ts +17 -2
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +65 -25
- package/dist/rows.d.ts +28 -37
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +113 -72
- package/dist/save.d.ts +50 -9
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +528 -166
- package/dist/search.d.ts +39 -28
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +37 -105
- 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 +16 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +431 -0
- package/dist/status.d.ts +4 -0
- package/dist/status.d.ts.map +1 -1
- package/dist/store.d.ts +118 -76
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +355 -444
- package/dist/stored.d.ts +145 -0
- package/dist/stored.d.ts.map +1 -0
- package/dist/stored.js +567 -0
- package/dist/tables.d.ts +354 -0
- package/dist/tables.d.ts.map +1 -0
- package/dist/tables.js +624 -0
- package/dist/turn.d.ts +9 -0
- package/dist/turn.d.ts.map +1 -0
- package/dist/turn.js +75 -0
- package/dist/validation.d.ts +30 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +162 -0
- package/dist/windows.d.ts +22 -0
- package/dist/windows.d.ts.map +1 -0
- package/dist/windows.js +89 -0
- package/dist/wire.d.ts +164 -32
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +55 -31
- package/dist/words.d.ts +19 -0
- package/dist/words.d.ts.map +1 -0
- package/dist/words.js +150 -0
- package/package.json +27 -23
- package/dist/chat/acts.d.ts +0 -34
- package/dist/chat/acts.d.ts.map +0 -1
- package/dist/chat/acts.js +0 -36
- package/dist/chat/context.d.ts +0 -3
- package/dist/chat/context.d.ts.map +0 -1
- package/dist/chat/context.js +0 -10
- package/dist/chat/input.d.ts +0 -9
- package/dist/chat/input.d.ts.map +0 -1
- package/dist/chat/input.js +0 -99
- package/dist/chat/kit.d.ts +0 -60
- package/dist/chat/kit.d.ts.map +0 -1
- package/dist/chat/kit.js +0 -123
- package/dist/chat/lasting.d.ts +0 -6
- package/dist/chat/lasting.d.ts.map +0 -1
- package/dist/chat/lasting.js +0 -19
- package/dist/chat/list.d.ts +0 -20
- package/dist/chat/list.d.ts.map +0 -1
- package/dist/chat/list.js +0 -59
- package/dist/chat/markdown.d.ts +0 -19
- package/dist/chat/markdown.d.ts.map +0 -1
- package/dist/chat/markdown.js +0 -187
- package/dist/chat/message.d.ts +0 -6
- package/dist/chat/message.d.ts.map +0 -1
- package/dist/chat/message.js +0 -192
- package/dist/chat/messages.d.ts +0 -21
- package/dist/chat/messages.d.ts.map +0 -1
- package/dist/chat/messages.js +0 -151
- package/dist/chat/name.d.ts +0 -6
- package/dist/chat/name.d.ts.map +0 -1
- package/dist/chat/name.js +0 -37
- package/dist/chat/opened.d.ts +0 -11
- package/dist/chat/opened.d.ts.map +0 -1
- package/dist/chat/opened.js +0 -17
- package/dist/chat/overlay.d.ts +0 -31
- package/dist/chat/overlay.d.ts.map +0 -1
- package/dist/chat/overlay.js +0 -97
- package/dist/chat/parts.d.ts +0 -57
- package/dist/chat/parts.d.ts.map +0 -1
- package/dist/chat/parts.js +0 -119
- package/dist/chat/process.d.ts +0 -20
- package/dist/chat/process.d.ts.map +0 -1
- package/dist/chat/process.js +0 -32
- package/dist/chat/provider.d.ts +0 -63
- package/dist/chat/provider.d.ts.map +0 -1
- package/dist/chat/provider.js +0 -645
- package/dist/chat/question.d.ts +0 -9
- package/dist/chat/question.d.ts.map +0 -1
- package/dist/chat/question.js +0 -80
- package/dist/chat/questions.d.ts +0 -31
- package/dist/chat/questions.d.ts.map +0 -1
- package/dist/chat/questions.js +0 -111
- package/dist/chat/read.d.ts +0 -5
- package/dist/chat/read.d.ts.map +0 -1
- package/dist/chat/read.js +0 -13
- package/dist/chat/ready.d.ts +0 -33
- package/dist/chat/ready.d.ts.map +0 -1
- package/dist/chat/ready.js +0 -91
- package/dist/chat/style.d.ts +0 -4
- package/dist/chat/style.d.ts.map +0 -1
- package/dist/chat/style.js +0 -302
- package/dist/chat.d.ts +0 -14
- package/dist/chat.d.ts.map +0 -1
- package/dist/chat.js +0 -8
- package/dist/read-side.d.ts +0 -18
- package/dist/read-side.d.ts.map +0 -1
- package/dist/read-side.js +0 -440
package/dist/room-draft.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { apply, equalValue, frontmatterValue, parse, serialize } from '@agentshouse/mdmodel';
|
|
1
|
+
import { apply, equalValue, frontmatterValue, parse, serialize, } from '@agentshouse/mdmodel';
|
|
2
2
|
import { runtimeError } from './failure.js';
|
|
3
|
-
import {
|
|
3
|
+
import { sha256 } from './digest.js';
|
|
4
4
|
import { binaryLocalId } from './identity.js';
|
|
5
5
|
import { normalize } from './paths.js';
|
|
6
6
|
export function returnedBy(kind) {
|
|
@@ -90,7 +90,12 @@ export function readParts(value) {
|
|
|
90
90
|
if (!plain(value.move))
|
|
91
91
|
malformed();
|
|
92
92
|
const base = markdownBase(value.move.base);
|
|
93
|
-
|
|
93
|
+
const room = optionalText(value.move.room);
|
|
94
|
+
parts.move = {
|
|
95
|
+
to: text(value.move.to),
|
|
96
|
+
...(room === undefined ? {} : { room }),
|
|
97
|
+
...(base === undefined ? {} : { base }),
|
|
98
|
+
};
|
|
94
99
|
}
|
|
95
100
|
if (value.removal !== undefined) {
|
|
96
101
|
if (!plain(value.removal))
|
|
@@ -120,11 +125,51 @@ function kept(prior, base) {
|
|
|
120
125
|
throw runtimeError('room-draft-base-missing');
|
|
121
126
|
return base;
|
|
122
127
|
}
|
|
128
|
+
function movePart(current, move) {
|
|
129
|
+
return {
|
|
130
|
+
to: move.to,
|
|
131
|
+
...(move.room === undefined ? {} : { room: move.room }),
|
|
132
|
+
base: kept(current, move.base),
|
|
133
|
+
};
|
|
134
|
+
}
|
|
123
135
|
function editsText(parts) {
|
|
124
136
|
return (parts.preamble !== undefined ||
|
|
125
137
|
named(parts.fields).length > 0 ||
|
|
126
138
|
named(parts.sections).length > 0);
|
|
127
139
|
}
|
|
140
|
+
function partNames(parts) {
|
|
141
|
+
const names = [];
|
|
142
|
+
for (const [name, part] of Object.entries(parts)) {
|
|
143
|
+
if (name === 'preamble' || name === 'markdown')
|
|
144
|
+
names.push(name);
|
|
145
|
+
else if ((name === 'fields' || name === 'sections') && plain(part))
|
|
146
|
+
names.push(...Object.keys(part).map((one) => `${name}/${one}`));
|
|
147
|
+
else
|
|
148
|
+
return null;
|
|
149
|
+
}
|
|
150
|
+
return names.sort().join('\u0000');
|
|
151
|
+
}
|
|
152
|
+
function withBaseOf(prior, part) {
|
|
153
|
+
return plain(part) && plain(prior) && Object.hasOwn(prior, 'base')
|
|
154
|
+
? { ...part, base: prior.base }
|
|
155
|
+
: part;
|
|
156
|
+
}
|
|
157
|
+
export function gatheredParts(earlier, later) {
|
|
158
|
+
if (!plain(earlier) || !plain(later))
|
|
159
|
+
return null;
|
|
160
|
+
const named = partNames(earlier);
|
|
161
|
+
if (named === null || named !== partNames(later))
|
|
162
|
+
return null;
|
|
163
|
+
return Object.fromEntries(Object.entries(later).map(([name, part]) => [
|
|
164
|
+
name,
|
|
165
|
+
name === 'fields' || name === 'sections'
|
|
166
|
+
? Object.fromEntries(Object.entries(part).map(([one, value]) => [
|
|
167
|
+
one,
|
|
168
|
+
withBaseOf(earlier[name][one], value),
|
|
169
|
+
]))
|
|
170
|
+
: withBaseOf(earlier[name], part),
|
|
171
|
+
]));
|
|
172
|
+
}
|
|
128
173
|
export function held(current, parts, file) {
|
|
129
174
|
if (parts.markdown !== undefined && editsText(parts)) {
|
|
130
175
|
throw runtimeError('room-draft-markdown-exclusive');
|
|
@@ -144,9 +189,7 @@ export function held(current, parts, file) {
|
|
|
144
189
|
}
|
|
145
190
|
return {
|
|
146
191
|
file: current.file,
|
|
147
|
-
...(parts.move === undefined
|
|
148
|
-
? {}
|
|
149
|
-
: { move: { to: parts.move.to, base: kept(current.move, parts.move.base) } }),
|
|
192
|
+
...(parts.move === undefined ? {} : { move: movePart(current.move, parts.move) }),
|
|
150
193
|
...(parts.removal === undefined
|
|
151
194
|
? {}
|
|
152
195
|
: { removal: { base: kept(current.removal, parts.removal.base) } }),
|
|
@@ -181,9 +224,8 @@ export function held(current, parts, file) {
|
|
|
181
224
|
}
|
|
182
225
|
if (parts.creation !== undefined)
|
|
183
226
|
next.creation = parts.creation;
|
|
184
|
-
if (parts.move !== undefined)
|
|
185
|
-
next.move =
|
|
186
|
-
}
|
|
227
|
+
if (parts.move !== undefined)
|
|
228
|
+
next.move = movePart(current?.move, parts.move);
|
|
187
229
|
if (parts.removal !== undefined) {
|
|
188
230
|
next.removal = { base: kept(current?.removal, parts.removal.base) };
|
|
189
231
|
}
|
|
@@ -240,13 +282,12 @@ export function underneath(parts, path, visible) {
|
|
|
240
282
|
}
|
|
241
283
|
const UNTYPED_MEDIA_TYPE = 'application/octet-stream';
|
|
242
284
|
export async function heldFile(blob, base) {
|
|
243
|
-
const bytes = await blob.arrayBuffer();
|
|
244
285
|
return {
|
|
245
|
-
blob,
|
|
246
286
|
localId: binaryLocalId(),
|
|
247
|
-
|
|
287
|
+
...(blob instanceof File ? { name: blob.name } : {}),
|
|
288
|
+
byteLength: blob.size,
|
|
248
289
|
mediaType: blob.type === '' ? UNTYPED_MEDIA_TYPE : blob.type,
|
|
249
|
-
sha256:
|
|
290
|
+
sha256: await sha256(blob),
|
|
250
291
|
base,
|
|
251
292
|
};
|
|
252
293
|
}
|
|
@@ -279,16 +320,15 @@ function frontmatterOf(fields) {
|
|
|
279
320
|
const opened = parse('---\n---\n');
|
|
280
321
|
if (!opened.ok)
|
|
281
322
|
return malformed();
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
function concatenated(markdown, parts) {
|
|
323
|
+
const next = apply(opened.document, fields.map(([name, part]) => ({
|
|
324
|
+
kind: 'field',
|
|
325
|
+
name,
|
|
326
|
+
value: part.value,
|
|
327
|
+
prior: undefined,
|
|
328
|
+
})));
|
|
329
|
+
return next.outcome === 'applied' ? serialize(next.document) : malformed();
|
|
330
|
+
}
|
|
331
|
+
export function partsAfter(markdown, parts) {
|
|
292
332
|
const fields = named(parts.fields);
|
|
293
333
|
const pieces = [
|
|
294
334
|
...(fields.length === 0 ? [] : [frontmatterOf(fields)]),
|
|
@@ -319,7 +359,7 @@ export function returnedInto(existing, returned) {
|
|
|
319
359
|
delete next.fields;
|
|
320
360
|
delete next.sections;
|
|
321
361
|
delete next.preamble;
|
|
322
|
-
const value =
|
|
362
|
+
const value = partsAfter(whole.value, existing.markdown === undefined ? existing : returned);
|
|
323
363
|
next.markdown = { value, base: whole.base };
|
|
324
364
|
}
|
|
325
365
|
const creation = existing.creation ?? returned.creation;
|
|
@@ -370,7 +410,7 @@ export function changesOf(path, parts) {
|
|
|
370
410
|
changes.push({ kind: 'replace', path, content: parts.markdown.value });
|
|
371
411
|
}
|
|
372
412
|
if (parts.file !== undefined && parts.removal === undefined) {
|
|
373
|
-
const { base, ...file } = parts.file;
|
|
413
|
+
const { base, name: _name, ...file } = parts.file;
|
|
374
414
|
const at = parts.move === undefined ? path : moveTarget(parts.move);
|
|
375
415
|
if (base !== null && at !== path)
|
|
376
416
|
changes.push({ kind: 'move', path, to: at });
|
package/dist/rows.d.ts
CHANGED
|
@@ -1,46 +1,37 @@
|
|
|
1
|
-
import { type Document } from '@agentshouse/mdmodel';
|
|
2
|
-
import type { HeadChange } from './adapter.js';
|
|
3
|
-
import type { BinaryFileRecord } from './binary.js';
|
|
4
1
|
import { type Composition } from './collection.js';
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
reached: Readonly<Record<string, readonly unknown[]>>;
|
|
15
|
-
directories: readonly string[];
|
|
16
|
-
body: string;
|
|
17
|
-
change: HeadChange | null;
|
|
18
|
-
binary: BinaryFileRecord | null;
|
|
2
|
+
export type ValueKind = 'string' | 'number' | 'boolean' | 'null' | 'array' | 'object' | 'undefined';
|
|
3
|
+
type HeldValue = {
|
|
4
|
+
readonly form: string;
|
|
5
|
+
readonly held: number;
|
|
6
|
+
readonly item: number;
|
|
7
|
+
readonly kind: ValueKind;
|
|
8
|
+
readonly value: string | number | null;
|
|
9
|
+
readonly size: number | null;
|
|
10
|
+
readonly single: boolean;
|
|
19
11
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
kind:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
sections: Readonly<Record<string, string>>;
|
|
27
|
-
markdown: string;
|
|
12
|
+
type LinkKind = 'field' | 'section' | 'body';
|
|
13
|
+
type HeldLink = {
|
|
14
|
+
readonly kind: LinkKind;
|
|
15
|
+
readonly form: string;
|
|
16
|
+
readonly target: string;
|
|
17
|
+
readonly field: string;
|
|
28
18
|
};
|
|
29
|
-
export type
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
path: string;
|
|
38
|
-
type: string;
|
|
19
|
+
export type Derived = {
|
|
20
|
+
readonly type: string | null;
|
|
21
|
+
readonly declared: string | null;
|
|
22
|
+
readonly queried: boolean;
|
|
23
|
+
readonly folder: string;
|
|
24
|
+
readonly fields: string | null;
|
|
25
|
+
readonly values: readonly HeldValue[];
|
|
26
|
+
readonly links: readonly HeldLink[];
|
|
39
27
|
};
|
|
40
|
-
export type Row = DocumentRow | BodyRow | ReferenceRow;
|
|
41
28
|
export declare function documentKey(room: string, path: string): string;
|
|
42
29
|
export declare function roomOfKey(key: string): string;
|
|
30
|
+
export declare function pathOfKey(key: string): string;
|
|
43
31
|
export declare function markdownPath(path: string): boolean;
|
|
44
|
-
export declare function
|
|
32
|
+
export declare function settingsTextPath(path: string): boolean;
|
|
33
|
+
export declare function folderOf(path: string): string;
|
|
34
|
+
export declare function kindOf(value: unknown): ValueKind;
|
|
35
|
+
export declare function derived(path: string, content: string | null, composition: Composition): Derived;
|
|
45
36
|
export {};
|
|
46
37
|
//# sourceMappingURL=rows.d.ts.map
|
package/dist/rows.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../src/rows.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../src/rows.ts"],"names":[],"mappings":"AAWA,OAAO,EAAa,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9D,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEpG,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CA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,GAAG,IAAI,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAmB/F"}
|
package/dist/rows.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ARRAY_INDEX, escapePointer, references, target, } from '@agentshouse/mdmodel';
|
|
1
|
+
import { ARRAY_INDEX, bodyAfterFrontmatter, bodyLinks, escapePointer, parseFrontmatter, references, sectionReferences, target, } from '@agentshouse/mdmodel';
|
|
2
2
|
import { governing } from './collection.js';
|
|
3
3
|
import { definitionOf } from './model.js';
|
|
4
4
|
function keyOf(...parts) {
|
|
@@ -10,6 +10,18 @@ export function documentKey(room, path) {
|
|
|
10
10
|
export function roomOfKey(key) {
|
|
11
11
|
return key.split('\u0000')[1];
|
|
12
12
|
}
|
|
13
|
+
export function pathOfKey(key) {
|
|
14
|
+
return key.split('\u0000')[2];
|
|
15
|
+
}
|
|
16
|
+
export function markdownPath(path) {
|
|
17
|
+
return path.endsWith('.md');
|
|
18
|
+
}
|
|
19
|
+
export function settingsTextPath(path) {
|
|
20
|
+
return /^settings\/.+\.ya?ml$/u.test(path);
|
|
21
|
+
}
|
|
22
|
+
export function folderOf(path) {
|
|
23
|
+
return path.slice(0, Math.max(path.lastIndexOf('/'), 0));
|
|
24
|
+
}
|
|
13
25
|
function plainObject(value) {
|
|
14
26
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
15
27
|
}
|
|
@@ -18,6 +30,54 @@ function compared(reading, exact, value) {
|
|
|
18
30
|
return value;
|
|
19
31
|
return (typeof value === 'string' ? target(reading.path, value) : null) ?? undefined;
|
|
20
32
|
}
|
|
33
|
+
export function kindOf(value) {
|
|
34
|
+
if (value === undefined)
|
|
35
|
+
return 'undefined';
|
|
36
|
+
if (value === null)
|
|
37
|
+
return 'null';
|
|
38
|
+
if (Array.isArray(value))
|
|
39
|
+
return 'array';
|
|
40
|
+
if (typeof value === 'object')
|
|
41
|
+
return 'object';
|
|
42
|
+
return typeof value;
|
|
43
|
+
}
|
|
44
|
+
function scalarOf(value) {
|
|
45
|
+
if (typeof value === 'string' || typeof value === 'number')
|
|
46
|
+
return value;
|
|
47
|
+
if (typeof value === 'boolean')
|
|
48
|
+
return value ? 1 : 0;
|
|
49
|
+
if (Array.isArray(value))
|
|
50
|
+
return JSON.stringify(value);
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
function held(reading, form, value, single) {
|
|
54
|
+
const at = reading.reached.get(form) ?? 0;
|
|
55
|
+
reading.reached.set(form, at + 1);
|
|
56
|
+
const kind = kindOf(value);
|
|
57
|
+
reading.values.push({
|
|
58
|
+
form,
|
|
59
|
+
held: at,
|
|
60
|
+
item: -1,
|
|
61
|
+
kind,
|
|
62
|
+
value: scalarOf(value),
|
|
63
|
+
size: Array.isArray(value) ? value.length : null,
|
|
64
|
+
single,
|
|
65
|
+
});
|
|
66
|
+
if (!Array.isArray(value))
|
|
67
|
+
return;
|
|
68
|
+
value.forEach((item, index) => {
|
|
69
|
+
const itemKind = kindOf(item);
|
|
70
|
+
reading.values.push({
|
|
71
|
+
form,
|
|
72
|
+
held: at,
|
|
73
|
+
item: index,
|
|
74
|
+
kind: itemKind,
|
|
75
|
+
value: itemKind === 'array' ? null : scalarOf(item),
|
|
76
|
+
size: null,
|
|
77
|
+
single: false,
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
21
81
|
function record(reading, node, forms, exact) {
|
|
22
82
|
const value = Array.isArray(node)
|
|
23
83
|
? node.map((item, index) => compared(reading, `${exact}/${index}`, item))
|
|
@@ -25,10 +85,7 @@ function record(reading, node, forms, exact) {
|
|
|
25
85
|
for (const form of forms) {
|
|
26
86
|
if (form.pending)
|
|
27
87
|
continue;
|
|
28
|
-
(reading
|
|
29
|
-
if (!form.through && value !== undefined && !plainObject(value)) {
|
|
30
|
-
reading.values[form.text] = value;
|
|
31
|
-
}
|
|
88
|
+
held(reading, form.text, value, !form.through && value !== undefined && !plainObject(value));
|
|
32
89
|
}
|
|
33
90
|
if (Array.isArray(node) || plainObject(node) || !reading.references.has(exact))
|
|
34
91
|
return;
|
|
@@ -64,82 +121,66 @@ function walk(reading, node, forms, exact) {
|
|
|
64
121
|
: [{ text: `${form.text}/${segment}`, through: form.through, pending: false }]), `${exact}/${segment}`);
|
|
65
122
|
}
|
|
66
123
|
}
|
|
67
|
-
function
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const key = documentKey(room, path);
|
|
76
|
-
const body = keyOf('b', room, path);
|
|
77
|
-
if (document === null || !markdownPath(path)) {
|
|
78
|
-
return [
|
|
79
|
-
{
|
|
80
|
-
key,
|
|
81
|
-
kind: 'document',
|
|
82
|
-
room,
|
|
83
|
-
path,
|
|
84
|
-
type: null,
|
|
85
|
-
fields: {},
|
|
86
|
-
values: {},
|
|
87
|
-
reached: {},
|
|
88
|
-
directories: directoriesOf(path),
|
|
89
|
-
body,
|
|
90
|
-
change,
|
|
91
|
-
binary,
|
|
92
|
-
},
|
|
93
|
-
];
|
|
124
|
+
function bodyTargets(path, content) {
|
|
125
|
+
const seen = new Set();
|
|
126
|
+
const found = [];
|
|
127
|
+
for (const { target: reached } of bodyLinks(bodyAfterFrontmatter(content), path)) {
|
|
128
|
+
if (seen.has(reached))
|
|
129
|
+
continue;
|
|
130
|
+
seen.add(reached);
|
|
131
|
+
found.push({ kind: 'body', form: '', target: reached, field: '' });
|
|
94
132
|
}
|
|
95
|
-
|
|
133
|
+
return found;
|
|
134
|
+
}
|
|
135
|
+
function typedRows(path, content, document, composition) {
|
|
96
136
|
const definition = definitionOf(governing(composition, path), document.type);
|
|
97
137
|
const reading = {
|
|
98
138
|
path,
|
|
99
139
|
references: new Set(definition === undefined ? [] : references(document, definition).map((one) => one.pointer)),
|
|
100
|
-
values:
|
|
101
|
-
reached:
|
|
140
|
+
values: [],
|
|
141
|
+
reached: new Map(),
|
|
102
142
|
targets: new Map(),
|
|
103
143
|
};
|
|
104
144
|
for (const [name, value] of Object.entries(document.fields)) {
|
|
105
145
|
const segment = escapePointer(name);
|
|
106
146
|
walk(reading, value, [{ text: `/${segment}`, through: false, pending: false }], `/${segment}`);
|
|
107
147
|
}
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
{
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
148
|
+
const links = [];
|
|
149
|
+
for (const { field, target: reached, forms } of reading.targets.values()) {
|
|
150
|
+
for (const form of [...forms].sort()) {
|
|
151
|
+
links.push({ kind: 'field', form, target: reached, field });
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
if (definition !== undefined) {
|
|
155
|
+
const sectioned = new Set();
|
|
156
|
+
for (const { target: reached } of sectionReferences(path, content, definition)) {
|
|
157
|
+
if (reached === null || sectioned.has(reached))
|
|
158
|
+
continue;
|
|
159
|
+
sectioned.add(reached);
|
|
160
|
+
links.push({ kind: 'section', form: '', target: reached, field: '' });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return { values: reading.values, links: [...links, ...bodyTargets(path, content)] };
|
|
164
|
+
}
|
|
165
|
+
export function derived(path, content, composition) {
|
|
166
|
+
const folder = folderOf(path);
|
|
167
|
+
const unread = { values: [], links: [], fields: null, folder, type: null };
|
|
168
|
+
if (content === null)
|
|
169
|
+
return { ...unread, declared: null, queried: true };
|
|
170
|
+
const read = parseFrontmatter(content, path);
|
|
171
|
+
const declared = read.ok ? (read.frontmatter.type ?? 'any') : null;
|
|
172
|
+
if (!markdownPath(path)) {
|
|
173
|
+
return { ...unread, declared, queried: true, links: bodyTargets(path, content) };
|
|
174
|
+
}
|
|
175
|
+
if (!read.ok)
|
|
176
|
+
return { ...unread, declared, queried: false };
|
|
177
|
+
const document = read.frontmatter;
|
|
178
|
+
return {
|
|
179
|
+
type: document.type ?? 'any',
|
|
180
|
+
declared,
|
|
181
|
+
queried: true,
|
|
182
|
+
folder,
|
|
183
|
+
fields: JSON.stringify(document.fields),
|
|
184
|
+
...typedRows(path, content, document, composition),
|
|
185
|
+
};
|
|
145
186
|
}
|
package/dist/save.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Validation } from '@agentshouse/mdmodel';
|
|
2
|
+
import type { OperationScopes, ProviderLimit } from './adapter.js';
|
|
2
3
|
import { type Change, type ChangeBatch, type Precondition, type WrittenBy } from './change.js';
|
|
3
4
|
import { type Composition } from './collection.js';
|
|
4
5
|
import { type Layer } from './overlay.js';
|
|
@@ -25,15 +26,23 @@ export type SaveInput = {
|
|
|
25
26
|
bases: readonly Precondition[];
|
|
26
27
|
queued?: ReadonlySet<string>;
|
|
27
28
|
writtenBy?: WrittenBy;
|
|
29
|
+
unmodeled: boolean;
|
|
30
|
+
validate: Validator;
|
|
28
31
|
};
|
|
29
|
-
export type
|
|
30
|
-
|
|
31
|
-
batch: ChangeBatch;
|
|
32
|
-
} | {
|
|
32
|
+
export type Validator = (resulting: Layer, touched: readonly string[]) => Promise<Validation>;
|
|
33
|
+
type Refusing = {
|
|
33
34
|
kind: 'refused';
|
|
34
35
|
refusal: SaveRefusal;
|
|
35
36
|
};
|
|
36
|
-
export
|
|
37
|
+
export type BatchResult = {
|
|
38
|
+
kind: 'batch';
|
|
39
|
+
batch: ChangeBatch;
|
|
40
|
+
} | Refusing;
|
|
41
|
+
export declare function providerRewritten(batch: ChangeBatch, visible: VisibleLayer): Generator<number, ChangeBatch, void>;
|
|
42
|
+
export declare function leavingRewritten(batch: ChangeBatch, visible: VisibleLayer): Generator<number, ChangeBatch, void>;
|
|
43
|
+
export declare function rewriting(batch: ChangeBatch, locator: string): boolean;
|
|
44
|
+
export declare function effectiveIn(batch: ChangeBatch, locator: string, visible: VisibleLayer): Generator<number, ChangeBatch, void>;
|
|
45
|
+
export declare function queuedDocuments(queue: readonly ChangeBatch[]): ReadonlySet<string>;
|
|
37
46
|
export type Requeued = {
|
|
38
47
|
kind: 'requeued';
|
|
39
48
|
queue: readonly ChangeBatch[];
|
|
@@ -53,8 +62,40 @@ export type Joining = {
|
|
|
53
62
|
kind: 'refused';
|
|
54
63
|
refusal: SaveRefusal;
|
|
55
64
|
};
|
|
56
|
-
|
|
65
|
+
type VisibleOver = (queue: readonly ChangeBatch[]) => Generator<number, VisibleLayer, void>;
|
|
66
|
+
export declare function requeuing(queue: readonly ChangeBatch[], changes: readonly Change[], visible: VisibleLayer, changeable: (batch: ChangeBatch) => boolean, state: VisibleOver): Generator<number, Requeued, void>;
|
|
57
67
|
export declare function joined(queue: readonly ChangeBatch[], owner: ChangeBatch, extra: ChangeBatch): Joining;
|
|
58
|
-
export declare function
|
|
59
|
-
export declare
|
|
68
|
+
export declare function limiting(queue: readonly ChangeBatch[], batch: ChangeBatch, limits: readonly ProviderLimit[], state: VisibleOver): Generator<number, SaveRefusal | null, void>;
|
|
69
|
+
export declare const MOVE_DOCUMENTS = "move-documents";
|
|
70
|
+
export type MoveSide = {
|
|
71
|
+
room: string;
|
|
72
|
+
handle: string;
|
|
73
|
+
baseRoomVersion: string;
|
|
74
|
+
composition: Composition;
|
|
75
|
+
operations: OperationScopes;
|
|
76
|
+
providerOwnedPaths: readonly string[];
|
|
77
|
+
visible: VisibleLayer;
|
|
78
|
+
queued: ReadonlySet<string>;
|
|
79
|
+
unmodeled: boolean;
|
|
80
|
+
validate: Validator;
|
|
81
|
+
};
|
|
82
|
+
export type MoveInput = {
|
|
83
|
+
source: MoveSide;
|
|
84
|
+
destination: MoveSide;
|
|
85
|
+
moves: readonly {
|
|
86
|
+
readonly path: string;
|
|
87
|
+
readonly to: string;
|
|
88
|
+
}[];
|
|
89
|
+
providerLimits: readonly ProviderLimit[];
|
|
90
|
+
local: boolean;
|
|
91
|
+
writtenBy?: WrittenBy;
|
|
92
|
+
};
|
|
93
|
+
export type MoveResult = {
|
|
94
|
+
kind: 'moved';
|
|
95
|
+
leaving: ChangeBatch;
|
|
96
|
+
arriving: ChangeBatch;
|
|
97
|
+
} | Refusing;
|
|
98
|
+
export declare function buildMove(input: MoveInput): Promise<MoveResult>;
|
|
99
|
+
export declare function buildBatch(input: SaveInput): Promise<BatchResult>;
|
|
100
|
+
export {};
|
|
60
101
|
//# sourceMappingURL=save.d.ts.map
|
package/dist/save.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"save.d.ts","sourceRoot":"","sources":["../src/save.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"save.d.ts","sourceRoot":"","sources":["../src/save.ts"],"names":[],"mappings":"AACA,OAAO,EAkBL,KAAK,UAAU,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAKL,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,YAAY,EAEjB,KAAK,SAAS,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAc,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAInD,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS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