@guuey/create-agentic-app 0.12.1 → 0.13.0

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.
Files changed (31) hide show
  1. package/dist/templates/agentic-app/claude-agent-sdk/guuey.json +1 -2
  2. package/dist/templates/agentic-app/claude-agent-sdk/package.json +3 -3
  3. package/dist/templates/agentic-app/claude-agent-sdk/prompts/system.md +8 -3
  4. package/dist/templates/agentic-app/claude-agent-sdk/scripts/dev.mjs +14 -1
  5. package/dist/templates/agentic-app/claude-agent-sdk/web/package.json +2 -2
  6. package/dist/templates/agentic-app/google-adk/guuey.json +1 -2
  7. package/dist/templates/agentic-app/google-adk/package.json +2 -2
  8. package/dist/templates/agentic-app/google-adk/prompts/system.md +8 -3
  9. package/dist/templates/agentic-app/google-adk/scripts/dev.mjs +14 -1
  10. package/dist/templates/agentic-app/google-adk/web/package.json +2 -2
  11. package/dist/templates/agentic-app/openai-agents-sdk/guuey.json +0 -5
  12. package/dist/templates/agentic-app/openai-agents-sdk/package.json +3 -3
  13. package/dist/templates/agentic-app/openai-agents-sdk/prompts/system.md +8 -3
  14. package/dist/templates/agentic-app/openai-agents-sdk/scripts/dev.mjs +14 -1
  15. package/dist/templates/agentic-app/openai-agents-sdk/web/package.json +2 -2
  16. package/dist/templates/base/claude-agent-sdk/guuey.json +1 -2
  17. package/dist/templates/base/claude-agent-sdk/package.json +3 -3
  18. package/dist/templates/base/claude-agent-sdk/prompts/system.md +8 -3
  19. package/dist/templates/base/claude-agent-sdk/scripts/dev.mjs +14 -1
  20. package/dist/templates/base/claude-agent-sdk/web/package.json +1 -1
  21. package/dist/templates/base/google-adk/guuey.json +1 -2
  22. package/dist/templates/base/google-adk/package.json +2 -2
  23. package/dist/templates/base/google-adk/prompts/system.md +8 -3
  24. package/dist/templates/base/google-adk/scripts/dev.mjs +14 -1
  25. package/dist/templates/base/google-adk/web/package.json +1 -1
  26. package/dist/templates/base/openai-agents-sdk/guuey.json +0 -5
  27. package/dist/templates/base/openai-agents-sdk/package.json +3 -3
  28. package/dist/templates/base/openai-agents-sdk/prompts/system.md +8 -3
  29. package/dist/templates/base/openai-agents-sdk/scripts/dev.mjs +14 -1
  30. package/dist/templates/base/openai-agents-sdk/web/package.json +1 -1
  31. package/package.json +3 -3
@@ -6,8 +6,7 @@
6
6
  "model": "claude-sonnet-5",
7
7
  "systemPrompt": { "file": "prompts/system.md" },
8
8
  "mcpServers": {
9
- "todo": { "kind": "colocated", "source": "./mcps/todo", "devPort": 6782 },
10
- "ggui": { "kind": "external", "url": "https://mcp.ggui.ai", "transport": "http" }
9
+ "todo": { "kind": "colocated", "source": "./mcps/todo", "devPort": 6782 }
11
10
  }
12
11
  },
13
12
  "ggui": { "configFile": "./ggui/ggui.json" }
@@ -12,12 +12,12 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@anthropic-ai/claude-agent-sdk": "^0.3.199",
15
- "@guuey/config": "0.12.1",
16
- "@guuey/worker": "0.12.1"
15
+ "@guuey/config": "0.13.0",
16
+ "@guuey/worker": "0.13.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@ggui-ai/cli": "0.11.0",
20
- "@guuey/cli": "0.12.1",
20
+ "@guuey/cli": "0.13.0",
21
21
  "tsup": "^8.5.0",
22
22
  "tsx": "^4.19.0",
23
23
  "typescript": "^5.8.0"
@@ -1,4 +1,9 @@
1
1
  You are the agentic-app-template assistant. You have a todo tool server —
2
- use it to create, list, toggle, and delete the user's todos. When the ggui
3
- server is available, prefer rendering rich UI for lists and forms over
4
- plain text.
2
+ use it to create, list, toggle, and delete the user's todos.
3
+
4
+ Show, don't tell: when a result has structure — a todo list, a form, a
5
+ confirmation — render it as an interactive surface with the ggui render
6
+ loop by default; keep plain prose for one-line answers with nothing to
7
+ show. After changing todos (create, toggle, delete), render the updated
8
+ list, so every turn ends on a surface that reflects the current state.
9
+ Use only the fields the surface's schema declares.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // pnpm dev — boots the whole local stack. Ctrl-C tears everything down.
3
- import { spawn } from "node:child_process";
3
+ import { spawn, spawnSync } from "node:child_process";
4
4
  import { existsSync } from "node:fs";
5
5
 
6
6
  const procs = [];
@@ -28,6 +28,19 @@ process.on("SIGTERM", () => shutdown("terminated"));
28
28
  if (!existsSync(".env.local"))
29
29
  console.warn("hint: cp .env.example .env.local and set your LLM key");
30
30
 
31
+ // FIRST-BOOT BARRIER (guuey#368): on a fresh scaffold the agent would race
32
+ // tsup's first build — no guuey.worker.js yet ⇒ @guuey/host boots
33
+ // snapshot-only and NEVER reloads into the worker, so the very first
34
+ // `pnpm dev` session silently ran without the worker's behavior. One
35
+ // blocking build before anything boots; the watcher takes over after.
36
+ if (!existsSync("guuey.worker.js")) {
37
+ console.log("[worker] first build (guuey.worker.js missing)…");
38
+ const first = spawnSync("pnpm", ["exec", "tsup"], { stdio: "inherit" });
39
+ if (first.status !== 0) {
40
+ console.error("[worker] first build failed — fix the error above and re-run pnpm dev");
41
+ process.exit(first.status ?? 1);
42
+ }
43
+ }
31
44
  boot("worker", "pnpm", ["exec", "tsup", "--watch"]); // rebuilds guuey.worker.js on change
32
45
  // `guuey dev` auto-spawns every `kind: 'colocated'` mcpServers entry itself
33
46
  // (name→localhost devPort resolution) — the todo MCP is colocated, so it no
@@ -9,8 +9,8 @@
9
9
  "typecheck": "tsc --noEmit"
10
10
  },
11
11
  "dependencies": {
12
- "@guuey/chat": "0.12.1",
13
- "@guuey/mcp-apps-host": "0.12.1",
12
+ "@guuey/chat": "0.13.0",
13
+ "@guuey/mcp-apps-host": "0.13.0",
14
14
  "oidc-client-ts": "^3.1.0",
15
15
  "qrcode": "^1.5.4",
16
16
  "react": "^19.0.0",
@@ -7,8 +7,7 @@
7
7
  "entry": "agent.js",
8
8
  "systemPrompt": { "file": "prompts/system.md" },
9
9
  "mcpServers": {
10
- "todo": { "kind": "colocated", "source": "./mcps/todo", "devPort": 6782 },
11
- "ggui": { "kind": "external", "url": "https://mcp.ggui.ai", "transport": "http" }
10
+ "todo": { "kind": "colocated", "source": "./mcps/todo", "devPort": 6782 }
12
11
  }
13
12
  },
14
13
  "ggui": { "configFile": "./ggui/ggui.json" }
@@ -16,8 +16,8 @@
16
16
  },
17
17
  "devDependencies": {
18
18
  "@ggui-ai/cli": "0.11.0",
19
- "@guuey/cli": "0.12.1",
20
- "@guuey/config": "0.12.1",
19
+ "@guuey/cli": "0.13.0",
20
+ "@guuey/config": "0.13.0",
21
21
  "tsup": "^8.5.0",
22
22
  "tsx": "^4.19.0",
23
23
  "typescript": "^5.8.0"
@@ -1,4 +1,9 @@
1
1
  You are the agentic-app-template assistant. You have a todo tool server —
2
- use it to create, list, toggle, and delete the user's todos. When the ggui
3
- server is available, prefer rendering rich UI for lists and forms over
4
- plain text.
2
+ use it to create, list, toggle, and delete the user's todos.
3
+
4
+ Show, don't tell: when a result has structure — a todo list, a form, a
5
+ confirmation — render it as an interactive surface with the ggui render
6
+ loop by default; keep plain prose for one-line answers with nothing to
7
+ show. After changing todos (create, toggle, delete), render the updated
8
+ list, so every turn ends on a surface that reflects the current state.
9
+ Use only the fields the surface's schema declares.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // pnpm dev — boots the whole local stack. Ctrl-C tears everything down.
3
- import { spawn } from "node:child_process";
3
+ import { spawn, spawnSync } from "node:child_process";
4
4
  import { existsSync } from "node:fs";
5
5
 
6
6
  const procs = [];
@@ -28,6 +28,19 @@ process.on("SIGTERM", () => shutdown("terminated"));
28
28
  if (!existsSync(".env.local"))
29
29
  console.warn("hint: cp .env.example .env.local and set your LLM key");
30
30
 
31
+ // FIRST-BOOT BARRIER (guuey#368): on a fresh scaffold the agent would race
32
+ // tsup's first build — no guuey.worker.js yet ⇒ @guuey/host boots
33
+ // snapshot-only and NEVER reloads into the worker, so the very first
34
+ // `pnpm dev` session silently ran without the worker's behavior. One
35
+ // blocking build before anything boots; the watcher takes over after.
36
+ if (!existsSync("guuey.worker.js")) {
37
+ console.log("[worker] first build (guuey.worker.js missing)…");
38
+ const first = spawnSync("pnpm", ["exec", "tsup"], { stdio: "inherit" });
39
+ if (first.status !== 0) {
40
+ console.error("[worker] first build failed — fix the error above and re-run pnpm dev");
41
+ process.exit(first.status ?? 1);
42
+ }
43
+ }
31
44
  boot("worker", "pnpm", ["exec", "tsup", "--watch"]); // rebuilds guuey.worker.js on change
32
45
  // `guuey dev` auto-spawns every `kind: 'colocated'` mcpServers entry itself
33
46
  // (name→localhost devPort resolution) — the todo MCP is colocated, so it no
@@ -9,8 +9,8 @@
9
9
  "typecheck": "tsc --noEmit"
10
10
  },
11
11
  "dependencies": {
12
- "@guuey/chat": "0.12.1",
13
- "@guuey/mcp-apps-host": "0.12.1",
12
+ "@guuey/chat": "0.13.0",
13
+ "@guuey/mcp-apps-host": "0.13.0",
14
14
  "oidc-client-ts": "^3.1.0",
15
15
  "qrcode": "^1.5.4",
16
16
  "react": "^19.0.0",
@@ -13,11 +13,6 @@
13
13
  "kind": "colocated",
14
14
  "source": "./mcps/todo",
15
15
  "devPort": 6782
16
- },
17
- "ggui": {
18
- "kind": "external",
19
- "url": "https://mcp.ggui.ai",
20
- "transport": "http"
21
16
  }
22
17
  }
23
18
  },
@@ -12,12 +12,12 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@openai/agents": "^0.12.0",
15
- "@guuey/config": "0.12.1",
16
- "@guuey/worker": "0.12.1"
15
+ "@guuey/config": "0.13.0",
16
+ "@guuey/worker": "0.13.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@ggui-ai/cli": "0.11.0",
20
- "@guuey/cli": "0.12.1",
20
+ "@guuey/cli": "0.13.0",
21
21
  "tsup": "^8.5.0",
22
22
  "tsx": "^4.19.0",
23
23
  "typescript": "^5.8.0"
@@ -1,4 +1,9 @@
1
1
  You are the agentic-app-template assistant. You have a todo tool server —
2
- use it to create, list, toggle, and delete the user's todos. When the ggui
3
- server is available, prefer rendering rich UI for lists and forms over
4
- plain text.
2
+ use it to create, list, toggle, and delete the user's todos.
3
+
4
+ Show, don't tell: when a result has structure — a todo list, a form, a
5
+ confirmation — render it as an interactive surface with the ggui render
6
+ loop by default; keep plain prose for one-line answers with nothing to
7
+ show. After changing todos (create, toggle, delete), render the updated
8
+ list, so every turn ends on a surface that reflects the current state.
9
+ Use only the fields the surface's schema declares.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // pnpm dev — boots the whole local stack. Ctrl-C tears everything down.
3
- import { spawn } from "node:child_process";
3
+ import { spawn, spawnSync } from "node:child_process";
4
4
  import { existsSync } from "node:fs";
5
5
 
6
6
  const procs = [];
@@ -28,6 +28,19 @@ process.on("SIGTERM", () => shutdown("terminated"));
28
28
  if (!existsSync(".env.local"))
29
29
  console.warn("hint: cp .env.example .env.local and set your LLM key");
30
30
 
31
+ // FIRST-BOOT BARRIER (guuey#368): on a fresh scaffold the agent would race
32
+ // tsup's first build — no guuey.worker.js yet ⇒ @guuey/host boots
33
+ // snapshot-only and NEVER reloads into the worker, so the very first
34
+ // `pnpm dev` session silently ran without the worker's behavior. One
35
+ // blocking build before anything boots; the watcher takes over after.
36
+ if (!existsSync("guuey.worker.js")) {
37
+ console.log("[worker] first build (guuey.worker.js missing)…");
38
+ const first = spawnSync("pnpm", ["exec", "tsup"], { stdio: "inherit" });
39
+ if (first.status !== 0) {
40
+ console.error("[worker] first build failed — fix the error above and re-run pnpm dev");
41
+ process.exit(first.status ?? 1);
42
+ }
43
+ }
31
44
  boot("worker", "pnpm", ["exec", "tsup", "--watch"]); // rebuilds guuey.worker.js on change
32
45
  // `guuey dev` auto-spawns every `kind: 'colocated'` mcpServers entry itself
33
46
  // (name→localhost devPort resolution) — the todo MCP is colocated, so it no
@@ -9,8 +9,8 @@
9
9
  "typecheck": "tsc --noEmit"
10
10
  },
11
11
  "dependencies": {
12
- "@guuey/chat": "0.12.1",
13
- "@guuey/mcp-apps-host": "0.12.1",
12
+ "@guuey/chat": "0.13.0",
13
+ "@guuey/mcp-apps-host": "0.13.0",
14
14
  "oidc-client-ts": "^3.1.0",
15
15
  "qrcode": "^1.5.4",
16
16
  "react": "^19.0.0",
@@ -6,8 +6,7 @@
6
6
  "model": "claude-sonnet-5",
7
7
  "systemPrompt": { "file": "prompts/system.md" },
8
8
  "mcpServers": {
9
- "todo": { "kind": "colocated", "source": "./mcps/todo", "devPort": 6782 },
10
- "ggui": { "kind": "external", "url": "https://mcp.ggui.ai", "transport": "http" }
9
+ "todo": { "kind": "colocated", "source": "./mcps/todo", "devPort": 6782 }
11
10
  }
12
11
  },
13
12
  "ggui": { "configFile": "./ggui/ggui.json" }
@@ -12,12 +12,12 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@anthropic-ai/claude-agent-sdk": "^0.3.199",
15
- "@guuey/config": "0.12.1",
16
- "@guuey/worker": "0.12.1"
15
+ "@guuey/config": "0.13.0",
16
+ "@guuey/worker": "0.13.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@ggui-ai/cli": "0.11.0",
20
- "@guuey/cli": "0.12.1",
20
+ "@guuey/cli": "0.13.0",
21
21
  "tsup": "^8.5.0",
22
22
  "tsx": "^4.19.0",
23
23
  "typescript": "^5.8.0"
@@ -1,4 +1,9 @@
1
1
  You are the agentic-app-template assistant. You have a todo tool server —
2
- use it to create, list, toggle, and delete the user's todos. When the ggui
3
- server is available, prefer rendering rich UI for lists and forms over
4
- plain text.
2
+ use it to create, list, toggle, and delete the user's todos.
3
+
4
+ Show, don't tell: when a result has structure — a todo list, a form, a
5
+ confirmation — render it as an interactive surface with the ggui render
6
+ loop by default; keep plain prose for one-line answers with nothing to
7
+ show. After changing todos (create, toggle, delete), render the updated
8
+ list, so every turn ends on a surface that reflects the current state.
9
+ Use only the fields the surface's schema declares.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // pnpm dev — boots the whole local stack. Ctrl-C tears everything down.
3
- import { spawn } from "node:child_process";
3
+ import { spawn, spawnSync } from "node:child_process";
4
4
  import { existsSync } from "node:fs";
5
5
 
6
6
  const procs = [];
@@ -28,6 +28,19 @@ process.on("SIGTERM", () => shutdown("terminated"));
28
28
  if (!existsSync(".env.local"))
29
29
  console.warn("hint: cp .env.example .env.local and set your LLM key");
30
30
 
31
+ // FIRST-BOOT BARRIER (guuey#368): on a fresh scaffold the agent would race
32
+ // tsup's first build — no guuey.worker.js yet ⇒ @guuey/host boots
33
+ // snapshot-only and NEVER reloads into the worker, so the very first
34
+ // `pnpm dev` session silently ran without the worker's behavior. One
35
+ // blocking build before anything boots; the watcher takes over after.
36
+ if (!existsSync("guuey.worker.js")) {
37
+ console.log("[worker] first build (guuey.worker.js missing)…");
38
+ const first = spawnSync("pnpm", ["exec", "tsup"], { stdio: "inherit" });
39
+ if (first.status !== 0) {
40
+ console.error("[worker] first build failed — fix the error above and re-run pnpm dev");
41
+ process.exit(first.status ?? 1);
42
+ }
43
+ }
31
44
  boot("worker", "pnpm", ["exec", "tsup", "--watch"]); // rebuilds guuey.worker.js on change
32
45
  // `guuey dev` auto-spawns every `kind: 'colocated'` mcpServers entry itself
33
46
  // (name→localhost devPort resolution) — the todo MCP is colocated, so it no
@@ -9,7 +9,7 @@
9
9
  "typecheck": "tsc --noEmit"
10
10
  },
11
11
  "dependencies": {
12
- "@guuey/chat": "0.12.1",
12
+ "@guuey/chat": "0.13.0",
13
13
  "oidc-client-ts": "^3.1.0",
14
14
  "qrcode": "^1.5.4",
15
15
  "react": "^19.0.0",
@@ -7,8 +7,7 @@
7
7
  "entry": "agent.js",
8
8
  "systemPrompt": { "file": "prompts/system.md" },
9
9
  "mcpServers": {
10
- "todo": { "kind": "colocated", "source": "./mcps/todo", "devPort": 6782 },
11
- "ggui": { "kind": "external", "url": "https://mcp.ggui.ai", "transport": "http" }
10
+ "todo": { "kind": "colocated", "source": "./mcps/todo", "devPort": 6782 }
12
11
  }
13
12
  },
14
13
  "ggui": { "configFile": "./ggui/ggui.json" }
@@ -16,8 +16,8 @@
16
16
  },
17
17
  "devDependencies": {
18
18
  "@ggui-ai/cli": "0.11.0",
19
- "@guuey/cli": "0.12.1",
20
- "@guuey/config": "0.12.1",
19
+ "@guuey/cli": "0.13.0",
20
+ "@guuey/config": "0.13.0",
21
21
  "tsup": "^8.5.0",
22
22
  "tsx": "^4.19.0",
23
23
  "typescript": "^5.8.0"
@@ -1,4 +1,9 @@
1
1
  You are the agentic-app-template assistant. You have a todo tool server —
2
- use it to create, list, toggle, and delete the user's todos. When the ggui
3
- server is available, prefer rendering rich UI for lists and forms over
4
- plain text.
2
+ use it to create, list, toggle, and delete the user's todos.
3
+
4
+ Show, don't tell: when a result has structure — a todo list, a form, a
5
+ confirmation — render it as an interactive surface with the ggui render
6
+ loop by default; keep plain prose for one-line answers with nothing to
7
+ show. After changing todos (create, toggle, delete), render the updated
8
+ list, so every turn ends on a surface that reflects the current state.
9
+ Use only the fields the surface's schema declares.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // pnpm dev — boots the whole local stack. Ctrl-C tears everything down.
3
- import { spawn } from "node:child_process";
3
+ import { spawn, spawnSync } from "node:child_process";
4
4
  import { existsSync } from "node:fs";
5
5
 
6
6
  const procs = [];
@@ -28,6 +28,19 @@ process.on("SIGTERM", () => shutdown("terminated"));
28
28
  if (!existsSync(".env.local"))
29
29
  console.warn("hint: cp .env.example .env.local and set your LLM key");
30
30
 
31
+ // FIRST-BOOT BARRIER (guuey#368): on a fresh scaffold the agent would race
32
+ // tsup's first build — no guuey.worker.js yet ⇒ @guuey/host boots
33
+ // snapshot-only and NEVER reloads into the worker, so the very first
34
+ // `pnpm dev` session silently ran without the worker's behavior. One
35
+ // blocking build before anything boots; the watcher takes over after.
36
+ if (!existsSync("guuey.worker.js")) {
37
+ console.log("[worker] first build (guuey.worker.js missing)…");
38
+ const first = spawnSync("pnpm", ["exec", "tsup"], { stdio: "inherit" });
39
+ if (first.status !== 0) {
40
+ console.error("[worker] first build failed — fix the error above and re-run pnpm dev");
41
+ process.exit(first.status ?? 1);
42
+ }
43
+ }
31
44
  boot("worker", "pnpm", ["exec", "tsup", "--watch"]); // rebuilds guuey.worker.js on change
32
45
  // `guuey dev` auto-spawns every `kind: 'colocated'` mcpServers entry itself
33
46
  // (name→localhost devPort resolution) — the todo MCP is colocated, so it no
@@ -9,7 +9,7 @@
9
9
  "typecheck": "tsc --noEmit"
10
10
  },
11
11
  "dependencies": {
12
- "@guuey/chat": "0.12.1",
12
+ "@guuey/chat": "0.13.0",
13
13
  "oidc-client-ts": "^3.1.0",
14
14
  "qrcode": "^1.5.4",
15
15
  "react": "^19.0.0",
@@ -13,11 +13,6 @@
13
13
  "kind": "colocated",
14
14
  "source": "./mcps/todo",
15
15
  "devPort": 6782
16
- },
17
- "ggui": {
18
- "kind": "external",
19
- "url": "https://mcp.ggui.ai",
20
- "transport": "http"
21
16
  }
22
17
  }
23
18
  },
@@ -12,12 +12,12 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@openai/agents": "^0.12.0",
15
- "@guuey/config": "0.12.1",
16
- "@guuey/worker": "0.12.1"
15
+ "@guuey/config": "0.13.0",
16
+ "@guuey/worker": "0.13.0"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@ggui-ai/cli": "0.11.0",
20
- "@guuey/cli": "0.12.1",
20
+ "@guuey/cli": "0.13.0",
21
21
  "tsup": "^8.5.0",
22
22
  "tsx": "^4.19.0",
23
23
  "typescript": "^5.8.0"
@@ -1,4 +1,9 @@
1
1
  You are the agentic-app-template assistant. You have a todo tool server —
2
- use it to create, list, toggle, and delete the user's todos. When the ggui
3
- server is available, prefer rendering rich UI for lists and forms over
4
- plain text.
2
+ use it to create, list, toggle, and delete the user's todos.
3
+
4
+ Show, don't tell: when a result has structure — a todo list, a form, a
5
+ confirmation — render it as an interactive surface with the ggui render
6
+ loop by default; keep plain prose for one-line answers with nothing to
7
+ show. After changing todos (create, toggle, delete), render the updated
8
+ list, so every turn ends on a surface that reflects the current state.
9
+ Use only the fields the surface's schema declares.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  // pnpm dev — boots the whole local stack. Ctrl-C tears everything down.
3
- import { spawn } from "node:child_process";
3
+ import { spawn, spawnSync } from "node:child_process";
4
4
  import { existsSync } from "node:fs";
5
5
 
6
6
  const procs = [];
@@ -28,6 +28,19 @@ process.on("SIGTERM", () => shutdown("terminated"));
28
28
  if (!existsSync(".env.local"))
29
29
  console.warn("hint: cp .env.example .env.local and set your LLM key");
30
30
 
31
+ // FIRST-BOOT BARRIER (guuey#368): on a fresh scaffold the agent would race
32
+ // tsup's first build — no guuey.worker.js yet ⇒ @guuey/host boots
33
+ // snapshot-only and NEVER reloads into the worker, so the very first
34
+ // `pnpm dev` session silently ran without the worker's behavior. One
35
+ // blocking build before anything boots; the watcher takes over after.
36
+ if (!existsSync("guuey.worker.js")) {
37
+ console.log("[worker] first build (guuey.worker.js missing)…");
38
+ const first = spawnSync("pnpm", ["exec", "tsup"], { stdio: "inherit" });
39
+ if (first.status !== 0) {
40
+ console.error("[worker] first build failed — fix the error above and re-run pnpm dev");
41
+ process.exit(first.status ?? 1);
42
+ }
43
+ }
31
44
  boot("worker", "pnpm", ["exec", "tsup", "--watch"]); // rebuilds guuey.worker.js on change
32
45
  // `guuey dev` auto-spawns every `kind: 'colocated'` mcpServers entry itself
33
46
  // (name→localhost devPort resolution) — the todo MCP is colocated, so it no
@@ -9,7 +9,7 @@
9
9
  "typecheck": "tsc --noEmit"
10
10
  },
11
11
  "dependencies": {
12
- "@guuey/chat": "0.12.1",
12
+ "@guuey/chat": "0.13.0",
13
13
  "oidc-client-ts": "^3.1.0",
14
14
  "qrcode": "^1.5.4",
15
15
  "react": "^19.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guuey/create-agentic-app",
3
- "version": "0.12.1",
3
+ "version": "0.13.0",
4
4
  "description": "Scaffold a guuey agentic app: code-mode agent + custom MCP + ggui + web, local pnpm dev, one-command guuey deploy.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -25,8 +25,8 @@
25
25
  "tsup": "^8.5.0",
26
26
  "typescript": "^5.8.0",
27
27
  "vitest": "^3.2.4",
28
- "@guuey/config": "0.12.1",
29
- "@guuey/worker": "0.12.1"
28
+ "@guuey/config": "0.13.0",
29
+ "@guuey/worker": "0.13.0"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"