@construct-space/cli 1.9.0 → 1.9.2

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/index.js CHANGED
@@ -5450,7 +5450,9 @@ async function scaffold(nameArg, options) {
5450
5450
  join2(name, "src", "pages"),
5451
5451
  join2(name, "src", "components"),
5452
5452
  join2(name, "src", "composables"),
5453
- join2(name, "agent", "skills"),
5453
+ join2(name, "scripts"),
5454
+ join2(name, "references"),
5455
+ join2(name, "assets"),
5454
5456
  join2(name, "agent", "hooks"),
5455
5457
  join2(name, "agent", "tools"),
5456
5458
  join2(name, "widgets", "summary")
@@ -5471,7 +5473,7 @@ async function scaffold(nameArg, options) {
5471
5473
  "style.css.tmpl": join2(name, "src", "style.css"),
5472
5474
  "index.vue.tmpl": join2(name, "src", "pages", "index.vue"),
5473
5475
  "config.md.tmpl": join2(name, "agent", "config.md"),
5474
- "skill.md.tmpl": join2(name, "agent", "skills", "default.md"),
5476
+ "skill.md.tmpl": join2(name, "SKILL.md"),
5475
5477
  "safety.json.tmpl": join2(name, "agent", "hooks", "safety.json"),
5476
5478
  "tsconfig.json.tmpl": join2(name, "tsconfig.json"),
5477
5479
  "eslint.config.js.tmpl": join2(name, "eslint.config.js"),
@@ -5494,9 +5496,9 @@ async function scaffold(nameArg, options) {
5494
5496
  }
5495
5497
  if (isFull) {
5496
5498
  writeTemplate(templateDir, "full/settings.vue.tmpl", join2(name, "src", "pages", "settings.vue"), data);
5497
- writeTemplate(templateDir, "full/skill-data.md.tmpl", join2(name, "agent", "skills", "data.md"), data);
5498
- writeTemplate(templateDir, "full/skill-ui.md.tmpl", join2(name, "agent", "skills", "ui.md"), data);
5499
- console.log(source_default.blue("Full preset: settings page + extra skills added"));
5499
+ writeTemplate(templateDir, "full/skill-data.md.tmpl", join2(name, "references", "data.md"), data);
5500
+ writeTemplate(templateDir, "full/skill-ui.md.tmpl", join2(name, "references", "ui.md"), data);
5501
+ console.log(source_default.blue("Full preset: settings page + references/data.md + references/ui.md"));
5500
5502
  }
5501
5503
  if (options?.withTests) {
5502
5504
  mkdirSync(join2(name, "e2e"), { recursive: true });
@@ -11698,7 +11700,7 @@ function graphFork(newSpaceID) {
11698
11700
  // package.json
11699
11701
  var package_default = {
11700
11702
  name: "@construct-space/cli",
11701
- version: "1.9.0",
11703
+ version: "1.9.2",
11702
11704
  description: "Construct CLI \u2014 scaffold, build, develop, and publish spaces",
11703
11705
  type: "module",
11704
11706
  bin: {
@@ -1,18 +1,14 @@
1
- ---
2
- id: {{.ID}}-data
3
- name: {{.DisplayName}} Data Management
4
- description: Skill for managing {{.DisplayName}} data and content
5
- trigger: {{.ID}} data|content|manage
6
- category: space
7
- tools: [read_file, list_dir, glob, grep, write_file]
8
- ---
1
+ # {{.DisplayName}} — data
9
2
 
10
- # {{.DisplayName}} Data Management Skill
3
+ Reference doc for the agent when working with {{.DisplayName}} data.
11
4
 
12
- This skill handles data operations for the {{.DisplayName}} space.
5
+ ## Storage model
13
6
 
14
- ## Instructions
15
- - Help users create, read, update, and delete content
16
- - Validate data before writing
17
- - Use the space actions API when available
18
- - Prefer batch operations for bulk changes
7
+ Describe where {{.DisplayName}} data lives (Graph models, local storage, server API…). Edit this section to match the actual model.
8
+
9
+ ## CRUD conventions
10
+
11
+ - Validate inputs before writing
12
+ - Prefer the space's actions API over raw file or DB writes
13
+ - Batch bulk changes when possible
14
+ - Read existing rows before modifying — changes should be additive when in doubt
@@ -1,18 +1,23 @@
1
- ---
2
- id: {{.ID}}-ui
3
- name: {{.DisplayName}} UI Customization
4
- description: Skill for customizing the {{.DisplayName}} user interface
5
- trigger: {{.ID}} ui|layout|design|style
6
- category: space
7
- tools: [read_file, write_file, glob]
8
- ---
9
-
10
- # {{.DisplayName}} UI Customization Skill
11
-
12
- This skill helps customize the {{.DisplayName}} space interface.
13
-
14
- ## Instructions
15
- - Help users adjust layout and styling
16
- - Use Construct CSS variables (--app-foreground, --app-background, --app-accent, etc.)
17
- - Follow the host design system conventions
18
- - Suggest accessible color combinations
1
+ # {{.DisplayName}} — UI
2
+
3
+ Reference doc for the agent when adjusting {{.DisplayName}}'s UI.
4
+
5
+ ## Design tokens
6
+
7
+ Use Construct CSS variables instead of hardcoded values:
8
+
9
+ - `--app-foreground`, `--app-background`
10
+ - `--app-accent`, `--app-accent-fg`
11
+ - `--app-border`, `--app-muted`
12
+
13
+ ## Layout
14
+
15
+ - Live inside the host shell — avoid full-bleed layouts that conflict with the sidebar/header
16
+ - Use the `@construct-space/ui` primitives (`Card`, `Button`, `Badge`, ) for consistency
17
+ - Prefer flex/grid over absolute positioning
18
+
19
+ ## Accessibility
20
+
21
+ - Maintain 4.5:1 contrast for body text
22
+ - Visible focus rings on every interactive element
23
+ - Don't rely on color alone for state
@@ -39,11 +39,7 @@
39
39
  ],
40
40
  "keywords": ["{{.ID}}"],
41
41
  "agent": "agent/config.md",
42
- "skills": [
43
- "agent/skills/default.md",
44
- "agent/skills/data.md",
45
- "agent/skills/ui.md"
46
- ],
42
+ "skills": ["SKILL.md"],
47
43
  "actions": "src/actions.ts",
48
44
  "widgets": [
49
45
  {
@@ -1,17 +1,31 @@
1
1
  ---
2
- id: {{.ID}}-default
3
- name: {{.DisplayName}} Basics
4
- description: Default skill for {{.DisplayName}} space
5
- trigger: {{.ID}}|help
2
+ name: {{.ID}}
3
+ description: Help the user with tasks inside the {{.DisplayName}} space. Use when the user is working in {{.DisplayName}}, mentions {{.ID}}-related concepts, or asks what this space can do.
4
+ allowed-tools: Read Glob Grep
6
5
  category: space
7
- tools: [read_file, list_dir, glob, grep]
6
+ scope: any
8
7
  ---
9
8
 
10
- # {{.DisplayName}} Space Skill
9
+ # {{.DisplayName}}
11
10
 
12
- This skill provides default behavior for the {{.DisplayName}} space.
11
+ Help the user with tasks inside the {{.DisplayName}} space.
12
+
13
+ ## When to use
14
+
15
+ - The user is inside the {{.DisplayName}} space
16
+ - The user types `{{.ID}}` or asks about {{.DisplayName}}-related work
17
+ - The user invokes a {{.DisplayName}} action
13
18
 
14
19
  ## Instructions
15
- - Assist with {{.DisplayName}}-related tasks
16
- - Follow project conventions
17
- - Read relevant files before making suggestions
20
+
21
+ - Read existing files in the space before suggesting changes
22
+ - Prefer space actions (see `src/actions.ts`) over generic file edits
23
+ - Surface the space's conventions when proposing new code
24
+
25
+ ## Resources
26
+
27
+ The agent loads these on demand:
28
+
29
+ - `references/` — domain-specific docs (data model, UI conventions, …)
30
+ - `scripts/` — supporting executables
31
+ - `assets/` — templates and static resources
@@ -34,7 +34,7 @@
34
34
  ],
35
35
  "keywords": ["{{.ID}}"],
36
36
  "agent": "agent/config.md",
37
- "skills": ["agent/skills/default.md"],
37
+ "skills": ["SKILL.md"],
38
38
  "actions": "src/actions.ts",
39
39
  "widgets": [
40
40
  {
@@ -7,7 +7,16 @@ import { resolve } from 'path'
7
7
  * Host-provided externals — these are supplied by Construct at runtime
8
8
  * via window.__CONSTRUCT__. Do NOT bundle them; they must stay external.
9
9
  *
10
- * Full list lives in: construct-app/frontend/lib/spaceHost.ts
10
+ * Source of truth: construct-app/frontend/lib/spaceHost.ts
11
+ *
12
+ * IMPORTANT — only add a package here AFTER confirming spaceHost.ts
13
+ * actually puts it on window.__CONSTRUCT__. Externalising a package the
14
+ * host doesn't expose silently substitutes `undefined`; you'll see
15
+ * "X is not a function" at runtime. When in doubt, bundle it (omit from
16
+ * this list) — bundle bloat is cheaper than a broken space.
17
+ *
18
+ * Notably NOT externalised:
19
+ * @construct-space/graph — host does not expose this. Bundle it.
11
20
  */
12
21
  const hostExternals = [
13
22
  'vue',
@@ -21,8 +30,6 @@ const hostExternals = [
21
30
  'zod',
22
31
  '@construct-space/ui',
23
32
  '@construct-space/sdk',
24
- '@construct-space/graph',
25
- '@construct/sdk', // legacy alias — keep during cutover
26
33
  ]
27
34
 
28
35
  function makeGlobals(externals: string[]): Record<string, string> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@construct-space/cli",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "Construct CLI — scaffold, build, develop, and publish spaces",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,18 +1,14 @@
1
- ---
2
- id: {{.ID}}-data
3
- name: {{.DisplayName}} Data Management
4
- description: Skill for managing {{.DisplayName}} data and content
5
- trigger: {{.ID}} data|content|manage
6
- category: space
7
- tools: [read_file, list_dir, glob, grep, write_file]
8
- ---
1
+ # {{.DisplayName}} — data
9
2
 
10
- # {{.DisplayName}} Data Management Skill
3
+ Reference doc for the agent when working with {{.DisplayName}} data.
11
4
 
12
- This skill handles data operations for the {{.DisplayName}} space.
5
+ ## Storage model
13
6
 
14
- ## Instructions
15
- - Help users create, read, update, and delete content
16
- - Validate data before writing
17
- - Use the space actions API when available
18
- - Prefer batch operations for bulk changes
7
+ Describe where {{.DisplayName}} data lives (Graph models, local storage, server API…). Edit this section to match the actual model.
8
+
9
+ ## CRUD conventions
10
+
11
+ - Validate inputs before writing
12
+ - Prefer the space's actions API over raw file or DB writes
13
+ - Batch bulk changes when possible
14
+ - Read existing rows before modifying — changes should be additive when in doubt
@@ -1,18 +1,23 @@
1
- ---
2
- id: {{.ID}}-ui
3
- name: {{.DisplayName}} UI Customization
4
- description: Skill for customizing the {{.DisplayName}} user interface
5
- trigger: {{.ID}} ui|layout|design|style
6
- category: space
7
- tools: [read_file, write_file, glob]
8
- ---
9
-
10
- # {{.DisplayName}} UI Customization Skill
11
-
12
- This skill helps customize the {{.DisplayName}} space interface.
13
-
14
- ## Instructions
15
- - Help users adjust layout and styling
16
- - Use Construct CSS variables (--app-foreground, --app-background, --app-accent, etc.)
17
- - Follow the host design system conventions
18
- - Suggest accessible color combinations
1
+ # {{.DisplayName}} — UI
2
+
3
+ Reference doc for the agent when adjusting {{.DisplayName}}'s UI.
4
+
5
+ ## Design tokens
6
+
7
+ Use Construct CSS variables instead of hardcoded values:
8
+
9
+ - `--app-foreground`, `--app-background`
10
+ - `--app-accent`, `--app-accent-fg`
11
+ - `--app-border`, `--app-muted`
12
+
13
+ ## Layout
14
+
15
+ - Live inside the host shell — avoid full-bleed layouts that conflict with the sidebar/header
16
+ - Use the `@construct-space/ui` primitives (`Card`, `Button`, `Badge`, ) for consistency
17
+ - Prefer flex/grid over absolute positioning
18
+
19
+ ## Accessibility
20
+
21
+ - Maintain 4.5:1 contrast for body text
22
+ - Visible focus rings on every interactive element
23
+ - Don't rely on color alone for state
@@ -39,11 +39,7 @@
39
39
  ],
40
40
  "keywords": ["{{.ID}}"],
41
41
  "agent": "agent/config.md",
42
- "skills": [
43
- "agent/skills/default.md",
44
- "agent/skills/data.md",
45
- "agent/skills/ui.md"
46
- ],
42
+ "skills": ["SKILL.md"],
47
43
  "actions": "src/actions.ts",
48
44
  "widgets": [
49
45
  {
@@ -1,17 +1,31 @@
1
1
  ---
2
- id: {{.ID}}-default
3
- name: {{.DisplayName}} Basics
4
- description: Default skill for {{.DisplayName}} space
5
- trigger: {{.ID}}|help
2
+ name: {{.ID}}
3
+ description: Help the user with tasks inside the {{.DisplayName}} space. Use when the user is working in {{.DisplayName}}, mentions {{.ID}}-related concepts, or asks what this space can do.
4
+ allowed-tools: Read Glob Grep
6
5
  category: space
7
- tools: [read_file, list_dir, glob, grep]
6
+ scope: any
8
7
  ---
9
8
 
10
- # {{.DisplayName}} Space Skill
9
+ # {{.DisplayName}}
11
10
 
12
- This skill provides default behavior for the {{.DisplayName}} space.
11
+ Help the user with tasks inside the {{.DisplayName}} space.
12
+
13
+ ## When to use
14
+
15
+ - The user is inside the {{.DisplayName}} space
16
+ - The user types `{{.ID}}` or asks about {{.DisplayName}}-related work
17
+ - The user invokes a {{.DisplayName}} action
13
18
 
14
19
  ## Instructions
15
- - Assist with {{.DisplayName}}-related tasks
16
- - Follow project conventions
17
- - Read relevant files before making suggestions
20
+
21
+ - Read existing files in the space before suggesting changes
22
+ - Prefer space actions (see `src/actions.ts`) over generic file edits
23
+ - Surface the space's conventions when proposing new code
24
+
25
+ ## Resources
26
+
27
+ The agent loads these on demand:
28
+
29
+ - `references/` — domain-specific docs (data model, UI conventions, …)
30
+ - `scripts/` — supporting executables
31
+ - `assets/` — templates and static resources
@@ -34,7 +34,7 @@
34
34
  ],
35
35
  "keywords": ["{{.ID}}"],
36
36
  "agent": "agent/config.md",
37
- "skills": ["agent/skills/default.md"],
37
+ "skills": ["SKILL.md"],
38
38
  "actions": "src/actions.ts",
39
39
  "widgets": [
40
40
  {
@@ -7,7 +7,16 @@ import { resolve } from 'path'
7
7
  * Host-provided externals — these are supplied by Construct at runtime
8
8
  * via window.__CONSTRUCT__. Do NOT bundle them; they must stay external.
9
9
  *
10
- * Full list lives in: construct-app/frontend/lib/spaceHost.ts
10
+ * Source of truth: construct-app/frontend/lib/spaceHost.ts
11
+ *
12
+ * IMPORTANT — only add a package here AFTER confirming spaceHost.ts
13
+ * actually puts it on window.__CONSTRUCT__. Externalising a package the
14
+ * host doesn't expose silently substitutes `undefined`; you'll see
15
+ * "X is not a function" at runtime. When in doubt, bundle it (omit from
16
+ * this list) — bundle bloat is cheaper than a broken space.
17
+ *
18
+ * Notably NOT externalised:
19
+ * @construct-space/graph — host does not expose this. Bundle it.
11
20
  */
12
21
  const hostExternals = [
13
22
  'vue',
@@ -21,8 +30,6 @@ const hostExternals = [
21
30
  'zod',
22
31
  '@construct-space/ui',
23
32
  '@construct-space/sdk',
24
- '@construct-space/graph',
25
- '@construct/sdk', // legacy alias — keep during cutover
26
33
  ]
27
34
 
28
35
  function makeGlobals(externals: string[]): Record<string, string> {