@agentshouse/app-bridge 0.1.0-c8d97d63f2350 → 0.1.0-c8dd3de04bf64
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 +6 -6
- package/dist/index.d.ts +196 -132
- package/dist/mdmodel/definition.d.ts +1 -1
- package/dist/mdmodel/document.d.ts +2 -1
- package/dist/mdmodel/event.d.ts +77 -0
- package/dist/mdmodel/facts.d.ts +14 -0
- package/dist/mdmodel/index.d.ts +19 -7
- package/dist/mdmodel/kinds.d.ts +17 -0
- 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/reserved.d.ts +5 -0
- package/dist/mdmodel/types.d.ts +11 -0
- package/dist/mdmodel/validate.d.ts +7 -5
- package/dist/mdruntime/actions.d.ts +19 -0
- package/dist/mdruntime/adapter.d.ts +45 -25
- package/dist/mdruntime/attached-model.d.ts +7 -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.d.ts +1 -0
- package/dist/mdruntime/client.d.ts +23 -5
- package/dist/mdruntime/collection.d.ts +2 -1
- package/dist/mdruntime/compile.d.ts +6 -6
- package/dist/mdruntime/conversation-live.d.ts +135 -0
- package/dist/mdruntime/conversation-row.d.ts +32 -0
- package/dist/mdruntime/conversation.d.ts +34 -38
- package/dist/mdruntime/durability.d.ts +15 -0
- package/dist/mdruntime/figures.d.ts +48 -0
- package/dist/mdruntime/holdings.d.ts +28 -0
- package/dist/mdruntime/identity.d.ts +0 -1
- package/dist/mdruntime/install.d.ts +55 -0
- package/dist/mdruntime/job.d.ts +32 -0
- package/dist/mdruntime/listing.d.ts +52 -0
- package/dist/mdruntime/live.d.ts +22 -0
- package/dist/mdruntime/log.d.ts +5 -0
- package/dist/mdruntime/media.d.ts +1 -1
- package/dist/mdruntime/messages.d.ts +27 -3
- package/dist/mdruntime/model.d.ts +2 -9
- package/dist/mdruntime/observation.d.ts +2 -2
- package/dist/mdruntime/outcome.d.ts +4 -1
- package/dist/mdruntime/overlay.d.ts +1 -0
- package/dist/mdruntime/preparation.d.ts +19 -0
- package/dist/mdruntime/query.d.ts +13 -209
- package/dist/mdruntime/reach.d.ts +14 -12
- package/dist/mdruntime/readiness.d.ts +0 -3
- package/dist/mdruntime/reads.d.ts +36 -0
- package/dist/mdruntime/refresh.d.ts +26 -0
- package/dist/mdruntime/replica.d.ts +9 -8
- package/dist/mdruntime/room-draft.d.ts +4 -5
- package/dist/mdruntime/room-drafts.d.ts +23 -0
- package/dist/mdruntime/runtime.d.ts +42 -0
- package/dist/mdruntime/save.d.ts +5 -1
- package/dist/mdruntime/saves.d.ts +69 -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 +19 -0
- package/dist/mdruntime/socket/rooms.d.ts +43 -0
- package/dist/mdruntime/socket/session.d.ts +37 -0
- package/dist/mdruntime/socket.d.ts +69 -0
- package/dist/mdruntime/source.d.ts +60 -0
- package/dist/mdruntime/status.d.ts +0 -2
- package/dist/mdruntime/store/fences.d.ts +15 -0
- package/dist/mdruntime/store/installs.d.ts +29 -0
- package/dist/mdruntime/store/readiness.d.ts +9 -0
- package/dist/mdruntime/store/records.d.ts +211 -0
- package/dist/mdruntime/store/room-held.d.ts +7 -0
- package/dist/mdruntime/store/space.d.ts +10 -0
- package/dist/mdruntime/store/watchers.d.ts +16 -0
- package/dist/mdruntime/store/writes.d.ts +23 -0
- package/dist/mdruntime/store.d.ts +107 -145
- package/dist/mdruntime/stored.d.ts +59 -33
- package/dist/mdruntime/surface.d.ts +87 -0
- package/dist/mdruntime/tables.d.ts +120 -29
- package/dist/mdruntime/tallies.d.ts +17 -0
- package/dist/mdruntime/transfer.d.ts +4 -0
- package/dist/mdruntime/turn.d.ts +8 -0
- package/dist/mdruntime/wire.d.ts +17 -1
- package/dist/test-host.js +1 -1
- package/docs/families.md +20 -8
- package/package.json +1 -1
- package/dist/mdmodel/condition.d.ts +0 -167
- package/dist/mdmodel/profile.d.ts +0 -5
- package/dist/mdruntime/connection.d.ts +0 -152
- package/dist/mdruntime/fulltext.d.ts +0 -26
|
@@ -1,152 +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 AttachAnswer, type BinaryLinkAnswer, type CallResult, type HeldBinaryAnswer, type HeldShownAnswer, 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
|
-
usableWhenHeld?: readonly string[];
|
|
58
|
-
};
|
|
59
|
-
export type SaveResult = {
|
|
60
|
-
outcome: 'saved';
|
|
61
|
-
identifier: string;
|
|
62
|
-
} | ({
|
|
63
|
-
outcome: 'refused';
|
|
64
|
-
} & SaveRefusal);
|
|
65
|
-
export type SavedRoomDraft = {
|
|
66
|
-
readonly path: string;
|
|
67
|
-
readonly revision: string;
|
|
68
|
-
};
|
|
69
|
-
export type SavedParts = {
|
|
70
|
-
readonly path: string;
|
|
71
|
-
readonly parts: RoomDraftParts;
|
|
72
|
-
};
|
|
73
|
-
export type RoomDraftSurface = {
|
|
74
|
-
list(): Promise<readonly RoomDraft[]>;
|
|
75
|
-
read(room: string, path: string): Promise<RoomDraft | null>;
|
|
76
|
-
write(room: string, path: string, revision: string | null, parts: unknown, next?: string): Promise<RoomDraftWrite>;
|
|
77
|
-
discard(room: string, path: string, revision: string): Promise<RoomDraftWrite>;
|
|
78
|
-
};
|
|
79
|
-
export type PresentationSurface = {
|
|
80
|
-
read(app: string): Promise<unknown>;
|
|
81
|
-
write(app: string, value: unknown): Promise<void>;
|
|
82
|
-
edit(app: string, members: Readonly<Record<string, unknown>>): Promise<void>;
|
|
83
|
-
};
|
|
84
|
-
export type BinaryFileSurface = {
|
|
85
|
-
read(room: string, path: string, revision?: string): Promise<HeldBinaryAnswer>;
|
|
86
|
-
link(room: string, path: string, revision?: string): Promise<BinaryLinkAnswer>;
|
|
87
|
-
show(room: string, path: string, revision?: string): Promise<HeldShownAnswer>;
|
|
88
|
-
attach(room: string, file: File): Promise<AttachAnswer>;
|
|
89
|
-
part(file: string, part: number): Promise<Uint8Array | null>;
|
|
90
|
-
};
|
|
91
|
-
export type HistoryQuery = {
|
|
92
|
-
revision?: string;
|
|
93
|
-
pageToken?: string;
|
|
94
|
-
};
|
|
95
|
-
export type MdRuntime = {
|
|
96
|
-
loaded(): Promise<void>;
|
|
97
|
-
rooms(): Promise<readonly AppRoom[]>;
|
|
98
|
-
query: {
|
|
99
|
-
(query: DocumentQuery): Promise<DocumentResult | PendingResult>;
|
|
100
|
-
(query: GroupQuery): Promise<GroupResult | PendingResult>;
|
|
101
|
-
};
|
|
102
|
-
search(request: SearchRequest): Promise<SearchResult>;
|
|
103
|
-
types(locator: string): RoomSchemas;
|
|
104
|
-
roomDraft: RoomDraftSurface;
|
|
105
|
-
conversation: ConversationSurface;
|
|
106
|
-
chatDraft: ChatDraftSurface;
|
|
107
|
-
presentation: PresentationSurface;
|
|
108
|
-
save(room: string, roomDrafts: readonly SavedRoomDraft[], writtenBy?: WrittenBy): Promise<SaveResult>;
|
|
109
|
-
saveParts(room: string, parts: readonly SavedParts[], writtenBy?: WrittenBy): Promise<SaveResult>;
|
|
110
|
-
history(locator: string, path: string, query?: HistoryQuery): Promise<HistoryAnswer>;
|
|
111
|
-
resolve(room: string, path: string, destination: string): Promise<Resolution>;
|
|
112
|
-
binaryFile: BinaryFileSurface;
|
|
113
|
-
call(name: string, input: unknown): Promise<CallResult>;
|
|
114
|
-
reached(locator: string, roomVersion: string, path?: string): Promise<boolean>;
|
|
115
|
-
log(): string;
|
|
116
|
-
persistence(): boolean;
|
|
117
|
-
retry(): Promise<void>;
|
|
118
|
-
cleanUp(): Promise<number>;
|
|
119
|
-
observe: {
|
|
120
|
-
(topic: 'rooms'): Promise<Observation<readonly AppRoom[]>>;
|
|
121
|
-
(topic: 'readiness'): Promise<Observation<Readiness>>;
|
|
122
|
-
(topic: 'connection-refusal'): Promise<Observation<ConnectionRefusal | null>>;
|
|
123
|
-
(topic: 'storage-loss'): Promise<Observation<string | null>>;
|
|
124
|
-
(topic: 'sync-status'): Promise<Observation<SyncStatus>>;
|
|
125
|
-
(topic: 'service-mode'): Promise<Observation<ServiceMode>>;
|
|
126
|
-
(topic: 'member'): Promise<Observation<Member | null>>;
|
|
127
|
-
(topic: 'query', query: DocumentQuery): Promise<Observation<DocumentResult | PendingResult>>;
|
|
128
|
-
(topic: 'query', query: GroupQuery): Promise<Observation<GroupResult | PendingResult>>;
|
|
129
|
-
(topic: 'queue', locator: string): Promise<Observation<readonly QueueEntry[]>>;
|
|
130
|
-
(topic: 'room-drafts'): Promise<Observation<readonly RoomDraft[]>>;
|
|
131
|
-
(topic: 'presentation', app: string): Promise<Observation<unknown>>;
|
|
132
|
-
(topic: 'conversation', conversation: string, options: ConversationOptions): Promise<Observation<ConversationView>>;
|
|
133
|
-
(topic: 'conversations'): Promise<Observation<readonly ConversationEntry[]>>;
|
|
134
|
-
(topic: 'agents'): Promise<Observation<readonly ConversationAgent[]>>;
|
|
135
|
-
};
|
|
136
|
-
reauthorize(): Promise<void>;
|
|
137
|
-
};
|
|
138
|
-
export type RuntimeTopic = 'rooms' | 'readiness' | 'connection-refusal' | 'storage-loss' | 'sync-status' | 'service-mode' | 'member' | 'query' | 'queue' | 'room-drafts' | 'presentation' | 'conversation' | 'conversations' | 'agents';
|
|
139
|
-
export type ReadinessPort = {
|
|
140
|
-
readonly target: string;
|
|
141
|
-
readonly code: CodeAvailability;
|
|
142
|
-
readonly space: Space | null;
|
|
143
|
-
readonly search: SearchObligation;
|
|
144
|
-
};
|
|
145
|
-
export type ComposedRuntime = RuntimeView & {
|
|
146
|
-
seed(entry: EntrySeed): void;
|
|
147
|
-
stop(): Promise<void>;
|
|
148
|
-
persisted(answer: Persistence): void;
|
|
149
|
-
within(reach: PortReach | null, port: ReadinessPort): NarrowedView;
|
|
150
|
-
};
|
|
151
|
-
export declare function composeRuntime(options: MdRuntimeOptions): ComposedRuntime;
|
|
152
|
-
export {};
|
|
@@ -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;
|