@neta-art/cohub-cli 10.14.1 → 10.15.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/dist/board-export.d.ts +7 -0
- package/dist/board-export.js +3 -3
- package/dist/board-kernel.d.ts +1 -0
- package/dist/board-kernel.js +7605 -277
- package/dist/board-simulate.d.ts +53 -0
- package/dist/board-simulate.js +151 -0
- package/dist/commands/boards.js +68 -0
- package/dist/commands/spaces.js +13 -13
- package/dist/runtime/connection.d.ts +3 -0
- package/dist/runtime/connection.js +59 -3
- package/dist/runtime/harnesses/claude.js +8 -2
- package/dist/runtime/harnesses/index.d.ts +2 -0
- package/dist/runtime/harnesses/index.js +13 -0
- package/dist/runtime/harnesses/stream-json.d.ts +2 -2
- package/dist/runtime/harnesses/stream-json.js +5 -3
- package/dist/runtime/harnesses/types.d.ts +4 -2
- package/dist/runtime/harnesses/workbuddy.d.ts +8 -2
- package/dist/runtime/model-catalog.d.ts +1 -3
- package/dist/runtime/model-catalog.js +23 -7
- package/dist/runtime/supervisor.js +2 -1
- package/package.json +3 -3
package/dist/board-export.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { BoardDocument, BoardExportRegion, BoardSceneItem, BoardThemeId } from "@neta-art/cohub/board";
|
|
2
2
|
import type { BoardNodeExportFormat, BoardNodeFont, BoardNodeTexture } from "@neta-art/cohub/board/export/node";
|
|
3
|
+
import type { BoardScriptHost } from "@neta-art/cohub/board/render";
|
|
4
|
+
import { createClient } from "./client.js";
|
|
3
5
|
import { type BoardExportDecodeImage } from "./board-export-resources.js";
|
|
4
6
|
export declare function resolveBundledFonts(): BoardNodeFont[];
|
|
5
7
|
export type BoardExportSource = {
|
|
@@ -33,6 +35,10 @@ export declare function loadBoardTextures(images: {
|
|
|
33
35
|
}): Promise<{
|
|
34
36
|
textures: Map<string, BoardNodeTexture>;
|
|
35
37
|
} & Record<"failed" | "unavailable" | "omitted", string[]>>;
|
|
38
|
+
export declare function readSpaceFileBytes(client: ReturnType<typeof createClient>, spaceId: string, path: string): Promise<{
|
|
39
|
+
bytes: Uint8Array;
|
|
40
|
+
mimeType: string;
|
|
41
|
+
}>;
|
|
36
42
|
export type BoardExportRunOptions = {
|
|
37
43
|
spaceId: string;
|
|
38
44
|
target: string;
|
|
@@ -51,6 +57,7 @@ export type BoardExportRunOptions = {
|
|
|
51
57
|
height: number;
|
|
52
58
|
};
|
|
53
59
|
document?: BoardDocument;
|
|
60
|
+
scripts?: BoardScriptHost;
|
|
54
61
|
signal?: AbortSignal;
|
|
55
62
|
imageMemoryMiB?: number;
|
|
56
63
|
onPlan?: (plan: {
|
package/dist/board-export.js
CHANGED
|
@@ -152,7 +152,7 @@ async function fetchBoardPicture(client, spaceId, source, item, edge) {
|
|
|
152
152
|
}
|
|
153
153
|
return source.kind === "url" ? downloadPublicImage(source.value) : readSpaceFileBytes(client, spaceId, source.value);
|
|
154
154
|
}
|
|
155
|
-
async function readSpaceFileBytes(client, spaceId, path) {
|
|
155
|
+
export async function readSpaceFileBytes(client, spaceId, path) {
|
|
156
156
|
const { blob, mimeType } = await client.space(spaceId).files.download(path);
|
|
157
157
|
return { bytes: new Uint8Array(await blob.arrayBuffer()), mimeType };
|
|
158
158
|
}
|
|
@@ -321,7 +321,7 @@ export async function runBoardExport(options) {
|
|
|
321
321
|
warnings.push("The board background image could not be loaded; the fallback color was exported.");
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
if (hasBoardScripts(document))
|
|
324
|
+
if (!options.scripts && hasBoardScripts(document))
|
|
325
325
|
scriptHost = createNodeBoardScriptHost(renderer, {
|
|
326
326
|
concurrency: 2,
|
|
327
327
|
readModule: async (src) => {
|
|
@@ -382,7 +382,7 @@ export async function runBoardExport(options) {
|
|
|
382
382
|
...theme,
|
|
383
383
|
background: options.background,
|
|
384
384
|
textures,
|
|
385
|
-
scripts: scriptHost ?? undefined,
|
|
385
|
+
scripts: options.scripts ?? scriptHost ?? undefined,
|
|
386
386
|
backgroundTexture,
|
|
387
387
|
assetKey,
|
|
388
388
|
format: options.format,
|
package/dist/board-kernel.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export { BOARD_SCRIPT_DRAWING_EXAMPLE, hasBoardScripts, boardAssetKey, boardAsse
|
|
|
2
2
|
export { prepareBoardExport } from "@neta-art/cohub/board/export";
|
|
3
3
|
export { boardRenderTheme, createBoardRenderSampler, inspectBoardScene, inspectBoardItems, measureBoardText } from "@neta-art/cohub/board/render";
|
|
4
4
|
export { createNodeBoardRenderer, createNodeBoardScriptHost, exportBoardImageBytes } from "@neta-art/cohub/board/export/node";
|
|
5
|
+
export { createBoardScriptHarness } from "@neta-art/cohub/board/testing";
|