@ai-matrx/alchemy 0.5.1 → 0.6.0
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/CHANGELOG.md +13 -0
- package/dist/checks.cjs +228 -0
- package/dist/checks.cjs.map +1 -0
- package/dist/checks.d.cts +253 -0
- package/dist/checks.d.ts +253 -0
- package/dist/checks.js +205 -0
- package/dist/checks.js.map +1 -0
- package/dist/declare/schema.json +414 -0
- package/dist/declare-host.cjs +19 -0
- package/dist/declare-host.cjs.map +1 -0
- package/dist/declare-host.d.cts +78 -0
- package/dist/declare-host.d.ts +78 -0
- package/dist/declare-host.js +1 -0
- package/dist/declare-host.js.map +1 -0
- package/dist/declare.cjs +637 -0
- package/dist/declare.cjs.map +1 -0
- package/dist/declare.d.cts +334 -0
- package/dist/declare.d.ts +334 -0
- package/dist/declare.js +614 -0
- package/dist/declare.js.map +1 -0
- package/package.json +41 -7
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://unpkg.com/@ai-matrx/alchemy/dist/declare/schema.json",
|
|
4
|
+
"title": "SurfaceDeclaration",
|
|
5
|
+
"description": "One surface's declaration (Matrx Alchemy CONTRACT §2.1). GENERATED from src/declare/types.ts by scripts/generate-declare-schema.mjs — never edit by hand. Extension slots (agent roles, client tools) are open properties at the root.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"surfaceName": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"client": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"executionMode": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": [
|
|
17
|
+
"python-stream",
|
|
18
|
+
"nextjs-stream",
|
|
19
|
+
"browser-realtime",
|
|
20
|
+
"local-runtime"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"description": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
},
|
|
26
|
+
"label": {
|
|
27
|
+
"type": "string"
|
|
28
|
+
},
|
|
29
|
+
"readiness": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"enum": [
|
|
32
|
+
"verified",
|
|
33
|
+
"partial",
|
|
34
|
+
"stub"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"readinessNote": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"urlPattern": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"inheritsFrom": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
"intro": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"overlayId": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"values": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": {
|
|
55
|
+
"$ref": "#/$defs/DeclaredValue"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"groups": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"$ref": "#/$defs/ValueGroup"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"writeTargets": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"items": {
|
|
67
|
+
"$ref": "#/$defs/WriteTarget"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"itemTypes": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"items": {
|
|
73
|
+
"$ref": "#/$defs/ItemType"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"liveSlots": {
|
|
77
|
+
"type": "array",
|
|
78
|
+
"items": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": [
|
|
81
|
+
"selection",
|
|
82
|
+
"on-demand",
|
|
83
|
+
"errors",
|
|
84
|
+
"requests"
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"configNamespaces": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": {
|
|
91
|
+
"$ref": "#/$defs/ConfigNamespaceDeclaration"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"evidenceSources": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": {
|
|
97
|
+
"$ref": "#/$defs/EvidenceSourceDeclaration"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"skipBaselineValues": {
|
|
101
|
+
"type": "boolean"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"required": [
|
|
105
|
+
"surfaceName",
|
|
106
|
+
"client",
|
|
107
|
+
"executionMode",
|
|
108
|
+
"description",
|
|
109
|
+
"label",
|
|
110
|
+
"readiness",
|
|
111
|
+
"values"
|
|
112
|
+
],
|
|
113
|
+
"additionalProperties": true,
|
|
114
|
+
"$defs": {
|
|
115
|
+
"ConfigNamespaceDeclaration": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"properties": {
|
|
118
|
+
"namespace": {
|
|
119
|
+
"type": "string"
|
|
120
|
+
},
|
|
121
|
+
"label": {
|
|
122
|
+
"type": "string"
|
|
123
|
+
},
|
|
124
|
+
"description": {
|
|
125
|
+
"type": "string"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": [
|
|
129
|
+
"namespace",
|
|
130
|
+
"label",
|
|
131
|
+
"description"
|
|
132
|
+
],
|
|
133
|
+
"additionalProperties": false
|
|
134
|
+
},
|
|
135
|
+
"DeclaredValue": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"properties": {
|
|
138
|
+
"name": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
},
|
|
141
|
+
"label": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"description": {
|
|
145
|
+
"type": "string"
|
|
146
|
+
},
|
|
147
|
+
"valueType": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"enum": [
|
|
150
|
+
"string",
|
|
151
|
+
"number",
|
|
152
|
+
"boolean",
|
|
153
|
+
"object",
|
|
154
|
+
"array",
|
|
155
|
+
"document"
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
"valueKind": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"alwaysAvailable": {
|
|
162
|
+
"type": "boolean"
|
|
163
|
+
},
|
|
164
|
+
"typicalCharCount": {
|
|
165
|
+
"type": "number"
|
|
166
|
+
},
|
|
167
|
+
"autoContext": {
|
|
168
|
+
"type": "boolean"
|
|
169
|
+
},
|
|
170
|
+
"group": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"sortOrder": {
|
|
174
|
+
"type": "number"
|
|
175
|
+
},
|
|
176
|
+
"sensitivity": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"properties": {
|
|
179
|
+
"exportable": {
|
|
180
|
+
"type": "boolean"
|
|
181
|
+
},
|
|
182
|
+
"classification": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"enum": [
|
|
185
|
+
"ordinary",
|
|
186
|
+
"secret",
|
|
187
|
+
"credential"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"includedByDefault": {
|
|
191
|
+
"type": "boolean"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"additionalProperties": false
|
|
195
|
+
},
|
|
196
|
+
"liveSlot": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"enum": [
|
|
199
|
+
"selection",
|
|
200
|
+
"on-demand",
|
|
201
|
+
"errors",
|
|
202
|
+
"requests"
|
|
203
|
+
]
|
|
204
|
+
},
|
|
205
|
+
"role": {
|
|
206
|
+
"type": "string",
|
|
207
|
+
"enum": [
|
|
208
|
+
"data",
|
|
209
|
+
"request"
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"required": [
|
|
214
|
+
"name",
|
|
215
|
+
"label",
|
|
216
|
+
"description",
|
|
217
|
+
"valueType",
|
|
218
|
+
"alwaysAvailable",
|
|
219
|
+
"typicalCharCount"
|
|
220
|
+
],
|
|
221
|
+
"additionalProperties": false
|
|
222
|
+
},
|
|
223
|
+
"EvidenceSourceDeclaration": {
|
|
224
|
+
"type": "object",
|
|
225
|
+
"properties": {
|
|
226
|
+
"kind": {
|
|
227
|
+
"const": "processed_document"
|
|
228
|
+
},
|
|
229
|
+
"idValue": {
|
|
230
|
+
"type": "string"
|
|
231
|
+
},
|
|
232
|
+
"fileIdValue": {
|
|
233
|
+
"type": "string"
|
|
234
|
+
},
|
|
235
|
+
"labelValue": {
|
|
236
|
+
"type": "string"
|
|
237
|
+
},
|
|
238
|
+
"representation": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"enum": [
|
|
241
|
+
"clean",
|
|
242
|
+
"raw"
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"required": [
|
|
247
|
+
"kind",
|
|
248
|
+
"idValue"
|
|
249
|
+
],
|
|
250
|
+
"additionalProperties": false
|
|
251
|
+
},
|
|
252
|
+
"ItemType": {
|
|
253
|
+
"type": "object",
|
|
254
|
+
"properties": {
|
|
255
|
+
"name": {
|
|
256
|
+
"type": "string"
|
|
257
|
+
},
|
|
258
|
+
"label": {
|
|
259
|
+
"type": "string"
|
|
260
|
+
},
|
|
261
|
+
"description": {
|
|
262
|
+
"type": "string"
|
|
263
|
+
},
|
|
264
|
+
"identity": {
|
|
265
|
+
"type": "array",
|
|
266
|
+
"items": {
|
|
267
|
+
"type": "string"
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"levels": {
|
|
271
|
+
"type": "array",
|
|
272
|
+
"items": {
|
|
273
|
+
"type": "string"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"entityType": {
|
|
277
|
+
"type": "string"
|
|
278
|
+
},
|
|
279
|
+
"values": {
|
|
280
|
+
"type": "array",
|
|
281
|
+
"items": {
|
|
282
|
+
"$ref": "#/$defs/DeclaredValue"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"writeTargets": {
|
|
286
|
+
"type": "array",
|
|
287
|
+
"items": {
|
|
288
|
+
"$ref": "#/$defs/WriteTarget"
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"required": [
|
|
293
|
+
"name",
|
|
294
|
+
"label",
|
|
295
|
+
"description",
|
|
296
|
+
"identity",
|
|
297
|
+
"values"
|
|
298
|
+
],
|
|
299
|
+
"additionalProperties": false
|
|
300
|
+
},
|
|
301
|
+
"ValueGroup": {
|
|
302
|
+
"type": "object",
|
|
303
|
+
"properties": {
|
|
304
|
+
"key": {
|
|
305
|
+
"type": "string"
|
|
306
|
+
},
|
|
307
|
+
"label": {
|
|
308
|
+
"type": "string"
|
|
309
|
+
},
|
|
310
|
+
"sortOrder": {
|
|
311
|
+
"type": "number"
|
|
312
|
+
},
|
|
313
|
+
"description": {
|
|
314
|
+
"type": "string"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"required": [
|
|
318
|
+
"key",
|
|
319
|
+
"label",
|
|
320
|
+
"sortOrder"
|
|
321
|
+
],
|
|
322
|
+
"additionalProperties": false
|
|
323
|
+
},
|
|
324
|
+
"WriteTarget": {
|
|
325
|
+
"type": "object",
|
|
326
|
+
"properties": {
|
|
327
|
+
"name": {
|
|
328
|
+
"type": "string"
|
|
329
|
+
},
|
|
330
|
+
"label": {
|
|
331
|
+
"type": "string"
|
|
332
|
+
},
|
|
333
|
+
"description": {
|
|
334
|
+
"type": "string"
|
|
335
|
+
},
|
|
336
|
+
"valueType": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"enum": [
|
|
339
|
+
"string",
|
|
340
|
+
"number",
|
|
341
|
+
"boolean",
|
|
342
|
+
"object",
|
|
343
|
+
"array",
|
|
344
|
+
"document"
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
"valueKind": {
|
|
348
|
+
"type": "string"
|
|
349
|
+
},
|
|
350
|
+
"updatesValue": {
|
|
351
|
+
"type": "string"
|
|
352
|
+
},
|
|
353
|
+
"patchable": {
|
|
354
|
+
"type": "boolean"
|
|
355
|
+
},
|
|
356
|
+
"approvalComparison": {
|
|
357
|
+
"const": "text-replacement"
|
|
358
|
+
},
|
|
359
|
+
"mode": {
|
|
360
|
+
"type": "string",
|
|
361
|
+
"enum": [
|
|
362
|
+
"draft",
|
|
363
|
+
"entity",
|
|
364
|
+
"ui",
|
|
365
|
+
"stream"
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
"streamOps": {
|
|
369
|
+
"type": "array",
|
|
370
|
+
"items": {
|
|
371
|
+
"type": "string",
|
|
372
|
+
"enum": [
|
|
373
|
+
"replace",
|
|
374
|
+
"insert_before",
|
|
375
|
+
"insert_after",
|
|
376
|
+
"prepend",
|
|
377
|
+
"append",
|
|
378
|
+
"patch"
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"applyPolicy": {
|
|
383
|
+
"type": "string",
|
|
384
|
+
"enum": [
|
|
385
|
+
"manual",
|
|
386
|
+
"ask",
|
|
387
|
+
"auto",
|
|
388
|
+
"queued"
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
"destination": {
|
|
392
|
+
"type": "boolean"
|
|
393
|
+
},
|
|
394
|
+
"itemType": {
|
|
395
|
+
"type": "string"
|
|
396
|
+
},
|
|
397
|
+
"group": {
|
|
398
|
+
"type": "string"
|
|
399
|
+
},
|
|
400
|
+
"sortOrder": {
|
|
401
|
+
"type": "number"
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"required": [
|
|
405
|
+
"name",
|
|
406
|
+
"label",
|
|
407
|
+
"description",
|
|
408
|
+
"valueType",
|
|
409
|
+
"mode"
|
|
410
|
+
],
|
|
411
|
+
"additionalProperties": false
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/declare-host.ts
|
|
17
|
+
var declare_host_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(declare_host_exports);
|
|
19
|
+
//# sourceMappingURL=declare-host.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/declare-host.ts"],"sourcesContent":["/** `@ai-matrx/alchemy/declare/host` — host-binding types (CONTRACT §2.6). */\nexport type { InternalResolvedItem, ItemAnchor, MountedSurface } from \"./declare/host\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Matrx Alchemy — Declare types (CONTRACT §2.1).
|
|
3
|
+
*
|
|
4
|
+
* A declaration is plain JSON data (chair ruling N2): no functions, no classes,
|
|
5
|
+
* no React. Runtime behaviour lives in `MountedSurface` (`/declare/host`) and in
|
|
6
|
+
* handler registrations, never here. Zero React, zero `@ai-matrx/agents`.
|
|
7
|
+
*/
|
|
8
|
+
type Json = null | boolean | number | string | Json[] | {
|
|
9
|
+
[key: string]: Json;
|
|
10
|
+
};
|
|
11
|
+
/** Live slot payloads (page-capture's shapes, kept). */
|
|
12
|
+
interface LiveValues {
|
|
13
|
+
selection?: {
|
|
14
|
+
choices: Record<string, Json>;
|
|
15
|
+
text: string | null;
|
|
16
|
+
};
|
|
17
|
+
"on-demand"?: readonly OnDemandSection[];
|
|
18
|
+
errors?: readonly string[];
|
|
19
|
+
requests?: readonly RecentRequest[];
|
|
20
|
+
}
|
|
21
|
+
interface OnDemandSection {
|
|
22
|
+
id: string;
|
|
23
|
+
title: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
role: "data" | "request";
|
|
26
|
+
brief?: Json;
|
|
27
|
+
load(signal: AbortSignal): Promise<Json>;
|
|
28
|
+
}
|
|
29
|
+
interface RecentRequest {
|
|
30
|
+
method: string;
|
|
31
|
+
path: string;
|
|
32
|
+
status: string;
|
|
33
|
+
httpStatus?: number;
|
|
34
|
+
durationMs?: number;
|
|
35
|
+
requestId?: string;
|
|
36
|
+
client?: string;
|
|
37
|
+
requestBody?: Json;
|
|
38
|
+
requestBodyNote?: string;
|
|
39
|
+
errorSentence?: string;
|
|
40
|
+
timestamp: number;
|
|
41
|
+
}
|
|
42
|
+
/** RAW-FREE. What leaves the package about a clicked item. */
|
|
43
|
+
interface ResolvedItem {
|
|
44
|
+
itemType: string;
|
|
45
|
+
identity: Record<string, string>;
|
|
46
|
+
level?: string;
|
|
47
|
+
readOnly: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* `@ai-matrx/alchemy/declare/host` — HOST-BINDING types only (CONTRACT §2.1, §2.6).
|
|
52
|
+
* Never imported by providers (`/declare`, `/actions`, `/menu`, `/operate` see only
|
|
53
|
+
* the raw-free `ResolvedItem`). Types only: no runtime code.
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
interface ItemAnchor {
|
|
57
|
+
/** The host element the person clicked. */
|
|
58
|
+
element: unknown;
|
|
59
|
+
level?: string;
|
|
60
|
+
}
|
|
61
|
+
/** Raw item reads: consumed only by projection and the write handler that owns the target. */
|
|
62
|
+
interface InternalResolvedItem extends ResolvedItem {
|
|
63
|
+
readValues(signal: AbortSignal): Promise<Record<string, unknown>>;
|
|
64
|
+
}
|
|
65
|
+
/** A mounted instance of a declared surface. Structural handle, never a global name lookup. */
|
|
66
|
+
interface MountedSurface {
|
|
67
|
+
instanceId: string;
|
|
68
|
+
surfaceName: string;
|
|
69
|
+
isMounted(): boolean;
|
|
70
|
+
/** Same revision before and after a read, or capture refuses with "surface-changed". */
|
|
71
|
+
getRevision?(): string;
|
|
72
|
+
unsavedChanges?(): boolean;
|
|
73
|
+
readValues(signal: AbortSignal): Promise<Record<string, unknown>>;
|
|
74
|
+
readLive?(signal: AbortSignal): Promise<LiveValues>;
|
|
75
|
+
resolveItem?(anchor: ItemAnchor): InternalResolvedItem | null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type { InternalResolvedItem, ItemAnchor, MountedSurface };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Matrx Alchemy — Declare types (CONTRACT §2.1).
|
|
3
|
+
*
|
|
4
|
+
* A declaration is plain JSON data (chair ruling N2): no functions, no classes,
|
|
5
|
+
* no React. Runtime behaviour lives in `MountedSurface` (`/declare/host`) and in
|
|
6
|
+
* handler registrations, never here. Zero React, zero `@ai-matrx/agents`.
|
|
7
|
+
*/
|
|
8
|
+
type Json = null | boolean | number | string | Json[] | {
|
|
9
|
+
[key: string]: Json;
|
|
10
|
+
};
|
|
11
|
+
/** Live slot payloads (page-capture's shapes, kept). */
|
|
12
|
+
interface LiveValues {
|
|
13
|
+
selection?: {
|
|
14
|
+
choices: Record<string, Json>;
|
|
15
|
+
text: string | null;
|
|
16
|
+
};
|
|
17
|
+
"on-demand"?: readonly OnDemandSection[];
|
|
18
|
+
errors?: readonly string[];
|
|
19
|
+
requests?: readonly RecentRequest[];
|
|
20
|
+
}
|
|
21
|
+
interface OnDemandSection {
|
|
22
|
+
id: string;
|
|
23
|
+
title: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
role: "data" | "request";
|
|
26
|
+
brief?: Json;
|
|
27
|
+
load(signal: AbortSignal): Promise<Json>;
|
|
28
|
+
}
|
|
29
|
+
interface RecentRequest {
|
|
30
|
+
method: string;
|
|
31
|
+
path: string;
|
|
32
|
+
status: string;
|
|
33
|
+
httpStatus?: number;
|
|
34
|
+
durationMs?: number;
|
|
35
|
+
requestId?: string;
|
|
36
|
+
client?: string;
|
|
37
|
+
requestBody?: Json;
|
|
38
|
+
requestBodyNote?: string;
|
|
39
|
+
errorSentence?: string;
|
|
40
|
+
timestamp: number;
|
|
41
|
+
}
|
|
42
|
+
/** RAW-FREE. What leaves the package about a clicked item. */
|
|
43
|
+
interface ResolvedItem {
|
|
44
|
+
itemType: string;
|
|
45
|
+
identity: Record<string, string>;
|
|
46
|
+
level?: string;
|
|
47
|
+
readOnly: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* `@ai-matrx/alchemy/declare/host` — HOST-BINDING types only (CONTRACT §2.1, §2.6).
|
|
52
|
+
* Never imported by providers (`/declare`, `/actions`, `/menu`, `/operate` see only
|
|
53
|
+
* the raw-free `ResolvedItem`). Types only: no runtime code.
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
interface ItemAnchor {
|
|
57
|
+
/** The host element the person clicked. */
|
|
58
|
+
element: unknown;
|
|
59
|
+
level?: string;
|
|
60
|
+
}
|
|
61
|
+
/** Raw item reads: consumed only by projection and the write handler that owns the target. */
|
|
62
|
+
interface InternalResolvedItem extends ResolvedItem {
|
|
63
|
+
readValues(signal: AbortSignal): Promise<Record<string, unknown>>;
|
|
64
|
+
}
|
|
65
|
+
/** A mounted instance of a declared surface. Structural handle, never a global name lookup. */
|
|
66
|
+
interface MountedSurface {
|
|
67
|
+
instanceId: string;
|
|
68
|
+
surfaceName: string;
|
|
69
|
+
isMounted(): boolean;
|
|
70
|
+
/** Same revision before and after a read, or capture refuses with "surface-changed". */
|
|
71
|
+
getRevision?(): string;
|
|
72
|
+
unsavedChanges?(): boolean;
|
|
73
|
+
readValues(signal: AbortSignal): Promise<Record<string, unknown>>;
|
|
74
|
+
readLive?(signal: AbortSignal): Promise<LiveValues>;
|
|
75
|
+
resolveItem?(anchor: ItemAnchor): InternalResolvedItem | null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type { InternalResolvedItem, ItemAnchor, MountedSurface };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=declare-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|