@agentshouse/app-bridge 0.1.0-c66ec79ae3f1a → 0.1.0-c6ad9402daafa
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/dist/calls.d.ts +94 -31
- package/dist/mdmodel/condition.d.ts +0 -1
- package/dist/mdruntime/change-set.d.ts +1 -7
- package/dist/mdruntime/compile.d.ts +6 -1
- package/dist/mdruntime/fulltext.d.ts +26 -0
- package/dist/mdruntime/messages.d.ts +27 -0
- package/dist/mdruntime/query.d.ts +4 -1
- package/dist/mdruntime/readiness.d.ts +2 -2
- package/dist/mdruntime/search.d.ts +11 -43
- package/dist/mdruntime/store.d.ts +6 -34
- package/dist/mdruntime/stored.d.ts +0 -5
- package/dist/mdruntime/tables.d.ts +23 -11
- package/package.json +1 -1
- package/dist/mdruntime/turn.d.ts +0 -8
package/dist/calls.d.ts
CHANGED
|
@@ -81,6 +81,7 @@ export interface HouseMethods {
|
|
|
81
81
|
readonly params: {
|
|
82
82
|
readonly agent_id: string;
|
|
83
83
|
readonly operation_id?: string;
|
|
84
|
+
readonly replaces?: string;
|
|
84
85
|
};
|
|
85
86
|
readonly result: {
|
|
86
87
|
readonly agent_id: string;
|
|
@@ -264,6 +265,86 @@ export interface HouseMethods {
|
|
|
264
265
|
readonly log_epoch: string;
|
|
265
266
|
};
|
|
266
267
|
};
|
|
268
|
+
readonly 'inboxChat.assign': {
|
|
269
|
+
readonly params: {
|
|
270
|
+
readonly room_ref: string;
|
|
271
|
+
readonly path: string;
|
|
272
|
+
readonly assignee: {
|
|
273
|
+
readonly user: string;
|
|
274
|
+
} | {
|
|
275
|
+
readonly agent: string;
|
|
276
|
+
} | null;
|
|
277
|
+
};
|
|
278
|
+
readonly result: {
|
|
279
|
+
readonly room_ref: string;
|
|
280
|
+
readonly path: string;
|
|
281
|
+
readonly assignee: {
|
|
282
|
+
readonly user: string;
|
|
283
|
+
readonly name: string;
|
|
284
|
+
} | {
|
|
285
|
+
readonly agent: string;
|
|
286
|
+
readonly name: string;
|
|
287
|
+
} | null;
|
|
288
|
+
readonly return_to: {
|
|
289
|
+
readonly agent: string;
|
|
290
|
+
readonly name: string;
|
|
291
|
+
} | null;
|
|
292
|
+
readonly authority: string;
|
|
293
|
+
readonly position: string;
|
|
294
|
+
readonly log_epoch: string;
|
|
295
|
+
readonly url: string;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
readonly 'inboxChat.return': {
|
|
299
|
+
readonly params: {
|
|
300
|
+
readonly room_ref: string;
|
|
301
|
+
readonly path: string;
|
|
302
|
+
};
|
|
303
|
+
readonly result: {
|
|
304
|
+
readonly room_ref: string;
|
|
305
|
+
readonly path: string;
|
|
306
|
+
readonly assignee: {
|
|
307
|
+
readonly user: string;
|
|
308
|
+
readonly name: string;
|
|
309
|
+
} | {
|
|
310
|
+
readonly agent: string;
|
|
311
|
+
readonly name: string;
|
|
312
|
+
} | null;
|
|
313
|
+
readonly return_to: {
|
|
314
|
+
readonly agent: string;
|
|
315
|
+
readonly name: string;
|
|
316
|
+
} | null;
|
|
317
|
+
readonly authority: string;
|
|
318
|
+
readonly position: string;
|
|
319
|
+
readonly log_epoch: string;
|
|
320
|
+
readonly url: string;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
readonly 'inboxChat.takeControl': {
|
|
324
|
+
readonly params: {
|
|
325
|
+
readonly room_ref: string;
|
|
326
|
+
readonly path: string;
|
|
327
|
+
};
|
|
328
|
+
readonly result: {
|
|
329
|
+
readonly room_ref: string;
|
|
330
|
+
readonly path: string;
|
|
331
|
+
readonly assignee: {
|
|
332
|
+
readonly user: string;
|
|
333
|
+
readonly name: string;
|
|
334
|
+
} | {
|
|
335
|
+
readonly agent: string;
|
|
336
|
+
readonly name: string;
|
|
337
|
+
} | null;
|
|
338
|
+
readonly return_to: {
|
|
339
|
+
readonly agent: string;
|
|
340
|
+
readonly name: string;
|
|
341
|
+
} | null;
|
|
342
|
+
readonly authority: string;
|
|
343
|
+
readonly position: string;
|
|
344
|
+
readonly log_epoch: string;
|
|
345
|
+
readonly url: string;
|
|
346
|
+
};
|
|
347
|
+
};
|
|
267
348
|
readonly 'member.list': {
|
|
268
349
|
readonly params: {
|
|
269
350
|
readonly room_ref: string;
|
|
@@ -339,42 +420,20 @@ export interface HouseMethods {
|
|
|
339
420
|
readonly order?: 'asc' | 'desc';
|
|
340
421
|
};
|
|
341
422
|
readonly result: {
|
|
342
|
-
readonly attachments: readonly {
|
|
343
|
-
readonly bytes: number;
|
|
344
|
-
readonly file: string;
|
|
345
|
-
readonly media_type: string | null;
|
|
346
|
-
readonly name: string | null;
|
|
347
|
-
readonly referrer: {
|
|
348
|
-
readonly record: string;
|
|
349
|
-
readonly room_ref: string;
|
|
350
|
-
};
|
|
351
|
-
readonly sha256: string;
|
|
352
|
-
}[];
|
|
353
|
-
readonly body: string | null;
|
|
354
|
-
readonly claimed: unknown;
|
|
355
|
-
readonly created_at: string;
|
|
356
423
|
readonly record: string;
|
|
357
424
|
readonly ref: string;
|
|
425
|
+
readonly created_at: string;
|
|
426
|
+
readonly body: string | null;
|
|
427
|
+
readonly claimed: unknown;
|
|
358
428
|
} | {
|
|
359
|
-
readonly next_cursor?: string;
|
|
360
429
|
readonly records: readonly {
|
|
361
|
-
readonly attachments: readonly {
|
|
362
|
-
readonly bytes: number;
|
|
363
|
-
readonly file: string;
|
|
364
|
-
readonly media_type: string | null;
|
|
365
|
-
readonly name: string | null;
|
|
366
|
-
readonly referrer: {
|
|
367
|
-
readonly record: string;
|
|
368
|
-
readonly room_ref: string;
|
|
369
|
-
};
|
|
370
|
-
readonly sha256: string;
|
|
371
|
-
}[];
|
|
372
|
-
readonly body: string | null;
|
|
373
|
-
readonly claimed: unknown;
|
|
374
|
-
readonly created_at: string;
|
|
375
430
|
readonly record: string;
|
|
376
431
|
readonly ref: string;
|
|
432
|
+
readonly created_at: string;
|
|
433
|
+
readonly body: string | null;
|
|
434
|
+
readonly claimed: unknown;
|
|
377
435
|
}[];
|
|
436
|
+
readonly next_cursor?: string;
|
|
378
437
|
};
|
|
379
438
|
};
|
|
380
439
|
readonly 'relay.read': {
|
|
@@ -880,6 +939,10 @@ export interface HouseMethods {
|
|
|
880
939
|
readonly position: number;
|
|
881
940
|
readonly outcome: 'requested';
|
|
882
941
|
readonly request: string;
|
|
942
|
+
} | {
|
|
943
|
+
readonly position: number;
|
|
944
|
+
readonly outcome: 'continued';
|
|
945
|
+
readonly request: string;
|
|
883
946
|
} | {
|
|
884
947
|
readonly position: number;
|
|
885
948
|
readonly outcome: 'refused';
|
|
@@ -921,12 +984,12 @@ export interface HouseMethods {
|
|
|
921
984
|
readonly position: number;
|
|
922
985
|
readonly outcome: 'refused';
|
|
923
986
|
readonly code: 'cap_reached';
|
|
924
|
-
readonly cap: 'address_submissions' | 'writes' | 'push_addresses' | 'push_deliveries' | 'external_accounts' | 'shared_schemas' | 'export_starts' | 'share_creations' | 'share_room_creations' | 'live_shares' | 'ownership_offers' | 'site_rooms' | 'slot_rooms' | 'room_triggers' | 'app_sockets' | 'kit_connections' | 'open_uploads' | 'waiting_web_wizards';
|
|
987
|
+
readonly cap: 'address_submissions' | 'writes' | 'push_addresses' | 'push_deliveries' | 'external_accounts' | 'shared_schemas' | 'export_starts' | 'share_creations' | 'share_room_creations' | 'live_shares' | 'ownership_offers' | 'site_rooms' | 'slot_rooms' | 'room_triggers' | 'app_sockets' | 'kit_connections' | 'open_uploads' | 'waiting_web_wizards' | 'folder_subscriptions';
|
|
925
988
|
} | {
|
|
926
989
|
readonly position: number;
|
|
927
990
|
readonly outcome: 'refused';
|
|
928
991
|
readonly code: 'cap_reached';
|
|
929
|
-
readonly cap: 'address_submissions' | 'writes' | 'push_addresses' | 'push_deliveries' | 'external_accounts' | 'shared_schemas' | 'export_starts' | 'share_creations' | 'share_room_creations' | 'live_shares' | 'ownership_offers' | 'site_rooms' | 'slot_rooms' | 'room_triggers' | 'app_sockets' | 'kit_connections' | 'open_uploads' | 'waiting_web_wizards';
|
|
992
|
+
readonly cap: 'address_submissions' | 'writes' | 'push_addresses' | 'push_deliveries' | 'external_accounts' | 'shared_schemas' | 'export_starts' | 'share_creations' | 'share_room_creations' | 'live_shares' | 'ownership_offers' | 'site_rooms' | 'slot_rooms' | 'room_triggers' | 'app_sockets' | 'kit_connections' | 'open_uploads' | 'waiting_web_wizards' | 'folder_subscriptions';
|
|
930
993
|
readonly retry_at: string;
|
|
931
994
|
} | {
|
|
932
995
|
readonly position: number;
|
|
@@ -121,7 +121,6 @@ export type ItemFacts = {
|
|
|
121
121
|
readonly delivery: string;
|
|
122
122
|
readonly source: string | null;
|
|
123
123
|
readonly address: string | null;
|
|
124
|
-
readonly has_attachment: boolean;
|
|
125
124
|
readonly container: string | null;
|
|
126
125
|
readonly author: string | null;
|
|
127
126
|
readonly headers: Readonly<Record<string, string>>;
|
|
@@ -2,11 +2,6 @@ export type DocumentChange = {
|
|
|
2
2
|
readonly locator: string;
|
|
3
3
|
readonly path: string | null;
|
|
4
4
|
};
|
|
5
|
-
export type MessageChange = {
|
|
6
|
-
conversation: string;
|
|
7
|
-
identity: string;
|
|
8
|
-
text: string | null;
|
|
9
|
-
};
|
|
10
5
|
export type ChangeSet = {
|
|
11
6
|
documents: readonly DocumentChange[];
|
|
12
7
|
drafts: readonly {
|
|
@@ -16,7 +11,6 @@ export type ChangeSet = {
|
|
|
16
11
|
rooms: readonly string[];
|
|
17
12
|
queues: readonly string[];
|
|
18
13
|
presentations: readonly string[];
|
|
19
|
-
messages: readonly MessageChange[];
|
|
20
14
|
conversations: readonly string[];
|
|
21
15
|
};
|
|
22
16
|
type Changed = {
|
|
@@ -27,7 +21,7 @@ type Changed = {
|
|
|
27
21
|
presentation?: string;
|
|
28
22
|
};
|
|
29
23
|
export declare function changeSet(locator: string, changed?: Changed): ChangeSet;
|
|
30
|
-
export declare function conversationChangeSet(
|
|
24
|
+
export declare function conversationChangeSet(conversations: readonly string[]): ChangeSet;
|
|
31
25
|
export declare function mergeChangeSets(sets: readonly ChangeSet[]): ChangeSet;
|
|
32
26
|
export declare function touches(set: ChangeSet, locator: string, path: string): boolean;
|
|
33
27
|
export {};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type { Plan, QueryRows } from './query.js';
|
|
2
|
-
import type { Connection } from './tables.js';
|
|
2
|
+
import type { Connection, Value } from './tables.js';
|
|
3
3
|
export type QueryRoom = {
|
|
4
4
|
readonly locator: string;
|
|
5
5
|
readonly key: number;
|
|
6
6
|
};
|
|
7
|
+
export type Fragment = {
|
|
8
|
+
readonly sql: string;
|
|
9
|
+
readonly bind: readonly Value[];
|
|
10
|
+
};
|
|
7
11
|
export type QueryAnswer = QueryRows & {
|
|
8
12
|
readonly more?: string;
|
|
9
13
|
};
|
|
14
|
+
export declare function selected(connection: Connection, plan: Plan, rooms: readonly QueryRoom[]): Fragment;
|
|
10
15
|
export declare function answerQuery(connection: Connection, plan: Plan, rooms: readonly QueryRoom[], budget?: number | null): QueryAnswer;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type QueryRoom } from './compile.js';
|
|
2
|
+
import type { Plan } from './query.js';
|
|
3
|
+
import type { HitCursor, SearchWindow } from './search.js';
|
|
4
|
+
import type { Connection } from './tables.js';
|
|
5
|
+
export declare const SEARCH_TABLES: readonly string[];
|
|
6
|
+
export type SearchAsk = {
|
|
7
|
+
readonly text: string;
|
|
8
|
+
readonly limit: number;
|
|
9
|
+
readonly after: readonly [HitCursor, HitCursor] | null;
|
|
10
|
+
readonly total: boolean;
|
|
11
|
+
readonly documents: {
|
|
12
|
+
readonly plan: Plan;
|
|
13
|
+
readonly rooms: readonly QueryRoom[];
|
|
14
|
+
readonly beneath: readonly {
|
|
15
|
+
readonly key: number;
|
|
16
|
+
readonly roots: readonly string[];
|
|
17
|
+
}[];
|
|
18
|
+
} | null;
|
|
19
|
+
readonly conversations: readonly string[];
|
|
20
|
+
};
|
|
21
|
+
export declare function indexDocument(connection: Connection, id: number, path: string, content: string): void;
|
|
22
|
+
export declare function indexMessage(connection: Connection, id: number, text: string): void;
|
|
23
|
+
export declare function unindexDocuments(connection: Connection, ids: Iterable<number>): void;
|
|
24
|
+
export declare function unindexMessages(connection: Connection, ids: Iterable<number>): void;
|
|
25
|
+
export declare function unindexAll(connection: Connection): void;
|
|
26
|
+
export declare function searched(connection: Connection, ask: SearchAsk): SearchWindow;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AcceptedMessage } from './adapter.js';
|
|
2
|
+
import type { Connection } from './tables.js';
|
|
3
|
+
export declare const MESSAGE_TABLES: readonly string[];
|
|
4
|
+
export type HeldConversation = {
|
|
5
|
+
readonly conversation: string;
|
|
6
|
+
readonly read: string | null | undefined;
|
|
7
|
+
readonly partial: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type MessageWindow = {
|
|
10
|
+
readonly messages: AcceptedMessage[];
|
|
11
|
+
readonly more: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type ConversationWrite = {
|
|
14
|
+
readonly conversation: string;
|
|
15
|
+
readonly messages: readonly AcceptedMessage[];
|
|
16
|
+
readonly read?: {
|
|
17
|
+
readonly at: string | null;
|
|
18
|
+
readonly partial: boolean;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare function heldConversations(connection: Connection): HeldConversation[];
|
|
22
|
+
export declare function keptMessages(connection: Connection, { conversation, messages, read }: ConversationWrite): null;
|
|
23
|
+
export declare function messageWindow(connection: Connection, conversation: string, limit: number, before: readonly [string, string] | null): MessageWindow;
|
|
24
|
+
export declare function messageCount(connection: Connection, conversation: string): number;
|
|
25
|
+
export declare function turnArrived(connection: Connection, conversation: string, turn: string): boolean;
|
|
26
|
+
export declare function droppedMessages(connection: Connection, conversations: readonly string[]): void;
|
|
27
|
+
export declare function forgottenMessages(connection: Connection): void;
|
|
@@ -58,6 +58,7 @@ export type Select = 'all' | {
|
|
|
58
58
|
backlinks?: true;
|
|
59
59
|
change?: true;
|
|
60
60
|
fileId?: true;
|
|
61
|
+
revision?: true;
|
|
61
62
|
};
|
|
62
63
|
export type OrderOptions = {
|
|
63
64
|
nulls?: 'first' | 'last';
|
|
@@ -103,6 +104,7 @@ export type QueryDocument = {
|
|
|
103
104
|
backlinks?: readonly Backlink[];
|
|
104
105
|
change?: HeadChange | null;
|
|
105
106
|
fileId?: string | null;
|
|
107
|
+
revision?: string | null;
|
|
106
108
|
binaryFile?: BinaryFileRecord;
|
|
107
109
|
};
|
|
108
110
|
export type QueryGroup = {
|
|
@@ -119,7 +121,7 @@ export type QueryCoverage = {
|
|
|
119
121
|
indexes: readonly string[];
|
|
120
122
|
overlay: readonly string[];
|
|
121
123
|
};
|
|
122
|
-
export type Awaits = Open<'acquisition' | 'preparation' | '
|
|
124
|
+
export type Awaits = Open<'acquisition' | 'preparation' | 'unlock'>;
|
|
123
125
|
export type PendingRoom = {
|
|
124
126
|
room: string;
|
|
125
127
|
awaits: Awaits;
|
|
@@ -214,6 +216,7 @@ export type DocumentShape = {
|
|
|
214
216
|
backlinks: boolean;
|
|
215
217
|
change: boolean;
|
|
216
218
|
fileId: boolean;
|
|
219
|
+
revision: boolean;
|
|
217
220
|
orderBy: readonly {
|
|
218
221
|
key: KeyPlan;
|
|
219
222
|
options: OrderOptions & {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Open } from './open.js';
|
|
2
2
|
export type CodeAvailability = Open<'stored' | 'absent'>;
|
|
3
|
-
export type RoomPreparation = Open<'complete' | 'acquiring' | 'preparing' | '
|
|
3
|
+
export type RoomPreparation = Open<'complete' | 'acquiring' | 'preparing' | 'refused' | 'unadmitted'>;
|
|
4
4
|
export type RoomCoverage = {
|
|
5
5
|
readonly room: string;
|
|
6
6
|
readonly state: RoomPreparation;
|
|
7
7
|
};
|
|
8
|
-
export type ConversationCoverage = Open<'complete' | 'acquiring' | '
|
|
8
|
+
export type ConversationCoverage = Open<'complete' | 'acquiring' | 'undeclared'>;
|
|
9
9
|
export type SearchObligation = Open<'required' | 'unused'>;
|
|
10
10
|
export type TargetCoverage = {
|
|
11
11
|
readonly complete: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ProviderRefusal } from './adapter.js';
|
|
2
|
-
import type { ChangeSet } from './change-set.js';
|
|
3
2
|
import { type CoveredRoom, type Filter, type PendingRoom } from './query.js';
|
|
4
3
|
import type { Open } from './open.js';
|
|
5
4
|
export type DocumentPart = Open<'fields' | 'sections' | 'preamble' | 'path'>;
|
|
@@ -12,29 +11,32 @@ export type SearchRequest = {
|
|
|
12
11
|
after?: string;
|
|
13
12
|
total?: true;
|
|
14
13
|
};
|
|
14
|
+
export type MessagePart = Open<'text'>;
|
|
15
|
+
export type Snippet<Part extends string> = {
|
|
16
|
+
part: Part;
|
|
17
|
+
text: string;
|
|
18
|
+
at: readonly [number, number];
|
|
19
|
+
};
|
|
15
20
|
export type DocumentHit = {
|
|
16
21
|
room: string;
|
|
17
22
|
path: string;
|
|
18
23
|
type: string;
|
|
19
24
|
score: number;
|
|
20
25
|
matches: Readonly<Record<string, readonly DocumentPart[]>>;
|
|
26
|
+
snippet?: Snippet<DocumentPart>;
|
|
21
27
|
};
|
|
22
28
|
export type MessageHit = {
|
|
23
29
|
conversation: string;
|
|
24
30
|
identity: string;
|
|
25
31
|
score: number;
|
|
26
|
-
matches: Readonly<Record<string, readonly
|
|
32
|
+
matches: Readonly<Record<string, readonly MessagePart[]>>;
|
|
33
|
+
snippet?: Snippet<MessagePart>;
|
|
27
34
|
};
|
|
28
35
|
export type SearchCoverage = {
|
|
29
36
|
rooms: readonly CoveredRoom[];
|
|
30
37
|
conversations: readonly string[];
|
|
31
|
-
index: string;
|
|
32
38
|
overlay: readonly string[];
|
|
33
39
|
};
|
|
34
|
-
export type PendingConversation = {
|
|
35
|
-
conversation: string;
|
|
36
|
-
awaits: Open<'index'>;
|
|
37
|
-
};
|
|
38
40
|
export type SearchHits = {
|
|
39
41
|
documents: readonly DocumentHit[];
|
|
40
42
|
messages: readonly MessageHit[];
|
|
@@ -47,7 +49,7 @@ export type SearchWindow = SearchHits & {
|
|
|
47
49
|
};
|
|
48
50
|
};
|
|
49
51
|
export type SearchPending = SearchHits & {
|
|
50
|
-
pending: readonly
|
|
52
|
+
pending: readonly PendingRoom[];
|
|
51
53
|
coverage: SearchCoverage;
|
|
52
54
|
};
|
|
53
55
|
export type SearchUndeclared = ProviderRefusal & {
|
|
@@ -57,24 +59,7 @@ export type SearchResult = (SearchWindow & {
|
|
|
57
59
|
coverage: SearchCoverage;
|
|
58
60
|
}) | SearchPending | SearchUndeclared;
|
|
59
61
|
export declare function undeclaredSearch(): SearchUndeclared;
|
|
60
|
-
export type
|
|
61
|
-
room: string;
|
|
62
|
-
path: string;
|
|
63
|
-
type: string;
|
|
64
|
-
fields: Readonly<Record<string, unknown>>;
|
|
65
|
-
preamble: string;
|
|
66
|
-
sections: Readonly<Record<string, string>>;
|
|
67
|
-
};
|
|
68
|
-
export type SearchedMessage = {
|
|
69
|
-
conversation: string;
|
|
70
|
-
identity: string;
|
|
71
|
-
text: string;
|
|
72
|
-
};
|
|
73
|
-
export type SearchSource = {
|
|
74
|
-
room(room: string): AsyncIterable<readonly SearchedDocument[]>;
|
|
75
|
-
documents(room: string, paths: readonly string[]): Promise<readonly SearchedDocument[]>;
|
|
76
|
-
};
|
|
77
|
-
type HitCursor = readonly [number, string, string] | readonly [] | null;
|
|
62
|
+
export type HitCursor = readonly [number, string, string] | readonly [] | null;
|
|
78
63
|
export type SearchPlan = {
|
|
79
64
|
text: string;
|
|
80
65
|
documents: unknown;
|
|
@@ -84,21 +69,4 @@ export type SearchPlan = {
|
|
|
84
69
|
after: readonly [HitCursor, HitCursor] | null;
|
|
85
70
|
total: boolean;
|
|
86
71
|
};
|
|
87
|
-
export type SearchIndex = {
|
|
88
|
-
generation(): string;
|
|
89
|
-
rooms(): ReadonlySet<string>;
|
|
90
|
-
conversations(): ReadonlySet<string>;
|
|
91
|
-
indexRoom(room: string): Promise<void>;
|
|
92
|
-
indexMessages(conversation: string, messages: readonly SearchedMessage[], whole: boolean): void;
|
|
93
|
-
forget(rooms: readonly string[]): void;
|
|
94
|
-
changed(set: ChangeSet): void;
|
|
95
|
-
changes(): number;
|
|
96
|
-
caughtUp(): Promise<void>;
|
|
97
|
-
search(plan: SearchPlan, documents: readonly {
|
|
98
|
-
room: string;
|
|
99
|
-
path: string;
|
|
100
|
-
}[] | null, conversations: readonly string[], rooms: ReadonlySet<string> | null, selections: ReadonlyMap<string, readonly string[]> | null): SearchWindow;
|
|
101
|
-
};
|
|
102
72
|
export declare function searchPlanOf(input: unknown): SearchPlan;
|
|
103
|
-
export declare function createSearchIndex(source: SearchSource): SearchIndex;
|
|
104
|
-
export {};
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import type { Capability, Member, ProviderLimit } from './adapter.js';
|
|
2
|
-
import type { AcceptedMessage, KeptReceipt } from './adapter.js';
|
|
1
|
+
import type { Capability, KeptReceipt, Member, ProviderLimit } from './adapter.js';
|
|
3
2
|
import type { ChangeBatch } from './change.js';
|
|
4
3
|
import type { Composition } from './collection.js';
|
|
5
4
|
import type { Plan } from './query.js';
|
|
6
5
|
import type { ReplicaRecord } from './replica.js';
|
|
7
|
-
import type { Later } from './turn.js';
|
|
8
6
|
import type { Submission } from './outcome.js';
|
|
9
7
|
import type { RoomDraftRecord, SavedDraft } from './room-draft.js';
|
|
10
8
|
import type { ModelState } from './model.js';
|
|
11
|
-
import type {
|
|
12
|
-
import type { CommittedWrite, CountedRoom, HeldEntry, QueryAnswer, QueryRoom, Referrer, RoomCommit, RuntimeDatabase, StoredEntry, StoredFile, TypedEntry, View, Walked } from './tables.js';
|
|
13
|
-
export
|
|
9
|
+
import type { SearchWindow } from './search.js';
|
|
10
|
+
import type { CommittedWrite, ConversationWrite, CountedRoom, HeldConversation, HeldEntry, MessageWindow, QueryAnswer, QueryRoom, Referrer, RoomCommit, RuntimeDatabase, SearchAsk, StoredEntry, StoredFile, TypedEntry, View, Walked } from './tables.js';
|
|
11
|
+
export type { ConversationWrite, HeldConversation, MessageWindow } from './tables.js';
|
|
14
12
|
export type TransferRecord = {
|
|
15
13
|
readonly locator: string;
|
|
16
14
|
readonly transfer: string;
|
|
@@ -45,23 +43,6 @@ export type PresentationRecord = {
|
|
|
45
43
|
app: string;
|
|
46
44
|
value: unknown;
|
|
47
45
|
};
|
|
48
|
-
export type HeldConversation = {
|
|
49
|
-
conversation: string;
|
|
50
|
-
read: string | null | undefined;
|
|
51
|
-
partial: boolean;
|
|
52
|
-
};
|
|
53
|
-
export type MessageWindow = {
|
|
54
|
-
messages: AcceptedMessage[];
|
|
55
|
-
more: boolean;
|
|
56
|
-
};
|
|
57
|
-
export type ConversationWrite = {
|
|
58
|
-
conversation: string;
|
|
59
|
-
messages: readonly AcceptedMessage[];
|
|
60
|
-
read?: {
|
|
61
|
-
at: string | null;
|
|
62
|
-
partial: boolean;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
46
|
export type ChatSubmission = {
|
|
66
47
|
readonly operation: string;
|
|
67
48
|
readonly text: string;
|
|
@@ -134,10 +115,7 @@ export type RuntimeStore = {
|
|
|
134
115
|
readonly revision: string;
|
|
135
116
|
}[]>;
|
|
136
117
|
typedWithin(key: number, view: View, roots: readonly string[], within: boolean): Promise<boolean>;
|
|
137
|
-
|
|
138
|
-
readonly documents: readonly SearchedDocument[];
|
|
139
|
-
readonly next: string | null;
|
|
140
|
-
}>;
|
|
118
|
+
search(ask: SearchAsk): Promise<SearchWindow>;
|
|
141
119
|
stage(record: TransferRecord, composition: Composition, page: StagedPage, key: number | null, last: boolean): Promise<number | null>;
|
|
142
120
|
refresh(key: number, page: RefreshedPage): Promise<void>;
|
|
143
121
|
unrefresh(key: number): Promise<void>;
|
|
@@ -157,8 +135,6 @@ export type RuntimeStore = {
|
|
|
157
135
|
keepMessages(write: ConversationWrite): Promise<void>;
|
|
158
136
|
messageWindow(conversation: string, limit: number, before: readonly [string, string] | null): Promise<MessageWindow>;
|
|
159
137
|
messageCount(conversation: string): Promise<number>;
|
|
160
|
-
messagesAfter(conversation: string, identity: string | null): Promise<AcceptedMessage[]>;
|
|
161
|
-
messageIdentities(conversation: string): Promise<readonly string[]>;
|
|
162
138
|
turnArrived(conversation: string, turn: string): Promise<boolean>;
|
|
163
139
|
dropConversations(conversations: readonly string[]): Promise<void>;
|
|
164
140
|
chatDrafts(): Promise<readonly ChatDraftRecord[]>;
|
|
@@ -180,9 +156,5 @@ export type RuntimeStore = {
|
|
|
180
156
|
generation(): Promise<string | null>;
|
|
181
157
|
rememberGeneration(value: string): Promise<void>;
|
|
182
158
|
file(key: string, type: string): Promise<Blob>;
|
|
183
|
-
close(): void;
|
|
184
159
|
};
|
|
185
|
-
export declare function
|
|
186
|
-
export declare function endRuntimeStore(database: RuntimeDatabase, holder: string | undefined): Promise<boolean>;
|
|
187
|
-
export declare function openDatabase(name: string, version: number, upgrade: (opening: IDBOpenDBRequest, oldVersion: number) => void): Promise<IDBDatabase>;
|
|
188
|
-
export declare function openRuntimeStore(fenced: (locator: string) => boolean, authored: RuntimeDatabase): Promise<RuntimeStore>;
|
|
160
|
+
export declare function openRuntimeStore(fenced: (locator: string) => boolean, authored: RuntimeDatabase): RuntimeStore;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { HeadChange } from './adapter.js';
|
|
2
2
|
import type { Composition } from './collection.js';
|
|
3
3
|
import type { HeldBinary } from './overlay.js';
|
|
4
|
-
import type { SearchedDocument } from './search.js';
|
|
5
4
|
import type { Connection } from './tables.js';
|
|
6
5
|
export declare const REPLICA_TABLES: readonly string[];
|
|
7
6
|
export type View = 'confirmed' | 'visible' | 'refreshed';
|
|
@@ -134,9 +133,5 @@ export declare function files(connection: Connection, key: number, view: View, a
|
|
|
134
133
|
readonly revision: string;
|
|
135
134
|
}[];
|
|
136
135
|
export declare function typedWithin(connection: Connection, key: number, view: View, roots: readonly string[], within: boolean): boolean;
|
|
137
|
-
export declare function searched(connection: Connection, key: number, locator: string, after: string | null, limit: number, only: readonly string[] | null): {
|
|
138
|
-
readonly documents: readonly SearchedDocument[];
|
|
139
|
-
readonly next: string | null;
|
|
140
|
-
};
|
|
141
136
|
export declare function opened(connection: Connection): ReplicaOpened;
|
|
142
137
|
export declare function ended(connection: Connection): void;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { type QueryAnswer, type QueryRoom } from './compile.js';
|
|
2
2
|
import type { KeptReceipt } from './adapter.js';
|
|
3
3
|
import type { Composition } from './collection.js';
|
|
4
|
+
import { type SearchAsk } from './fulltext.js';
|
|
5
|
+
import { type ConversationWrite, type HeldConversation, type MessageWindow } from './messages.js';
|
|
4
6
|
import type { Plan } from './query.js';
|
|
5
|
-
import type {
|
|
7
|
+
import type { SearchWindow } from './search.js';
|
|
6
8
|
import { type Committed, type CountedRoom, type HeldEntry, type ReplicaOpened, type Referrer, type RoomCommit, type StoredEntry, type TypedEntry, type View, type Walked } from './stored.js';
|
|
7
9
|
export type { Committed, CountedRoom, HeldEntry, OverlayEntry, ReplicaOpened, Referrer, RoomCommit, StoredEntry, TypedEntry, View, Walked, } from './stored.js';
|
|
8
10
|
export type { QueryAnswer, QueryRoom } from './compile.js';
|
|
11
|
+
export type { SearchAsk } from './fulltext.js';
|
|
12
|
+
export type { ConversationWrite, HeldConversation, MessageWindow } from './messages.js';
|
|
9
13
|
export type Value = string | number | bigint | Uint8Array | null;
|
|
10
14
|
export type Row = Readonly<Record<string, Value>>;
|
|
11
15
|
export interface Connection {
|
|
@@ -191,16 +195,7 @@ export interface RuntimeRequests {
|
|
|
191
195
|
readonly 'replica.counts': Asked<{
|
|
192
196
|
readonly rooms: readonly CountedRoom[];
|
|
193
197
|
}, readonly number[]>;
|
|
194
|
-
readonly 'replica.
|
|
195
|
-
readonly key: number;
|
|
196
|
-
readonly locator: string;
|
|
197
|
-
readonly after: string | null;
|
|
198
|
-
readonly limit: number;
|
|
199
|
-
readonly paths: readonly string[] | null;
|
|
200
|
-
}, {
|
|
201
|
-
readonly documents: readonly SearchedDocument[];
|
|
202
|
-
readonly next: string | null;
|
|
203
|
-
}>;
|
|
198
|
+
readonly 'replica.search': Asked<SearchAsk, SearchWindow>;
|
|
204
199
|
readonly 'replica.received': Asked<Nothing, readonly KeptReceipt[]>;
|
|
205
200
|
readonly 'replica.receivedParts': Asked<{
|
|
206
201
|
readonly key: string;
|
|
@@ -301,6 +296,23 @@ export interface RuntimeRequests {
|
|
|
301
296
|
readonly key: string;
|
|
302
297
|
readonly part: number;
|
|
303
298
|
}, Uint8Array | null>;
|
|
299
|
+
readonly 'conversation.held': Asked<Nothing, readonly HeldConversation[]>;
|
|
300
|
+
readonly 'conversation.keep': Asked<ConversationWrite, null>;
|
|
301
|
+
readonly 'conversation.window': Asked<{
|
|
302
|
+
readonly conversation: string;
|
|
303
|
+
readonly limit: number;
|
|
304
|
+
readonly before: readonly [string, string] | null;
|
|
305
|
+
}, MessageWindow>;
|
|
306
|
+
readonly 'conversation.count': Asked<{
|
|
307
|
+
readonly conversation: string;
|
|
308
|
+
}, number>;
|
|
309
|
+
readonly 'conversation.turn': Asked<{
|
|
310
|
+
readonly conversation: string;
|
|
311
|
+
readonly turn: string;
|
|
312
|
+
}, boolean>;
|
|
313
|
+
readonly 'conversation.drop': Asked<{
|
|
314
|
+
readonly conversations: readonly string[];
|
|
315
|
+
}, null>;
|
|
304
316
|
}
|
|
305
317
|
export type RuntimeKind = keyof RuntimeRequests;
|
|
306
318
|
export type RuntimeRequest<K extends RuntimeKind = RuntimeKind> = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/app-bridge",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-c6ad9402daafa",
|
|
4
4
|
"description": "Types of the agents.house App bridge House hands every App: navigation, the tab title and icon, ceremonies, installation, notifications and the icon badge, status, Site image reads, App release code, App and Site screenshot reads, and App messages, with an accessor and an in-page test host.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/dist/mdruntime/turn.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare function yielded(): Promise<void>;
|
|
2
|
-
export declare const ROW_WEIGHT = 256;
|
|
3
|
-
export type Later<T> = T | Promise<T>;
|
|
4
|
-
export declare function after<T, R>(value: Later<T>, next: (value: T) => Later<R>): Later<R>;
|
|
5
|
-
export declare function paced(): (weight: number) => Later<void>;
|
|
6
|
-
export declare function inUnits<T>(items: Iterable<T>, each: (item: T) => number, ended?: () => void, paused?: () => Promise<void>): Later<void>;
|
|
7
|
-
export declare function finished<R>(steps: Generator<number, R, void>): R;
|
|
8
|
-
export declare function stepped<R>(steps: Generator<number, R, void>): Later<R>;
|