@agentshouse/mdruntime 0.1.0-cf28918c2bf91 → 0.1.0-cf6d5f0a5c9c8
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 +68 -22
- package/README.md +10 -10
- package/dist/adapter.d.ts +58 -25
- 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/bootstrap.d.ts +20 -6
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +89 -35
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +13 -7
- package/dist/client.d.ts +6 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +38 -10
- package/dist/collection.d.ts +6 -11
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +56 -19
- package/dist/connection.d.ts +13 -13
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +643 -542
- package/dist/conversation.d.ts +18 -6
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +179 -78
- package/dist/host.d.ts +8 -1
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +35 -31
- package/dist/identity.d.ts +1 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +7 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/memory.d.ts +12 -5
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +92 -31
- package/dist/model.d.ts +11 -11
- 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/paths.d.ts +0 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +0 -16
- package/dist/query.d.ts +8 -3
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +75 -36
- package/dist/reach.d.ts +40 -0
- package/dist/reach.d.ts.map +1 -0
- package/dist/reach.js +270 -0
- package/dist/react.d.ts +39 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +63 -0
- package/dist/read-side.d.ts +4 -0
- package/dist/read-side.d.ts.map +1 -1
- package/dist/read-side.js +116 -54
- package/dist/refresh.d.ts +12 -1
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +35 -22
- package/dist/replica.d.ts +6 -6
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +41 -36
- package/dist/room-draft.d.ts +3 -0
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +7 -5
- package/dist/rows.d.ts +4 -1
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +82 -39
- package/dist/save.d.ts +1 -2
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +106 -58
- package/dist/store.d.ts +25 -2
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +206 -90
- package/dist/wire.d.ts +52 -16
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +51 -59
- package/package.json +14 -2
package/dist/room-draft.js
CHANGED
|
@@ -174,7 +174,7 @@ function sameField(left, right) {
|
|
|
174
174
|
}
|
|
175
175
|
export function underneath(parts, path, visible) {
|
|
176
176
|
const markdown = visible?.documents[path] ?? null;
|
|
177
|
-
const document = visible?.collection.
|
|
177
|
+
const document = visible?.collection.document(path);
|
|
178
178
|
const report = {};
|
|
179
179
|
const fields = {};
|
|
180
180
|
for (const [name, part] of named(parts.fields)) {
|
|
@@ -288,6 +288,10 @@ export function returnedInto(existing, returned) {
|
|
|
288
288
|
next.removal = removal;
|
|
289
289
|
return next;
|
|
290
290
|
}
|
|
291
|
+
export function moveTarget(move) {
|
|
292
|
+
const to = normalize(move.to);
|
|
293
|
+
return to === null || to === '' ? move.to : to;
|
|
294
|
+
}
|
|
291
295
|
export function changesOf(path, parts) {
|
|
292
296
|
const changes = [];
|
|
293
297
|
const bases = [];
|
|
@@ -317,10 +321,8 @@ export function changesOf(path, parts) {
|
|
|
317
321
|
if (parts.markdown !== undefined) {
|
|
318
322
|
changes.push({ kind: 'replace', path, content: parts.markdown.value });
|
|
319
323
|
}
|
|
320
|
-
if (parts.move !== undefined)
|
|
321
|
-
|
|
322
|
-
changes.push({ kind: 'move', path, to: to === null || to === '' ? parts.move.to : to });
|
|
323
|
-
}
|
|
324
|
+
if (parts.move !== undefined)
|
|
325
|
+
changes.push({ kind: 'move', path, to: moveTarget(parts.move) });
|
|
324
326
|
if (parts.removal !== undefined)
|
|
325
327
|
changes.push({ kind: 'remove', path });
|
|
326
328
|
return { changes, bases };
|
package/dist/rows.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type DocumentRow = {
|
|
|
10
10
|
type: string | null;
|
|
11
11
|
fields: Fields;
|
|
12
12
|
values: Fields;
|
|
13
|
-
|
|
13
|
+
reached: Readonly<Record<string, readonly unknown[]>>;
|
|
14
14
|
directories: readonly string[];
|
|
15
15
|
body: string;
|
|
16
16
|
change: HeadChange | null;
|
|
@@ -31,11 +31,14 @@ export type ReferenceRow = {
|
|
|
31
31
|
source: string;
|
|
32
32
|
target: string;
|
|
33
33
|
field: string;
|
|
34
|
+
forms: readonly string[];
|
|
34
35
|
path: string;
|
|
35
36
|
type: string;
|
|
36
37
|
};
|
|
37
38
|
export type Row = DocumentRow | BodyRow | ReferenceRow;
|
|
38
39
|
export declare function documentKey(room: string, path: string): string;
|
|
40
|
+
export declare function roomOfKey(key: string): string;
|
|
41
|
+
export declare function markdownPath(path: string): boolean;
|
|
39
42
|
export declare function rowsOf(room: string, path: string, document: Document | null, composition: Composition, change: HeadChange | null): readonly Row[];
|
|
40
43
|
export {};
|
|
41
44
|
//# 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":"AAAA,OAAO,
|
|
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E,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,GAAG,GAAG,WAAW,GAAG,OAAO,GAAG,YAAY,CAAC;AAMvD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAmFD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAElD;AAED,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,QAAQ,GAAG,IAAI,EACzB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,UAAU,GAAG,IAAI,GACxB,SAAS,GAAG,EAAE,CAuEhB"}
|
package/dist/rows.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { target } from '@agentshouse/mdmodel';
|
|
1
|
+
import { ARRAY_INDEX, escapePointer, references, target, } from '@agentshouse/mdmodel';
|
|
2
2
|
import { governing } from './collection.js';
|
|
3
3
|
import { definitionOf } from './model.js';
|
|
4
4
|
function keyOf(...parts) {
|
|
@@ -7,27 +7,74 @@ function keyOf(...parts) {
|
|
|
7
7
|
export function documentKey(room, path) {
|
|
8
8
|
return keyOf('d', room, path);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return
|
|
10
|
+
export function roomOfKey(key) {
|
|
11
|
+
return key.split('\u0000')[1];
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return typeof value === '
|
|
13
|
+
function plainObject(value) {
|
|
14
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
function compared(reading, exact, value) {
|
|
17
|
+
if (!reading.references.has(exact))
|
|
18
|
+
return value;
|
|
19
|
+
return (typeof value === 'string' ? target(reading.path, value) : null) ?? undefined;
|
|
20
|
+
}
|
|
21
|
+
function record(reading, node, forms, exact) {
|
|
22
|
+
const value = Array.isArray(node)
|
|
23
|
+
? node.map((item, index) => compared(reading, `${exact}/${index}`, item))
|
|
24
|
+
: compared(reading, exact, node);
|
|
25
|
+
for (const form of forms) {
|
|
26
|
+
if (form.pending)
|
|
27
|
+
continue;
|
|
28
|
+
(reading.reached[form.text] ??= []).push(value);
|
|
29
|
+
if (!form.through && value !== undefined && !plainObject(value)) {
|
|
30
|
+
reading.values[form.text] = value;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (Array.isArray(node) || plainObject(node) || !reading.references.has(exact))
|
|
34
|
+
return;
|
|
35
|
+
const found = compared(reading, exact, node);
|
|
36
|
+
if (typeof found !== 'string')
|
|
37
|
+
return;
|
|
38
|
+
const field = forms
|
|
39
|
+
.map((form) => form.text)
|
|
40
|
+
.reduce((left, right) => (right.length < left.length ? right : left));
|
|
41
|
+
const known = reading.targets.get(`${field}\u0000${found}`);
|
|
42
|
+
const kept = known ?? { field, target: found, forms: new Set() };
|
|
43
|
+
for (const form of forms)
|
|
44
|
+
kept.forms.add(form.text);
|
|
45
|
+
reading.targets.set(`${field}\u0000${found}`, kept);
|
|
46
|
+
}
|
|
47
|
+
function walk(reading, node, forms, exact) {
|
|
48
|
+
record(reading, node, forms, exact);
|
|
49
|
+
if (Array.isArray(node)) {
|
|
50
|
+
node.forEach((item, index) => walk(reading, item, forms.flatMap((form) => [
|
|
51
|
+
...(form.pending
|
|
52
|
+
? []
|
|
53
|
+
: [{ text: `${form.text}/${index}`, through: form.through, pending: false }]),
|
|
54
|
+
{ text: form.text, through: true, pending: true },
|
|
55
|
+
]), `${exact}/${index}`));
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (!plainObject(node))
|
|
59
|
+
return;
|
|
60
|
+
for (const [key, value] of Object.entries(node)) {
|
|
61
|
+
const segment = escapePointer(key);
|
|
62
|
+
walk(reading, value, forms.flatMap((form) => form.pending && ARRAY_INDEX.test(key)
|
|
63
|
+
? []
|
|
64
|
+
: [{ text: `${form.text}/${segment}`, through: form.through, pending: false }]), `${exact}/${segment}`);
|
|
65
|
+
}
|
|
22
66
|
}
|
|
23
67
|
function directoriesOf(path) {
|
|
24
68
|
const parts = path.split('/').slice(0, -1);
|
|
25
69
|
return ['', ...parts.map((_, index) => parts.slice(0, index + 1).join('/'))];
|
|
26
70
|
}
|
|
71
|
+
export function markdownPath(path) {
|
|
72
|
+
return path.endsWith('.md');
|
|
73
|
+
}
|
|
27
74
|
export function rowsOf(room, path, document, composition, change) {
|
|
28
75
|
const key = documentKey(room, path);
|
|
29
76
|
const body = keyOf('b', room, path);
|
|
30
|
-
if (document === null || !path
|
|
77
|
+
if (document === null || !markdownPath(path)) {
|
|
31
78
|
return [
|
|
32
79
|
{
|
|
33
80
|
key,
|
|
@@ -37,7 +84,7 @@ export function rowsOf(room, path, document, composition, change) {
|
|
|
37
84
|
type: null,
|
|
38
85
|
fields: {},
|
|
39
86
|
values: {},
|
|
40
|
-
|
|
87
|
+
reached: {},
|
|
41
88
|
directories: directoriesOf(path),
|
|
42
89
|
body,
|
|
43
90
|
change,
|
|
@@ -46,32 +93,18 @@ export function rowsOf(room, path, document, composition, change) {
|
|
|
46
93
|
}
|
|
47
94
|
const type = document.type ?? 'any';
|
|
48
95
|
const definition = definitionOf(governing(composition, path), document.type);
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
96
|
+
const reading = {
|
|
97
|
+
path,
|
|
98
|
+
references: new Set(definition === undefined ? [] : references(document, definition).map((one) => one.pointer)),
|
|
99
|
+
values: {},
|
|
100
|
+
reached: {},
|
|
101
|
+
targets: new Map(),
|
|
102
|
+
};
|
|
52
103
|
for (const [name, value] of Object.entries(document.fields)) {
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
if (compared !== undefined)
|
|
56
|
-
values[name] = compared;
|
|
57
|
-
if (Array.isArray(value))
|
|
58
|
-
sizes[name] = value.length;
|
|
59
|
-
if (!reference)
|
|
60
|
-
continue;
|
|
61
|
-
const targets = [compared].flat().filter((found) => typeof found === 'string');
|
|
62
|
-
for (const found of new Set(targets)) {
|
|
63
|
-
references.push({
|
|
64
|
-
key: keyOf('r', room, path, name, found),
|
|
65
|
-
kind: 'reference',
|
|
66
|
-
room,
|
|
67
|
-
source: key,
|
|
68
|
-
target: documentKey(room, found),
|
|
69
|
-
field: name,
|
|
70
|
-
path,
|
|
71
|
-
type,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
104
|
+
const segment = escapePointer(name);
|
|
105
|
+
walk(reading, value, [{ text: `/${segment}`, through: false, pending: false }], `/${segment}`);
|
|
74
106
|
}
|
|
107
|
+
const { values, reached } = reading;
|
|
75
108
|
return [
|
|
76
109
|
{
|
|
77
110
|
key,
|
|
@@ -81,7 +114,7 @@ export function rowsOf(room, path, document, composition, change) {
|
|
|
81
114
|
type,
|
|
82
115
|
fields: document.fields,
|
|
83
116
|
values,
|
|
84
|
-
|
|
117
|
+
reached,
|
|
85
118
|
directories: directoriesOf(path),
|
|
86
119
|
body,
|
|
87
120
|
change,
|
|
@@ -95,6 +128,16 @@ export function rowsOf(room, path, document, composition, change) {
|
|
|
95
128
|
sections: document.sections,
|
|
96
129
|
markdown: document.content,
|
|
97
130
|
},
|
|
98
|
-
...
|
|
131
|
+
...[...reading.targets.values()].map(({ field, target: found, forms }) => ({
|
|
132
|
+
key: keyOf('r', room, path, field, found),
|
|
133
|
+
kind: 'reference',
|
|
134
|
+
room,
|
|
135
|
+
source: key,
|
|
136
|
+
target: documentKey(room, found),
|
|
137
|
+
field,
|
|
138
|
+
forms: [...forms].sort(),
|
|
139
|
+
path,
|
|
140
|
+
type,
|
|
141
|
+
})),
|
|
99
142
|
];
|
|
100
143
|
}
|
package/dist/save.d.ts
CHANGED
|
@@ -10,15 +10,14 @@ export type SaveRefusal = {
|
|
|
10
10
|
referrers?: readonly string[];
|
|
11
11
|
parts?: readonly ChangedPart[];
|
|
12
12
|
};
|
|
13
|
-
export type Rewriting = 'runtime' | 'provider';
|
|
14
13
|
export type SaveInput = {
|
|
15
14
|
composition: Composition;
|
|
16
|
-
rewriting: Rewriting;
|
|
17
15
|
baseRoomVersion: string;
|
|
18
16
|
operations: import('./adapter.js').OperationScopes;
|
|
19
17
|
providerOwnedPaths: readonly string[];
|
|
20
18
|
providerLimits: readonly ProviderLimit[];
|
|
21
19
|
visible: VisibleLayer;
|
|
20
|
+
handle: string;
|
|
22
21
|
changes: readonly Change[];
|
|
23
22
|
bases: readonly Precondition[];
|
|
24
23
|
writtenBy?: WrittenBy;
|
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":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAEL,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAML,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,cAAc,EAAE,eAAe,CAAC;IACnD,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,cAAc,EAAE,SAAS,aAAa,EAAE,CAAC;IACzC,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,WAAW,CAAA;CAAE,CAAC;AA+K9C,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,GAAG,WAAW,CAOxF;AAkRD,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,WAAW,CAiFxD"}
|
package/dist/save.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { definitionOf } from './model.js';
|
|
2
|
-
import { apply, links, parse, retarget, serialize, target, } from '@agentshouse/mdmodel';
|
|
2
|
+
import { apply, ATTACHMENT, links, parse, pointerSegments, references, relative, relativize, retarget, serialize, target, } from '@agentshouse/mdmodel';
|
|
3
3
|
import { immutable, } from './change.js';
|
|
4
|
-
import {
|
|
4
|
+
import { collectionOf, documentsOf, governing, validateCollection, } from './collection.js';
|
|
5
5
|
import { changeBatchIdentity } from './identity.js';
|
|
6
6
|
import { overlay } from './overlay.js';
|
|
7
|
-
import { covered, normalize
|
|
7
|
+
import { covered, normalize } from './paths.js';
|
|
8
8
|
function refuse(rule, file, location) {
|
|
9
9
|
return {
|
|
10
10
|
kind: 'refused',
|
|
@@ -15,21 +15,34 @@ function refuse(rule, file, location) {
|
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
function repointed(document, definition, from, to, moves, settled) {
|
|
19
|
+
const parsed = parse(document.content, from);
|
|
20
|
+
if (!parsed.ok)
|
|
21
|
+
return [];
|
|
22
|
+
let next = parsed.document;
|
|
23
|
+
const names = new Set();
|
|
24
|
+
for (const { pointer, value } of definition === undefined
|
|
25
|
+
? []
|
|
26
|
+
: references(document, definition)) {
|
|
27
|
+
const [name = ''] = pointerSegments(pointer);
|
|
28
|
+
const named = target(from, value);
|
|
29
|
+
if (named === null || settled.has(`${from} ${name}`))
|
|
30
|
+
continue;
|
|
31
|
+
const destination = moves.get(named) ?? named;
|
|
32
|
+
if (target(to, value) === destination)
|
|
33
|
+
continue;
|
|
34
|
+
const applied = apply(next, {
|
|
35
|
+
kind: 'reference',
|
|
36
|
+
pointer,
|
|
37
|
+
value: retarget(value, relative(to, destination)),
|
|
38
|
+
prior: value,
|
|
39
|
+
});
|
|
40
|
+
if (applied.outcome !== 'applied')
|
|
41
|
+
continue;
|
|
42
|
+
next = applied.document;
|
|
43
|
+
names.add(name);
|
|
25
44
|
}
|
|
26
|
-
|
|
27
|
-
return undefined;
|
|
28
|
-
const named = target(from, value);
|
|
29
|
-
if (named === null)
|
|
30
|
-
return undefined;
|
|
31
|
-
const destination = moves.get(named) ?? named;
|
|
32
|
-
return target(to, value) === destination ? undefined : retarget(value, relative(to, destination));
|
|
45
|
+
return [...names].map((name) => ({ kind: 'field', path: from, name, value: next.fields[name] }));
|
|
33
46
|
}
|
|
34
47
|
function edited(document, path, changes) {
|
|
35
48
|
let next = document;
|
|
@@ -117,19 +130,12 @@ function rewrites(changes, visible) {
|
|
|
117
130
|
return { kind: 'changes', changes };
|
|
118
131
|
const merged = [...changes];
|
|
119
132
|
const added = [];
|
|
120
|
-
for (const [path, document] of
|
|
133
|
+
for (const [path, document] of documentsOf(visible.collection)) {
|
|
121
134
|
if (settled.has(path))
|
|
122
135
|
continue;
|
|
123
136
|
const moved = moves.get(path) ?? path;
|
|
124
137
|
const definition = definitionOf(governing(visible.collection.composition, path), document.type);
|
|
125
|
-
|
|
126
|
-
if (!referenceField(spec) || settled.has(`${path} ${name}`))
|
|
127
|
-
continue;
|
|
128
|
-
const value = repointed(document.fields[name], path, moved, moves);
|
|
129
|
-
if (value === undefined)
|
|
130
|
-
continue;
|
|
131
|
-
added.push({ kind: 'field', path, name, value });
|
|
132
|
-
}
|
|
138
|
+
added.push(...repointed(document, definition, path, moved, moves, settled));
|
|
133
139
|
const relinked = relinks(path, moved, edited(document, path, merged), moves);
|
|
134
140
|
if (relinked.kind === 'refused')
|
|
135
141
|
return relinked;
|
|
@@ -166,18 +172,6 @@ export function providerRewritten(batch, visible) {
|
|
|
166
172
|
...anticipated(batch.changes, batch.preconditions, rewritten.changes, visible),
|
|
167
173
|
};
|
|
168
174
|
}
|
|
169
|
-
function targets(value, from) {
|
|
170
|
-
const values = Array.isArray(value) ? value : [value];
|
|
171
|
-
const resolved = [];
|
|
172
|
-
for (const item of values) {
|
|
173
|
-
if (typeof item !== 'string')
|
|
174
|
-
continue;
|
|
175
|
-
const named = target(from, item);
|
|
176
|
-
if (named !== null)
|
|
177
|
-
resolved.push(named);
|
|
178
|
-
}
|
|
179
|
-
return resolved;
|
|
180
|
-
}
|
|
181
175
|
function incoming(collection, removed) {
|
|
182
176
|
const found = new Map();
|
|
183
177
|
const note = (target, file) => {
|
|
@@ -187,16 +181,15 @@ function incoming(collection, removed) {
|
|
|
187
181
|
referrers.add(file);
|
|
188
182
|
found.set(target, referrers);
|
|
189
183
|
};
|
|
190
|
-
for (const [path, document] of
|
|
184
|
+
for (const [path, document] of documentsOf(collection)) {
|
|
191
185
|
const definition = definitionOf(governing(collection.composition, path), document.type);
|
|
192
|
-
for (const
|
|
193
|
-
if (
|
|
186
|
+
for (const { value, to } of definition === undefined ? [] : references(document, definition)) {
|
|
187
|
+
if (to.includes(ATTACHMENT))
|
|
194
188
|
continue;
|
|
195
|
-
|
|
189
|
+
const named = target(path, value);
|
|
190
|
+
if (named !== null)
|
|
196
191
|
note(named, path);
|
|
197
192
|
}
|
|
198
|
-
for (const link of links(document, path))
|
|
199
|
-
note(link.target, path);
|
|
200
193
|
}
|
|
201
194
|
const [first] = [...found.keys()].sort();
|
|
202
195
|
if (first === undefined)
|
|
@@ -263,7 +256,7 @@ function guard(changes, input) {
|
|
|
263
256
|
}
|
|
264
257
|
continue;
|
|
265
258
|
}
|
|
266
|
-
if (input.visible.collection.
|
|
259
|
+
if (input.visible.collection.document(change.path) === undefined) {
|
|
267
260
|
return refuse('path-absent', change.path);
|
|
268
261
|
}
|
|
269
262
|
}
|
|
@@ -300,7 +293,7 @@ function preconditionsOf(changes, visible, bases) {
|
|
|
300
293
|
add(based);
|
|
301
294
|
continue;
|
|
302
295
|
}
|
|
303
|
-
const document = visible.collection.
|
|
296
|
+
const document = visible.collection.document(change.path);
|
|
304
297
|
if (change.kind === 'field') {
|
|
305
298
|
add({
|
|
306
299
|
kind: 'field',
|
|
@@ -368,32 +361,87 @@ function exceeded(limits, changes, resulting) {
|
|
|
368
361
|
}
|
|
369
362
|
return null;
|
|
370
363
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
364
|
+
function shellRelative(text, path, handle, definition) {
|
|
365
|
+
if (!text.includes(`/rooms/${handle}/`))
|
|
366
|
+
return null;
|
|
367
|
+
const parsed = parse(text, path);
|
|
368
|
+
if (!parsed.ok)
|
|
369
|
+
return null;
|
|
370
|
+
const result = relativize(parsed.document, path, handle, definition(parsed.document.type));
|
|
371
|
+
return result.outcome === 'applied' && result.document.content !== text ? result.document : null;
|
|
372
|
+
}
|
|
373
|
+
function relativeField(path, name, value, handle, definition) {
|
|
374
|
+
const opened = parse('---\n---\n');
|
|
375
|
+
if (definition === undefined ||
|
|
376
|
+
!opened.ok ||
|
|
377
|
+
!JSON.stringify(value ?? null).includes(`/rooms/${handle}/`))
|
|
378
|
+
return value;
|
|
379
|
+
const held = apply(opened.document, { kind: 'field', name, value, prior: undefined });
|
|
380
|
+
if (held.outcome !== 'applied')
|
|
381
|
+
return value;
|
|
382
|
+
const result = relativize(held.document, path, handle, definition);
|
|
383
|
+
return result.outcome === 'applied' ? result.document.fields[name] : value;
|
|
384
|
+
}
|
|
385
|
+
function relativeChanges(input) {
|
|
386
|
+
const { handle, composition, visible } = input;
|
|
387
|
+
const typed = (path) => (type) => definitionOf(governing(composition, path), type);
|
|
388
|
+
const body = (path, text) => shellRelative(text, path, handle, () => undefined)?.content ?? text;
|
|
389
|
+
return input.changes.map((change) => {
|
|
390
|
+
const definition = typed(change.path);
|
|
391
|
+
if (change.kind === 'field') {
|
|
392
|
+
const type = visible.collection.document(change.path)?.type;
|
|
393
|
+
const value = relativeField(change.path, change.name, change.value, handle, definition(type));
|
|
394
|
+
return value === change.value ? change : { ...change, value };
|
|
395
|
+
}
|
|
396
|
+
if (change.kind === 'section' || change.kind === 'preamble') {
|
|
397
|
+
const value = body(change.path, change.value);
|
|
398
|
+
return value === change.value ? change : { ...change, value };
|
|
399
|
+
}
|
|
400
|
+
if (change.kind === 'replace' || (change.kind === 'create' && 'content' in change)) {
|
|
401
|
+
const content = shellRelative(change.content, change.path, handle, definition)?.content ?? change.content;
|
|
402
|
+
return content === change.content ? change : { ...change, content };
|
|
403
|
+
}
|
|
404
|
+
if (change.kind !== 'create')
|
|
405
|
+
return change;
|
|
406
|
+
const type = typeof change.fields.type === 'string' ? change.fields.type : undefined;
|
|
407
|
+
const fields = Object.fromEntries(Object.entries(change.fields).map(([name, value]) => [
|
|
408
|
+
name,
|
|
409
|
+
relativeField(change.path, name, value, handle, definition(type)),
|
|
410
|
+
]));
|
|
411
|
+
const sections = Object.fromEntries(Object.entries(change.sections).map(([name, value]) => [name, body(change.path, value)]));
|
|
412
|
+
return { ...change, fields, sections };
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
function unmodeledType(collection, composition) {
|
|
416
|
+
for (const [path, document] of documentsOf(collection)) {
|
|
417
|
+
if (document.type !== undefined &&
|
|
375
418
|
document.type !== 'any' &&
|
|
376
|
-
governing(
|
|
419
|
+
governing(composition, path).status === 'unavailable')
|
|
420
|
+
return true;
|
|
421
|
+
}
|
|
422
|
+
return false;
|
|
423
|
+
}
|
|
424
|
+
export function buildBatch(input) {
|
|
425
|
+
const changes = relativeChanges(input);
|
|
426
|
+
const structural = changes.find((change) => change.kind === 'move' || change.kind === 'remove');
|
|
427
|
+
if (structural !== undefined && unmodeledType(input.visible.collection, input.composition))
|
|
377
428
|
return refuse('model-unavailable', structural.path);
|
|
378
|
-
if (
|
|
429
|
+
if (changes.length === 0)
|
|
379
430
|
return refuse('no-change');
|
|
380
|
-
const rewritten = rewrites(
|
|
431
|
+
const rewritten = rewrites(changes, input.visible);
|
|
381
432
|
if (rewritten.kind === 'refused')
|
|
382
433
|
return rewritten;
|
|
383
|
-
const changes = input.rewriting === 'provider' ? input.changes : rewritten.changes;
|
|
384
434
|
const refusal = guard(changes, input);
|
|
385
435
|
if (refusal !== null)
|
|
386
436
|
return refusal;
|
|
387
437
|
const preconditions = preconditionsOf(changes, input.visible, input.bases);
|
|
388
|
-
const predicted = input.
|
|
389
|
-
? anticipated(changes, preconditions, rewritten.changes, input.visible)
|
|
390
|
-
: { changes, preconditions };
|
|
438
|
+
const predicted = anticipated(changes, preconditions, rewritten.changes, input.visible);
|
|
391
439
|
const resulting = overlay(input.visible, [
|
|
392
440
|
{ id: '', baseRoomVersion: input.baseRoomVersion, ...predicted },
|
|
393
441
|
]);
|
|
394
442
|
const removed = new Set(changes.filter((change) => change.kind === 'remove').map((change) => change.path));
|
|
395
443
|
if (removed.size > 0) {
|
|
396
|
-
const referenced = incoming(
|
|
444
|
+
const referenced = incoming(collectionOf(resulting.documents, input.composition), removed);
|
|
397
445
|
if (referenced !== null)
|
|
398
446
|
return referenced;
|
|
399
447
|
}
|
package/dist/store.d.ts
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import type { ModelState } from './model.js';
|
|
2
|
-
import type { Capability, HeadChange, OperationScopes, ProviderLimit, ReplicaAdmission, RoomAttachment, TypedSelection } from './adapter.js';
|
|
2
|
+
import type { Capability, HeadChange, Member, OperationScopes, ProviderLimit, ReplicaAdmission, RoomAttachment, TypedSelection } from './adapter.js';
|
|
3
3
|
import type { AcceptedMessage } from './adapter.js';
|
|
4
4
|
import type { ChangeBatch } from './change.js';
|
|
5
5
|
import type { ChatDraftFile } from './file.js';
|
|
6
6
|
import type { Submission } from './outcome.js';
|
|
7
7
|
import type { RoomDraftRecord, SavedDraft } from './room-draft.js';
|
|
8
|
+
export declare const STORE_SCHEMA = 21;
|
|
8
9
|
export type ReplicaRecord = {
|
|
9
10
|
locator: string;
|
|
10
11
|
name: string;
|
|
12
|
+
handle: string;
|
|
11
13
|
operations: OperationScopes;
|
|
12
14
|
replica: ReplicaAdmission;
|
|
13
15
|
model: ModelState;
|
|
14
|
-
attachedModel: import('./model.js').ModelIdentity | null;
|
|
15
16
|
typedSelection: TypedSelection | null;
|
|
16
17
|
selectionModel: ModelState;
|
|
17
18
|
providerOwnedPaths: readonly string[];
|
|
18
19
|
roomVersion: string;
|
|
20
|
+
transfer: string;
|
|
19
21
|
documents: Readonly<Record<string, string>>;
|
|
20
22
|
binaryTargets: readonly string[];
|
|
21
23
|
revisions: Readonly<Record<string, string>>;
|
|
@@ -23,6 +25,20 @@ export type ReplicaRecord = {
|
|
|
23
25
|
written: Readonly<Record<string, string>>;
|
|
24
26
|
attachments: readonly RoomAttachment[];
|
|
25
27
|
};
|
|
28
|
+
export type StagedLayer = Pick<ReplicaRecord, 'documents' | 'binaryTargets' | 'revisions' | 'changes' | 'written'>;
|
|
29
|
+
export type TransferRecord = {
|
|
30
|
+
locator: string;
|
|
31
|
+
transfer: string;
|
|
32
|
+
selection: string;
|
|
33
|
+
from: string;
|
|
34
|
+
last: string;
|
|
35
|
+
pageToken: string | null;
|
|
36
|
+
models: {
|
|
37
|
+
collection: ModelState;
|
|
38
|
+
selection: ModelState;
|
|
39
|
+
};
|
|
40
|
+
attachments: readonly (readonly RoomAttachment[])[];
|
|
41
|
+
};
|
|
26
42
|
export type PendingState = {
|
|
27
43
|
readonly drafts: readonly SavedDraft[];
|
|
28
44
|
readonly submission: Submission;
|
|
@@ -61,6 +77,7 @@ export type ChatDraftRecord = {
|
|
|
61
77
|
export type RecordWrite = {
|
|
62
78
|
next: ReplicaRecord;
|
|
63
79
|
previous: ReplicaRecord | null;
|
|
80
|
+
stored?: StagedLayer;
|
|
64
81
|
queue: readonly ChangeBatch[];
|
|
65
82
|
previousQueue?: readonly ChangeBatch[];
|
|
66
83
|
saved?: readonly SavedDraft[];
|
|
@@ -79,6 +96,8 @@ export type RuntimeStore = {
|
|
|
79
96
|
providerLimits(): Promise<readonly ProviderLimit[]>;
|
|
80
97
|
capabilities(): Promise<readonly Capability[]>;
|
|
81
98
|
declare(limits: readonly ProviderLimit[], capabilities: readonly Capability[]): Promise<void>;
|
|
99
|
+
member(): Promise<Member | null>;
|
|
100
|
+
keepMember(member: Member | null): Promise<void>;
|
|
82
101
|
queues(): Promise<readonly QueueRecord[]>;
|
|
83
102
|
submit(locator: string, id: string, submission: Submission, lost: boolean): Promise<void>;
|
|
84
103
|
accept(locator: string, id: string, roomVersion: string): Promise<void>;
|
|
@@ -95,6 +114,10 @@ export type RuntimeStore = {
|
|
|
95
114
|
keepRoomDraft(record: RoomDraftRecord): Promise<void>;
|
|
96
115
|
discardRoomDraft(locator: string, path: string): Promise<void>;
|
|
97
116
|
dropRooms(locators: readonly string[]): Promise<void>;
|
|
117
|
+
transfers(): Promise<readonly TransferRecord[]>;
|
|
118
|
+
staged(record: TransferRecord): Promise<StagedLayer>;
|
|
119
|
+
stage(record: TransferRecord, page: StagedLayer): Promise<void>;
|
|
120
|
+
abandon(locator: string): Promise<void>;
|
|
98
121
|
generation(): Promise<string | null>;
|
|
99
122
|
rememberGeneration(value: string): Promise<void>;
|
|
100
123
|
close(): void;
|
package/dist/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,MAAM,EACN,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAiBnE,eAAO,MAAM,YAAY,KAAK,CAAC;A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