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.
package/bin/lib/commands/push.ts
CHANGED
|
@@ -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
|
-
//
|
|
59
|
-
if
|
|
60
|
-
|
|
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`, {
|
package/daemon/src/compiler.ts
CHANGED
|
@@ -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 || "
|
|
169
|
+
return { ok: false, error: errors || "Bundle failed" };
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
const js = await result.outputs[0].text();
|