@agentshouse/mdruntime 0.1.0-cbb8d8acc9d19 → 0.1.0-cc56db96f86ae
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 +285 -225
- package/README.md +21 -10
- package/dist/adapter.d.ts +114 -26
- package/dist/adapter.d.ts.map +1 -1
- package/dist/attempt.d.ts +16 -0
- package/dist/attempt.d.ts.map +1 -0
- package/dist/attempt.js +70 -0
- package/dist/binary.d.ts +23 -0
- package/dist/binary.d.ts.map +1 -0
- package/dist/binary.js +8 -0
- package/dist/bootstrap.d.ts +18 -5
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +147 -40
- package/dist/change-set.d.ts +7 -2
- package/dist/change-set.d.ts.map +1 -1
- package/dist/change-set.js +50 -16
- package/dist/change.d.ts +45 -0
- package/dist/change.d.ts.map +1 -1
- package/dist/change.js +34 -0
- package/dist/chat/acts.d.ts +33 -0
- package/dist/chat/acts.d.ts.map +1 -0
- package/dist/chat/acts.js +36 -0
- package/dist/chat/context.d.ts +3 -0
- package/dist/chat/context.d.ts.map +1 -0
- package/dist/chat/context.js +10 -0
- package/dist/chat/earlier.d.ts +10 -0
- package/dist/chat/earlier.d.ts.map +1 -0
- package/dist/chat/earlier.js +54 -0
- package/dist/chat/house.d.ts +25 -0
- package/dist/chat/house.d.ts.map +1 -0
- package/dist/chat/house.js +38 -0
- package/dist/chat/input.d.ts +11 -0
- package/dist/chat/input.d.ts.map +1 -0
- package/dist/chat/input.js +92 -0
- package/dist/chat/kit.d.ts +61 -0
- package/dist/chat/kit.d.ts.map +1 -0
- package/dist/chat/kit.js +123 -0
- package/dist/chat/lasting.d.ts +6 -0
- package/dist/chat/lasting.d.ts.map +1 -0
- package/dist/chat/lasting.js +19 -0
- package/dist/chat/list.d.ts +28 -0
- package/dist/chat/list.d.ts.map +1 -0
- package/dist/chat/list.js +103 -0
- package/dist/chat/markdown.d.ts +21 -0
- package/dist/chat/markdown.d.ts.map +1 -0
- package/dist/chat/markdown.js +246 -0
- package/dist/chat/message.d.ts +7 -0
- package/dist/chat/message.d.ts.map +1 -0
- package/dist/chat/message.js +237 -0
- package/dist/chat/messages.d.ts +29 -0
- package/dist/chat/messages.d.ts.map +1 -0
- package/dist/chat/messages.js +190 -0
- package/dist/chat/name.d.ts +7 -0
- package/dist/chat/name.d.ts.map +1 -0
- package/dist/chat/name.js +37 -0
- package/dist/chat/opened.d.ts +12 -0
- package/dist/chat/opened.d.ts.map +1 -0
- package/dist/chat/opened.js +19 -0
- package/dist/chat/overlay.d.ts +32 -0
- package/dist/chat/overlay.d.ts.map +1 -0
- package/dist/chat/overlay.js +103 -0
- package/dist/chat/parts.d.ts +58 -0
- package/dist/chat/parts.d.ts.map +1 -0
- package/dist/chat/parts.js +120 -0
- package/dist/chat/pieces.d.ts +62 -0
- package/dist/chat/pieces.d.ts.map +1 -0
- package/dist/chat/pieces.js +1110 -0
- package/dist/chat/process.d.ts +20 -0
- package/dist/chat/process.d.ts.map +1 -0
- package/dist/chat/process.js +32 -0
- package/dist/chat/provider.d.ts +68 -0
- package/dist/chat/provider.d.ts.map +1 -0
- package/dist/chat/provider.js +619 -0
- package/dist/chat/question.d.ts +9 -0
- package/dist/chat/question.d.ts.map +1 -0
- package/dist/chat/question.js +69 -0
- package/dist/chat/questions.d.ts +31 -0
- package/dist/chat/questions.d.ts.map +1 -0
- package/dist/chat/questions.js +111 -0
- package/dist/chat/read.d.ts +5 -0
- package/dist/chat/read.d.ts.map +1 -0
- package/dist/chat/read.js +13 -0
- package/dist/chat/ready.d.ts +37 -0
- package/dist/chat/ready.d.ts.map +1 -0
- package/dist/chat/ready.js +93 -0
- package/dist/chat/room-file.d.ts +8 -0
- package/dist/chat/room-file.d.ts.map +1 -0
- package/dist/chat/room-file.js +67 -0
- package/dist/chat/steady.d.ts +3 -0
- package/dist/chat/steady.d.ts.map +1 -0
- package/dist/chat/steady.js +26 -0
- package/dist/chat/style.d.ts +4 -0
- package/dist/chat/style.d.ts.map +1 -0
- package/dist/chat/style.js +306 -0
- package/dist/chat.d.ts +15 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +8 -0
- package/dist/client.d.ts +33 -13
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +81 -16
- package/dist/collection.d.ts +23 -13
- package/dist/collection.d.ts.map +1 -1
- package/dist/collection.js +367 -38
- package/dist/connection.d.ts +54 -16
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +2582 -486
- package/dist/conversation.d.ts +39 -12
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js +546 -171
- package/dist/digest.d.ts +2 -0
- package/dist/digest.d.ts.map +1 -0
- package/dist/digest.js +100 -0
- package/dist/durability.d.ts +7 -1
- package/dist/durability.d.ts.map +1 -1
- package/dist/entry.d.ts +17 -0
- package/dist/entry.d.ts.map +1 -0
- package/dist/entry.js +157 -0
- package/dist/expectation.d.ts +21 -0
- package/dist/expectation.d.ts.map +1 -0
- package/dist/expectation.js +70 -0
- package/dist/failure.d.ts +13 -0
- package/dist/failure.d.ts.map +1 -0
- package/dist/failure.js +19 -0
- package/dist/fence.d.ts +6 -0
- package/dist/fence.d.ts.map +1 -0
- package/dist/fence.js +10 -0
- package/dist/file.d.ts +2 -10
- package/dist/file.d.ts.map +1 -1
- package/dist/file.js +3 -120
- package/dist/host.d.ts +15 -3
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +107 -21
- package/dist/identity.d.ts +5 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +19 -1
- package/dist/index.d.ts +20 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/memory.d.ts +11 -4
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +92 -27
- package/dist/model.d.ts +7 -4
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +10 -1
- package/dist/observation.d.ts +7 -2
- package/dist/observation.d.ts.map +1 -1
- package/dist/observation.js +29 -12
- package/dist/open.d.ts +2 -0
- package/dist/open.d.ts.map +1 -0
- package/dist/open.js +1 -0
- package/dist/outcome.d.ts +57 -3
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +67 -1
- package/dist/overlay.d.ts +18 -5
- package/dist/overlay.d.ts.map +1 -1
- package/dist/overlay.js +271 -165
- package/dist/query.d.ts +61 -4
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +40 -7
- package/dist/reach.d.ts +13 -4
- package/dist/reach.d.ts.map +1 -1
- package/dist/reach.js +201 -47
- package/dist/react.d.ts +31 -20
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +13 -21
- package/dist/read-side.d.ts +18 -9
- package/dist/read-side.d.ts.map +1 -1
- package/dist/read-side.js +903 -157
- package/dist/readiness.d.ts +53 -0
- package/dist/readiness.d.ts.map +1 -0
- package/dist/readiness.js +33 -0
- package/dist/reads.d.ts +11 -0
- package/dist/reads.d.ts.map +1 -0
- package/dist/reads.js +98 -0
- package/dist/recovery.d.ts +25 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +198 -0
- package/dist/refresh.d.ts +13 -3
- package/dist/refresh.d.ts.map +1 -1
- package/dist/refresh.js +73 -43
- package/dist/replica.d.ts +16 -8
- package/dist/replica.d.ts.map +1 -1
- package/dist/replica.js +198 -91
- package/dist/room-draft.d.ts +40 -9
- package/dist/room-draft.d.ts.map +1 -1
- package/dist/room-draft.js +153 -37
- package/dist/rows.d.ts +10 -13
- package/dist/rows.d.ts.map +1 -1
- package/dist/rows.js +19 -14
- package/dist/save.d.ts +72 -4
- package/dist/save.d.ts.map +1 -1
- package/dist/save.js +812 -145
- package/dist/search.d.ts +52 -8
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +242 -46
- package/dist/seed.d.ts +16 -0
- package/dist/seed.d.ts.map +1 -0
- package/dist/seed.js +75 -0
- package/dist/shared.d.ts +19 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +461 -0
- package/dist/status.d.ts +6 -2
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +0 -8
- package/dist/store.d.ts +90 -23
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +675 -295
- package/dist/tables.d.ts +181 -0
- package/dist/tables.d.ts.map +1 -0
- package/dist/tables.js +309 -0
- package/dist/turn.d.ts +9 -0
- package/dist/turn.d.ts.map +1 -0
- package/dist/turn.js +67 -0
- package/dist/windows.d.ts +21 -0
- package/dist/windows.d.ts.map +1 -0
- package/dist/windows.js +84 -0
- package/dist/wire.d.ts +165 -33
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +67 -31
- package/package.json +30 -14
- package/dist/attachment.d.ts +0 -3
- package/dist/attachment.d.ts.map +0 -1
- package/dist/attachment.js +0 -8
package/dist/query.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type Definition } from '@agentshouse/mdmodel';
|
|
2
2
|
import type { HeadChange } from './adapter.js';
|
|
3
|
+
import type { BinaryFileRecord } from './binary.js';
|
|
4
|
+
import type { Open } from './open.js';
|
|
3
5
|
export type Value = string | number | boolean | null;
|
|
4
6
|
export type Predicate = Value | {
|
|
5
7
|
$eq: Value;
|
|
@@ -36,6 +38,8 @@ export type Filter = {
|
|
|
36
38
|
types?: readonly string[];
|
|
37
39
|
where?: Where;
|
|
38
40
|
pathPrefix?: string;
|
|
41
|
+
folder?: string;
|
|
42
|
+
paths?: readonly string[];
|
|
39
43
|
hop?: Related & {
|
|
40
44
|
field: string;
|
|
41
45
|
};
|
|
@@ -43,7 +47,7 @@ export type Filter = {
|
|
|
43
47
|
field?: string;
|
|
44
48
|
};
|
|
45
49
|
};
|
|
46
|
-
export type Key = 'room' | 'path' | 'type' | {
|
|
50
|
+
export type Key = 'room' | 'path' | 'type' | 'folder' | {
|
|
47
51
|
field: string;
|
|
48
52
|
};
|
|
49
53
|
export type Select = 'all' | {
|
|
@@ -53,6 +57,7 @@ export type Select = 'all' | {
|
|
|
53
57
|
markdown?: true;
|
|
54
58
|
backlinks?: true;
|
|
55
59
|
change?: true;
|
|
60
|
+
fileId?: true;
|
|
56
61
|
};
|
|
57
62
|
export type OrderOptions = {
|
|
58
63
|
nulls?: 'first' | 'last';
|
|
@@ -68,6 +73,8 @@ export type DocumentQuery = Filter & {
|
|
|
68
73
|
direction?: Direction;
|
|
69
74
|
} & OrderOptions)[];
|
|
70
75
|
limit?: number;
|
|
76
|
+
after?: string;
|
|
77
|
+
total?: true;
|
|
71
78
|
};
|
|
72
79
|
export type GroupQuery = Filter & {
|
|
73
80
|
groupBy: readonly Exclude<Key, 'path'>[];
|
|
@@ -76,6 +83,8 @@ export type GroupQuery = Filter & {
|
|
|
76
83
|
direction?: Direction;
|
|
77
84
|
}[];
|
|
78
85
|
limit?: number;
|
|
86
|
+
after?: string;
|
|
87
|
+
total?: true;
|
|
79
88
|
};
|
|
80
89
|
export type LocalQuery = DocumentQuery | GroupQuery;
|
|
81
90
|
export type Backlink = {
|
|
@@ -93,18 +102,49 @@ export type QueryDocument = {
|
|
|
93
102
|
markdown?: string;
|
|
94
103
|
backlinks?: readonly Backlink[];
|
|
95
104
|
change?: HeadChange | null;
|
|
105
|
+
fileId?: string | null;
|
|
106
|
+
binaryFile?: BinaryFileRecord;
|
|
96
107
|
};
|
|
97
108
|
export type QueryGroup = {
|
|
98
109
|
key: readonly unknown[];
|
|
99
110
|
count: number;
|
|
100
111
|
};
|
|
101
|
-
export type
|
|
112
|
+
export type CoveredRoom = {
|
|
113
|
+
room: string;
|
|
114
|
+
generation: string;
|
|
115
|
+
current: boolean;
|
|
116
|
+
};
|
|
117
|
+
export type QueryCoverage = {
|
|
118
|
+
rooms: readonly CoveredRoom[];
|
|
119
|
+
indexes: readonly string[];
|
|
120
|
+
overlay: readonly string[];
|
|
121
|
+
};
|
|
122
|
+
export type Awaits = Open<'acquisition' | 'preparation' | 'index' | 'unlock'>;
|
|
123
|
+
export type PendingRoom = {
|
|
124
|
+
room: string;
|
|
125
|
+
awaits: Awaits;
|
|
126
|
+
};
|
|
127
|
+
export type PendingResult = {
|
|
128
|
+
pending: readonly PendingRoom[];
|
|
129
|
+
};
|
|
130
|
+
export type DocumentRows = {
|
|
102
131
|
documents: readonly QueryDocument[];
|
|
132
|
+
next?: string;
|
|
133
|
+
total?: number;
|
|
103
134
|
};
|
|
104
|
-
export type
|
|
135
|
+
export type GroupRows = {
|
|
105
136
|
groups: readonly QueryGroup[];
|
|
137
|
+
next?: string;
|
|
138
|
+
total?: number;
|
|
139
|
+
};
|
|
140
|
+
export type QueryRows = DocumentRows | GroupRows;
|
|
141
|
+
export type DocumentResult = DocumentRows & {
|
|
142
|
+
coverage: QueryCoverage;
|
|
143
|
+
};
|
|
144
|
+
export type GroupResult = GroupRows & {
|
|
145
|
+
coverage: QueryCoverage;
|
|
106
146
|
};
|
|
107
|
-
export type QueryResult = DocumentResult | GroupResult;
|
|
147
|
+
export type QueryResult = DocumentResult | GroupResult | PendingResult;
|
|
108
148
|
export type QueryErrorCode = 'invalid-query' | 'unknown-type' | 'unknown-field' | 'wrong-kind';
|
|
109
149
|
export type RoomFacts = {
|
|
110
150
|
locator: string;
|
|
@@ -159,6 +199,8 @@ export type KeyPlan = {
|
|
|
159
199
|
of: 'path';
|
|
160
200
|
} | {
|
|
161
201
|
of: 'type';
|
|
202
|
+
} | {
|
|
203
|
+
of: 'folder';
|
|
162
204
|
} | {
|
|
163
205
|
of: 'field';
|
|
164
206
|
field: string;
|
|
@@ -171,6 +213,7 @@ export type DocumentShape = {
|
|
|
171
213
|
markdown: boolean;
|
|
172
214
|
backlinks: boolean;
|
|
173
215
|
change: boolean;
|
|
216
|
+
fileId: boolean;
|
|
174
217
|
orderBy: readonly {
|
|
175
218
|
key: KeyPlan;
|
|
176
219
|
options: OrderOptions & {
|
|
@@ -190,10 +233,18 @@ export type PlanReach = {
|
|
|
190
233
|
rooms: readonly string[];
|
|
191
234
|
documents: readonly string[];
|
|
192
235
|
};
|
|
236
|
+
export type Continuation = {
|
|
237
|
+
text: string;
|
|
238
|
+
values: readonly unknown[] | null;
|
|
239
|
+
};
|
|
193
240
|
export type Plan = {
|
|
241
|
+
key: string;
|
|
194
242
|
rooms: readonly string[] | null;
|
|
195
243
|
reach: PlanReach | null;
|
|
244
|
+
locked: readonly string[];
|
|
196
245
|
root: Scope;
|
|
246
|
+
folder: string | null;
|
|
247
|
+
paths: readonly string[] | null;
|
|
197
248
|
hop: (Scope & {
|
|
198
249
|
field: string;
|
|
199
250
|
}) | null;
|
|
@@ -202,17 +253,23 @@ export type Plan = {
|
|
|
202
253
|
}) | null;
|
|
203
254
|
shape: DocumentShape | GroupShape;
|
|
204
255
|
limit: number | null;
|
|
256
|
+
after: Continuation | null;
|
|
257
|
+
total: boolean;
|
|
205
258
|
};
|
|
206
259
|
export declare class QueryError extends Error {
|
|
260
|
+
readonly code: QueryErrorCode;
|
|
261
|
+
readonly retryable = false;
|
|
207
262
|
constructor(code: QueryErrorCode, at: string, problem: string);
|
|
208
263
|
}
|
|
209
264
|
type Entries = Readonly<Record<string, unknown>>;
|
|
210
265
|
export declare function invalid(at: string, problem: string): never;
|
|
211
266
|
export declare function plain(value: unknown): value is Entries;
|
|
212
267
|
export declare function known(value: Entries, allowed: readonly string[], at: string): void;
|
|
268
|
+
export declare function flag(input: unknown, at: string): boolean;
|
|
213
269
|
export declare function planOf(input: unknown, facts: HeldRooms, reach?: PlanReach | null): Plan;
|
|
214
270
|
export declare function limitOf(input: unknown): number | null;
|
|
215
271
|
export declare function filterOf(input: unknown, facts: HeldRooms, reach?: PlanReach | null): Plan;
|
|
272
|
+
export declare function queryKey(query: unknown): string;
|
|
216
273
|
export declare function identityOf(plan: Plan): string;
|
|
217
274
|
export {};
|
|
218
275
|
//# sourceMappingURL=query.d.ts.map
|
package/dist/query.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../src/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,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,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE/C;AAaD,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE7C"}
|
package/dist/query.js
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { pointerFacts, } from '@agentshouse/mdmodel';
|
|
2
2
|
import { referenceField } from './model.js';
|
|
3
3
|
import { normalize } from './paths.js';
|
|
4
|
+
import { decodedCursor } from './windows.js';
|
|
4
5
|
export class QueryError extends Error {
|
|
6
|
+
code;
|
|
7
|
+
retryable = false;
|
|
5
8
|
constructor(code, at, problem) {
|
|
6
9
|
super(`${code} at ${at}: ${problem}`);
|
|
10
|
+
this.code = code;
|
|
7
11
|
}
|
|
8
12
|
}
|
|
9
13
|
const RANGE = ['$gt', '$gte', '$lt', '$lte'];
|
|
10
14
|
const SINGLE = ['$eq', '$ne', '$in', '$nin', '$all', '$size', '$exists'];
|
|
11
|
-
const FILTER = ['rooms', 'types', 'where', 'pathPrefix', 'hop', 'backlinks'];
|
|
15
|
+
const FILTER = ['rooms', 'types', 'where', 'pathPrefix', 'folder', 'paths', 'hop', 'backlinks'];
|
|
12
16
|
const RELATED = ['types', 'where', 'pathPrefix', 'field'];
|
|
13
|
-
const PARTS = ['fields', 'sections', 'preamble', 'markdown', 'backlinks', 'change'];
|
|
17
|
+
const PARTS = ['fields', 'sections', 'preamble', 'markdown', 'backlinks', 'change', 'fileId'];
|
|
14
18
|
const ORDER = ['by', 'direction', 'nulls', 'stringSort', 'locale', 'localeOptions'];
|
|
15
19
|
const CALENDAR_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
16
20
|
const STRAY_ESCAPE = /~(?![01])/u;
|
|
@@ -57,6 +61,13 @@ function names(input, at) {
|
|
|
57
61
|
invalid(at, 'expects a list of names');
|
|
58
62
|
return [...new Set(listed)].sort();
|
|
59
63
|
}
|
|
64
|
+
function pathsOf(input) {
|
|
65
|
+
const listed = list(input, 'paths');
|
|
66
|
+
if (listed.some((item) => typeof item !== 'string' || item === '' || normalize(item) !== item)) {
|
|
67
|
+
invalid('paths', 'expects a list of Paths');
|
|
68
|
+
}
|
|
69
|
+
return [...new Set(listed)].sort();
|
|
70
|
+
}
|
|
60
71
|
function directory(input, at) {
|
|
61
72
|
if (typeof input !== 'string' || normalize(input) !== input) {
|
|
62
73
|
invalid(at, 'expects a normalized directory');
|
|
@@ -276,15 +287,16 @@ function backlinksOf(facts, rooms, input) {
|
|
|
276
287
|
return { types, where, pathPrefix, field };
|
|
277
288
|
}
|
|
278
289
|
function keyPlan(typed, input, at, path) {
|
|
279
|
-
if (input === 'room' || input === 'type' || (path && input === 'path'))
|
|
290
|
+
if (input === 'room' || input === 'type' || input === 'folder' || (path && input === 'path')) {
|
|
280
291
|
return { of: input };
|
|
292
|
+
}
|
|
281
293
|
if (plain(input) && Object.hasOwn(input, 'field') && Object.keys(input).length === 1) {
|
|
282
294
|
if (specs(typed, input.field, place(at, 'field')).some(several)) {
|
|
283
295
|
invalid(place(at, 'field'), 'a path that can hold several values');
|
|
284
296
|
}
|
|
285
297
|
return { of: 'field', field: input.field };
|
|
286
298
|
}
|
|
287
|
-
return invalid(at, path ? 'expects room, path, type or a field' : 'expects room, type or a field');
|
|
299
|
+
return invalid(at, path ? 'expects room, path, type, folder or a field' : 'expects room, type, folder or a field');
|
|
288
300
|
}
|
|
289
301
|
function direction(input, at) {
|
|
290
302
|
if (input === undefined)
|
|
@@ -346,7 +358,7 @@ function parts(typed, input, at, fields) {
|
|
|
346
358
|
});
|
|
347
359
|
return named;
|
|
348
360
|
}
|
|
349
|
-
function flag(input, at) {
|
|
361
|
+
export function flag(input, at) {
|
|
350
362
|
if (input === undefined)
|
|
351
363
|
return false;
|
|
352
364
|
if (input !== true)
|
|
@@ -374,6 +386,7 @@ function documentShape(typed, input) {
|
|
|
374
386
|
markdown: true,
|
|
375
387
|
backlinks: true,
|
|
376
388
|
change: true,
|
|
389
|
+
fileId: true,
|
|
377
390
|
orderBy,
|
|
378
391
|
};
|
|
379
392
|
}
|
|
@@ -388,6 +401,7 @@ function documentShape(typed, input) {
|
|
|
388
401
|
markdown: flag(select.markdown, 'select.markdown'),
|
|
389
402
|
backlinks: flag(select.backlinks, 'select.backlinks'),
|
|
390
403
|
change: flag(select.change, 'select.change'),
|
|
404
|
+
fileId: flag(select.fileId, 'select.fileId'),
|
|
391
405
|
orderBy,
|
|
392
406
|
};
|
|
393
407
|
}
|
|
@@ -418,20 +432,36 @@ export function planOf(input, facts, reach = null) {
|
|
|
418
432
|
invalid('select', 'a grouped query selects nothing');
|
|
419
433
|
if (!grouped && input.select === undefined)
|
|
420
434
|
invalid('select', 'a Document query must select');
|
|
421
|
-
known(input, [...FILTER, 'orderBy', 'limit', grouped ? 'groupBy' : 'select'], '');
|
|
435
|
+
known(input, [...FILTER, 'orderBy', 'limit', 'after', 'total', grouped ? 'groupBy' : 'select'], '');
|
|
422
436
|
const limit = limitOf(input.limit);
|
|
423
437
|
const rooms = input.rooms === undefined ? null : names(input.rooms, 'rooms');
|
|
424
438
|
const { typed, ...root } = scope(facts, rooms, input, '');
|
|
439
|
+
const shape = grouped ? groupShape(typed, input) : documentShape(typed, input);
|
|
425
440
|
return {
|
|
441
|
+
key: queryKey(input),
|
|
426
442
|
rooms,
|
|
427
443
|
reach,
|
|
444
|
+
locked: [],
|
|
428
445
|
root,
|
|
446
|
+
folder: input.folder === undefined ? null : directory(input.folder, 'folder'),
|
|
447
|
+
paths: input.paths === undefined ? null : pathsOf(input.paths),
|
|
429
448
|
hop: input.hop === undefined ? null : hopOf(facts, rooms, typed, input.hop),
|
|
430
449
|
backlinks: input.backlinks === undefined ? null : backlinksOf(facts, rooms, input.backlinks),
|
|
431
|
-
shape
|
|
450
|
+
shape,
|
|
432
451
|
limit,
|
|
452
|
+
after: continuationOf(input.after, shape.orderBy.length + 1),
|
|
453
|
+
total: flag(input.total, 'total'),
|
|
433
454
|
};
|
|
434
455
|
}
|
|
456
|
+
function continuationOf(input, arity) {
|
|
457
|
+
if (input === undefined)
|
|
458
|
+
return null;
|
|
459
|
+
const values = typeof input === 'string' ? decodedCursor(input) : null;
|
|
460
|
+
if (values === null || (values.length !== 0 && values.length !== arity)) {
|
|
461
|
+
invalid('after', 'expects the next an earlier result of this query returned');
|
|
462
|
+
}
|
|
463
|
+
return { text: input, values: values.length === 0 ? null : values };
|
|
464
|
+
}
|
|
435
465
|
export function limitOf(input) {
|
|
436
466
|
if (input === undefined)
|
|
437
467
|
return null;
|
|
@@ -446,6 +476,9 @@ export function filterOf(input, facts, reach = null) {
|
|
|
446
476
|
known(input, FILTER, '');
|
|
447
477
|
return planOf({ ...input, select: {} }, facts, reach);
|
|
448
478
|
}
|
|
479
|
+
export function queryKey(query) {
|
|
480
|
+
return canonical(query);
|
|
481
|
+
}
|
|
449
482
|
function canonical(value) {
|
|
450
483
|
if (Array.isArray(value))
|
|
451
484
|
return `[${value.map(canonical).join(',')}]`;
|
package/dist/reach.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ReferrerScope } from './adapter.js';
|
|
2
|
+
import type { MdRuntime, ReadinessPort, RuntimeTopic } from './connection.js';
|
|
2
3
|
import type { Plan, PlanReach, QueryResult } from './query.js';
|
|
3
|
-
import type {
|
|
4
|
+
import type { Readiness } from './readiness.js';
|
|
5
|
+
import { type SearchResult } from './search.js';
|
|
4
6
|
export type ReachedDocument = {
|
|
5
7
|
readonly room: string;
|
|
6
8
|
readonly path: string;
|
|
@@ -18,12 +20,19 @@ export type RuntimeView = {
|
|
|
18
20
|
};
|
|
19
21
|
export type NarrowedView = RuntimeView & {
|
|
20
22
|
narrow(reach: PortReach | null): void;
|
|
23
|
+
facts(port: ReadinessPort): void;
|
|
21
24
|
};
|
|
22
25
|
export type Reachable = RuntimeView & {
|
|
23
26
|
plan(input: unknown, reach: PortReach | null): Plan;
|
|
24
27
|
query(plan: Plan): Promise<QueryResult>;
|
|
25
28
|
watchPlan(plan: Plan, deliver: (message: unknown) => void): () => void;
|
|
26
|
-
search(input: unknown, reach: PortReach | null): Promise<SearchResult>;
|
|
29
|
+
search(input: unknown, reach: PortReach | null, locked: readonly string[]): Promise<SearchResult>;
|
|
30
|
+
watchReadiness(port: ReadinessPort, reach: PortReach | null, deliver: (readiness: Readiness) => void): () => void;
|
|
31
|
+
referrerScope(referrer: unknown): ReferrerScope | null;
|
|
32
|
+
locked(room: string): boolean;
|
|
33
|
+
lockedRooms(): readonly string[];
|
|
34
|
+
watchLocks(notify: () => void): () => void;
|
|
35
|
+
located(room: string, path: string, destination: string): ReachedDocument | null;
|
|
27
36
|
};
|
|
28
37
|
export declare function holds(reach: PortReach | null, room: string): boolean;
|
|
29
38
|
export declare function governs(reach: PortReach | null, room: {
|
|
@@ -36,5 +45,5 @@ export declare function governs(reach: PortReach | null, room: {
|
|
|
36
45
|
readonly selection: boolean;
|
|
37
46
|
};
|
|
38
47
|
export declare function planReach(reach: PortReach | null): PlanReach | null;
|
|
39
|
-
export declare function narrowed(runtime: Reachable, given: PortReach | null): NarrowedView;
|
|
48
|
+
export declare function narrowed(runtime: Reachable, given: PortReach | null, told: ReadinessPort): NarrowedView;
|
|
40
49
|
//# 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":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"reach.d.ts","sourceRoot":"","sources":["../src/reach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAEV,SAAS,EACT,aAAa,EAEb,YAAY,EAEb,MAAM,iBAAiB,CAAC;AAgBzB,OAAO,KAAK,EAAiB,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAU9E,OAAO,KAAK,EAAE,SAAS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