@agentshouse/mdruntime 0.1.0-cdf6e063566ab → 0.1.0-cdf8ca5c0fa11
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/README.md +1 -1
- package/dist/acceptance.d.ts.map +1 -1
- package/dist/acceptance.js +30 -1
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +35 -7
- package/dist/adapter.d.ts +71 -16
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attached-model.d.ts.map +1 -1
- package/dist/attached-model.js +2 -2
- package/dist/{binary.d.ts → attachment.d.ts} +8 -4
- package/dist/attachment.d.ts.map +1 -0
- package/dist/attachment.js +15 -0
- package/dist/authored.d.ts.map +1 -1
- package/dist/authored.js +2 -0
- package/dist/chain.d.ts +1 -1
- package/dist/chain.d.ts.map +1 -1
- package/dist/chain.js +5 -2
- package/dist/change.d.ts +2 -2
- package/dist/chat-types.js +2 -2
- package/dist/client.d.ts +11 -6
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +16 -15
- package/dist/collection.d.ts +1 -0
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +7 -1
- package/dist/compile.d.ts +2 -1
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +71 -39
- package/dist/connection.d.ts +1 -1
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +5 -3
- package/dist/conversation-live.d.ts +2 -3
- package/dist/conversation-live.d.ts.map +1 -1
- package/dist/conversation-live.js +2 -2
- package/dist/conversation.d.ts +13 -7
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +35 -20
- package/dist/declaration.js +3 -3
- package/dist/discovery.d.ts +1 -1
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +21 -3
- package/dist/download.d.ts +2 -2
- package/dist/download.d.ts.map +1 -1
- package/dist/entry.d.ts +22 -3
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +111 -45
- package/dist/figures.d.ts +1 -1
- package/dist/figures.d.ts.map +1 -1
- package/dist/figures.js +2 -2
- package/dist/host.d.ts +6 -2
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +51 -21
- package/dist/house-query.d.ts +24 -0
- package/dist/house-query.d.ts.map +1 -0
- package/dist/house-query.js +102 -0
- package/dist/identity.d.ts +1 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +1 -1
- package/dist/index.d.ts +16 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/lifecycle.d.ts +1 -1
- package/dist/lifecycle.d.ts.map +1 -1
- package/dist/lifecycle.js +21 -13
- package/dist/listing.d.ts +1 -0
- package/dist/listing.d.ts.map +1 -1
- package/dist/live.d.ts +14 -0
- package/dist/live.d.ts.map +1 -1
- package/dist/live.js +29 -12
- package/dist/loaded.d.ts +5 -3
- package/dist/loaded.d.ts.map +1 -1
- package/dist/loaded.js +12 -6
- package/dist/locks.d.ts.map +1 -1
- package/dist/locks.js +2 -0
- package/dist/media.d.ts +5 -6
- package/dist/media.d.ts.map +1 -1
- package/dist/media.js +94 -25
- package/dist/memory.d.ts +2 -2
- package/dist/memory.js +9 -9
- package/dist/messages.d.ts +6 -1
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +10 -1
- package/dist/model.d.ts +6 -5
- package/dist/model.d.ts.map +1 -1
- package/dist/name.d.ts +0 -1
- package/dist/name.d.ts.map +1 -1
- package/dist/name.js +3 -7
- package/dist/online.d.ts +7 -0
- package/dist/online.d.ts.map +1 -0
- package/dist/online.js +29 -0
- package/dist/opened.d.ts +5 -5
- package/dist/opened.d.ts.map +1 -1
- package/dist/opened.js +2 -2
- package/dist/opening.d.ts.map +1 -1
- package/dist/opening.js +18 -2
- package/dist/outcome.d.ts +21 -13
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +5 -5
- package/dist/overlay.d.ts +19 -8
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +108 -37
- package/dist/parts.d.ts +3 -1
- package/dist/parts.d.ts.map +1 -1
- package/dist/parts.js +30 -7
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +1 -1
- package/dist/preparation.d.ts +10 -5
- package/dist/preparation.d.ts.map +1 -1
- package/dist/preparation.js +78 -48
- package/dist/queries.d.ts.map +1 -1
- package/dist/queries.js +75 -53
- package/dist/query.d.ts +2 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/questions.d.ts.map +1 -1
- package/dist/questions.js +2 -1
- package/dist/reach.d.ts +11 -1
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +97 -23
- package/dist/readiness.d.ts +17 -4
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +17 -7
- package/dist/reads.d.ts.map +1 -1
- package/dist/reads.js +15 -4
- package/dist/reference-forms.d.ts +4 -0
- package/dist/reference-forms.d.ts.map +1 -0
- package/dist/reference-forms.js +74 -0
- package/dist/refresh.d.ts +1 -1
- package/dist/refresh.js +4 -4
- package/dist/replica.d.ts +3 -8
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +3 -3
- package/dist/room-draft.d.ts +1 -1
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +9 -6
- package/dist/room-drafts.d.ts.map +1 -1
- package/dist/room-drafts.js +8 -6
- package/dist/rows.d.ts +9 -1
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +18 -4
- package/dist/running.d.ts +5 -0
- package/dist/running.d.ts.map +1 -0
- package/dist/running.js +10 -0
- package/dist/runtime.d.ts +4 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/save.d.ts +1 -0
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +6 -6
- package/dist/saves.d.ts +5 -5
- package/dist/saves.d.ts.map +1 -1
- package/dist/saves.js +71 -45
- package/dist/selector.d.ts +3 -0
- package/dist/selector.d.ts.map +1 -0
- package/dist/selector.js +22 -0
- package/dist/shown.d.ts.map +1 -1
- package/dist/shown.js +17 -4
- package/dist/socket/session.d.ts +4 -1
- package/dist/socket/session.d.ts.map +1 -1
- package/dist/socket/session.js +3 -0
- package/dist/socket.d.ts +1 -0
- package/dist/socket.d.ts.map +1 -1
- package/dist/socket.js +1 -0
- package/dist/source.d.ts +2 -0
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +2 -0
- package/dist/store/records.d.ts +15 -5
- package/dist/store/records.d.ts.map +1 -1
- package/dist/store/records.js +12 -4
- package/dist/store.d.ts +3 -2
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +4 -1
- package/dist/stored.d.ts +17 -3
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +138 -31
- package/dist/surface.d.ts +4 -2
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +7 -3
- package/dist/sync.d.ts +2 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +26 -18
- package/dist/tables.d.ts +14 -2
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +10 -3
- package/dist/tallies.js +2 -2
- package/dist/validation.d.ts +2 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +49 -3
- package/dist/wire.d.ts +14 -6
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +12 -11
- package/package.json +4 -4
- package/dist/binary.d.ts.map +0 -1
- package/dist/binary.js +0 -8
package/dist/reach.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { ListedRoom } from './listing.js';
|
|
2
2
|
import type { ReadinessMessage, ReadinessPort } from './preparation.js';
|
|
3
|
+
import { type CodeAvailability } from './readiness.js';
|
|
3
4
|
import type { MdRuntime, RuntimeTopic } from './surface.js';
|
|
5
|
+
import type { QueriedRoom } from './adapter.js';
|
|
4
6
|
import type { Plan, PlanReach, QueryResult } from './query.js';
|
|
5
7
|
import type { SearchResult } from './search.js';
|
|
8
|
+
import type { HouseQueryResult } from './house-query.js';
|
|
6
9
|
export type ReachedDocument = {
|
|
7
10
|
readonly room: string;
|
|
8
11
|
readonly path: string;
|
|
@@ -16,6 +19,7 @@ export type PortReach = {
|
|
|
16
19
|
readonly rooms: readonly string[];
|
|
17
20
|
readonly documents: readonly ReachedDocument[];
|
|
18
21
|
readonly areas?: readonly ReachedArea[];
|
|
22
|
+
readonly queriesOnly?: readonly QueriedRoom[];
|
|
19
23
|
readonly conversations: boolean;
|
|
20
24
|
};
|
|
21
25
|
export type Deliver = (message: unknown) => void;
|
|
@@ -27,12 +31,16 @@ export type RuntimeView = {
|
|
|
27
31
|
};
|
|
28
32
|
export type NarrowedView = RuntimeView & {
|
|
29
33
|
narrow(reach: PortReach | null): void;
|
|
34
|
+
code(code: CodeAvailability): void;
|
|
35
|
+
close(): void;
|
|
30
36
|
};
|
|
31
37
|
export type Reachable = RuntimeView & {
|
|
32
38
|
plan(input: unknown, reach: PortReach | null): Promise<Plan>;
|
|
33
39
|
query(plan: Plan): Promise<QueryResult>;
|
|
34
40
|
watchPlan(plan: Plan, deliver: Deliver, fail: Fail): () => void;
|
|
35
41
|
search(input: unknown, reach: PortReach | null): Promise<SearchResult>;
|
|
42
|
+
queryHouse(input: unknown, reach: PortReach | null, options: unknown): Promise<HouseQueryResult>;
|
|
43
|
+
queried(): readonly QueriedRoom[];
|
|
36
44
|
watchReadiness(port: ReadinessPort, reach: PortReach | null, deliver: (readiness: ReadinessMessage) => void): () => void;
|
|
37
45
|
locked(room: string): Promise<boolean>;
|
|
38
46
|
lockedRooms(): Promise<readonly string[]>;
|
|
@@ -40,6 +48,8 @@ export type Reachable = RuntimeView & {
|
|
|
40
48
|
located(room: string, path: string, destination: string): Promise<ReachedDocument | null>;
|
|
41
49
|
room(locator: string): Promise<ListedRoom | undefined>;
|
|
42
50
|
};
|
|
51
|
+
export declare function queriedOf(reach: PortReach | null, provided: readonly QueriedRoom[]): readonly QueriedRoom[];
|
|
52
|
+
export declare function queriedOnly(reach: PortReach | null, provided: readonly QueriedRoom[], room: string): boolean;
|
|
43
53
|
export declare function holds(reach: PortReach | null, room: string): boolean;
|
|
44
54
|
export declare function governs(reach: PortReach | null, room: {
|
|
45
55
|
readonly locator: string;
|
|
@@ -51,5 +61,5 @@ export declare function governs(reach: PortReach | null, room: {
|
|
|
51
61
|
readonly selection: boolean;
|
|
52
62
|
};
|
|
53
63
|
export declare function planReach(reach: PortReach | null): PlanReach | null;
|
|
54
|
-
export declare function narrowed(runtime: Reachable, given: PortReach | null,
|
|
64
|
+
export declare function narrowed(runtime: Reachable, given: PortReach | null, attached: ReadinessPort): NarrowedView;
|
|
55
65
|
//# sourceMappingURL=reach.d.ts.map
|
package/dist/reach.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reach.d.ts","sourceRoot":"","sources":["../src/reach.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,UAAU,EAA4B,MAAM,cAAc,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAe,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"reach.d.ts","sourceRoot":"","sources":["../src/reach.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,UAAU,EAA4B,MAAM,cAAc,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAA4C,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEjG,OAAO,KAAK,EAAE,SAAS,EAAe,YAAY,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,KAAK,EAAsB,WAAW,EAAE,MAAM,cAAc,CAAC;AA4BpE,OAAO,KAAK,EAAiB,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAS9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kB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AC;AAwCF,wBAAgB,SAAS,CACvB,KAAK,EAAE,SAAS,GAAG,IAAI,EACvB,QAAQ,EAAE,SAAS,WAAW,EAAE,GAC/B,SAAS,WAAW,EAAE,CAExB;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,GAAG,IAAI,EACvB,QAAQ,EAAE,SAAS,WAAW,EAAE,EAChC,IAAI,EAAE,MAAM,GACX,OAAO,CAET;AA+BD,wBAAgB,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAMpE;AAMD,wBAAgB,OAAO,CACrB,KAAK,EAAE,SAAS,GAAG,IAAI,EACvB,IAAI,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,cAAc,EAAE;QAAE,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,GAAG,IAAI,CAAA;CAAE,GAC/F;IAAE,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAS/D;AAmDD,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAcnE;AA6JD,wBAAgB,QAAQ,CACtB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,SAAS,GAAG,IAAI,EACvB,QAAQ,EAAE,aAAa,GACtB,YAAY,CAgcd"}
|
package/dist/reach.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { QueryError } from '@agentshouse/mdmodel';
|
|
2
|
-
import {
|
|
2
|
+
import { inboxRooms, INBOXES_LISTED, INBOXES_READ } from './readiness.js';
|
|
3
|
+
import { selected, typesPrint } from './collection.js';
|
|
3
4
|
import { unheldView } from './conversation.js';
|
|
4
|
-
import { modelTypes, NO_MODEL } from './model.js';
|
|
5
|
+
import { modelResult, modelTypes, NO_MODEL } from './model.js';
|
|
5
6
|
import { changeOf, digestApplied, digestOf, observing, unchanged, } from './observation.js';
|
|
6
7
|
import { runtimeError, uncaught } from './failure.js';
|
|
7
|
-
import {
|
|
8
|
+
import { absentAttachment, failure, lockedRoom, ROOM_LOCKED, undeclared, UNREADABLE, } from './outcome.js';
|
|
8
9
|
import { beneath } from './paths.js';
|
|
9
10
|
import { moveTarget, readParts, staleWrite, } from './room-draft.js';
|
|
10
11
|
import { documentKey } from './rows.js';
|
|
@@ -24,13 +25,13 @@ const NO_CONVERSATION = {
|
|
|
24
25
|
takeOut: unconversed('conversations/take-out'),
|
|
25
26
|
decide: unconversed('agent-functions/decide'),
|
|
26
27
|
rename: unconversed('conversations/rename'),
|
|
27
|
-
|
|
28
|
+
set: unconversed('conversations/set'),
|
|
28
29
|
retry: unconversed('conversations/retry'),
|
|
29
30
|
pin: () => Promise.resolve(),
|
|
30
31
|
openTurn: () => Promise.resolve(),
|
|
31
32
|
dismissSuggestion: () => Promise.resolve(),
|
|
32
33
|
attach: () => Promise.resolve(undeclared('conversation.attach')),
|
|
33
|
-
attachment: (link) => Promise.resolve(
|
|
34
|
+
attachment: (link) => Promise.resolve(absentAttachment(link)),
|
|
34
35
|
};
|
|
35
36
|
const NO_CHAT_DRAFT = {
|
|
36
37
|
write: () => Promise.resolve(),
|
|
@@ -41,6 +42,31 @@ const NO_CHAT_DRAFT = {
|
|
|
41
42
|
function areasOf(reach) {
|
|
42
43
|
return reach.areas ?? [];
|
|
43
44
|
}
|
|
45
|
+
export function queriedOf(reach, provided) {
|
|
46
|
+
return reach === null ? provided : (reach.queriesOnly ?? []);
|
|
47
|
+
}
|
|
48
|
+
export function queriedOnly(reach, provided, room) {
|
|
49
|
+
return queriedOf(reach, provided).some((queried) => queried.locator === room);
|
|
50
|
+
}
|
|
51
|
+
function queriedRoom({ name, locator, handle }) {
|
|
52
|
+
return {
|
|
53
|
+
name,
|
|
54
|
+
locator,
|
|
55
|
+
handle,
|
|
56
|
+
queriesOnly: true,
|
|
57
|
+
operations: { write: [], erase: [] },
|
|
58
|
+
replica: { selection: locator, admission: 'unavailable', offline: 'locked' },
|
|
59
|
+
model: modelResult(NO_MODEL, typesPrint),
|
|
60
|
+
typedSelection: null,
|
|
61
|
+
providerOwnedPaths: [],
|
|
62
|
+
authoredPaths: [],
|
|
63
|
+
roomVersion: null,
|
|
64
|
+
documents: 0,
|
|
65
|
+
synchronizationAvailable: false,
|
|
66
|
+
refusal: null,
|
|
67
|
+
locked: false,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
44
70
|
function fenced(reach, room, path) {
|
|
45
71
|
return areasOf(reach).some((area) => area.room === room &&
|
|
46
72
|
beneath(area.path, path) &&
|
|
@@ -76,7 +102,19 @@ function conversing(reach) {
|
|
|
76
102
|
function roomsAwaited(error, reach) {
|
|
77
103
|
return error.code === 'unknown-type' && reach !== null && reach.rooms.length === 0;
|
|
78
104
|
}
|
|
105
|
+
function queriedIn(input, reach, provided) {
|
|
106
|
+
const rooms = input?.rooms;
|
|
107
|
+
return Array.isArray(rooms)
|
|
108
|
+
? rooms.find((room) => typeof room === 'string' && queriedOnly(reach, provided, room))
|
|
109
|
+
: undefined;
|
|
110
|
+
}
|
|
79
111
|
async function planInReach(runtime, input, reach, answered) {
|
|
112
|
+
const queried = queriedIn(input, reach, runtime.queried());
|
|
113
|
+
if (queried !== undefined) {
|
|
114
|
+
if (answered)
|
|
115
|
+
return null;
|
|
116
|
+
throw queriesOnlyError(queried);
|
|
117
|
+
}
|
|
80
118
|
try {
|
|
81
119
|
return await runtime.plan(input, reach);
|
|
82
120
|
}
|
|
@@ -103,16 +141,24 @@ function modelsOf(rooms, models) {
|
|
|
103
141
|
const named = new Set(rooms.flatMap(({ model, typedSelection }) => [model.types, typedSelection?.model.types]));
|
|
104
142
|
return Object.fromEntries(Object.entries(models).filter(([key]) => named.has(key)));
|
|
105
143
|
}
|
|
106
|
-
function roomsWithin(reach, { rooms, models }) {
|
|
144
|
+
function roomsWithin(reach, provided, { rooms, models }) {
|
|
107
145
|
const within = rooms.filter((room) => wholly(reach, room.locator));
|
|
108
|
-
return {
|
|
146
|
+
return {
|
|
147
|
+
rooms: [...within, ...queriedOf(reach, provided).map(queriedRoom)],
|
|
148
|
+
models: modelsOf(within, models),
|
|
149
|
+
};
|
|
109
150
|
}
|
|
110
|
-
function roomsChangeWithin(reach, { changed, removed, order, models }) {
|
|
151
|
+
function roomsChangeWithin(reach, provided, { changed, removed, order, models }) {
|
|
111
152
|
const kept = changed.filter(([locator]) => wholly(reach, locator));
|
|
112
153
|
const within = {
|
|
113
154
|
changed: kept,
|
|
114
155
|
removed,
|
|
115
|
-
order: order === null
|
|
156
|
+
order: order === null
|
|
157
|
+
? null
|
|
158
|
+
: [
|
|
159
|
+
...order.filter((locator) => wholly(reach, locator)),
|
|
160
|
+
...queriedOf(reach, provided).map(({ locator }) => locator),
|
|
161
|
+
],
|
|
116
162
|
models: modelsOf(kept.map(([, room]) => room), models),
|
|
117
163
|
};
|
|
118
164
|
return unchanged(within) ? null : within;
|
|
@@ -188,26 +234,48 @@ function deviceUnreached() {
|
|
|
188
234
|
return runtimeError('device-unreached', 'Only the panel reaches this device');
|
|
189
235
|
}
|
|
190
236
|
const ATTACH_REQUIRED = 'attach-required';
|
|
237
|
+
const QUERIES_ONLY = 'queries-only';
|
|
238
|
+
function queriesOnlyError(room) {
|
|
239
|
+
return runtimeError(QUERIES_ONLY, `${room} answers through queryHouse`);
|
|
240
|
+
}
|
|
191
241
|
function attachRequired() {
|
|
192
|
-
return runtimeError(ATTACH_REQUIRED, 'App code takes a file in with
|
|
242
|
+
return runtimeError(ATTACH_REQUIRED, 'App code takes a file in with attachment.attach');
|
|
193
243
|
}
|
|
194
244
|
function carriesFile(parts) {
|
|
195
245
|
return parts !== null && typeof parts === 'object' && Object.hasOwn(parts, 'file');
|
|
196
246
|
}
|
|
197
|
-
export function narrowed(runtime, given,
|
|
247
|
+
export function narrowed(runtime, given, attached) {
|
|
198
248
|
const { md, watch } = runtime;
|
|
199
249
|
let reach = given;
|
|
250
|
+
let port = attached;
|
|
200
251
|
const open = new Set();
|
|
201
|
-
|
|
252
|
+
const coded = new Set();
|
|
253
|
+
function tiered(next) {
|
|
254
|
+
port = next;
|
|
255
|
+
for (const restart of [...coded])
|
|
256
|
+
restart();
|
|
257
|
+
}
|
|
258
|
+
const unread = port.first?.inboxes === true
|
|
259
|
+
? watch('read', [INBOXES_READ, INBOXES_LISTED], (read) => {
|
|
260
|
+
const inboxed = inboxRooms(read);
|
|
261
|
+
if (inboxed === null || JSON.stringify(inboxed) === JSON.stringify(port.inboxed)) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
tiered({ ...port, inboxed });
|
|
265
|
+
}, uncaught)
|
|
266
|
+
: () => { };
|
|
267
|
+
function following(begin, locking = false, restarts = open) {
|
|
202
268
|
let stop = begin();
|
|
203
269
|
const restart = () => {
|
|
204
270
|
stop();
|
|
205
271
|
stop = begin();
|
|
206
272
|
};
|
|
207
273
|
open.add(restart);
|
|
274
|
+
restarts.add(restart);
|
|
208
275
|
const unwatch = locking ? runtime.watchLocks(restart) : () => { };
|
|
209
276
|
return () => {
|
|
210
277
|
open.delete(restart);
|
|
278
|
+
restarts.delete(restart);
|
|
211
279
|
unwatch();
|
|
212
280
|
stop();
|
|
213
281
|
};
|
|
@@ -274,14 +342,14 @@ export function narrowed(runtime, given, port) {
|
|
|
274
342
|
if (topic === 'rooms') {
|
|
275
343
|
return following(() => watch(topic, input, (rooms) => {
|
|
276
344
|
const shown = 'rooms' in rooms
|
|
277
|
-
? roomsWithin(reach, rooms)
|
|
278
|
-
: roomsChangeWithin(reach, rooms);
|
|
345
|
+
? roomsWithin(reach, runtime.queried(), rooms)
|
|
346
|
+
: roomsChangeWithin(reach, runtime.queried(), rooms);
|
|
279
347
|
if (shown !== null)
|
|
280
348
|
deliver(shown);
|
|
281
349
|
}, fail));
|
|
282
350
|
}
|
|
283
351
|
if (topic === 'readiness') {
|
|
284
|
-
return following(() => runtime.watchReadiness(port, reach, deliver));
|
|
352
|
+
return following(() => runtime.watchReadiness(port, reach, deliver), false, coded);
|
|
285
353
|
}
|
|
286
354
|
if (topic === 'sync-status') {
|
|
287
355
|
return following(() => unlockedWatch(topic, input, deliver, fail, (status, locked) => {
|
|
@@ -394,7 +462,7 @@ export function narrowed(runtime, given, port) {
|
|
|
394
462
|
const chatDraft = () => (conversing(reach) ? md.chatDraft : NO_CHAT_DRAFT);
|
|
395
463
|
const view = {
|
|
396
464
|
...md,
|
|
397
|
-
rooms: () => md.rooms().then((rooms) => roomsWithin(reach, rooms)),
|
|
465
|
+
rooms: () => md.rooms().then((rooms) => roomsWithin(reach, runtime.queried(), rooms)),
|
|
398
466
|
query: (async (input) => {
|
|
399
467
|
const plan = await planInReach(runtime, input, reach, false);
|
|
400
468
|
if (plan === null)
|
|
@@ -403,6 +471,7 @@ export function narrowed(runtime, given, port) {
|
|
|
403
471
|
return unlocking(plan.rooms, locked) ?? runtime.query({ ...plan, locked });
|
|
404
472
|
}),
|
|
405
473
|
search: (input) => runtime.search(input, reach),
|
|
474
|
+
queryHouse: (input, options) => runtime.queryHouse(input, reach, options),
|
|
406
475
|
async types(room) {
|
|
407
476
|
if (holds(reach, room) && (await runtime.locked(room)))
|
|
408
477
|
throw lockedError(room);
|
|
@@ -456,32 +525,32 @@ export function narrowed(runtime, given, port) {
|
|
|
456
525
|
: (await runtime.locked(room))
|
|
457
526
|
? lockedRoom(room)
|
|
458
527
|
: md.history(room, path, query),
|
|
459
|
-
|
|
528
|
+
attachment: {
|
|
460
529
|
read: async (room, path, revision) => !covers(reach, room, path)
|
|
461
530
|
? failure({ kind: 'room-not-readable', locator: room })
|
|
462
531
|
: (await runtime.locked(room))
|
|
463
532
|
? lockedRoom(room)
|
|
464
|
-
: hand(md.
|
|
533
|
+
: hand(md.attachment.read(room, path, revision)),
|
|
465
534
|
link: async (room, path, revision) => !covers(reach, room, path)
|
|
466
535
|
? failure({ kind: 'room-not-readable', locator: room })
|
|
467
536
|
: (await runtime.locked(room))
|
|
468
537
|
? lockedRoom(room)
|
|
469
|
-
: md.
|
|
538
|
+
: md.attachment.link(room, path, revision),
|
|
470
539
|
show: async (room, path, revision) => !covers(reach, room, path)
|
|
471
540
|
? failure({ kind: 'room-not-readable', locator: room })
|
|
472
541
|
: (await runtime.locked(room))
|
|
473
542
|
? lockedRoom(room)
|
|
474
|
-
: hand(md.
|
|
543
|
+
: hand(md.attachment.show(room, path, revision)),
|
|
475
544
|
attach: async (room, file) => !wholly(reach, room)
|
|
476
545
|
? failure({ kind: 'room-not-readable', locator: room })
|
|
477
546
|
: (await runtime.locked(room))
|
|
478
547
|
? lockedRoom(room)
|
|
479
|
-
: md.
|
|
548
|
+
: md.attachment.attach(room, file),
|
|
480
549
|
async part(file, part) {
|
|
481
550
|
const key = files.get(file);
|
|
482
551
|
if (key === undefined)
|
|
483
552
|
return null;
|
|
484
|
-
const bytes = await md.
|
|
553
|
+
const bytes = await md.attachment.part(key, part);
|
|
485
554
|
if (bytes === null)
|
|
486
555
|
files.delete(file);
|
|
487
556
|
return bytes;
|
|
@@ -536,7 +605,7 @@ export function narrowed(runtime, given, port) {
|
|
|
536
605
|
takeOut: (id, message, operation) => conversation().takeOut(id, message, operation),
|
|
537
606
|
decide: (request, decision, operation) => conversation().decide(request, decision, operation),
|
|
538
607
|
rename: (id, name, operation) => conversation().rename(id, name, operation),
|
|
539
|
-
|
|
608
|
+
set: (id, settings, operation) => conversation().set(id, settings, operation),
|
|
540
609
|
retry: (id, message, operation) => conversation().retry(id, message, operation),
|
|
541
610
|
pin: (figures) => conversation().pin(figures),
|
|
542
611
|
openTurn: (id, turn) => conversation().openTurn(id, turn),
|
|
@@ -560,5 +629,10 @@ export function narrowed(runtime, given, port) {
|
|
|
560
629
|
for (const restart of [...open])
|
|
561
630
|
restart();
|
|
562
631
|
},
|
|
632
|
+
code(next) {
|
|
633
|
+
if (port.code !== next)
|
|
634
|
+
tiered({ ...port, code: next });
|
|
635
|
+
},
|
|
636
|
+
close: unread,
|
|
563
637
|
};
|
|
564
638
|
}
|
package/dist/readiness.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { Open } from './open.js';
|
|
2
|
-
|
|
2
|
+
import type { ObservedRead } from './reads.js';
|
|
3
|
+
export type CodeAvailability = Open<'stored' | 'boot' | 'absent'>;
|
|
4
|
+
export type FirstTier = {
|
|
5
|
+
readonly handles: readonly string[];
|
|
6
|
+
readonly conversations: boolean;
|
|
7
|
+
readonly inboxes: boolean;
|
|
8
|
+
};
|
|
3
9
|
export type RoomPreparation = Open<'complete' | 'acquiring' | 'preparing' | 'unadmitted'>;
|
|
4
10
|
export type RoomCoverage = {
|
|
5
11
|
readonly room: string;
|
|
@@ -44,12 +50,19 @@ export type Readiness = {
|
|
|
44
50
|
export type ReadinessShown = Omit<Readiness, 'coverage'> & {
|
|
45
51
|
readonly coverage: Omit<TargetCoverage, 'rooms'>;
|
|
46
52
|
};
|
|
53
|
+
export type TierFacts = Omit<TargetCoverage, 'complete' | 'rooms'> & {
|
|
54
|
+
readonly unsettled: number;
|
|
55
|
+
};
|
|
47
56
|
export type ReadinessFacts = Omit<Readiness, 'status' | 'ready' | 'usable' | 'durability' | 'coverage'> & {
|
|
48
|
-
readonly coverage:
|
|
49
|
-
|
|
50
|
-
};
|
|
57
|
+
readonly coverage: TierFacts;
|
|
58
|
+
readonly first: TierFacts;
|
|
51
59
|
readonly established: boolean;
|
|
52
60
|
};
|
|
61
|
+
export declare const INBOXES_READ = "inbox";
|
|
62
|
+
export declare const INBOXES_LISTED: {
|
|
63
|
+
op: string;
|
|
64
|
+
};
|
|
53
65
|
export declare const COMPLETE_ROOMS: ReadonlySet<string>;
|
|
66
|
+
export declare function inboxRooms({ answer }: ObservedRead): readonly string[] | null;
|
|
54
67
|
export declare function readinessOf(facts: ReadinessFacts): ReadinessShown;
|
|
55
68
|
//# sourceMappingURL=readiness.d.ts.map
|
package/dist/readiness.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readiness.d.ts","sourceRoot":"","sources":["../src/readiness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"readiness.d.ts","sourceRoot":"","sources":["../src/readiness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC;AAElE,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,CAAC,CAAC;AAE1F,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAA;CAAE,CAAC;AAEtF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,UAAU,GAAG,WAAW,GAAG,YAAY,CAAC,CAAC;AAEjF,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IACxC,QAAQ,CAAC,aAAa,EAAE,oBAAoB,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG,QA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AAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IACzD,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,OAAO,CAAC,GAAG;IACnE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,SAAS,EACT,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,CAC1D,GAAG;IACF,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,YAAY,UAAU,CAAC;AAEpC,eAAO,MAAM,cAAc;IAAK,EAAE;CAAU,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CAAuC,CAAC;AAEvF,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,YAAY,GAAG,SAAS,MAAM,EAAE,GAAG,IAAI,CAI7E;AAQD,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,CAsBjE"}
|
package/dist/readiness.js
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
|
+
export const INBOXES_READ = 'inbox';
|
|
2
|
+
export const INBOXES_LISTED = { op: 'list' };
|
|
1
3
|
export const COMPLETE_ROOMS = new Set(['complete', 'unadmitted']);
|
|
4
|
+
export function inboxRooms({ answer }) {
|
|
5
|
+
if (answer === null)
|
|
6
|
+
return null;
|
|
7
|
+
const { inboxes } = answer;
|
|
8
|
+
return [...new Set(inboxes.flatMap(({ room }) => (room === undefined ? [] : [room])))].sort();
|
|
9
|
+
}
|
|
10
|
+
function held({ listed, conversations, unsettled }) {
|
|
11
|
+
return (listed && (conversations === 'complete' || conversations === 'undeclared') && unsettled === 0);
|
|
12
|
+
}
|
|
2
13
|
export function readinessOf(facts) {
|
|
3
|
-
const { established, coverage:
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const usable = stored && (ready || established);
|
|
14
|
+
const { established, first, coverage: whole, ...reported } = facts;
|
|
15
|
+
const complete = held(whole);
|
|
16
|
+
const coverage = { listed: whole.listed, conversations: whole.conversations, complete };
|
|
17
|
+
const ready = facts.code === 'stored' && complete;
|
|
18
|
+
const boot = facts.code === 'boot' || facts.code === 'stored';
|
|
19
|
+
const usable = ready || (boot && (held(first) || established));
|
|
10
20
|
const status = ready
|
|
11
21
|
? 'ready'
|
|
12
22
|
: facts.space !== null
|
package/dist/reads.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reads.d.ts","sourceRoot":"","sources":["../src/reads.ts"],"names":[],"mappings":"AAEA,OAAO,EAA6B,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE/D,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAExC,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,Q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
25
25
|
const leading = new Set(options.leading);
|
|
26
26
|
const reads = new Map();
|
|
27
27
|
function leads(read) {
|
|
28
|
-
|
|
28
|
+
const op = read.asked?.op;
|
|
29
|
+
return (leading.has(read.at.name) || (typeof op === 'string' && leading.has(`${read.at.name}.${op}`)));
|
|
30
|
+
}
|
|
31
|
+
function kept(name, input) {
|
|
32
|
+
if (unkept.has(name))
|
|
33
|
+
return false;
|
|
34
|
+
const { op, ...named } = (input ?? {});
|
|
35
|
+
if (typeof op !== 'string')
|
|
36
|
+
return true;
|
|
37
|
+
const opName = `${name}.${op}`;
|
|
38
|
+
return (!unkept.has(opName) &&
|
|
39
|
+
!Object.keys(named).some((field) => named[field] !== undefined && unkept.has(`${opName} ${field}`)));
|
|
29
40
|
}
|
|
30
41
|
function show(read, shown) {
|
|
31
42
|
read.shown = shown;
|
|
32
43
|
for (const deliver of read.observers)
|
|
33
44
|
deliver(shown);
|
|
34
45
|
}
|
|
35
|
-
async function
|
|
46
|
+
async function keep(read, answer) {
|
|
36
47
|
if (!read.shown.kept || options.full())
|
|
37
48
|
return;
|
|
38
49
|
await database.ask({ kind: 'read.keep', ...read.at, answer }).catch((error) => {
|
|
@@ -64,7 +75,7 @@ export function readAnswers(options) {
|
|
|
64
75
|
if (text === read.text && read.shown.failure === null)
|
|
65
76
|
return;
|
|
66
77
|
read.text = text;
|
|
67
|
-
await
|
|
78
|
+
await keep(read, text);
|
|
68
79
|
await led;
|
|
69
80
|
if (!options.closed())
|
|
70
81
|
show(read, { ...read.shown, answer, failure: null });
|
|
@@ -109,7 +120,7 @@ export function readAnswers(options) {
|
|
|
109
120
|
});
|
|
110
121
|
}
|
|
111
122
|
function opened(name, input, key) {
|
|
112
|
-
const held =
|
|
123
|
+
const held = kept(name, input);
|
|
113
124
|
const read = {
|
|
114
125
|
key,
|
|
115
126
|
at: { name, input: JSON.stringify(input ?? null), build },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference-forms.d.ts","sourceRoot":"","sources":["../src/reference-forms.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAS,MAAM,aAAa,CAAC;AAuBrD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGpD;AAuCD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAuB7D"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ATTACHMENT_REFERENCE_PREFIX, CROCKFORD_CHARACTER, CROCKFORD_LEADING_CHARACTER, DOCUMENT_REFERENCE_PREFIX, REVISION_REFERENCE_PREFIX, } from '@agentshouse/mdmodel';
|
|
2
|
+
import { text, texts } from './column.js';
|
|
3
|
+
import { markdownPath } from './rows.js';
|
|
4
|
+
const ORDINAL = `${CROCKFORD_LEADING_CHARACTER}${CROCKFORD_CHARACTER}*`;
|
|
5
|
+
const OLD_REVISION = new RegExp(`^fr_(${ORDINAL}\\.${ORDINAL}\\.${CROCKFORD_CHARACTER})$`, 'u');
|
|
6
|
+
const OLD_ENTRY = new RegExp(`^af_(${ORDINAL})\\.(${CROCKFORD_CHARACTER})$`, 'u');
|
|
7
|
+
const RECORDS = [
|
|
8
|
+
['authored_pending', 'batch', ['locator', 'id']],
|
|
9
|
+
['authored_pending', 'state', ['locator', 'id']],
|
|
10
|
+
['authored_room_drafts', 'record', ['locator', 'path']],
|
|
11
|
+
['authored_chat_drafts', 'record', ['conversation']],
|
|
12
|
+
['authored_calls', 'record', ['operation']],
|
|
13
|
+
];
|
|
14
|
+
const REVISIONS = [
|
|
15
|
+
['replica_entries', 'revision'],
|
|
16
|
+
['opened_files', 'revision'],
|
|
17
|
+
];
|
|
18
|
+
export function kindedRevision(value) {
|
|
19
|
+
const revision = OLD_REVISION.exec(value);
|
|
20
|
+
return revision === null ? value : `${REVISION_REFERENCE_PREFIX}${revision[1]}`;
|
|
21
|
+
}
|
|
22
|
+
function kindedReference(value, paths) {
|
|
23
|
+
const revised = kindedRevision(value);
|
|
24
|
+
if (revised !== value)
|
|
25
|
+
return revised;
|
|
26
|
+
const entry = OLD_ENTRY.exec(value);
|
|
27
|
+
const path = entry === null ? undefined : paths.get(entry[1]);
|
|
28
|
+
if (entry === null || path === undefined)
|
|
29
|
+
return value;
|
|
30
|
+
const prefix = markdownPath(path) ? DOCUMENT_REFERENCE_PREFIX : ATTACHMENT_REFERENCE_PREFIX;
|
|
31
|
+
return `${prefix}${entry[1]}.${entry[2]}`;
|
|
32
|
+
}
|
|
33
|
+
function kinded(value, paths) {
|
|
34
|
+
if (typeof value === 'string')
|
|
35
|
+
return kindedReference(value, paths);
|
|
36
|
+
if (Array.isArray(value))
|
|
37
|
+
return value.map((item) => kinded(item, paths));
|
|
38
|
+
if (value === null || typeof value !== 'object')
|
|
39
|
+
return value;
|
|
40
|
+
return Object.fromEntries(Object.entries(value).map(([name, item]) => [name, kinded(item, paths)]));
|
|
41
|
+
}
|
|
42
|
+
function heldColumns(connection, table) {
|
|
43
|
+
return new Set(texts(connection.rows('SELECT name FROM pragma_table_info(?)', [table]), 'name'));
|
|
44
|
+
}
|
|
45
|
+
function heldPaths(connection) {
|
|
46
|
+
const columns = heldColumns(connection, 'replica_entries');
|
|
47
|
+
if (!columns.has('file_id') || !columns.has('path'))
|
|
48
|
+
return new Map();
|
|
49
|
+
return new Map(connection
|
|
50
|
+
.rows('SELECT DISTINCT file_id, path FROM replica_entries WHERE file_id IS NOT NULL')
|
|
51
|
+
.map((row) => [text(row.file_id), text(row.path)]));
|
|
52
|
+
}
|
|
53
|
+
function holdingOldForm(column) {
|
|
54
|
+
return `(${column} LIKE '%"fr\\_%' ESCAPE '\\' OR ${column} LIKE '%"af\\_%' ESCAPE '\\')`;
|
|
55
|
+
}
|
|
56
|
+
export function kindedReferences(connection) {
|
|
57
|
+
for (const [table, column] of REVISIONS) {
|
|
58
|
+
if (!heldColumns(connection, table).has(column))
|
|
59
|
+
continue;
|
|
60
|
+
connection.run(`UPDATE ${table} SET ${column} = '${REVISION_REFERENCE_PREFIX}' || substr(${column}, 4) WHERE ${column} LIKE 'fr\\_%' ESCAPE '\\'`);
|
|
61
|
+
}
|
|
62
|
+
let paths = null;
|
|
63
|
+
for (const [table, column, keys] of RECORDS) {
|
|
64
|
+
const held = connection.rows(`SELECT ${keys.join(', ')}, ${column} AS value FROM ${table} WHERE ${holdingOldForm(column)}`);
|
|
65
|
+
for (const row of held) {
|
|
66
|
+
paths ??= heldPaths(connection);
|
|
67
|
+
const value = JSON.parse(text(row.value));
|
|
68
|
+
const written = JSON.stringify(kinded(value, paths));
|
|
69
|
+
if (written === JSON.stringify(value))
|
|
70
|
+
continue;
|
|
71
|
+
connection.run(`UPDATE ${table} SET ${column} = ? WHERE ${keys.map((key) => `${key} = ?`).join(' AND ')}`, [written, ...keys.map((key) => row[key])]);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
package/dist/refresh.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export type Refreshing = {
|
|
|
20
20
|
later(paths: readonly string[], roomVersion: string): Promise<ReadonlySet<string>>;
|
|
21
21
|
stage(page: RefreshedPage): Promise<boolean>;
|
|
22
22
|
};
|
|
23
|
-
type PageContent = Pick<RefreshPage, 'documents' | 'facts' | 'revisions' | 'fileIds' | 'created' | 'changes' | '
|
|
23
|
+
type PageContent = Pick<RefreshPage, 'documents' | 'facts' | 'revisions' | 'fileIds' | 'created' | 'changes' | 'attachments'>;
|
|
24
24
|
export declare function pageEntries(page: PageContent, removals: readonly string[], roomVersion: string, prior: (paths: readonly string[]) => Promise<ReadonlyMap<string, HeldEntry>>): Promise<StoredEntry[]>;
|
|
25
25
|
export declare function advancement(refresh: Refresher, authorization: Authorization, held: ReplicaRecord, remodel: Remodel, continuing: () => boolean, staging: Refreshing): Promise<Advancement>;
|
|
26
26
|
export {};
|
package/dist/refresh.js
CHANGED
|
@@ -12,7 +12,7 @@ function* listing(page, removals) {
|
|
|
12
12
|
const written = new Set();
|
|
13
13
|
for (const [kept, named] of [
|
|
14
14
|
[documents, page.documents],
|
|
15
|
-
[binaries, page.
|
|
15
|
+
[binaries, page.attachments],
|
|
16
16
|
]) {
|
|
17
17
|
for (const path of Object.keys(named)) {
|
|
18
18
|
yield ROW_WEIGHT;
|
|
@@ -60,7 +60,7 @@ function* entering(page, roomVersion, listed, prior) {
|
|
|
60
60
|
path,
|
|
61
61
|
content: null,
|
|
62
62
|
facts: null,
|
|
63
|
-
binary: { state: 'accepted', ...page.
|
|
63
|
+
binary: { state: 'accepted', ...page.attachments[path] },
|
|
64
64
|
revision: page.revisions[path] ?? prior.get(path)?.revision ?? null,
|
|
65
65
|
fileId: page.fileIds?.[path] ?? null,
|
|
66
66
|
created: page.created?.[path] ?? null,
|
|
@@ -104,14 +104,14 @@ function unwritten(page, kept) {
|
|
|
104
104
|
...(page.fileIds === undefined ? {} : { fileIds: without(page.fileIds, kept) }),
|
|
105
105
|
...(page.created === undefined ? {} : { created: without(page.created, kept) }),
|
|
106
106
|
changes: without(page.changes, kept),
|
|
107
|
-
|
|
107
|
+
attachments: without(page.attachments, kept),
|
|
108
108
|
removals: page.removals.filter((path) => !kept.has(path)),
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
async function pageOf(answered, roomVersion, staging) {
|
|
112
112
|
const page = unwritten(answered, await staging.later([
|
|
113
113
|
...Object.keys(answered.documents),
|
|
114
|
-
...Object.keys(answered.
|
|
114
|
+
...Object.keys(answered.attachments),
|
|
115
115
|
...answered.removals,
|
|
116
116
|
], roomVersion));
|
|
117
117
|
return {
|
package/dist/replica.d.ts
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { type TypedPath } from '@agentshouse/mdmodel';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SavedFacts, MutationResult, TypedSelection } from './adapter.js';
|
|
3
3
|
import { type ChangeBatch, type Precondition } from './change.js';
|
|
4
4
|
import { type Collection, type Composition } from './collection.js';
|
|
5
5
|
import { type ModelState } from './model.js';
|
|
6
6
|
import { type Layer } from './overlay.js';
|
|
7
|
+
import type { StoredReplica } from './store.js';
|
|
7
8
|
import type { HeldEntry, OverlayEntry, StoredEntry } from './tables.js';
|
|
8
|
-
export type ReplicaRecord = {
|
|
9
|
-
readonly locator: string;
|
|
10
|
-
readonly declaration: RoomDeclaration;
|
|
9
|
+
export type ReplicaRecord = Omit<StoredReplica, 'model'> & {
|
|
11
10
|
readonly model: ModelState;
|
|
12
|
-
readonly roomVersion: string;
|
|
13
|
-
readonly transfer: string;
|
|
14
|
-
readonly inventory: BootstrapInventory;
|
|
15
|
-
readonly key: number;
|
|
16
11
|
};
|
|
17
12
|
export type HeldReplica = {
|
|
18
13
|
readonly record: ReplicaRecord;
|
package/dist/replica.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replica.d.ts","sourceRoot":"","sources":["../src/replica.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"replica.d.ts","sourceRoot":"","sources":["../src/replica.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,KAAK,EAAE,UAAU,EAAc,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3F,OAAO,EAKL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAA+B,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAwD,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAIhG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CA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