@agentshouse/app-bridge 0.1.0-c646d0da70608 → 0.1.0-c69b16d4f072a
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/dist/mdmodel/index.d.ts +1 -1
- package/dist/mdruntime/adapter.d.ts +3 -0
- package/dist/mdruntime/connection.d.ts +4 -1
- package/dist/mdruntime/overlay.d.ts +1 -0
- package/dist/mdruntime/query.d.ts +6 -0
- package/dist/mdruntime/reach.d.ts +1 -2
- package/dist/mdruntime/room-draft.d.ts +12 -0
- package/dist/mdruntime/rows.d.ts +2 -1
- package/dist/mdruntime/search.d.ts +9 -2
- package/dist/mdruntime/seed.d.ts +15 -0
- package/dist/mdruntime/store.d.ts +2 -2
- package/package.json +1 -1
package/dist/mdmodel/index.d.ts
CHANGED
|
@@ -14,5 +14,5 @@ export type { Definition, JsonType, PatternFacts, PointerFacts, SectionSpec, Sha
|
|
|
14
14
|
export type { ApplyResult, BodyResult, Change, Division, DivisionContext, Document, DocumentCheck, Frontmatter, FrontmatterResult, Library, ModelVerification, Link, LinkOccurrence, ParseResult, Projection, ProjectionContext, Reached, Reference, Refusal, Span, Validation, ValidationContext, VerifiedModel, } from './types.js';
|
|
15
15
|
export { checkDocument, resolves, sectionReferences, validate, verify } from './validate.js';
|
|
16
16
|
export { VERSION } from './version.js';
|
|
17
|
-
export { equalValue, frontmatterValue } from './yaml.js';
|
|
17
|
+
export { bodyAfterFrontmatter, equalValue, frontmatterValue } from './yaml.js';
|
|
18
18
|
export type { FrontmatterValue } from './yaml.js';
|
|
@@ -277,6 +277,7 @@ export type BootstrapPage = {
|
|
|
277
277
|
models?: RoomModels;
|
|
278
278
|
documents: Readonly<Record<string, string>>;
|
|
279
279
|
revisions: Readonly<Record<string, string>>;
|
|
280
|
+
fileIds?: Readonly<Record<string, string>>;
|
|
280
281
|
changes: Readonly<Record<string, HeadChange>>;
|
|
281
282
|
binaryFiles: Readonly<Record<string, BinaryFile>>;
|
|
282
283
|
pageToken?: PageToken;
|
|
@@ -296,6 +297,7 @@ export type RefreshPage = {
|
|
|
296
297
|
models?: RoomModels;
|
|
297
298
|
documents: Readonly<Record<string, string>>;
|
|
298
299
|
revisions: Readonly<Record<string, string>>;
|
|
300
|
+
fileIds?: Readonly<Record<string, string>>;
|
|
299
301
|
changes: Readonly<Record<string, HeadChange>>;
|
|
300
302
|
binaryFiles: Readonly<Record<string, BinaryFile>>;
|
|
301
303
|
removals: readonly string[];
|
|
@@ -324,6 +326,7 @@ export type MutationResult = {
|
|
|
324
326
|
roomVersion: string;
|
|
325
327
|
documents: Readonly<Record<string, string>>;
|
|
326
328
|
revisions: Readonly<Record<string, string>>;
|
|
329
|
+
fileIds?: Readonly<Record<string, string>>;
|
|
327
330
|
changes: Readonly<Record<string, HeadChange>>;
|
|
328
331
|
removals: readonly string[];
|
|
329
332
|
binaryFiles?: Readonly<Record<string, BinaryFile>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type TypesResult } from './model.js';
|
|
2
2
|
import { type Observation } from './observation.js';
|
|
3
3
|
import { type DocumentQuery, type DocumentResult, type GroupQuery, type GroupResult, type PendingResult } from './query.js';
|
|
4
|
+
import { type EntrySeed } from './seed.js';
|
|
4
5
|
import { type SearchRequest, type SearchResult } from './search.js';
|
|
5
6
|
import { type Adapter, type Authorization, type Member, type ProviderRefusal, type ServiceMode } from './adapter.js';
|
|
6
7
|
import { type ChatDraftSurface, type ConversationAgent, type ConversationEntry, type ConversationOptions, type ConversationSurface, type ConversationView } from './conversation.js';
|
|
@@ -14,7 +15,7 @@ import { type RoomDraft, type RoomDraftWrite } from './room-draft.js';
|
|
|
14
15
|
import { type SyncStatus } from './status.js';
|
|
15
16
|
import { type RuntimeShell } from './durability.js';
|
|
16
17
|
import { type RuntimeDemand } from './acquisition.js';
|
|
17
|
-
import { type CapacityCause, type CodeAvailability, type Persistence, type Readiness } from './readiness.js';
|
|
18
|
+
import { type CapacityCause, type CodeAvailability, type Persistence, type Readiness, type SearchObligation } from './readiness.js';
|
|
18
19
|
import { type NarrowedView, type PortReach, type RuntimeView } from './reach.js';
|
|
19
20
|
export type AppTypedSelection = {
|
|
20
21
|
roots: readonly string[];
|
|
@@ -126,8 +127,10 @@ export type ReadinessPort = {
|
|
|
126
127
|
readonly target: string;
|
|
127
128
|
readonly code: CodeAvailability;
|
|
128
129
|
readonly capacity: CapacityCause | null;
|
|
130
|
+
readonly search: SearchObligation;
|
|
129
131
|
};
|
|
130
132
|
export type ComposedRuntime = RuntimeView & {
|
|
133
|
+
seed(entry: EntrySeed): void;
|
|
131
134
|
stop(): Promise<void>;
|
|
132
135
|
lose(locators: readonly string[]): Promise<void>;
|
|
133
136
|
acquire(demand: RuntimeDemand): void;
|
|
@@ -2,6 +2,7 @@ import type { BinaryFile, HeadChange } from './adapter.js';
|
|
|
2
2
|
import type { ChangeBatch } from './change.js';
|
|
3
3
|
export type Heads = {
|
|
4
4
|
revisions: Readonly<Record<string, string>>;
|
|
5
|
+
fileIds: Readonly<Record<string, string>>;
|
|
5
6
|
changes: Readonly<Record<string, HeadChange>>;
|
|
6
7
|
};
|
|
7
8
|
export type HeldBinary = ({
|
|
@@ -55,6 +55,7 @@ export type Select = 'all' | {
|
|
|
55
55
|
markdown?: true;
|
|
56
56
|
backlinks?: true;
|
|
57
57
|
change?: true;
|
|
58
|
+
fileId?: true;
|
|
58
59
|
};
|
|
59
60
|
export type OrderOptions = {
|
|
60
61
|
nulls?: 'first' | 'last';
|
|
@@ -95,6 +96,7 @@ export type QueryDocument = {
|
|
|
95
96
|
markdown?: string;
|
|
96
97
|
backlinks?: readonly Backlink[];
|
|
97
98
|
change?: HeadChange | null;
|
|
99
|
+
fileId?: string | null;
|
|
98
100
|
binaryFile?: BinaryFileRecord;
|
|
99
101
|
};
|
|
100
102
|
export type QueryGroup = {
|
|
@@ -199,6 +201,7 @@ export type DocumentShape = {
|
|
|
199
201
|
markdown: boolean;
|
|
200
202
|
backlinks: boolean;
|
|
201
203
|
change: boolean;
|
|
204
|
+
fileId: boolean;
|
|
202
205
|
orderBy: readonly {
|
|
203
206
|
key: KeyPlan;
|
|
204
207
|
options: OrderOptions & {
|
|
@@ -219,6 +222,7 @@ export type PlanReach = {
|
|
|
219
222
|
documents: readonly string[];
|
|
220
223
|
};
|
|
221
224
|
export type Plan = {
|
|
225
|
+
key: string;
|
|
222
226
|
rooms: readonly string[] | null;
|
|
223
227
|
reach: PlanReach | null;
|
|
224
228
|
root: Scope;
|
|
@@ -240,8 +244,10 @@ type Entries = Readonly<Record<string, unknown>>;
|
|
|
240
244
|
export declare function invalid(at: string, problem: string): never;
|
|
241
245
|
export declare function plain(value: unknown): value is Entries;
|
|
242
246
|
export declare function known(value: Entries, allowed: readonly string[], at: string): void;
|
|
247
|
+
export declare function flag(input: unknown, at: string): boolean;
|
|
243
248
|
export declare function planOf(input: unknown, facts: HeldRooms, reach?: PlanReach | null): Plan;
|
|
244
249
|
export declare function limitOf(input: unknown): number | null;
|
|
245
250
|
export declare function filterOf(input: unknown, facts: HeldRooms, reach?: PlanReach | null): Plan;
|
|
251
|
+
export declare function queryKey(query: unknown): string;
|
|
246
252
|
export declare function identityOf(plan: Plan): string;
|
|
247
253
|
export {};
|
|
@@ -2,7 +2,7 @@ import type { ReferrerScope } from './adapter.js';
|
|
|
2
2
|
import type { MdRuntime, ReadinessPort, RuntimeTopic } from './connection.js';
|
|
3
3
|
import type { Plan, PlanReach, QueryResult } from './query.js';
|
|
4
4
|
import type { Readiness } from './readiness.js';
|
|
5
|
-
import type
|
|
5
|
+
import { type SearchResult } from './search.js';
|
|
6
6
|
export type ReachedDocument = {
|
|
7
7
|
readonly room: string;
|
|
8
8
|
readonly path: string;
|
|
@@ -27,7 +27,6 @@ export type Reachable = RuntimeView & {
|
|
|
27
27
|
query(plan: Plan): Promise<QueryResult>;
|
|
28
28
|
watchPlan(plan: Plan, deliver: (message: unknown) => void): () => void;
|
|
29
29
|
search(input: unknown, reach: PortReach | null): Promise<SearchResult>;
|
|
30
|
-
searching(target: string): void;
|
|
31
30
|
watchReadiness(port: ReadinessPort, reach: PortReach | null, deliver: (readiness: Readiness) => void): () => void;
|
|
32
31
|
referrerScope(referrer: unknown): ReferrerScope | null;
|
|
33
32
|
};
|
|
@@ -130,6 +130,18 @@ export declare function underneath(parts: HeldParts, path: string, visible: Visi
|
|
|
130
130
|
export declare function heldFile(blob: Blob, base: string | null): Promise<HeldFile>;
|
|
131
131
|
export declare function binaryBase(visible: VisibleLayer | undefined, path: string): string | null;
|
|
132
132
|
export declare function changedParts(path: string, report: ChangedUnderneath): readonly ChangedPart[];
|
|
133
|
+
export type TextParts = {
|
|
134
|
+
readonly fields?: Readonly<Record<string, {
|
|
135
|
+
readonly value: unknown;
|
|
136
|
+
}>>;
|
|
137
|
+
readonly sections?: Readonly<Record<string, {
|
|
138
|
+
readonly value: string;
|
|
139
|
+
}>>;
|
|
140
|
+
readonly preamble?: {
|
|
141
|
+
readonly value: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
export declare function partsAfter(markdown: string, parts: TextParts): string;
|
|
133
145
|
export declare function returnedInto(existing: HeldParts | undefined, returned: HeldParts): HeldParts;
|
|
134
146
|
export declare function moveTarget(move: {
|
|
135
147
|
readonly to: string;
|
package/dist/mdruntime/rows.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export type DocumentRow = {
|
|
|
15
15
|
directories: readonly string[];
|
|
16
16
|
text: string | null;
|
|
17
17
|
change: HeadChange | null;
|
|
18
|
+
fileId: string | null;
|
|
18
19
|
binary: BinaryFileRecord | null;
|
|
19
20
|
};
|
|
20
21
|
export type ReferenceRow = {
|
|
@@ -32,5 +33,5 @@ export type Row = DocumentRow | ReferenceRow;
|
|
|
32
33
|
export declare function documentKey(room: string, path: string): string;
|
|
33
34
|
export declare function roomOfKey(key: string): string;
|
|
34
35
|
export declare function markdownPath(path: string): boolean;
|
|
35
|
-
export declare function rowsOf(room: string, path: string, document: Frontmatter | null, composition: Composition, change: HeadChange | null, binary: BinaryFileRecord | null): readonly Row[];
|
|
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[];
|
|
36
37
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ProviderRefusal } from './adapter.js';
|
|
1
2
|
import type { ChangeSet } from './change-set.js';
|
|
2
3
|
import { type CoveredRoom, type Filter, type PendingRoom } from './query.js';
|
|
3
4
|
import type { Open } from './open.js';
|
|
@@ -5,6 +6,7 @@ export type DocumentPart = Open<'fields' | 'sections' | 'preamble' | 'path'>;
|
|
|
5
6
|
export type SearchRequest = {
|
|
6
7
|
text: string;
|
|
7
8
|
documents?: Filter;
|
|
9
|
+
collection?: true;
|
|
8
10
|
conversations?: readonly string[];
|
|
9
11
|
limit?: number;
|
|
10
12
|
};
|
|
@@ -39,9 +41,13 @@ export type SearchPending = SearchHits & {
|
|
|
39
41
|
pending: readonly (PendingRoom | PendingConversation)[];
|
|
40
42
|
coverage: SearchCoverage;
|
|
41
43
|
};
|
|
44
|
+
export type SearchUndeclared = ProviderRefusal & {
|
|
45
|
+
kind: 'undeclared';
|
|
46
|
+
};
|
|
42
47
|
export type SearchResult = (SearchHits & {
|
|
43
48
|
coverage: SearchCoverage;
|
|
44
|
-
}) | SearchPending;
|
|
49
|
+
}) | SearchPending | SearchUndeclared;
|
|
50
|
+
export declare function undeclaredSearch(): SearchUndeclared;
|
|
45
51
|
export type SearchedDocument = {
|
|
46
52
|
room: string;
|
|
47
53
|
path: string;
|
|
@@ -62,6 +68,7 @@ export type SearchSource = {
|
|
|
62
68
|
export type SearchPlan = {
|
|
63
69
|
text: string;
|
|
64
70
|
documents: unknown;
|
|
71
|
+
collection: boolean;
|
|
65
72
|
conversations: readonly string[] | null;
|
|
66
73
|
limit: number | null;
|
|
67
74
|
};
|
|
@@ -78,7 +85,7 @@ export type SearchIndex = {
|
|
|
78
85
|
search(plan: SearchPlan, documents: readonly {
|
|
79
86
|
room: string;
|
|
80
87
|
path: string;
|
|
81
|
-
}[] | null, conversations: readonly string[], rooms: ReadonlySet<string> | null): SearchHits;
|
|
88
|
+
}[] | null, conversations: readonly string[], rooms: ReadonlySet<string> | null, selections: ReadonlyMap<string, readonly string[]> | null): SearchHits;
|
|
82
89
|
};
|
|
83
90
|
export declare function searchPlanOf(input: unknown): SearchPlan;
|
|
84
91
|
export declare function createSearchIndex(source: SearchSource): SearchIndex;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { KeyedResult } from './observation.js';
|
|
2
|
+
import type { QueryRows } from './query.js';
|
|
3
|
+
export type EntrySeed = {
|
|
4
|
+
readonly at: Readonly<Record<string, string>>;
|
|
5
|
+
readonly queries: readonly {
|
|
6
|
+
readonly query: unknown;
|
|
7
|
+
readonly rows: QueryRows;
|
|
8
|
+
}[];
|
|
9
|
+
};
|
|
10
|
+
export type Seeded = {
|
|
11
|
+
readonly rows: QueryRows;
|
|
12
|
+
readonly at: Readonly<Record<string, string>>;
|
|
13
|
+
};
|
|
14
|
+
export declare function entrySeedOf(value: unknown): EntrySeed | null;
|
|
15
|
+
export declare function seededResult(seed: Seeded): KeyedResult;
|
|
@@ -23,10 +23,11 @@ export type ReplicaRecord = {
|
|
|
23
23
|
documents: Readonly<Record<string, string>>;
|
|
24
24
|
binaries: Readonly<Record<string, HeldBinary>>;
|
|
25
25
|
revisions: Readonly<Record<string, string>>;
|
|
26
|
+
fileIds: Readonly<Record<string, string>>;
|
|
26
27
|
changes: Readonly<Record<string, HeadChange>>;
|
|
27
28
|
written: Readonly<Record<string, string>>;
|
|
28
29
|
};
|
|
29
|
-
export type StagedLayer = Pick<ReplicaRecord, 'documents' | 'binaries' | 'revisions' | 'changes' | 'written'>;
|
|
30
|
+
export type StagedLayer = Pick<ReplicaRecord, 'documents' | 'binaries' | 'revisions' | 'fileIds' | 'changes' | 'written'>;
|
|
30
31
|
export type TransferRecord = {
|
|
31
32
|
locator: string;
|
|
32
33
|
transfer: string;
|
|
@@ -48,7 +49,6 @@ export type PendingState = {
|
|
|
48
49
|
};
|
|
49
50
|
export type TargetRecord = {
|
|
50
51
|
established: boolean;
|
|
51
|
-
search: boolean;
|
|
52
52
|
};
|
|
53
53
|
export type QueueRecord = {
|
|
54
54
|
locator: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentshouse/app-bridge",
|
|
3
|
-
"version": "0.1.0-
|
|
3
|
+
"version": "0.1.0-c69b16d4f072a",
|
|
4
4
|
"description": "Types of the agents.house App bridge House hands every App: navigation, the tab title and icon, ceremonies, installation, notifications and the icon badge, status, Site image reads, App release code, App and Site screenshot reads, and App messages, with an accessor and an in-page test host.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|