@agentshouse/app-bridge 0.1.0-c8d8dc6285bbd → 0.1.0-c8dc2a697434d
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 +7 -7
- package/dist/index.d.ts +595 -24
- package/dist/mdmodel/body.d.ts +84 -0
- package/dist/mdmodel/built-in.d.ts +3 -0
- package/dist/mdmodel/definition.d.ts +20 -11
- package/dist/mdmodel/document.d.ts +14 -8
- package/dist/mdmodel/event.d.ts +76 -0
- package/dist/mdmodel/facts.d.ts +14 -0
- package/dist/mdmodel/fields.d.ts +1 -1
- package/dist/mdmodel/house-model.d.ts +869 -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 +40 -15
- 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/moment.d.ts +6 -0
- package/dist/mdmodel/not-ready.d.ts +1 -0
- package/dist/mdmodel/paths.d.ts +15 -1
- package/dist/mdmodel/pattern.d.ts +9 -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 +2 -2
- package/dist/mdmodel/reserved.d.ts +5 -0
- package/dist/mdmodel/room-types.d.ts +6 -0
- package/dist/mdmodel/types.d.ts +22 -17
- package/dist/mdmodel/validate.d.ts +12 -6
- package/dist/mdmodel/yaml.d.ts +4 -4
- package/dist/mdruntime/actions.d.ts +25 -0
- package/dist/mdruntime/adapter.d.ts +181 -113
- package/dist/mdruntime/attached-model.d.ts +6 -0
- package/dist/mdruntime/authored.d.ts +87 -0
- package/dist/mdruntime/bootstrap.d.ts +43 -0
- package/dist/mdruntime/cell.d.ts +5 -0
- package/dist/mdruntime/chain.d.ts +2 -1
- package/dist/mdruntime/change-set.d.ts +4 -0
- package/dist/mdruntime/change.d.ts +5 -0
- package/dist/mdruntime/client.d.ts +33 -25
- package/dist/mdruntime/collection.d.ts +31 -7
- package/dist/mdruntime/compile.d.ts +8 -6
- package/dist/mdruntime/conversation-live.d.ts +149 -0
- package/dist/mdruntime/conversation-row.d.ts +39 -0
- package/dist/mdruntime/conversation.d.ts +72 -51
- package/dist/mdruntime/declaration.d.ts +9 -0
- package/dist/mdruntime/durability.d.ts +19 -1
- package/dist/mdruntime/failure.d.ts +3 -0
- package/dist/mdruntime/figures.d.ts +48 -0
- package/dist/mdruntime/holdings.d.ts +28 -0
- package/dist/mdruntime/identity.d.ts +0 -1
- package/dist/mdruntime/install.d.ts +59 -0
- package/dist/mdruntime/listing.d.ts +51 -0
- package/dist/mdruntime/live.d.ts +24 -0
- package/dist/mdruntime/media.d.ts +24 -0
- package/dist/mdruntime/messages.d.ts +35 -5
- package/dist/mdruntime/model.d.ts +8 -11
- package/dist/mdruntime/observation.d.ts +29 -13
- package/dist/mdruntime/opened.d.ts +1 -1
- package/dist/mdruntime/outcome.d.ts +30 -7
- package/dist/mdruntime/overlay.d.ts +7 -2
- package/dist/mdruntime/preparation.d.ts +40 -0
- package/dist/mdruntime/presence.d.ts +57 -0
- package/dist/mdruntime/query.d.ts +18 -208
- package/dist/mdruntime/reach.d.ts +21 -13
- package/dist/mdruntime/readiness.d.ts +12 -21
- package/dist/mdruntime/reads.d.ts +38 -0
- package/dist/mdruntime/recovery.d.ts +3 -0
- package/dist/mdruntime/refresh.d.ts +26 -0
- package/dist/mdruntime/replica.d.ts +13 -20
- package/dist/mdruntime/retried.d.ts +29 -0
- package/dist/mdruntime/room-draft.d.ts +51 -12
- package/dist/mdruntime/room-drafts.d.ts +23 -0
- package/dist/mdruntime/runtime.d.ts +33 -0
- package/dist/mdruntime/save.d.ts +42 -84
- package/dist/mdruntime/saves.d.ts +33 -0
- package/dist/mdruntime/search.d.ts +12 -63
- package/dist/mdruntime/seed.d.ts +11 -2
- 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 +58 -0
- package/dist/mdruntime/status.d.ts +4 -5
- package/dist/mdruntime/store/installs.d.ts +29 -0
- package/dist/mdruntime/store/readiness.d.ts +10 -0
- package/dist/mdruntime/store/records.d.ts +222 -0
- package/dist/mdruntime/store/room-held.d.ts +7 -0
- package/dist/mdruntime/store/rooms-shown.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 +113 -157
- package/dist/mdruntime/stored.d.ts +79 -57
- package/dist/mdruntime/surface.d.ts +89 -0
- package/dist/mdruntime/tables.d.ts +129 -107
- package/dist/mdruntime/tallies.d.ts +17 -0
- package/dist/mdruntime/transfer.d.ts +0 -5
- package/dist/mdruntime/wire.d.ts +75 -13
- 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/test-host.d.ts +8 -4
- package/dist/test-host.js +28 -28
- package/docs/families.md +79 -67
- package/package.json +2 -2
- package/dist/calls.d.ts +0 -1007
- package/dist/calls.js +0 -1
- package/dist/mdmodel/blocks.d.ts +0 -10
- package/dist/mdmodel/condition.d.ts +0 -160
- package/dist/mdmodel/links.d.ts +0 -28
- package/dist/mdmodel/profile.d.ts +0 -5
- package/dist/mdruntime/connection.d.ts +0 -151
- package/dist/mdruntime/file.d.ts +0 -11
- package/dist/mdruntime/fulltext.d.ts +0 -26
- package/dist/mdruntime/shared.d.ts +0 -15
package/dist/calls.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/mdmodel/blocks.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Extent } from './types.js';
|
|
2
|
-
export type HeadingLine = {
|
|
3
|
-
readonly level: number;
|
|
4
|
-
readonly name: string;
|
|
5
|
-
readonly start: number;
|
|
6
|
-
readonly textEnd: number;
|
|
7
|
-
readonly next: number;
|
|
8
|
-
};
|
|
9
|
-
export declare function headingLines(content: string, from: number, to: number): HeadingLine[];
|
|
10
|
-
export declare function blockRanges(content: string, from: number, to: number): Extent[];
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { type Definition, type ValueFacts } from './definition.js';
|
|
2
|
-
import type { Document, VerifiedModel } from './types.js';
|
|
3
|
-
export type ConditionValue = string | number | boolean;
|
|
4
|
-
export declare const CONDITION_OPERATORS: readonly ['eq', 'in', 'exists', 'contains', 'gt', 'gte', 'lt', 'lte', 'prefix'];
|
|
5
|
-
export type ConditionOperator = (typeof CONDITION_OPERATORS)[number];
|
|
6
|
-
export type ConditionTest = {
|
|
7
|
-
readonly all: readonly ConditionTest[];
|
|
8
|
-
} | {
|
|
9
|
-
readonly any: readonly ConditionTest[];
|
|
10
|
-
} | {
|
|
11
|
-
readonly not: ConditionTest;
|
|
12
|
-
} | ({
|
|
13
|
-
readonly path: string;
|
|
14
|
-
} & ({
|
|
15
|
-
readonly eq: ConditionValue;
|
|
16
|
-
} | {
|
|
17
|
-
readonly in: readonly ConditionValue[];
|
|
18
|
-
} | {
|
|
19
|
-
readonly exists: boolean;
|
|
20
|
-
} | {
|
|
21
|
-
readonly contains: ConditionValue;
|
|
22
|
-
} | {
|
|
23
|
-
readonly gt: number | string;
|
|
24
|
-
} | {
|
|
25
|
-
readonly gte: number | string;
|
|
26
|
-
} | {
|
|
27
|
-
readonly lt: number | string;
|
|
28
|
-
} | {
|
|
29
|
-
readonly lte: number | string;
|
|
30
|
-
} | {
|
|
31
|
-
readonly prefix: string;
|
|
32
|
-
}));
|
|
33
|
-
export type ConditionScope = {
|
|
34
|
-
readonly type: string;
|
|
35
|
-
} | {
|
|
36
|
-
readonly folder: string;
|
|
37
|
-
} | {
|
|
38
|
-
readonly document: string;
|
|
39
|
-
};
|
|
40
|
-
type DocumentEventBase = {
|
|
41
|
-
readonly on: 'documents';
|
|
42
|
-
readonly scope: ConditionScope;
|
|
43
|
-
readonly by?: ConditionTest;
|
|
44
|
-
readonly moved_between_rooms?: boolean;
|
|
45
|
-
};
|
|
46
|
-
export type DocumentCondition = (DocumentEventBase & {
|
|
47
|
-
readonly mode: 'starts_matching';
|
|
48
|
-
readonly new_documents: boolean;
|
|
49
|
-
readonly match: ConditionTest;
|
|
50
|
-
}) | (DocumentEventBase & {
|
|
51
|
-
readonly mode: 'field_changes';
|
|
52
|
-
readonly field: string;
|
|
53
|
-
readonly from?: readonly ConditionValue[] | 'new';
|
|
54
|
-
readonly to?: readonly ConditionValue[] | 'deleted';
|
|
55
|
-
readonly match?: ConditionTest;
|
|
56
|
-
});
|
|
57
|
-
export type ItemCondition = {
|
|
58
|
-
readonly on: 'items';
|
|
59
|
-
readonly source?: string;
|
|
60
|
-
readonly address?: string;
|
|
61
|
-
readonly match?: ConditionTest;
|
|
62
|
-
};
|
|
63
|
-
export type CronCondition = {
|
|
64
|
-
readonly on: 'clock';
|
|
65
|
-
readonly cron: string;
|
|
66
|
-
readonly time_zone: string;
|
|
67
|
-
};
|
|
68
|
-
export type DateCondition = {
|
|
69
|
-
readonly on: 'clock';
|
|
70
|
-
readonly scope: {
|
|
71
|
-
readonly type: string;
|
|
72
|
-
};
|
|
73
|
-
readonly date: string;
|
|
74
|
-
readonly days: number;
|
|
75
|
-
readonly at: string;
|
|
76
|
-
readonly time_zone: string;
|
|
77
|
-
readonly match?: ConditionTest;
|
|
78
|
-
};
|
|
79
|
-
export type Condition = DocumentCondition | ItemCondition | CronCondition | DateCondition;
|
|
80
|
-
export type FactKind = 'string' | 'number' | 'boolean' | 'date' | 'time' | 'enum' | 'reference';
|
|
81
|
-
type Scalar = string | number | boolean;
|
|
82
|
-
export type Fact = {
|
|
83
|
-
readonly kind: FactKind;
|
|
84
|
-
readonly value: Scalar;
|
|
85
|
-
readonly member?: string;
|
|
86
|
-
} | {
|
|
87
|
-
readonly kind: 'prose';
|
|
88
|
-
} | {
|
|
89
|
-
readonly kind: 'null';
|
|
90
|
-
} | {
|
|
91
|
-
readonly kind: 'unreadable';
|
|
92
|
-
} | {
|
|
93
|
-
readonly kind: 'list';
|
|
94
|
-
readonly items: readonly Fact[];
|
|
95
|
-
} | {
|
|
96
|
-
readonly kind: 'object';
|
|
97
|
-
readonly fields: Readonly<Record<string, Fact>>;
|
|
98
|
-
};
|
|
99
|
-
export type DocumentFacts = {
|
|
100
|
-
readonly id: string;
|
|
101
|
-
readonly path: string;
|
|
102
|
-
readonly type: string | null;
|
|
103
|
-
readonly fields: Readonly<Record<string, Fact>>;
|
|
104
|
-
readonly sections: readonly string[];
|
|
105
|
-
};
|
|
106
|
-
export declare const WRITE_DOORS: readonly ['browser', 'agent', 'client'];
|
|
107
|
-
export type WriteDoor = (typeof WRITE_DOORS)[number];
|
|
108
|
-
export type Actor = {
|
|
109
|
-
readonly user?: string;
|
|
110
|
-
readonly site?: string;
|
|
111
|
-
readonly door?: WriteDoor;
|
|
112
|
-
};
|
|
113
|
-
export type DocumentEvent = {
|
|
114
|
-
readonly before: DocumentFacts | null;
|
|
115
|
-
readonly after: DocumentFacts | null;
|
|
116
|
-
readonly changed: readonly string[];
|
|
117
|
-
readonly by: Actor;
|
|
118
|
-
readonly moved_between_rooms: boolean;
|
|
119
|
-
};
|
|
120
|
-
export type ItemFacts = {
|
|
121
|
-
readonly delivery: string;
|
|
122
|
-
readonly source: string | null;
|
|
123
|
-
readonly address: string | null;
|
|
124
|
-
readonly container: string | null;
|
|
125
|
-
readonly author: string | null;
|
|
126
|
-
readonly headers: Readonly<Record<string, string>>;
|
|
127
|
-
readonly json: {
|
|
128
|
-
readonly value: unknown;
|
|
129
|
-
} | null;
|
|
130
|
-
};
|
|
131
|
-
export type Resolved = {
|
|
132
|
-
readonly id: string;
|
|
133
|
-
readonly member?: string;
|
|
134
|
-
};
|
|
135
|
-
type Truth = boolean | undefined;
|
|
136
|
-
export declare function factKind(facts: ValueFacts): FactKind | null;
|
|
137
|
-
export declare function facts(document: Document, at: {
|
|
138
|
-
readonly id: string;
|
|
139
|
-
readonly path: string;
|
|
140
|
-
}, model: VerifiedModel, resolve: (target: string) => Resolved | undefined): DocumentFacts;
|
|
141
|
-
export declare function prosePaths(facts: DocumentFacts): string[];
|
|
142
|
-
export declare function datePointers(fields: Readonly<Record<string, ValueFacts>>): string[];
|
|
143
|
-
export declare function valuedChange(definition: Definition, field: string): boolean;
|
|
144
|
-
export declare function changeFields(definition: Definition): string[];
|
|
145
|
-
export declare function memberPointers(definition: Definition, memberType: string): string[];
|
|
146
|
-
export declare const DOCUMENT_PATHS: readonly string[];
|
|
147
|
-
export declare const ACTOR_PATHS: readonly string[];
|
|
148
|
-
export declare const ITEM_PATHS: readonly string[];
|
|
149
|
-
export declare function testOperators(definitions: readonly Definition[], path: string, memberType: string | null): readonly ConditionOperator[];
|
|
150
|
-
export declare function actorOperators(path: string): readonly ConditionOperator[];
|
|
151
|
-
export declare function itemOperators(path: string): readonly ConditionOperator[];
|
|
152
|
-
export declare function itemKind(path: string): FactKind | null;
|
|
153
|
-
export declare function dated(value: unknown): value is string;
|
|
154
|
-
export declare function instant(value: unknown): bigint | undefined;
|
|
155
|
-
export declare function pointed(value: unknown, pointer: string): unknown;
|
|
156
|
-
export declare function members(document: DocumentFacts, path: string): readonly string[];
|
|
157
|
-
export declare function holds(test: ConditionTest, document: DocumentFacts): Truth;
|
|
158
|
-
export declare function fires(condition: DocumentCondition, event: DocumentEvent): boolean;
|
|
159
|
-
export declare function itemFires(condition: ItemCondition, item: ItemFacts): boolean;
|
|
160
|
-
export {};
|
package/dist/mdmodel/links.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export declare function escapes(text: string, index: number): boolean;
|
|
2
|
-
export declare function spanCursor(spans: readonly (readonly [number, number])[]): (index: number) => number | undefined;
|
|
3
|
-
export type HrefOccurrence = {
|
|
4
|
-
readonly href: string;
|
|
5
|
-
readonly start: number;
|
|
6
|
-
readonly end: number;
|
|
7
|
-
readonly bracketed: boolean;
|
|
8
|
-
};
|
|
9
|
-
export type LinkUse = {
|
|
10
|
-
readonly start: number;
|
|
11
|
-
readonly end: number;
|
|
12
|
-
readonly labelStart: number;
|
|
13
|
-
readonly labelEnd: number;
|
|
14
|
-
readonly destination: HrefOccurrence;
|
|
15
|
-
};
|
|
16
|
-
export type DefinitionBlock = {
|
|
17
|
-
readonly start: number;
|
|
18
|
-
readonly end: number;
|
|
19
|
-
readonly destination: HrefOccurrence;
|
|
20
|
-
};
|
|
21
|
-
export type LinkInventory = {
|
|
22
|
-
readonly uses: readonly LinkUse[];
|
|
23
|
-
readonly blocks: readonly DefinitionBlock[];
|
|
24
|
-
};
|
|
25
|
-
export declare function fenceSpans(text: string): readonly (readonly [number, number])[];
|
|
26
|
-
export declare function linkInventory(body: string): LinkInventory;
|
|
27
|
-
export declare function destinations(inventory: LinkInventory): readonly HrefOccurrence[];
|
|
28
|
-
export declare function hrefOccurrences(body: string): readonly HrefOccurrence[];
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { type TypesResult } from './model.js';
|
|
2
|
-
import { type Observation } from './observation.js';
|
|
3
|
-
import { type DocumentQuery, type DocumentResult, type GroupQuery, type GroupResult, type PendingResult } from './query.js';
|
|
4
|
-
import { type EntrySeed } from './seed.js';
|
|
5
|
-
import { type SearchRequest, type SearchResult } from './search.js';
|
|
6
|
-
import { type Adapter, type Authorization, type Member, type ProviderRefusal, type ServiceMode } from './adapter.js';
|
|
7
|
-
import { type ChatDraftSurface, type ConversationAgent, type ConversationEntry, type ConversationOptions, type ConversationSurface, type ConversationView } from './conversation.js';
|
|
8
|
-
import { type WrittenBy } from './change.js';
|
|
9
|
-
import type { Open } from './open.js';
|
|
10
|
-
import { type BinaryLinkAnswer, type CallResult, type HeldBinaryAnswer, type HistoryAnswer, type QueueEntry, type Resolution } from './outcome.js';
|
|
11
|
-
import { type Recovery } from './recovery.js';
|
|
12
|
-
import { type SaveRefusal } from './save.js';
|
|
13
|
-
import { type RoomDraft, type RoomDraftParts, type RoomDraftWrite } from './room-draft.js';
|
|
14
|
-
import { type SyncStatus } from './status.js';
|
|
15
|
-
import { type RuntimeShell } from './durability.js';
|
|
16
|
-
import { type CodeAvailability, type Persistence, type Readiness, type SearchObligation, type Space } from './readiness.js';
|
|
17
|
-
import type { RuntimeDatabase } from './tables.js';
|
|
18
|
-
import { type NarrowedView, type PortReach, type RuntimeView } from './reach.js';
|
|
19
|
-
export type AppTypedSelection = {
|
|
20
|
-
roots: readonly string[];
|
|
21
|
-
model: TypesResult;
|
|
22
|
-
};
|
|
23
|
-
export type AppRoom = {
|
|
24
|
-
name: string;
|
|
25
|
-
locator: string;
|
|
26
|
-
handle: string;
|
|
27
|
-
operations: import('./adapter.js').OperationScopes;
|
|
28
|
-
replica: import('./adapter.js').ReplicaAdmission;
|
|
29
|
-
model: TypesResult;
|
|
30
|
-
typedSelection: AppTypedSelection | null;
|
|
31
|
-
providerOwnedPaths: readonly string[];
|
|
32
|
-
roomVersion: string | null;
|
|
33
|
-
documents: number;
|
|
34
|
-
synchronizationAvailable: boolean;
|
|
35
|
-
refusal: ProviderRefusal | null;
|
|
36
|
-
locked: boolean;
|
|
37
|
-
};
|
|
38
|
-
export type RoomSchemas = {
|
|
39
|
-
collection: TypesResult;
|
|
40
|
-
typedSelection: TypesResult | null;
|
|
41
|
-
};
|
|
42
|
-
type RefusalReason = 'missing-required-guarantee' | 'revoked-authorization';
|
|
43
|
-
export type ConnectionRefusalCode = Open<RefusalReason>;
|
|
44
|
-
export type ConnectionRefusal = {
|
|
45
|
-
code: ConnectionRefusalCode;
|
|
46
|
-
retryable: boolean;
|
|
47
|
-
reauthorizationOffered: boolean;
|
|
48
|
-
refusal: ProviderRefusal | null;
|
|
49
|
-
};
|
|
50
|
-
export type MdRuntimeOptions = {
|
|
51
|
-
adapter: Adapter;
|
|
52
|
-
shell: RuntimeShell;
|
|
53
|
-
database: RuntimeDatabase;
|
|
54
|
-
authorization?: Authorization;
|
|
55
|
-
signal?: AbortSignal;
|
|
56
|
-
recovery?: Recovery;
|
|
57
|
-
};
|
|
58
|
-
export type SaveResult = {
|
|
59
|
-
outcome: 'saved';
|
|
60
|
-
identifier: string;
|
|
61
|
-
} | ({
|
|
62
|
-
outcome: 'refused';
|
|
63
|
-
} & SaveRefusal);
|
|
64
|
-
export type SavedRoomDraft = {
|
|
65
|
-
readonly path: string;
|
|
66
|
-
readonly revision: string;
|
|
67
|
-
};
|
|
68
|
-
export type SavedParts = {
|
|
69
|
-
readonly path: string;
|
|
70
|
-
readonly parts: RoomDraftParts;
|
|
71
|
-
};
|
|
72
|
-
export type RoomDraftSurface = {
|
|
73
|
-
list(): Promise<readonly RoomDraft[]>;
|
|
74
|
-
read(room: string, path: string): Promise<RoomDraft | null>;
|
|
75
|
-
write(room: string, path: string, revision: string | null, parts: unknown, next?: string): Promise<RoomDraftWrite>;
|
|
76
|
-
discard(room: string, path: string, revision: string): Promise<RoomDraftWrite>;
|
|
77
|
-
};
|
|
78
|
-
export type PresentationSurface = {
|
|
79
|
-
read(app: string): Promise<unknown>;
|
|
80
|
-
write(app: string, value: unknown): Promise<void>;
|
|
81
|
-
edit(app: string, members: Readonly<Record<string, unknown>>): Promise<void>;
|
|
82
|
-
};
|
|
83
|
-
export type BinaryFileSurface = {
|
|
84
|
-
read(room: string, path: string, revision?: string): Promise<HeldBinaryAnswer>;
|
|
85
|
-
link(room: string, path: string, revision?: string): Promise<BinaryLinkAnswer>;
|
|
86
|
-
part(file: string, part: number): Promise<Uint8Array | null>;
|
|
87
|
-
};
|
|
88
|
-
export type HistoryQuery = {
|
|
89
|
-
revision?: string;
|
|
90
|
-
pageToken?: string;
|
|
91
|
-
};
|
|
92
|
-
export type MdRuntime = {
|
|
93
|
-
loaded(): Promise<void>;
|
|
94
|
-
rooms(): readonly AppRoom[];
|
|
95
|
-
query: {
|
|
96
|
-
(query: DocumentQuery): Promise<DocumentResult | PendingResult>;
|
|
97
|
-
(query: GroupQuery): Promise<GroupResult | PendingResult>;
|
|
98
|
-
};
|
|
99
|
-
search(request: SearchRequest): Promise<SearchResult>;
|
|
100
|
-
types(locator: string): RoomSchemas;
|
|
101
|
-
roomDraft: RoomDraftSurface;
|
|
102
|
-
conversation: ConversationSurface;
|
|
103
|
-
chatDraft: ChatDraftSurface;
|
|
104
|
-
presentation: PresentationSurface;
|
|
105
|
-
save(room: string, roomDrafts: readonly SavedRoomDraft[], writtenBy?: WrittenBy): Promise<SaveResult>;
|
|
106
|
-
saveParts(room: string, parts: readonly SavedParts[], writtenBy?: WrittenBy): Promise<SaveResult>;
|
|
107
|
-
history(locator: string, path: string, query?: HistoryQuery): Promise<HistoryAnswer>;
|
|
108
|
-
resolve(room: string, path: string, destination: string): Promise<Resolution>;
|
|
109
|
-
binaryFile: BinaryFileSurface;
|
|
110
|
-
call(name: string, input: unknown): Promise<CallResult>;
|
|
111
|
-
reached(locator: string, roomVersion: string, path?: string): Promise<boolean>;
|
|
112
|
-
log(): string;
|
|
113
|
-
persistence(): boolean;
|
|
114
|
-
retry(): Promise<void>;
|
|
115
|
-
cleanUp(): Promise<number>;
|
|
116
|
-
observe: {
|
|
117
|
-
(topic: 'rooms'): Promise<Observation<readonly AppRoom[]>>;
|
|
118
|
-
(topic: 'readiness'): Promise<Observation<Readiness>>;
|
|
119
|
-
(topic: 'connection-refusal'): Promise<Observation<ConnectionRefusal | null>>;
|
|
120
|
-
(topic: 'storage-loss'): Promise<Observation<string | null>>;
|
|
121
|
-
(topic: 'sync-status'): Promise<Observation<SyncStatus>>;
|
|
122
|
-
(topic: 'service-mode'): Promise<Observation<ServiceMode>>;
|
|
123
|
-
(topic: 'member'): Promise<Observation<Member | null>>;
|
|
124
|
-
(topic: 'query', query: DocumentQuery): Promise<Observation<DocumentResult | PendingResult>>;
|
|
125
|
-
(topic: 'query', query: GroupQuery): Promise<Observation<GroupResult | PendingResult>>;
|
|
126
|
-
(topic: 'queue', locator: string): Promise<Observation<readonly QueueEntry[]>>;
|
|
127
|
-
(topic: 'room-drafts'): Promise<Observation<readonly RoomDraft[]>>;
|
|
128
|
-
(topic: 'presentation', app: string): Promise<Observation<unknown>>;
|
|
129
|
-
(topic: 'conversation', conversation: string, options: ConversationOptions): Promise<Observation<ConversationView>>;
|
|
130
|
-
(topic: 'conversations'): Promise<Observation<readonly ConversationEntry[]>>;
|
|
131
|
-
(topic: 'agents'): Promise<Observation<readonly ConversationAgent[]>>;
|
|
132
|
-
};
|
|
133
|
-
reauthorize(): Promise<void>;
|
|
134
|
-
};
|
|
135
|
-
export type RuntimeTopic = 'rooms' | 'readiness' | 'connection-refusal' | 'storage-loss' | 'sync-status' | 'service-mode' | 'member' | 'query' | 'queue' | 'room-drafts' | 'presentation' | 'conversation' | 'conversations' | 'agents';
|
|
136
|
-
export type ReadinessPort = {
|
|
137
|
-
readonly target: string;
|
|
138
|
-
readonly code: CodeAvailability;
|
|
139
|
-
readonly space: Space | null;
|
|
140
|
-
readonly search: SearchObligation;
|
|
141
|
-
};
|
|
142
|
-
export type ComposedRuntime = RuntimeView & {
|
|
143
|
-
seed(entry: EntrySeed): void;
|
|
144
|
-
stop(): Promise<void>;
|
|
145
|
-
lose(locators: readonly string[]): Promise<void>;
|
|
146
|
-
persisted(answer: Persistence): void;
|
|
147
|
-
shown(onScreen: boolean): void;
|
|
148
|
-
within(reach: PortReach | null, port: ReadinessPort): NarrowedView;
|
|
149
|
-
};
|
|
150
|
-
export declare function composeRuntime(options: MdRuntimeOptions): ComposedRuntime;
|
|
151
|
-
export {};
|
package/dist/mdruntime/file.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export type ChosenFile = {
|
|
2
|
-
name: string;
|
|
3
|
-
blob: Blob;
|
|
4
|
-
};
|
|
5
|
-
export type FileDeclaration = {
|
|
6
|
-
name: string;
|
|
7
|
-
mediaType: string;
|
|
8
|
-
byteLength: number;
|
|
9
|
-
contentHash: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function declaredFile(file: ChosenFile): Promise<FileDeclaration>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type QueryRoom } from './compile.js';
|
|
2
|
-
import type { Plan } from './query.js';
|
|
3
|
-
import type { HitCursor, SearchWindow } from './search.js';
|
|
4
|
-
import type { Connection } from './tables.js';
|
|
5
|
-
export declare const SEARCH_TABLES: readonly string[];
|
|
6
|
-
export type SearchAsk = {
|
|
7
|
-
readonly text: string;
|
|
8
|
-
readonly limit: number;
|
|
9
|
-
readonly after: readonly [HitCursor, HitCursor] | null;
|
|
10
|
-
readonly total: boolean;
|
|
11
|
-
readonly documents: {
|
|
12
|
-
readonly plan: Plan;
|
|
13
|
-
readonly rooms: readonly QueryRoom[];
|
|
14
|
-
readonly beneath: readonly {
|
|
15
|
-
readonly key: number;
|
|
16
|
-
readonly roots: readonly string[];
|
|
17
|
-
}[];
|
|
18
|
-
} | null;
|
|
19
|
-
readonly conversations: readonly string[];
|
|
20
|
-
};
|
|
21
|
-
export declare function indexDocument(connection: Connection, id: number, path: string, content: string): void;
|
|
22
|
-
export declare function indexMessage(connection: Connection, id: number, text: string): void;
|
|
23
|
-
export declare function unindexDocuments(connection: Connection, ids: Iterable<number>): void;
|
|
24
|
-
export declare function unindexMessages(connection: Connection, ids: Iterable<number>): void;
|
|
25
|
-
export declare function unindexAll(connection: Connection): void;
|
|
26
|
-
export declare function searched(connection: Connection, ask: SearchAsk): SearchWindow;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type Paths<V> = Readonly<Record<string, V>>;
|
|
2
|
-
export declare function entriesIn<V>(map: Paths<V>): Generator<readonly [string, V]>;
|
|
3
|
-
export declare function keysIn(...maps: readonly Paths<unknown>[]): Generator<number, Set<string>, void>;
|
|
4
|
-
export declare function sortedKeys(map: Paths<unknown>): Generator<number, readonly string[], void>;
|
|
5
|
-
export declare function sorting(keys: Iterable<string>): Generator<number, readonly string[], void>;
|
|
6
|
-
export declare function sharing<V>(map: Paths<V>): Generator<number, Paths<V>, void>;
|
|
7
|
-
export declare function shared<V>(map: Paths<V>): Paths<V>;
|
|
8
|
-
export declare function patched<V>(base: Paths<V>, set: Iterable<readonly [string, V]>, removed?: Iterable<string>): Paths<V>;
|
|
9
|
-
export declare function patching<V>(base: Paths<V>, set: Iterable<readonly [string, V]>, removed?: Iterable<string>): Generator<number, Paths<V>, void>;
|
|
10
|
-
export declare function sizeOf<V>(map: Paths<V>): number;
|
|
11
|
-
export declare function differences<V>(left: Paths<V>, right: Paths<V>, same?: (left: V, right: V) => boolean): Generator<number, ReadonlySet<string>, void>;
|
|
12
|
-
export declare function differing<V>(left: Paths<V>, right: Paths<V>, same?: (left: V, right: V) => boolean): ReadonlySet<string>;
|
|
13
|
-
export declare function drafted<V>(base: Paths<V>): Record<string, V>;
|
|
14
|
-
export declare function settled<V>(draft: Record<string, V>): Paths<V>;
|
|
15
|
-
export declare function settling<V>(draft: Record<string, V>): Generator<number, Paths<V>, void>;
|