@agentshouse/app-bridge 0.1.0-c6ad9402daafa → 0.1.0-c6f0ca4067690
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 +0 -7
- package/dist/mdmodel/definition.d.ts +1 -0
- package/dist/mdmodel/index.d.ts +1 -1
- package/dist/mdruntime/adapter.d.ts +9 -14
- package/dist/mdruntime/binary.d.ts +0 -5
- package/dist/mdruntime/client.d.ts +0 -2
- package/dist/mdruntime/connection.d.ts +3 -4
- package/dist/mdruntime/conversation.d.ts +2 -0
- package/dist/mdruntime/durability.d.ts +2 -5
- package/dist/mdruntime/outcome.d.ts +0 -1
- package/dist/mdruntime/reach.d.ts +0 -2
- package/dist/mdruntime/readiness.d.ts +18 -7
- package/dist/mdruntime/replica.d.ts +3 -1
- package/dist/mdruntime/store.d.ts +12 -3
- package/dist/mdruntime/stored.d.ts +9 -2
- package/dist/mdruntime/tables.d.ts +23 -1
- package/dist/mdruntime/wire.d.ts +0 -4
- package/docs/families.md +3 -3
- package/package.json +1 -1
package/dist/calls.d.ts
CHANGED
|
@@ -414,18 +414,11 @@ export interface HouseMethods {
|
|
|
414
414
|
readonly 'record.list': {
|
|
415
415
|
readonly params: {
|
|
416
416
|
readonly room_ref: string;
|
|
417
|
-
readonly record?: string;
|
|
418
417
|
readonly cursor?: string;
|
|
419
418
|
readonly limit?: number;
|
|
420
419
|
readonly order?: 'asc' | 'desc';
|
|
421
420
|
};
|
|
422
421
|
readonly result: {
|
|
423
|
-
readonly record: string;
|
|
424
|
-
readonly ref: string;
|
|
425
|
-
readonly created_at: string;
|
|
426
|
-
readonly body: string | null;
|
|
427
|
-
readonly claimed: unknown;
|
|
428
|
-
} | {
|
|
429
422
|
readonly records: readonly {
|
|
430
423
|
readonly record: string;
|
|
431
424
|
readonly ref: string;
|
|
@@ -60,6 +60,7 @@ export declare const JSON_TYPES: readonly JsonType[];
|
|
|
60
60
|
export declare const BUILT_IN_TYPE = "any";
|
|
61
61
|
export declare const ATTACHMENT = "attachment";
|
|
62
62
|
export declare const ARRAY_INDEX: RegExp;
|
|
63
|
+
export declare const JSON_POINTER: RegExp;
|
|
63
64
|
export declare function escapePointer(key: string): string;
|
|
64
65
|
export declare function pointerSegments(pointer: string): string[];
|
|
65
66
|
export declare function refTarget(reference: string, defs: Readonly<Record<string, unknown>>): {
|
package/dist/mdmodel/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type { RoomTarget } from './paths.js';
|
|
|
10
10
|
export { MARKDOWN_SYNTAX_PROFILE } from './profile.js';
|
|
11
11
|
export { project } from './project.js';
|
|
12
12
|
export { references } from './references.js';
|
|
13
|
-
export { ARRAY_INDEX, ATTACHMENT, crossedFacts, escapePointer, itemFacts, memberFacts, pointerFacts, pointerSegments, } from './definition.js';
|
|
13
|
+
export { ARRAY_INDEX, ATTACHMENT, crossedFacts, escapePointer, itemFacts, JSON_POINTER, memberFacts, pointerFacts, pointerSegments, } from './definition.js';
|
|
14
14
|
export type { Definition, FieldRules, JsonType, PatternFacts, PointerFacts, RuleValue, SectionSpec, Shape, Transition, ValueFacts, } from './definition.js';
|
|
15
15
|
export type { ApplyResult, BodyResult, Change, Division, DivisionContext, Document, DocumentCheck, Frontmatter, FrontmatterResult, Library, ModelVerification, Link, ParseResult, Projection, ProjectionContext, Reached, Reference, Refusal, RoomReference, Span, Validation, ValidationContext, ValidationStep, VerifiedModel, } from './types.js';
|
|
16
16
|
export { assess, bodyRoomLinks, checkDocument, resolves, roomReferences, sectionReferences, validate, validating, verdicts, verify, } from './validate.js';
|
|
@@ -269,7 +269,6 @@ export type HeadChange = {
|
|
|
269
269
|
time: string;
|
|
270
270
|
};
|
|
271
271
|
export type BinaryFile = {
|
|
272
|
-
fileRef: string;
|
|
273
272
|
byteLength: number;
|
|
274
273
|
mediaType: string;
|
|
275
274
|
sha256: string;
|
|
@@ -290,6 +289,12 @@ export type BootstrapRequest = {
|
|
|
290
289
|
selection: string;
|
|
291
290
|
pageToken?: PageToken;
|
|
292
291
|
held?: HeldContent;
|
|
292
|
+
received?: Uint8Array;
|
|
293
|
+
arriving?: (bytes: number) => void;
|
|
294
|
+
};
|
|
295
|
+
export type BootstrapInventory = {
|
|
296
|
+
readonly parts: number;
|
|
297
|
+
readonly bytes: number;
|
|
293
298
|
};
|
|
294
299
|
export type RoomModels = {
|
|
295
300
|
collection?: ModelResult;
|
|
@@ -306,6 +311,8 @@ export type BootstrapPage = {
|
|
|
306
311
|
binaryFiles: Readonly<Record<string, BinaryFile>>;
|
|
307
312
|
folders?: readonly string[];
|
|
308
313
|
pageToken?: PageToken;
|
|
314
|
+
inventory?: BootstrapInventory;
|
|
315
|
+
received?: Uint8Array;
|
|
309
316
|
};
|
|
310
317
|
export type BootstrapResult = BootstrapPage | {
|
|
311
318
|
kind: 'beyond-horizon';
|
|
@@ -412,15 +419,6 @@ export type BinaryRequest = {
|
|
|
412
419
|
locator: string;
|
|
413
420
|
path: string;
|
|
414
421
|
revision: string;
|
|
415
|
-
fileRef?: string;
|
|
416
|
-
} | {
|
|
417
|
-
kind: 'reference';
|
|
418
|
-
fileRef: string;
|
|
419
|
-
referrer: unknown;
|
|
420
|
-
};
|
|
421
|
-
export type ReferrerScope = {
|
|
422
|
-
locator: string;
|
|
423
|
-
path?: string;
|
|
424
422
|
};
|
|
425
423
|
export type BinaryResult = {
|
|
426
424
|
kind: 'binary';
|
|
@@ -504,10 +502,7 @@ export type Adapter = {
|
|
|
504
502
|
mutate(authorization: Authorization, request: MutationRequest, keep: (upload: unknown) => Promise<void>): Promise<MutationResult>;
|
|
505
503
|
history(authorization: Authorization, request: HistoryRequest): Promise<HistoryResult>;
|
|
506
504
|
binary(authorization: Authorization, request: BinaryRequest): Promise<BinaryResult>;
|
|
507
|
-
link(authorization: Authorization, request:
|
|
508
|
-
kind: 'path';
|
|
509
|
-
}>): Promise<BinaryLinkResult>;
|
|
510
|
-
referrerScope(referrer: unknown): ReferrerScope | null;
|
|
505
|
+
link(authorization: Authorization, request: BinaryRequest): Promise<BinaryLinkResult>;
|
|
511
506
|
action(authorization: Authorization, request: ActionRequest): Promise<ActionResult>;
|
|
512
507
|
reached(locator: string, roomVersion: string, target: string): boolean;
|
|
513
508
|
follows(locator: string, roomVersion: string, next: string): boolean;
|
|
@@ -3,7 +3,6 @@ export type BinaryFileRecord = {
|
|
|
3
3
|
readonly state: 'accepted';
|
|
4
4
|
readonly revision: string;
|
|
5
5
|
readonly path: string;
|
|
6
|
-
readonly fileRef: string;
|
|
7
6
|
readonly byteLength: number;
|
|
8
7
|
readonly mediaType: string;
|
|
9
8
|
readonly sha256: string;
|
|
@@ -15,8 +14,4 @@ export type BinaryFileRecord = {
|
|
|
15
14
|
readonly mediaType: string;
|
|
16
15
|
readonly sha256: string;
|
|
17
16
|
};
|
|
18
|
-
export type BinaryReference = {
|
|
19
|
-
readonly fileRef: string;
|
|
20
|
-
readonly referrer: unknown;
|
|
21
|
-
};
|
|
22
17
|
export declare function binaryRecord(path: string, held: HeldBinary, revision: string | undefined): BinaryFileRecord;
|
|
@@ -2,7 +2,6 @@ import type { AppRoom, ConnectionRefusal, HistoryQuery, RoomSchemas, SavedParts,
|
|
|
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
|
-
import type { BinaryReference } from './binary.js';
|
|
6
5
|
import type { ChosenFile } from './file.js';
|
|
7
6
|
import type { BinaryAnswer, BinaryLinkAnswer, CallResult, HistoryAnswer, Offline, QueueEntry, Resolution } from './outcome.js';
|
|
8
7
|
import type { DocumentQuery, DocumentResult, GroupQuery, GroupResult, PendingResult } from './query.js';
|
|
@@ -54,7 +53,6 @@ export type MdRuntimeClient = {
|
|
|
54
53
|
binaryFile: {
|
|
55
54
|
read(room: string, path: string, revision?: string): Promise<BinaryAnswer>;
|
|
56
55
|
link(room: string, path: string, revision?: string): Promise<BinaryLinkAnswer>;
|
|
57
|
-
readReference(reference: BinaryReference): Promise<BinaryAnswer>;
|
|
58
56
|
};
|
|
59
57
|
call(name: string, input: unknown): Promise<CallResult>;
|
|
60
58
|
reached(locator: string, roomVersion: string, path?: string): Promise<boolean>;
|
|
@@ -7,14 +7,13 @@ import { type Adapter, type Authorization, type Member, type ProviderRefusal, ty
|
|
|
7
7
|
import { type ChatDraftSurface, type ConversationAgent, type ConversationEntry, type ConversationOptions, type ConversationSurface, type ConversationView } from './conversation.js';
|
|
8
8
|
import { type WrittenBy } from './change.js';
|
|
9
9
|
import type { Open } from './open.js';
|
|
10
|
-
import { type BinaryReference } from './binary.js';
|
|
11
10
|
import { type BinaryLinkAnswer, type CallResult, type HeldBinaryAnswer, type HistoryAnswer, type QueueEntry, type Resolution } from './outcome.js';
|
|
12
11
|
import { type Recovery } from './recovery.js';
|
|
13
12
|
import { type SaveRefusal } from './save.js';
|
|
14
13
|
import { type RoomDraft, type RoomDraftParts, type RoomDraftWrite } from './room-draft.js';
|
|
15
14
|
import { type SyncStatus } from './status.js';
|
|
16
15
|
import { type RuntimeShell } from './durability.js';
|
|
17
|
-
import { type
|
|
16
|
+
import { type CodeAvailability, type Persistence, type Readiness, type SearchObligation, type Space } from './readiness.js';
|
|
18
17
|
import type { RuntimeDatabase } from './tables.js';
|
|
19
18
|
import { type NarrowedView, type PortReach, type RuntimeView } from './reach.js';
|
|
20
19
|
export type AppTypedSelection = {
|
|
@@ -84,7 +83,6 @@ export type PresentationSurface = {
|
|
|
84
83
|
export type BinaryFileSurface = {
|
|
85
84
|
read(room: string, path: string, revision?: string): Promise<HeldBinaryAnswer>;
|
|
86
85
|
link(room: string, path: string, revision?: string): Promise<BinaryLinkAnswer>;
|
|
87
|
-
readReference(reference: BinaryReference): Promise<HeldBinaryAnswer>;
|
|
88
86
|
part(file: string, part: number): Promise<Uint8Array | null>;
|
|
89
87
|
};
|
|
90
88
|
export type HistoryQuery = {
|
|
@@ -138,7 +136,7 @@ export type RuntimeTopic = 'rooms' | 'readiness' | 'connection-refusal' | 'stora
|
|
|
138
136
|
export type ReadinessPort = {
|
|
139
137
|
readonly target: string;
|
|
140
138
|
readonly code: CodeAvailability;
|
|
141
|
-
readonly
|
|
139
|
+
readonly space: Space | null;
|
|
142
140
|
readonly search: SearchObligation;
|
|
143
141
|
};
|
|
144
142
|
export type ComposedRuntime = RuntimeView & {
|
|
@@ -146,6 +144,7 @@ export type ComposedRuntime = RuntimeView & {
|
|
|
146
144
|
stop(): Promise<void>;
|
|
147
145
|
lose(locators: readonly string[]): Promise<void>;
|
|
148
146
|
persisted(answer: Persistence): void;
|
|
147
|
+
shown(onScreen: boolean): void;
|
|
149
148
|
within(reach: PortReach | null, port: ReadinessPort): NarrowedView;
|
|
150
149
|
};
|
|
151
150
|
export declare function composeRuntime(options: MdRuntimeOptions): ComposedRuntime;
|
|
@@ -85,6 +85,7 @@ export type ConversationDependencies = {
|
|
|
85
85
|
stream(): ConversationStream | undefined;
|
|
86
86
|
publish(set: ChangeSet): void;
|
|
87
87
|
online(): boolean;
|
|
88
|
+
full(): boolean;
|
|
88
89
|
closed(): boolean;
|
|
89
90
|
unanswered(): void;
|
|
90
91
|
expired(operation: string): boolean;
|
|
@@ -112,5 +113,6 @@ export type ConversationStore = {
|
|
|
112
113
|
};
|
|
113
114
|
export declare function unheldView(conversation: string): ConversationView;
|
|
114
115
|
export declare const SESSION_STARTED = "Session started";
|
|
116
|
+
export declare const HISTORY_CONVERSATIONS = 64;
|
|
115
117
|
export declare function newChat(agent: string): string;
|
|
116
118
|
export declare function createConversationStore(deps: ConversationDependencies): ConversationStore;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import type { Persistence } from './readiness.js';
|
|
2
|
-
export type StorageEstimate = {
|
|
3
|
-
readonly usage: number;
|
|
4
|
-
readonly total: number;
|
|
5
|
-
};
|
|
6
2
|
export type RuntimeShell = {
|
|
7
3
|
persistence: Persistence;
|
|
8
4
|
generation: string | null;
|
|
5
|
+
onScreen: boolean;
|
|
9
6
|
keepGeneration(value: string): void | Promise<void>;
|
|
10
7
|
dropGeneration(): void | Promise<void>;
|
|
11
|
-
estimate?(): Promise<StorageEstimate | null>;
|
|
12
8
|
cleanUp?(): Promise<number>;
|
|
13
9
|
};
|
|
10
|
+
export declare function refusedForSpace(error: unknown): boolean;
|
|
14
11
|
export declare function detectStorageLoss(stored: string | null, reported: string | null): string | null;
|
|
15
12
|
export declare function nextGeneration(stored: string | null, reported: string | null): string;
|
|
@@ -44,7 +44,6 @@ export declare const UNREADABLE: Refused<'unreadable'>;
|
|
|
44
44
|
export declare const LOCKED_UNREADABLE: Refused<'unreadable'>;
|
|
45
45
|
export declare const ABSENT_TARGET: Refused<'absent'>;
|
|
46
46
|
export declare function absentBinary(path: string): Refused<'absent'>;
|
|
47
|
-
export declare function absentReference(fileRef: string): Refused<'absent'>;
|
|
48
47
|
export declare function binaryAnswer(result: KeptResult): HeldBinaryAnswer;
|
|
49
48
|
export declare function binaryLinkAnswer(result: BinaryLinkResult): BinaryLinkAnswer;
|
|
50
49
|
export declare const ROOM_LOCKED = "room-locked";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ReferrerScope } from './adapter.js';
|
|
2
1
|
import type { MdRuntime, ReadinessPort, RuntimeTopic } from './connection.js';
|
|
3
2
|
import type { Plan, PlanReach, QueryResult } from './query.js';
|
|
4
3
|
import type { Readiness } from './readiness.js';
|
|
@@ -28,7 +27,6 @@ export type Reachable = RuntimeView & {
|
|
|
28
27
|
watchPlan(plan: Plan, deliver: (message: unknown) => void): () => void;
|
|
29
28
|
search(input: unknown, reach: PortReach | null, locked: readonly string[]): Promise<SearchResult>;
|
|
30
29
|
watchReadiness(port: ReadinessPort, reach: PortReach | null, deliver: (readiness: Readiness) => void): () => void;
|
|
31
|
-
referrerScope(referrer: unknown): ReferrerScope | null;
|
|
32
30
|
locked(room: string): boolean;
|
|
33
31
|
lockedRooms(): readonly string[];
|
|
34
32
|
watchLocks(notify: () => void): () => void;
|
|
@@ -18,17 +18,28 @@ export type Persistence = Open<'granted' | 'denied' | 'unavailable'>;
|
|
|
18
18
|
export type Durability = Open<'persistent' | 'best-effort'>;
|
|
19
19
|
export type ConnectionAvailability = Open<'connected' | 'connecting' | 'unreachable'>;
|
|
20
20
|
export type HouseOutcome = Open<'open' | 'write-halted' | 'refused'>;
|
|
21
|
-
export type
|
|
22
|
-
readonly cause: Open<'insufficient-space' | 'storage-exceeded'>;
|
|
23
|
-
readonly needed: number | null;
|
|
24
|
-
readonly available: number | null;
|
|
25
|
-
};
|
|
21
|
+
export type Space = Open<'full'>;
|
|
26
22
|
export type RefusedRoom = {
|
|
27
23
|
readonly room: string;
|
|
24
|
+
readonly name: string;
|
|
28
25
|
readonly file: string;
|
|
29
26
|
readonly rule: string;
|
|
30
27
|
readonly location: string | null;
|
|
31
28
|
};
|
|
29
|
+
export type InstallationStep = Open<'listing' | 'downloading' | 'writing' | 'replaying'>;
|
|
30
|
+
export type InstallationPause = Open<'hidden'>;
|
|
31
|
+
export type InstallationAmount = {
|
|
32
|
+
readonly done: number;
|
|
33
|
+
readonly total: number;
|
|
34
|
+
};
|
|
35
|
+
export type Installation = {
|
|
36
|
+
readonly step: InstallationStep | null;
|
|
37
|
+
readonly paused: InstallationPause | null;
|
|
38
|
+
readonly rooms: InstallationAmount;
|
|
39
|
+
readonly parts: InstallationAmount;
|
|
40
|
+
readonly bytes: InstallationAmount;
|
|
41
|
+
readonly received: InstallationAmount;
|
|
42
|
+
};
|
|
32
43
|
export type ReadinessStatus = Open<'preparing' | 'paused' | 'refused' | 'ready' | 'lost'>;
|
|
33
44
|
export type Readiness = {
|
|
34
45
|
readonly status: ReadinessStatus;
|
|
@@ -40,7 +51,8 @@ export type Readiness = {
|
|
|
40
51
|
readonly persistence: Persistence;
|
|
41
52
|
readonly connection: ConnectionAvailability;
|
|
42
53
|
readonly house: HouseOutcome;
|
|
43
|
-
readonly
|
|
54
|
+
readonly space: Space | null;
|
|
55
|
+
readonly installation: Installation;
|
|
44
56
|
readonly refused: readonly RefusedRoom[];
|
|
45
57
|
readonly lost: boolean;
|
|
46
58
|
};
|
|
@@ -48,5 +60,4 @@ export type ReadinessFacts = Omit<Readiness, 'status' | 'ready' | 'usable' | 'du
|
|
|
48
60
|
readonly coverage: Omit<TargetCoverage, 'complete'>;
|
|
49
61
|
readonly established: boolean;
|
|
50
62
|
};
|
|
51
|
-
export declare const SETTLED_ROOMS: ReadonlySet<string>;
|
|
52
63
|
export declare function readinessOf(facts: ReadinessFacts): Readiness;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MutationResult, OperationScopes, ReplicaAdmission, TypedSelection } from './adapter.js';
|
|
1
|
+
import type { BootstrapInventory, MutationResult, OperationScopes, ReplicaAdmission, TypedSelection } from './adapter.js';
|
|
2
2
|
import { type ChangeBatch, type Precondition } from './change.js';
|
|
3
3
|
import { type Collection, type Composition } from './collection.js';
|
|
4
4
|
import type { ModelState } from './model.js';
|
|
@@ -16,6 +16,7 @@ export type ReplicaRecord = {
|
|
|
16
16
|
readonly providerOwnedPaths: readonly string[];
|
|
17
17
|
readonly roomVersion: string;
|
|
18
18
|
readonly transfer: string;
|
|
19
|
+
readonly inventory: BootstrapInventory | null;
|
|
19
20
|
readonly key: number;
|
|
20
21
|
};
|
|
21
22
|
export type HeldReplica = {
|
|
@@ -24,6 +25,7 @@ export type HeldReplica = {
|
|
|
24
25
|
readonly overlaid: ReadonlySet<string>;
|
|
25
26
|
readonly count: number;
|
|
26
27
|
readonly confirmed: number;
|
|
28
|
+
readonly indexed: boolean;
|
|
27
29
|
};
|
|
28
30
|
export type VisibleLayer = Layer & {
|
|
29
31
|
readonly collection: Collection;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Capability, KeptReceipt, Member, ProviderLimit } from './adapter.js';
|
|
1
|
+
import type { BootstrapInventory, Capability, KeptReceipt, Member, ProviderLimit } 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';
|
|
@@ -9,6 +9,10 @@ import type { ModelState } from './model.js';
|
|
|
9
9
|
import type { SearchWindow } from './search.js';
|
|
10
10
|
import type { CommittedWrite, ConversationWrite, CountedRoom, HeldConversation, HeldEntry, MessageWindow, QueryAnswer, QueryRoom, Referrer, RoomCommit, RuntimeDatabase, SearchAsk, StoredEntry, StoredFile, TypedEntry, View, Walked } from './tables.js';
|
|
11
11
|
export type { ConversationWrite, HeldConversation, MessageWindow } from './tables.js';
|
|
12
|
+
export type TransferWriting = {
|
|
13
|
+
readonly token: string | null;
|
|
14
|
+
readonly written: number;
|
|
15
|
+
};
|
|
12
16
|
export type TransferRecord = {
|
|
13
17
|
readonly locator: string;
|
|
14
18
|
readonly transfer: string;
|
|
@@ -16,6 +20,9 @@ export type TransferRecord = {
|
|
|
16
20
|
readonly from: string;
|
|
17
21
|
readonly last: string;
|
|
18
22
|
readonly pageToken: string | null;
|
|
23
|
+
readonly writing: TransferWriting | null;
|
|
24
|
+
readonly inventory: BootstrapInventory | null;
|
|
25
|
+
readonly done: BootstrapInventory;
|
|
19
26
|
readonly models: {
|
|
20
27
|
readonly collection: ModelState;
|
|
21
28
|
readonly selection: ModelState;
|
|
@@ -83,7 +90,7 @@ export type RefreshedPage = StagedPage & {
|
|
|
83
90
|
export type Opened = {
|
|
84
91
|
readonly rooms: ReadonlyMap<string, ReplicaRecord>;
|
|
85
92
|
readonly transfers: ReadonlyMap<string, TransferRecord>;
|
|
86
|
-
readonly
|
|
93
|
+
readonly unindexed: ReadonlySet<number>;
|
|
87
94
|
readonly overlaid: ReadonlyMap<number, ReadonlySet<string>>;
|
|
88
95
|
readonly erasing: boolean;
|
|
89
96
|
readonly orphans: readonly number[];
|
|
@@ -116,7 +123,9 @@ export type RuntimeStore = {
|
|
|
116
123
|
}[]>;
|
|
117
124
|
typedWithin(key: number, view: View, roots: readonly string[], within: boolean): Promise<boolean>;
|
|
118
125
|
search(ask: SearchAsk): Promise<SearchWindow>;
|
|
119
|
-
stage(record: TransferRecord, composition: Composition, page: StagedPage,
|
|
126
|
+
stage(record: TransferRecord, composition: Composition, page: StagedPage, written?: string): Promise<number | null>;
|
|
127
|
+
transferPart(locator: string, token: string): Promise<Uint8Array | null>;
|
|
128
|
+
keepPart(locator: string, token: string, part: Uint8Array): Promise<void>;
|
|
120
129
|
refresh(key: number, page: RefreshedPage): Promise<void>;
|
|
121
130
|
unrefresh(key: number): Promise<void>;
|
|
122
131
|
commit(commit: Commit): Promise<CommittedWrite>;
|
|
@@ -84,7 +84,7 @@ export type RoomCommit = {
|
|
|
84
84
|
export type Committed = {
|
|
85
85
|
readonly counts: Readonly<Record<string, number>>;
|
|
86
86
|
readonly changed: Readonly<Record<string, readonly string[] | null>>;
|
|
87
|
-
readonly
|
|
87
|
+
readonly indexed: Readonly<Record<string, boolean>>;
|
|
88
88
|
};
|
|
89
89
|
export type CountedRoom = {
|
|
90
90
|
readonly key: number;
|
|
@@ -99,11 +99,12 @@ export declare function entered(connection: Connection, locator: string, composi
|
|
|
99
99
|
export declare function stage(connection: Connection, request: {
|
|
100
100
|
readonly locator: string;
|
|
101
101
|
readonly transfer: string;
|
|
102
|
-
readonly record: string
|
|
102
|
+
readonly record: string;
|
|
103
103
|
readonly key: number | null;
|
|
104
104
|
readonly composition: Composition;
|
|
105
105
|
readonly entries: readonly StoredEntry[];
|
|
106
106
|
readonly folders: readonly string[];
|
|
107
|
+
readonly written?: string;
|
|
107
108
|
}): number;
|
|
108
109
|
export declare function refreshing(connection: Connection, request: {
|
|
109
110
|
readonly key: number;
|
|
@@ -133,5 +134,11 @@ export declare function files(connection: Connection, key: number, view: View, a
|
|
|
133
134
|
readonly revision: string;
|
|
134
135
|
}[];
|
|
135
136
|
export declare function typedWithin(connection: Connection, key: number, view: View, roots: readonly string[], within: boolean): boolean;
|
|
137
|
+
export declare function transferPart(connection: Connection, locator: string, token: string): Uint8Array | null;
|
|
138
|
+
export declare function keepPart(connection: Connection, request: {
|
|
139
|
+
readonly locator: string;
|
|
140
|
+
readonly token: string;
|
|
141
|
+
readonly part: Uint8Array;
|
|
142
|
+
}): null;
|
|
136
143
|
export declare function opened(connection: Connection): ReplicaOpened;
|
|
137
144
|
export declare function ended(connection: Connection): void;
|
|
@@ -26,6 +26,15 @@ export interface SqliteEngine {
|
|
|
26
26
|
heap8u(): Uint8Array;
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
+
export interface SqliteStatement {
|
|
30
|
+
readonly parameterCount: number;
|
|
31
|
+
bind(values: readonly Value[]): unknown;
|
|
32
|
+
step(): boolean;
|
|
33
|
+
get(values: Value[]): Value[];
|
|
34
|
+
getColumnNames(names: string[]): string[];
|
|
35
|
+
resetNoThrow(clearBindings: boolean): number;
|
|
36
|
+
finalize(): unknown;
|
|
37
|
+
}
|
|
29
38
|
export interface SqliteDatabase {
|
|
30
39
|
readonly pointer: number;
|
|
31
40
|
exec(options: {
|
|
@@ -34,6 +43,7 @@ export interface SqliteDatabase {
|
|
|
34
43
|
readonly rowMode?: 'object';
|
|
35
44
|
readonly returnValue?: 'resultRows';
|
|
36
45
|
}): Row[];
|
|
46
|
+
prepare(sql: string): SqliteStatement;
|
|
37
47
|
}
|
|
38
48
|
export declare function sqliteConnection(engine: SqliteEngine, database: SqliteDatabase): Connection;
|
|
39
49
|
export declare const FILE_PART_BYTES = 1048576;
|
|
@@ -47,6 +57,7 @@ export interface FileSpool {
|
|
|
47
57
|
held(): Iterable<string>;
|
|
48
58
|
spool(key: string, type: string, parts: Iterable<Uint8Array>): Promise<Blob>;
|
|
49
59
|
drop(key: string): Promise<void>;
|
|
60
|
+
probe(bytes: number): Promise<void>;
|
|
50
61
|
}
|
|
51
62
|
export type KeptPending = {
|
|
52
63
|
readonly id: string;
|
|
@@ -204,12 +215,22 @@ export interface RuntimeRequests {
|
|
|
204
215
|
readonly 'replica.stage': Asked<{
|
|
205
216
|
readonly locator: string;
|
|
206
217
|
readonly transfer: string;
|
|
207
|
-
readonly record: string
|
|
218
|
+
readonly record: string;
|
|
208
219
|
readonly key: number | null;
|
|
209
220
|
readonly composition: Composition;
|
|
210
221
|
readonly entries: readonly StoredEntry[];
|
|
211
222
|
readonly folders: readonly string[];
|
|
223
|
+
readonly written?: string;
|
|
212
224
|
}, number | null>;
|
|
225
|
+
readonly 'replica.transferPart': Asked<{
|
|
226
|
+
readonly locator: string;
|
|
227
|
+
readonly token: string;
|
|
228
|
+
}, Uint8Array | null>;
|
|
229
|
+
readonly 'replica.keepPart': Asked<{
|
|
230
|
+
readonly locator: string;
|
|
231
|
+
readonly token: string;
|
|
232
|
+
readonly part: Uint8Array;
|
|
233
|
+
}, null>;
|
|
213
234
|
readonly 'replica.refresh': Asked<{
|
|
214
235
|
readonly key: number;
|
|
215
236
|
readonly entries: readonly StoredEntry[];
|
|
@@ -313,6 +334,7 @@ export interface RuntimeRequests {
|
|
|
313
334
|
readonly 'conversation.drop': Asked<{
|
|
314
335
|
readonly conversations: readonly string[];
|
|
315
336
|
}, null>;
|
|
337
|
+
readonly 'space.probe': Asked<Nothing, null>;
|
|
316
338
|
}
|
|
317
339
|
export type RuntimeKind = keyof RuntimeRequests;
|
|
318
340
|
export type RuntimeRequest<K extends RuntimeKind = RuntimeKind> = {
|
package/dist/mdruntime/wire.d.ts
CHANGED
|
@@ -54,10 +54,6 @@ declare const MEMBERS: {
|
|
|
54
54
|
readonly reach: 'within';
|
|
55
55
|
readonly effect: 'read';
|
|
56
56
|
};
|
|
57
|
-
readonly 'binaryFile.readReference': {
|
|
58
|
-
readonly reach: 'within';
|
|
59
|
-
readonly effect: 'read';
|
|
60
|
-
};
|
|
61
57
|
readonly 'binaryFile.part': {
|
|
62
58
|
readonly reach: 'within';
|
|
63
59
|
readonly effect: 'read';
|
package/docs/families.md
CHANGED
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
applied any other call, an act on House is answered the outcome
|
|
57
57
|
`transport-uncertainty`, and every other call, a Save or a draft write among
|
|
58
58
|
them, fails with the retryable code `transport-uncertainty`.
|
|
59
|
-
- **Site image read** - given a Published Room and
|
|
60
|
-
|
|
59
|
+
- **Site image read** - given a Published Room and the Path of one of its
|
|
60
|
+
binary entries, it answers the web copy's path and metadata, or `null` when no
|
|
61
61
|
copy exists. The original bytes never cross this bridge at a Site.
|
|
62
62
|
- **App release code** - `sourceTop(app, release)` answers the top level of
|
|
63
63
|
the latest successful release of an App the User may use: its folders, its
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
the sender's User id, and `body`, the JSON value they sent, until the
|
|
85
85
|
function it returns is called. App code sends one through the Runtime's
|
|
86
86
|
`call('message.send', { to, body })` with the recipient's User id and
|
|
87
|
-
a body of at most 32
|
|
87
|
+
a body of at most 32 kB of JSON; House fills in the App and relays it only
|
|
88
88
|
to copies running now, storing nothing. The panel sends none.
|
|
89
89
|
- **App screenshot read** - given an App reference, `readScreenshot(app)`
|
|
90
90
|
answers the image this browser captured of that App's screen the first time
|
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-c6f0ca4067690",
|
|
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",
|