@agentshouse/app-bridge 0.1.0-cf504ef5915b9 → 0.1.0-cf624397eed9c
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 +1 -1
- package/dist/index.d.ts +46 -7
- package/dist/mdmodel/definition.d.ts +1 -0
- package/dist/mdruntime/adapter.d.ts +19 -0
- package/dist/mdruntime/client.d.ts +2 -0
- package/dist/mdruntime/collection.d.ts +2 -1
- package/dist/mdruntime/house-query.d.ts +20 -0
- package/dist/mdruntime/listing.d.ts +20 -12
- package/dist/mdruntime/messages.d.ts +1 -1
- package/dist/mdruntime/model.d.ts +4 -2
- package/dist/mdruntime/observation.d.ts +2 -0
- package/dist/mdruntime/reach.d.ts +9 -2
- package/dist/mdruntime/recovery.d.ts +1 -0
- package/dist/mdruntime/runtime.d.ts +1 -0
- package/dist/mdruntime/socket/session.d.ts +2 -1
- package/dist/mdruntime/socket.d.ts +1 -0
- package/dist/mdruntime/store/records.d.ts +3 -1
- package/dist/mdruntime/surface.d.ts +4 -2
- package/dist/mdruntime/wire.d.ts +4 -0
- package/dist/session-content/check.d.ts +0 -1
- package/dist/session-content/index.d.ts +2 -3
- package/dist/session-content/parts.d.ts +10 -83
- package/dist/session-content/state.d.ts +4 -6
- package/dist/session-content/turn.d.ts +28 -219
- package/dist/test-host.js +0 -2
- package/docs/families.md +1 -20
- package/package.json +2 -2
- package/dist/session-content/bounds.d.ts +0 -7
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ The types of the agents.house App bridge, an accessor and an in-page test host.
|
|
|
4
4
|
House builds the bridge object in every App it serves and hands it to the page
|
|
5
5
|
before the App's own scripts run; `houseBridge()` returns that object, so an App
|
|
6
6
|
carries no bridge code of its own. It carries these families: navigation,
|
|
7
|
-
ceremonies,
|
|
7
|
+
ceremonies, notifications, Telegram, status, App
|
|
8
8
|
release code, external calls, App messages, App and Site screenshot reads and the
|
|
9
9
|
Chat. [docs/families.md](docs/families.md) describes each and the test host.
|
|
10
10
|
|
package/dist/index.d.ts
CHANGED
|
@@ -271,11 +271,18 @@ export interface HouseMethods {
|
|
|
271
271
|
readonly room_ref: string;
|
|
272
272
|
};
|
|
273
273
|
readonly result: {
|
|
274
|
-
readonly history?: readonly {
|
|
274
|
+
readonly history?: readonly ({
|
|
275
|
+
readonly agent_name?: string;
|
|
276
|
+
readonly at: string;
|
|
277
|
+
readonly by?: string;
|
|
278
|
+
readonly kind: "role_given" | "role_taken";
|
|
279
|
+
readonly role: string;
|
|
280
|
+
readonly user: string;
|
|
281
|
+
} | {
|
|
275
282
|
readonly at: string;
|
|
276
283
|
readonly kind: "granted" | "revoked";
|
|
277
284
|
readonly user: string;
|
|
278
|
-
}[];
|
|
285
|
+
})[];
|
|
279
286
|
readonly members: readonly {
|
|
280
287
|
readonly access?: "manage" | "owner" | "read" | "write";
|
|
281
288
|
readonly copies?: "online_only" | "search_only";
|
|
@@ -284,6 +291,12 @@ export interface HouseMethods {
|
|
|
284
291
|
readonly member_document: null | string;
|
|
285
292
|
readonly owner: boolean;
|
|
286
293
|
readonly schema_roles?: readonly string[];
|
|
294
|
+
readonly schema_roles_given?: readonly {
|
|
295
|
+
readonly agent_name?: string;
|
|
296
|
+
readonly at: string;
|
|
297
|
+
readonly by?: string;
|
|
298
|
+
readonly role: string;
|
|
299
|
+
}[];
|
|
287
300
|
readonly since: null | string;
|
|
288
301
|
readonly through_space?: true;
|
|
289
302
|
readonly user: string;
|
|
@@ -324,6 +337,35 @@ export interface HouseMethods {
|
|
|
324
337
|
readonly writable: boolean;
|
|
325
338
|
};
|
|
326
339
|
};
|
|
340
|
+
readonly "service-keys/signatures/check": {
|
|
341
|
+
readonly params: {
|
|
342
|
+
readonly operation_id?: string;
|
|
343
|
+
readonly origin: string;
|
|
344
|
+
readonly room_ref: string;
|
|
345
|
+
readonly signature: string;
|
|
346
|
+
readonly text: string;
|
|
347
|
+
};
|
|
348
|
+
readonly result: {
|
|
349
|
+
readonly matched: boolean;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
readonly "sites/functions/call": {
|
|
353
|
+
readonly params: {
|
|
354
|
+
readonly function: string;
|
|
355
|
+
readonly input?: readonly (readonly unknown[] | boolean | null | number | {
|
|
356
|
+
readonly [key: string]: unknown;
|
|
357
|
+
} | string)[] | boolean | null | number | {
|
|
358
|
+
readonly [key: string]: readonly unknown[] | boolean | null | number | {
|
|
359
|
+
readonly [key: string]: unknown;
|
|
360
|
+
} | string;
|
|
361
|
+
} | string;
|
|
362
|
+
};
|
|
363
|
+
readonly result: {
|
|
364
|
+
readonly answer: readonly unknown[] | boolean | null | number | {
|
|
365
|
+
readonly [key: string]: unknown;
|
|
366
|
+
} | string;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
327
369
|
readonly "sites/submissions/create": {
|
|
328
370
|
readonly params: {
|
|
329
371
|
readonly content: string;
|
|
@@ -483,13 +525,13 @@ export interface HouseMethods {
|
|
|
483
525
|
readonly value: string;
|
|
484
526
|
} | {
|
|
485
527
|
readonly code: "limit_reached";
|
|
486
|
-
readonly limit: "custom_domains" | "external_calls" | "publish_data" | "sites";
|
|
528
|
+
readonly limit: "custom_domains" | "external_calls" | "publish_data" | "site_function_calls" | "sites";
|
|
487
529
|
readonly outcome: "refused";
|
|
488
530
|
readonly position: number;
|
|
489
531
|
readonly retry_at: string;
|
|
490
532
|
} | {
|
|
491
533
|
readonly code: "limit_reached";
|
|
492
|
-
readonly limit: "custom_domains" | "external_calls" | "publish_data" | "sites";
|
|
534
|
+
readonly limit: "custom_domains" | "external_calls" | "publish_data" | "site_function_calls" | "sites";
|
|
493
535
|
readonly outcome: "refused";
|
|
494
536
|
readonly position: number;
|
|
495
537
|
} | {
|
|
@@ -661,7 +703,6 @@ export interface HouseAppMessage {
|
|
|
661
703
|
readonly from: string;
|
|
662
704
|
readonly body: unknown;
|
|
663
705
|
}
|
|
664
|
-
export type HouseInstallation = Open<'accepted' | 'dismissed' | 'manual'>;
|
|
665
706
|
export interface HouseBox {
|
|
666
707
|
readonly x: number;
|
|
667
708
|
readonly y: number;
|
|
@@ -745,8 +786,6 @@ export interface HouseBridge {
|
|
|
745
786
|
push(address: string): Promise<string>;
|
|
746
787
|
replace(address: string): Promise<string>;
|
|
747
788
|
ceremony(path: string): Promise<HouseCeremonyEnded>;
|
|
748
|
-
install(app?: string): Promise<HouseInstallation>;
|
|
749
|
-
installed(): Promise<boolean>;
|
|
750
789
|
onTitleBar(listener: (area: HouseBox | null) => void): () => void;
|
|
751
790
|
setTitleBar(row: HouseTitleRow | null): void;
|
|
752
791
|
notifications(on?: boolean): Promise<HouseNotifications>;
|
|
@@ -14,6 +14,7 @@ export type ValueFacts = {
|
|
|
14
14
|
readonly prefix?: readonly ValueFacts[];
|
|
15
15
|
readonly items?: ValueFacts;
|
|
16
16
|
readonly properties?: Readonly<Record<string, ValueFacts>>;
|
|
17
|
+
readonly required?: readonly string[];
|
|
17
18
|
readonly patterns?: readonly PatternFacts[];
|
|
18
19
|
readonly additional?: ValueFacts;
|
|
19
20
|
};
|
|
@@ -4,6 +4,7 @@ import type { ModelResult } from './model.js';
|
|
|
4
4
|
export type { SavedFacts, TypedPath };
|
|
5
5
|
import type { Open } from './open.js';
|
|
6
6
|
import type { ChangeBatch } from './change.js';
|
|
7
|
+
import type { QueryDocument } from './query.js';
|
|
7
8
|
export type Authorization = object;
|
|
8
9
|
export type MdModelIdentity = {
|
|
9
10
|
identity: string;
|
|
@@ -255,6 +256,11 @@ export type Retention = {
|
|
|
255
256
|
history: HistoryRetention;
|
|
256
257
|
refreshHorizon: number;
|
|
257
258
|
};
|
|
259
|
+
export type QueriedRoom = {
|
|
260
|
+
readonly locator: string;
|
|
261
|
+
readonly handle: string;
|
|
262
|
+
readonly name: string;
|
|
263
|
+
};
|
|
258
264
|
export type Discovery = {
|
|
259
265
|
kind: 'discovery';
|
|
260
266
|
rooms: readonly DiscoveredRoom[];
|
|
@@ -264,6 +270,7 @@ export type Discovery = {
|
|
|
264
270
|
member?: Member;
|
|
265
271
|
timeZone?: string | null;
|
|
266
272
|
roomList?: RoomList;
|
|
273
|
+
queriesOnly?: readonly QueriedRoom[];
|
|
267
274
|
};
|
|
268
275
|
export type TransportUncertainty = {
|
|
269
276
|
kind: 'transport-uncertainty';
|
|
@@ -516,6 +523,17 @@ export type SearchAnswer = {
|
|
|
516
523
|
} | (ProviderRefusal & {
|
|
517
524
|
kind: 'rejected';
|
|
518
525
|
}) | AdapterFailure;
|
|
526
|
+
export type HouseQueryAsk = {
|
|
527
|
+
room: string;
|
|
528
|
+
query: Readonly<Record<string, unknown>>;
|
|
529
|
+
};
|
|
530
|
+
export type HouseQueryAnswer = {
|
|
531
|
+
kind: 'rows';
|
|
532
|
+
documents: readonly QueryDocument[];
|
|
533
|
+
next?: string;
|
|
534
|
+
} | (ProviderRefusal & {
|
|
535
|
+
kind: 'rejected';
|
|
536
|
+
}) | AdapterFailure;
|
|
519
537
|
export type HeldRoom = {
|
|
520
538
|
locator: string;
|
|
521
539
|
roomVersion: string | null;
|
|
@@ -576,6 +594,7 @@ export type Adapter = {
|
|
|
576
594
|
attach(authorization: Authorization, request: AttachRequest): Promise<AttachResult>;
|
|
577
595
|
action(authorization: Authorization, request: ActionRequest): Promise<ActionResult>;
|
|
578
596
|
search?(authorization: Authorization, request: SearchAsk): Promise<SearchAnswer>;
|
|
597
|
+
queryHouse?(authorization: Authorization, request: HouseQueryAsk): Promise<HouseQueryAnswer>;
|
|
579
598
|
reached(locator: string, roomVersion: string, target: string): boolean;
|
|
580
599
|
follows(locator: string, roomVersion: string, next: string): boolean;
|
|
581
600
|
roomStream?: RoomStream;
|
|
@@ -14,6 +14,7 @@ import type { Holdings } from './holdings.js';
|
|
|
14
14
|
import type { DocumentResult, GroupResult, PendingResult } from './query.js';
|
|
15
15
|
import type { RoomDraft, RoomDraftParts, RoomDraftWrite } from './room-draft.js';
|
|
16
16
|
import type { SearchRequest, SearchResult } from './search.js';
|
|
17
|
+
import type { HouseQuery, HouseQueryResult } from './house-query.js';
|
|
17
18
|
import type { Readiness } from './readiness.js';
|
|
18
19
|
import type { ObservedRead } from './reads.js';
|
|
19
20
|
import type { SyncStatus } from './status.js';
|
|
@@ -27,6 +28,7 @@ export type MdRuntimeClient = {
|
|
|
27
28
|
(query: GroupQuery): Promise<GroupResult | PendingResult>;
|
|
28
29
|
};
|
|
29
30
|
search(request: SearchRequest): Promise<SearchResult>;
|
|
31
|
+
queryHouse(query: HouseQuery): Promise<HouseQueryResult>;
|
|
30
32
|
types(locator: string): Promise<RoomSchemas>;
|
|
31
33
|
roomDraft: {
|
|
32
34
|
list(): Promise<readonly RoomDraft[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DefinitionOf, type Document, type ParseResult, type TypedPath } from '../mdmodel/index.js';
|
|
1
|
+
import { type DefinitionOf, type Document, type ParseResult, type TypedPath, type VerifiedModel } from '../mdmodel/index.js';
|
|
2
2
|
import type { ModelState, TypesResult } from './model.js';
|
|
3
3
|
import type { AppTypedSelection } from './listing.js';
|
|
4
4
|
import type { MdModelIdentity } from './adapter.js';
|
|
@@ -20,6 +20,7 @@ export type Composed = {
|
|
|
20
20
|
readonly composition: Composition;
|
|
21
21
|
readonly fingerprint: string;
|
|
22
22
|
};
|
|
23
|
+
export declare function typesPrint(types: VerifiedModel['types']): string;
|
|
23
24
|
export declare function composedOf(composition: Composition): Composed;
|
|
24
25
|
type Selecting<M> = {
|
|
25
26
|
readonly model: M;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type DocumentQuery } from '../mdmodel/index.js';
|
|
2
|
+
import type { ProviderRefusal } from './adapter.js';
|
|
3
|
+
import { type Failure, type Offline } from './outcome.js';
|
|
4
|
+
import type { QueryDocument } from './query.js';
|
|
5
|
+
import { type PortReach } from './reach.js';
|
|
6
|
+
import type { Runtime } from './runtime.js';
|
|
7
|
+
export type HouseQuery = DocumentQuery & {
|
|
8
|
+
rooms: readonly [string];
|
|
9
|
+
};
|
|
10
|
+
export type HouseQueryRows = {
|
|
11
|
+
kind: 'rows';
|
|
12
|
+
documents: readonly QueryDocument[];
|
|
13
|
+
next?: string;
|
|
14
|
+
};
|
|
15
|
+
export type HouseQueryResult = HouseQueryRows | Offline | (ProviderRefusal & {
|
|
16
|
+
kind: 'rejected';
|
|
17
|
+
}) | (ProviderRefusal & {
|
|
18
|
+
kind: 'undeclared';
|
|
19
|
+
}) | Failure;
|
|
20
|
+
export declare function queriedHouse(runtime: Runtime, input: unknown, reach: PortReach | null): Promise<HouseQueryResult>;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import type { HeldRooms } from '../mdmodel/index.js';
|
|
2
2
|
import type { DiscoveredRoom, HeldRoom, OperationScopes, ProviderRefusal, ReplicaAdmission, RoomDeclaration } from './adapter.js';
|
|
3
|
-
import type
|
|
3
|
+
import { type Composition } from './collection.js';
|
|
4
4
|
import type { KeyedChange } from './observation.js';
|
|
5
|
-
import { type ModelState, type TypesResult } from './model.js';
|
|
5
|
+
import { type MdType, type ModelState, type TypesResult } from './model.js';
|
|
6
6
|
import { type PortReach } from './reach.js';
|
|
7
7
|
import type { ReplicaRecord } from './replica.js';
|
|
8
8
|
import type { Runtime } from './runtime.js';
|
|
9
9
|
import type { Stored } from './store.js';
|
|
10
|
-
|
|
10
|
+
type Selection<Model> = {
|
|
11
11
|
roots: readonly string[];
|
|
12
|
-
model:
|
|
12
|
+
model: Model;
|
|
13
13
|
};
|
|
14
|
-
|
|
14
|
+
type Shown<Model> = {
|
|
15
15
|
name: string;
|
|
16
16
|
locator: string;
|
|
17
17
|
handle: string;
|
|
18
18
|
operations: OperationScopes;
|
|
19
19
|
replica: ReplicaAdmission;
|
|
20
|
-
model:
|
|
21
|
-
typedSelection:
|
|
20
|
+
model: Model;
|
|
21
|
+
typedSelection: Selection<Model> | null;
|
|
22
22
|
providerOwnedPaths: readonly string[];
|
|
23
23
|
authoredPaths: readonly string[];
|
|
24
24
|
roomVersion: string | null;
|
|
@@ -26,13 +26,21 @@ export type AppRoom = {
|
|
|
26
26
|
synchronizationAvailable: boolean;
|
|
27
27
|
refusal: ProviderRefusal | null;
|
|
28
28
|
locked: boolean;
|
|
29
|
+
queriesOnly?: true;
|
|
29
30
|
};
|
|
30
|
-
type
|
|
31
|
-
export type
|
|
32
|
-
|
|
31
|
+
export type AppTypedSelection = Selection<TypesResult>;
|
|
32
|
+
export type AppRoom = Shown<TypesResult>;
|
|
33
|
+
export type ListedRoom = Shown<TypesResult<string>>;
|
|
34
|
+
export type ListedModels = Readonly<Record<string, readonly MdType[]>>;
|
|
35
|
+
export type ListedRooms = {
|
|
36
|
+
readonly rooms: readonly ListedRoom[];
|
|
37
|
+
readonly models: ListedModels;
|
|
33
38
|
};
|
|
39
|
+
export type ListedEntry = Omit<Shown<ModelState>, 'locked'>;
|
|
34
40
|
export type Listing = ReadonlyMap<string, ListedEntry>;
|
|
35
|
-
export type RoomsChange = KeyedChange<string,
|
|
41
|
+
export type RoomsChange = KeyedChange<string, ListedRoom> & {
|
|
42
|
+
readonly models: ListedModels;
|
|
43
|
+
};
|
|
36
44
|
export declare function modelIn({ socket, presence }: Runtime, locator: string, stored: Stored | undefined): ModelState;
|
|
37
45
|
export declare function compositionFor(runtime: Runtime, record: ReplicaRecord): Composition;
|
|
38
46
|
export declare function declarationOf({ presence }: Runtime, locator: string, stored: Stored | undefined): {
|
|
@@ -43,7 +51,7 @@ export declare function listedLocators({ presence }: Runtime, held: ReadonlyMap<
|
|
|
43
51
|
export declare function listedOrHeld({ presence }: Runtime, held: ReadonlyMap<string, unknown>, locator: string): boolean;
|
|
44
52
|
export declare function listedEntries(runtime: Runtime, touched: readonly string[]): Promise<readonly ListedEntry[] | null>;
|
|
45
53
|
export declare function listingNow(runtime: Runtime): Promise<Listing>;
|
|
46
|
-
export declare function shownRooms(runtime: Runtime, listing: Listing):
|
|
54
|
+
export declare function shownRooms(runtime: Runtime, listing: Listing): ListedRooms;
|
|
47
55
|
export declare function shownChange(runtime: Runtime, entries: readonly ListedEntry[]): RoomsChange;
|
|
48
56
|
export declare function roomFacts(runtime: Runtime, reach?: PortReach | null): Promise<HeldRooms>;
|
|
49
57
|
export declare function heldRooms({ store }: Runtime, listed: readonly DiscoveredRoom[]): Promise<HeldRoom[]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AcceptedMessage } from './adapter.js';
|
|
2
2
|
import type { Connection } from './tables.js';
|
|
3
3
|
export declare const MESSAGE_TABLES: readonly string[];
|
|
4
|
-
export declare const ROWS = "WITH chosen AS (\n SELECT listed.value AS conversation,\n (SELECT id FROM conversation_messages WHERE conversation = listed.value AND json_extract(message, '$.role') = 'assistant' ORDER BY position DESC, identity DESC LIMIT 1) AS answer,\n (SELECT id FROM conversation_messages WHERE conversation = listed.value AND text <> '' ORDER BY position DESC, identity DESC LIMIT 1) AS said,\n (SELECT id FROM conversation_messages WHERE conversation = listed.value AND json_extract(message, '$.role') = 'house' ORDER BY position, identity LIMIT 1) AS opened,\n (SELECT id FROM conversation_messages WHERE conversation = listed.value AND json_extract(message, '$.role') = 'house' AND json_extract(message, '$.waiting') = 1 ORDER BY position, identity LIMIT 1) AS asking\n FROM json_each(?) AS listed\n )\n SELECT chosen.conversation AS conversation,\n substr(said.text, 1, 512) AS said_text,\n json_extract(said.message, '$.role') AS said_role,\n json_extract(said.message, '$.accepted_at') AS said_at,\n answer.turn AS answered,\n substr(json_extract(answer.message, '$.failure'), 1, 512) AS failure,\n (SELECT value FROM conversation_facts WHERE conversation = chosen.conversation AND name = 'openedTurn') AS opened_turn,\n json_extract(opened.message, '$.source') AS opened_source,\n json_extract(opened.message, '$.sender') AS opened_sender,\n asking.identity AS asking_identity,\n asking.text AS asking_text,\n json_extract(asking.message, '$.accepted_at') AS asking_at,\n json_extract(asking.message, '$.source') AS asking_source,\n json_extract(asking.message, '$.sender') AS asking_sender\n FROM chosen\n LEFT JOIN conversation_messages said ON said.id = chosen.said\n LEFT JOIN conversation_messages answer ON answer.id = chosen.answer\n LEFT JOIN conversation_messages opened ON opened.id = chosen.opened\n LEFT JOIN conversation_messages asking ON asking.id = chosen.asking";
|
|
4
|
+
export declare const ROWS = "WITH chosen AS (\n SELECT listed.value AS conversation,\n (SELECT id FROM conversation_messages WHERE conversation = listed.value AND json_extract(message, '$.role') = 'assistant' ORDER BY position DESC, identity DESC LIMIT 1) AS answer,\n (SELECT id FROM conversation_messages WHERE conversation = listed.value AND text <> '' ORDER BY position DESC, identity DESC LIMIT 1) AS said,\n (SELECT id FROM conversation_messages WHERE conversation = listed.value AND json_extract(message, '$.role') = 'house' ORDER BY position, identity LIMIT 1) AS opened,\n (SELECT id FROM conversation_messages WHERE conversation = listed.value AND json_extract(message, '$.role') = 'house' AND json_extract(message, '$.waiting') = 1 ORDER BY position, identity LIMIT 1) AS asking\n FROM json_each(?) AS listed\n )\n SELECT chosen.conversation AS conversation,\n substr(said.text, 1, 512) AS said_text,\n json_extract(said.message, '$.role') AS said_role,\n json_extract(said.message, '$.accepted_at') AS said_at,\n answer.turn AS answered,\n substr(json_extract(answer.message, '$.failure'), 1, 512) AS failure,\n COALESCE(\n (SELECT value FROM conversation_facts WHERE conversation = chosen.conversation AND name = 'openedTurn'),\n CASE WHEN julianday(json_extract(answer.message, '$.accepted_at')) < (SELECT julianday(json_extract(value, '$')) FROM replica_facts WHERE name = 'readUntil') THEN answer.turn END\n ) AS opened_turn,\n json_extract(opened.message, '$.source') AS opened_source,\n json_extract(opened.message, '$.sender') AS opened_sender,\n asking.identity AS asking_identity,\n asking.text AS asking_text,\n json_extract(asking.message, '$.accepted_at') AS asking_at,\n json_extract(asking.message, '$.source') AS asking_source,\n json_extract(asking.message, '$.sender') AS asking_sender\n FROM chosen\n LEFT JOIN conversation_messages said ON said.id = chosen.said\n LEFT JOIN conversation_messages answer ON answer.id = chosen.answer\n LEFT JOIN conversation_messages opened ON opened.id = chosen.opened\n LEFT JOIN conversation_messages asking ON asking.id = chosen.asking";
|
|
5
5
|
export type HeldConversation = {
|
|
6
6
|
readonly conversation: string;
|
|
7
7
|
readonly read: string | null | undefined;
|
|
@@ -31,7 +31,7 @@ export type StoredModel = Extract<ModelState, {
|
|
|
31
31
|
}> | Omit<Extract<ModelState, {
|
|
32
32
|
status: 'current' | 'cached';
|
|
33
33
|
}>, 'types'>;
|
|
34
|
-
export type TypesResult = {
|
|
34
|
+
export type TypesResult<Types = readonly MdType[]> = {
|
|
35
35
|
status: Open<'unavailable'>;
|
|
36
36
|
reason: ModelUnavailableReason;
|
|
37
37
|
types: null;
|
|
@@ -40,7 +40,7 @@ export type TypesResult = {
|
|
|
40
40
|
identity: string;
|
|
41
41
|
version: string;
|
|
42
42
|
verifiedWith: ModelIdentity;
|
|
43
|
-
types:
|
|
43
|
+
types: Types;
|
|
44
44
|
schema: string | null;
|
|
45
45
|
revision: string | null;
|
|
46
46
|
};
|
|
@@ -50,5 +50,7 @@ export type ValidationReceipt = {
|
|
|
50
50
|
source: Open<'current' | 'cached'>;
|
|
51
51
|
};
|
|
52
52
|
export declare const NO_MODEL: ModelState;
|
|
53
|
+
export declare function sortedTypes(types: VerifiedModel['types']): readonly MdType[];
|
|
53
54
|
export declare function modelTypes(state: ModelState): TypesResult;
|
|
55
|
+
export declare function modelResult<Types>(state: ModelState, types: (held: VerifiedModel['types']) => Types): TypesResult<Types>;
|
|
54
56
|
export declare function storedModel(state: ModelState): StoredModel;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PendingRoom, QueryCoverage, QueryDocument, QueryGroup, QueryResult } from './query.js';
|
|
2
2
|
import type { ReadinessShown, RoomCoverage } from './readiness.js';
|
|
3
|
+
import type { AppRoom, ListedRooms } from './listing.js';
|
|
3
4
|
export type Observation<T> = {
|
|
4
5
|
current(): T;
|
|
5
6
|
subscribe(listener: (value: T) => void): () => void;
|
|
@@ -41,6 +42,7 @@ export declare function keyedChange<K, H, T>(held: ReadonlyMap<K, H>, keys: read
|
|
|
41
42
|
export declare function keyedAt<K, H, T>(held: ReadonlyMap<K, H>, at: ReadonlyMap<K, T | null>, same: (was: H, now: T) => boolean): KeyedChange<K, T> | null;
|
|
42
43
|
export declare function keyedInto<K, T>(held: Map<K, T>, change: KeyedChange<K, T>): void;
|
|
43
44
|
export declare function samePending(was: PendingRoom, now: PendingRoom): boolean;
|
|
45
|
+
export declare function appRooms({ rooms, models }: ListedRooms): readonly AppRoom[];
|
|
44
46
|
export declare function replaces(topic: string, message: unknown): boolean;
|
|
45
47
|
export declare function observed(first: unknown, stop: () => void, topic: string): Observed;
|
|
46
48
|
export declare function opened(watch: (deliver: (message: unknown) => void, fail: (error: unknown) => void) => () => void, topic: string): Promise<Observation<unknown>>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ListedRoom } from './listing.js';
|
|
2
2
|
import type { ReadinessMessage, ReadinessPort } from './preparation.js';
|
|
3
3
|
import type { MdRuntime, RuntimeTopic } from './surface.js';
|
|
4
|
+
import type { QueriedRoom } from './adapter.js';
|
|
4
5
|
import type { Plan, PlanReach, QueryResult } from './query.js';
|
|
5
6
|
import type { SearchResult } from './search.js';
|
|
7
|
+
import type { HouseQueryResult } from './house-query.js';
|
|
6
8
|
export type ReachedDocument = {
|
|
7
9
|
readonly room: string;
|
|
8
10
|
readonly path: string;
|
|
@@ -16,6 +18,7 @@ export type PortReach = {
|
|
|
16
18
|
readonly rooms: readonly string[];
|
|
17
19
|
readonly documents: readonly ReachedDocument[];
|
|
18
20
|
readonly areas?: readonly ReachedArea[];
|
|
21
|
+
readonly queriesOnly?: readonly QueriedRoom[];
|
|
19
22
|
readonly conversations: boolean;
|
|
20
23
|
};
|
|
21
24
|
export type Deliver = (message: unknown) => void;
|
|
@@ -33,13 +36,17 @@ export type Reachable = RuntimeView & {
|
|
|
33
36
|
query(plan: Plan): Promise<QueryResult>;
|
|
34
37
|
watchPlan(plan: Plan, deliver: Deliver, fail: Fail): () => void;
|
|
35
38
|
search(input: unknown, reach: PortReach | null): Promise<SearchResult>;
|
|
39
|
+
queryHouse(input: unknown, reach: PortReach | null): Promise<HouseQueryResult>;
|
|
40
|
+
queried(): readonly QueriedRoom[];
|
|
36
41
|
watchReadiness(port: ReadinessPort, reach: PortReach | null, deliver: (readiness: ReadinessMessage) => void): () => void;
|
|
37
42
|
locked(room: string): Promise<boolean>;
|
|
38
43
|
lockedRooms(): Promise<readonly string[]>;
|
|
39
44
|
watchLocks(notify: () => void): () => void;
|
|
40
45
|
located(room: string, path: string, destination: string): Promise<ReachedDocument | null>;
|
|
41
|
-
room(locator: string): Promise<
|
|
46
|
+
room(locator: string): Promise<ListedRoom | undefined>;
|
|
42
47
|
};
|
|
48
|
+
export declare function queriedOf(reach: PortReach | null, provided: readonly QueriedRoom[]): readonly QueriedRoom[];
|
|
49
|
+
export declare function queriedOnly(reach: PortReach | null, provided: readonly QueriedRoom[], room: string): boolean;
|
|
43
50
|
export declare function holds(reach: PortReach | null, room: string): boolean;
|
|
44
51
|
export declare function governs(reach: PortReach | null, room: {
|
|
45
52
|
readonly locator: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Authorization, ProviderRefusal, ServiceMode } from '../adapter.js';
|
|
1
|
+
import type { Authorization, ProviderRefusal, QueriedRoom, ServiceMode } from '../adapter.js';
|
|
2
2
|
import { type Cell } from '../cell.js';
|
|
3
3
|
import type { Open } from '../open.js';
|
|
4
4
|
import type { CycleProgress, SyncStatus } from '../status.js';
|
|
@@ -23,6 +23,7 @@ export type Session = {
|
|
|
23
23
|
readonly discoveries: number;
|
|
24
24
|
readonly roomsNamed: boolean;
|
|
25
25
|
readonly roomsListed: boolean;
|
|
26
|
+
readonly queriesOnly: readonly QueriedRoom[];
|
|
26
27
|
readonly serviceMode: ServiceMode;
|
|
27
28
|
readonly haltedRefusal: boolean;
|
|
28
29
|
readonly openSignals: number;
|
|
@@ -31,6 +31,7 @@ export type RuntimeSocket = Admission & Answers & {
|
|
|
31
31
|
readonly firstDiscovery: Promise<void>;
|
|
32
32
|
conversations(): Adapter['conversations'];
|
|
33
33
|
search(): Adapter['search'];
|
|
34
|
+
queryHouse(): Adapter['queryHouse'];
|
|
34
35
|
discover(authorized: Authorization): ReturnType<NonNullable<Adapter['discover']>> | undefined;
|
|
35
36
|
follows: Adapter['follows'];
|
|
36
37
|
mutate: Adapter['mutate'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BootstrapInventory, Capability, ListedAgent, ListedConversation, Member, ProviderLimit, RoomList } from '../adapter.js';
|
|
1
|
+
import type { BootstrapInventory, Capability, ListedAgent, ListedConversation, Member, ProviderLimit, QueriedRoom, RoomList } 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';
|
|
@@ -130,7 +130,9 @@ export type Facts = {
|
|
|
130
130
|
readonly agentList: readonly ListedAgent[] | null;
|
|
131
131
|
readonly conversationCursor: string | null;
|
|
132
132
|
readonly chatPins: readonly string[];
|
|
133
|
+
readonly readUntil: string | null;
|
|
133
134
|
readonly roomList: RoomList | null;
|
|
135
|
+
readonly queriesOnly: readonly QueriedRoom[];
|
|
134
136
|
};
|
|
135
137
|
export type Commit = {
|
|
136
138
|
readonly rooms: readonly RoomCommit[];
|
|
@@ -6,7 +6,7 @@ import { type ChatDraftSurface, type ConversationEntry, type ConversationAgent,
|
|
|
6
6
|
import { type UnsentWork } from './durability.js';
|
|
7
7
|
import type { FiguresResult } from './figures.js';
|
|
8
8
|
import { type Holdings } from './holdings.js';
|
|
9
|
-
import { type AppRoom } from './listing.js';
|
|
9
|
+
import { type AppRoom, type ListedRooms } from './listing.js';
|
|
10
10
|
import { type TypesResult } from './model.js';
|
|
11
11
|
import { type Observation } from './observation.js';
|
|
12
12
|
import type { HistoryAnswer, QueueEntry, Resolution, CallResult } from './outcome.js';
|
|
@@ -20,6 +20,7 @@ import { type PresentationSurface, type RoomDraftSurface } from './room-drafts.j
|
|
|
20
20
|
import type { Runtime } from './runtime.js';
|
|
21
21
|
import { type BinaryFileSurface, type SavedParts, type SavedRoomDraft, type SaveResult } from './saves.js';
|
|
22
22
|
import type { SearchRequest, SearchResult } from './search.js';
|
|
23
|
+
import { type HouseQuery, type HouseQueryResult } from './house-query.js';
|
|
23
24
|
import { type EntrySeed } from './seed.js';
|
|
24
25
|
import type { ConnectionRefusal } from './socket.js';
|
|
25
26
|
import type { SyncStatus } from './status.js';
|
|
@@ -29,12 +30,13 @@ export type RoomSchemas = {
|
|
|
29
30
|
};
|
|
30
31
|
export type MdRuntime = {
|
|
31
32
|
loaded(): Promise<void>;
|
|
32
|
-
rooms(): Promise<
|
|
33
|
+
rooms(): Promise<ListedRooms>;
|
|
33
34
|
query: {
|
|
34
35
|
(query: DocumentQuery): Promise<DocumentResult | PendingResult>;
|
|
35
36
|
(query: GroupQuery): Promise<GroupResult | PendingResult>;
|
|
36
37
|
};
|
|
37
38
|
search(request: SearchRequest): Promise<SearchResult>;
|
|
39
|
+
queryHouse(query: HouseQuery): Promise<HouseQueryResult>;
|
|
38
40
|
types(locator: string): Promise<RoomSchemas>;
|
|
39
41
|
roomDraft: RoomDraftSurface;
|
|
40
42
|
conversation: ConversationSurface;
|
package/dist/mdruntime/wire.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export type Shaped<S extends Shape> = {
|
|
|
5
5
|
readonly [K in keyof S]: Checked<S[K]>;
|
|
6
6
|
};
|
|
7
7
|
export declare const text: Check<string>;
|
|
8
|
-
export declare const integer: Check<number>;
|
|
9
8
|
export declare const count: Check<number>;
|
|
10
9
|
export declare const figure: Check<number>;
|
|
11
10
|
export declare const instant: Check<string>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export type { Call, FileChange, Part, PartOf, Status } from './parts.js';
|
|
1
|
+
export { isPart, turnCounts } from './parts.js';
|
|
2
|
+
export type { Counts, Part, PartOf } from './parts.js';
|
|
4
3
|
export { isState, standingState } from './state.js';
|
|
5
4
|
export type { SessionState, Tokens } from './state.js';
|
|
6
5
|
export { applied, isOperation, isTurn } from './turn.js';
|
|
@@ -1,103 +1,30 @@
|
|
|
1
1
|
import { type Check, type Checked } from './check.js';
|
|
2
|
-
declare const STATUS: Check<"done" | "failed" | "running" | "stopped">;
|
|
3
|
-
export type Status = Checked<typeof STATUS>;
|
|
4
|
-
declare const FILE_CHANGE: Check<import("./check.js").Shaped<{
|
|
5
|
-
readonly path: Check<string>;
|
|
6
|
-
readonly added: Check<number>;
|
|
7
|
-
readonly removed: Check<number>;
|
|
8
|
-
readonly diff: Check<string | null>;
|
|
9
|
-
}>>;
|
|
10
|
-
export type FileChange = Checked<typeof FILE_CHANGE>;
|
|
11
|
-
export declare const BACKGROUND_KINDS: readonly ['shell', 'task', 'monitor', 'schedule'];
|
|
12
2
|
declare const PART: Check<import("./check.js").Shaped<{
|
|
13
|
-
readonly type: Check<"
|
|
14
|
-
readonly parent: Check<number | null>;
|
|
15
|
-
readonly line: Check<string>;
|
|
16
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
17
|
-
readonly duration: Check<number | null>;
|
|
18
|
-
readonly kind: Check<"command">;
|
|
19
|
-
readonly exit: Check<number | null>;
|
|
20
|
-
readonly output: Check<string>;
|
|
21
|
-
}> | import("./check.js").Shaped<{
|
|
22
|
-
readonly type: Check<"call">;
|
|
23
|
-
readonly parent: Check<number | null>;
|
|
24
|
-
readonly line: Check<string>;
|
|
25
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
26
|
-
readonly duration: Check<number | null>;
|
|
27
|
-
readonly kind: Check<"edit">;
|
|
28
|
-
readonly files: Check<readonly import("./check.js").Shaped<{
|
|
29
|
-
readonly path: Check<string>;
|
|
30
|
-
readonly added: Check<number>;
|
|
31
|
-
readonly removed: Check<number>;
|
|
32
|
-
readonly diff: Check<string | null>;
|
|
33
|
-
}>[]>;
|
|
34
|
-
}> | import("./check.js").Shaped<{
|
|
35
|
-
readonly type: Check<"call">;
|
|
36
|
-
readonly parent: Check<number | null>;
|
|
37
|
-
readonly line: Check<string>;
|
|
38
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
39
|
-
readonly duration: Check<number | null>;
|
|
40
|
-
readonly kind: Check<"read" | "search">;
|
|
41
|
-
readonly returned: Check<number | null>;
|
|
42
|
-
}> | import("./check.js").Shaped<{
|
|
43
|
-
readonly type: Check<"call">;
|
|
44
|
-
readonly parent: Check<number | null>;
|
|
45
|
-
readonly line: Check<string>;
|
|
46
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
47
|
-
readonly duration: Check<number | null>;
|
|
48
|
-
readonly kind: Check<"fetch" | "other" | "tool">;
|
|
49
|
-
readonly output: Check<string>;
|
|
50
|
-
}> | import("./check.js").Shaped<{
|
|
51
|
-
readonly type: Check<"subagent">;
|
|
52
|
-
readonly parent: Check<number | null>;
|
|
53
|
-
readonly kind: Check<"agent" | "fork" | "workflow">;
|
|
54
|
-
readonly name: Check<string | null>;
|
|
55
|
-
readonly task: Check<string>;
|
|
56
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
57
|
-
readonly step: Check<string | null>;
|
|
58
|
-
readonly report: Check<string | null>;
|
|
59
|
-
readonly tokens: Check<number | null>;
|
|
60
|
-
readonly calls: Check<number | null>;
|
|
61
|
-
readonly duration: Check<number | null>;
|
|
62
|
-
}> | import("./check.js").Shaped<{
|
|
63
|
-
readonly type: Check<"reasoning" | "text">;
|
|
64
|
-
readonly parent: Check<number | null>;
|
|
3
|
+
readonly type: Check<"text">;
|
|
65
4
|
readonly text: Check<string>;
|
|
66
5
|
}> | import("./check.js").Shaped<{
|
|
67
|
-
readonly
|
|
68
|
-
readonly
|
|
69
|
-
readonly
|
|
70
|
-
readonly
|
|
6
|
+
readonly commands: Check<number>;
|
|
7
|
+
readonly edited: Check<number>;
|
|
8
|
+
readonly other: Check<number>;
|
|
9
|
+
readonly added: Check<number>;
|
|
10
|
+
readonly removed: Check<number>;
|
|
11
|
+
readonly failed: Check<number>;
|
|
12
|
+
readonly type: Check<"counts">;
|
|
71
13
|
}> | import("./check.js").Shaped<{
|
|
72
14
|
readonly type: Check<"image">;
|
|
73
|
-
readonly parent: Check<number | null>;
|
|
74
15
|
readonly file: Check<string>;
|
|
75
16
|
readonly name: Check<string>;
|
|
76
17
|
readonly media_type: Check<string>;
|
|
77
|
-
}> | import("./check.js").Shaped<{
|
|
78
|
-
readonly type: Check<"plan">;
|
|
79
|
-
readonly parent: Check<number | null>;
|
|
80
|
-
readonly entries: Check<readonly import("./check.js").Shaped<{
|
|
81
|
-
readonly content: Check<string>;
|
|
82
|
-
readonly status: Check<"done" | "pending" | "running">;
|
|
83
|
-
}>[]>;
|
|
84
18
|
}> | import("./check.js").Shaped<{
|
|
85
19
|
readonly type: Check<"notice">;
|
|
86
|
-
readonly parent: Check<number | null>;
|
|
87
20
|
readonly kind: Check<"compaction" | "error" | "info" | "mode" | "model" | "retry" | "warning">;
|
|
88
21
|
readonly text: Check<string>;
|
|
89
|
-
}> | import("./check.js").Shaped<{
|
|
90
|
-
readonly type: Check<"background">;
|
|
91
|
-
readonly parent: Check<number | null>;
|
|
92
|
-
readonly kind: Check<"monitor" | "schedule" | "shell" | "task">;
|
|
93
|
-
readonly label: Check<string>;
|
|
94
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
95
22
|
}>>;
|
|
96
23
|
export type Part = Checked<typeof PART>;
|
|
97
24
|
export type PartOf<T extends Part['type']> = Extract<Part, {
|
|
98
25
|
readonly type: T;
|
|
99
26
|
}>;
|
|
100
|
-
export type
|
|
27
|
+
export type Counts = Omit<PartOf<'counts'>, 'type'>;
|
|
101
28
|
export declare const isPart: Check<Part>;
|
|
102
|
-
export declare function
|
|
29
|
+
export declare function turnCounts(parts: readonly Part[]): Counts;
|
|
103
30
|
export {};
|
|
@@ -33,11 +33,11 @@ declare const STATE: Check<import("./check.js").Shaped<{
|
|
|
33
33
|
readonly cache_write: Check<number>;
|
|
34
34
|
}> | null>;
|
|
35
35
|
readonly duration: Check<number | null>;
|
|
36
|
-
readonly files: Check<
|
|
37
|
-
readonly
|
|
36
|
+
readonly files: Check<import("./check.js").Shaped<{
|
|
37
|
+
readonly count: Check<number>;
|
|
38
38
|
readonly added: Check<number>;
|
|
39
39
|
readonly removed: Check<number>;
|
|
40
|
-
}
|
|
40
|
+
}>>;
|
|
41
41
|
readonly branch: Check<string | null>;
|
|
42
42
|
readonly worktree: Check<string | null>;
|
|
43
43
|
readonly pull: Check<import("./check.js").Shaped<{
|
|
@@ -50,9 +50,7 @@ declare const STATE: Check<import("./check.js").Shaped<{
|
|
|
50
50
|
readonly suggestion: Check<string | null>;
|
|
51
51
|
readonly running: Check<readonly import("./check.js").Shaped<{
|
|
52
52
|
readonly kind: Check<"monitor" | "schedule" | "shell" | "subagent" | "task">;
|
|
53
|
-
readonly
|
|
54
|
-
readonly progress: Check<string | null>;
|
|
55
|
-
readonly next: Check<string | null>;
|
|
53
|
+
readonly count: Check<number>;
|
|
56
54
|
}>[]>;
|
|
57
55
|
}>>;
|
|
58
56
|
export type SessionState = Checked<typeof STATE>;
|
|
@@ -4,88 +4,25 @@ declare const OPERATION: Check<import("./check.js").Shaped<{
|
|
|
4
4
|
readonly op: Check<"start">;
|
|
5
5
|
readonly index: Check<number>;
|
|
6
6
|
readonly part: Check<import("./check.js").Shaped<{
|
|
7
|
-
readonly type: Check<"
|
|
8
|
-
readonly parent: Check<number | null>;
|
|
9
|
-
readonly line: Check<string>;
|
|
10
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
11
|
-
readonly duration: Check<number | null>;
|
|
12
|
-
readonly kind: Check<"command">;
|
|
13
|
-
readonly exit: Check<number | null>;
|
|
14
|
-
readonly output: Check<string>;
|
|
15
|
-
}> | import("./check.js").Shaped<{
|
|
16
|
-
readonly type: Check<"call">;
|
|
17
|
-
readonly parent: Check<number | null>;
|
|
18
|
-
readonly line: Check<string>;
|
|
19
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
20
|
-
readonly duration: Check<number | null>;
|
|
21
|
-
readonly kind: Check<"edit">;
|
|
22
|
-
readonly files: Check<readonly import("./check.js").Shaped<{
|
|
23
|
-
readonly path: Check<string>;
|
|
24
|
-
readonly added: Check<number>;
|
|
25
|
-
readonly removed: Check<number>;
|
|
26
|
-
readonly diff: Check<string | null>;
|
|
27
|
-
}>[]>;
|
|
28
|
-
}> | import("./check.js").Shaped<{
|
|
29
|
-
readonly type: Check<"call">;
|
|
30
|
-
readonly parent: Check<number | null>;
|
|
31
|
-
readonly line: Check<string>;
|
|
32
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
33
|
-
readonly duration: Check<number | null>;
|
|
34
|
-
readonly kind: Check<"read" | "search">;
|
|
35
|
-
readonly returned: Check<number | null>;
|
|
36
|
-
}> | import("./check.js").Shaped<{
|
|
37
|
-
readonly type: Check<"call">;
|
|
38
|
-
readonly parent: Check<number | null>;
|
|
39
|
-
readonly line: Check<string>;
|
|
40
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
41
|
-
readonly duration: Check<number | null>;
|
|
42
|
-
readonly kind: Check<"fetch" | "other" | "tool">;
|
|
43
|
-
readonly output: Check<string>;
|
|
44
|
-
}> | import("./check.js").Shaped<{
|
|
45
|
-
readonly type: Check<"subagent">;
|
|
46
|
-
readonly parent: Check<number | null>;
|
|
47
|
-
readonly kind: Check<"agent" | "fork" | "workflow">;
|
|
48
|
-
readonly name: Check<string | null>;
|
|
49
|
-
readonly task: Check<string>;
|
|
50
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
51
|
-
readonly step: Check<string | null>;
|
|
52
|
-
readonly report: Check<string | null>;
|
|
53
|
-
readonly tokens: Check<number | null>;
|
|
54
|
-
readonly calls: Check<number | null>;
|
|
55
|
-
readonly duration: Check<number | null>;
|
|
56
|
-
}> | import("./check.js").Shaped<{
|
|
57
|
-
readonly type: Check<"reasoning" | "text">;
|
|
58
|
-
readonly parent: Check<number | null>;
|
|
7
|
+
readonly type: Check<"text">;
|
|
59
8
|
readonly text: Check<string>;
|
|
60
9
|
}> | import("./check.js").Shaped<{
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
10
|
+
readonly commands: Check<number>;
|
|
11
|
+
readonly edited: Check<number>;
|
|
12
|
+
readonly other: Check<number>;
|
|
13
|
+
readonly added: Check<number>;
|
|
14
|
+
readonly removed: Check<number>;
|
|
15
|
+
readonly failed: Check<number>;
|
|
16
|
+
readonly type: Check<"counts">;
|
|
65
17
|
}> | import("./check.js").Shaped<{
|
|
66
18
|
readonly type: Check<"image">;
|
|
67
|
-
readonly parent: Check<number | null>;
|
|
68
19
|
readonly file: Check<string>;
|
|
69
20
|
readonly name: Check<string>;
|
|
70
21
|
readonly media_type: Check<string>;
|
|
71
|
-
}> | import("./check.js").Shaped<{
|
|
72
|
-
readonly type: Check<"plan">;
|
|
73
|
-
readonly parent: Check<number | null>;
|
|
74
|
-
readonly entries: Check<readonly import("./check.js").Shaped<{
|
|
75
|
-
readonly content: Check<string>;
|
|
76
|
-
readonly status: Check<"done" | "pending" | "running">;
|
|
77
|
-
}>[]>;
|
|
78
22
|
}> | import("./check.js").Shaped<{
|
|
79
23
|
readonly type: Check<"notice">;
|
|
80
|
-
readonly parent: Check<number | null>;
|
|
81
24
|
readonly kind: Check<"compaction" | "error" | "info" | "mode" | "model" | "retry" | "warning">;
|
|
82
25
|
readonly text: Check<string>;
|
|
83
|
-
}> | import("./check.js").Shaped<{
|
|
84
|
-
readonly type: Check<"background">;
|
|
85
|
-
readonly parent: Check<number | null>;
|
|
86
|
-
readonly kind: Check<"monitor" | "schedule" | "shell" | "task">;
|
|
87
|
-
readonly label: Check<string>;
|
|
88
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
89
26
|
}>>;
|
|
90
27
|
}> | import("./check.js").Shaped<{
|
|
91
28
|
readonly op: Check<"append">;
|
|
@@ -95,176 +32,50 @@ declare const OPERATION: Check<import("./check.js").Shaped<{
|
|
|
95
32
|
readonly op: Check<"set">;
|
|
96
33
|
readonly index: Check<number>;
|
|
97
34
|
readonly part: Check<import("./check.js").Shaped<{
|
|
98
|
-
readonly type: Check<"
|
|
99
|
-
readonly parent: Check<number | null>;
|
|
100
|
-
readonly line: Check<string>;
|
|
101
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
102
|
-
readonly duration: Check<number | null>;
|
|
103
|
-
readonly kind: Check<"command">;
|
|
104
|
-
readonly exit: Check<number | null>;
|
|
105
|
-
readonly output: Check<string>;
|
|
106
|
-
}> | import("./check.js").Shaped<{
|
|
107
|
-
readonly type: Check<"call">;
|
|
108
|
-
readonly parent: Check<number | null>;
|
|
109
|
-
readonly line: Check<string>;
|
|
110
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
111
|
-
readonly duration: Check<number | null>;
|
|
112
|
-
readonly kind: Check<"edit">;
|
|
113
|
-
readonly files: Check<readonly import("./check.js").Shaped<{
|
|
114
|
-
readonly path: Check<string>;
|
|
115
|
-
readonly added: Check<number>;
|
|
116
|
-
readonly removed: Check<number>;
|
|
117
|
-
readonly diff: Check<string | null>;
|
|
118
|
-
}>[]>;
|
|
119
|
-
}> | import("./check.js").Shaped<{
|
|
120
|
-
readonly type: Check<"call">;
|
|
121
|
-
readonly parent: Check<number | null>;
|
|
122
|
-
readonly line: Check<string>;
|
|
123
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
124
|
-
readonly duration: Check<number | null>;
|
|
125
|
-
readonly kind: Check<"read" | "search">;
|
|
126
|
-
readonly returned: Check<number | null>;
|
|
127
|
-
}> | import("./check.js").Shaped<{
|
|
128
|
-
readonly type: Check<"call">;
|
|
129
|
-
readonly parent: Check<number | null>;
|
|
130
|
-
readonly line: Check<string>;
|
|
131
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
132
|
-
readonly duration: Check<number | null>;
|
|
133
|
-
readonly kind: Check<"fetch" | "other" | "tool">;
|
|
134
|
-
readonly output: Check<string>;
|
|
135
|
-
}> | import("./check.js").Shaped<{
|
|
136
|
-
readonly type: Check<"subagent">;
|
|
137
|
-
readonly parent: Check<number | null>;
|
|
138
|
-
readonly kind: Check<"agent" | "fork" | "workflow">;
|
|
139
|
-
readonly name: Check<string | null>;
|
|
140
|
-
readonly task: Check<string>;
|
|
141
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
142
|
-
readonly step: Check<string | null>;
|
|
143
|
-
readonly report: Check<string | null>;
|
|
144
|
-
readonly tokens: Check<number | null>;
|
|
145
|
-
readonly calls: Check<number | null>;
|
|
146
|
-
readonly duration: Check<number | null>;
|
|
147
|
-
}> | import("./check.js").Shaped<{
|
|
148
|
-
readonly type: Check<"reasoning" | "text">;
|
|
149
|
-
readonly parent: Check<number | null>;
|
|
35
|
+
readonly type: Check<"text">;
|
|
150
36
|
readonly text: Check<string>;
|
|
151
37
|
}> | import("./check.js").Shaped<{
|
|
152
|
-
readonly
|
|
153
|
-
readonly
|
|
154
|
-
readonly
|
|
155
|
-
readonly
|
|
38
|
+
readonly commands: Check<number>;
|
|
39
|
+
readonly edited: Check<number>;
|
|
40
|
+
readonly other: Check<number>;
|
|
41
|
+
readonly added: Check<number>;
|
|
42
|
+
readonly removed: Check<number>;
|
|
43
|
+
readonly failed: Check<number>;
|
|
44
|
+
readonly type: Check<"counts">;
|
|
156
45
|
}> | import("./check.js").Shaped<{
|
|
157
46
|
readonly type: Check<"image">;
|
|
158
|
-
readonly parent: Check<number | null>;
|
|
159
47
|
readonly file: Check<string>;
|
|
160
48
|
readonly name: Check<string>;
|
|
161
49
|
readonly media_type: Check<string>;
|
|
162
|
-
}> | import("./check.js").Shaped<{
|
|
163
|
-
readonly type: Check<"plan">;
|
|
164
|
-
readonly parent: Check<number | null>;
|
|
165
|
-
readonly entries: Check<readonly import("./check.js").Shaped<{
|
|
166
|
-
readonly content: Check<string>;
|
|
167
|
-
readonly status: Check<"done" | "pending" | "running">;
|
|
168
|
-
}>[]>;
|
|
169
50
|
}> | import("./check.js").Shaped<{
|
|
170
51
|
readonly type: Check<"notice">;
|
|
171
|
-
readonly parent: Check<number | null>;
|
|
172
52
|
readonly kind: Check<"compaction" | "error" | "info" | "mode" | "model" | "retry" | "warning">;
|
|
173
53
|
readonly text: Check<string>;
|
|
174
|
-
}> | import("./check.js").Shaped<{
|
|
175
|
-
readonly type: Check<"background">;
|
|
176
|
-
readonly parent: Check<number | null>;
|
|
177
|
-
readonly kind: Check<"monitor" | "schedule" | "shell" | "task">;
|
|
178
|
-
readonly label: Check<string>;
|
|
179
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
180
54
|
}>>;
|
|
181
55
|
}>>;
|
|
182
56
|
export type Operation = Checked<typeof OPERATION>;
|
|
183
57
|
export declare const isOperation: Check<Operation>;
|
|
184
58
|
declare const TURN: Check<import("./check.js").Shaped<{
|
|
185
59
|
readonly parts: Check<readonly (import("./check.js").Shaped<{
|
|
186
|
-
readonly type: Check<"
|
|
187
|
-
readonly parent: Check<number | null>;
|
|
188
|
-
readonly line: Check<string>;
|
|
189
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
190
|
-
readonly duration: Check<number | null>;
|
|
191
|
-
readonly kind: Check<"command">;
|
|
192
|
-
readonly exit: Check<number | null>;
|
|
193
|
-
readonly output: Check<string>;
|
|
194
|
-
}> | import("./check.js").Shaped<{
|
|
195
|
-
readonly type: Check<"call">;
|
|
196
|
-
readonly parent: Check<number | null>;
|
|
197
|
-
readonly line: Check<string>;
|
|
198
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
199
|
-
readonly duration: Check<number | null>;
|
|
200
|
-
readonly kind: Check<"edit">;
|
|
201
|
-
readonly files: Check<readonly import("./check.js").Shaped<{
|
|
202
|
-
readonly path: Check<string>;
|
|
203
|
-
readonly added: Check<number>;
|
|
204
|
-
readonly removed: Check<number>;
|
|
205
|
-
readonly diff: Check<string | null>;
|
|
206
|
-
}>[]>;
|
|
207
|
-
}> | import("./check.js").Shaped<{
|
|
208
|
-
readonly type: Check<"call">;
|
|
209
|
-
readonly parent: Check<number | null>;
|
|
210
|
-
readonly line: Check<string>;
|
|
211
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
212
|
-
readonly duration: Check<number | null>;
|
|
213
|
-
readonly kind: Check<"read" | "search">;
|
|
214
|
-
readonly returned: Check<number | null>;
|
|
215
|
-
}> | import("./check.js").Shaped<{
|
|
216
|
-
readonly type: Check<"call">;
|
|
217
|
-
readonly parent: Check<number | null>;
|
|
218
|
-
readonly line: Check<string>;
|
|
219
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
220
|
-
readonly duration: Check<number | null>;
|
|
221
|
-
readonly kind: Check<"fetch" | "other" | "tool">;
|
|
222
|
-
readonly output: Check<string>;
|
|
223
|
-
}> | import("./check.js").Shaped<{
|
|
224
|
-
readonly type: Check<"subagent">;
|
|
225
|
-
readonly parent: Check<number | null>;
|
|
226
|
-
readonly kind: Check<"agent" | "fork" | "workflow">;
|
|
227
|
-
readonly name: Check<string | null>;
|
|
228
|
-
readonly task: Check<string>;
|
|
229
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
230
|
-
readonly step: Check<string | null>;
|
|
231
|
-
readonly report: Check<string | null>;
|
|
232
|
-
readonly tokens: Check<number | null>;
|
|
233
|
-
readonly calls: Check<number | null>;
|
|
234
|
-
readonly duration: Check<number | null>;
|
|
235
|
-
}> | import("./check.js").Shaped<{
|
|
236
|
-
readonly type: Check<"reasoning" | "text">;
|
|
237
|
-
readonly parent: Check<number | null>;
|
|
60
|
+
readonly type: Check<"text">;
|
|
238
61
|
readonly text: Check<string>;
|
|
239
62
|
}> | import("./check.js").Shaped<{
|
|
240
|
-
readonly
|
|
241
|
-
readonly
|
|
242
|
-
readonly
|
|
243
|
-
readonly
|
|
63
|
+
readonly commands: Check<number>;
|
|
64
|
+
readonly edited: Check<number>;
|
|
65
|
+
readonly other: Check<number>;
|
|
66
|
+
readonly added: Check<number>;
|
|
67
|
+
readonly removed: Check<number>;
|
|
68
|
+
readonly failed: Check<number>;
|
|
69
|
+
readonly type: Check<"counts">;
|
|
244
70
|
}> | import("./check.js").Shaped<{
|
|
245
71
|
readonly type: Check<"image">;
|
|
246
|
-
readonly parent: Check<number | null>;
|
|
247
72
|
readonly file: Check<string>;
|
|
248
73
|
readonly name: Check<string>;
|
|
249
74
|
readonly media_type: Check<string>;
|
|
250
|
-
}> | import("./check.js").Shaped<{
|
|
251
|
-
readonly type: Check<"plan">;
|
|
252
|
-
readonly parent: Check<number | null>;
|
|
253
|
-
readonly entries: Check<readonly import("./check.js").Shaped<{
|
|
254
|
-
readonly content: Check<string>;
|
|
255
|
-
readonly status: Check<"done" | "pending" | "running">;
|
|
256
|
-
}>[]>;
|
|
257
75
|
}> | import("./check.js").Shaped<{
|
|
258
76
|
readonly type: Check<"notice">;
|
|
259
|
-
readonly parent: Check<number | null>;
|
|
260
77
|
readonly kind: Check<"compaction" | "error" | "info" | "mode" | "model" | "retry" | "warning">;
|
|
261
78
|
readonly text: Check<string>;
|
|
262
|
-
}> | import("./check.js").Shaped<{
|
|
263
|
-
readonly type: Check<"background">;
|
|
264
|
-
readonly parent: Check<number | null>;
|
|
265
|
-
readonly kind: Check<"monitor" | "schedule" | "shell" | "task">;
|
|
266
|
-
readonly label: Check<string>;
|
|
267
|
-
readonly status: Check<"done" | "failed" | "running" | "stopped">;
|
|
268
79
|
}>)[]>;
|
|
269
80
|
readonly tokens: Check<import("./check.js").Shaped<{
|
|
270
81
|
readonly input: Check<number>;
|
|
@@ -299,11 +110,11 @@ declare const TURN: Check<import("./check.js").Shaped<{
|
|
|
299
110
|
readonly cache_write: Check<number>;
|
|
300
111
|
}> | null>;
|
|
301
112
|
readonly duration: Check<number | null>;
|
|
302
|
-
readonly files: Check<
|
|
303
|
-
readonly
|
|
113
|
+
readonly files: Check<import("./check.js").Shaped<{
|
|
114
|
+
readonly count: Check<number>;
|
|
304
115
|
readonly added: Check<number>;
|
|
305
116
|
readonly removed: Check<number>;
|
|
306
|
-
}
|
|
117
|
+
}>>;
|
|
307
118
|
readonly branch: Check<string | null>;
|
|
308
119
|
readonly worktree: Check<string | null>;
|
|
309
120
|
readonly pull: Check<import("./check.js").Shaped<{
|
|
@@ -316,9 +127,7 @@ declare const TURN: Check<import("./check.js").Shaped<{
|
|
|
316
127
|
readonly suggestion: Check<string | null>;
|
|
317
128
|
readonly running: Check<readonly import("./check.js").Shaped<{
|
|
318
129
|
readonly kind: Check<"monitor" | "schedule" | "shell" | "subagent" | "task">;
|
|
319
|
-
readonly
|
|
320
|
-
readonly progress: Check<string | null>;
|
|
321
|
-
readonly next: Check<string | null>;
|
|
130
|
+
readonly count: Check<number>;
|
|
322
131
|
}>[]>;
|
|
323
132
|
}>>;
|
|
324
133
|
}>>;
|
package/dist/test-host.js
CHANGED
|
@@ -152,8 +152,6 @@ export function createHouseBridgeTestHost(options = {}) {
|
|
|
152
152
|
ceremonies.push(target);
|
|
153
153
|
return new Promise(() => { });
|
|
154
154
|
},
|
|
155
|
-
install: () => Promise.resolve('manual'),
|
|
156
|
-
installed: () => Promise.resolve(false),
|
|
157
155
|
onTitleBar(listener) {
|
|
158
156
|
queueMicrotask(() => listener(null));
|
|
159
157
|
return () => { };
|
package/docs/families.md
CHANGED
|
@@ -21,24 +21,6 @@
|
|
|
21
21
|
resolves once it closes, with `said`, what the page said it ended with, or
|
|
22
22
|
`null` when it closed with nothing said, and `done`, whether the decision was
|
|
23
23
|
carried out.
|
|
24
|
-
- **Installation** - `install()` offers the page as a Home-screen app. Where the
|
|
25
|
-
browser can start the install itself the shell starts it, and otherwise,
|
|
26
|
-
where the browser has an install prompt ready, the shell shows it; the call
|
|
27
|
-
resolves `'accepted'` or `'dismissed'` with the User's choice, spending that
|
|
28
|
-
prompt. Otherwise, as on every iPhone and iPad, it resolves `'manual'` and
|
|
29
|
-
the App shows its own instructions. A start or a prompt the browser refuses,
|
|
30
|
-
as for a call made without a click, rejects with an error named and coded by
|
|
31
|
-
the browser's own error name, with `retryable` false, and a prompt stays
|
|
32
|
-
ready. Call it from a click. `installed()` resolves `true` where the browser
|
|
33
|
-
lists one of the related applications the page's manifest names as installed,
|
|
34
|
-
and `false` otherwise; an App's manifest names none. The standard
|
|
35
|
-
`display-mode` media query, `standalone`, `fullscreen` on an iPhone or
|
|
36
|
-
iPad, or `window-controls-overlay` in a desktop window with its title-bar
|
|
37
|
-
overlay on, and `navigator.standalone` tell the App it runs installed.
|
|
38
|
-
`install(app)` installs another App, named by its reference, from House's
|
|
39
|
-
own panel alone, where the browser can start the install itself, and
|
|
40
|
-
resolves `'manual'` elsewhere; an App's or a Site's call rejects with an
|
|
41
|
-
error named `HouseCeremonyRefused`.
|
|
42
24
|
- **Title bar** - `onTitleBar(listener)` tells the listener the box of the
|
|
43
25
|
window's title bar in the page, `{ x, y, width, height }`, once the shell
|
|
44
26
|
knows it and at each change, or `null` while the window draws its own;
|
|
@@ -187,8 +169,7 @@ records in `tabs` each `setTab`, answers a release code read from the
|
|
|
187
169
|
`external` function it was given, or `null`, and records the request in
|
|
188
170
|
`externalCalls`, answers `readScreenshot` from the `screenshots` it was given
|
|
189
171
|
by App reference and `readSiteScreenshot` from the `siteScreenshots` it was
|
|
190
|
-
given by Site identifier,
|
|
191
|
-
with no install prompt does, and every `installed()` `false`, tells every `onTitleBar` listener
|
|
172
|
+
given by Site identifier, tells every `onTitleBar` listener
|
|
192
173
|
`null`, as a window that draws its own title bar does, and takes every `setTitleBar` as such a
|
|
193
174
|
window does, answers every `notifications()` `'unavailable'`,
|
|
194
175
|
as a browser without push does, records in `chats`
|
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,
|
|
3
|
+
"version": "0.1.0-cf624397eed9c",
|
|
4
|
+
"description": "Types of the agents.house App bridge House hands every App: navigation, the tab title and icon, ceremonies, 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,7 +0,0 @@
|
|
|
1
|
-
export declare const OUTPUT_LINES = 20;
|
|
2
|
-
export declare const OUTPUT_CHARACTERS = 4000;
|
|
3
|
-
export declare const DIFF_CHARACTERS = 10000;
|
|
4
|
-
export declare const FIRST_PART_CHARACTERS = 2000;
|
|
5
|
-
export declare function lastLines(output: string): string;
|
|
6
|
-
export declare function firstPart(result: string): string;
|
|
7
|
-
export declare function keptDiff(diff: string): string | null;
|