agent-canvas 0.1.22 → 0.1.23

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.
@@ -55,9 +55,10 @@ export async function handlePush(args: string[]) {
55
55
  let result = await response.json() as any;
56
56
 
57
57
  // Bun.build() can corrupt internal state in long-running daemons,
58
- // returning "Unknown Error, TODO". Restart daemon and retry once.
59
- if (!result.ok && typeof result.error === "string" && result.error.includes("Unknown Error")) {
60
- console.error("Daemon bundler crashed, restarting...");
58
+ // causing compilation failures that look like user errors. Restart
59
+ // the daemon and retry once — if the retry also fails, it's a real error.
60
+ if (!result.ok && result.error === "Canvas compilation failed") {
61
+ console.error("Compilation failed, restarting daemon and retrying...");
61
62
  stopDaemon();
62
63
  await startDaemon();
63
64
  const retryResponse = await fetch(`${BASE_URL}/api/session/${sessionId}/plan`, {
@@ -166,7 +166,7 @@ export async function compilePlan(jsx: string, projectRoot?: string): Promise<Co
166
166
  .filter((l) => l.level === "error")
167
167
  .map((l) => l.message)
168
168
  .join("\n");
169
- return { ok: false, error: errors || "Compilation failed" };
169
+ return { ok: false, error: errors || "Bundle failed" };
170
170
  }
171
171
 
172
172
  const js = await result.outputs[0].text();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-canvas",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Interactive visual canvas for Claude Code — rich annotatable documents in the browser",
5
5
  "bin": {
6
6
  "agent-canvas": "bin/agent-canvas.js"