@agentshouse/mdruntime 0.1.0-c45e2d0d978ee → 0.1.0-c48172fb2b750
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 +25 -5
- package/dist/adapter.d.ts +83 -14
- 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} +4 -4
- package/dist/attachment.d.ts.map +1 -0
- package/dist/{binary.js → attachment.js} +2 -2
- 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 +16 -7
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +15 -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.map +1 -1
- package/dist/connection.js +2 -0
- package/dist/conversation-live.d.ts +1 -0
- package/dist/conversation-live.d.ts.map +1 -1
- package/dist/conversation-live.js +2 -1
- package/dist/conversation-row.d.ts +12 -0
- package/dist/conversation-row.d.ts.map +1 -1
- package/dist/conversation-row.js +10 -0
- package/dist/conversation.d.ts +12 -5
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +44 -37
- package/dist/declaration.js +3 -3
- package/dist/download.d.ts +2 -2
- package/dist/download.d.ts.map +1 -1
- package/dist/entry.d.ts +13 -3
- package/dist/entry.d.ts.map +1 -1
- package/dist/entry.js +72 -24
- 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 +1 -0
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +28 -17
- package/dist/house-query.d.ts +11 -2
- package/dist/house-query.d.ts.map +1 -1
- package/dist/house-query.js +66 -7
- 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 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -5
- package/dist/lifecycle.d.ts.map +1 -1
- package/dist/lifecycle.js +2 -0
- 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/media.d.ts +5 -6
- package/dist/media.d.ts.map +1 -1
- package/dist/media.js +75 -18
- package/dist/memory.d.ts +2 -2
- package/dist/memory.js +9 -9
- package/dist/messages.d.ts +5 -1
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +14 -3
- 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/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 +2 -0
- 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/paths.d.ts +1 -1
- package/dist/paths.js +1 -1
- package/dist/queries.d.ts.map +1 -1
- package/dist/queries.js +56 -13
- package/dist/query.d.ts +2 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/reach.d.ts +1 -1
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +30 -14
- package/dist/react.d.ts +6 -0
- package/dist/react.d.ts.map +1 -1
- package/dist/readiness.d.ts +4 -1
- package/dist/readiness.d.ts.map +1 -1
- package/dist/readiness.js +2 -1
- package/dist/reads.d.ts.map +1 -1
- package/dist/reads.js +15 -4
- 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/room-list.d.ts.map +1 -1
- package/dist/room-list.js +2 -0
- package/dist/rows.d.ts +9 -2
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +19 -5
- package/dist/run-tables.d.ts +25 -0
- package/dist/run-tables.d.ts.map +1 -0
- package/dist/run-tables.js +98 -0
- package/dist/runs.d.ts +27 -0
- package/dist/runs.d.ts.map +1 -0
- package/dist/runs.js +92 -0
- package/dist/runtime.d.ts +2 -0
- 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/socket.d.ts +3 -1
- package/dist/socket.d.ts.map +1 -1
- package/dist/socket.js +7 -0
- package/dist/source.d.ts +19 -0
- package/dist/source.d.ts.map +1 -1
- package/dist/source.js +35 -7
- package/dist/store/records.d.ts +12 -5
- package/dist/store/records.d.ts.map +1 -1
- package/dist/store/records.js +10 -4
- package/dist/store.d.ts +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/stored.d.ts +9 -2
- package/dist/stored.d.ts.map +1 -1
- package/dist/stored.js +33 -11
- package/dist/surface.d.ts +11 -5
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +8 -5
- package/dist/sync.js +1 -1
- package/dist/tables.d.ts +26 -2
- package/dist/tables.d.ts.map +1 -1
- package/dist/tables.js +24 -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 +7 -6
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +7 -6
- package/package.json +4 -4
- package/dist/binary.d.ts.map +0 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { count, text } from './column.js';
|
|
2
|
+
import { tablesOf } from './stored.js';
|
|
3
|
+
export const RUN_TABLES = [
|
|
4
|
+
'CREATE TABLE runs (name TEXT PRIMARY KEY, room TEXT NOT NULL, starter TEXT, current INTEGER NOT NULL, sent INTEGER NOT NULL, stale INTEGER NOT NULL, document TEXT NOT NULL) WITHOUT ROWID',
|
|
5
|
+
'CREATE INDEX runs_room ON runs (room, name)',
|
|
6
|
+
'CREATE INDEX runs_starter ON runs (starter, name)',
|
|
7
|
+
'CREATE TABLE run_marks (listing TEXT PRIMARY KEY, mark TEXT, relisting TEXT) WITHOUT ROWID',
|
|
8
|
+
];
|
|
9
|
+
const SENT_LISTING = '';
|
|
10
|
+
const IN_LIST = 'SELECT value FROM json_each(?)';
|
|
11
|
+
function kept(connection, run, sent, listed) {
|
|
12
|
+
connection.run(`INSERT INTO runs (name, room, starter, current, sent, stale, document) VALUES (?, ?, ?, ?, ?, 0, ?)
|
|
13
|
+
ON CONFLICT (name) DO UPDATE SET room = excluded.room, starter = excluded.starter,
|
|
14
|
+
current = excluded.current, stale = 0, document = excluded.document${listed ? ', sent = excluded.sent' : ''}`, [run.name, run.room, run.starter, run.current ? 1 : 0, sent ? 1 : 0, run.document]);
|
|
15
|
+
}
|
|
16
|
+
function ofListing(listing) {
|
|
17
|
+
return listing === null ? 'sent = 1' : 'room = ?';
|
|
18
|
+
}
|
|
19
|
+
function listingBound(listing) {
|
|
20
|
+
return listing === null ? [] : [listing];
|
|
21
|
+
}
|
|
22
|
+
export function runMarks(connection) {
|
|
23
|
+
const rooms = {};
|
|
24
|
+
let sent = null;
|
|
25
|
+
for (const row of connection.rows('SELECT listing, mark FROM run_marks WHERE mark IS NOT NULL ORDER BY listing')) {
|
|
26
|
+
const listing = text(row.listing);
|
|
27
|
+
if (listing === SENT_LISTING)
|
|
28
|
+
sent = text(row.mark);
|
|
29
|
+
else
|
|
30
|
+
rooms[listing] = text(row.mark);
|
|
31
|
+
}
|
|
32
|
+
return { rooms, sent };
|
|
33
|
+
}
|
|
34
|
+
export function keptRuns(connection, event) {
|
|
35
|
+
if (event.kind === 'run') {
|
|
36
|
+
kept(connection, event.run, event.listing === null, false);
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
if (event.kind === 'removed') {
|
|
40
|
+
connection.run('DELETE FROM runs WHERE name = ?', [event.name]);
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const { listing, runs, whole, more, mark } = event;
|
|
44
|
+
const key = listing ?? SENT_LISTING;
|
|
45
|
+
const [held] = connection.rows('SELECT mark, relisting FROM run_marks WHERE listing = ?', [key]);
|
|
46
|
+
if (whole && (held === undefined || held.relisting !== mark)) {
|
|
47
|
+
connection.run(`UPDATE runs SET stale = 1 WHERE ${ofListing(listing)}`, listingBound(listing));
|
|
48
|
+
connection.run('INSERT INTO run_marks (listing, mark, relisting) VALUES (?, NULL, ?) ON CONFLICT (listing) DO UPDATE SET relisting = excluded.relisting', [key, mark]);
|
|
49
|
+
}
|
|
50
|
+
for (const run of runs)
|
|
51
|
+
kept(connection, run, listing === null, true);
|
|
52
|
+
if (more)
|
|
53
|
+
return null;
|
|
54
|
+
if (whole) {
|
|
55
|
+
connection.run(`DELETE FROM runs WHERE ${ofListing(listing)} AND stale = 1`, listingBound(listing));
|
|
56
|
+
}
|
|
57
|
+
connection.run('INSERT INTO run_marks (listing, mark, relisting) VALUES (?, ?, NULL) ON CONFLICT (listing) DO UPDATE SET mark = excluded.mark, relisting = NULL', [key, mark]);
|
|
58
|
+
return runMarks(connection);
|
|
59
|
+
}
|
|
60
|
+
function listingOf(asked, sight) {
|
|
61
|
+
if ('sent' in asked || sight.searched.includes(asked.room))
|
|
62
|
+
return SENT_LISTING;
|
|
63
|
+
return sight.held.includes(asked.room) ? asked.room : null;
|
|
64
|
+
}
|
|
65
|
+
export function heldRuns(connection, asked, sight) {
|
|
66
|
+
const listing = listingOf(asked, sight);
|
|
67
|
+
if (listing !== null &&
|
|
68
|
+
connection.rows('SELECT 1 FROM run_marks WHERE listing = ? AND mark IS NOT NULL', [listing])
|
|
69
|
+
.length === 0)
|
|
70
|
+
return null;
|
|
71
|
+
const [scope, bound] = 'sent' in asked ? ['starter = ?', sight.starter] : ['room = ?', asked.room];
|
|
72
|
+
return connection
|
|
73
|
+
.rows(`SELECT room, name, current, document FROM runs
|
|
74
|
+
WHERE ${scope} AND (room IN (${IN_LIST}) OR (starter = ? AND room IN (${IN_LIST})))
|
|
75
|
+
ORDER BY name`, [bound, JSON.stringify(sight.held), sight.starter, JSON.stringify(sight.searched)])
|
|
76
|
+
.map((row) => ({
|
|
77
|
+
room: text(row.room),
|
|
78
|
+
name: text(row.name),
|
|
79
|
+
document: text(row.document),
|
|
80
|
+
current: count(row.current) === 1,
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
export function runsLeft(connection, sight) {
|
|
84
|
+
const held = JSON.stringify(sight.held);
|
|
85
|
+
const searched = JSON.stringify(sight.searched);
|
|
86
|
+
connection.run(`DELETE FROM runs WHERE room NOT IN (${IN_LIST})
|
|
87
|
+
AND NOT (coalesce(starter = ?, 0) AND room IN (${IN_LIST}))`, [held, sight.starter, searched]);
|
|
88
|
+
connection.run(`UPDATE runs SET sent = 1 WHERE room IN (${IN_LIST})`, [searched]);
|
|
89
|
+
connection.run(`DELETE FROM run_marks WHERE listing <> ? AND listing NOT IN (${IN_LIST})`, [
|
|
90
|
+
SENT_LISTING,
|
|
91
|
+
held,
|
|
92
|
+
]);
|
|
93
|
+
return runMarks(connection);
|
|
94
|
+
}
|
|
95
|
+
export function forgottenRuns(connection) {
|
|
96
|
+
for (const table of tablesOf(RUN_TABLES))
|
|
97
|
+
connection.run(`DELETE FROM ${table}`);
|
|
98
|
+
}
|
package/dist/runs.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { RoomList, RunEvent } from './adapter.js';
|
|
2
|
+
import type { PendingResult } from './query.js';
|
|
3
|
+
import type { RunsAsked } from './run-tables.js';
|
|
4
|
+
import type { Runtime } from './runtime.js';
|
|
5
|
+
import type { RuntimeStore } from './store.js';
|
|
6
|
+
export declare const RUNS_TOPIC = "runs";
|
|
7
|
+
export type RunEntry = {
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly document: string;
|
|
10
|
+
};
|
|
11
|
+
export type Runs = {
|
|
12
|
+
readonly current: readonly RunEntry[];
|
|
13
|
+
readonly history: readonly RunEntry[];
|
|
14
|
+
};
|
|
15
|
+
export type HeldRunEntry = RunEntry & {
|
|
16
|
+
readonly room: string;
|
|
17
|
+
};
|
|
18
|
+
export type HeldRuns = {
|
|
19
|
+
readonly current: readonly HeldRunEntry[];
|
|
20
|
+
readonly history: readonly HeldRunEntry[];
|
|
21
|
+
};
|
|
22
|
+
export declare function runsAsked(input: unknown): RunsAsked;
|
|
23
|
+
export declare function watchRuns(runtime: Runtime, input: unknown, deliver: (runs: HeldRuns | PendingResult) => void): () => void;
|
|
24
|
+
export declare function runsOpened(runtime: Runtime): Promise<void>;
|
|
25
|
+
export declare function runHeard(runtime: Runtime, event: RunEvent): void;
|
|
26
|
+
export declare function runsListed(runtime: Runtime, local: RuntimeStore, roomList: RoomList): Promise<void>;
|
|
27
|
+
//# sourceMappingURL=runs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../src/runs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,QAAQ,EAAE,QA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wBAAsB,UAAU,CAC9B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,IAAI,CAAC,CAMf"}
|
package/dist/runs.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { refusedForSpace } from './durability.js';
|
|
2
|
+
import { uncaught } from './failure.js';
|
|
3
|
+
export const RUNS_TOPIC = 'runs';
|
|
4
|
+
function sightOf(roomList, member) {
|
|
5
|
+
const rooms = roomList?.rooms ?? [];
|
|
6
|
+
return {
|
|
7
|
+
held: rooms.filter((room) => room.level !== 'search').map((room) => room.room_ref),
|
|
8
|
+
searched: rooms.filter((room) => room.level === 'search').map((room) => room.room_ref),
|
|
9
|
+
starter: member?.id ?? null,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export function runsAsked(input) {
|
|
13
|
+
const asked = input;
|
|
14
|
+
return asked?.sent === true ? { sent: true } : { room: String(asked?.room) };
|
|
15
|
+
}
|
|
16
|
+
function entryOf({ room, name, document }) {
|
|
17
|
+
return { room, name, document };
|
|
18
|
+
}
|
|
19
|
+
function touches(asked, touched) {
|
|
20
|
+
return touched === null || 'sent' in asked || touched.includes(asked.room);
|
|
21
|
+
}
|
|
22
|
+
function touchedBy(event) {
|
|
23
|
+
if (event.kind === 'run')
|
|
24
|
+
return [event.run.room];
|
|
25
|
+
if (event.kind === 'removed')
|
|
26
|
+
return [event.room];
|
|
27
|
+
if (event.listing !== null)
|
|
28
|
+
return [event.listing];
|
|
29
|
+
return event.whole ? null : event.runs.map((run) => run.room);
|
|
30
|
+
}
|
|
31
|
+
function written(runtime, marks, touched) {
|
|
32
|
+
const { store, socket } = runtime;
|
|
33
|
+
if (marks !== null)
|
|
34
|
+
socket.runs()?.hold(marks);
|
|
35
|
+
store.tell(RUNS_TOPIC, touched);
|
|
36
|
+
}
|
|
37
|
+
function unwritten(error) {
|
|
38
|
+
if (!refusedForSpace(error))
|
|
39
|
+
uncaught(error);
|
|
40
|
+
}
|
|
41
|
+
function unheard(asked) {
|
|
42
|
+
return { pending: 'sent' in asked ? [] : [{ room: asked.room, awaits: 'acquisition' }] };
|
|
43
|
+
}
|
|
44
|
+
async function heldRuns(runtime, asked) {
|
|
45
|
+
const { store } = runtime;
|
|
46
|
+
const { roomList, member } = await (await store.open()).facts(['roomList', 'member']);
|
|
47
|
+
const held = roomList === null
|
|
48
|
+
? null
|
|
49
|
+
: await store.ask({ kind: 'run.held', asked, sight: sightOf(roomList, member) });
|
|
50
|
+
if (held === null)
|
|
51
|
+
return unheard(asked);
|
|
52
|
+
return {
|
|
53
|
+
current: held.filter((run) => run.current).map(entryOf),
|
|
54
|
+
history: held.map(entryOf),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export function watchRuns(runtime, input, deliver) {
|
|
58
|
+
const { store } = runtime;
|
|
59
|
+
const asked = runsAsked(input);
|
|
60
|
+
const answer = () => store.publication(async () => {
|
|
61
|
+
if (!watcher.held())
|
|
62
|
+
return;
|
|
63
|
+
const runs = await heldRuns(runtime, asked);
|
|
64
|
+
if (watcher.held())
|
|
65
|
+
deliver(runs);
|
|
66
|
+
});
|
|
67
|
+
const watcher = store.watch(RUNS_TOPIC, (touched) => {
|
|
68
|
+
if (touches(asked, touched))
|
|
69
|
+
void answer();
|
|
70
|
+
});
|
|
71
|
+
void answer();
|
|
72
|
+
return watcher.stop;
|
|
73
|
+
}
|
|
74
|
+
export async function runsOpened(runtime) {
|
|
75
|
+
const { store, socket } = runtime;
|
|
76
|
+
socket.runs()?.hold(await store.ask({ kind: 'run.marks' }));
|
|
77
|
+
}
|
|
78
|
+
export function runHeard(runtime, event) {
|
|
79
|
+
const { store, socket } = runtime;
|
|
80
|
+
if (socket.closed())
|
|
81
|
+
return;
|
|
82
|
+
void store
|
|
83
|
+
.exclusive(() => store.ask({ kind: 'run.keep', event }))
|
|
84
|
+
.then((marks) => written(runtime, marks, touchedBy(event)), unwritten);
|
|
85
|
+
}
|
|
86
|
+
export async function runsListed(runtime, local, roomList) {
|
|
87
|
+
const { store } = runtime;
|
|
88
|
+
const { member } = await local.facts(['member']);
|
|
89
|
+
await store
|
|
90
|
+
.exclusive(() => store.ask({ kind: 'run.left', sight: sightOf(roomList, member) }))
|
|
91
|
+
.then((marks) => written(runtime, marks, null), unwritten);
|
|
92
|
+
}
|
package/dist/runtime.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export type Runtime = {
|
|
|
23
23
|
readonly roomTypes: Parameters<typeof schemaTypes>[1];
|
|
24
24
|
readonly builtIn: ModelState;
|
|
25
25
|
readonly typedPaths: readonly TypedPath[];
|
|
26
|
+
readonly renamedActions: ReadonlyMap<string, string>;
|
|
27
|
+
readonly rewrittenInputs: ReadonlyMap<string, (input: unknown) => unknown>;
|
|
26
28
|
readonly writeRule: (declaration: RoomDeclaration) => WriteRule;
|
|
27
29
|
readonly build: string;
|
|
28
30
|
readonly conversations: LiveConversations;
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,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,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,CAE7F"}
|
package/dist/save.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { apply, ARRAY_INDEX, ATTACHMENT, create, links, parse, pointerSegments, references, relative, relativize, retarget, roomReferences, serialize, target, } from '@agentshouse/mdmodel';
|
|
2
2
|
import { immutable, isPart, leaving, queuedFile, departure, } from './change.js';
|
|
3
|
-
import { collectionOf, definitionsAt, documentsOf, governing,
|
|
3
|
+
import { collectionOf, definitionsAt, documentsOf, governing, typeAt, UNTYPED, } from './collection.js';
|
|
4
4
|
import { changeBatchIdentity, roomDraftRevision } from './identity.js';
|
|
5
5
|
import { composed, overlaying } from './overlay.js';
|
|
6
6
|
import { ancestors } from './paths.js';
|
|
@@ -817,8 +817,8 @@ function* limiting(queue, batch, limits, state) {
|
|
|
817
817
|
const limited = yield* exceeding(limits, batch.changes, rewritten.changes, yield* state(queue.slice(0, at + 1)));
|
|
818
818
|
return limited?.refusal ?? null;
|
|
819
819
|
}
|
|
820
|
-
function typedContent(content) {
|
|
821
|
-
return content !== undefined &&
|
|
820
|
+
function typedContent(composition, path, content) {
|
|
821
|
+
return (content !== undefined && (typeAt(composition, path, parse(content)) ?? UNTYPED) !== UNTYPED);
|
|
822
822
|
}
|
|
823
823
|
function touchedLibrary(resulting, touched, composition) {
|
|
824
824
|
const entries = touched
|
|
@@ -838,7 +838,7 @@ function touchedLibrary(resulting, touched, composition) {
|
|
|
838
838
|
if (binaries.has(path))
|
|
839
839
|
known.set(path, { type: undefined, binary: true });
|
|
840
840
|
else if (content !== undefined && content !== null) {
|
|
841
|
-
const type =
|
|
841
|
+
const type = typeAt(composition, path, parse(content, path, definitionsAt(composition, path)));
|
|
842
842
|
if (type !== undefined)
|
|
843
843
|
known.set(path, { type, binary: false });
|
|
844
844
|
await pace(content.length + ROW_WEIGHT);
|
|
@@ -858,7 +858,7 @@ async function judging(visible, resulting, composition, validate, removed, touch
|
|
|
858
858
|
for (const path of touched) {
|
|
859
859
|
const before = visible.documents[path];
|
|
860
860
|
const after = resulting.documents[path];
|
|
861
|
-
if (typedContent(before) || typedContent(after))
|
|
861
|
+
if (typedContent(composition, path, before) || typedContent(composition, path, after))
|
|
862
862
|
typedPaths.push(path);
|
|
863
863
|
await pace((before?.length ?? 0) + (after?.length ?? 0) + ROW_WEIGHT);
|
|
864
864
|
}
|
|
@@ -1097,7 +1097,7 @@ function unreadable(saved, visible, composition) {
|
|
|
1097
1097
|
const path = saved.find(({ path: at, parts }) => (parts.fields !== undefined ||
|
|
1098
1098
|
parts.sections !== undefined ||
|
|
1099
1099
|
parts.preamble !== undefined) &&
|
|
1100
|
-
typedContent(visible.documents[at]) &&
|
|
1100
|
+
typedContent(composition, at, visible.documents[at]) &&
|
|
1101
1101
|
governing(composition, at).status === 'unavailable')?.path;
|
|
1102
1102
|
return path === undefined ? null : refuse('model-unavailable', path);
|
|
1103
1103
|
}
|
package/dist/saves.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ChangeBatch, type WrittenBy } from './change.js';
|
|
2
2
|
import type { ConversationFiles } from './conversation.js';
|
|
3
|
-
import { type AttachAnswer, type
|
|
3
|
+
import { type AttachAnswer, type AttachmentLinkAnswer, type HeldAttachmentAnswer, type HeldShownAnswer } from './outcome.js';
|
|
4
4
|
import { type RoomDraftParts } from './room-draft.js';
|
|
5
5
|
import type { Runtime } from './runtime.js';
|
|
6
6
|
import { type SaveRefusal } from './save.js';
|
|
@@ -19,9 +19,9 @@ export type SavedParts = {
|
|
|
19
19
|
readonly path: string;
|
|
20
20
|
readonly parts: RoomDraftParts;
|
|
21
21
|
};
|
|
22
|
-
export type
|
|
23
|
-
read(room: string, path: string, revision?: string): Promise<
|
|
24
|
-
link(room: string, path: string, revision?: string): Promise<
|
|
22
|
+
export type AttachmentSurface = {
|
|
23
|
+
read(room: string, path: string, revision?: string): Promise<HeldAttachmentAnswer>;
|
|
24
|
+
link(room: string, path: string, revision?: string): Promise<AttachmentLinkAnswer>;
|
|
25
25
|
show(room: string, path: string, revision?: string): Promise<HeldShownAnswer>;
|
|
26
26
|
attach(room: string, file: File): Promise<AttachAnswer>;
|
|
27
27
|
part(file: string, part: number): Promise<Uint8Array | null>;
|
|
@@ -30,5 +30,5 @@ export declare function saveRoomDrafts(runtime: Runtime, locator: string, named:
|
|
|
30
30
|
export declare function saveParts(runtime: Runtime, locator: string, named: readonly SavedParts[], writtenBy: WrittenBy | undefined): Promise<SaveResult>;
|
|
31
31
|
export declare function batchFile(store: Store, batch: ChangeBatch): (localId: string) => Promise<Blob>;
|
|
32
32
|
export declare function conversationFiles(runtime: Runtime): ConversationFiles;
|
|
33
|
-
export declare function
|
|
33
|
+
export declare function attachmentSurface(runtime: Runtime): AttachmentSurface;
|
|
34
34
|
//# sourceMappingURL=saves.d.ts.map
|
package/dist/saves.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saves.d.ts","sourceRoot":"","sources":["../src/saves.ts"],"names":[],"mappings":"AAUA,OAAO,EAA2B,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAI3D,OAAO,EASL,KAAK,YAAY,EACjB,KAAK,
|
|
1
|
+
{"version":3,"file":"saves.d.ts","sourceRoot":"","sources":["../src/saves.ts"],"names":[],"mappings":"AAUA,OAAO,EAA2B,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAKxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAI3D,OAAO,EASL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EAGzB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AAatB,OAAO,EAQL,KAAK,cAAc,EAGpB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,OAAO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C5B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,SAAS,cAAc,EAAE,EAChC,SAAS,EAAE,SAAS,GAAG,SAAS,GAC/B,OAAO,CAAC,UAAU,CAAC,CAsCrB;AAuBD,wBAAgB,SAAS,CACvB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,SAAS,EAAE,SAAS,GAAG,SAAS,GAC/B,OAAO,CAAC,UAAU,CAAC,CAyBrB;AAuOD,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAK9F;AA+RD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAKrE;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAQrE"}
|
package/dist/saves.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { isImageType, parse } from '@agentshouse/mdmodel';
|
|
2
|
-
import {
|
|
2
|
+
import { attachmentRecord } from './attachment.js';
|
|
3
3
|
import { changeSet } from './change-set.js';
|
|
4
4
|
import { queuedFile } from './change.js';
|
|
5
|
-
import { available,
|
|
5
|
+
import { available, definitionsAt, typeAt } from './collection.js';
|
|
6
6
|
import { runtimeError } from './failure.js';
|
|
7
7
|
import { attachedFile } from './file.js';
|
|
8
8
|
import { roomDraftRevision } from './identity.js';
|
|
9
9
|
import { compositionFor } from './listing.js';
|
|
10
10
|
import { scoped } from './models.js';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { absentAttachment, attachAnswer, attachmentAnswer, attachmentLinkAnswer, failure, linkedAnswer, OFFLINE, UNCERTAIN, } from './outcome.js';
|
|
12
|
+
import { sameAttachment } from './overlay.js';
|
|
13
13
|
import { ancestors } from './paths.js';
|
|
14
14
|
import { connectionNow } from './preparation.js';
|
|
15
15
|
import { append, sliceAt, withdrawable } from './queue.js';
|
|
16
16
|
import { entryAt, replaying, slicing, } from './replica.js';
|
|
17
|
-
import {
|
|
17
|
+
import { attachmentBase, changesOf, held, heldFile, joinedOver, moveTarget, readSavedParts, } from './room-draft.js';
|
|
18
18
|
import { refuse } from './refusal.js';
|
|
19
19
|
import { visibleOf } from './room-drafts.js';
|
|
20
20
|
import { destination, planSave, } from './save.js';
|
|
@@ -77,7 +77,7 @@ export function saveParts(runtime, locator, named, writtenBy) {
|
|
|
77
77
|
for (const { path, parts } of read) {
|
|
78
78
|
const file = parts.file === undefined
|
|
79
79
|
? undefined
|
|
80
|
-
: await heldFile(parts.file.blob, parts.file.base === undefined ?
|
|
80
|
+
: await heldFile(parts.file.blob, parts.file.base === undefined ? attachmentBase(visible, path) : parts.file.base);
|
|
81
81
|
if (parts.file !== undefined && file !== undefined) {
|
|
82
82
|
files.push({ key: file.localId, blob: parts.file.blob });
|
|
83
83
|
}
|
|
@@ -159,7 +159,7 @@ async function loaded(runtime, locator, replica, saved, consumed, files, written
|
|
|
159
159
|
}
|
|
160
160
|
function textDiffers(left, right) {
|
|
161
161
|
return ((left?.content ?? undefined) !== (right?.content ?? undefined) ||
|
|
162
|
-
!
|
|
162
|
+
!sameAttachment(left?.binary ?? undefined, right?.binary ?? undefined));
|
|
163
163
|
}
|
|
164
164
|
function textOf(entry) {
|
|
165
165
|
if (entry === null)
|
|
@@ -176,12 +176,16 @@ function lookupOf(local, key, view) {
|
|
|
176
176
|
]));
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
-
function declaredOf(entry) {
|
|
179
|
+
function declaredOf(composition, path, entry) {
|
|
180
180
|
if (entry.binary !== null)
|
|
181
181
|
return { type: undefined, binary: true };
|
|
182
|
-
|
|
182
|
+
const content = entry.content ?? '';
|
|
183
|
+
return {
|
|
184
|
+
type: typeAt(composition, path, parse(content, path, definitionsAt(composition, path))),
|
|
185
|
+
binary: false,
|
|
186
|
+
};
|
|
183
187
|
}
|
|
184
|
-
function overriddenLookup(lookup, overrides) {
|
|
188
|
+
function overriddenLookup(composition, lookup, overrides) {
|
|
185
189
|
return async (paths) => {
|
|
186
190
|
const known = new Map(await lookup(paths.filter((path) => !overrides.has(path))));
|
|
187
191
|
for (const path of paths) {
|
|
@@ -191,7 +195,7 @@ function overriddenLookup(lookup, overrides) {
|
|
|
191
195
|
if (entry === null)
|
|
192
196
|
known.delete(path);
|
|
193
197
|
else
|
|
194
|
-
known.set(path, declaredOf(entry));
|
|
198
|
+
known.set(path, declaredOf(composition, path, entry));
|
|
195
199
|
}
|
|
196
200
|
return known;
|
|
197
201
|
};
|
|
@@ -212,10 +216,12 @@ function validatorOf(runtime, record, confirmedLayer) {
|
|
|
212
216
|
if (textOf(was) !== textOf(now))
|
|
213
217
|
changes.push({ path, was: textOf(was), now: textOf(now) });
|
|
214
218
|
}
|
|
215
|
-
|
|
216
|
-
|
|
219
|
+
const composition = compositionFor(runtime, record);
|
|
220
|
+
return validatedNeighbourhood(changes, composition, {
|
|
221
|
+
lookup: overriddenLookup(composition, lookupOf(local, record.key, 'confirmed'), overrides),
|
|
217
222
|
texts: textsOf(local, record.key, 'confirmed'),
|
|
218
223
|
referrers: referrersOf(local, record.key, 'confirmed'),
|
|
224
|
+
holders: (sought) => local.holders(record.key, 'confirmed', sought),
|
|
219
225
|
});
|
|
220
226
|
};
|
|
221
227
|
}
|
|
@@ -245,7 +251,7 @@ export function batchFile(store, batch) {
|
|
|
245
251
|
return (await store.open()).file(localId, change?.kind === 'binary' ? change.mediaType : '');
|
|
246
252
|
};
|
|
247
253
|
}
|
|
248
|
-
async function
|
|
254
|
+
async function transferAttachment(runtime, request, transfer, answer) {
|
|
249
255
|
const { store, socket, presence } = runtime;
|
|
250
256
|
const { session } = socket;
|
|
251
257
|
if (socket.closed() || session.now().refusal !== null)
|
|
@@ -281,19 +287,19 @@ async function transferBinary(runtime, request, transfer, answer) {
|
|
|
281
287
|
return UNCERTAIN;
|
|
282
288
|
}
|
|
283
289
|
}
|
|
284
|
-
function
|
|
290
|
+
function fetchAttachment(runtime, request, name) {
|
|
285
291
|
const { store, socket } = runtime;
|
|
286
|
-
return
|
|
292
|
+
return transferAttachment(runtime, request, (authorization) => store.opened.fetch(name, () => socket.binary(authorization, request)), attachmentAnswer);
|
|
287
293
|
}
|
|
288
|
-
async function
|
|
294
|
+
async function readAttachment(runtime, request, name) {
|
|
289
295
|
if (runtime.socket.closed())
|
|
290
296
|
return UNCERTAIN;
|
|
291
297
|
const held = await runtime.store.opened.find(name);
|
|
292
298
|
if (held !== null)
|
|
293
299
|
return held;
|
|
294
|
-
return
|
|
300
|
+
return fetchAttachment(runtime, request, name);
|
|
295
301
|
}
|
|
296
|
-
async function
|
|
302
|
+
async function attachmentPath(store, locator, path, revision) {
|
|
297
303
|
if (revision !== undefined)
|
|
298
304
|
return { kind: 'path', locator, path, revision };
|
|
299
305
|
const replica = await store.replica(locator);
|
|
@@ -306,7 +312,7 @@ async function binaryPath(store, locator, path, revision) {
|
|
|
306
312
|
return null;
|
|
307
313
|
if (held.binary.state === 'pending')
|
|
308
314
|
return { kind: 'pending', localId: held.binary.localId };
|
|
309
|
-
const record =
|
|
315
|
+
const record = attachmentRecord(path, held.binary, held.revision ?? undefined);
|
|
310
316
|
if (record.state !== 'accepted')
|
|
311
317
|
return null;
|
|
312
318
|
const queued = replica.queue.flatMap((batch) => batch.changes);
|
|
@@ -334,17 +340,17 @@ async function binaryPath(store, locator, path, revision) {
|
|
|
334
340
|
revision: record.revision,
|
|
335
341
|
};
|
|
336
342
|
}
|
|
337
|
-
async function
|
|
343
|
+
async function askedAttachment({ store, socket }, locator, path, revision) {
|
|
338
344
|
await socket.ready;
|
|
339
345
|
const drafted = (await store.draft(locator, path))?.parts.file;
|
|
340
346
|
return drafted !== undefined && drafted.localId === revision
|
|
341
347
|
? { kind: 'pending', localId: revision }
|
|
342
|
-
:
|
|
348
|
+
: attachmentPath(store, locator, path, revision);
|
|
343
349
|
}
|
|
344
|
-
async function
|
|
350
|
+
async function pendingAttachment(store, locator, path, localId) {
|
|
345
351
|
const facts = await queuedFacts(store, locator, path, localId);
|
|
346
352
|
return facts === null
|
|
347
|
-
?
|
|
353
|
+
? absentAttachment(path)
|
|
348
354
|
: {
|
|
349
355
|
kind: 'binary',
|
|
350
356
|
file: localId,
|
|
@@ -352,13 +358,13 @@ async function pendingBinary(store, locator, path, localId) {
|
|
|
352
358
|
mediaType: facts.mediaType,
|
|
353
359
|
};
|
|
354
360
|
}
|
|
355
|
-
async function
|
|
356
|
-
const asked = await
|
|
361
|
+
async function readAttachmentPath(runtime, locator, path, revision) {
|
|
362
|
+
const asked = await askedAttachment(runtime, locator, path, revision);
|
|
357
363
|
if (asked === null)
|
|
358
|
-
return
|
|
364
|
+
return absentAttachment(path);
|
|
359
365
|
if (asked.kind === 'pending')
|
|
360
|
-
return
|
|
361
|
-
return
|
|
366
|
+
return pendingAttachment(runtime.store, locator, path, asked.localId);
|
|
367
|
+
return readAttachment(runtime, asked, { locator, path: asked.path, revision: asked.revision });
|
|
362
368
|
}
|
|
363
369
|
async function heldMediaType(store, locator, path) {
|
|
364
370
|
const replica = await store.record(locator);
|
|
@@ -366,23 +372,42 @@ async function heldMediaType(store, locator, path) {
|
|
|
366
372
|
return held === undefined ? store.attached.of(locator, path)?.mediaType : held.binary?.mediaType;
|
|
367
373
|
}
|
|
368
374
|
function linkOf(runtime, asked, held) {
|
|
369
|
-
return
|
|
375
|
+
return transferAttachment(runtime, asked, (authorization) => runtime.socket.link(authorization, asked), (result) => attachmentLinkAnswer(result, held));
|
|
370
376
|
}
|
|
371
|
-
async function
|
|
377
|
+
async function linkAttachmentPath(runtime, locator, path, revision) {
|
|
372
378
|
const { store, socket } = runtime;
|
|
373
379
|
await socket.ready;
|
|
374
|
-
const asked = await
|
|
380
|
+
const asked = await attachmentPath(store, locator, path, revision);
|
|
375
381
|
if (asked === null || asked.kind === 'pending')
|
|
376
|
-
return
|
|
382
|
+
return absentAttachment(path);
|
|
377
383
|
return linkOf(runtime, asked, revision === undefined ? await heldMediaType(store, locator, path) : undefined);
|
|
378
384
|
}
|
|
379
|
-
|
|
385
|
+
function shownImage(runtime, asked, name) {
|
|
386
|
+
const { store, socket } = runtime;
|
|
387
|
+
return new Promise((answer) => {
|
|
388
|
+
void transferAttachment(runtime, asked, (authorization) => store.opened.fetch(name, async () => {
|
|
389
|
+
const read = await socket.binary(authorization, asked);
|
|
390
|
+
const copies = read.kind === 'binary' ? (read.copies ?? []) : [];
|
|
391
|
+
if (read.kind === 'binary' && read.url !== undefined && copies.length > 0) {
|
|
392
|
+
answer({
|
|
393
|
+
kind: 'link',
|
|
394
|
+
url: read.url,
|
|
395
|
+
name: asked.path.slice(asked.path.lastIndexOf('/') + 1),
|
|
396
|
+
mediaType: read.mediaType,
|
|
397
|
+
copies,
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
return read;
|
|
401
|
+
}), attachmentAnswer).then(answer);
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
async function showAttachmentPath(runtime, locator, path, revision) {
|
|
380
405
|
const { store } = runtime;
|
|
381
|
-
const asked = await
|
|
406
|
+
const asked = await askedAttachment(runtime, locator, path, revision);
|
|
382
407
|
if (asked === null)
|
|
383
|
-
return
|
|
408
|
+
return absentAttachment(path);
|
|
384
409
|
if (asked.kind === 'pending')
|
|
385
|
-
return
|
|
410
|
+
return pendingAttachment(store, locator, path, asked.localId);
|
|
386
411
|
if (runtime.socket.closed())
|
|
387
412
|
return UNCERTAIN;
|
|
388
413
|
const name = { locator, path: asked.path, revision: asked.revision };
|
|
@@ -391,8 +416,9 @@ async function showBinaryPath(runtime, locator, path, revision) {
|
|
|
391
416
|
return kept;
|
|
392
417
|
const mediaType = await heldMediaType(store, locator, path);
|
|
393
418
|
if (mediaType !== undefined && isImageType(mediaType))
|
|
394
|
-
return
|
|
395
|
-
|
|
419
|
+
return shownImage(runtime, asked, name);
|
|
420
|
+
const linked = await linkOf(runtime, asked, revision === undefined ? mediaType : undefined);
|
|
421
|
+
return linked.kind === 'link' ? { ...linked, copies: [] } : linked;
|
|
396
422
|
}
|
|
397
423
|
async function attachFile(runtime, locator, file, answer) {
|
|
398
424
|
const { store, socket } = runtime;
|
|
@@ -404,7 +430,7 @@ async function attachFile(runtime, locator, file, answer) {
|
|
|
404
430
|
socket.session.now().refusal !== null)
|
|
405
431
|
return OFFLINE;
|
|
406
432
|
const request = await attachedFile(locator, file);
|
|
407
|
-
return
|
|
433
|
+
return transferAttachment(runtime, { locator }, async (held) => {
|
|
408
434
|
const result = await socket.attach(held, request);
|
|
409
435
|
if (result.kind === 'attached' && locator !== null) {
|
|
410
436
|
store.attached.hold(locator, result.path, {
|
|
@@ -418,7 +444,7 @@ async function attachFile(runtime, locator, file, answer) {
|
|
|
418
444
|
async function keyedAttachment(runtime, link) {
|
|
419
445
|
await runtime.socket.ready;
|
|
420
446
|
const asked = { kind: 'key', link };
|
|
421
|
-
return
|
|
447
|
+
return transferAttachment(runtime, { locator: null }, (authorization) => runtime.socket.link(authorization, asked), (result) => attachmentLinkAnswer(result));
|
|
422
448
|
}
|
|
423
449
|
export function conversationFiles(runtime) {
|
|
424
450
|
return {
|
|
@@ -426,12 +452,12 @@ export function conversationFiles(runtime) {
|
|
|
426
452
|
attachment: (link) => keyedAttachment(runtime, link),
|
|
427
453
|
};
|
|
428
454
|
}
|
|
429
|
-
export function
|
|
455
|
+
export function attachmentSurface(runtime) {
|
|
430
456
|
return {
|
|
431
457
|
part: runtime.store.part,
|
|
432
|
-
read: (room, path, revision) =>
|
|
433
|
-
link: (room, path, revision) =>
|
|
434
|
-
show: (room, path, revision) =>
|
|
458
|
+
read: (room, path, revision) => readAttachmentPath(runtime, room, path, revision),
|
|
459
|
+
link: (room, path, revision) => linkAttachmentPath(runtime, room, path, revision),
|
|
460
|
+
show: (room, path, revision) => showAttachmentPath(runtime, room, path, revision),
|
|
435
461
|
attach: (room, file) => attachFile(runtime, room, file, attachAnswer),
|
|
436
462
|
};
|
|
437
463
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selector.d.ts","sourceRoot":"","sources":["../src/selector.ts"],"names":[],"mappings":"AAaA,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,OAAO,GACtC,OAAO,CAET;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,OAAO,EAAE,CAOnF"}
|