@agentshouse/app-bridge 0.1.0-ccf413b4e709d → 0.1.0-cd2d3edbf9805

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.
Files changed (60) hide show
  1. package/README.md +9 -7
  2. package/dist/calls.d.ts +747 -0
  3. package/dist/calls.js +1 -0
  4. package/dist/index.d.ts +44 -6
  5. package/dist/mdmodel/blocks.d.ts +10 -0
  6. package/dist/mdmodel/condition.d.ts +167 -0
  7. package/dist/mdmodel/definition.d.ts +81 -0
  8. package/dist/mdmodel/divide.d.ts +2 -0
  9. package/dist/mdmodel/document.d.ts +15 -0
  10. package/dist/mdmodel/fields.d.ts +5 -0
  11. package/dist/mdmodel/index.d.ts +20 -0
  12. package/dist/mdmodel/links.d.ts +28 -0
  13. package/dist/mdmodel/paths.d.ts +25 -0
  14. package/dist/mdmodel/profile.d.ts +5 -0
  15. package/dist/mdmodel/project.d.ts +21 -0
  16. package/dist/mdmodel/references.d.ts +3 -0
  17. package/dist/mdmodel/types.d.ts +167 -0
  18. package/dist/mdmodel/validate.d.ts +31 -0
  19. package/dist/mdmodel/version.d.ts +1 -0
  20. package/dist/mdmodel/yaml.d.ts +55 -0
  21. package/dist/mdruntime/adapter.d.ts +517 -0
  22. package/dist/mdruntime/binary.d.ts +17 -0
  23. package/dist/mdruntime/chain.d.ts +10 -0
  24. package/dist/mdruntime/change-set.d.ts +27 -0
  25. package/dist/mdruntime/change.d.ts +118 -0
  26. package/dist/mdruntime/client.d.ts +90 -0
  27. package/dist/mdruntime/collection.d.ts +27 -0
  28. package/dist/mdruntime/compile.d.ts +15 -0
  29. package/dist/mdruntime/connection.d.ts +152 -0
  30. package/dist/mdruntime/conversation.d.ts +113 -0
  31. package/dist/mdruntime/durability.d.ts +11 -0
  32. package/dist/mdruntime/failure.d.ts +12 -0
  33. package/dist/mdruntime/fulltext.d.ts +26 -0
  34. package/dist/mdruntime/identity.d.ts +6 -0
  35. package/dist/mdruntime/media.d.ts +7 -0
  36. package/dist/mdruntime/messages.d.ts +27 -0
  37. package/dist/mdruntime/model.d.ts +62 -0
  38. package/dist/mdruntime/observation.d.ts +44 -0
  39. package/dist/mdruntime/open.d.ts +1 -0
  40. package/dist/mdruntime/opened.d.ts +21 -0
  41. package/dist/mdruntime/outcome.d.ts +84 -0
  42. package/dist/mdruntime/overlay.d.ts +24 -0
  43. package/dist/mdruntime/query.d.ts +283 -0
  44. package/dist/mdruntime/reach.d.ts +53 -0
  45. package/dist/mdruntime/readiness.d.ts +51 -0
  46. package/dist/mdruntime/recovery.d.ts +25 -0
  47. package/dist/mdruntime/replica.d.ts +67 -0
  48. package/dist/mdruntime/room-draft.d.ts +173 -0
  49. package/dist/mdruntime/save.d.ts +102 -0
  50. package/dist/mdruntime/search.d.ts +72 -0
  51. package/dist/mdruntime/seed.d.ts +15 -0
  52. package/dist/mdruntime/status.d.ts +27 -0
  53. package/dist/mdruntime/store.d.ts +153 -0
  54. package/dist/mdruntime/stored.d.ts +129 -0
  55. package/dist/mdruntime/tables.d.ts +324 -0
  56. package/dist/mdruntime/wire.d.ts +238 -0
  57. package/dist/test-host.d.ts +8 -2
  58. package/dist/test-host.js +47 -11
  59. package/docs/families.md +55 -12
  60. package/package.json +8 -6
@@ -0,0 +1,129 @@
1
+ import type { HeadChange } from './adapter.js';
2
+ import { type Composed, type Composition } from './collection.js';
3
+ import type { HeldBinary } from './overlay.js';
4
+ import type { Connection } from './tables.js';
5
+ export declare const REPLICA_TABLES: readonly string[];
6
+ export type View = 'confirmed' | 'visible' | 'refreshed';
7
+ export type StoredEntry = {
8
+ readonly path: string;
9
+ readonly content: string | null;
10
+ readonly binary: HeldBinary | null;
11
+ readonly revision: string | null;
12
+ readonly fileId: string | null;
13
+ readonly change: HeadChange | null;
14
+ readonly written: string | null;
15
+ };
16
+ export type OverlayEntry = StoredEntry & {
17
+ readonly present: boolean;
18
+ };
19
+ export type HeldEntry = StoredEntry & {
20
+ readonly type: string | null;
21
+ };
22
+ export type TypedEntry = {
23
+ readonly path: string;
24
+ readonly type: string | null;
25
+ readonly binary: boolean;
26
+ };
27
+ export type Referrer = {
28
+ readonly path: string;
29
+ readonly target: string;
30
+ readonly kind: string;
31
+ };
32
+ export type HeldKey = {
33
+ readonly key: number;
34
+ readonly locator: string;
35
+ readonly transfer: string;
36
+ readonly rederiving: number | null;
37
+ readonly searching: number | null;
38
+ };
39
+ export type ReplicaOpened = {
40
+ readonly rooms: readonly {
41
+ readonly locator: string;
42
+ readonly key: number;
43
+ readonly record: string;
44
+ }[];
45
+ readonly keys: readonly HeldKey[];
46
+ readonly facts: Readonly<Record<string, string>>;
47
+ readonly presentation: readonly {
48
+ readonly app: string;
49
+ readonly value: string;
50
+ }[];
51
+ readonly overlaid: readonly {
52
+ readonly key: number;
53
+ readonly path: string;
54
+ }[];
55
+ readonly erasing: readonly {
56
+ readonly key: number;
57
+ readonly locator: string;
58
+ }[];
59
+ readonly orphans: readonly number[];
60
+ };
61
+ export type RoomCommit = {
62
+ readonly locator: string;
63
+ readonly key: number;
64
+ readonly record?: string;
65
+ readonly roots?: readonly string[];
66
+ readonly published?: {
67
+ readonly from: number | null;
68
+ };
69
+ readonly refreshed?: true;
70
+ readonly composed: Composed;
71
+ readonly confirmed?: {
72
+ readonly set: readonly StoredEntry[];
73
+ readonly removed: readonly string[];
74
+ };
75
+ readonly overlay?: {
76
+ readonly set: readonly OverlayEntry[];
77
+ readonly cleared: readonly string[];
78
+ };
79
+ };
80
+ export type Committed = {
81
+ readonly counts: Readonly<Record<string, number>>;
82
+ readonly changed: Readonly<Record<string, readonly string[] | null>>;
83
+ readonly indexed: Readonly<Record<string, boolean>>;
84
+ };
85
+ export type CountedRoom = {
86
+ readonly key: number;
87
+ readonly roots: readonly string[];
88
+ };
89
+ export declare function entered(connection: Connection, locator: string, composition: Composition, rows: readonly StoredEntry[]): number;
90
+ export declare function stage(connection: Connection, request: {
91
+ readonly locator: string;
92
+ readonly transfer: string;
93
+ readonly key: number | null;
94
+ readonly fingerprint: string;
95
+ readonly entries: readonly StoredEntry[];
96
+ readonly folders: readonly string[];
97
+ }): number;
98
+ export declare function refreshing(connection: Connection, request: {
99
+ readonly key: number;
100
+ readonly composed: Composed;
101
+ readonly entries: readonly StoredEntry[];
102
+ readonly removals: readonly string[];
103
+ readonly folders: readonly string[];
104
+ readonly folderRemovals: readonly string[];
105
+ }): null;
106
+ export declare function unrefresh(connection: Connection, key: number): null;
107
+ export declare function counts(connection: Connection, rooms: readonly CountedRoom[]): number[];
108
+ export declare function commit(connection: Connection, rooms: readonly RoomCommit[]): Committed;
109
+ export declare function fenceRooms(connection: Connection, locators: readonly string[]): null;
110
+ export declare function abandon(connection: Connection, locator: string): null;
111
+ export declare function release(connection: Connection, key: number): null;
112
+ export declare function erase(connection: Connection, locator: string | null, limit: number): {
113
+ readonly remaining: boolean;
114
+ };
115
+ export declare function rederive(connection: Connection, key: number, composed: Composed, bytes: number, ms: number, floor: number): {
116
+ readonly done: boolean;
117
+ readonly text: number;
118
+ };
119
+ export declare function entries(connection: Connection, key: number, view: View, list: readonly string[]): HeldEntry[];
120
+ export declare function typed(connection: Connection, key: number, view: View, list: readonly string[]): TypedEntry[];
121
+ export declare function referrers(connection: Connection, key: number, view: View, targets: readonly string[], kinds: readonly string[]): Referrer[];
122
+ export declare function files(connection: Connection, key: number, view: View, after: string | null, limit: number): {
123
+ readonly path: string;
124
+ readonly revision: string;
125
+ }[];
126
+ export declare function folders(connection: Connection, key: number, view: View, list: readonly string[]): string[];
127
+ export declare function typedWithin(connection: Connection, key: number, view: View, roots: readonly string[], within: boolean): boolean;
128
+ export declare function opened(connection: Connection): ReplicaOpened;
129
+ export declare function ended(connection: Connection): void;
@@ -0,0 +1,324 @@
1
+ import { type QueryAnswer, type QueryRoom } from './compile.js';
2
+ import type { Composed } from './collection.js';
3
+ import { type SearchAsk } from './fulltext.js';
4
+ import { type ConversationWrite, type HeldConversation, type MessageWindow } from './messages.js';
5
+ import type { Plan } from './query.js';
6
+ import type { SearchWindow } from './search.js';
7
+ import { type Committed, type CountedRoom, type HeldEntry, type ReplicaOpened, type Referrer, type RoomCommit, type StoredEntry, type TypedEntry, type View } from './stored.js';
8
+ export type { Committed, CountedRoom, HeldEntry, OverlayEntry, ReplicaOpened, Referrer, RoomCommit, StoredEntry, TypedEntry, View, } from './stored.js';
9
+ export type { QueryAnswer, QueryRoom } from './compile.js';
10
+ export type { SearchAsk } from './fulltext.js';
11
+ export type { ConversationWrite, HeldConversation, MessageWindow } from './messages.js';
12
+ export type Value = string | number | bigint | Uint8Array | null;
13
+ export type Row = Readonly<Record<string, Value>>;
14
+ export interface Connection {
15
+ run(sql: string, bind?: readonly Value[]): void;
16
+ rows(sql: string, bind?: readonly Value[]): readonly Row[];
17
+ collate(name: string, compare: (left: string, right: string) => number): void;
18
+ }
19
+ export interface SqliteEngine {
20
+ readonly capi: {
21
+ readonly SQLITE_UTF8: number;
22
+ sqlite3_create_collation_v2(database: number, name: string, encoding: number, argument: number, compare: (argument: number, leftLength: number, left: number, rightLength: number, right: number) => number, destroy: number): number;
23
+ };
24
+ readonly wasm: {
25
+ heap8u(): Uint8Array;
26
+ };
27
+ }
28
+ export interface SqliteStatement {
29
+ readonly parameterCount: number;
30
+ bind(values: readonly Value[]): unknown;
31
+ step(): boolean;
32
+ get(values: Value[]): Value[];
33
+ getColumnNames(names: string[]): string[];
34
+ resetNoThrow(clearBindings: boolean): number;
35
+ finalize(): unknown;
36
+ }
37
+ export interface SqliteDatabase {
38
+ readonly pointer: number;
39
+ exec(options: {
40
+ readonly sql: string;
41
+ readonly bind: readonly Value[];
42
+ readonly rowMode?: 'object';
43
+ readonly returnValue?: 'resultRows';
44
+ }): Row[];
45
+ prepare(sql: string): SqliteStatement;
46
+ }
47
+ export declare function sqliteConnection(engine: SqliteEngine, database: SqliteDatabase): Connection;
48
+ export declare const FILE_PART_BYTES = 1048576;
49
+ export declare const RUNTIME_TABLES: readonly string[];
50
+ export type AuthoredFact = 'holder' | 'binding' | 'generation';
51
+ export type StoredFile = {
52
+ readonly key: string;
53
+ readonly blob: Blob;
54
+ };
55
+ export interface FileSpool {
56
+ held(): Iterable<string>;
57
+ spool(key: string, type: string, parts: Iterable<Uint8Array>): Promise<Blob>;
58
+ drop(key: string): Promise<void>;
59
+ probe(bytes: number): Promise<void>;
60
+ }
61
+ export type KeptPending = {
62
+ readonly id: string;
63
+ readonly batch: string;
64
+ readonly state: string;
65
+ readonly files: readonly string[];
66
+ };
67
+ export type KeptRecord = {
68
+ readonly record: string;
69
+ readonly files: readonly string[];
70
+ };
71
+ export type AuthoredRows = {
72
+ readonly locator: string;
73
+ readonly order?: readonly string[];
74
+ readonly added?: readonly KeptPending[];
75
+ readonly founded?: readonly Omit<KeptPending, 'state'>[];
76
+ readonly roomDrafts?: readonly (KeptRecord & {
77
+ readonly path: string;
78
+ })[];
79
+ readonly consumedRoomDrafts?: readonly string[];
80
+ };
81
+ export type HeldQueues = {
82
+ readonly queues: readonly {
83
+ readonly locator: string;
84
+ readonly ids: readonly string[];
85
+ }[];
86
+ readonly pending: readonly {
87
+ readonly locator: string;
88
+ readonly id: string;
89
+ readonly batch: string;
90
+ readonly state: string;
91
+ }[];
92
+ };
93
+ export type OpenedFile = {
94
+ readonly key: string;
95
+ readonly byteLength: number;
96
+ readonly mediaType: string;
97
+ };
98
+ type Asked<A, R> = {
99
+ readonly asked: A;
100
+ readonly answer: R;
101
+ };
102
+ type Nothing = Readonly<Record<never, never>>;
103
+ export type CommittedWrite = Committed & {
104
+ readonly fenced: string | null;
105
+ };
106
+ export type AuthoredWrite = {
107
+ readonly writes: readonly AuthoredRows[];
108
+ readonly files: readonly StoredFile[];
109
+ readonly whole: boolean;
110
+ readonly discards?: readonly string[];
111
+ };
112
+ export interface RuntimeRequests {
113
+ readonly 'authored.queues': Asked<Nothing, HeldQueues>;
114
+ readonly 'authored.roomDrafts': Asked<Nothing, readonly string[]>;
115
+ readonly 'authored.chatDrafts': Asked<Nothing, readonly string[]>;
116
+ readonly 'authored.calls': Asked<Nothing, readonly string[]>;
117
+ readonly 'authored.fences': Asked<Nothing, readonly string[]>;
118
+ readonly 'authored.fact': Asked<{
119
+ readonly name: AuthoredFact;
120
+ }, string | null>;
121
+ readonly 'authored.file': Asked<{
122
+ readonly key: string;
123
+ readonly type: string;
124
+ }, Blob>;
125
+ readonly 'authored.amend': Asked<{
126
+ readonly locator: string;
127
+ readonly id: string;
128
+ readonly amendment: string;
129
+ }, null>;
130
+ readonly 'authored.roomDraft': Asked<{
131
+ readonly locator: string;
132
+ readonly path: string;
133
+ readonly kept: KeptRecord | null;
134
+ readonly files: readonly StoredFile[];
135
+ }, string | null>;
136
+ readonly 'authored.chatDraft': Asked<{
137
+ readonly kept: readonly {
138
+ readonly conversation: string;
139
+ readonly record: string;
140
+ }[];
141
+ readonly dropped: readonly string[];
142
+ }, null>;
143
+ readonly 'authored.call': Asked<{
144
+ readonly operation: string;
145
+ readonly kept: KeptRecord | null;
146
+ readonly files: readonly StoredFile[];
147
+ }, null>;
148
+ readonly 'authored.remember': Asked<{
149
+ readonly name: AuthoredFact;
150
+ readonly value: string;
151
+ }, null>;
152
+ readonly 'authored.claim': Asked<{
153
+ readonly holder: string;
154
+ }, boolean>;
155
+ readonly 'authored.end': Asked<{
156
+ readonly holder: string | null;
157
+ }, boolean>;
158
+ readonly 'replica.open': Asked<Nothing, ReplicaOpened>;
159
+ readonly 'replica.query': Asked<{
160
+ readonly plan: Plan;
161
+ readonly rooms: readonly QueryRoom[];
162
+ readonly budget: number | null;
163
+ }, QueryAnswer>;
164
+ readonly 'replica.entries': Asked<{
165
+ readonly key: number;
166
+ readonly view: View;
167
+ readonly paths: readonly string[];
168
+ }, readonly HeldEntry[]>;
169
+ readonly 'replica.typed': Asked<{
170
+ readonly key: number;
171
+ readonly view: View;
172
+ readonly paths: readonly string[];
173
+ }, readonly TypedEntry[]>;
174
+ readonly 'replica.referrers': Asked<{
175
+ readonly key: number;
176
+ readonly view: View;
177
+ readonly targets: readonly string[];
178
+ readonly kinds: readonly string[];
179
+ }, readonly Referrer[]>;
180
+ readonly 'replica.files': Asked<{
181
+ readonly key: number;
182
+ readonly view: View;
183
+ readonly after: string | null;
184
+ readonly limit: number;
185
+ }, readonly {
186
+ readonly path: string;
187
+ readonly revision: string;
188
+ }[]>;
189
+ readonly 'replica.folders': Asked<{
190
+ readonly key: number;
191
+ readonly view: View;
192
+ readonly paths: readonly string[];
193
+ }, readonly string[]>;
194
+ readonly 'replica.typedWithin': Asked<{
195
+ readonly key: number;
196
+ readonly view: View;
197
+ readonly roots: readonly string[];
198
+ readonly within: boolean;
199
+ }, boolean>;
200
+ readonly 'replica.counts': Asked<{
201
+ readonly rooms: readonly CountedRoom[];
202
+ }, readonly number[]>;
203
+ readonly 'replica.search': Asked<SearchAsk, SearchWindow>;
204
+ readonly 'replica.stage': Asked<{
205
+ readonly locator: string;
206
+ readonly transfer: string;
207
+ readonly key: number | null;
208
+ readonly fingerprint: string;
209
+ readonly entries: readonly StoredEntry[];
210
+ readonly folders: readonly string[];
211
+ }, number | null>;
212
+ readonly 'replica.refresh': Asked<{
213
+ readonly key: number;
214
+ readonly composed: Composed;
215
+ readonly entries: readonly StoredEntry[];
216
+ readonly removals: readonly string[];
217
+ readonly folders: readonly string[];
218
+ readonly folderRemovals: readonly string[];
219
+ }, null>;
220
+ readonly 'replica.unrefresh': Asked<{
221
+ readonly key: number;
222
+ }, null>;
223
+ readonly 'replica.commit': Asked<{
224
+ readonly authored?: AuthoredWrite;
225
+ readonly rooms: readonly RoomCommit[];
226
+ }, CommittedWrite>;
227
+ readonly 'replica.fence': Asked<{
228
+ readonly locators: readonly string[];
229
+ }, null>;
230
+ readonly 'replica.erase': Asked<{
231
+ readonly locator: string | null;
232
+ readonly limit: number;
233
+ }, {
234
+ readonly remaining: boolean;
235
+ }>;
236
+ readonly 'replica.abandon': Asked<{
237
+ readonly locator: string;
238
+ }, null>;
239
+ readonly 'replica.release': Asked<{
240
+ readonly key: number;
241
+ }, null>;
242
+ readonly 'replica.rederive': Asked<{
243
+ readonly key: number;
244
+ readonly composed: Composed;
245
+ readonly bytes: number;
246
+ readonly ms: number;
247
+ readonly floor: number;
248
+ }, {
249
+ readonly done: boolean;
250
+ readonly text: number;
251
+ }>;
252
+ readonly 'replica.fact': Asked<{
253
+ readonly name: string;
254
+ readonly value: string;
255
+ }, null>;
256
+ readonly 'replica.present': Asked<{
257
+ readonly app: string;
258
+ readonly value: string;
259
+ }, null>;
260
+ readonly 'opened.find': Asked<{
261
+ readonly locator: string;
262
+ readonly path: string;
263
+ readonly revision: string;
264
+ }, OpenedFile | null>;
265
+ readonly 'opened.begin': Asked<{
266
+ readonly key: string;
267
+ readonly locator: string;
268
+ readonly path: string;
269
+ readonly revision: string;
270
+ readonly mediaType: string;
271
+ }, boolean>;
272
+ readonly 'opened.part': Asked<{
273
+ readonly key: string;
274
+ readonly part: number;
275
+ readonly bytes: Uint8Array;
276
+ }, boolean>;
277
+ readonly 'opened.keep': Asked<{
278
+ readonly key: string;
279
+ readonly sha256: string;
280
+ readonly byteLength: number;
281
+ readonly parts: number;
282
+ }, boolean>;
283
+ readonly 'opened.drop': Asked<{
284
+ readonly key: string;
285
+ }, null>;
286
+ readonly 'opened.clean': Asked<Nothing, number>;
287
+ readonly 'file.part': Asked<{
288
+ readonly key: string;
289
+ readonly part: number;
290
+ }, Uint8Array | null>;
291
+ readonly 'conversation.held': Asked<Nothing, readonly HeldConversation[]>;
292
+ readonly 'conversation.keep': Asked<ConversationWrite, null>;
293
+ readonly 'conversation.window': Asked<{
294
+ readonly conversation: string;
295
+ readonly limit: number;
296
+ readonly before: readonly [string, string] | null;
297
+ }, MessageWindow>;
298
+ readonly 'conversation.count': Asked<{
299
+ readonly conversation: string;
300
+ }, number>;
301
+ readonly 'conversation.turn': Asked<{
302
+ readonly conversation: string;
303
+ readonly turn: string;
304
+ }, boolean>;
305
+ readonly 'conversation.drop': Asked<{
306
+ readonly conversations: readonly string[];
307
+ }, null>;
308
+ readonly 'space.probe': Asked<Nothing, null>;
309
+ }
310
+ export type RuntimeKind = keyof RuntimeRequests;
311
+ export type RuntimeRequest<K extends RuntimeKind = RuntimeKind> = {
312
+ readonly [Kind in K]: {
313
+ readonly kind: Kind;
314
+ } & RuntimeRequests[Kind]['asked'];
315
+ }[K];
316
+ export type RuntimeAnswer<K extends RuntimeKind> = RuntimeRequests[K]['answer'];
317
+ export interface RuntimeDatabase {
318
+ ask<K extends RuntimeKind>(request: RuntimeRequest<K>): Promise<RuntimeAnswer<K>>;
319
+ }
320
+ export declare function isRuntime(request: {
321
+ readonly kind: string;
322
+ }): request is RuntimeRequest;
323
+ export declare function readsRuntime(request: RuntimeRequest): boolean;
324
+ export declare function answerRuntime(connection: Connection, request: RuntimeRequest, spool: FileSpool): unknown;
@@ -0,0 +1,238 @@
1
+ import type { ConnectionRefusal } from './connection.js';
2
+ import type { Described } from './failure.js';
3
+ export type RuntimePort = {
4
+ postMessage(message: unknown): void;
5
+ addEventListener(type: 'message' | 'close', listener: (event: {
6
+ data?: unknown;
7
+ }) => void): void;
8
+ start(): void;
9
+ };
10
+ export type WireReach = 'within' | 'app' | 'runtime' | 'actions' | 'whole';
11
+ export type WireEffect = 'read' | 'write' | 'action';
12
+ export type WireCall = {
13
+ readonly reach: WireReach;
14
+ readonly effect: WireEffect;
15
+ };
16
+ declare const MEMBERS: {
17
+ readonly rooms: {
18
+ readonly reach: 'within';
19
+ readonly effect: 'read';
20
+ };
21
+ readonly query: {
22
+ readonly reach: 'within';
23
+ readonly effect: 'read';
24
+ };
25
+ readonly search: {
26
+ readonly reach: 'within';
27
+ readonly effect: 'read';
28
+ };
29
+ readonly types: {
30
+ readonly reach: 'within';
31
+ readonly effect: 'read';
32
+ };
33
+ readonly save: {
34
+ readonly reach: 'within';
35
+ readonly effect: 'write';
36
+ };
37
+ readonly saveParts: {
38
+ readonly reach: 'within';
39
+ readonly effect: 'write';
40
+ };
41
+ readonly history: {
42
+ readonly reach: 'within';
43
+ readonly effect: 'read';
44
+ };
45
+ readonly resolve: {
46
+ readonly reach: 'within';
47
+ readonly effect: 'read';
48
+ };
49
+ readonly 'binaryFile.read': {
50
+ readonly reach: 'within';
51
+ readonly effect: 'read';
52
+ };
53
+ readonly 'binaryFile.link': {
54
+ readonly reach: 'within';
55
+ readonly effect: 'read';
56
+ };
57
+ readonly 'binaryFile.show': {
58
+ readonly reach: 'within';
59
+ readonly effect: 'read';
60
+ };
61
+ readonly 'binaryFile.attach': {
62
+ readonly reach: 'within';
63
+ readonly effect: 'action';
64
+ };
65
+ readonly 'binaryFile.part': {
66
+ readonly reach: 'within';
67
+ readonly effect: 'read';
68
+ };
69
+ readonly call: {
70
+ readonly reach: 'actions';
71
+ readonly effect: 'action';
72
+ };
73
+ readonly reached: {
74
+ readonly reach: 'within';
75
+ readonly effect: 'read';
76
+ };
77
+ readonly log: {
78
+ readonly reach: 'whole';
79
+ readonly effect: 'read';
80
+ };
81
+ readonly cleanUp: {
82
+ readonly reach: 'whole';
83
+ readonly effect: 'write';
84
+ };
85
+ readonly persistence: {
86
+ readonly reach: 'runtime';
87
+ readonly effect: 'read';
88
+ };
89
+ readonly retry: {
90
+ readonly reach: 'runtime';
91
+ readonly effect: 'write';
92
+ };
93
+ readonly reauthorize: {
94
+ readonly reach: 'runtime';
95
+ readonly effect: 'write';
96
+ };
97
+ readonly 'roomDraft.list': {
98
+ readonly reach: 'within';
99
+ readonly effect: 'read';
100
+ };
101
+ readonly 'roomDraft.read': {
102
+ readonly reach: 'within';
103
+ readonly effect: 'read';
104
+ };
105
+ readonly 'roomDraft.write': {
106
+ readonly reach: 'within';
107
+ readonly effect: 'write';
108
+ };
109
+ readonly 'roomDraft.discard': {
110
+ readonly reach: 'within';
111
+ readonly effect: 'write';
112
+ };
113
+ readonly 'presentation.read': {
114
+ readonly reach: 'app';
115
+ readonly effect: 'read';
116
+ };
117
+ readonly 'presentation.write': {
118
+ readonly reach: 'app';
119
+ readonly effect: 'write';
120
+ };
121
+ readonly 'presentation.edit': {
122
+ readonly reach: 'app';
123
+ readonly effect: 'write';
124
+ };
125
+ readonly 'conversation.list': {
126
+ readonly reach: 'within';
127
+ readonly effect: 'read';
128
+ };
129
+ readonly 'conversation.read': {
130
+ readonly reach: 'within';
131
+ readonly effect: 'read';
132
+ };
133
+ readonly 'conversation.create': {
134
+ readonly reach: 'within';
135
+ readonly effect: 'action';
136
+ };
137
+ readonly 'conversation.send': {
138
+ readonly reach: 'within';
139
+ readonly effect: 'action';
140
+ };
141
+ readonly 'conversation.answer': {
142
+ readonly reach: 'within';
143
+ readonly effect: 'action';
144
+ };
145
+ readonly 'conversation.interrupt': {
146
+ readonly reach: 'within';
147
+ readonly effect: 'action';
148
+ };
149
+ readonly 'conversation.kill': {
150
+ readonly reach: 'within';
151
+ readonly effect: 'action';
152
+ };
153
+ readonly 'conversation.cancel': {
154
+ readonly reach: 'within';
155
+ readonly effect: 'action';
156
+ };
157
+ readonly 'conversation.delete': {
158
+ readonly reach: 'within';
159
+ readonly effect: 'action';
160
+ };
161
+ readonly 'chatDraft.write': {
162
+ readonly reach: 'within';
163
+ readonly effect: 'write';
164
+ };
165
+ readonly 'chatDraft.prepend': {
166
+ readonly reach: 'within';
167
+ readonly effect: 'write';
168
+ };
169
+ readonly 'chatDraft.discard': {
170
+ readonly reach: 'within';
171
+ readonly effect: 'write';
172
+ };
173
+ };
174
+ declare const TOPICS: {
175
+ readonly rooms: 'within';
176
+ readonly readiness: 'within';
177
+ readonly 'connection-refusal': 'runtime';
178
+ readonly 'storage-loss': 'runtime';
179
+ readonly 'deployment-facts': 'runtime';
180
+ readonly 'sync-status': 'within';
181
+ readonly 'service-mode': 'runtime';
182
+ readonly member: 'runtime';
183
+ readonly query: 'within';
184
+ readonly queue: 'within';
185
+ readonly 'room-drafts': 'within';
186
+ readonly presentation: 'app';
187
+ readonly conversation: 'within';
188
+ readonly conversations: 'within';
189
+ readonly agents: 'within';
190
+ };
191
+ export declare const WIRE: {
192
+ readonly members: Readonly<Record<string, WireCall>>;
193
+ readonly topics: Readonly<Record<string, WireReach>>;
194
+ };
195
+ export type WireMember = keyof typeof MEMBERS;
196
+ export type WireTopic = keyof typeof TOPICS;
197
+ export type WireRequest = {
198
+ kind: 'hello';
199
+ } | {
200
+ kind: 'call';
201
+ id: number;
202
+ member: WireMember;
203
+ input: readonly unknown[];
204
+ } | {
205
+ kind: 'observe';
206
+ id: number;
207
+ topic: WireTopic;
208
+ input: readonly unknown[];
209
+ } | {
210
+ kind: 'stop';
211
+ id: number;
212
+ };
213
+ export type WireAnswer = {
214
+ kind: 'result';
215
+ id: number;
216
+ value: unknown;
217
+ } | ({
218
+ kind: 'failure';
219
+ id: number;
220
+ } & Described) | {
221
+ kind: 'event';
222
+ id: number;
223
+ value: unknown;
224
+ } | {
225
+ kind: 'refusal';
226
+ refusal: ConnectionRefusal;
227
+ } | {
228
+ kind: 'ended';
229
+ };
230
+ export declare function unanswered(call: {
231
+ readonly id: number;
232
+ readonly member: WireMember;
233
+ }): WireAnswer | null;
234
+ export declare const AUTHORIZATION_ENDED = "the host authorization ended";
235
+ export declare const PORT_CLOSED = "the port closed";
236
+ export declare function request(message: unknown): WireRequest | null;
237
+ export declare function answer(message: unknown): WireAnswer | null;
238
+ export {};