@agentshouse/app-bridge 0.1.0-cbdd0f22603b1 → 0.1.0-cbe35d3d6ed3f
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/index.d.ts +6 -2
- package/dist/mdmodel/house-model.d.ts +38 -3
- package/dist/mdruntime/adapter.d.ts +35 -0
- package/dist/mdruntime/authored.d.ts +87 -0
- package/dist/mdruntime/client.d.ts +2 -1
- package/dist/mdruntime/conversation-row.d.ts +6 -1
- package/dist/mdruntime/reads.d.ts +1 -1
- package/dist/mdruntime/source.d.ts +5 -0
- package/dist/mdruntime/store/records.d.ts +2 -1
- package/dist/mdruntime/surface.d.ts +3 -2
- package/dist/mdruntime/tables.d.ts +2 -45
- package/dist/mdruntime/wire.d.ts +1 -0
- package/docs/families.md +9 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -318,7 +318,7 @@ export interface HouseMethods {
|
|
|
318
318
|
readonly policy: {
|
|
319
319
|
readonly from: null | string;
|
|
320
320
|
readonly origin: "default" | "explicit" | "inherited";
|
|
321
|
-
readonly reason: null | "
|
|
321
|
+
readonly reason: null | "full_house_required" | "room_too_large";
|
|
322
322
|
readonly value: "Off" | "On";
|
|
323
323
|
};
|
|
324
324
|
readonly writable: boolean;
|
|
@@ -659,6 +659,10 @@ export interface HouseTelegram {
|
|
|
659
659
|
readonly name: string | null;
|
|
660
660
|
readonly username: string | null;
|
|
661
661
|
}
|
|
662
|
+
export interface HouseCeremonyEnded {
|
|
663
|
+
readonly said: string | null;
|
|
664
|
+
readonly done: boolean;
|
|
665
|
+
}
|
|
662
666
|
export interface HouseCeremonyRefused extends Error {
|
|
663
667
|
readonly name: 'HouseCeremonyRefused';
|
|
664
668
|
readonly code: Open<'house_ceremony_refused'>;
|
|
@@ -718,7 +722,7 @@ export interface HouseBridge {
|
|
|
718
722
|
onAddress(listener: (address: string) => void): () => void;
|
|
719
723
|
push(address: string): Promise<string>;
|
|
720
724
|
replace(address: string): Promise<string>;
|
|
721
|
-
ceremony(path: string): Promise<
|
|
725
|
+
ceremony(path: string): Promise<HouseCeremonyEnded>;
|
|
722
726
|
install(): Promise<HouseInstallation>;
|
|
723
727
|
notifications(on?: boolean): Promise<HouseNotifications>;
|
|
724
728
|
telegram(link?: true): Promise<HouseTelegram>;
|
|
@@ -43,7 +43,7 @@ export declare const HOUSE_MODEL_DECLARATION: {
|
|
|
43
43
|
readonly kind: {
|
|
44
44
|
readonly title: 'Kind';
|
|
45
45
|
readonly type: 'string';
|
|
46
|
-
readonly enum: readonly ['share-offer', 'join-request', 'join-request-approved', 'room-ownership-offer', 'managed-environment-retention-opened', 'storage-full', 'sandbox-budget-spent', 'trigger-failed', 'room-telegram-chat-paused', 'break-glass-owner-disclosure', 'export-ready', 'export-failed', 'custom', 'agent-function-request-finished'];
|
|
46
|
+
readonly enum: readonly ['share-offer', 'join-request', 'join-request-approved', 'room-ownership-offer', 'managed-environment-retention-opened', 'storage-full', 'sandbox-budget-spent', 'trigger-failed', 'room-telegram-chat-paused', 'break-glass-owner-disclosure', 'export-ready', 'export-failed', 'custom', 'agent-function-request-finished', 'storage-past-included'];
|
|
47
47
|
};
|
|
48
48
|
readonly created: {
|
|
49
49
|
readonly title: 'Created';
|
|
@@ -465,6 +465,36 @@ export declare const HOUSE_MODEL_DECLARATION: {
|
|
|
465
465
|
readonly type: 'integer';
|
|
466
466
|
readonly minimum: 1;
|
|
467
467
|
};
|
|
468
|
+
readonly meter: {
|
|
469
|
+
readonly title: 'Meter';
|
|
470
|
+
readonly type: 'string';
|
|
471
|
+
readonly enum: readonly ['indexed_text', 'blob'];
|
|
472
|
+
};
|
|
473
|
+
readonly average_bytes: {
|
|
474
|
+
readonly title: 'Average in bytes';
|
|
475
|
+
readonly type: 'integer';
|
|
476
|
+
readonly minimum: 0;
|
|
477
|
+
};
|
|
478
|
+
readonly included_bytes: {
|
|
479
|
+
readonly title: 'Included in bytes';
|
|
480
|
+
readonly type: 'integer';
|
|
481
|
+
readonly minimum: 1;
|
|
482
|
+
};
|
|
483
|
+
readonly block_bytes: {
|
|
484
|
+
readonly title: 'Block in bytes';
|
|
485
|
+
readonly type: 'integer';
|
|
486
|
+
readonly minimum: 1;
|
|
487
|
+
};
|
|
488
|
+
readonly block_usd: {
|
|
489
|
+
readonly title: 'Block price in USD';
|
|
490
|
+
readonly type: 'number';
|
|
491
|
+
readonly exclusiveMinimum: 0;
|
|
492
|
+
};
|
|
493
|
+
readonly amount_usd: {
|
|
494
|
+
readonly title: 'Amount in USD';
|
|
495
|
+
readonly type: 'number';
|
|
496
|
+
readonly exclusiveMinimum: 0;
|
|
497
|
+
};
|
|
468
498
|
};
|
|
469
499
|
readonly required: readonly ['notification', 'kind', 'created', 'way_in', 'subject'];
|
|
470
500
|
};
|
|
@@ -473,7 +503,7 @@ export declare const HOUSE_MODEL_DECLARATION: {
|
|
|
473
503
|
readonly properties: {};
|
|
474
504
|
};
|
|
475
505
|
readonly 'house-agent-function': {
|
|
476
|
-
readonly description: "One Agent function that serves this Room, which House alone writes from its owner's document in their Private Room: the `agent_function` by identifier, its `description`, the `input` a caller sends, empty when it takes nothing,
|
|
506
|
+
readonly description: "One Agent function that serves this Room, which House alone writes from its owner's document in their Private Room and their Standing answer for it: the `agent_function` by identifier, its `description`, the `input` a caller sends, empty when it takes nothing, the `agent` it starts, by `agent` and the `name` that Agent had when this card was last written, and its `answer`, how a request from anyone but its owner starts: `at_once`, `ask_me`, which waits for its owner's approval, or `off`, which refuses it. The Agent function's instruction is never written here.";
|
|
477
507
|
readonly properties: {
|
|
478
508
|
readonly reflected: {
|
|
479
509
|
readonly title: 'Reflected';
|
|
@@ -508,8 +538,13 @@ export declare const HOUSE_MODEL_DECLARATION: {
|
|
|
508
538
|
};
|
|
509
539
|
readonly required: readonly ['agent', 'name'];
|
|
510
540
|
};
|
|
541
|
+
readonly answer: {
|
|
542
|
+
readonly title: 'Answer';
|
|
543
|
+
readonly type: 'string';
|
|
544
|
+
readonly enum: readonly ['at_once', 'ask_me', 'off'];
|
|
545
|
+
};
|
|
511
546
|
};
|
|
512
|
-
readonly required: readonly ['reflected', 'agent_function', 'description', 'input', 'agent'];
|
|
547
|
+
readonly required: readonly ['reflected', 'agent_function', 'description', 'input', 'agent', 'answer'];
|
|
513
548
|
};
|
|
514
549
|
readonly 'house-agent-function-document': {
|
|
515
550
|
readonly description: 'One Agent function as its owner writes it in their Private Room at rooms/<room-handle>/agent-functions/<name>.md, a path that binds this type and a document that names no type: what it does as `description`, what a caller sends as `input`, empty when it takes nothing, the `agent` it starts, by identifier, and `afk`, true for a run nobody watches, off when absent. Its body is the instruction that Agent follows.';
|
|
@@ -183,6 +183,35 @@ export type AgentEnvironment = {
|
|
|
183
183
|
name: string;
|
|
184
184
|
state: 'online' | 'offline';
|
|
185
185
|
};
|
|
186
|
+
export type ListedOwner = {
|
|
187
|
+
readonly user: string;
|
|
188
|
+
readonly name: string;
|
|
189
|
+
};
|
|
190
|
+
export type ListedSpaceRef = {
|
|
191
|
+
readonly space_ref: string;
|
|
192
|
+
readonly name: string;
|
|
193
|
+
};
|
|
194
|
+
export type RoomListEntry = {
|
|
195
|
+
readonly room_ref: string;
|
|
196
|
+
readonly room_handle: string;
|
|
197
|
+
readonly name: string;
|
|
198
|
+
readonly level: 'search' | 'open' | 'keep';
|
|
199
|
+
readonly access: 'owner' | 'manage' | 'write' | 'read' | 'public';
|
|
200
|
+
readonly owner: ListedOwner;
|
|
201
|
+
readonly created: string;
|
|
202
|
+
readonly archived?: string;
|
|
203
|
+
readonly exportable?: true;
|
|
204
|
+
readonly space?: ListedSpaceRef;
|
|
205
|
+
};
|
|
206
|
+
export type SpaceListEntry = ListedSpaceRef & {
|
|
207
|
+
readonly owner: ListedOwner;
|
|
208
|
+
readonly created: string;
|
|
209
|
+
readonly manages?: true;
|
|
210
|
+
};
|
|
211
|
+
export type RoomList = {
|
|
212
|
+
readonly rooms: readonly RoomListEntry[];
|
|
213
|
+
readonly spaces: readonly SpaceListEntry[];
|
|
214
|
+
};
|
|
186
215
|
export type ListedAgent = {
|
|
187
216
|
id: string;
|
|
188
217
|
name: string;
|
|
@@ -233,6 +262,7 @@ export type Discovery = {
|
|
|
233
262
|
providerLimits: readonly ProviderLimit[];
|
|
234
263
|
retention: Retention;
|
|
235
264
|
member?: Member;
|
|
265
|
+
roomList?: RoomList;
|
|
236
266
|
};
|
|
237
267
|
export type TransportUncertainty = {
|
|
238
268
|
kind: 'transport-uncertainty';
|
|
@@ -494,6 +524,9 @@ export type AuthorityChange = {
|
|
|
494
524
|
rooms: readonly DiscoveredRoom[];
|
|
495
525
|
left: readonly string[];
|
|
496
526
|
member?: Member;
|
|
527
|
+
roomList?: RoomList & {
|
|
528
|
+
readonly left: readonly string[];
|
|
529
|
+
};
|
|
497
530
|
};
|
|
498
531
|
export type RoomStreamEvent = {
|
|
499
532
|
kind: 'opened';
|
|
@@ -508,6 +541,8 @@ export type RoomStreamEvent = {
|
|
|
508
541
|
} | {
|
|
509
542
|
kind: 'caught-up';
|
|
510
543
|
expired: readonly string[];
|
|
544
|
+
} | {
|
|
545
|
+
kind: 'reported';
|
|
511
546
|
} | AuthorityChange | RoomChange;
|
|
512
547
|
export type RoomStream = {
|
|
513
548
|
hold(rooms: readonly HeldRoom[]): void;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { UnsentWork } from './durability.js';
|
|
2
|
+
import type { Connection, FileSpool, HeldStatus } from './tables.js';
|
|
3
|
+
export declare const FILE_PART_BYTES = 1048576;
|
|
4
|
+
export declare const AUTHORED_TABLES: readonly string[];
|
|
5
|
+
export type AuthoredFact = 'holder' | 'generation' | 'format';
|
|
6
|
+
export type StoredFile = {
|
|
7
|
+
readonly key: string;
|
|
8
|
+
readonly blob: Blob;
|
|
9
|
+
};
|
|
10
|
+
type KeptPending = {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly batch: string;
|
|
13
|
+
readonly state: string;
|
|
14
|
+
readonly files: readonly string[];
|
|
15
|
+
readonly paths: readonly string[];
|
|
16
|
+
readonly moving: boolean;
|
|
17
|
+
};
|
|
18
|
+
export type KeptRecord = {
|
|
19
|
+
readonly record: string;
|
|
20
|
+
readonly files: readonly string[];
|
|
21
|
+
};
|
|
22
|
+
export type AuthoredRows = {
|
|
23
|
+
readonly locator: string;
|
|
24
|
+
readonly order?: readonly string[];
|
|
25
|
+
readonly added?: readonly KeptPending[];
|
|
26
|
+
readonly founded?: readonly Omit<KeptPending, 'state'>[];
|
|
27
|
+
readonly roomDrafts?: readonly (KeptRecord & {
|
|
28
|
+
readonly path: string;
|
|
29
|
+
})[];
|
|
30
|
+
readonly consumedRoomDrafts?: readonly string[];
|
|
31
|
+
};
|
|
32
|
+
export type AuthoredWrite = {
|
|
33
|
+
readonly writes: readonly AuthoredRows[];
|
|
34
|
+
readonly files: readonly StoredFile[];
|
|
35
|
+
readonly whole: boolean;
|
|
36
|
+
};
|
|
37
|
+
export type HeldQueues = {
|
|
38
|
+
readonly queues: readonly {
|
|
39
|
+
readonly locator: string;
|
|
40
|
+
readonly ids: readonly string[];
|
|
41
|
+
}[];
|
|
42
|
+
readonly pending: readonly QueuedRow[];
|
|
43
|
+
};
|
|
44
|
+
type QueuedRow = {
|
|
45
|
+
readonly locator: string;
|
|
46
|
+
readonly id: string;
|
|
47
|
+
readonly batch: string;
|
|
48
|
+
readonly state: string;
|
|
49
|
+
};
|
|
50
|
+
export declare function authoredTable(name: string): boolean;
|
|
51
|
+
export declare function heldTables(connection: Connection): string[];
|
|
52
|
+
export declare function formatted(connection: Connection, format: string, tables: readonly string[]): void;
|
|
53
|
+
export declare function fact(connection: Connection, name: AuthoredFact): string | null;
|
|
54
|
+
export declare function remember(connection: Connection, name: AuthoredFact, value: string): null;
|
|
55
|
+
export declare function fenced(connection: Connection, locator: string): boolean;
|
|
56
|
+
export declare function authoredPart(connection: Connection, key: string, part: number): Uint8Array | null;
|
|
57
|
+
export declare function spooled(connection: Connection, spool: FileSpool, key: string, type: string): Promise<Blob>;
|
|
58
|
+
export declare function queues(connection: Connection): HeldQueues['queues'];
|
|
59
|
+
export declare function queuedLocators(connection: Connection): string[];
|
|
60
|
+
export declare function authoredLocators(connection: Connection): string[];
|
|
61
|
+
export declare function heldOrder(connection: Connection, locator: string): readonly string[];
|
|
62
|
+
export declare function queueOf(connection: Connection, locator: string): Omit<QueuedRow, 'locator'>[];
|
|
63
|
+
export declare function moving(connection: Connection): HeldQueues;
|
|
64
|
+
export declare function unsentStatus(connection: Connection): Omit<HeldStatus, 'lastCompleted'>;
|
|
65
|
+
export declare function pendingState(connection: Connection, locator: string, id: string): string | null;
|
|
66
|
+
export declare function pendingBatch(connection: Connection, locator: string, id: string): string | null;
|
|
67
|
+
export declare function roomDraftRecords(connection: Connection, locator: string | null, paths: readonly string[] | null): string[];
|
|
68
|
+
export declare function chatDraftRecord(connection: Connection, conversation: string): string | null;
|
|
69
|
+
export declare function chatDraftRecords(connection: Connection): string[];
|
|
70
|
+
export declare function chatDraftConversations(connection: Connection, conversations: readonly string[] | null): string[];
|
|
71
|
+
export declare function chatDraftsDropped(connection: Connection, conversations: readonly string[]): void;
|
|
72
|
+
export declare function callRecords(connection: Connection): string[];
|
|
73
|
+
export declare function fences(connection: Connection): string[];
|
|
74
|
+
export declare function kept(connection: Connection, { writes, files, whole }: AuthoredWrite): Promise<string | null>;
|
|
75
|
+
export declare function amended(connection: Connection, locator: string, id: string, amendment: string): null;
|
|
76
|
+
export declare function roomDraft(connection: Connection, locator: string, path: string, draft: KeptRecord | null, files: readonly StoredFile[]): Promise<string | null>;
|
|
77
|
+
export declare function chatDraft(connection: Connection, drafts: readonly {
|
|
78
|
+
readonly conversation: string;
|
|
79
|
+
readonly record: string;
|
|
80
|
+
}[], dropped: readonly string[]): null;
|
|
81
|
+
export declare function call(connection: Connection, operation: string, held: KeptRecord | null, files: readonly StoredFile[]): Promise<null>;
|
|
82
|
+
export declare function fencedWork(connection: Connection, locators: readonly string[]): void;
|
|
83
|
+
export declare function unfenced(connection: Connection, locators: readonly string[]): void;
|
|
84
|
+
export declare function claim(connection: Connection, holder: string): boolean;
|
|
85
|
+
export declare function authoredEmptied(connection: Connection): void;
|
|
86
|
+
export declare function unsent(connection: Connection): UnsentWork[];
|
|
87
|
+
export {};
|
|
@@ -4,7 +4,7 @@ import type { AppRoom } from './listing.js';
|
|
|
4
4
|
import type { ConnectionRefusal } from './socket.js';
|
|
5
5
|
import type { RoomSchemas } from './surface.js';
|
|
6
6
|
import type { SavedParts, SavedRoomDraft, SaveResult } from './saves.js';
|
|
7
|
-
import type { ListedAgent, Member, ServiceMode } from './adapter.js';
|
|
7
|
+
import type { ListedAgent, Member, RoomList, ServiceMode } from './adapter.js';
|
|
8
8
|
import type { UnsentWork } from './durability.js';
|
|
9
9
|
import type { ChatDraftSurface, ConversationAgent, ConversationEntry, ConversationOptions, ConversationSurface, ConversationView } from './conversation.js';
|
|
10
10
|
import { type Observation } from './observation.js';
|
|
@@ -80,6 +80,7 @@ export type MdRuntimeClient = {
|
|
|
80
80
|
(topic: 'conversations'): Promise<Observation<readonly ConversationEntry[]>>;
|
|
81
81
|
(topic: 'agents'): Promise<Observation<readonly ConversationAgent[]>>;
|
|
82
82
|
(topic: 'listed-agents'): Promise<Observation<readonly ListedAgent[]>>;
|
|
83
|
+
(topic: 'room-list'): Promise<Observation<RoomList | null>>;
|
|
83
84
|
(topic: 'figures'): Promise<Observation<FiguresResult>>;
|
|
84
85
|
(topic: 'holdings'): Promise<Observation<Holdings>>;
|
|
85
86
|
(topic: 'read', name: string, input: unknown): Promise<Observation<ObservedRead>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HeldRow } from './messages.js';
|
|
2
|
-
import { type HouseSource } from './source.js';
|
|
2
|
+
import { type HouseSource, type RequestAnswer } from './source.js';
|
|
3
3
|
export type ConversationLast = {
|
|
4
4
|
readonly text: string;
|
|
5
5
|
readonly by: 'owner' | 'agent' | 'house';
|
|
@@ -10,12 +10,17 @@ export type ConversationStart = Extract<HouseSource, {
|
|
|
10
10
|
}>;
|
|
11
11
|
export type ConversationAsk = {
|
|
12
12
|
readonly who: string;
|
|
13
|
+
readonly fromRoom: boolean;
|
|
13
14
|
readonly agent: string | null;
|
|
14
15
|
readonly room: {
|
|
15
16
|
readonly ref: string;
|
|
17
|
+
readonly handle: string;
|
|
16
18
|
readonly name: string;
|
|
17
19
|
};
|
|
18
20
|
readonly prompt: string;
|
|
21
|
+
readonly agentFunction: string | null;
|
|
22
|
+
readonly answer: RequestAnswer | null;
|
|
23
|
+
readonly instruction: string | null;
|
|
19
24
|
readonly at: string;
|
|
20
25
|
readonly request: string;
|
|
21
26
|
readonly message?: string;
|
|
@@ -15,7 +15,7 @@ export type ObservedRead = {
|
|
|
15
15
|
};
|
|
16
16
|
export type ReadAnswers = {
|
|
17
17
|
watch(name: string, input: unknown, deliver: (read: ObservedRead) => void): () => void;
|
|
18
|
-
again(): void;
|
|
18
|
+
again(led?: Promise<unknown>): void;
|
|
19
19
|
reopened(): void;
|
|
20
20
|
};
|
|
21
21
|
export type ReadAnswersOptions = {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type RequestAnswer = 'at_once' | 'ask_me' | 'off';
|
|
1
2
|
export type HouseSource = {
|
|
2
3
|
readonly kind: 'request';
|
|
3
4
|
readonly request: string;
|
|
@@ -8,8 +9,12 @@ export type HouseSource = {
|
|
|
8
9
|
};
|
|
9
10
|
readonly room: {
|
|
10
11
|
readonly ref: string;
|
|
12
|
+
readonly handle: string;
|
|
11
13
|
readonly name: string;
|
|
12
14
|
};
|
|
15
|
+
readonly sent: string;
|
|
16
|
+
readonly instruction: string | null;
|
|
17
|
+
readonly answer: RequestAnswer | null;
|
|
13
18
|
readonly approved: string | null;
|
|
14
19
|
} | {
|
|
15
20
|
readonly kind: 'mail';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BootstrapInventory, Capability, ListedAgent, ListedConversation, Member, ProviderLimit } from '../adapter.js';
|
|
1
|
+
import type { BootstrapInventory, Capability, ListedAgent, ListedConversation, Member, ProviderLimit, RoomList } from '../adapter.js';
|
|
2
2
|
import type { ChangeBatch } from '../change.js';
|
|
3
3
|
import { type Composition } from '../collection.js';
|
|
4
4
|
import type { Plan } from '../query.js';
|
|
@@ -128,6 +128,7 @@ export type Facts = {
|
|
|
128
128
|
readonly agentList: readonly ListedAgent[] | null;
|
|
129
129
|
readonly conversationCursor: string | null;
|
|
130
130
|
readonly chatPins: readonly string[];
|
|
131
|
+
readonly roomList: RoomList | null;
|
|
131
132
|
};
|
|
132
133
|
export type Commit = {
|
|
133
134
|
readonly rooms: readonly RoomCommit[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DocumentQuery, GroupQuery } from '../mdmodel/index.js';
|
|
2
2
|
import { type HistoryQuery } from './actions.js';
|
|
3
|
-
import type { ListedAgent, Member, ServiceMode } from './adapter.js';
|
|
3
|
+
import type { ListedAgent, Member, RoomList, ServiceMode } from './adapter.js';
|
|
4
4
|
import type { WrittenBy } from './change.js';
|
|
5
5
|
import { type ChatDraftSurface, type ConversationEntry, type ConversationAgent, type ConversationOptions, type ConversationSurface, type ConversationView } from './conversation.js';
|
|
6
6
|
import type { UnsentWork } from './durability.js';
|
|
@@ -72,13 +72,14 @@ export type MdRuntime = {
|
|
|
72
72
|
(topic: 'conversations'): Promise<Observation<readonly ConversationEntry[]>>;
|
|
73
73
|
(topic: 'agents'): Promise<Observation<readonly ConversationAgent[]>>;
|
|
74
74
|
(topic: 'listed-agents'): Promise<Observation<readonly ListedAgent[]>>;
|
|
75
|
+
(topic: 'room-list'): Promise<Observation<RoomList | null>>;
|
|
75
76
|
(topic: 'figures'): Promise<Observation<FiguresResult>>;
|
|
76
77
|
(topic: 'holdings'): Promise<Observation<Holdings>>;
|
|
77
78
|
(topic: 'read', name: string, input: unknown): Promise<Observation<ObservedRead>>;
|
|
78
79
|
};
|
|
79
80
|
reauthorize(): Promise<void>;
|
|
80
81
|
};
|
|
81
|
-
export type RuntimeTopic = 'rooms' | 'readiness' | 'connection-refusal' | 'storage-loss' | 'sync-status' | 'service-mode' | 'member' | 'authority-changes' | 'query' | 'queue' | 'room-drafts' | 'presentation' | 'conversation' | 'conversations' | 'agents' | 'listed-agents' | 'figures' | 'holdings' | 'read';
|
|
82
|
+
export type RuntimeTopic = 'rooms' | 'readiness' | 'connection-refusal' | 'storage-loss' | 'sync-status' | 'service-mode' | 'member' | 'authority-changes' | 'query' | 'queue' | 'room-drafts' | 'presentation' | 'conversation' | 'conversations' | 'agents' | 'listed-agents' | 'room-list' | 'figures' | 'holdings' | 'read';
|
|
82
83
|
export type ComposedRuntime = RuntimeView & {
|
|
83
84
|
seed(entry: EntrySeed): void;
|
|
84
85
|
stop(): Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type QueryAnswer, type QueryRoom } from './compile.js';
|
|
2
2
|
import type { Composed } from './collection.js';
|
|
3
|
+
import { type AuthoredFact, type AuthoredWrite, type HeldQueues, type KeptRecord, type StoredFile } from './authored.js';
|
|
3
4
|
import type { UnsentWork } from './durability.js';
|
|
4
5
|
import { type ConversationWrite, type HeldConversation, type HeldFact, type HeldRow, type MessageWindow } from './messages.js';
|
|
5
6
|
import type { GroupTotal, Plan } from './query.js';
|
|
@@ -7,6 +8,7 @@ import { type ReadAt } from './reads.js';
|
|
|
7
8
|
import { type ConversationTally, type RoomTally } from './tallies.js';
|
|
8
9
|
import { type Committed, type CoverLog, type Covering, type HeldEntry, type HeldLocators, type HeldRoomRow, type HeldRoomWork, type ReplicaOpened, type Referrer, type Resumed, type RoomCommit, type StoredEntry, type TypedEntry, type View } from './stored.js';
|
|
9
10
|
export type { Committed, CoverLog, Covering, HeldEntry, HeldLocators, HeldRoomRow, HeldRoomWork, OverlayEntry, ReplicaOpened, Referrer, Resumed, RoomCommit, StoredEntry, TypedEntry, View, } from './stored.js';
|
|
11
|
+
export { authoredEmptied, authoredTable, FILE_PART_BYTES, formatted, heldTables, type AuthoredFact, type AuthoredRows, type KeptRecord, type StoredFile, } from './authored.js';
|
|
10
12
|
export type { QueryAnswer, QueryRoom } from './compile.js';
|
|
11
13
|
export type { ConversationFact, ConversationWrite, HeldConversation, HeldFact, HeldRow, MessageWindow, } from './messages.js';
|
|
12
14
|
export type { ConversationTally, RoomTally } from './tallies.js';
|
|
@@ -50,53 +52,13 @@ export interface SqliteDatabase {
|
|
|
50
52
|
prepare(sql: string): SqliteStatement;
|
|
51
53
|
}
|
|
52
54
|
export declare function sqliteConnection(engine: SqliteEngine, database: SqliteDatabase): Connection;
|
|
53
|
-
export declare const FILE_PART_BYTES = 1048576;
|
|
54
55
|
export declare const RUNTIME_TABLES: readonly string[];
|
|
55
|
-
export type AuthoredFact = 'holder' | 'generation';
|
|
56
|
-
export type StoredFile = {
|
|
57
|
-
readonly key: string;
|
|
58
|
-
readonly blob: Blob;
|
|
59
|
-
};
|
|
60
56
|
export interface FileSpool {
|
|
61
57
|
held(): Iterable<string>;
|
|
62
58
|
spool(key: string, type: string, parts: Iterable<Uint8Array>): Promise<Blob>;
|
|
63
59
|
drop(key: string): Promise<void>;
|
|
64
60
|
probe(bytes: number): Promise<void>;
|
|
65
61
|
}
|
|
66
|
-
export type KeptPending = {
|
|
67
|
-
readonly id: string;
|
|
68
|
-
readonly batch: string;
|
|
69
|
-
readonly state: string;
|
|
70
|
-
readonly files: readonly string[];
|
|
71
|
-
readonly paths: readonly string[];
|
|
72
|
-
readonly moving: boolean;
|
|
73
|
-
};
|
|
74
|
-
export type KeptRecord = {
|
|
75
|
-
readonly record: string;
|
|
76
|
-
readonly files: readonly string[];
|
|
77
|
-
};
|
|
78
|
-
export type AuthoredRows = {
|
|
79
|
-
readonly locator: string;
|
|
80
|
-
readonly order?: readonly string[];
|
|
81
|
-
readonly added?: readonly KeptPending[];
|
|
82
|
-
readonly founded?: readonly Omit<KeptPending, 'state'>[];
|
|
83
|
-
readonly roomDrafts?: readonly (KeptRecord & {
|
|
84
|
-
readonly path: string;
|
|
85
|
-
})[];
|
|
86
|
-
readonly consumedRoomDrafts?: readonly string[];
|
|
87
|
-
};
|
|
88
|
-
export type HeldQueues = {
|
|
89
|
-
readonly queues: readonly {
|
|
90
|
-
readonly locator: string;
|
|
91
|
-
readonly ids: readonly string[];
|
|
92
|
-
}[];
|
|
93
|
-
readonly pending: readonly {
|
|
94
|
-
readonly locator: string;
|
|
95
|
-
readonly id: string;
|
|
96
|
-
readonly batch: string;
|
|
97
|
-
readonly state: string;
|
|
98
|
-
}[];
|
|
99
|
-
};
|
|
100
62
|
export type HeldStatus = {
|
|
101
63
|
readonly queued: readonly string[];
|
|
102
64
|
readonly lastCompleted: string | null;
|
|
@@ -130,11 +92,6 @@ type Nothing = Readonly<Record<never, never>>;
|
|
|
130
92
|
export type CommittedWrite = Committed & {
|
|
131
93
|
readonly fenced: string | null;
|
|
132
94
|
};
|
|
133
|
-
export type AuthoredWrite = {
|
|
134
|
-
readonly writes: readonly AuthoredRows[];
|
|
135
|
-
readonly files: readonly StoredFile[];
|
|
136
|
-
readonly whole: boolean;
|
|
137
|
-
};
|
|
138
95
|
export interface RuntimeRequests {
|
|
139
96
|
readonly 'authored.status': Asked<Nothing, HeldStatus>;
|
|
140
97
|
readonly 'authored.moving': Asked<Nothing, HeldQueues>;
|
package/dist/mdruntime/wire.d.ts
CHANGED
|
@@ -233,6 +233,7 @@ declare const TOPICS: {
|
|
|
233
233
|
readonly conversations: 'within';
|
|
234
234
|
readonly agents: 'within';
|
|
235
235
|
readonly 'listed-agents': 'whole';
|
|
236
|
+
readonly 'room-list': 'whole';
|
|
236
237
|
readonly figures: 'whole';
|
|
237
238
|
readonly holdings: 'whole';
|
|
238
239
|
readonly read: 'whole';
|
package/docs/families.md
CHANGED
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
returns there when it completes. An App names an address House gave it in a
|
|
15
15
|
reading and composes one only for `/bind/<app_ref>`, where the User binds
|
|
16
16
|
its Rooms, with `?slot=<name>` to open at one slot, and `/sign-out`, which
|
|
17
|
-
signs the User out and opens sign-in.
|
|
17
|
+
signs the User out and opens sign-in. A decision House asks over the App, a
|
|
18
|
+
prepared act's approval at `/approve/<ref>` and a secret or a CLI's sign-in
|
|
19
|
+
at `/secret-input/<id>`, stays in the App: the shell draws House's page as
|
|
20
|
+
its own dialog over the App, which the App cannot reach, and `ceremony()`
|
|
21
|
+
resolves once it closes, with `said`, what the page said it ended with, or
|
|
22
|
+
`null` when it closed with nothing said, and `done`, whether the decision was
|
|
23
|
+
carried out.
|
|
18
24
|
- **Installation** - `install()` offers the page as a Home-screen app. Where the
|
|
19
25
|
browser has an install prompt ready the shell shows it and the call resolves
|
|
20
26
|
`'accepted'` or `'dismissed'` with the User's choice, spending that prompt;
|
|
@@ -56,8 +62,8 @@
|
|
|
56
62
|
`onAddress(listener)` hand a listener the status and the address the bridge
|
|
57
63
|
already holds, then each change.
|
|
58
64
|
The App reports the visitor's choice with `analyticsConsent('accept')` or
|
|
59
|
-
`analyticsConsent('decline')`;
|
|
60
|
-
the choice never reaches House.
|
|
65
|
+
`analyticsConsent('decline')`; a Site's shell that measures hands it to House's
|
|
66
|
+
analytics loader, every other shell drops it, and the choice never reaches House.
|
|
61
67
|
- **Releases and builds** - an open App keeps the release it loaded: a newer
|
|
62
68
|
release, or a newer House build, takes effect at the App's next load, offline
|
|
63
69
|
too once the browser stored it. When one tab loads a newer House build, the
|
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-cbe35d3d6ed3f",
|
|
4
4
|
"description": "Types of the agents.house App bridge House hands every App: navigation, the tab title and icon, ceremonies, installation, notifications, status, App release code, App and Site screenshot reads, App messages and the Chat, with an accessor and an in-page test host.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|