@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 +8 -6
- package/dist/templates/space/full/skill-data.md.tmpl +11 -15
- package/dist/templates/space/full/skill-ui.md.tmpl +23 -18
- package/dist/templates/space/full/space.manifest.json.tmpl +1 -5
- package/dist/templates/space/skill.md.tmpl +24 -10
- package/dist/templates/space/space.manifest.json.tmpl +1 -1
- package/dist/templates/space/vite.config.ts.tmpl +10 -3
- package/package.json +1 -1
- package/templates/space/full/skill-data.md.tmpl +11 -15
- package/templates/space/full/skill-ui.md.tmpl +23 -18
- package/templates/space/full/space.manifest.json.tmpl +1 -5
- package/templates/space/skill.md.tmpl +24 -10
- package/templates/space/space.manifest.json.tmpl +1 -1
- package/templates/space/vite.config.ts.tmpl +10 -3
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, "
|
|
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, "
|
|
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, "
|
|
5498
|
-
writeTemplate(templateDir, "full/skill-ui.md.tmpl", join2(name, "
|
|
5499
|
-
console.log(source_default.blue("Full preset: settings page +
|
|
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.
|
|
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
|
-
|
|
3
|
+
Reference doc for the agent when working with {{.DisplayName}} data.
|
|
11
4
|
|
|
12
|
-
|
|
5
|
+
## Storage model
|
|
13
6
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
- Use
|
|
17
|
-
-
|
|
18
|
-
|
|
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
|
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
6
|
+
scope: any
|
|
8
7
|
---
|
|
9
8
|
|
|
10
|
-
# {{.DisplayName}}
|
|
9
|
+
# {{.DisplayName}}
|
|
11
10
|
|
|
12
|
-
|
|
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
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
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
|
|
@@ -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
|
-
*
|
|
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,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
|
-
|
|
3
|
+
Reference doc for the agent when working with {{.DisplayName}} data.
|
|
11
4
|
|
|
12
|
-
|
|
5
|
+
## Storage model
|
|
13
6
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
- Use
|
|
17
|
-
-
|
|
18
|
-
|
|
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
|
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
6
|
+
scope: any
|
|
8
7
|
---
|
|
9
8
|
|
|
10
|
-
# {{.DisplayName}}
|
|
9
|
+
# {{.DisplayName}}
|
|
11
10
|
|
|
12
|
-
|
|
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
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
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
|
|
@@ -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
|
-
*
|
|
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> {
|