@agentshouse/app-bridge 0.1.0-c43d9cbcf6c8d → 0.1.0-c44cf2cfcc09a

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.
Files changed (103) hide show
  1. package/README.md +6 -6
  2. package/dist/index.d.ts +143 -399
  3. package/dist/mdmodel/body.d.ts +84 -0
  4. package/dist/mdmodel/definition.d.ts +20 -10
  5. package/dist/mdmodel/document.d.ts +14 -7
  6. package/dist/mdmodel/event.d.ts +76 -0
  7. package/dist/mdmodel/facts.d.ts +14 -0
  8. package/dist/mdmodel/fields.d.ts +1 -1
  9. package/dist/mdmodel/index.d.ts +27 -13
  10. package/dist/mdmodel/kinds.d.ts +17 -0
  11. package/dist/mdmodel/markdown.d.ts +74 -0
  12. package/dist/mdmodel/paths.d.ts +10 -1
  13. package/dist/mdmodel/pattern.d.ts +9 -0
  14. package/dist/mdmodel/query/language.d.ts +253 -0
  15. package/dist/mdmodel/query/match.d.ts +13 -0
  16. package/dist/mdmodel/query/rows.d.ts +31 -0
  17. package/dist/mdmodel/query/sql.d.ts +38 -0
  18. package/dist/mdmodel/reserved.d.ts +5 -0
  19. package/dist/mdmodel/types.d.ts +21 -7
  20. package/dist/mdmodel/validate.d.ts +10 -6
  21. package/dist/mdruntime/actions.d.ts +25 -0
  22. package/dist/mdruntime/adapter.d.ts +71 -69
  23. package/dist/mdruntime/attached-model.d.ts +7 -0
  24. package/dist/mdruntime/bootstrap.d.ts +43 -0
  25. package/dist/mdruntime/cell.d.ts +5 -0
  26. package/dist/mdruntime/chain.d.ts +2 -1
  27. package/dist/mdruntime/change-set.d.ts +4 -0
  28. package/dist/mdruntime/change.d.ts +1 -0
  29. package/dist/mdruntime/client.d.ts +27 -19
  30. package/dist/mdruntime/collection.d.ts +23 -4
  31. package/dist/mdruntime/compile.d.ts +8 -6
  32. package/dist/mdruntime/conversation-live.d.ts +139 -0
  33. package/dist/mdruntime/conversation-row.d.ts +32 -0
  34. package/dist/mdruntime/conversation.d.ts +59 -45
  35. package/dist/mdruntime/declaration.d.ts +9 -0
  36. package/dist/mdruntime/durability.d.ts +18 -0
  37. package/dist/mdruntime/failure.d.ts +3 -0
  38. package/dist/mdruntime/figures.d.ts +48 -0
  39. package/dist/mdruntime/holdings.d.ts +28 -0
  40. package/dist/mdruntime/identity.d.ts +0 -1
  41. package/dist/mdruntime/listing.d.ts +47 -0
  42. package/dist/mdruntime/live.d.ts +22 -0
  43. package/dist/mdruntime/log.d.ts +5 -0
  44. package/dist/mdruntime/media.d.ts +1 -1
  45. package/dist/mdruntime/messages.d.ts +24 -3
  46. package/dist/mdruntime/model.d.ts +2 -10
  47. package/dist/mdruntime/observation.d.ts +2 -2
  48. package/dist/mdruntime/opened.d.ts +1 -1
  49. package/dist/mdruntime/outcome.d.ts +7 -1
  50. package/dist/mdruntime/overlay.d.ts +6 -1
  51. package/dist/mdruntime/preparation.d.ts +19 -0
  52. package/dist/mdruntime/presence.d.ts +51 -0
  53. package/dist/mdruntime/query.d.ts +13 -209
  54. package/dist/mdruntime/reach.d.ts +14 -12
  55. package/dist/mdruntime/readiness.d.ts +0 -3
  56. package/dist/mdruntime/reads.d.ts +38 -0
  57. package/dist/mdruntime/recovery.d.ts +3 -1
  58. package/dist/mdruntime/refresh.d.ts +26 -0
  59. package/dist/mdruntime/replica.d.ts +11 -16
  60. package/dist/mdruntime/retried.d.ts +29 -0
  61. package/dist/mdruntime/room-draft.d.ts +7 -8
  62. package/dist/mdruntime/room-drafts.d.ts +23 -0
  63. package/dist/mdruntime/runtime.d.ts +35 -0
  64. package/dist/mdruntime/save.d.ts +42 -86
  65. package/dist/mdruntime/saves.d.ts +31 -0
  66. package/dist/mdruntime/search.d.ts +12 -63
  67. package/dist/mdruntime/seed.d.ts +11 -2
  68. package/dist/mdruntime/socket/admission.d.ts +6 -0
  69. package/dist/mdruntime/socket/answers.d.ts +5 -0
  70. package/dist/mdruntime/socket/lanes.d.ts +27 -0
  71. package/dist/mdruntime/socket/session.d.ts +37 -0
  72. package/dist/mdruntime/socket.d.ts +67 -0
  73. package/dist/mdruntime/source.d.ts +53 -0
  74. package/dist/mdruntime/status.d.ts +0 -2
  75. package/dist/mdruntime/store/installs.d.ts +29 -0
  76. package/dist/mdruntime/store/readiness.d.ts +9 -0
  77. package/dist/mdruntime/store/records.d.ts +212 -0
  78. package/dist/mdruntime/store/room-held.d.ts +7 -0
  79. package/dist/mdruntime/store/space.d.ts +10 -0
  80. package/dist/mdruntime/store/watchers.d.ts +16 -0
  81. package/dist/mdruntime/store/writes.d.ts +23 -0
  82. package/dist/mdruntime/store.d.ts +112 -145
  83. package/dist/mdruntime/stored.d.ts +59 -33
  84. package/dist/mdruntime/surface.d.ts +88 -0
  85. package/dist/mdruntime/tables.d.ts +116 -29
  86. package/dist/mdruntime/tallies.d.ts +17 -0
  87. package/dist/mdruntime/transfer.d.ts +4 -0
  88. package/dist/mdruntime/wire.d.ts +69 -5
  89. package/dist/session-content/bounds.d.ts +7 -0
  90. package/dist/session-content/check.d.ts +18 -0
  91. package/dist/session-content/index.d.ts +7 -0
  92. package/dist/session-content/parts.d.ts +102 -0
  93. package/dist/session-content/state.d.ts +61 -0
  94. package/dist/session-content/turn.d.ts +328 -0
  95. package/dist/test-host.js +1 -1
  96. package/docs/families.md +24 -17
  97. package/package.json +2 -2
  98. package/dist/mdmodel/blocks.d.ts +0 -10
  99. package/dist/mdmodel/condition.d.ts +0 -179
  100. package/dist/mdmodel/links.d.ts +0 -28
  101. package/dist/mdmodel/profile.d.ts +0 -5
  102. package/dist/mdruntime/connection.d.ts +0 -152
  103. package/dist/mdruntime/fulltext.d.ts +0 -26
@@ -0,0 +1,253 @@
1
+ import { type Definition } from '../definition.js';
2
+ export type Value = string | number | boolean | null;
3
+ export type Predicate = Value | {
4
+ $eq: Value;
5
+ } | {
6
+ $ne: Value;
7
+ } | {
8
+ $in: readonly Value[];
9
+ } | {
10
+ $nin: readonly Value[];
11
+ } | {
12
+ $gt?: Value;
13
+ $gte?: Value;
14
+ $lt?: Value;
15
+ $lte?: Value;
16
+ } | {
17
+ $all: readonly Value[];
18
+ } | {
19
+ $size: number;
20
+ } | {
21
+ $exists: boolean;
22
+ } | {
23
+ $prefix: string;
24
+ };
25
+ export type Where = {
26
+ $and?: readonly Where[];
27
+ $or?: readonly Where[];
28
+ [field: string]: Predicate | readonly Where[] | undefined;
29
+ };
30
+ export type Related = {
31
+ types?: readonly string[];
32
+ where?: Where;
33
+ pathPrefix?: string;
34
+ };
35
+ export type Filter = {
36
+ rooms?: readonly string[];
37
+ types?: readonly string[];
38
+ where?: Where;
39
+ pathPrefix?: string;
40
+ outside?: readonly string[];
41
+ folder?: string;
42
+ paths?: readonly string[];
43
+ fileIds?: readonly string[];
44
+ hop?: Related & {
45
+ field: string;
46
+ };
47
+ backlinks?: Related & {
48
+ field?: string;
49
+ };
50
+ text?: string;
51
+ };
52
+ export type Key = 'room' | 'path' | 'type' | 'folder' | 'size' | 'created' | 'updated' | {
53
+ field: string;
54
+ };
55
+ export type GroupKey = 'room' | 'type' | 'folder' | 'subfolder' | {
56
+ field: string;
57
+ };
58
+ export type Select = 'all' | {
59
+ fields?: 'all' | readonly string[];
60
+ sections?: 'all' | readonly string[];
61
+ preamble?: true;
62
+ markdown?: true;
63
+ backlinks?: true;
64
+ change?: true;
65
+ fileId?: true;
66
+ revision?: true;
67
+ size?: true;
68
+ created?: true;
69
+ };
70
+ export type GroupSelect = {
71
+ size?: true;
72
+ updated?: true;
73
+ greatest?: {
74
+ field: string;
75
+ };
76
+ };
77
+ export type GroupOrder = 'count' | 'size' | 'updated' | 'greatest';
78
+ export type OrderOptions = {
79
+ nulls?: 'first' | 'last';
80
+ stringSort?: 'lexical' | 'locale';
81
+ locale?: string;
82
+ localeOptions?: Readonly<Record<string, unknown>>;
83
+ };
84
+ export type Direction = 'asc' | 'desc';
85
+ export type DocumentQuery = Filter & {
86
+ select: Select;
87
+ orderBy?: readonly ({
88
+ by: Key;
89
+ direction?: Direction;
90
+ } & OrderOptions)[];
91
+ limit?: number;
92
+ after?: string;
93
+ total?: true;
94
+ };
95
+ export type GroupQuery = Filter & {
96
+ groupBy: readonly GroupKey[];
97
+ select?: GroupSelect;
98
+ orderBy?: readonly {
99
+ by: GroupOrder | GroupKey;
100
+ direction?: Direction;
101
+ nulls?: 'first' | 'last';
102
+ }[];
103
+ limit?: number;
104
+ after?: string;
105
+ total?: true;
106
+ };
107
+ export type LocalQuery = DocumentQuery | GroupQuery;
108
+ export type QueryErrorCode = 'invalid-query' | 'unknown-type' | 'unknown-field' | 'wrong-kind';
109
+ export type RoomFacts = {
110
+ locator: string;
111
+ available: boolean;
112
+ types: readonly Definition[];
113
+ };
114
+ export type HeldRooms = {
115
+ listed: boolean;
116
+ rooms: readonly RoomFacts[];
117
+ };
118
+ export type Test = {
119
+ op: 'eq';
120
+ value: Value;
121
+ } | {
122
+ op: 'ne';
123
+ value: Value;
124
+ } | {
125
+ op: 'in';
126
+ values: readonly Value[];
127
+ } | {
128
+ op: 'nin';
129
+ values: readonly Value[];
130
+ } | {
131
+ op: 'range';
132
+ bounds: readonly (readonly ['gt' | 'gte' | 'lt' | 'lte', Value])[];
133
+ } | {
134
+ op: 'all';
135
+ values: readonly Value[];
136
+ } | {
137
+ op: 'size';
138
+ size: number;
139
+ } | {
140
+ op: 'exists';
141
+ exists: boolean;
142
+ } | {
143
+ op: 'prefix';
144
+ prefix: string;
145
+ };
146
+ export type Clause = {
147
+ every: readonly Clause[];
148
+ } | {
149
+ some: readonly Clause[];
150
+ } | {
151
+ field: string;
152
+ test: Test;
153
+ };
154
+ export type Scope = {
155
+ types: readonly string[] | null;
156
+ where: Clause | null;
157
+ pathPrefix: string | null;
158
+ };
159
+ export type KeyPlan = {
160
+ of: 'room';
161
+ } | {
162
+ of: 'path';
163
+ } | {
164
+ of: 'type';
165
+ } | {
166
+ of: 'folder';
167
+ } | {
168
+ of: 'subfolder';
169
+ } | {
170
+ of: 'size';
171
+ } | {
172
+ of: 'created';
173
+ } | {
174
+ of: 'updated';
175
+ } | {
176
+ of: 'field';
177
+ field: string;
178
+ };
179
+ export type DocumentShape = {
180
+ kind: 'documents';
181
+ fields: 'all' | readonly string[] | null;
182
+ sections: 'all' | readonly string[] | null;
183
+ preamble: boolean;
184
+ markdown: boolean;
185
+ backlinks: boolean;
186
+ change: boolean;
187
+ fileId: boolean;
188
+ revision: boolean;
189
+ size: boolean;
190
+ created: boolean;
191
+ orderBy: readonly {
192
+ key: KeyPlan;
193
+ options: OrderOptions & {
194
+ direction: Direction;
195
+ };
196
+ }[];
197
+ };
198
+ export type GroupShape = {
199
+ kind: 'groups';
200
+ groupBy: readonly KeyPlan[];
201
+ size: boolean;
202
+ updated: boolean;
203
+ greatest: string | null;
204
+ orderBy: readonly {
205
+ by: GroupOrder | number;
206
+ direction: Direction;
207
+ nulls: 'first' | 'last' | null;
208
+ }[];
209
+ };
210
+ export type Continuation = {
211
+ text: string;
212
+ values: readonly unknown[] | null;
213
+ };
214
+ export type QueryPlan = {
215
+ key: string;
216
+ rooms: readonly string[] | null;
217
+ root: Scope;
218
+ outside: readonly string[] | null;
219
+ folder: string | null;
220
+ paths: readonly string[] | null;
221
+ fileIds: readonly string[] | null;
222
+ hop: (Scope & {
223
+ field: string;
224
+ }) | null;
225
+ backlinks: (Scope & {
226
+ field: string | null;
227
+ }) | null;
228
+ text: string | null;
229
+ shape: DocumentShape | GroupShape;
230
+ limit: number | null;
231
+ after: Continuation | null;
232
+ total: boolean;
233
+ };
234
+ export type Place = readonly (string | number)[];
235
+ type At = Place | string;
236
+ export declare class QueryError extends Error {
237
+ readonly code: QueryErrorCode;
238
+ readonly place: Place;
239
+ readonly accepts: readonly string[];
240
+ readonly retryable = false;
241
+ constructor(code: QueryErrorCode, at: At, problem: string, accepts?: readonly string[]);
242
+ }
243
+ type Entries = Readonly<Record<string, unknown>>;
244
+ export declare function bodied(shape: DocumentShape): boolean;
245
+ export declare function invalid(at: At, problem: string, accepts?: readonly string[]): never;
246
+ export declare function placeText(at: Place): string;
247
+ export declare function known(value: Entries, allowed: readonly string[], at: At): void;
248
+ export declare function planOf(input: unknown, facts: HeldRooms): QueryPlan;
249
+ export declare function cursorOf(values: readonly unknown[]): string;
250
+ export declare function decodedCursor(text: string): readonly unknown[] | null;
251
+ export declare function queryKey(query: unknown): string;
252
+ export declare function identityOf(plan: QueryPlan): string;
253
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { Definition } from '../definition.js';
2
+ import { type QueryPlan } from './language.js';
3
+ import { type HeldValue } from './rows.js';
4
+ export type Candidate = {
5
+ readonly path: string;
6
+ readonly type: string | null;
7
+ readonly fileId: string | null;
8
+ readonly fields: Readonly<Record<string, unknown>>;
9
+ readonly definition?: Pick<Definition, 'frontmatter'>;
10
+ readonly text: string | null;
11
+ };
12
+ export declare function heldAt(candidate: Candidate, field: string): readonly HeldValue[];
13
+ export declare function matches(plan: QueryPlan, candidate: Candidate): boolean;
@@ -0,0 +1,31 @@
1
+ import { type Definition } from '../definition.js';
2
+ export type HeldKind = 'string' | 'number' | 'boolean' | 'null' | 'array' | 'object' | 'undefined';
3
+ export type HeldValue = {
4
+ readonly keys: string;
5
+ readonly places: string;
6
+ readonly item: number;
7
+ readonly kind: HeldKind;
8
+ readonly value: string | number | null;
9
+ readonly size: number | null;
10
+ readonly instant: string | null;
11
+ };
12
+ export type HeldLink = {
13
+ readonly kind: 'field';
14
+ readonly keys: string;
15
+ readonly places: string;
16
+ readonly target: string;
17
+ readonly field: string;
18
+ };
19
+ export type Indexed = {
20
+ readonly values: readonly HeldValue[];
21
+ readonly links: readonly HeldLink[];
22
+ };
23
+ export type Reach = 'exact' | 'value' | 'link';
24
+ export type Placed = {
25
+ readonly keys: string;
26
+ readonly places: string;
27
+ readonly glob: boolean;
28
+ };
29
+ export declare function placedOf(pointer: string, reach: Reach): Placed;
30
+ export declare function heldKind(value: unknown): HeldKind;
31
+ export declare function indexed(path: string, fields: Readonly<Record<string, unknown>>, definition: Pick<Definition, 'frontmatter'> | undefined): Indexed;
@@ -0,0 +1,38 @@
1
+ import { type Ordering } from '../kinds.js';
2
+ import type { QueryPlan, Scope } from './language.js';
3
+ import { type HeldValue, type Reach } from './rows.js';
4
+ export type SqlValue = string | number | bigint | Uint8Array | null;
5
+ export type Fragment = {
6
+ readonly sql: string;
7
+ readonly bind: readonly SqlValue[];
8
+ };
9
+ export type Collate = (ordering: Ordering, lists: boolean, total: boolean) => string | null;
10
+ export type Term = {
11
+ readonly ordering: Ordering;
12
+ readonly kind: Fragment;
13
+ readonly value: Fragment;
14
+ readonly instant?: Fragment;
15
+ readonly total?: boolean;
16
+ };
17
+ export type Following = {
18
+ readonly beyond: Fragment;
19
+ readonly equal: Fragment;
20
+ };
21
+ export declare const VALUE_TABLE = "CREATE TABLE replica_values (doc INTEGER NOT NULL, keys TEXT NOT NULL, places TEXT NOT NULL, item INTEGER NOT NULL, kind TEXT NOT NULL, value, size INTEGER, instant TEXT, PRIMARY KEY (doc, keys, places, item)) WITHOUT ROWID";
22
+ export declare const HOLDS_PHRASE = "holds_phrase";
23
+ export declare function holdsPhrase(_context: number, text: unknown, phrase: unknown): number;
24
+ export declare function fragment(sql: string, bind?: readonly SqlValue[]): Fragment;
25
+ export declare function joined(parts: readonly Fragment[], separator: string): Fragment;
26
+ export declare function all(parts: readonly Fragment[]): Fragment;
27
+ export declare function any(parts: readonly Fragment[]): Fragment;
28
+ export declare function grouped(part: Fragment): Fragment;
29
+ export declare function listed(values: readonly SqlValue[]): Fragment;
30
+ export declare function exists(part: Fragment): Fragment;
31
+ export declare function insertedValues(doc: number, values: readonly HeldValue[]): Fragment;
32
+ export declare function placed(alias: string, field: string, reach: Reach): Fragment;
33
+ export declare function scoped(alias: string, scope: Scope, byPaths?: boolean): Fragment;
34
+ export declare function tests(alias: string, plan: QueryPlan): Fragment;
35
+ export declare function sortValue(kind: SqlValue | undefined, value: unknown, instant: SqlValue | undefined): unknown;
36
+ export declare function sorted(collate: Collate, term: Term): Fragment;
37
+ export declare function beyond(collate: Collate, term: Term, value: unknown): Following;
38
+ export declare function following(parts: readonly Following[], tie: Fragment): Fragment;
@@ -0,0 +1,5 @@
1
+ export declare const ROOM_DESCRIPTION = "ROOM.md";
2
+ export declare const CAPTURE_HOME = "capture";
3
+ export declare const RESERVED_NAMES: readonly string[];
4
+ export declare function isReservedName(name: string): boolean;
5
+ export declare function isDocumentPath(path: string): boolean;
@@ -12,9 +12,16 @@ export type ModelVerification = {
12
12
  readonly rule: string;
13
13
  readonly location?: string;
14
14
  };
15
+ export type TypedPath = {
16
+ readonly path: string;
17
+ readonly type: string;
18
+ readonly named: boolean;
19
+ readonly body: boolean;
20
+ };
15
21
  export type ValidationContext = {
16
22
  readonly binaryTargets: readonly string[];
17
23
  readonly anyRoom?: true;
24
+ readonly typedPaths?: readonly TypedPath[];
18
25
  };
19
26
  export type ProjectionContext = {
20
27
  readonly documentTargets: readonly string[];
@@ -38,11 +45,16 @@ export type Frontmatter = {
38
45
  export type Document = Frontmatter & {
39
46
  readonly preamble: string;
40
47
  readonly sections: Readonly<Record<string, string>>;
48
+ readonly text: string;
49
+ readonly ranges: Readonly<Record<string, Extent>>;
50
+ readonly listEnd: number;
41
51
  };
52
+ export type DefinitionOf = (type: string | undefined) => Definition | undefined;
42
53
  export type Refusal = {
43
54
  readonly file: string;
44
55
  readonly rule: string;
45
56
  readonly location?: string;
57
+ readonly line?: number;
46
58
  readonly referrers?: readonly string[];
47
59
  };
48
60
  export type Reached = {
@@ -116,12 +128,6 @@ export type RoomReference = {
116
128
  readonly value: string;
117
129
  readonly to: readonly string[];
118
130
  readonly crossRoom?: true;
119
- } | {
120
- readonly kind: 'item';
121
- readonly section: string;
122
- readonly href: string;
123
- readonly to: readonly string[];
124
- readonly crossRoom?: true;
125
131
  });
126
132
  export type Change = {
127
133
  readonly kind: 'field';
@@ -132,11 +138,15 @@ export type Change = {
132
138
  readonly kind: 'section';
133
139
  readonly name: string;
134
140
  readonly value: string;
135
- readonly prior: string;
141
+ readonly prior: string | undefined;
136
142
  } | {
137
143
  readonly kind: 'preamble';
138
144
  readonly value: string;
139
145
  readonly prior: string;
146
+ } | {
147
+ readonly kind: 'text';
148
+ readonly value: string;
149
+ readonly prior: string;
140
150
  } | {
141
151
  readonly kind: 'link';
142
152
  readonly href: string;
@@ -165,3 +175,7 @@ export type BodyResult = {
165
175
  readonly outcome: 'refuse';
166
176
  readonly refusal: Refusal;
167
177
  };
178
+ export type UnlinkedBody = {
179
+ readonly body: string;
180
+ readonly links: ReadonlyMap<string, string>;
181
+ };
@@ -1,14 +1,17 @@
1
1
  import { type Definition } from './definition.js';
2
- import type { DocumentCheck, Library, ModelVerification, Reached, RoomReference, Validation, ValidationContext, ValidationStep, VerifiedModel } from './types.js';
2
+ import type { DefinitionOf, Document, DocumentCheck, Library, ModelVerification, ParseResult, Reached, RoomReference, TypedPath, Validation, ValidationContext, ValidationStep, VerifiedModel } from './types.js';
3
+ export declare function definitionAt(model: VerifiedModel, file: string, typedPaths?: readonly TypedPath[]): DefinitionOf;
3
4
  export declare function resolves(reference: Reached, typeOf: (path: string) => string | undefined, binary: (path: string) => boolean): boolean;
4
5
  export declare function verify(schema: string, provided?: VerifiedModel): ModelVerification;
5
- export declare function checkDocument(file: string, content: string, model: VerifiedModel, context?: Pick<ValidationContext, 'anyRoom'>): DocumentCheck;
6
- export declare function sectionReferences(file: string, content: string, definition: Definition): readonly Reached[];
6
+ export declare function readTypes(schema: string, provided?: VerifiedModel): VerifiedModel;
7
+ type Placing = Pick<ValidationContext, 'anyRoom' | 'typedPaths'>;
8
+ export declare function checkDocument(file: string, content: string, model: VerifiedModel, context?: Placing): DocumentCheck;
7
9
  export declare function bodyRoomLinks(body: string): RoomReference[];
8
- export declare function roomReferences(file: string, content: string, definition?: Definition): readonly RoomReference[];
10
+ export declare function roomReferences(document: Document, definition?: Definition): readonly RoomReference[];
9
11
  type Placed = {
10
12
  readonly reference: Reached;
11
13
  readonly location: string;
14
+ readonly line?: number;
12
15
  };
13
16
  export type Assessment = {
14
17
  readonly file: string;
@@ -18,9 +21,9 @@ export type Assessment = {
18
21
  readonly structured: Validation | null;
19
22
  readonly fields: readonly Placed[];
20
23
  readonly linked: boolean;
21
- readonly sections: readonly Placed[];
22
24
  };
23
- export declare function assess(file: string, content: string, binary: boolean, model?: VerifiedModel, context?: Pick<ValidationContext, 'anyRoom'>): Assessment;
25
+ export declare function assess(file: string, parsed: ParseResult, binary: boolean, model?: VerifiedModel, context?: Placing): Assessment;
26
+ export declare function assessReferences(file: string, parsed: ParseResult, changed: ReadonlySet<string>, model?: VerifiedModel, context?: Placing): Assessment;
24
27
  export type Verdicts = {
25
28
  add(assessment: Assessment, typeOf: (path: string) => string | undefined, binary: (path: string) => boolean): number;
26
29
  verdict(): Validation;
@@ -28,4 +31,5 @@ export type Verdicts = {
28
31
  export declare function verdicts(): Verdicts;
29
32
  export declare function validating(library: ReadonlyMap<string, string>, context?: ValidationContext, model?: VerifiedModel): Generator<ValidationStep, Validation, void>;
30
33
  export declare function validate(library: Library, context?: ValidationContext, model?: VerifiedModel): Validation;
34
+ export declare function validateParsed(library: ReadonlyMap<string, ParseResult>, context?: ValidationContext, model?: VerifiedModel): Validation;
31
35
  export {};
@@ -0,0 +1,25 @@
1
+ import type { ConversationHistoryRequest } from './adapter.js';
2
+ import { type CallResult, type HistoryAnswer, type Resolution } from './outcome.js';
3
+ import type { Attempted } from './recovery.js';
4
+ import type { Attempt } from './retried.js';
5
+ import type { Runtime } from './runtime.js';
6
+ export type HistoryQuery = {
7
+ revision?: string;
8
+ pageToken?: string;
9
+ };
10
+ export declare function readHistory(runtime: Runtime, locator: string, path: string, query?: HistoryQuery): Promise<HistoryAnswer>;
11
+ export declare function located(runtime: Runtime, room: string, path: string, destination: string): Promise<{
12
+ room: string;
13
+ path: string;
14
+ } | null>;
15
+ export declare function resolveReference(runtime: Runtime, room: string, path: string, destination: string): Promise<Resolution>;
16
+ export type Invoked = {
17
+ readonly dispatching?: () => Promise<void>;
18
+ readonly attempt?: Attempt;
19
+ };
20
+ export declare function invokeAction(runtime: Runtime, name: string, input: unknown, { dispatching, attempt }?: Invoked): Promise<CallResult>;
21
+ export declare function readConversationHistory(runtime: Runtime, request: ConversationHistoryRequest): Promise<CallResult>;
22
+ export declare function called(runtime: Runtime, name: string, input: unknown, attempt?: Attempt): Promise<CallResult>;
23
+ export declare function answeredCall(runtime: Runtime, operation: string): Promise<boolean>;
24
+ export declare function resendCalls(runtime: Runtime, signal: AbortSignal): Promise<Attempted>;
25
+ export declare function resendLater(runtime: Runtime): void;