@fugood/bricks-ctor 2.24.0-beta.47 → 2.24.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/compile/index.ts +3 -1
- package/package.json +3 -3
package/compile/index.ts
CHANGED
|
@@ -541,6 +541,8 @@ const compileAutomation = (automationMap: AutomationMap) =>
|
|
|
541
541
|
export const compile = async (app: Application) => {
|
|
542
542
|
await new Promise((resolve) => setImmediate(resolve, 0))
|
|
543
543
|
const timestamp = Date.now()
|
|
544
|
+
// Pre-index subspace ids so the canvas-item validation below stays O(1).
|
|
545
|
+
const subspaceIdSet = new Set(app.subspaces.map((s) => s.id))
|
|
544
546
|
const config = {
|
|
545
547
|
title: `${app.name || 'Unknown'}(${timestamp})`,
|
|
546
548
|
subspace_map: app.subspaces.reduce((subspaceMap, subspace, subspaceIndex) => {
|
|
@@ -894,7 +896,7 @@ export const compile = async (app: Application) => {
|
|
|
894
896
|
itemPayload = { brick_id: brick.id }
|
|
895
897
|
} else {
|
|
896
898
|
const targetSubspaceId = item.item
|
|
897
|
-
if (!
|
|
899
|
+
if (!subspaceIdSet.has(targetSubspaceId))
|
|
898
900
|
throw new Error(
|
|
899
901
|
`Invalid canvas item index: ${index}, subspace not found (canvas: ${canvasId}, subspace ${subspaceId})`,
|
|
900
902
|
)
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/bricks-ctor",
|
|
3
|
-
"version": "2.24.0
|
|
3
|
+
"version": "2.24.0",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"typecheck": "tsc --noEmit",
|
|
7
7
|
"build": "bun scripts/build.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@fugood/bricks-cli": "^2.24.0
|
|
10
|
+
"@fugood/bricks-cli": "^2.24.0",
|
|
11
11
|
"@huggingface/gguf": "^0.3.2",
|
|
12
12
|
"@iarna/toml": "^3.0.0",
|
|
13
13
|
"@modelcontextprotocol/sdk": "^1.15.0",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"oxfmt": "^0.36.0"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "e1d49be3eff48a93731e8bf76dfc180bce57d3e4"
|
|
28
28
|
}
|