@agentshouse/app-bridge 0.1.0-cf8a685b77ec0 → 0.1.0-cfb1de15c7b2c
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 +20 -17
- package/dist/index.d.ts +719 -0
- package/dist/index.js +1 -0
- package/dist/mdmodel/body.d.ts +84 -0
- package/dist/mdmodel/built-in.d.ts +3 -0
- package/dist/mdmodel/definition.d.ts +90 -0
- package/dist/mdmodel/divide.d.ts +2 -0
- package/dist/mdmodel/document.d.ts +22 -0
- package/dist/mdmodel/event.d.ts +76 -0
- package/dist/mdmodel/facts.d.ts +14 -0
- package/dist/mdmodel/fields.d.ts +5 -0
- package/dist/mdmodel/house-model.d.ts +826 -0
- package/dist/mdmodel/house-references/crockford.d.ts +3 -0
- package/dist/mdmodel/house-references/patterns.d.ts +8 -0
- package/dist/mdmodel/index.d.ts +42 -0
- package/dist/mdmodel/kinds.d.ts +17 -0
- package/dist/mdmodel/markdown.d.ts +74 -0
- package/dist/mdmodel/media-type.d.ts +71 -0
- package/dist/mdmodel/paths.d.ts +34 -0
- package/dist/mdmodel/pattern.d.ts +9 -0
- package/dist/mdmodel/project.d.ts +21 -0
- package/dist/mdmodel/query/language.d.ts +253 -0
- package/dist/mdmodel/query/match.d.ts +13 -0
- package/dist/mdmodel/query/rows.d.ts +31 -0
- package/dist/mdmodel/query/sql.d.ts +38 -0
- package/dist/mdmodel/references.d.ts +3 -0
- package/dist/mdmodel/reserved.d.ts +5 -0
- package/dist/mdmodel/room-types.d.ts +6 -0
- package/dist/mdmodel/types.d.ts +181 -0
- package/dist/mdmodel/validate.d.ts +35 -0
- package/dist/mdmodel/version.d.ts +1 -0
- package/dist/mdmodel/yaml.d.ts +55 -0
- package/dist/mdruntime/actions.d.ts +25 -0
- package/dist/mdruntime/adapter.d.ts +540 -0
- package/dist/mdruntime/attached-model.d.ts +6 -0
- package/dist/mdruntime/binary.d.ts +17 -0
- package/dist/mdruntime/bootstrap.d.ts +43 -0
- package/dist/mdruntime/cell.d.ts +5 -0
- package/dist/mdruntime/chain.d.ts +11 -0
- package/dist/mdruntime/change-set.d.ts +31 -0
- package/dist/mdruntime/change.d.ts +119 -0
- package/dist/mdruntime/client.d.ts +97 -0
- package/dist/mdruntime/collection.d.ts +46 -0
- package/dist/mdruntime/compile.d.ts +17 -0
- package/dist/mdruntime/conversation-live.d.ts +149 -0
- package/dist/mdruntime/conversation-row.d.ts +34 -0
- package/dist/mdruntime/conversation.d.ts +134 -0
- package/dist/mdruntime/declaration.d.ts +9 -0
- package/dist/mdruntime/durability.d.ts +30 -0
- package/dist/mdruntime/failure.d.ts +15 -0
- package/dist/mdruntime/figures.d.ts +48 -0
- package/dist/mdruntime/holdings.d.ts +28 -0
- package/dist/mdruntime/identity.d.ts +5 -0
- package/dist/mdruntime/listing.d.ts +47 -0
- package/dist/mdruntime/live.d.ts +22 -0
- package/dist/mdruntime/media.d.ts +7 -0
- package/dist/mdruntime/messages.d.ts +57 -0
- package/dist/mdruntime/model.d.ts +54 -0
- package/dist/mdruntime/observation.d.ts +45 -0
- package/dist/mdruntime/open.d.ts +1 -0
- package/dist/mdruntime/opened.d.ts +21 -0
- package/dist/mdruntime/outcome.d.ts +94 -0
- package/dist/mdruntime/overlay.d.ts +29 -0
- package/dist/mdruntime/preparation.d.ts +19 -0
- package/dist/mdruntime/presence.d.ts +51 -0
- package/dist/mdruntime/query.d.ts +87 -0
- package/dist/mdruntime/reach.d.ts +55 -0
- package/dist/mdruntime/readiness.d.ts +48 -0
- package/dist/mdruntime/reads.d.ts +38 -0
- package/dist/mdruntime/recovery.d.ts +27 -0
- package/dist/mdruntime/refresh.d.ts +26 -0
- package/dist/mdruntime/replica.d.ts +62 -0
- package/dist/mdruntime/retried.d.ts +29 -0
- package/dist/mdruntime/room-draft.d.ts +172 -0
- package/dist/mdruntime/room-drafts.d.ts +23 -0
- package/dist/mdruntime/runtime.d.ts +33 -0
- package/dist/mdruntime/save.d.ts +58 -0
- package/dist/mdruntime/saves.d.ts +31 -0
- package/dist/mdruntime/search.d.ts +21 -0
- package/dist/mdruntime/seed.d.ts +24 -0
- package/dist/mdruntime/socket/admission.d.ts +6 -0
- package/dist/mdruntime/socket/answers.d.ts +5 -0
- package/dist/mdruntime/socket/lanes.d.ts +27 -0
- package/dist/mdruntime/socket/session.d.ts +37 -0
- package/dist/mdruntime/socket.d.ts +66 -0
- package/dist/mdruntime/source.d.ts +53 -0
- package/dist/mdruntime/status.d.ts +25 -0
- package/dist/mdruntime/store/installs.d.ts +29 -0
- package/dist/mdruntime/store/readiness.d.ts +9 -0
- package/dist/mdruntime/store/records.d.ts +214 -0
- package/dist/mdruntime/store/room-held.d.ts +7 -0
- package/dist/mdruntime/store/space.d.ts +10 -0
- package/dist/mdruntime/store/watchers.d.ts +16 -0
- package/dist/mdruntime/store/writes.d.ts +23 -0
- package/dist/mdruntime/store.d.ts +121 -0
- package/dist/mdruntime/stored.d.ts +156 -0
- package/dist/mdruntime/surface.d.ts +88 -0
- package/dist/mdruntime/tables.d.ts +414 -0
- package/dist/mdruntime/tallies.d.ts +17 -0
- package/dist/mdruntime/transfer.d.ts +4 -0
- package/dist/mdruntime/wire.d.ts +287 -0
- package/dist/session-content/bounds.d.ts +7 -0
- package/dist/session-content/check.d.ts +18 -0
- package/dist/session-content/index.d.ts +7 -0
- package/dist/session-content/parts.d.ts +103 -0
- package/dist/session-content/state.d.ts +61 -0
- package/dist/session-content/turn.d.ts +328 -0
- package/dist/{client/src/test-host.d.ts → test-host.d.ts} +10 -8
- package/dist/test-host.js +190 -0
- package/docs/families.md +100 -46
- package/package.json +12 -10
- package/dist/client/src/bridge.d.ts +0 -38
- package/dist/client/src/bridge.js +0 -320
- package/dist/client/src/index.d.ts +0 -3
- package/dist/client/src/index.js +0 -2
- package/dist/client/src/test-host.js +0 -185
- package/dist/client/src/wire.d.ts +0 -215
- package/dist/client/src/wire.js +0 -1
- package/dist/src/apps/remainder.d.ts +0 -2
- package/dist/src/apps/remainder.js +0 -16
- package/dist/src/apps/tab.d.ts +0 -6
- package/dist/src/apps/tab.js +0 -27
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,719 @@
|
|
|
1
|
+
import type { MdRuntimeClient, Open } from './mdruntime/client.js';
|
|
2
|
+
export interface HouseMethods {
|
|
3
|
+
readonly "agent-functions/decide": {
|
|
4
|
+
readonly params: never;
|
|
5
|
+
readonly result: never;
|
|
6
|
+
};
|
|
7
|
+
readonly "agent-functions/requests/list": {
|
|
8
|
+
readonly params: {
|
|
9
|
+
readonly operation_id?: string;
|
|
10
|
+
readonly room_ref: string;
|
|
11
|
+
};
|
|
12
|
+
readonly result: {
|
|
13
|
+
readonly current: readonly {
|
|
14
|
+
readonly document: string;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
}[];
|
|
17
|
+
readonly history: readonly {
|
|
18
|
+
readonly document: string;
|
|
19
|
+
readonly name: string;
|
|
20
|
+
}[];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly "apps/features/list": {
|
|
24
|
+
readonly params: {
|
|
25
|
+
readonly operation_id?: string;
|
|
26
|
+
};
|
|
27
|
+
readonly result: {
|
|
28
|
+
readonly features: readonly {
|
|
29
|
+
readonly allowed: boolean;
|
|
30
|
+
readonly feature: string;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly "apps/holders/list": {
|
|
35
|
+
readonly params: {
|
|
36
|
+
readonly operation_id?: string;
|
|
37
|
+
};
|
|
38
|
+
readonly result: {
|
|
39
|
+
readonly holders: readonly {
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly user: string;
|
|
42
|
+
}[];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
readonly "apps/messages/send": {
|
|
46
|
+
readonly params: {
|
|
47
|
+
readonly body: unknown;
|
|
48
|
+
readonly operation_id?: string;
|
|
49
|
+
readonly to: string;
|
|
50
|
+
};
|
|
51
|
+
readonly result: {
|
|
52
|
+
readonly [key: string]: never;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
readonly "apps/relay/read": {
|
|
56
|
+
readonly params: {
|
|
57
|
+
readonly operation_id?: string;
|
|
58
|
+
};
|
|
59
|
+
readonly result: {
|
|
60
|
+
readonly expires_at: string;
|
|
61
|
+
readonly ice_servers: readonly {
|
|
62
|
+
readonly credential: string;
|
|
63
|
+
readonly urls: readonly string[];
|
|
64
|
+
readonly username: string;
|
|
65
|
+
}[];
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
readonly "apps/ring": {
|
|
69
|
+
readonly params: {
|
|
70
|
+
readonly operation_id?: string;
|
|
71
|
+
readonly to: string;
|
|
72
|
+
};
|
|
73
|
+
readonly result: {
|
|
74
|
+
readonly authority: string;
|
|
75
|
+
readonly log_epoch: string;
|
|
76
|
+
readonly position: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
readonly "chats/assign": {
|
|
80
|
+
readonly params: {
|
|
81
|
+
readonly assignee: null | {
|
|
82
|
+
readonly agent: string;
|
|
83
|
+
} | {
|
|
84
|
+
readonly user: string;
|
|
85
|
+
};
|
|
86
|
+
readonly operation_id?: string;
|
|
87
|
+
readonly path: string;
|
|
88
|
+
readonly room_ref: string;
|
|
89
|
+
};
|
|
90
|
+
readonly result: {
|
|
91
|
+
readonly assignee: null | {
|
|
92
|
+
readonly agent: string;
|
|
93
|
+
readonly name: string;
|
|
94
|
+
} | {
|
|
95
|
+
readonly name: string;
|
|
96
|
+
readonly user: string;
|
|
97
|
+
};
|
|
98
|
+
readonly authority: string;
|
|
99
|
+
readonly log_epoch: string;
|
|
100
|
+
readonly path: string;
|
|
101
|
+
readonly position: string;
|
|
102
|
+
readonly return_to: null | {
|
|
103
|
+
readonly agent: string;
|
|
104
|
+
readonly name: string;
|
|
105
|
+
};
|
|
106
|
+
readonly room_ref: string;
|
|
107
|
+
readonly url: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
readonly "chats/reply": {
|
|
111
|
+
readonly params: {
|
|
112
|
+
readonly operation_id?: string;
|
|
113
|
+
readonly path: string;
|
|
114
|
+
readonly room_ref: string;
|
|
115
|
+
readonly template?: {
|
|
116
|
+
readonly language: string;
|
|
117
|
+
readonly name: string;
|
|
118
|
+
};
|
|
119
|
+
readonly text?: string;
|
|
120
|
+
readonly values?: {
|
|
121
|
+
readonly [key: string]: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
readonly result: {
|
|
125
|
+
readonly authority: string;
|
|
126
|
+
readonly log_epoch: string;
|
|
127
|
+
readonly path: string;
|
|
128
|
+
readonly position: string;
|
|
129
|
+
readonly room_ref: string;
|
|
130
|
+
readonly url: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
readonly "chats/return": {
|
|
134
|
+
readonly params: {
|
|
135
|
+
readonly operation_id?: string;
|
|
136
|
+
readonly path: string;
|
|
137
|
+
readonly room_ref: string;
|
|
138
|
+
};
|
|
139
|
+
readonly result: {
|
|
140
|
+
readonly assignee: null | {
|
|
141
|
+
readonly agent: string;
|
|
142
|
+
readonly name: string;
|
|
143
|
+
} | {
|
|
144
|
+
readonly name: string;
|
|
145
|
+
readonly user: string;
|
|
146
|
+
};
|
|
147
|
+
readonly authority: string;
|
|
148
|
+
readonly log_epoch: string;
|
|
149
|
+
readonly path: string;
|
|
150
|
+
readonly position: string;
|
|
151
|
+
readonly return_to: null | {
|
|
152
|
+
readonly agent: string;
|
|
153
|
+
readonly name: string;
|
|
154
|
+
};
|
|
155
|
+
readonly room_ref: string;
|
|
156
|
+
readonly url: string;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
readonly "chats/take-control": {
|
|
160
|
+
readonly params: {
|
|
161
|
+
readonly operation_id?: string;
|
|
162
|
+
readonly path: string;
|
|
163
|
+
readonly room_ref: string;
|
|
164
|
+
};
|
|
165
|
+
readonly result: {
|
|
166
|
+
readonly assignee: null | {
|
|
167
|
+
readonly agent: string;
|
|
168
|
+
readonly name: string;
|
|
169
|
+
} | {
|
|
170
|
+
readonly name: string;
|
|
171
|
+
readonly user: string;
|
|
172
|
+
};
|
|
173
|
+
readonly authority: string;
|
|
174
|
+
readonly log_epoch: string;
|
|
175
|
+
readonly path: string;
|
|
176
|
+
readonly position: string;
|
|
177
|
+
readonly return_to: null | {
|
|
178
|
+
readonly agent: string;
|
|
179
|
+
readonly name: string;
|
|
180
|
+
};
|
|
181
|
+
readonly room_ref: string;
|
|
182
|
+
readonly url: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
readonly "conversations/create": {
|
|
186
|
+
readonly params: never;
|
|
187
|
+
readonly result: never;
|
|
188
|
+
};
|
|
189
|
+
readonly "conversations/delete": {
|
|
190
|
+
readonly params: never;
|
|
191
|
+
readonly result: never;
|
|
192
|
+
};
|
|
193
|
+
readonly "conversations/history/list": {
|
|
194
|
+
readonly params: never;
|
|
195
|
+
readonly result: never;
|
|
196
|
+
};
|
|
197
|
+
readonly "conversations/interaction/answer": {
|
|
198
|
+
readonly params: never;
|
|
199
|
+
readonly result: never;
|
|
200
|
+
};
|
|
201
|
+
readonly "conversations/interrupt": {
|
|
202
|
+
readonly params: never;
|
|
203
|
+
readonly result: never;
|
|
204
|
+
};
|
|
205
|
+
readonly "conversations/kill": {
|
|
206
|
+
readonly params: never;
|
|
207
|
+
readonly result: never;
|
|
208
|
+
};
|
|
209
|
+
readonly "conversations/option/set": {
|
|
210
|
+
readonly params: never;
|
|
211
|
+
readonly result: never;
|
|
212
|
+
};
|
|
213
|
+
readonly "conversations/rename": {
|
|
214
|
+
readonly params: never;
|
|
215
|
+
readonly result: never;
|
|
216
|
+
};
|
|
217
|
+
readonly "conversations/retry": {
|
|
218
|
+
readonly params: never;
|
|
219
|
+
readonly result: never;
|
|
220
|
+
};
|
|
221
|
+
readonly "conversations/send": {
|
|
222
|
+
readonly params: never;
|
|
223
|
+
readonly result: never;
|
|
224
|
+
};
|
|
225
|
+
readonly "conversations/take-out": {
|
|
226
|
+
readonly params: never;
|
|
227
|
+
readonly result: never;
|
|
228
|
+
};
|
|
229
|
+
readonly "rooms/access/list": {
|
|
230
|
+
readonly params: {
|
|
231
|
+
readonly operation_id?: string;
|
|
232
|
+
readonly room_ref: string;
|
|
233
|
+
};
|
|
234
|
+
readonly result: {
|
|
235
|
+
readonly authority: "administrator" | "member" | "owner";
|
|
236
|
+
readonly members: readonly {
|
|
237
|
+
readonly admitted_at: null | string;
|
|
238
|
+
readonly direct: readonly {
|
|
239
|
+
readonly level: null | "keep" | "open" | "search";
|
|
240
|
+
readonly namespace: string;
|
|
241
|
+
readonly operations: readonly ("erase" | "export" | "manageAccess" | "write")[];
|
|
242
|
+
}[];
|
|
243
|
+
readonly entries: readonly {
|
|
244
|
+
readonly level: null | "keep" | "open" | "search";
|
|
245
|
+
readonly namespace: string;
|
|
246
|
+
readonly operations: readonly ("erase" | "export" | "manageAccess" | "write")[];
|
|
247
|
+
readonly sources: readonly {
|
|
248
|
+
readonly kind: "direct" | "inherited";
|
|
249
|
+
readonly level: null | "keep" | "open" | "search";
|
|
250
|
+
readonly namespace: string;
|
|
251
|
+
readonly operations: readonly ("erase" | "export" | "manageAccess" | "write")[];
|
|
252
|
+
}[];
|
|
253
|
+
}[];
|
|
254
|
+
readonly key: null | string;
|
|
255
|
+
readonly schema_roles: readonly string[];
|
|
256
|
+
readonly through_space?: true;
|
|
257
|
+
readonly user: string;
|
|
258
|
+
readonly user_name: string;
|
|
259
|
+
}[];
|
|
260
|
+
readonly namespaces: readonly string[];
|
|
261
|
+
readonly owner: string;
|
|
262
|
+
readonly room_ref: string;
|
|
263
|
+
readonly url: string;
|
|
264
|
+
readonly viewer: string;
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
readonly "rooms/members/list": {
|
|
268
|
+
readonly params: {
|
|
269
|
+
readonly history?: boolean;
|
|
270
|
+
readonly operation_id?: string;
|
|
271
|
+
readonly room_ref: string;
|
|
272
|
+
};
|
|
273
|
+
readonly result: {
|
|
274
|
+
readonly history?: readonly {
|
|
275
|
+
readonly at: string;
|
|
276
|
+
readonly kind: "granted" | "revoked";
|
|
277
|
+
readonly user: string;
|
|
278
|
+
}[];
|
|
279
|
+
readonly members: readonly {
|
|
280
|
+
readonly access?: "manage" | "owner" | "read" | "write";
|
|
281
|
+
readonly copies?: "online_only" | "search_only";
|
|
282
|
+
readonly display_name: string;
|
|
283
|
+
readonly email?: string;
|
|
284
|
+
readonly member_document: null | string;
|
|
285
|
+
readonly owner: boolean;
|
|
286
|
+
readonly schema_roles?: readonly string[];
|
|
287
|
+
readonly since: null | string;
|
|
288
|
+
readonly through_space?: true;
|
|
289
|
+
readonly user: string;
|
|
290
|
+
}[];
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
readonly "rooms/settings/processing/read": {
|
|
294
|
+
readonly params: {
|
|
295
|
+
readonly operation_id?: string;
|
|
296
|
+
readonly path: string;
|
|
297
|
+
readonly room_ref: string;
|
|
298
|
+
};
|
|
299
|
+
readonly result: {
|
|
300
|
+
readonly embedding: {
|
|
301
|
+
readonly condition: null | {
|
|
302
|
+
readonly kind: "demand_failed" | "embed_again_failed";
|
|
303
|
+
readonly path: string;
|
|
304
|
+
};
|
|
305
|
+
readonly embedding_estimate: null | {
|
|
306
|
+
readonly documents: number;
|
|
307
|
+
readonly measured_tokens: number;
|
|
308
|
+
readonly unmeasured_documents: number;
|
|
309
|
+
};
|
|
310
|
+
readonly finished: boolean;
|
|
311
|
+
readonly indexed_chunks: number;
|
|
312
|
+
};
|
|
313
|
+
readonly explicit: readonly {
|
|
314
|
+
readonly path: string;
|
|
315
|
+
readonly policy: "Off" | "On";
|
|
316
|
+
}[];
|
|
317
|
+
readonly path: string;
|
|
318
|
+
readonly policy: {
|
|
319
|
+
readonly from: null | string;
|
|
320
|
+
readonly origin: "default" | "explicit" | "inherited";
|
|
321
|
+
readonly reason: null | "room_too_large" | "unfunded";
|
|
322
|
+
readonly value: "Off" | "On";
|
|
323
|
+
};
|
|
324
|
+
readonly writable: boolean;
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
readonly "sites/submissions/create": {
|
|
328
|
+
readonly params: {
|
|
329
|
+
readonly content: string;
|
|
330
|
+
};
|
|
331
|
+
readonly result: {
|
|
332
|
+
readonly submitted: true;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
readonly "storage/inventory/read": {
|
|
336
|
+
readonly params: {
|
|
337
|
+
readonly operation_id?: string;
|
|
338
|
+
readonly room_ref?: string;
|
|
339
|
+
readonly rooms?: "owned";
|
|
340
|
+
};
|
|
341
|
+
readonly result: {
|
|
342
|
+
readonly blob: {
|
|
343
|
+
readonly bytes: string;
|
|
344
|
+
readonly gigabytes: string;
|
|
345
|
+
};
|
|
346
|
+
readonly freshness: {
|
|
347
|
+
readonly state: "settled";
|
|
348
|
+
};
|
|
349
|
+
readonly indexed_text: {
|
|
350
|
+
readonly bytes: string;
|
|
351
|
+
readonly gigabytes: string;
|
|
352
|
+
};
|
|
353
|
+
readonly room_ref: string;
|
|
354
|
+
readonly total: {
|
|
355
|
+
readonly bytes: string;
|
|
356
|
+
readonly gigabytes: string;
|
|
357
|
+
};
|
|
358
|
+
readonly url: string;
|
|
359
|
+
} | {
|
|
360
|
+
readonly blob: {
|
|
361
|
+
readonly bytes: string;
|
|
362
|
+
readonly gigabytes: string;
|
|
363
|
+
};
|
|
364
|
+
readonly freshness: {
|
|
365
|
+
readonly state: "settled";
|
|
366
|
+
};
|
|
367
|
+
readonly indexed_text: {
|
|
368
|
+
readonly bytes: string;
|
|
369
|
+
readonly gigabytes: string;
|
|
370
|
+
};
|
|
371
|
+
readonly rooms?: readonly {
|
|
372
|
+
readonly blob: {
|
|
373
|
+
readonly bytes: string;
|
|
374
|
+
readonly gigabytes: string;
|
|
375
|
+
};
|
|
376
|
+
readonly freshness: {
|
|
377
|
+
readonly state: "settled";
|
|
378
|
+
};
|
|
379
|
+
readonly indexed_text: {
|
|
380
|
+
readonly bytes: string;
|
|
381
|
+
readonly gigabytes: string;
|
|
382
|
+
};
|
|
383
|
+
readonly room_ref: string;
|
|
384
|
+
readonly total: {
|
|
385
|
+
readonly bytes: string;
|
|
386
|
+
readonly gigabytes: string;
|
|
387
|
+
};
|
|
388
|
+
readonly url: string;
|
|
389
|
+
}[];
|
|
390
|
+
readonly site_images: {
|
|
391
|
+
readonly bound: string;
|
|
392
|
+
readonly bytes: string;
|
|
393
|
+
readonly payloads: string;
|
|
394
|
+
};
|
|
395
|
+
readonly total: {
|
|
396
|
+
readonly bytes: string;
|
|
397
|
+
readonly gigabytes: string;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
readonly "triggers/fired/list": {
|
|
402
|
+
readonly params: {
|
|
403
|
+
readonly operation_id?: string;
|
|
404
|
+
readonly room_ref?: string;
|
|
405
|
+
};
|
|
406
|
+
readonly result: {
|
|
407
|
+
readonly events: readonly {
|
|
408
|
+
readonly actions: readonly ({
|
|
409
|
+
readonly cap: "address_submissions" | "app_sockets" | "environment_functions" | "export_starts" | "kit_connections" | "live_shares" | "open_uploads" | "ownership_offers" | "push_addresses" | "push_deliveries" | "room_triggers" | "service_keys" | "share_creations" | "share_room_creations" | "site_published_bytes" | "site_rooms" | "slot_rooms" | "spaces" | "waiting_web_wizards" | "writes";
|
|
410
|
+
readonly code: "cap_reached";
|
|
411
|
+
readonly outcome: "refused";
|
|
412
|
+
readonly position: number;
|
|
413
|
+
readonly retry_at: string;
|
|
414
|
+
} | {
|
|
415
|
+
readonly cap: "address_submissions" | "app_sockets" | "environment_functions" | "export_starts" | "kit_connections" | "live_shares" | "open_uploads" | "ownership_offers" | "push_addresses" | "push_deliveries" | "room_triggers" | "service_keys" | "share_creations" | "share_room_creations" | "site_published_bytes" | "site_rooms" | "slot_rooms" | "spaces" | "waiting_web_wizards" | "writes";
|
|
416
|
+
readonly code: "cap_reached";
|
|
417
|
+
readonly outcome: "refused";
|
|
418
|
+
readonly position: number;
|
|
419
|
+
} | {
|
|
420
|
+
readonly code: "agent_function_request_not_started";
|
|
421
|
+
readonly final?: true;
|
|
422
|
+
readonly outcome: "failed";
|
|
423
|
+
readonly position: number;
|
|
424
|
+
} | {
|
|
425
|
+
readonly code: "agent_unavailable";
|
|
426
|
+
readonly outcome: "withdrawn";
|
|
427
|
+
readonly position: number;
|
|
428
|
+
} | {
|
|
429
|
+
readonly code: "function_failed";
|
|
430
|
+
readonly cut?: boolean;
|
|
431
|
+
readonly error: string;
|
|
432
|
+
readonly exit_code?: number;
|
|
433
|
+
readonly final: true;
|
|
434
|
+
readonly outcome: "failed";
|
|
435
|
+
readonly output?: string;
|
|
436
|
+
readonly position: number;
|
|
437
|
+
readonly run: string;
|
|
438
|
+
} | {
|
|
439
|
+
readonly code: "function_failed";
|
|
440
|
+
readonly error: string;
|
|
441
|
+
readonly final: true;
|
|
442
|
+
readonly outcome: "failed";
|
|
443
|
+
readonly position: number;
|
|
444
|
+
readonly release: string;
|
|
445
|
+
} | {
|
|
446
|
+
readonly code: "function_not_started";
|
|
447
|
+
readonly final?: true;
|
|
448
|
+
readonly outcome: "failed";
|
|
449
|
+
readonly position: number;
|
|
450
|
+
readonly tries: number;
|
|
451
|
+
} | {
|
|
452
|
+
readonly code: "internal_error";
|
|
453
|
+
readonly final: true;
|
|
454
|
+
readonly outcome: "failed";
|
|
455
|
+
readonly position: number;
|
|
456
|
+
} | {
|
|
457
|
+
readonly code: "limit_reached";
|
|
458
|
+
readonly limit: "reads";
|
|
459
|
+
readonly outcome: "refused";
|
|
460
|
+
readonly period: "day" | "minute";
|
|
461
|
+
readonly position: number;
|
|
462
|
+
readonly retry_at: string;
|
|
463
|
+
readonly value: string;
|
|
464
|
+
} | {
|
|
465
|
+
readonly code: "limit_reached";
|
|
466
|
+
readonly limit: "writes";
|
|
467
|
+
readonly outcome: "refused";
|
|
468
|
+
readonly period: "day" | "minute";
|
|
469
|
+
readonly position: number;
|
|
470
|
+
readonly retry_at: string;
|
|
471
|
+
} | {
|
|
472
|
+
readonly code: "limit_reached";
|
|
473
|
+
readonly limit: "blob" | "indexed_text";
|
|
474
|
+
readonly outcome: "refused";
|
|
475
|
+
readonly position: number;
|
|
476
|
+
readonly used: string;
|
|
477
|
+
readonly value: string;
|
|
478
|
+
} | {
|
|
479
|
+
readonly code: "limit_reached";
|
|
480
|
+
readonly limit: "custom_domains" | "external_calls" | "publish_data" | "sites";
|
|
481
|
+
readonly outcome: "refused";
|
|
482
|
+
readonly position: number;
|
|
483
|
+
readonly retry_at: string;
|
|
484
|
+
} | {
|
|
485
|
+
readonly code: "limit_reached";
|
|
486
|
+
readonly limit: "custom_domains" | "external_calls" | "publish_data" | "sites";
|
|
487
|
+
readonly outcome: "refused";
|
|
488
|
+
readonly position: number;
|
|
489
|
+
} | {
|
|
490
|
+
readonly code: "agent_function_retired" | "environment_offline" | "no_recipient" | "not_found" | "target_agent_unavailable";
|
|
491
|
+
readonly outcome: "no_target";
|
|
492
|
+
readonly position: number;
|
|
493
|
+
} | {
|
|
494
|
+
readonly code: string;
|
|
495
|
+
readonly outcome: "refused";
|
|
496
|
+
readonly position: number;
|
|
497
|
+
} | {
|
|
498
|
+
readonly conversations: number;
|
|
499
|
+
readonly outcome: "marked";
|
|
500
|
+
readonly position: number;
|
|
501
|
+
} | {
|
|
502
|
+
readonly cut?: boolean;
|
|
503
|
+
readonly exit_code?: number;
|
|
504
|
+
readonly outcome: "ran";
|
|
505
|
+
readonly output?: string;
|
|
506
|
+
readonly position: number;
|
|
507
|
+
readonly run: string;
|
|
508
|
+
} | {
|
|
509
|
+
readonly outcome: "continued";
|
|
510
|
+
readonly position: number;
|
|
511
|
+
readonly request: string;
|
|
512
|
+
} | {
|
|
513
|
+
readonly outcome: "notified";
|
|
514
|
+
readonly position: number;
|
|
515
|
+
readonly reached: number;
|
|
516
|
+
} | {
|
|
517
|
+
readonly outcome: "paused";
|
|
518
|
+
readonly position: number;
|
|
519
|
+
} | {
|
|
520
|
+
readonly outcome: "ran";
|
|
521
|
+
readonly position: number;
|
|
522
|
+
readonly release: string;
|
|
523
|
+
} | {
|
|
524
|
+
readonly outcome: "requested";
|
|
525
|
+
readonly position: number;
|
|
526
|
+
readonly request: string;
|
|
527
|
+
} | {
|
|
528
|
+
readonly outcome: "running";
|
|
529
|
+
readonly position: number;
|
|
530
|
+
readonly release: string;
|
|
531
|
+
} | {
|
|
532
|
+
readonly outcome: "running";
|
|
533
|
+
readonly position: number;
|
|
534
|
+
readonly run: string;
|
|
535
|
+
} | {
|
|
536
|
+
readonly outcome: "waiting";
|
|
537
|
+
readonly position: number;
|
|
538
|
+
})[];
|
|
539
|
+
readonly code?: "cap_reached";
|
|
540
|
+
readonly created_at: string;
|
|
541
|
+
readonly missed?: "failed" | "skipped";
|
|
542
|
+
readonly moment?: string;
|
|
543
|
+
readonly path?: string;
|
|
544
|
+
readonly room_ref?: string;
|
|
545
|
+
readonly trigger: string;
|
|
546
|
+
readonly url?: string;
|
|
547
|
+
}[];
|
|
548
|
+
};
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
export type HouseParams<Name extends string> = Name extends keyof HouseMethods ? HouseMethods[Name]['params'] : unknown;
|
|
552
|
+
type CallResult = Awaited<ReturnType<MdRuntimeClient['call']>>;
|
|
553
|
+
export type HouseResult<Name extends string> = Exclude<CallResult, {
|
|
554
|
+
readonly kind: 'action';
|
|
555
|
+
}> | (Extract<CallResult, {
|
|
556
|
+
readonly kind: 'action';
|
|
557
|
+
}> & {
|
|
558
|
+
readonly result: Name extends keyof HouseMethods ? HouseMethods[Name]['result'] : unknown;
|
|
559
|
+
});
|
|
560
|
+
export interface HouseRuntime extends Omit<MdRuntimeClient, 'call'> {
|
|
561
|
+
call<Name extends Open<keyof HouseMethods>>(method: Name, params: HouseParams<Name>): Promise<HouseResult<Name>>;
|
|
562
|
+
}
|
|
563
|
+
export interface HouseSyncState {
|
|
564
|
+
readonly state: string;
|
|
565
|
+
readonly providerUnreachable: boolean;
|
|
566
|
+
}
|
|
567
|
+
export interface HouseCredentialState {
|
|
568
|
+
readonly state: Open<'none' | 'held' | 'rejected'>;
|
|
569
|
+
readonly expiresAt: number | null;
|
|
570
|
+
}
|
|
571
|
+
export type HouseDatabaseFailure = 'damaged';
|
|
572
|
+
export type HouseAnalyticsChoice = 'accept' | 'decline';
|
|
573
|
+
export interface HouseAnalytics {
|
|
574
|
+
readonly measures: boolean;
|
|
575
|
+
readonly choice: Open<HouseAnalyticsChoice> | null;
|
|
576
|
+
}
|
|
577
|
+
export interface HouseStatus {
|
|
578
|
+
readonly app: string | null;
|
|
579
|
+
readonly preferences: {
|
|
580
|
+
readonly roomRef: string;
|
|
581
|
+
readonly path: string;
|
|
582
|
+
} | null;
|
|
583
|
+
readonly runtime: string;
|
|
584
|
+
readonly credential: HouseCredentialState;
|
|
585
|
+
readonly sync: HouseSyncState | null;
|
|
586
|
+
readonly refusal: {
|
|
587
|
+
readonly code: string;
|
|
588
|
+
} | null;
|
|
589
|
+
readonly loss: string | null;
|
|
590
|
+
readonly database: Open<HouseDatabaseFailure> | null;
|
|
591
|
+
readonly analytics: HouseAnalytics;
|
|
592
|
+
readonly serviceMode: Open<'open' | 'write-halted'> | null;
|
|
593
|
+
readonly offline: boolean;
|
|
594
|
+
}
|
|
595
|
+
export type HouseNavigationMode = 'push' | 'replace';
|
|
596
|
+
export interface HouseTab {
|
|
597
|
+
readonly title?: string;
|
|
598
|
+
readonly icon?: string;
|
|
599
|
+
}
|
|
600
|
+
interface HouseRelease {
|
|
601
|
+
readonly app_ref: string;
|
|
602
|
+
readonly release: string;
|
|
603
|
+
}
|
|
604
|
+
export interface HouseSourceTop extends HouseRelease {
|
|
605
|
+
readonly folders: readonly string[];
|
|
606
|
+
readonly files: readonly {
|
|
607
|
+
readonly name: string;
|
|
608
|
+
readonly size: number;
|
|
609
|
+
}[];
|
|
610
|
+
readonly readme: string | null;
|
|
611
|
+
}
|
|
612
|
+
export type HouseSourceFile = {
|
|
613
|
+
readonly path: string;
|
|
614
|
+
readonly size: number;
|
|
615
|
+
} & ({
|
|
616
|
+
readonly text: string;
|
|
617
|
+
} | {
|
|
618
|
+
readonly base64: string;
|
|
619
|
+
});
|
|
620
|
+
export interface HouseSourceDownload extends HouseRelease {
|
|
621
|
+
readonly files: readonly HouseSourceFile[];
|
|
622
|
+
}
|
|
623
|
+
export interface HouseExternalRequest {
|
|
624
|
+
readonly url: string;
|
|
625
|
+
readonly method?: string;
|
|
626
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
627
|
+
readonly body?: string;
|
|
628
|
+
readonly body_base64?: string;
|
|
629
|
+
readonly room_ref?: string;
|
|
630
|
+
}
|
|
631
|
+
export type HouseExternalAnswer = {
|
|
632
|
+
readonly status: number;
|
|
633
|
+
readonly headers: Readonly<Record<string, string | readonly string[]>>;
|
|
634
|
+
} & ({
|
|
635
|
+
readonly body: string;
|
|
636
|
+
} | {
|
|
637
|
+
readonly body_base64: string;
|
|
638
|
+
});
|
|
639
|
+
export interface HouseRefusal {
|
|
640
|
+
readonly error: {
|
|
641
|
+
readonly code: string;
|
|
642
|
+
readonly retryable: boolean;
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
export interface HouseAppMessage {
|
|
646
|
+
readonly from: string;
|
|
647
|
+
readonly body: unknown;
|
|
648
|
+
}
|
|
649
|
+
export type HouseInstallation = Open<'accepted' | 'dismissed' | 'manual'>;
|
|
650
|
+
export type HouseNotifications = Open<'on' | 'off' | 'blocked' | 'unavailable'>;
|
|
651
|
+
export interface HouseTelegram {
|
|
652
|
+
readonly state: Open<'available' | 'linked' | 'unavailable'>;
|
|
653
|
+
readonly name: string | null;
|
|
654
|
+
readonly username: string | null;
|
|
655
|
+
}
|
|
656
|
+
export interface HouseCeremonyRefused extends Error {
|
|
657
|
+
readonly name: 'HouseCeremonyRefused';
|
|
658
|
+
readonly code: Open<'house_ceremony_refused'>;
|
|
659
|
+
readonly retryable: boolean;
|
|
660
|
+
readonly path: string | null;
|
|
661
|
+
}
|
|
662
|
+
export interface HouseNavigationRefused extends Error {
|
|
663
|
+
readonly name: 'HouseNavigationRefused';
|
|
664
|
+
readonly code: Open<'house_navigation_refused'>;
|
|
665
|
+
readonly retryable: boolean;
|
|
666
|
+
readonly address: string | null;
|
|
667
|
+
}
|
|
668
|
+
export interface HouseBrowserRefused extends Error {
|
|
669
|
+
readonly code: string;
|
|
670
|
+
readonly retryable: boolean;
|
|
671
|
+
}
|
|
672
|
+
export interface HouseCooperation {
|
|
673
|
+
placed(): Promise<void> | void;
|
|
674
|
+
}
|
|
675
|
+
export interface HouseChatOpened {
|
|
676
|
+
readonly conversation: string | null;
|
|
677
|
+
readonly agent: string | null;
|
|
678
|
+
}
|
|
679
|
+
export interface HouseChatOptions {
|
|
680
|
+
readonly conversation?: string | null;
|
|
681
|
+
readonly agent?: string | null;
|
|
682
|
+
readonly onOpen?: (opened: HouseChatOpened) => void;
|
|
683
|
+
readonly onLink?: (href: string) => void;
|
|
684
|
+
}
|
|
685
|
+
export interface HouseMountedChat {
|
|
686
|
+
update(options: HouseChatOptions): void;
|
|
687
|
+
unmount(): void;
|
|
688
|
+
}
|
|
689
|
+
export interface HouseChat {
|
|
690
|
+
mount(element: object, options?: HouseChatOptions): Promise<HouseMountedChat>;
|
|
691
|
+
}
|
|
692
|
+
export interface HouseBridge {
|
|
693
|
+
readonly runtime: Promise<HouseRuntime>;
|
|
694
|
+
readonly chat: HouseChat;
|
|
695
|
+
address(): string | null;
|
|
696
|
+
onAddress(listener: (address: string) => void): () => void;
|
|
697
|
+
push(address: string): Promise<string>;
|
|
698
|
+
replace(address: string): Promise<string>;
|
|
699
|
+
ceremony(path: string): Promise<never>;
|
|
700
|
+
install(): Promise<HouseInstallation>;
|
|
701
|
+
notifications(on?: boolean): Promise<HouseNotifications>;
|
|
702
|
+
telegram(link?: true): Promise<HouseTelegram>;
|
|
703
|
+
setTab(tab: HouseTab): void;
|
|
704
|
+
sourceTop(app: string, release?: string): Promise<HouseSourceTop | HouseRefusal | null>;
|
|
705
|
+
sourceDownload(app: string, release?: string): Promise<HouseSourceDownload | HouseRefusal | null>;
|
|
706
|
+
callExternal(request: HouseExternalRequest): Promise<HouseExternalAnswer | HouseRefusal | null>;
|
|
707
|
+
readScreenshot(app: string): Promise<Blob | null>;
|
|
708
|
+
readSiteScreenshot(site: string): Promise<Blob | null>;
|
|
709
|
+
status(): HouseStatus | null;
|
|
710
|
+
onStatus(listener: (status: HouseStatus) => void): () => void;
|
|
711
|
+
messages(listener: (message: HouseAppMessage) => void): () => void;
|
|
712
|
+
analyticsConsent(choice: HouseAnalyticsChoice): void;
|
|
713
|
+
cooperate(cooperation: HouseCooperation): () => void;
|
|
714
|
+
}
|
|
715
|
+
export interface HouseHeld {
|
|
716
|
+
readonly houseBridge: HouseBridge;
|
|
717
|
+
}
|
|
718
|
+
export declare const houseBridge: () => HouseBridge;
|
|
719
|
+
export {};
|