@fugood/bricks-project 2.24.0-beta.16 → 2.24.0-beta.17

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 CHANGED
@@ -266,6 +266,7 @@ const compileApplicationSettings = (settings: Application['settings']) => ({
266
266
  use_gemini_api_key_system_data: settings.ai.useGeminiApiKeySystemData,
267
267
  }
268
268
  : undefined,
269
+ hide_short_refs: settings?.hideShortRefs,
269
270
  })
270
271
 
271
272
  const animationTypeMap = {
@@ -385,6 +386,7 @@ function compileRunArray(run: unknown[]): unknown[] {
385
386
  const compileTestCase = (testCase: TestCase) => ({
386
387
  id: testCase.id,
387
388
  name: testCase.name,
389
+ hide_short_ref: testCase.hideShortRef,
388
390
  run: compileRunArray(testCase.run),
389
391
  exit_on_failed: testCase.exit_on_failed,
390
392
  commented: testCase.commented,
@@ -449,6 +451,7 @@ const compileAutomationTest = (
449
451
  return {
450
452
  id: testId,
451
453
  title: test.title,
454
+ hide_short_ref: test.hideShortRef,
452
455
  timeout: test.timeout,
453
456
  trigger_type: test.trigger_type,
454
457
  cron: test.cron,
@@ -476,6 +479,7 @@ const compileAutomationTestMap = (testMap: AutomationTestMap, mapId: string) =>
476
479
 
477
480
  return {
478
481
  title: testMap.title,
482
+ hide_short_ref: testMap.hideShortRef,
479
483
  createdAt: testMap.createdAt,
480
484
  map: arrayToIdMap(
481
485
  testMap.tests,
@@ -519,6 +523,7 @@ export const compile = async (app: Application) => {
519
523
  subspaceMap[subspaceId] = {
520
524
  title: subspace.title,
521
525
  description: subspace.description,
526
+ hide_short_ref: subspace.hideShortRef,
522
527
  _expanded: subspace.unexpanded
523
528
  ? {
524
529
  brick: !subspace.unexpanded.brick,
@@ -556,8 +561,10 @@ export const compile = async (app: Application) => {
556
561
  if (animation.__typename === 'Animation') {
557
562
  const animationDef = animation as AnimationDef
558
563
  map[animationId] = {
564
+ alias: animationDef.alias,
559
565
  title: animationDef.title,
560
566
  description: animationDef.description,
567
+ hide_short_ref: animationDef.hideShortRef,
561
568
  animationRunType: animationDef.runType,
562
569
  property: animationDef.property,
563
570
  type: animationTypeMap[animationDef.config.__type],
@@ -569,8 +576,10 @@ export const compile = async (app: Application) => {
569
576
  } else if (animation.__typename === 'AnimationCompose') {
570
577
  const animationDef = animation as AnimationComposeDef
571
578
  map[animationId] = {
579
+ alias: animationDef.alias,
572
580
  title: animationDef.title,
573
581
  description: animationDef.description,
582
+ hide_short_ref: animationDef.hideShortRef,
574
583
  animationRunType: animationDef.runType,
575
584
  compose_type: animationDef.composeType,
576
585
  item_list: animationDef.items.map((item, index) => {
@@ -690,8 +699,10 @@ export const compile = async (app: Application) => {
690
699
  }
691
700
  map[brickId] = {
692
701
  template_key: brick.templateKey,
702
+ alias: brick.alias,
693
703
  title: brick.title,
694
704
  description: brick.description,
705
+ hide_short_ref: brick.hideShortRef,
695
706
  property,
696
707
  animation: compileAnimations(
697
708
  brick.templateKey,
@@ -758,8 +769,10 @@ export const compile = async (app: Application) => {
758
769
  )
759
770
 
760
771
  map[canvasId] = {
772
+ alias: canvas.alias,
761
773
  title: canvas.title,
762
774
  description: canvas.description,
775
+ hide_short_ref: canvas.hideShortRef,
763
776
  property: compileProperty(
764
777
  canvas.property,
765
778
  `(canvas: ${canvasId}, subspace ${subspaceId})`,
@@ -838,8 +851,10 @@ export const compile = async (app: Application) => {
838
851
 
839
852
  map[generatorId] = {
840
853
  template_key: generator.templateKey,
854
+ alias: generator.alias,
841
855
  title: generator.title,
842
856
  description: generator.description,
857
+ hide_short_ref: generator.hideShortRef,
843
858
  local_sync: generator.localSyncRunMode
844
859
  ? {
845
860
  run_mode: generator.localSyncRunMode,
@@ -908,8 +923,10 @@ export const compile = async (app: Application) => {
908
923
  )
909
924
 
910
925
  map[dataId] = {
926
+ alias: data.alias,
911
927
  title: data.title,
912
928
  description: data.description,
929
+ hide_short_ref: data.hideShortRef,
913
930
  linked: data.metadata?.linked,
914
931
  linkedFrom: data.metadata?.linkedFrom,
915
932
  local_sync: data.localSyncUpdateMode
@@ -943,6 +960,7 @@ export const compile = async (app: Application) => {
943
960
  const calc: any = {
944
961
  title: dataCalc.title,
945
962
  description: dataCalc.description,
963
+ hide_short_ref: dataCalc.hideShortRef,
946
964
  }
947
965
  if (dataCalc.triggerMode) calc.trigger_type = dataCalc.triggerMode
948
966
  if (dataCalc.__typename === 'DataCalculationMap') {
@@ -1029,6 +1047,7 @@ export const compile = async (app: Application) => {
1029
1047
  acc[getNodeId(dataNode, 'data node', nodeIndex)] = {
1030
1048
  title: dataNode.title,
1031
1049
  description: dataNode.description,
1050
+ hide_short_ref: dataNode.hideShortRef,
1032
1051
  type: 'data-node',
1033
1052
  properties: {},
1034
1053
  in: generateInputPorts(dataNode.inputs),
@@ -1054,6 +1073,7 @@ export const compile = async (app: Application) => {
1054
1073
  acc[getNodeId(commandNode, 'command node', nodeIndex)] = {
1055
1074
  title: commandNode.title,
1056
1075
  description: commandNode.description,
1076
+ hide_short_ref: commandNode.hideShortRef,
1057
1077
  type: `command-node-${type}`,
1058
1078
  properties: {
1059
1079
  command: commandNode.__commandName,
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.24.0-beta.16",
3
+ "version": "2.24.0-beta.17",
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-beta.15",
10
+ "@fugood/bricks-cli": "^2.24.0-beta.17",
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": "b024e1980b2c25797ae26e9b973497e3ee724265"
27
+ "gitHead": "d99917a2e6eacce97d527fee3c2d6c5bbdcfeef5"
28
28
  }
@@ -37,6 +37,13 @@ Built-in commands for direct state and UI changes.
37
37
  ### Data Calculation (Priority 4)
38
38
  ONLY for deriving, formatting, or aggregating values from other data. Not for orchestration, side effects, or flow control.
39
39
 
40
+ ## Entity Aliases
41
+
42
+ Set `alias` on entities to give them a stable, human-readable name:
43
+ - Code generation uses alias as the variable name (e.g., `alias: 'submitBtn'` → `export const submitBtn`)
44
+ - At runtime, devtools MCP tools accept alias instead of short ID and selectors can match by alias. Note: bricks-project does not directly interact with devtools MCP — aliases here primarily affect code generation
45
+ - Aliases must be unique across the application — duplicates are excluded from resolution
46
+
40
47
  ## Flow Decomposition
41
48
 
42
49
  When the user describes a complex flow, decompose it BEFORE writing code:
@@ -61,8 +61,10 @@ export interface AnimationDecayConfig {
61
61
  export interface AnimationDef {
62
62
  __typename: 'Animation'
63
63
  id: string
64
+ alias?: string
64
65
  title: string
65
66
  description?: string
67
+ hideShortRef?: boolean
66
68
  runType?: 'once' | 'loop'
67
69
  property:
68
70
  | 'transform.translateX'
@@ -80,8 +82,10 @@ export interface AnimationDef {
80
82
  export interface AnimationComposeDef {
81
83
  __typename: 'AnimationCompose'
82
84
  id: string
85
+ alias?: string
83
86
  title: string
84
87
  description?: string
88
+ hideShortRef?: boolean
85
89
  runType?: 'once' | 'loop'
86
90
  composeType: 'parallel' | 'sequence'
87
91
  items: Array<() => Animation>
@@ -182,6 +182,7 @@ export interface TestCase {
182
182
  __typename: 'TestCase'
183
183
  id: string
184
184
  name: string
185
+ hideShortRef?: boolean
185
186
  run: TestMethodRun
186
187
  exit_on_failed: boolean
187
188
  commented: boolean
@@ -203,6 +204,7 @@ export interface AutomationTest {
203
204
  __typename: 'AutomationTest'
204
205
  id: string
205
206
  title: string
207
+ hideShortRef?: boolean
206
208
  timeout: number
207
209
  trigger_type?: TestTriggerType
208
210
  cron?: string // Cron expression when trigger_type is 'cron'
@@ -220,6 +222,7 @@ export interface AutomationTestMap {
220
222
  __typename: 'AutomationTestMap'
221
223
  id: string
222
224
  title: string
225
+ hideShortRef?: boolean
223
226
  createdAt: number
224
227
  tests: AutomationTest[]
225
228
  }
package/types/canvas.ts CHANGED
@@ -36,8 +36,10 @@ interface CanvasDef {
36
36
  export type Canvas = CanvasDef & {
37
37
  __typename: 'Canvas'
38
38
  id: string
39
+ alias?: string
39
40
  title?: string
40
41
  description?: string
42
+ hideShortRef?: boolean
41
43
  switches?: Array<
42
44
  SwitchDef &
43
45
  CanvasDef & {
package/types/common.ts CHANGED
@@ -6,9 +6,11 @@ import type { AutomationMap } from './automation'
6
6
  export interface Brick {
7
7
  __typename: 'Brick'
8
8
  id: string
9
+ alias?: string
9
10
  templateKey: string
10
11
  title?: string
11
12
  description?: string
13
+ hideShortRef?: boolean
12
14
  property?: {}
13
15
  events: {}
14
16
  outlets?: {}
@@ -24,9 +26,11 @@ export enum LocalSyncStrategy {
24
26
  export interface Generator {
25
27
  __typename: 'Generator'
26
28
  id: string
29
+ alias?: string
27
30
  templateKey: string
28
31
  title?: string
29
32
  description?: string
33
+ hideShortRef?: boolean
30
34
  localSyncRunMode?: LocalSyncStrategy
31
35
  property?: {}
32
36
  events: {}
@@ -121,6 +125,7 @@ export type ApplicationSettings = {
121
125
  useOpenAiApiKeySystemData?: boolean
122
126
  useGeminiApiKeySystemData?: boolean
123
127
  }
128
+ hideShortRefs?: boolean
124
129
  }
125
130
 
126
131
  export type Application = {
@@ -6,6 +6,7 @@ export interface DataCalculationData {
6
6
  __typename: 'DataCalculationData'
7
7
  title?: string
8
8
  description?: string
9
+ hideShortRef?: boolean
9
10
  data: () => Data
10
11
  inputs: Array<{
11
12
  key: 'change'
@@ -26,6 +27,7 @@ export interface DataCommand {
26
27
  id: string
27
28
  title?: string
28
29
  description?: string
30
+ hideShortRef?: boolean
29
31
  inputs: Array<{
30
32
  key: string
31
33
  source: (() => DataCalculationData | DataCommand) | any
@@ -4,6 +4,7 @@ export interface DataCalculation {
4
4
  id: string
5
5
  title?: string
6
6
  description?: string
7
+ hideShortRef?: boolean
7
8
  // Auto: Run the calculation when inputs change and allow triggers. Careful with circular dependencies!
8
9
  // Manual: Only run the calculation when manually triggered by System Action PROPERTY_BANK_COMMAND
9
10
  triggerMode?: 'auto' | 'manual'
package/types/data.ts CHANGED
@@ -17,8 +17,10 @@ interface DataDef {
17
17
  export type Data<T = any> = DataDef & {
18
18
  __typename: 'Data'
19
19
  id: string
20
+ alias?: string
20
21
  title: string
21
22
  description?: string
23
+ hideShortRef?: boolean
22
24
  metadata?: {
23
25
  linked?: Array<SubspaceID>
24
26
  linkedFrom?: SubspaceID
package/types/subspace.ts CHANGED
@@ -9,6 +9,7 @@ export type Subspace = {
9
9
  id: string
10
10
  title: string
11
11
  description?: string
12
+ hideShortRef?: boolean
12
13
  // Unexpanded information in Editor
13
14
  unexpanded?: {
14
15
  data?: boolean