@agentshouse/app-bridge 0.1.0-cedebf3bb1f58 → 0.1.0-cee55bd82a088

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 CHANGED
@@ -1,6 +1,7 @@
1
1
  export interface HouseCalls {
2
2
  readonly 'access.read': {
3
3
  readonly room_ref: string;
4
+ readonly statistics?: boolean;
4
5
  };
5
6
  readonly 'conversation.answer': {
6
7
  readonly answer: {
package/dist/index.d.ts CHANGED
@@ -72,6 +72,7 @@ export interface HouseExternalRequest {
72
72
  readonly body_base64?: string;
73
73
  readonly account?: string;
74
74
  readonly slot?: string;
75
+ readonly room_ref?: string;
75
76
  }
76
77
  export type HouseExternalAnswer = {
77
78
  readonly status: number;
@@ -120,7 +120,6 @@ export type ItemFacts = {
120
120
  readonly source: string | null;
121
121
  readonly address: string | null;
122
122
  readonly has_attachment: boolean;
123
- readonly provider: string | null;
124
123
  readonly container: string | null;
125
124
  readonly author: string | null;
126
125
  readonly headers: Readonly<Record<string, string>>;
@@ -29,12 +29,26 @@ export type Shape = {
29
29
  readonly schema: Readonly<Record<string, unknown>>;
30
30
  readonly defs: Readonly<Record<string, unknown>>;
31
31
  };
32
+ export type RuleValue = string | number | boolean | null;
33
+ export type Transition = {
34
+ readonly from: RuleValue;
35
+ readonly to: RuleValue;
36
+ readonly roles?: readonly string[];
37
+ };
38
+ export type FieldRules = {
39
+ readonly changeRoles?: readonly string[];
40
+ readonly initialRoles?: readonly string[];
41
+ readonly transitions?: readonly Transition[];
42
+ };
32
43
  export type Definition = {
33
44
  readonly name: string;
34
45
  readonly memberDocument: boolean;
35
46
  readonly frontmatter: ValueFacts;
36
47
  readonly fields: Readonly<Record<string, ValueFacts>>;
37
48
  readonly sections: Readonly<Record<string, SectionSpec>>;
49
+ readonly rules: Readonly<Record<string, FieldRules>>;
50
+ readonly createRoles?: readonly string[];
51
+ readonly deleteRoles?: readonly string[];
38
52
  readonly shape: Shape;
39
53
  };
40
54
  export type Failure = {
@@ -10,7 +10,7 @@ export { MARKDOWN_SYNTAX_PROFILE } from './profile.js';
10
10
  export { project } from './project.js';
11
11
  export { references } from './references.js';
12
12
  export { ARRAY_INDEX, ATTACHMENT, crossedFacts, escapePointer, itemFacts, memberFacts, pointerFacts, pointerSegments, } from './definition.js';
13
- export type { Definition, JsonType, PatternFacts, PointerFacts, SectionSpec, Shape, ValueFacts, } from './definition.js';
13
+ export type { Definition, FieldRules, JsonType, PatternFacts, PointerFacts, RuleValue, SectionSpec, Shape, Transition, ValueFacts, } from './definition.js';
14
14
  export type { ApplyResult, BodyResult, Change, Division, DivisionContext, Document, DocumentCheck, Frontmatter, FrontmatterResult, Library, ModelVerification, Link, LinkOccurrence, ParseResult, Projection, ProjectionContext, Reached, Reference, Refusal, Span, Validation, ValidationContext, VerifiedModel, } from './types.js';
15
15
  export { checkDocument, resolves, sectionReferences, validate, verify } from './validate.js';
16
16
  export { VERSION } from './version.js';
@@ -210,6 +210,10 @@ export type Discovery = {
210
210
  providerLimits: readonly ProviderLimit[];
211
211
  retention: Retention;
212
212
  member?: Member;
213
+ covered?: readonly string[];
214
+ };
215
+ export type DiscoveryScope = {
216
+ readonly authorities: readonly string[];
213
217
  };
214
218
  export type TransportUncertainty = {
215
219
  kind: 'transport-uncertainty';
@@ -400,6 +404,13 @@ export type BinaryResult = {
400
404
  } | (ProviderRefusal & {
401
405
  kind: 'rejected';
402
406
  }) | AdapterFailure;
407
+ export type BinaryLinkResult = {
408
+ kind: 'link';
409
+ url: string;
410
+ name: string;
411
+ } | (ProviderRefusal & {
412
+ kind: 'rejected';
413
+ }) | AdapterFailure;
403
414
  export type ActionRequest = {
404
415
  name: string;
405
416
  input: unknown;
@@ -430,6 +441,9 @@ export type RoomStreamEvent = {
430
441
  } | {
431
442
  kind: 'opening';
432
443
  expired: readonly string[];
444
+ } | {
445
+ kind: 'authority-changed';
446
+ scope?: DiscoveryScope;
433
447
  } | {
434
448
  kind: 'room-version';
435
449
  locator: string;
@@ -462,12 +476,15 @@ export type Adapter = {
462
476
  readonly localSaves?: true;
463
477
  readonly exhaustiveDiscovery?: true;
464
478
  authorize(): Promise<Authorization>;
465
- discover(authorization: Authorization): Promise<DiscoverResult>;
479
+ discover(authorization: Authorization, scope?: DiscoveryScope): Promise<DiscoverResult>;
466
480
  bootstrap(authorization: Authorization, request: BootstrapRequest): Promise<BootstrapResult>;
467
481
  refresh(authorization: Authorization, request: RefreshRequest): Promise<RefreshResult>;
468
482
  mutate(authorization: Authorization, request: MutationRequest, keep: (upload: unknown) => Promise<void>): Promise<MutationResult>;
469
483
  history(authorization: Authorization, request: HistoryRequest): Promise<HistoryResult>;
470
484
  binary(authorization: Authorization, request: BinaryRequest): Promise<BinaryResult>;
485
+ link(authorization: Authorization, request: Extract<BinaryRequest, {
486
+ kind: 'path';
487
+ }>): Promise<BinaryLinkResult>;
471
488
  referrerScope(referrer: unknown): ReferrerScope | null;
472
489
  action(authorization: Authorization, request: ActionRequest): Promise<ActionResult>;
473
490
  reached(locator: string, roomVersion: string, target: string): boolean;
@@ -1,9 +1,9 @@
1
- import type { AppRoom, ConnectionRefusal, HistoryQuery, RoomSchemas, SavedRoomDraft, SaveResult } from './connection.js';
1
+ import type { AppRoom, ConnectionRefusal, HistoryQuery, RoomSchemas, SavedParts, SavedRoomDraft, SaveResult } from './connection.js';
2
2
  import type { Member, ServiceMode } from './adapter.js';
3
3
  import type { ChatDraft, ConversationAgent, ConversationEntry, ConversationOptions, ConversationView } from './conversation.js';
4
4
  import { type Observation } from './observation.js';
5
5
  import type { BinaryReference } from './binary.js';
6
- import type { BinaryAnswer, CallResult, HistoryAnswer, Offline, QueueEntry } from './outcome.js';
6
+ import type { BinaryAnswer, BinaryLinkAnswer, CallResult, HistoryAnswer, Offline, QueueEntry } from './outcome.js';
7
7
  import type { DocumentQuery, DocumentResult, GroupQuery, GroupResult, PendingResult } from './query.js';
8
8
  import type { RoomDraft, RoomDraftParts, RoomDraftWrite } from './room-draft.js';
9
9
  import type { SearchRequest, SearchResult } from './search.js';
@@ -25,9 +25,11 @@ export type MdRuntimeClient = {
25
25
  discard(room: string, path: string, revision: string): Promise<RoomDraftWrite>;
26
26
  };
27
27
  save(room: string, roomDrafts: readonly SavedRoomDraft[]): Promise<SaveResult>;
28
+ saveParts(room: string, parts: readonly SavedParts[]): Promise<SaveResult>;
28
29
  presentation: {
29
30
  read(): Promise<unknown>;
30
31
  write(value: unknown): Promise<void>;
32
+ edit(members: Readonly<Record<string, unknown>>): Promise<void>;
31
33
  };
32
34
  conversation: {
33
35
  list(): Promise<readonly ConversationEntry[]>;
@@ -42,11 +44,13 @@ export type MdRuntimeClient = {
42
44
  };
43
45
  chatDraft: {
44
46
  write(conversation: string, draft: ChatDraft, revision?: string): Promise<void>;
47
+ prepend(conversation: string, draft: ChatDraft): Promise<void>;
45
48
  discard(conversation: string): Promise<void>;
46
49
  };
47
50
  history(locator: string, path: string, query?: HistoryQuery): Promise<HistoryAnswer>;
48
51
  binaryFile: {
49
52
  read(room: string, path: string, revision?: string): Promise<BinaryAnswer>;
53
+ link(room: string, path: string, revision?: string): Promise<BinaryLinkAnswer>;
50
54
  readReference(reference: BinaryReference): Promise<BinaryAnswer>;
51
55
  };
52
56
  call(name: string, input: unknown): Promise<CallResult>;
@@ -8,10 +8,10 @@ import { type ChatDraftSurface, type ConversationAgent, type ConversationEntry,
8
8
  import { type WrittenBy } from './change.js';
9
9
  import type { Open } from './open.js';
10
10
  import { type BinaryReference } from './binary.js';
11
- import { type BinaryAnswer, type CallResult, type HistoryAnswer, type QueueEntry } from './outcome.js';
11
+ import { type BinaryAnswer, type BinaryLinkAnswer, type CallResult, type HistoryAnswer, type QueueEntry } from './outcome.js';
12
12
  import { type Recovery } from './recovery.js';
13
13
  import { type SaveRefusal } from './save.js';
14
- import { type RoomDraft, type RoomDraftWrite } from './room-draft.js';
14
+ import { type RoomDraft, type RoomDraftParts, type RoomDraftWrite } from './room-draft.js';
15
15
  import { type SyncStatus } from './status.js';
16
16
  import { type RuntimeShell } from './durability.js';
17
17
  import { type RuntimeDemand } from './acquisition.js';
@@ -64,6 +64,10 @@ export type SavedRoomDraft = {
64
64
  readonly path: string;
65
65
  readonly revision: string;
66
66
  };
67
+ export type SavedParts = {
68
+ readonly path: string;
69
+ readonly parts: RoomDraftParts;
70
+ };
67
71
  export type RoomDraftSurface = {
68
72
  list(): Promise<readonly RoomDraft[]>;
69
73
  read(room: string, path: string): RoomDraft | null;
@@ -73,9 +77,11 @@ export type RoomDraftSurface = {
73
77
  export type PresentationSurface = {
74
78
  read(app: string): Promise<unknown>;
75
79
  write(app: string, value: unknown): Promise<void>;
80
+ edit(app: string, members: Readonly<Record<string, unknown>>): Promise<void>;
76
81
  };
77
82
  export type BinaryFileSurface = {
78
83
  read(room: string, path: string, revision?: string): Promise<BinaryAnswer>;
84
+ link(room: string, path: string, revision?: string): Promise<BinaryLinkAnswer>;
79
85
  readReference(reference: BinaryReference): Promise<BinaryAnswer>;
80
86
  };
81
87
  export type HistoryQuery = {
@@ -96,6 +102,7 @@ export type MdRuntime = {
96
102
  chatDraft: ChatDraftSurface;
97
103
  presentation: PresentationSurface;
98
104
  save(room: string, roomDrafts: readonly SavedRoomDraft[], writtenBy?: WrittenBy): Promise<SaveResult>;
105
+ saveParts(room: string, parts: readonly SavedParts[], writtenBy?: WrittenBy): Promise<SaveResult>;
99
106
  history(locator: string, path: string, query?: HistoryQuery): Promise<HistoryAnswer>;
100
107
  binaryFile: BinaryFileSurface;
101
108
  call(name: string, input: unknown): Promise<CallResult>;
@@ -36,10 +36,14 @@ export type ChatDraft = {
36
36
  };
37
37
  export type ConversationOptions = {
38
38
  limit?: number;
39
+ after?: string;
40
+ total?: true;
39
41
  };
40
42
  export type ConversationView = {
41
43
  conversation: string;
42
44
  messages: readonly ConversationMessage[];
45
+ next?: string;
46
+ total?: number;
43
47
  turn: RunningTurn | null;
44
48
  questions: readonly unknown[];
45
49
  process: {
@@ -64,6 +68,7 @@ export type ConversationSurface = {
64
68
  };
65
69
  export type ChatDraftSurface = {
66
70
  write(conversation: string, draft: ChatDraft, revision?: string): Promise<void>;
71
+ prepend(conversation: string, draft: ChatDraft): Promise<void>;
67
72
  discard(conversation: string): Promise<void>;
68
73
  };
69
74
  export type ConversationDependencies = {
@@ -14,6 +14,8 @@ export type QueryChange = {
14
14
  removed: readonly RowKey[];
15
15
  order: readonly RowKey[] | null;
16
16
  coverage?: QueryCoverage;
17
+ next?: string | null;
18
+ total?: number;
17
19
  };
18
20
  export type QueryMessage = KeyedResult | QueryChange;
19
21
  export type Observed = {
@@ -1,4 +1,4 @@
1
- import type { ActionResult, AdapterFailure, BinaryResult, HistoryResult, ProviderRefusal, RoomVersionAt, ScopedRefusal } from './adapter.js';
1
+ import type { ActionResult, AdapterFailure, BinaryLinkResult, BinaryResult, HistoryResult, ProviderRefusal, RoomVersionAt, ScopedRefusal } from './adapter.js';
2
2
  import type { ChangeBatch } from './change.js';
3
3
  type Refused<Kind extends string> = ProviderRefusal & {
4
4
  kind: Kind;
@@ -18,8 +18,14 @@ export type BinaryAnswer = {
18
18
  kind: 'binary';
19
19
  blob: Blob;
20
20
  } | Refused<'rejected'> | Refused<'absent'> | Failure;
21
- export declare function absentBinary(path: string): BinaryAnswer;
21
+ export type BinaryLinkAnswer = {
22
+ kind: 'link';
23
+ url: string;
24
+ name: string;
25
+ } | Refused<'rejected'> | Refused<'absent'> | Failure;
26
+ export declare function absentBinary(path: string): Refused<'absent'>;
22
27
  export declare function binaryAnswer(result: BinaryResult): BinaryAnswer;
28
+ export declare function binaryLinkAnswer(result: BinaryLinkResult): BinaryLinkAnswer;
23
29
  export type Offline = {
24
30
  readonly kind: 'offline';
25
31
  };
@@ -38,6 +38,8 @@ export type Filter = {
38
38
  types?: readonly string[];
39
39
  where?: Where;
40
40
  pathPrefix?: string;
41
+ folder?: string;
42
+ paths?: readonly string[];
41
43
  hop?: Related & {
42
44
  field: string;
43
45
  };
@@ -45,7 +47,7 @@ export type Filter = {
45
47
  field?: string;
46
48
  };
47
49
  };
48
- export type Key = 'room' | 'path' | 'type' | {
50
+ export type Key = 'room' | 'path' | 'type' | 'folder' | {
49
51
  field: string;
50
52
  };
51
53
  export type Select = 'all' | {
@@ -71,6 +73,8 @@ export type DocumentQuery = Filter & {
71
73
  direction?: Direction;
72
74
  } & OrderOptions)[];
73
75
  limit?: number;
76
+ after?: string;
77
+ total?: true;
74
78
  };
75
79
  export type GroupQuery = Filter & {
76
80
  groupBy: readonly Exclude<Key, 'path'>[];
@@ -79,6 +83,8 @@ export type GroupQuery = Filter & {
79
83
  direction?: Direction;
80
84
  }[];
81
85
  limit?: number;
86
+ after?: string;
87
+ total?: true;
82
88
  };
83
89
  export type LocalQuery = DocumentQuery | GroupQuery;
84
90
  export type Backlink = {
@@ -123,9 +129,13 @@ export type PendingResult = {
123
129
  };
124
130
  export type DocumentRows = {
125
131
  documents: readonly QueryDocument[];
132
+ next?: string;
133
+ total?: number;
126
134
  };
127
135
  export type GroupRows = {
128
136
  groups: readonly QueryGroup[];
137
+ next?: string;
138
+ total?: number;
129
139
  };
130
140
  export type QueryRows = DocumentRows | GroupRows;
131
141
  export type DocumentResult = DocumentRows & {
@@ -189,6 +199,8 @@ export type KeyPlan = {
189
199
  of: 'path';
190
200
  } | {
191
201
  of: 'type';
202
+ } | {
203
+ of: 'folder';
192
204
  } | {
193
205
  of: 'field';
194
206
  field: string;
@@ -221,11 +233,17 @@ export type PlanReach = {
221
233
  rooms: readonly string[];
222
234
  documents: readonly string[];
223
235
  };
236
+ export type Continuation = {
237
+ text: string;
238
+ values: readonly unknown[] | null;
239
+ };
224
240
  export type Plan = {
225
241
  key: string;
226
242
  rooms: readonly string[] | null;
227
243
  reach: PlanReach | null;
228
244
  root: Scope;
245
+ folder: string | null;
246
+ paths: readonly string[] | null;
229
247
  hop: (Scope & {
230
248
  field: string;
231
249
  }) | null;
@@ -234,6 +252,8 @@ export type Plan = {
234
252
  }) | null;
235
253
  shape: DocumentShape | GroupShape;
236
254
  limit: number | null;
255
+ after: Continuation | null;
256
+ total: boolean;
237
257
  };
238
258
  export declare class QueryError extends Error {
239
259
  readonly code: QueryErrorCode;
@@ -41,5 +41,9 @@ type Accepted = Extract<MutationResult, {
41
41
  export declare function applyReturned(confirmed: ConfirmedLayer, submitted: ChangeBatch, accepted: Accepted, roomVersion: string, writtenAt: string): Staged;
42
42
  export declare function replicaOf(confirmed: ConfirmedLayer, queue: readonly ChangeBatch[], previous?: Replica): Replica;
43
43
  export declare function landed(batch: ChangeBatch, confirmed: ConfirmedLayer, current?: Readonly<Record<string, string>>): boolean;
44
- export declare function withdrawals(confirmed: ConfirmedLayer, queue: readonly ChangeBatch[], withdrawable: (batch: ChangeBatch) => boolean, local: boolean): readonly ChangeBatch[];
44
+ export type Standing = {
45
+ readonly withdrawn: readonly ChangeBatch[];
46
+ readonly kept: readonly ChangeBatch[];
47
+ };
48
+ export declare function standing(confirmed: ConfirmedLayer, queue: readonly ChangeBatch[], withdrawable: (batch: ChangeBatch) => boolean, local: boolean): Standing;
45
49
  export {};
@@ -13,6 +13,7 @@ export type DocumentRow = {
13
13
  values: Fields;
14
14
  reached: Readonly<Record<string, readonly unknown[]>>;
15
15
  directories: readonly string[];
16
+ folder: string;
16
17
  text: string | null;
17
18
  change: HeadChange | null;
18
19
  fileId: string | null;
@@ -38,6 +38,7 @@ export type BatchResult = {
38
38
  refusal: SaveRefusal;
39
39
  };
40
40
  export declare function providerRewritten(batch: ChangeBatch, visible: VisibleLayer): ChangeBatch;
41
+ export declare function queuedDocuments(queue: readonly ChangeBatch[]): ReadonlySet<string>;
41
42
  export type Requeued = {
42
43
  kind: 'requeued';
43
44
  queue: readonly ChangeBatch[];
@@ -9,6 +9,8 @@ export type SearchRequest = {
9
9
  collection?: true;
10
10
  conversations?: readonly string[];
11
11
  limit?: number;
12
+ after?: string;
13
+ total?: true;
12
14
  };
13
15
  export type DocumentHit = {
14
16
  room: string;
@@ -37,6 +39,13 @@ export type SearchHits = {
37
39
  documents: readonly DocumentHit[];
38
40
  messages: readonly MessageHit[];
39
41
  };
42
+ export type SearchWindow = SearchHits & {
43
+ next?: string;
44
+ total?: {
45
+ documents: number;
46
+ messages: number;
47
+ };
48
+ };
40
49
  export type SearchPending = SearchHits & {
41
50
  pending: readonly (PendingRoom | PendingConversation)[];
42
51
  coverage: SearchCoverage;
@@ -44,7 +53,7 @@ export type SearchPending = SearchHits & {
44
53
  export type SearchUndeclared = ProviderRefusal & {
45
54
  kind: 'undeclared';
46
55
  };
47
- export type SearchResult = (SearchHits & {
56
+ export type SearchResult = (SearchWindow & {
48
57
  coverage: SearchCoverage;
49
58
  }) | SearchPending | SearchUndeclared;
50
59
  export declare function undeclaredSearch(): SearchUndeclared;
@@ -65,12 +74,15 @@ export type SearchSource = {
65
74
  room(room: string): readonly string[];
66
75
  document(room: string, path: string): SearchedDocument | null;
67
76
  };
77
+ type HitCursor = readonly [number, string, string] | readonly [] | null;
68
78
  export type SearchPlan = {
69
79
  text: string;
70
80
  documents: unknown;
71
81
  collection: boolean;
72
82
  conversations: readonly string[] | null;
73
83
  limit: number | null;
84
+ after: readonly [HitCursor, HitCursor] | null;
85
+ total: boolean;
74
86
  };
75
87
  export type SearchIndex = {
76
88
  generation(): string;
@@ -85,7 +97,8 @@ export type SearchIndex = {
85
97
  search(plan: SearchPlan, documents: readonly {
86
98
  room: string;
87
99
  path: string;
88
- }[] | null, conversations: readonly string[], rooms: ReadonlySet<string> | null, selections: ReadonlyMap<string, readonly string[]> | null): SearchHits;
100
+ }[] | null, conversations: readonly string[], rooms: ReadonlySet<string> | null, selections: ReadonlyMap<string, readonly string[]> | null): SearchWindow;
89
101
  };
90
102
  export declare function searchPlanOf(input: unknown): SearchPlan;
91
103
  export declare function createSearchIndex(source: SearchSource): SearchIndex;
104
+ export {};
@@ -7,7 +7,7 @@ import type { ChatDraftFile } from './file.js';
7
7
  import type { Submission } from './outcome.js';
8
8
  import type { RoomDraftRecord, SavedDraft } from './room-draft.js';
9
9
  export declare const STORE_SCHEMA = 25;
10
- export declare const AUTHORED_SCHEMA = 2;
10
+ export declare const AUTHORED_SCHEMA = 3;
11
11
  export type ReplicaRecord = {
12
12
  locator: string;
13
13
  name: string;
@@ -66,6 +66,10 @@ export type HeldConversation = {
66
66
  read: string | null | undefined;
67
67
  partial: boolean;
68
68
  };
69
+ export type MessageWindow = {
70
+ messages: AcceptedMessage[];
71
+ more: boolean;
72
+ };
69
73
  export type ConversationWrite = {
70
74
  conversation: string;
71
75
  messages: readonly AcceptedMessage[];
@@ -88,6 +92,11 @@ export type ChatDraftRecord = {
88
92
  submitted?: readonly ChatSubmission[];
89
93
  moves?: readonly string[];
90
94
  };
95
+ export type CallRecord = {
96
+ readonly operation: string;
97
+ readonly name: string;
98
+ readonly input: unknown;
99
+ };
91
100
  export type RecordWrite = {
92
101
  next: ReplicaRecord;
93
102
  previous: ReplicaRecord | null;
@@ -96,6 +105,7 @@ export type RecordWrite = {
96
105
  export type AuthoredWrite = {
97
106
  locator: string;
98
107
  queue: readonly ChangeBatch[];
108
+ founded?: readonly ChangeBatch[];
99
109
  saved?: ReadonlyMap<string, readonly SavedDraft[]>;
100
110
  roomDrafts?: readonly RoomDraftRecord[];
101
111
  consumedRoomDrafts?: readonly string[];
@@ -123,7 +133,8 @@ export type RuntimeStore = {
123
133
  present(record: PresentationRecord): Promise<void>;
124
134
  conversations(): Promise<readonly HeldConversation[]>;
125
135
  keepMessages(write: ConversationWrite): Promise<void>;
126
- messageWindow(conversation: string, limit: number | undefined): Promise<AcceptedMessage[]>;
136
+ messageWindow(conversation: string, limit: number, before: readonly [string, string] | null): Promise<MessageWindow>;
137
+ messageCount(conversation: string): Promise<number>;
127
138
  messagesAfter(conversation: string, identity: string | null): Promise<AcceptedMessage[]>;
128
139
  messageIdentities(conversation: string): Promise<readonly string[]>;
129
140
  turnArrived(conversation: string, turn: string): Promise<boolean>;
@@ -131,6 +142,9 @@ export type RuntimeStore = {
131
142
  chatDrafts(): Promise<readonly ChatDraftRecord[]>;
132
143
  keepChatDrafts(records: readonly ChatDraftRecord[]): Promise<void>;
133
144
  dropChatDraft(conversation: string): Promise<void>;
145
+ calls(): Promise<readonly CallRecord[]>;
146
+ keepCall(record: CallRecord): Promise<void>;
147
+ dropCall(operation: string): Promise<void>;
134
148
  keepRoomDraft(record: RoomDraftRecord): Promise<void>;
135
149
  discardRoomDraft(locator: string, path: string): Promise<void>;
136
150
  fences(): Promise<readonly string[]>;
@@ -34,6 +34,10 @@ declare const MEMBERS: {
34
34
  readonly reach: 'within';
35
35
  readonly effect: 'write';
36
36
  };
37
+ readonly saveParts: {
38
+ readonly reach: 'within';
39
+ readonly effect: 'write';
40
+ };
37
41
  readonly history: {
38
42
  readonly reach: 'within';
39
43
  readonly effect: 'read';
@@ -42,6 +46,10 @@ declare const MEMBERS: {
42
46
  readonly reach: 'within';
43
47
  readonly effect: 'read';
44
48
  };
49
+ readonly 'binaryFile.link': {
50
+ readonly reach: 'within';
51
+ readonly effect: 'read';
52
+ };
45
53
  readonly 'binaryFile.readReference': {
46
54
  readonly reach: 'within';
47
55
  readonly effect: 'read';
@@ -94,6 +102,10 @@ declare const MEMBERS: {
94
102
  readonly reach: 'app';
95
103
  readonly effect: 'write';
96
104
  };
105
+ readonly 'presentation.edit': {
106
+ readonly reach: 'app';
107
+ readonly effect: 'write';
108
+ };
97
109
  readonly 'conversation.list': {
98
110
  readonly reach: 'within';
99
111
  readonly effect: 'read';
@@ -134,6 +146,10 @@ declare const MEMBERS: {
134
146
  readonly reach: 'within';
135
147
  readonly effect: 'write';
136
148
  };
149
+ readonly 'chatDraft.prepend': {
150
+ readonly reach: 'within';
151
+ readonly effect: 'write';
152
+ };
137
153
  readonly 'chatDraft.discard': {
138
154
  readonly reach: 'within';
139
155
  readonly effect: 'write';
package/docs/families.md CHANGED
@@ -12,7 +12,9 @@
12
12
  purpose-bound authenticated pages. The shell navigates only to a same-origin
13
13
  absolute path, carries its current address as the return target, and the page
14
14
  returns there when it completes. An App names an address House gave it in a
15
- reading and composes none.
15
+ reading and composes one only for `/bind/<app_ref>`, where the User binds
16
+ its Rooms and connects its account slots, with `?slot=<name>` to open at one
17
+ slot.
16
18
  - **Installation** - `install()` offers the page as a Home-screen app. Where the
17
19
  browser has an install prompt ready the shell shows it and the call resolves
18
20
  `'accepted'` or `'dismissed'` with the User's choice, spending that prompt;
@@ -67,14 +69,15 @@
67
69
  refusal is House's `{ error: { code, retryable } }`, `app_release_not_found` for an
68
70
  App with no release; a read House does not answer, or one that outlived
69
71
  the browser's signed-in User, is `null`.
70
- - **External calls** - `callExternal({ url, method, headers, body, slot })`
72
+ - **External calls** - `callExternal({ url, method, headers, body, slot, room_ref })`
71
73
  has House's server send an HTTPS request to one of the release's declared
72
74
  external origins and resolves with the service's `status`, `headers` and its
73
75
  body as `body` text or `body_base64`, or a refusal as House's
74
76
  `{ error: { code, retryable } }`, or `null` when House does not answer. House fills in the
75
- App and its running release; naming an account slot places the key of the
76
- account the User connected to it, which the App never sees, and naming none
77
- sends no key. A Site's call names no slot, and the House panel names an
77
+ App and its running release; naming an account slot and one of the App's
78
+ bound Rooms places the key of the account that Room connects to the slot,
79
+ when the User holds one of the account's roles there, which the App never
80
+ sees, and naming neither sends no key. A Site's call names no slot, and the House panel names an
78
81
  `account` instead. `body_base64` replaces `body` for bytes.
79
82
  - **App messages** - `messages(listener)` hands the listener each message
80
83
  another holder of this App sends to this User's running copies, as `from`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/app-bridge",
3
- "version": "0.1.0-cedebf3bb1f58",
3
+ "version": "0.1.0-cee55bd82a088",
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",