buckyos 0.7.159 → 0.7.162

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.
@@ -0,0 +1,310 @@
1
+ /**
2
+ * AI Workspace extension controls (buckyos src/frame/aiworkspace/README.md “Extension controls”), shared by the
3
+ * Desktop and the CLI: a control's source lives in a home folder of the Zone file service (files may sit in
4
+ * sub-folders: their names are relative paths, Q23); `build` lists it over NFSP and hands each file's object to
5
+ * `ext.build`, `pull` writes a Workspace snapshot back, `watch` rebuilds on change; bundles (the AIWS manifest plus
6
+ * `controls/<dir>/<path>` and Workspace templates under `templates/<id>/`) are what exports, packages and the library
7
+ * carry.
8
+ * Runs in browsers and Deno (fetch, crypto.subtle); no dependencies.
9
+ */
10
+ import type { AiWorkspaceClient, AiwsMigration, AiwsTemplateItem } from './aiworkspace_client';
11
+ import type { NfspClient, WireRef } from './nfsp';
12
+ /** The two service calls these drivers make (an `AiWorkspaceClient`, or a host's own session with the same shape). */
13
+ export type AiwsExtRpc = Pick<AiWorkspaceClient, 'extBuild' | 'extExport'>;
14
+ /** Puts bytes into the Zone's named store as a FileObject the caller may read and answers its `cyfile:` id (the
15
+ * Desktop's asset upload, the CLI's NDM upload): what a build sends by reference when inline bytes would exceed the
16
+ * service's limit (Q22). */
17
+ export type AiwsUploader = (name: string, bytes: Uint8Array) => Promise<string>;
18
+ export declare const AIWS_COMPONENT_FILE = "component.json";
19
+ /** The entry of a composite control (P1). */
20
+ export declare const AIWS_COMPOSITION_FILE = "composition.json";
21
+ export declare const AIWS_MANIFEST_FILE = "aiws-manifest.json";
22
+ /** A client's own record of the base it last built or pulled (never part of the source snapshot: dot files are not). */
23
+ export declare const AIWS_BUILD_STATE_FILE = ".aiws-build.json";
24
+ /** The newest component.json / AIWS manifest version this module reads (older ones stay readable, Q19). Version 2
25
+ * adds `kind: composite` and non-empty `deps`; version 3 `events`, the declarative `button`, composite `events` and
26
+ * Workspace templates. */
27
+ export declare const AIWS_MANIFEST_VERSION = 3;
28
+ /** The newest HTML Block host API (`window.aiws` v3: `emit`, `createBlock { parent, slot }`, `context.interactive`;
29
+ * hosts run 2 and 3) and the declarative interpreter version. */
30
+ export declare const AIWS_HTML_API_VERSION = 3;
31
+ export declare const AIWS_DECLARATIVE_API_VERSION = 1;
32
+ /** The `format` of a Workspace template's `snapshot.json` (Q32). */
33
+ export declare const AIWS_TEMPLATE_FORMAT = "aiws-template/1";
34
+ export declare const AIWS_MAX_SOURCE_FILES = 64;
35
+ /**
36
+ * One file of a source folder. `obj_id` is set when the file service holds it as a named-store FileObject (`cyfile:`):
37
+ * the service then reads it by reference. Files of a native home folder have none (their `obj_id`, when the file
38
+ * service reports one, is a `sha256:` content hash the service cannot fetch): their bytes travel with the build.
39
+ */
40
+ export interface AiwsSourceFile {
41
+ name: string;
42
+ obj_id?: string;
43
+ node_id?: string;
44
+ etag?: string;
45
+ size?: number;
46
+ }
47
+ export interface AiwsDiagnostic {
48
+ file: string;
49
+ line?: number;
50
+ col?: number;
51
+ severity: 'error' | 'warning';
52
+ message: string;
53
+ /** `DEP_MISSING`: a `deps` entry or a slot's `cell:<ident>` names no definition of the Workspace; `EVENT_UNDECLARED`:
54
+ * a composite re-raises an event no `cell:<ident>` of that slot declares, or a button emits an undeclared event. */
55
+ code?: string;
56
+ /** Blocks whose contract a rebuild would break. */
57
+ instances?: {
58
+ entity_id: string;
59
+ title?: string | null;
60
+ }[];
61
+ /** Definitions that build on the one a rebuild would narrow. */
62
+ dependents?: {
63
+ ident: string;
64
+ def_entity_id: string;
65
+ }[];
66
+ }
67
+ export interface AiwsBuildState {
68
+ workspace_id: string;
69
+ def_entity_id: string;
70
+ def_rev: number;
71
+ dir_rev: number;
72
+ ident?: string;
73
+ at?: string;
74
+ }
75
+ export interface AiwsManifestControl {
76
+ ident: string;
77
+ name: string;
78
+ kind: string;
79
+ version: number;
80
+ digest: string;
81
+ dir: string;
82
+ title?: string;
83
+ description?: string;
84
+ catalog?: Record<string, unknown>;
85
+ deps?: string[];
86
+ }
87
+ export interface AiwsManifest {
88
+ manifest_version: number;
89
+ purpose: 'aiws';
90
+ host_api?: Record<string, number>;
91
+ controls: AiwsManifestControl[];
92
+ workspace_templates: AiwsTemplateItem[];
93
+ }
94
+ export interface AiwsBundle {
95
+ manifest: AiwsManifest;
96
+ files: Map<string, Uint8Array>;
97
+ }
98
+ /** A source directory that cannot be built as it is (not a service refusal: `diagnostics` say why). */
99
+ export declare class AiwsSourceError extends Error {
100
+ readonly diagnostics: AiwsDiagnostic[];
101
+ constructor(diagnostics: AiwsDiagnostic[]);
102
+ }
103
+ export declare function joinPath(dir: string, name: string): string;
104
+ /** A Workspace title as one folder name (no `/`, no leading dot). */
105
+ export declare function folderName(title: string): string;
106
+ /** The suggested home folder of a control (README: a suggestion; the definition never stores it). */
107
+ export declare function homeControlDir(owner: string, workspaceTitle: string, name: string): string;
108
+ /** Where a client writes an export bundle before packing it. */
109
+ export declare function homeExportDir(owner: string, pkg: string): string;
110
+ /** `user_state` key under which each person remembers the home folder of a definition. */
111
+ export declare function sourceStateKey(defEntityId: string): string;
112
+ /** `sha256:` over `[[name, sha256 hex of its bytes], …]` sorted by name: a control's content digest. */
113
+ export declare function aiwsContentDigest(files: Iterable<[string, Uint8Array]>): Promise<string>;
114
+ /** What a set of sources is, for "nothing changed since the last build" (names, objects or versions). */
115
+ export declare function sourcesKey(files: AiwsSourceFile[]): string;
116
+ /** Bytes a single build may carry inline (the service's limit). */
117
+ export declare const AIWS_MAX_INLINE_BYTES: number;
118
+ export type AiwsBuildFile = {
119
+ name: string;
120
+ obj_id: string;
121
+ } | {
122
+ name: string;
123
+ base64: string;
124
+ };
125
+ /**
126
+ * The `files` of `ext.build` from bytes the client holds: inline while the total stays within the service's limit;
127
+ * beyond it, the largest files go to the named store through `upload` and are sent by reference (Q22) — without an
128
+ * uploader the build is refused. `byRef` are files already held as FileObjects.
129
+ */
130
+ export declare function packBuildFiles(files: {
131
+ name: string;
132
+ bytes: Uint8Array;
133
+ }[], upload?: AiwsUploader, byRef?: {
134
+ name: string;
135
+ obj_id: string;
136
+ }[]): Promise<AiwsBuildFile[]>;
137
+ /** The `files` of `ext.build`: FileObjects by reference, everything else read over the file service and sent inline
138
+ * (or, past the inline limit, uploaded through `upload`). */
139
+ export declare function buildFiles(nfsp: NfspClient, files: AiwsSourceFile[], upload?: AiwsUploader): Promise<AiwsBuildFile[]>;
140
+ /** What another control declares (the `events` names of its component.json), `undefined` when it is not at hand:
141
+ * whether a composite's slot children raise an event can be judged only then (otherwise the build judges it). */
142
+ export type AiwsCellEvents = (ident: string) => string[] | undefined;
143
+ /** A file name of a source folder: a relative path whose parts are non-empty and do not start with `.` (Q23). */
144
+ export declare function isSourcePath(name: string): boolean;
145
+ /**
146
+ * Check a declarative control's entry file the way `ext.build` does (store/src/ext.rs `check_declarative`): what the
147
+ * interpreter draws (`layout`, `items` / `view.items`, `accent`, `actions`, `inspector`) and, with manifest_version 3,
148
+ * the item `{ kind: "button", label, emit, params? }` raising an event of `events` (`EVENT_UNDECLARED` otherwise;
149
+ * strings in `params` may hold `{{config.<key>}}`). Without `events` the emitted names are not judged.
150
+ */
151
+ export declare function checkDeclarative(text: string, context?: {
152
+ bindings?: unknown;
153
+ events?: string[];
154
+ configSchema?: unknown;
155
+ manifestVersion?: number;
156
+ }, file?: string): AiwsDiagnostic[];
157
+ /** A composite's `composition.json` (K3): what the slots accept and their counts, the layout, the Chrome and the
158
+ * events it re-raises from its children (P2). */
159
+ export interface AiwsComposition {
160
+ layout: {
161
+ algorithm: 'stack' | 'fixed' | 'grid';
162
+ direction?: 'column' | 'row';
163
+ spacing?: number | string;
164
+ padding?: number | string | {
165
+ t?: number;
166
+ r?: number;
167
+ b?: number;
168
+ l?: number;
169
+ };
170
+ columns?: number;
171
+ gap?: number | string;
172
+ };
173
+ slots: Record<string, {
174
+ accepts?: string[];
175
+ min?: number;
176
+ max?: number;
177
+ placement?: 'stack' | 'top' | 'bottom' | 'free';
178
+ title?: string;
179
+ }>;
180
+ chrome?: {
181
+ background?: string;
182
+ radius?: number | string;
183
+ border?: string;
184
+ title?: {
185
+ text: string;
186
+ slot?: string;
187
+ };
188
+ empty?: string;
189
+ };
190
+ events?: Record<string, {
191
+ from: {
192
+ slot: string;
193
+ event: string;
194
+ };
195
+ title?: string;
196
+ description?: string;
197
+ }>;
198
+ }
199
+ /**
200
+ * Check a `composition.json` the way `ext.build` does (store/src/ext.rs `check_composition`): `layout` is `stack`,
201
+ * `fixed` or `grid` (`columns` 1…12, `gap`; a grid fills its cells with the slots' children in slot order, so its slots
202
+ * take placement `stack` only), at most 16 slots named `[a-z][a-z0-9_]{0,31}` accepting `cell:<ident>`, a view type or
203
+ * `container`, the Chrome's strings, `{{config.<key>}}` naming properties of `config_schema`, and `events`
204
+ * (manifest_version 3) re-raising an event of a slot's children: `EVENT_UNDECLARED` when no `cell:<ident>` of that slot
205
+ * declares it, judged as far as `cellEvents` knows those controls.
206
+ */
207
+ export declare function checkComposition(text: string, configSchema?: unknown, file?: string, context?: {
208
+ manifestVersion?: number;
209
+ cellEvents?: AiwsCellEvents;
210
+ }): AiwsDiagnostic[];
211
+ /**
212
+ * Check a `component.json` text against the files of its directory (and its declarative file or composition when
213
+ * `readText` gives the entry's text; `cellEvents` says what other controls declare, for a composite's re-raised
214
+ * events). Errors make a build fail; warnings do not.
215
+ */
216
+ export declare function checkComponent(text: string, fileNames: string[], readText?: (name: string) => string | undefined, cellEvents?: AiwsCellEvents): AiwsDiagnostic[];
217
+ /** The identities a composition's slots accept as `cell:<ident>`. */
218
+ export declare function slotCells(composition: AiwsComposition): string[];
219
+ /** Read an AIWS manifest of any supported version as the current one (Q19); a newer one is refused. */
220
+ export declare function compatManifest(value: unknown): AiwsManifest;
221
+ /** Where a Workspace template's files sit in a bundle: `templates/<id>/` (`snapshot.json`, `objects/`, `chunks/`). */
222
+ export declare function templateDir(id: string): string;
223
+ /** The content digest of a Workspace template (its manifest `digest`): the files under `templates/<id>/`, named
224
+ * relative to that folder, digested as a control's. */
225
+ export declare function aiwsTemplateDigest(files: Iterable<[string, Uint8Array]>, id: string): Promise<string>;
226
+ /** Verify a bundle the way an installer does: manifest, each control's digest and component.json, each Workspace
227
+ * template's shape, snapshot and digest, no stray files. */
228
+ export declare function verifyBundle(files: Map<string, Uint8Array>): Promise<{
229
+ manifest: AiwsManifest;
230
+ diagnostics: AiwsDiagnostic[];
231
+ }>;
232
+ /** The bundle of Workspace definitions (`ext.export`): the manifest plus every file's bytes. */
233
+ export declare function exportBundle(client: AiwsExtRpc, workspaceId: string, entityIds: string[], fetchAsset: (workspaceId: string, objId: string) => Promise<Uint8Array>): Promise<AiwsBundle & {
234
+ controls: Record<string, unknown>[];
235
+ }>;
236
+ /** Make sure a folder exists, creating each missing level below the realm root (`/home`); answers its ref. Levels
237
+ * are looked up by listing their parent, so a missing one is not a failed request. */
238
+ export declare function ensureFolder(nfsp: NfspClient, path: string): Promise<WireRef>;
239
+ /** A folder's ref, or null when it (or a level above it) does not exist — found without failed requests. */
240
+ export declare function findFolder(nfsp: NfspClient, path: string): Promise<WireRef | null>;
241
+ /** Whether a folder holds a control source (its component.json). */
242
+ export declare function hasControlSource(nfsp: NfspClient, dir: string): Promise<boolean>;
243
+ /** Write one file into a folder (replacing it). */
244
+ export declare function writeHomeFile(nfsp: NfspClient, dir: string | WireRef, name: string, bytes: Uint8Array): Promise<void>;
245
+ /** The files of a control's source folder, sub-folders included (names are relative paths, Q23); dot files and dot
246
+ * folders are the client's own and skipped. */
247
+ export declare function collectSources(nfsp: NfspClient, dir: string): Promise<AiwsSourceFile[]>;
248
+ /** Write a source file whose name may be a relative path (its sub-folders are created). */
249
+ export declare function writeSourceFile(nfsp: NfspClient, dir: string, name: string, bytes: Uint8Array): Promise<void>;
250
+ /** The content digest of a home folder's sources (what `ext.export` answers as a control's `digest`). */
251
+ export declare function sourcesDigest(nfsp: NfspClient, files: AiwsSourceFile[]): Promise<string>;
252
+ /**
253
+ * Does the home folder of a definition hold changes that were not built (P0 遗留 L3)? Compares its sources with the
254
+ * Workspace snapshot (`ext.export { purpose: pull }`). `null` when the folder holds no control.
255
+ */
256
+ export declare function unbuiltChanges(client: AiwsExtRpc, nfsp: NfspClient, workspaceId: string, defEntityId: string, dir: string): Promise<{
257
+ changed: boolean;
258
+ home: string;
259
+ built: string;
260
+ } | null>;
261
+ export declare function readBuildState(nfsp: NfspClient, dir: string): Promise<AiwsBuildState | null>;
262
+ export declare function writeBuildState(nfsp: NfspClient, dir: string, state: AiwsBuildState): Promise<void>;
263
+ export interface AiwsBuildOptions {
264
+ folderId?: string;
265
+ force?: boolean;
266
+ dryRun?: boolean;
267
+ upload?: AiwsUploader;
268
+ migration?: Record<string, AiwsMigration>;
269
+ }
270
+ /**
271
+ * Build the control in `dir` into a Workspace: collect the files, call `ext.build` with the base recorded in
272
+ * `.aiws-build.json` (when it is this Workspace's), and record the new base. Service refusals throw `AiwsFailure`
273
+ * (`BUILD_FAILED` carries `data.diagnostics`); source problems throw `AiwsSourceError`.
274
+ */
275
+ export declare function buildControl(client: AiwsExtRpc, nfsp: NfspClient, workspaceId: string, dir: string, opts?: AiwsBuildOptions): Promise<Record<string, unknown> & {
276
+ files: AiwsSourceFile[];
277
+ }>;
278
+ /**
279
+ * Write a definition's Workspace snapshot into `outDir` (a definition never built from source gets synthesized
280
+ * files) and record it as the base of the next build.
281
+ */
282
+ export declare function pullControl(client: AiwsExtRpc, nfsp: NfspClient, workspaceId: string, defEntityId: string, outDir: string, fetchAsset: (workspaceId: string, objId: string) => Promise<Uint8Array>): Promise<{
283
+ files: string[];
284
+ state: AiwsBuildState;
285
+ }>;
286
+ /**
287
+ * Rebuild whenever the folder changes: NFSP watch events (lossy: a `resync` lists again), debounced, and only when
288
+ * the files' objects differ from the last build. Returns when `signal` aborts.
289
+ */
290
+ export declare function watchControl(nfsp: NfspClient, dir: string, onChange: (files: AiwsSourceFile[]) => Promise<void>, opts?: {
291
+ debounceMs?: number;
292
+ signal?: AbortSignal;
293
+ }): Promise<void>;
294
+ export interface AiwsSkeletonOptions {
295
+ authorDid: string;
296
+ name: string;
297
+ title?: string;
298
+ kind?: 'declarative' | 'html' | 'composite';
299
+ /** A composite's slots (default: one `items` slot taking any Block) and what it builds on. */
300
+ slots?: AiwsComposition['slots'];
301
+ deps?: string[];
302
+ algorithm?: 'stack' | 'fixed';
303
+ }
304
+ /** The files of a new control: a minimal working declarative or HTML control (with one public event, raised by a
305
+ * button) with one optional binding, or a composite that stacks (or keeps in place) the Blocks of its slots under a
306
+ * titled frame. */
307
+ export declare function controlSkeleton(opts: AiwsSkeletonOptions): Record<string, string>;
308
+ /** Create a control's source folder from a skeleton (refuses to overwrite a folder that has a component.json). */
309
+ export declare function createControlSource(nfsp: NfspClient, dir: string, files: Record<string, string>): Promise<WireRef>;
310
+ //# sourceMappingURL=aiws_ext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aiws_ext.d.ts","sourceRoot":"","sources":["../src/aiws_ext.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC9F,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEjD,sHAAsH;AACtH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,CAAC,CAAA;AAE1E;;4BAE4B;AAC5B,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;AAE/E,eAAO,MAAM,mBAAmB,mBAAmB,CAAA;AACnD,6CAA6C;AAC7C,eAAO,MAAM,qBAAqB,qBAAqB,CAAA;AACvD,eAAO,MAAM,kBAAkB,uBAAuB,CAAA;AACtD,wHAAwH;AACxH,eAAO,MAAM,qBAAqB,qBAAqB,CAAA;A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