@agentshouse/app-bridge 0.1.0-ce602e5dccd9f → 0.1.0-ce61879ee484f
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 +2 -2
- package/dist/index.d.ts +47 -504
- package/dist/mdmodel/body.d.ts +84 -0
- package/dist/mdmodel/built-in.d.ts +3 -0
- package/dist/mdmodel/crockford.d.ts +3 -0
- package/dist/mdmodel/definition.d.ts +18 -9
- package/dist/mdmodel/document.d.ts +7 -4
- package/dist/mdmodel/event.d.ts +1 -2
- package/dist/mdmodel/fields.d.ts +1 -1
- package/dist/mdmodel/house-model.d.ts +826 -0
- package/dist/mdmodel/house-references.d.ts +3 -0
- package/dist/mdmodel/index.d.ts +15 -6
- package/dist/mdmodel/markdown.d.ts +28 -4
- package/dist/mdmodel/paths.d.ts +10 -1
- package/dist/mdmodel/room-types.d.ts +6 -0
- package/dist/mdmodel/types.d.ts +3 -6
- package/dist/mdmodel/validate.d.ts +2 -1
- package/dist/mdruntime/actions.d.ts +8 -2
- package/dist/mdruntime/adapter.d.ts +13 -7
- package/dist/mdruntime/attached-model.d.ts +0 -1
- package/dist/mdruntime/change-set.d.ts +4 -0
- package/dist/mdruntime/client.d.ts +6 -17
- package/dist/mdruntime/compile.d.ts +2 -0
- package/dist/mdruntime/conversation-live.d.ts +10 -2
- package/dist/mdruntime/conversation.d.ts +26 -5
- package/dist/mdruntime/durability.d.ts +4 -0
- package/dist/mdruntime/failure.d.ts +2 -0
- package/dist/mdruntime/listing.d.ts +5 -9
- package/dist/mdruntime/messages.d.ts +9 -2
- package/dist/mdruntime/observation.d.ts +3 -2
- package/dist/mdruntime/opened.d.ts +1 -1
- package/dist/mdruntime/outcome.d.ts +3 -0
- package/dist/mdruntime/overlay.d.ts +3 -0
- package/dist/mdruntime/presence.d.ts +51 -0
- package/dist/mdruntime/readiness.d.ts +1 -1
- package/dist/mdruntime/reads.d.ts +3 -1
- package/dist/mdruntime/recovery.d.ts +3 -1
- package/dist/mdruntime/retried.d.ts +29 -0
- package/dist/mdruntime/room-draft.d.ts +2 -3
- package/dist/mdruntime/runtime.d.ts +6 -16
- package/dist/mdruntime/save.d.ts +40 -83
- package/dist/mdruntime/saves.d.ts +2 -40
- package/dist/mdruntime/socket/lanes.d.ts +12 -4
- package/dist/mdruntime/socket.d.ts +3 -5
- package/dist/mdruntime/source.d.ts +0 -7
- package/dist/mdruntime/store/records.d.ts +7 -3
- package/dist/mdruntime/store.d.ts +10 -5
- package/dist/mdruntime/stored.d.ts +1 -0
- package/dist/mdruntime/surface.d.ts +1 -1
- package/dist/mdruntime/tables.d.ts +6 -3
- package/dist/mdruntime/wire.d.ts +47 -3
- package/dist/session-content/index.d.ts +1 -1
- package/dist/session-content/parts.d.ts +4 -3
- package/dist/session-content/turn.d.ts +3 -3
- package/docs/families.md +4 -9
- package/package.json +2 -2
- package/dist/mdruntime/install.d.ts +0 -55
- package/dist/mdruntime/log.d.ts +0 -5
- package/dist/mdruntime/socket/rooms.d.ts +0 -40
- package/dist/mdruntime/store/fences.d.ts +0 -15
- package/dist/mdruntime/turn.d.ts +0 -8
package/dist/mdruntime/wire.d.ts
CHANGED
|
@@ -70,12 +70,12 @@ declare const MEMBERS: {
|
|
|
70
70
|
readonly reach: 'within';
|
|
71
71
|
readonly effect: 'action';
|
|
72
72
|
};
|
|
73
|
-
readonly
|
|
73
|
+
readonly answered: {
|
|
74
74
|
readonly reach: 'within';
|
|
75
75
|
readonly effect: 'read';
|
|
76
76
|
};
|
|
77
|
-
readonly
|
|
78
|
-
readonly reach: '
|
|
77
|
+
readonly reached: {
|
|
78
|
+
readonly reach: 'within';
|
|
79
79
|
readonly effect: 'read';
|
|
80
80
|
};
|
|
81
81
|
readonly cleanUp: {
|
|
@@ -166,6 +166,46 @@ declare const MEMBERS: {
|
|
|
166
166
|
readonly reach: 'within';
|
|
167
167
|
readonly effect: 'action';
|
|
168
168
|
};
|
|
169
|
+
readonly 'conversation.takeOut': {
|
|
170
|
+
readonly reach: 'within';
|
|
171
|
+
readonly effect: 'action';
|
|
172
|
+
};
|
|
173
|
+
readonly 'conversation.decide': {
|
|
174
|
+
readonly reach: 'within';
|
|
175
|
+
readonly effect: 'action';
|
|
176
|
+
};
|
|
177
|
+
readonly 'conversation.rename': {
|
|
178
|
+
readonly reach: 'within';
|
|
179
|
+
readonly effect: 'action';
|
|
180
|
+
};
|
|
181
|
+
readonly 'conversation.option': {
|
|
182
|
+
readonly reach: 'within';
|
|
183
|
+
readonly effect: 'action';
|
|
184
|
+
};
|
|
185
|
+
readonly 'conversation.retry': {
|
|
186
|
+
readonly reach: 'within';
|
|
187
|
+
readonly effect: 'action';
|
|
188
|
+
};
|
|
189
|
+
readonly 'conversation.pins': {
|
|
190
|
+
readonly reach: 'within';
|
|
191
|
+
readonly effect: 'read';
|
|
192
|
+
};
|
|
193
|
+
readonly 'conversation.pin': {
|
|
194
|
+
readonly reach: 'within';
|
|
195
|
+
readonly effect: 'write';
|
|
196
|
+
};
|
|
197
|
+
readonly 'conversation.openedTurns': {
|
|
198
|
+
readonly reach: 'within';
|
|
199
|
+
readonly effect: 'read';
|
|
200
|
+
};
|
|
201
|
+
readonly 'conversation.openTurn': {
|
|
202
|
+
readonly reach: 'within';
|
|
203
|
+
readonly effect: 'write';
|
|
204
|
+
};
|
|
205
|
+
readonly 'conversation.dismissSuggestion': {
|
|
206
|
+
readonly reach: 'within';
|
|
207
|
+
readonly effect: 'write';
|
|
208
|
+
};
|
|
169
209
|
readonly 'chatDraft.write': {
|
|
170
210
|
readonly reach: 'within';
|
|
171
211
|
readonly effect: 'write';
|
|
@@ -174,6 +214,10 @@ declare const MEMBERS: {
|
|
|
174
214
|
readonly reach: 'within';
|
|
175
215
|
readonly effect: 'write';
|
|
176
216
|
};
|
|
217
|
+
readonly 'chatDraft.append': {
|
|
218
|
+
readonly reach: 'within';
|
|
219
|
+
readonly effect: 'write';
|
|
220
|
+
};
|
|
177
221
|
readonly 'chatDraft.discard': {
|
|
178
222
|
readonly reach: 'within';
|
|
179
223
|
readonly effect: 'write';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DIFF_CHARACTERS, FIRST_PART_CHARACTERS, firstPart, keptDiff, lastLines, OUTPUT_CHARACTERS, OUTPUT_LINES, } from './bounds.js';
|
|
2
2
|
export { isOwn, isPart } from './parts.js';
|
|
3
|
-
export type { Call, FileChange, Part, Status } from './parts.js';
|
|
3
|
+
export type { Call, FileChange, Part, PartOf, Status } from './parts.js';
|
|
4
4
|
export { isState, standingState } from './state.js';
|
|
5
5
|
export type { SessionState, Tokens } from './state.js';
|
|
6
6
|
export { applied, isOperation, isTurn } from './turn.js';
|
|
@@ -66,7 +66,7 @@ declare const PART: Check<import("./check.js").Shaped<{
|
|
|
66
66
|
}> | import("./check.js").Shaped<{
|
|
67
67
|
readonly type: Check<"message">;
|
|
68
68
|
readonly parent: Check<number | null>;
|
|
69
|
-
readonly command: Check<
|
|
69
|
+
readonly command: Check<"agent-functions/cancel" | "agent-functions/mail/send" | "agent-functions/send">;
|
|
70
70
|
readonly target: Check<string | null>;
|
|
71
71
|
}> | import("./check.js").Shaped<{
|
|
72
72
|
readonly type: Check<"image">;
|
|
@@ -94,9 +94,10 @@ declare const PART: Check<import("./check.js").Shaped<{
|
|
|
94
94
|
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
95
95
|
}>>;
|
|
96
96
|
export type Part = Checked<typeof PART>;
|
|
97
|
-
export type
|
|
98
|
-
readonly type:
|
|
97
|
+
export type PartOf<T extends Part['type']> = Extract<Part, {
|
|
98
|
+
readonly type: T;
|
|
99
99
|
}>;
|
|
100
|
+
export type Call = PartOf<'call'>;
|
|
100
101
|
export declare const isPart: Check<Part>;
|
|
101
102
|
export declare function isOwn(part: Part): boolean;
|
|
102
103
|
export {};
|
|
@@ -60,7 +60,7 @@ declare const OPERATION: Check<import("./check.js").Shaped<{
|
|
|
60
60
|
}> | import("./check.js").Shaped<{
|
|
61
61
|
readonly type: Check<"message">;
|
|
62
62
|
readonly parent: Check<number | null>;
|
|
63
|
-
readonly command: Check<
|
|
63
|
+
readonly command: Check<"agent-functions/cancel" | "agent-functions/mail/send" | "agent-functions/send">;
|
|
64
64
|
readonly target: Check<string | null>;
|
|
65
65
|
}> | import("./check.js").Shaped<{
|
|
66
66
|
readonly type: Check<"image">;
|
|
@@ -151,7 +151,7 @@ declare const OPERATION: Check<import("./check.js").Shaped<{
|
|
|
151
151
|
}> | import("./check.js").Shaped<{
|
|
152
152
|
readonly type: Check<"message">;
|
|
153
153
|
readonly parent: Check<number | null>;
|
|
154
|
-
readonly command: Check<
|
|
154
|
+
readonly command: Check<"agent-functions/cancel" | "agent-functions/mail/send" | "agent-functions/send">;
|
|
155
155
|
readonly target: Check<string | null>;
|
|
156
156
|
}> | import("./check.js").Shaped<{
|
|
157
157
|
readonly type: Check<"image">;
|
|
@@ -239,7 +239,7 @@ declare const TURN: Check<import("./check.js").Shaped<{
|
|
|
239
239
|
}> | import("./check.js").Shaped<{
|
|
240
240
|
readonly type: Check<"message">;
|
|
241
241
|
readonly parent: Check<number | null>;
|
|
242
|
-
readonly command: Check<
|
|
242
|
+
readonly command: Check<"agent-functions/cancel" | "agent-functions/mail/send" | "agent-functions/send">;
|
|
243
243
|
readonly target: Check<string | null>;
|
|
244
244
|
}> | import("./check.js").Shaped<{
|
|
245
245
|
readonly type: Check<"image">;
|
package/docs/families.md
CHANGED
|
@@ -71,9 +71,6 @@
|
|
|
71
71
|
House is answered the outcome `transport-uncertainty`, and every other call,
|
|
72
72
|
a Save or a draft write among them, fails with the retryable code
|
|
73
73
|
`transport-uncertainty`.
|
|
74
|
-
- **Site image read** - given a Published Room and the Path of one of its
|
|
75
|
-
binary entries, it answers the web copy's path and metadata, or `null` when no
|
|
76
|
-
copy exists. The original bytes never cross this bridge at a Site.
|
|
77
74
|
- **App release code** - `sourceTop(app, release)` answers the top level of
|
|
78
75
|
the latest successful release of an App the User may use: its folders, its
|
|
79
76
|
files with their sizes and its root README's text, or `null` for none;
|
|
@@ -115,12 +112,10 @@
|
|
|
115
112
|
`runtime` client, and resolves to a handle: `update(options)` replaces its
|
|
116
113
|
options and `unmount()` removes it. House serves the Chat with the page and
|
|
117
114
|
keeps it current, so the App installs and bundles nothing for it. The
|
|
118
|
-
options:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
`{ conversation, agent }`, and `onLink` takes a link without a scheme in
|
|
123
|
-
place of the browser. CSS custom properties named `--chat-*` on the element
|
|
115
|
+
options: the Chat fills the element with one chat, `conversation` opens one,
|
|
116
|
+
`null` for a new chat with `agent`, the Agent it goes to, `onOpen` hears
|
|
117
|
+
each conversation it opens as `{ conversation, agent }`, and `onLink` takes
|
|
118
|
+
a link without a scheme in place of the browser. CSS custom properties named `--chat-*` on the element
|
|
124
119
|
or an ancestor set its look. It shows conversations only to a release that
|
|
125
120
|
declares them. A Site and the House panel have none: their call rejects with
|
|
126
121
|
an error named and coded `NotSupportedError`, with `retryable` false.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/app-bridge",
|
|
3
|
-
"version": "0.1.0-
|
|
4
|
-
"description": "Types of the agents.house App bridge House hands every App: navigation, the tab title and icon, ceremonies, installation, notifications
|
|
3
|
+
"version": "0.1.0-ce61879ee484f",
|
|
4
|
+
"description": "Types of the agents.house App bridge House hands every App: navigation, the tab title and icon, ceremonies, installation, notifications, status, App release code, App and Site screenshot reads, App messages and the Chat, with an accessor and an in-page test host.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { AdapterFailure, Authorization, DiscoveredRoom, NotReady, RetryableRefusal } from './adapter.js';
|
|
2
|
-
import { type Reads } from './bootstrap.js';
|
|
3
|
-
import type { Installation, RoomCoverage } from './readiness.js';
|
|
4
|
-
import { advancement, type Refresher } from './refresh.js';
|
|
5
|
-
import type { ReplicaRecord } from './replica.js';
|
|
6
|
-
import type { Runtime } from './runtime.js';
|
|
7
|
-
import type { Live } from './socket.js';
|
|
8
|
-
import { type CoveredRoom, type InstallHold, type RuntimeStore, type Store } from './store.js';
|
|
9
|
-
import { type Unconfirmed } from './transfer.js';
|
|
10
|
-
type Standing = {
|
|
11
|
-
readonly key: number | null;
|
|
12
|
-
readonly confirmed: number;
|
|
13
|
-
};
|
|
14
|
-
export type Unheld = {
|
|
15
|
-
readonly staged: boolean;
|
|
16
|
-
};
|
|
17
|
-
export type Withheld = AdapterFailure | RetryableRefusal | NotReady | Unconfirmed;
|
|
18
|
-
type Landing = {
|
|
19
|
-
readonly kind: 'refreshed';
|
|
20
|
-
readonly from: Standing;
|
|
21
|
-
readonly remodelled: boolean;
|
|
22
|
-
} | {
|
|
23
|
-
readonly kind: 'bootstrapped';
|
|
24
|
-
readonly refreshed: boolean;
|
|
25
|
-
readonly from: Standing;
|
|
26
|
-
};
|
|
27
|
-
type Refreshed = {
|
|
28
|
-
kind: 'advanced';
|
|
29
|
-
record: ReplicaRecord;
|
|
30
|
-
from: Standing;
|
|
31
|
-
remodelled: boolean;
|
|
32
|
-
} | Exclude<Awaited<ReturnType<typeof advancement>>, {
|
|
33
|
-
kind: 'advanced';
|
|
34
|
-
}>;
|
|
35
|
-
export declare const ERASE_BATCH = 512;
|
|
36
|
-
export declare function installationOf(store: Store, coverage: readonly RoomCoverage[], held: ReadonlyMap<string, CoveredRoom>): Installation;
|
|
37
|
-
export declare function roomInFlight(store: Store, locator: string): boolean;
|
|
38
|
-
export declare function sweep({ store, socket, journal }: Runtime): void;
|
|
39
|
-
export declare function forgetInstall(store: Store, locator: string): void;
|
|
40
|
-
export declare function caughtUpTo(runtime: Runtime, locator: string): void;
|
|
41
|
-
export declare function catching(store: Store, locator: string): void;
|
|
42
|
-
export declare function confirmedAgain(store: Store, locator: string): void;
|
|
43
|
-
export declare function standingAt(store: Store, locator: string, held: Pick<ReplicaRecord, 'key'> | undefined): Standing;
|
|
44
|
-
export declare function showing(system: Runtime, locator: string, roomVersion: string, held: string | undefined): void;
|
|
45
|
-
export declare function olderThan(system: Runtime, locator: string, roomVersion: string, held: string | undefined): boolean;
|
|
46
|
-
export declare function replaced(store: Store, locators: readonly string[]): void;
|
|
47
|
-
export declare function reachedBy({ store, socket }: Runtime, locator: string, roomVersion: string): Promise<boolean>;
|
|
48
|
-
export declare function behind({ store, socket }: Runtime, room: DiscoveredRoom): Promise<boolean>;
|
|
49
|
-
export declare function writtenAfter({ store, socket }: Runtime, locator: string, roomVersion: string, path: string): Promise<boolean>;
|
|
50
|
-
export declare function pullRefresh(runtime: Runtime, authorized: Authorization, record: ReplicaRecord, liveness: Live, hold: InstallHold, refresh: Refresher): Promise<Refreshed>;
|
|
51
|
-
export declare function pullBootstrap(runtime: Runtime, authorized: Authorization, room: DiscoveredRoom, local: RuntimeStore, liveness: Live, prior: ReplicaRecord | undefined, from?: Reads, unheld?: Unheld): Promise<import("./bootstrap.js").Bootstrapped | NotReady | import("./adapter.js").RevokedAuthorization | import("./adapter.js").RoomNotReadable | Unconfirmed | {
|
|
52
|
-
readonly kind: 'transport-uncertainty';
|
|
53
|
-
} | RetryableRefusal | import("./adapter.js").ScopedRefusal>;
|
|
54
|
-
export declare function publish(runtime: Runtime, local: RuntimeStore, room: DiscoveredRoom, reached: ReplicaRecord, landing: Landing, live: Live): Promise<boolean>;
|
|
55
|
-
export {};
|
package/dist/mdruntime/log.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { DiscoveredRoom, ProviderRefusal, RoomDeclaration } from '../adapter.js';
|
|
2
|
-
import type { ModelState } from '../model.js';
|
|
3
|
-
export type Declared = {
|
|
4
|
-
readonly room: RoomDeclaration | null;
|
|
5
|
-
readonly available: boolean;
|
|
6
|
-
};
|
|
7
|
-
type RoomStanding = {
|
|
8
|
-
readonly unreadable: boolean;
|
|
9
|
-
readonly refusal: ProviderRefusal | null;
|
|
10
|
-
readonly unheldModel: ModelState | null;
|
|
11
|
-
readonly stale: boolean;
|
|
12
|
-
readonly repairable: {
|
|
13
|
-
readonly reset: string | undefined;
|
|
14
|
-
} | null;
|
|
15
|
-
readonly repairing: boolean;
|
|
16
|
-
readonly reloadDue: boolean;
|
|
17
|
-
readonly confirmed: boolean;
|
|
18
|
-
readonly unpreparable: boolean;
|
|
19
|
-
};
|
|
20
|
-
export type Rooms = {
|
|
21
|
-
declare(locator: string, declared: Declared): void;
|
|
22
|
-
declared(locator: string): Declared | undefined;
|
|
23
|
-
declarations(): ReadonlyMap<string, Declared>;
|
|
24
|
-
discover(room: DiscoveredRoom): void;
|
|
25
|
-
discovered(locator: string): DiscoveredRoom | undefined;
|
|
26
|
-
discoveredRooms(): readonly DiscoveredRoom[];
|
|
27
|
-
undiscoverAll(): void;
|
|
28
|
-
standing(locator: string): RoomStanding;
|
|
29
|
-
stand(locator: string, change: Partial<RoomStanding>): void;
|
|
30
|
-
standingWhere(held: (room: RoomStanding) => boolean): readonly string[];
|
|
31
|
-
standAll(change: Partial<RoomStanding>): void;
|
|
32
|
-
forget(locator: string): void;
|
|
33
|
-
askAgain(locator: string, ask: () => void): void;
|
|
34
|
-
readied(locator: string): void;
|
|
35
|
-
unreadied(): void;
|
|
36
|
-
connectionLost(lapsed: () => void): void;
|
|
37
|
-
connectionLive(): void;
|
|
38
|
-
};
|
|
39
|
-
export declare function createRooms(): Rooms;
|
|
40
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type Fence = {
|
|
2
|
-
readonly at: number;
|
|
3
|
-
readonly written: boolean;
|
|
4
|
-
};
|
|
5
|
-
export type Fences = {
|
|
6
|
-
has(locator: string): boolean;
|
|
7
|
-
of(locator: string): Fence | undefined;
|
|
8
|
-
raise(locator: string, at: number): boolean;
|
|
9
|
-
mark(locator: string, written: boolean): void;
|
|
10
|
-
lift(locator: string): void;
|
|
11
|
-
count(): number;
|
|
12
|
-
since(locator: string, count: number): boolean;
|
|
13
|
-
};
|
|
14
|
-
export declare function createFences(): Fences;
|
|
15
|
-
export {};
|
package/dist/mdruntime/turn.d.ts
DELETED
|
@@ -1,8 +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) => Later<R>): Later<R>;
|
|
5
|
-
export declare function paced(): (weight: number) => Later<void>;
|
|
6
|
-
export declare function inUnits<T>(items: Iterable<T>, each: (item: T) => number, ended?: () => void, paused?: () => Promise<void>): Later<void>;
|
|
7
|
-
export declare function finished<R>(steps: Generator<number, R, void>): R;
|
|
8
|
-
export declare function stepped<R>(steps: Generator<number, R, void>): Later<R>;
|