@agentshouse/app-bridge 0.1.0-ca559eade7c19 → 0.1.0-ca61ac777c0b7
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 +11 -11
- package/dist/index.d.ts +1033 -20
- package/dist/mdmodel/definition.d.ts +18 -1
- package/dist/mdmodel/document.d.ts +10 -6
- package/dist/mdmodel/event.d.ts +77 -0
- package/dist/mdmodel/facts.d.ts +14 -0
- package/dist/mdmodel/index.d.ts +25 -11
- package/dist/mdmodel/kinds.d.ts +17 -0
- package/dist/mdmodel/markdown.d.ts +50 -0
- package/dist/mdmodel/paths.d.ts +9 -1
- package/dist/mdmodel/pattern.d.ts +9 -0
- package/dist/mdmodel/project.d.ts +1 -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 +46 -5
- package/dist/mdmodel/validate.d.ts +31 -4
- package/dist/mdruntime/actions.d.ts +19 -0
- package/dist/mdruntime/adapter.d.ts +161 -116
- package/dist/mdruntime/attached-model.d.ts +7 -0
- package/dist/mdruntime/binary.d.ts +0 -5
- package/dist/mdruntime/bootstrap.d.ts +43 -0
- package/dist/mdruntime/cell.d.ts +5 -0
- package/dist/mdruntime/chain.d.ts +11 -0
- package/dist/mdruntime/change-set.d.ts +13 -16
- package/dist/mdruntime/change.d.ts +32 -1
- package/dist/mdruntime/client.d.ts +36 -11
- package/dist/mdruntime/collection.d.ts +29 -21
- package/dist/mdruntime/compile.d.ts +15 -0
- package/dist/mdruntime/conversation-live.d.ts +135 -0
- package/dist/mdruntime/conversation-row.d.ts +32 -0
- package/dist/mdruntime/conversation.d.ts +54 -46
- package/dist/mdruntime/declaration.d.ts +9 -0
- package/dist/mdruntime/durability.d.ts +16 -4
- package/dist/mdruntime/failure.d.ts +1 -0
- package/dist/mdruntime/figures.d.ts +48 -0
- package/dist/mdruntime/holdings.d.ts +28 -0
- package/dist/mdruntime/identity.d.ts +5 -0
- package/dist/mdruntime/listing.d.ts +47 -0
- package/dist/mdruntime/live.d.ts +22 -0
- package/dist/mdruntime/log.d.ts +5 -0
- package/dist/mdruntime/media.d.ts +7 -0
- package/dist/mdruntime/messages.d.ts +48 -0
- package/dist/mdruntime/model.d.ts +8 -11
- package/dist/mdruntime/observation.d.ts +17 -2
- package/dist/mdruntime/opened.d.ts +21 -0
- package/dist/mdruntime/outcome.d.ts +49 -8
- package/dist/mdruntime/overlay.d.ts +4 -5
- package/dist/mdruntime/preparation.d.ts +19 -0
- package/dist/mdruntime/presence.d.ts +51 -0
- package/dist/mdruntime/query.d.ts +25 -191
- package/dist/mdruntime/reach.d.ts +20 -9
- package/dist/mdruntime/readiness.d.ts +13 -17
- package/dist/mdruntime/reads.d.ts +36 -0
- package/dist/mdruntime/recovery.d.ts +3 -2
- package/dist/mdruntime/refresh.d.ts +26 -0
- package/dist/mdruntime/replica.d.ts +50 -33
- package/dist/mdruntime/room-draft.d.ts +28 -11
- package/dist/mdruntime/room-drafts.d.ts +23 -0
- package/dist/mdruntime/runtime.d.ts +33 -0
- package/dist/mdruntime/save.d.ts +42 -48
- package/dist/mdruntime/saves.d.ts +31 -0
- package/dist/mdruntime/search.d.ts +12 -82
- 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/session.d.ts +37 -0
- package/dist/mdruntime/socket.d.ts +66 -0
- package/dist/mdruntime/source.d.ts +60 -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 +9 -0
- package/dist/mdruntime/store/records.d.ts +209 -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 +109 -150
- package/dist/mdruntime/stored.d.ts +155 -0
- package/dist/mdruntime/surface.d.ts +87 -0
- package/dist/mdruntime/tables.d.ts +411 -0
- package/dist/mdruntime/tallies.d.ts +17 -0
- package/dist/mdruntime/transfer.d.ts +0 -5
- package/dist/mdruntime/wire.d.ts +54 -10
- 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 +102 -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 +7 -4
- package/dist/test-host.js +19 -29
- package/docs/families.md +69 -56
- package/package.json +8 -3
- package/dist/calls.d.ts +0 -118
- package/dist/calls.js +0 -1
- package/dist/mdmodel/blocks.d.ts +0 -10
- package/dist/mdmodel/condition.d.ts +0 -149
- package/dist/mdmodel/profile.d.ts +0 -5
- package/dist/mdruntime/acquisition.d.ts +0 -13
- package/dist/mdruntime/connection.d.ts +0 -141
- package/dist/mdruntime/file.d.ts +0 -19
- package/dist/mdruntime/rows.d.ts +0 -37
- package/dist/mdruntime/shared.d.ts +0 -10
- package/dist/mdruntime/turn.d.ts +0 -6
|
@@ -1,141 +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 BinaryReference } from './binary.js';
|
|
11
|
-
import { type BinaryAnswer, type CallResult, type HistoryAnswer, type QueueEntry } from './outcome.js';
|
|
12
|
-
import { type Recovery } from './recovery.js';
|
|
13
|
-
import { type SaveRefusal } from './save.js';
|
|
14
|
-
import { type RoomDraft, type RoomDraftWrite } from './room-draft.js';
|
|
15
|
-
import { type SyncStatus } from './status.js';
|
|
16
|
-
import { type RuntimeShell } from './durability.js';
|
|
17
|
-
import { type RuntimeDemand } from './acquisition.js';
|
|
18
|
-
import { type CapacityCause, type CodeAvailability, type Persistence, type Readiness, type SearchObligation } from './readiness.js';
|
|
19
|
-
import { type NarrowedView, type PortReach, type RuntimeView } from './reach.js';
|
|
20
|
-
export type AppTypedSelection = {
|
|
21
|
-
roots: readonly string[];
|
|
22
|
-
model: TypesResult;
|
|
23
|
-
};
|
|
24
|
-
export type AppRoom = {
|
|
25
|
-
name: string;
|
|
26
|
-
locator: string;
|
|
27
|
-
handle: string;
|
|
28
|
-
operations: import('./adapter.js').OperationScopes;
|
|
29
|
-
replica: import('./adapter.js').ReplicaAdmission;
|
|
30
|
-
model: TypesResult;
|
|
31
|
-
typedSelection: AppTypedSelection | null;
|
|
32
|
-
providerOwnedPaths: readonly string[];
|
|
33
|
-
roomVersion: string | null;
|
|
34
|
-
documents: number;
|
|
35
|
-
synchronizationAvailable: boolean;
|
|
36
|
-
refusal: ProviderRefusal | null;
|
|
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
|
-
authorization?: Authorization;
|
|
54
|
-
signal?: AbortSignal;
|
|
55
|
-
recovery?: Recovery;
|
|
56
|
-
};
|
|
57
|
-
export type SaveResult = {
|
|
58
|
-
outcome: 'saved';
|
|
59
|
-
identifier: string;
|
|
60
|
-
} | ({
|
|
61
|
-
outcome: 'refused';
|
|
62
|
-
} & SaveRefusal);
|
|
63
|
-
export type SavedRoomDraft = {
|
|
64
|
-
readonly path: string;
|
|
65
|
-
readonly revision: string;
|
|
66
|
-
};
|
|
67
|
-
export type RoomDraftSurface = {
|
|
68
|
-
list(): Promise<readonly RoomDraft[]>;
|
|
69
|
-
read(room: string, path: string): RoomDraft | null;
|
|
70
|
-
write(room: string, path: string, revision: string | null, parts: unknown): Promise<RoomDraftWrite>;
|
|
71
|
-
discard(room: string, path: string, revision: string): Promise<RoomDraftWrite>;
|
|
72
|
-
};
|
|
73
|
-
export type PresentationSurface = {
|
|
74
|
-
read(app: string): Promise<unknown>;
|
|
75
|
-
write(app: string, value: unknown): Promise<void>;
|
|
76
|
-
};
|
|
77
|
-
export type BinaryFileSurface = {
|
|
78
|
-
read(room: string, path: string, revision?: string): Promise<BinaryAnswer>;
|
|
79
|
-
readReference(reference: BinaryReference): Promise<BinaryAnswer>;
|
|
80
|
-
};
|
|
81
|
-
export type HistoryQuery = {
|
|
82
|
-
revision?: string;
|
|
83
|
-
pageToken?: string;
|
|
84
|
-
};
|
|
85
|
-
export type MdRuntime = {
|
|
86
|
-
loaded(): Promise<void>;
|
|
87
|
-
rooms(): readonly AppRoom[];
|
|
88
|
-
query: {
|
|
89
|
-
(query: DocumentQuery): Promise<DocumentResult | PendingResult>;
|
|
90
|
-
(query: GroupQuery): Promise<GroupResult | PendingResult>;
|
|
91
|
-
};
|
|
92
|
-
search(request: SearchRequest): Promise<SearchResult>;
|
|
93
|
-
types(locator: string): RoomSchemas;
|
|
94
|
-
roomDraft: RoomDraftSurface;
|
|
95
|
-
conversation: ConversationSurface;
|
|
96
|
-
chatDraft: ChatDraftSurface;
|
|
97
|
-
presentation: PresentationSurface;
|
|
98
|
-
save(room: string, roomDrafts: readonly SavedRoomDraft[], writtenBy?: WrittenBy): Promise<SaveResult>;
|
|
99
|
-
history(locator: string, path: string, query?: HistoryQuery): Promise<HistoryAnswer>;
|
|
100
|
-
binaryFile: BinaryFileSurface;
|
|
101
|
-
call(name: string, input: unknown): Promise<CallResult>;
|
|
102
|
-
reached(locator: string, roomVersion: string, path?: string): boolean;
|
|
103
|
-
log(): string;
|
|
104
|
-
persistence(): boolean;
|
|
105
|
-
retry(): Promise<void>;
|
|
106
|
-
observe: {
|
|
107
|
-
(topic: 'rooms'): Promise<Observation<readonly AppRoom[]>>;
|
|
108
|
-
(topic: 'readiness'): Promise<Observation<Readiness>>;
|
|
109
|
-
(topic: 'connection-refusal'): Promise<Observation<ConnectionRefusal | null>>;
|
|
110
|
-
(topic: 'storage-loss'): Promise<Observation<string | null>>;
|
|
111
|
-
(topic: 'sync-status'): Promise<Observation<SyncStatus>>;
|
|
112
|
-
(topic: 'service-mode'): Promise<Observation<ServiceMode>>;
|
|
113
|
-
(topic: 'member'): Promise<Observation<Member | null>>;
|
|
114
|
-
(topic: 'query', query: DocumentQuery): Promise<Observation<DocumentResult | PendingResult>>;
|
|
115
|
-
(topic: 'query', query: GroupQuery): Promise<Observation<GroupResult | PendingResult>>;
|
|
116
|
-
(topic: 'queue', locator: string): Promise<Observation<readonly QueueEntry[]>>;
|
|
117
|
-
(topic: 'room-drafts'): Promise<Observation<readonly RoomDraft[]>>;
|
|
118
|
-
(topic: 'presentation', app: string): Promise<Observation<unknown>>;
|
|
119
|
-
(topic: 'conversation', conversation: string, options: ConversationOptions): Promise<Observation<ConversationView>>;
|
|
120
|
-
(topic: 'conversations'): Promise<Observation<readonly ConversationEntry[]>>;
|
|
121
|
-
(topic: 'agents'): Promise<Observation<readonly ConversationAgent[]>>;
|
|
122
|
-
};
|
|
123
|
-
reauthorize(): Promise<void>;
|
|
124
|
-
};
|
|
125
|
-
export type RuntimeTopic = 'rooms' | 'readiness' | 'connection-refusal' | 'storage-loss' | 'sync-status' | 'service-mode' | 'member' | 'query' | 'queue' | 'room-drafts' | 'presentation' | 'conversation' | 'conversations' | 'agents';
|
|
126
|
-
export type ReadinessPort = {
|
|
127
|
-
readonly target: string;
|
|
128
|
-
readonly code: CodeAvailability;
|
|
129
|
-
readonly capacity: CapacityCause | null;
|
|
130
|
-
readonly search: SearchObligation;
|
|
131
|
-
};
|
|
132
|
-
export type ComposedRuntime = RuntimeView & {
|
|
133
|
-
seed(entry: EntrySeed): void;
|
|
134
|
-
stop(): Promise<void>;
|
|
135
|
-
lose(locators: readonly string[]): Promise<void>;
|
|
136
|
-
acquire(demand: RuntimeDemand): void;
|
|
137
|
-
persisted(answer: Persistence): void;
|
|
138
|
-
within(reach: PortReach | null, port: ReadinessPort): NarrowedView;
|
|
139
|
-
};
|
|
140
|
-
export declare function composeRuntime(options: MdRuntimeOptions): ComposedRuntime;
|
|
141
|
-
export {};
|
package/dist/mdruntime/file.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type ChatDraftFile = {
|
|
2
|
-
name: string;
|
|
3
|
-
blob: Blob;
|
|
4
|
-
};
|
|
5
|
-
export type FileDeclaration = {
|
|
6
|
-
name: string;
|
|
7
|
-
mediaType: string;
|
|
8
|
-
byteLength: number;
|
|
9
|
-
contentHash: string;
|
|
10
|
-
width?: number;
|
|
11
|
-
height?: number;
|
|
12
|
-
};
|
|
13
|
-
export type Extent = {
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
};
|
|
17
|
-
export declare function extentOf(bytes: Uint8Array): Extent | null;
|
|
18
|
-
export declare function hexDigest(digest: ArrayBuffer): string;
|
|
19
|
-
export declare function declaredFile(file: ChatDraftFile): Promise<FileDeclaration>;
|
package/dist/mdruntime/rows.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { type Frontmatter } from '../mdmodel/index.js';
|
|
2
|
-
import type { HeadChange } from './adapter.js';
|
|
3
|
-
import type { BinaryFileRecord } from './binary.js';
|
|
4
|
-
import { type Composition } from './collection.js';
|
|
5
|
-
type Fields = Readonly<Record<string, unknown>>;
|
|
6
|
-
export type DocumentRow = {
|
|
7
|
-
key: string;
|
|
8
|
-
kind: 'document';
|
|
9
|
-
room: string;
|
|
10
|
-
path: string;
|
|
11
|
-
type: string | null;
|
|
12
|
-
fields: Fields;
|
|
13
|
-
values: Fields;
|
|
14
|
-
reached: Readonly<Record<string, readonly unknown[]>>;
|
|
15
|
-
directories: readonly string[];
|
|
16
|
-
text: string | null;
|
|
17
|
-
change: HeadChange | null;
|
|
18
|
-
fileId: string | null;
|
|
19
|
-
binary: BinaryFileRecord | null;
|
|
20
|
-
};
|
|
21
|
-
export type ReferenceRow = {
|
|
22
|
-
key: string;
|
|
23
|
-
kind: 'reference';
|
|
24
|
-
room: string;
|
|
25
|
-
source: string;
|
|
26
|
-
target: string;
|
|
27
|
-
field: string;
|
|
28
|
-
forms: readonly string[];
|
|
29
|
-
path: string;
|
|
30
|
-
type: string;
|
|
31
|
-
};
|
|
32
|
-
export type Row = DocumentRow | ReferenceRow;
|
|
33
|
-
export declare function documentKey(room: string, path: string): string;
|
|
34
|
-
export declare function roomOfKey(key: string): string;
|
|
35
|
-
export declare function markdownPath(path: string): boolean;
|
|
36
|
-
export declare function rowsOf(room: string, path: string, document: Frontmatter | null, composition: Composition, change: HeadChange | null, fileId: string | null, binary: BinaryFileRecord | null): readonly Row[];
|
|
37
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type Paths<V> = Readonly<Record<string, V>>;
|
|
2
|
-
type Weigh<V> = (key: string, value: V) => number;
|
|
3
|
-
export declare function shared<V>(map: Paths<V>): Paths<V>;
|
|
4
|
-
export declare function patched<V>(base: Paths<V>, set: Iterable<readonly [string, V]>, removed?: Iterable<string>): Paths<V>;
|
|
5
|
-
export declare function tally<V>(map: Paths<V>, weigh: Weigh<V>): number;
|
|
6
|
-
export declare function sizeOf<V>(map: Paths<V>): number;
|
|
7
|
-
export declare function differing<V>(left: Paths<V>, right: Paths<V>, same?: (left: V, right: V) => boolean): ReadonlySet<string>;
|
|
8
|
-
export declare function drafted<V>(base: Paths<V>): Record<string, V>;
|
|
9
|
-
export declare function settled<V>(draft: Record<string, V>): Paths<V>;
|
|
10
|
-
export {};
|
package/dist/mdruntime/turn.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function yielded(): Promise<void>;
|
|
2
|
-
export declare const ROW_WEIGHT = 256;
|
|
3
|
-
export type Later<T> = T | Promise<T>;
|
|
4
|
-
export declare function after<T, R>(value: Later<T>, next: (value: T) => R): Later<R>;
|
|
5
|
-
export declare function inUnits<T>(items: Iterable<T>, each: (item: T) => number): Later<void>;
|
|
6
|
-
export declare function inChunks<T>(items: readonly T[], weigh: (item: T) => number, each: (chunk: readonly T[]) => void): Promise<void>;
|