agent-canvas 0.1.25 → 0.1.27
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.
|
@@ -10,10 +10,10 @@ Use it whenever structured visual communication beats inline chat: plans, review
|
|
|
10
10
|
|
|
11
11
|
### 1. Write JSX
|
|
12
12
|
|
|
13
|
-
Use the **Write** tool to create `.jsx` files in
|
|
13
|
+
Use the **Write** tool to create `.jsx` files in `$TMPDIR/agent-canvas/<session-id>/`:
|
|
14
14
|
|
|
15
15
|
```jsx
|
|
16
|
-
//
|
|
16
|
+
// $TMPDIR/agent-canvas/<session-id>/plan.jsx
|
|
17
17
|
|
|
18
18
|
<Section title="Authentication Redesign">
|
|
19
19
|
A proposal to replace session-based auth with JWT tokens.
|
|
@@ -41,7 +41,7 @@ Components are auto-available — no imports needed. The file can be a JSX fragm
|
|
|
41
41
|
Push the directory to open all canvases in the browser:
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
bunx agent-canvas push
|
|
44
|
+
bunx agent-canvas push $TMPDIR/agent-canvas/<session-id>/ --session <session-id> --label "Implementation Plan"
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
All `*.jsx` files in the directory are pushed as a snapshot. Each file appears as a separate tab. **Always show the `browserUrl` from the output to the user.**
|
|
@@ -82,7 +82,7 @@ Returns immediately — prints feedback if available, otherwise no output.
|
|
|
82
82
|
Use different files for different phases or concerns:
|
|
83
83
|
|
|
84
84
|
```
|
|
85
|
-
|
|
85
|
+
$TMPDIR/agent-canvas/<session-id>/
|
|
86
86
|
discovery.jsx # Discovery interview
|
|
87
87
|
requirements.jsx # Requirements spec
|
|
88
88
|
plan.jsx # Implementation plan
|
|
@@ -92,7 +92,7 @@ Write new files as phases progress, then push the directory. Previous files rema
|
|
|
92
92
|
|
|
93
93
|
## File Location
|
|
94
94
|
|
|
95
|
-
All canvas files go in
|
|
95
|
+
All canvas files go in `$TMPDIR/agent-canvas/<session-id>/`. This is a system temp directory — no `.gitignore` needed.
|
|
96
96
|
|
|
97
97
|
## Components
|
|
98
98
|
|
|
@@ -174,6 +174,7 @@ User wants to make a decision? → DECISION flow
|
|
|
174
174
|
|
|
175
175
|
## Important Rules
|
|
176
176
|
|
|
177
|
+
- **Never `cd`** before running `bunx agent-canvas` commands. The daemon uses the current working directory to resolve project file paths (`<FilePreview>`, file browser). Always run commands from the project root. Since canvas files are in `$TMPDIR`, use absolute paths to reference them — e.g. `bunx agent-canvas push $TMPDIR/agent-canvas/<session-id>/`.
|
|
177
178
|
- **Write** canvas files using the Write tool. Never use bash heredocs.
|
|
178
179
|
- **Edit** canvas files using the Edit tool. Never rewrite entire files.
|
|
179
180
|
- Every `<Item>` and interactive component needs a unique `id`.
|
package/package.json
CHANGED
package/skills/canvas/SKILL.md
CHANGED
|
@@ -16,7 +16,7 @@ disable-model-invocation: true
|
|
|
16
16
|
Your canvas session ID is: `${CLAUDE_SESSION_ID}`
|
|
17
17
|
|
|
18
18
|
Use this value for:
|
|
19
|
-
- File paths:
|
|
19
|
+
- File paths: `$TMPDIR/agent-canvas/${CLAUDE_SESSION_ID}/`
|
|
20
20
|
- CLI flags: `--session ${CLAUDE_SESSION_ID}`
|
|
21
21
|
|
|
22
22
|
## Instructions
|