@guuey/create-agentic-app 0.9.0 → 0.10.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.
- package/README.md +22 -2
- package/dist/{chunk-JD4RAKEG.js → chunk-5V2IFXD4.js} +96 -21
- package/dist/cli.cjs +145 -17
- package/dist/cli.js +60 -5
- package/dist/index.cjs +97 -21
- package/dist/index.d.cts +33 -2
- package/dist/index.d.ts +33 -2
- package/dist/index.js +3 -1
- package/dist/templates/{openai-agents-sdk → agentic-app/claude-agent-sdk}/AGENTS.md +2 -2
- package/dist/templates/{openai-agents-sdk → agentic-app/claude-agent-sdk}/README.md +17 -3
- package/dist/templates/agentic-app/claude-agent-sdk/gitignore +5 -0
- package/dist/templates/agentic-app/claude-agent-sdk/guuey.app.json +28 -0
- package/dist/templates/agentic-app/claude-agent-sdk/guuey.app.schema.json +119 -0
- package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/package.json +6 -3
- package/dist/templates/agentic-app/claude-agent-sdk/scripts/bootstrap.mjs +376 -0
- package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/web/index.html +0 -1
- package/dist/templates/agentic-app/claude-agent-sdk/web/package.json +28 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/components/AgentChat.tsx +53 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/components/AppShell.tsx +65 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/components/BootstrapGate.tsx +30 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/components/Shell.tsx +50 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/config.ts +148 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/lib/identity.ts +67 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/lib/oidc.ts +79 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/lib/status.ts +45 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/lib/widget.ts +96 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/main.tsx +52 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/pages/AgentCanvas.tsx +14 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/pages/Dashboard.tsx +36 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/pages/Home.tsx +133 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/pages/Landing.tsx +50 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/pages/Login.tsx +81 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/pages/Reports.tsx +9 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/pages/TalkOnMobile.tsx +50 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/routes.ts +7 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/styles-app.css +132 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/styles.css +248 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/src/vite-env.d.ts +1 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/tsconfig.json +18 -0
- package/dist/templates/agentic-app/claude-agent-sdk/web/vite.config.ts +46 -0
- package/dist/templates/{google-adk → agentic-app/google-adk}/AGENTS.md +2 -2
- package/dist/templates/agentic-app/google-adk/gitignore +5 -0
- package/dist/templates/agentic-app/google-adk/guuey.app.json +28 -0
- package/dist/templates/agentic-app/google-adk/guuey.app.schema.json +119 -0
- package/dist/templates/{google-adk → agentic-app/google-adk}/package.json +6 -3
- package/dist/templates/agentic-app/google-adk/scripts/bootstrap.mjs +376 -0
- package/dist/templates/{google-adk → agentic-app/google-adk}/web/index.html +0 -1
- package/dist/templates/agentic-app/google-adk/web/package.json +28 -0
- package/dist/templates/agentic-app/google-adk/web/src/components/AgentChat.tsx +53 -0
- package/dist/templates/agentic-app/google-adk/web/src/components/AppShell.tsx +65 -0
- package/dist/templates/agentic-app/google-adk/web/src/components/BootstrapGate.tsx +30 -0
- package/dist/templates/agentic-app/google-adk/web/src/components/Shell.tsx +50 -0
- package/dist/templates/agentic-app/google-adk/web/src/config.ts +148 -0
- package/dist/templates/agentic-app/google-adk/web/src/lib/identity.ts +67 -0
- package/dist/templates/agentic-app/google-adk/web/src/lib/oidc.ts +79 -0
- package/dist/templates/agentic-app/google-adk/web/src/lib/status.ts +45 -0
- package/dist/templates/agentic-app/google-adk/web/src/lib/widget.ts +96 -0
- package/dist/templates/agentic-app/google-adk/web/src/main.tsx +52 -0
- package/dist/templates/agentic-app/google-adk/web/src/pages/AgentCanvas.tsx +14 -0
- package/dist/templates/agentic-app/google-adk/web/src/pages/Dashboard.tsx +36 -0
- package/dist/templates/agentic-app/google-adk/web/src/pages/Home.tsx +133 -0
- package/dist/templates/agentic-app/google-adk/web/src/pages/Landing.tsx +50 -0
- package/dist/templates/agentic-app/google-adk/web/src/pages/Login.tsx +81 -0
- package/dist/templates/agentic-app/google-adk/web/src/pages/Reports.tsx +9 -0
- package/dist/templates/agentic-app/google-adk/web/src/pages/TalkOnMobile.tsx +50 -0
- package/dist/templates/agentic-app/google-adk/web/src/routes.ts +7 -0
- package/dist/templates/agentic-app/google-adk/web/src/styles-app.css +132 -0
- package/dist/templates/agentic-app/google-adk/web/src/styles.css +248 -0
- package/dist/templates/agentic-app/google-adk/web/src/vite-env.d.ts +1 -0
- package/dist/templates/agentic-app/google-adk/web/tsconfig.json +18 -0
- package/dist/templates/agentic-app/google-adk/web/vite.config.ts +46 -0
- package/dist/templates/{claude-agent-sdk → agentic-app/openai-agents-sdk}/AGENTS.md +2 -2
- package/dist/templates/{claude-agent-sdk → agentic-app/openai-agents-sdk}/README.md +17 -3
- package/dist/templates/agentic-app/openai-agents-sdk/gitignore +5 -0
- package/dist/templates/agentic-app/openai-agents-sdk/guuey.app.json +28 -0
- package/dist/templates/agentic-app/openai-agents-sdk/guuey.app.schema.json +119 -0
- package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/package.json +6 -3
- package/dist/templates/agentic-app/openai-agents-sdk/scripts/bootstrap.mjs +376 -0
- package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/web/index.html +0 -1
- package/dist/templates/agentic-app/openai-agents-sdk/web/package.json +28 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/components/AgentChat.tsx +53 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/components/AppShell.tsx +65 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/components/BootstrapGate.tsx +30 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/components/Shell.tsx +50 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/config.ts +148 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/lib/identity.ts +67 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/lib/oidc.ts +79 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/lib/status.ts +45 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/lib/widget.ts +96 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/main.tsx +52 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/pages/AgentCanvas.tsx +14 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/pages/Dashboard.tsx +36 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/pages/Home.tsx +133 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/pages/Landing.tsx +50 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/pages/Login.tsx +81 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/pages/Reports.tsx +9 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/pages/TalkOnMobile.tsx +50 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/routes.ts +7 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/styles-app.css +132 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/styles.css +248 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/src/vite-env.d.ts +1 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/tsconfig.json +18 -0
- package/dist/templates/agentic-app/openai-agents-sdk/web/vite.config.ts +46 -0
- package/dist/templates/base/claude-agent-sdk/.env.example +4 -0
- package/dist/templates/base/claude-agent-sdk/.mcp.json +1 -0
- package/dist/templates/base/claude-agent-sdk/AGENTS.md +135 -0
- package/dist/templates/base/claude-agent-sdk/README.md +171 -0
- package/dist/templates/base/claude-agent-sdk/ggui/blueprints/.gitkeep +0 -0
- package/dist/templates/base/claude-agent-sdk/ggui/ggui.json +15 -0
- package/dist/templates/base/claude-agent-sdk/ggui/themes/.gitkeep +0 -0
- package/dist/templates/base/claude-agent-sdk/gitignore +5 -0
- package/dist/templates/base/claude-agent-sdk/guuey.app.json +28 -0
- package/dist/templates/base/claude-agent-sdk/guuey.app.schema.json +119 -0
- package/dist/templates/base/claude-agent-sdk/guuey.json +14 -0
- package/dist/templates/base/claude-agent-sdk/mcps/todo/Dockerfile +46 -0
- package/dist/templates/base/claude-agent-sdk/mcps/todo/package.json +22 -0
- package/dist/templates/base/claude-agent-sdk/mcps/todo/src/server.ts +173 -0
- package/dist/templates/base/claude-agent-sdk/mcps/todo/tsconfig.json +15 -0
- package/dist/templates/base/claude-agent-sdk/mcps/todo/tsup.config.ts +14 -0
- package/dist/templates/base/claude-agent-sdk/package.json +30 -0
- package/dist/templates/base/claude-agent-sdk/pnpm-workspace.yaml +24 -0
- package/dist/templates/base/claude-agent-sdk/prompts/system.md +4 -0
- package/dist/templates/base/claude-agent-sdk/scripts/bootstrap.mjs +376 -0
- package/dist/templates/base/claude-agent-sdk/scripts/dev.mjs +45 -0
- package/dist/templates/base/claude-agent-sdk/src/agent-config.ts +77 -0
- package/dist/templates/base/claude-agent-sdk/src/worker.ts +89 -0
- package/dist/templates/base/claude-agent-sdk/tsconfig.json +15 -0
- package/dist/templates/base/claude-agent-sdk/tsup.config.ts +9 -0
- package/dist/templates/base/claude-agent-sdk/web/index.html +12 -0
- package/dist/templates/{claude-agent-sdk → base/claude-agent-sdk}/web/package.json +9 -8
- package/dist/templates/base/claude-agent-sdk/web/src/components/AgentChat.tsx +53 -0
- package/dist/templates/base/claude-agent-sdk/web/src/components/BootstrapGate.tsx +30 -0
- package/dist/templates/base/claude-agent-sdk/web/src/components/Shell.tsx +50 -0
- package/dist/templates/base/claude-agent-sdk/web/src/config.ts +148 -0
- package/dist/templates/base/claude-agent-sdk/web/src/lib/identity.ts +67 -0
- package/dist/templates/base/claude-agent-sdk/web/src/lib/oidc.ts +79 -0
- package/dist/templates/base/claude-agent-sdk/web/src/lib/status.ts +45 -0
- package/dist/templates/base/claude-agent-sdk/web/src/lib/widget.ts +96 -0
- package/dist/templates/base/claude-agent-sdk/web/src/main.tsx +38 -0
- package/dist/templates/base/claude-agent-sdk/web/src/pages/Chat.tsx +15 -0
- package/dist/templates/base/claude-agent-sdk/web/src/pages/Home.tsx +133 -0
- package/dist/templates/base/claude-agent-sdk/web/src/pages/Landing.tsx +50 -0
- package/dist/templates/base/claude-agent-sdk/web/src/pages/Login.tsx +81 -0
- package/dist/templates/base/claude-agent-sdk/web/src/routes.ts +7 -0
- package/dist/templates/base/claude-agent-sdk/web/src/styles.css +248 -0
- package/dist/templates/base/claude-agent-sdk/web/src/vite-env.d.ts +1 -0
- package/dist/templates/base/claude-agent-sdk/web/tsconfig.json +18 -0
- package/dist/templates/base/claude-agent-sdk/web/vite.config.ts +46 -0
- package/dist/templates/base/google-adk/.env.example +4 -0
- package/dist/templates/base/google-adk/.mcp.json +1 -0
- package/dist/templates/base/google-adk/AGENTS.md +135 -0
- package/dist/templates/base/google-adk/README.md +90 -0
- package/dist/templates/base/google-adk/ggui/blueprints/.gitkeep +0 -0
- package/dist/templates/base/google-adk/ggui/ggui.json +15 -0
- package/dist/templates/base/google-adk/ggui/themes/.gitkeep +0 -0
- package/dist/templates/base/google-adk/gitignore +5 -0
- package/dist/templates/base/google-adk/guuey.app.json +28 -0
- package/dist/templates/base/google-adk/guuey.app.schema.json +119 -0
- package/dist/templates/base/google-adk/guuey.json +15 -0
- package/dist/templates/base/google-adk/mcps/todo/Dockerfile +46 -0
- package/dist/templates/base/google-adk/mcps/todo/package.json +22 -0
- package/dist/templates/base/google-adk/mcps/todo/src/server.ts +173 -0
- package/dist/templates/base/google-adk/mcps/todo/tsconfig.json +15 -0
- package/dist/templates/base/google-adk/mcps/todo/tsup.config.ts +14 -0
- package/dist/templates/base/google-adk/package.json +30 -0
- package/dist/templates/base/google-adk/pnpm-workspace.yaml +34 -0
- package/dist/templates/base/google-adk/prompts/system.md +4 -0
- package/dist/templates/base/google-adk/scripts/bootstrap.mjs +376 -0
- package/dist/templates/base/google-adk/scripts/dev.mjs +45 -0
- package/dist/templates/base/google-adk/src/agent.ts +43 -0
- package/dist/templates/base/google-adk/tsconfig.json +15 -0
- package/dist/templates/base/google-adk/tsup.config.ts +13 -0
- package/dist/templates/base/google-adk/web/index.html +12 -0
- package/dist/templates/{google-adk → base/google-adk}/web/package.json +9 -8
- package/dist/templates/base/google-adk/web/src/components/AgentChat.tsx +53 -0
- package/dist/templates/base/google-adk/web/src/components/BootstrapGate.tsx +30 -0
- package/dist/templates/base/google-adk/web/src/components/Shell.tsx +50 -0
- package/dist/templates/base/google-adk/web/src/config.ts +148 -0
- package/dist/templates/base/google-adk/web/src/lib/identity.ts +67 -0
- package/dist/templates/base/google-adk/web/src/lib/oidc.ts +79 -0
- package/dist/templates/base/google-adk/web/src/lib/status.ts +45 -0
- package/dist/templates/base/google-adk/web/src/lib/widget.ts +96 -0
- package/dist/templates/base/google-adk/web/src/main.tsx +38 -0
- package/dist/templates/base/google-adk/web/src/pages/Chat.tsx +15 -0
- package/dist/templates/base/google-adk/web/src/pages/Home.tsx +133 -0
- package/dist/templates/base/google-adk/web/src/pages/Landing.tsx +50 -0
- package/dist/templates/base/google-adk/web/src/pages/Login.tsx +81 -0
- package/dist/templates/base/google-adk/web/src/routes.ts +7 -0
- package/dist/templates/base/google-adk/web/src/styles.css +248 -0
- package/dist/templates/base/google-adk/web/src/vite-env.d.ts +1 -0
- package/dist/templates/base/google-adk/web/tsconfig.json +18 -0
- package/dist/templates/base/google-adk/web/vite.config.ts +46 -0
- package/dist/templates/base/openai-agents-sdk/.env.example +4 -0
- package/dist/templates/base/openai-agents-sdk/.mcp.json +1 -0
- package/dist/templates/base/openai-agents-sdk/AGENTS.md +135 -0
- package/dist/templates/base/openai-agents-sdk/README.md +171 -0
- package/dist/templates/base/openai-agents-sdk/ggui/blueprints/.gitkeep +0 -0
- package/dist/templates/base/openai-agents-sdk/ggui/ggui.json +15 -0
- package/dist/templates/base/openai-agents-sdk/ggui/themes/.gitkeep +0 -0
- package/dist/templates/base/openai-agents-sdk/gitignore +5 -0
- package/dist/templates/base/openai-agents-sdk/guuey.app.json +28 -0
- package/dist/templates/base/openai-agents-sdk/guuey.app.schema.json +119 -0
- package/dist/templates/base/openai-agents-sdk/guuey.json +27 -0
- package/dist/templates/base/openai-agents-sdk/mcps/todo/Dockerfile +46 -0
- package/dist/templates/base/openai-agents-sdk/mcps/todo/package.json +22 -0
- package/dist/templates/base/openai-agents-sdk/mcps/todo/src/server.ts +173 -0
- package/dist/templates/base/openai-agents-sdk/mcps/todo/tsconfig.json +15 -0
- package/dist/templates/base/openai-agents-sdk/mcps/todo/tsup.config.ts +14 -0
- package/dist/templates/base/openai-agents-sdk/package.json +30 -0
- package/dist/templates/base/openai-agents-sdk/pnpm-workspace.yaml +24 -0
- package/dist/templates/base/openai-agents-sdk/prompts/system.md +4 -0
- package/dist/templates/base/openai-agents-sdk/scripts/bootstrap.mjs +376 -0
- package/dist/templates/base/openai-agents-sdk/scripts/dev.mjs +45 -0
- package/dist/templates/base/openai-agents-sdk/src/agent-config.ts +77 -0
- package/dist/templates/base/openai-agents-sdk/src/worker.ts +75 -0
- package/dist/templates/base/openai-agents-sdk/tsconfig.json +15 -0
- package/dist/templates/base/openai-agents-sdk/tsup.config.ts +16 -0
- package/dist/templates/base/openai-agents-sdk/web/index.html +12 -0
- package/dist/templates/{openai-agents-sdk → base/openai-agents-sdk}/web/package.json +9 -8
- package/dist/templates/base/openai-agents-sdk/web/src/components/AgentChat.tsx +53 -0
- package/dist/templates/base/openai-agents-sdk/web/src/components/BootstrapGate.tsx +30 -0
- package/dist/templates/base/openai-agents-sdk/web/src/components/Shell.tsx +50 -0
- package/dist/templates/base/openai-agents-sdk/web/src/config.ts +148 -0
- package/dist/templates/base/openai-agents-sdk/web/src/lib/identity.ts +67 -0
- package/dist/templates/base/openai-agents-sdk/web/src/lib/oidc.ts +79 -0
- package/dist/templates/base/openai-agents-sdk/web/src/lib/status.ts +45 -0
- package/dist/templates/base/openai-agents-sdk/web/src/lib/widget.ts +96 -0
- package/dist/templates/base/openai-agents-sdk/web/src/main.tsx +38 -0
- package/dist/templates/base/openai-agents-sdk/web/src/pages/Chat.tsx +15 -0
- package/dist/templates/base/openai-agents-sdk/web/src/pages/Home.tsx +133 -0
- package/dist/templates/base/openai-agents-sdk/web/src/pages/Landing.tsx +50 -0
- package/dist/templates/base/openai-agents-sdk/web/src/pages/Login.tsx +81 -0
- package/dist/templates/base/openai-agents-sdk/web/src/routes.ts +7 -0
- package/dist/templates/base/openai-agents-sdk/web/src/styles.css +248 -0
- package/dist/templates/base/openai-agents-sdk/web/src/vite-env.d.ts +1 -0
- package/dist/templates/base/openai-agents-sdk/web/tsconfig.json +18 -0
- package/dist/templates/base/openai-agents-sdk/web/vite.config.ts +46 -0
- package/package.json +6 -3
- package/dist/templates/claude-agent-sdk/web/.env.example +0 -17
- package/dist/templates/claude-agent-sdk/web/sandbox-proxy.ts +0 -239
- package/dist/templates/claude-agent-sdk/web/src/App.tsx +0 -272
- package/dist/templates/claude-agent-sdk/web/src/main.tsx +0 -12
- package/dist/templates/claude-agent-sdk/web/src/useAgentChat.ts +0 -122
- package/dist/templates/claude-agent-sdk/web/src/vite-env.d.ts +0 -27
- package/dist/templates/claude-agent-sdk/web/tsconfig.json +0 -20
- package/dist/templates/claude-agent-sdk/web/vite.config.ts +0 -12
- package/dist/templates/google-adk/web/.env.example +0 -17
- package/dist/templates/google-adk/web/sandbox-proxy.ts +0 -239
- package/dist/templates/google-adk/web/src/App.tsx +0 -272
- package/dist/templates/google-adk/web/src/main.tsx +0 -12
- package/dist/templates/google-adk/web/src/useAgentChat.ts +0 -122
- package/dist/templates/google-adk/web/src/vite-env.d.ts +0 -27
- package/dist/templates/google-adk/web/tsconfig.json +0 -20
- package/dist/templates/google-adk/web/vite.config.ts +0 -12
- package/dist/templates/openai-agents-sdk/web/.env.example +0 -17
- package/dist/templates/openai-agents-sdk/web/sandbox-proxy.ts +0 -239
- package/dist/templates/openai-agents-sdk/web/src/App.tsx +0 -272
- package/dist/templates/openai-agents-sdk/web/src/main.tsx +0 -12
- package/dist/templates/openai-agents-sdk/web/src/useAgentChat.ts +0 -122
- package/dist/templates/openai-agents-sdk/web/src/vite-env.d.ts +0 -27
- package/dist/templates/openai-agents-sdk/web/tsconfig.json +0 -20
- package/dist/templates/openai-agents-sdk/web/vite.config.ts +0 -12
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/.env.example +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/.mcp.json +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/ggui/blueprints/.gitkeep +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/ggui/ggui.json +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/ggui/themes/.gitkeep +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/guuey.json +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/mcps/todo/Dockerfile +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/mcps/todo/package.json +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/mcps/todo/src/server.ts +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/mcps/todo/tsconfig.json +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/mcps/todo/tsup.config.ts +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/pnpm-workspace.yaml +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/prompts/system.md +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/scripts/dev.mjs +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/src/agent-config.ts +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/src/worker.ts +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/tsconfig.json +0 -0
- /package/dist/templates/{claude-agent-sdk → agentic-app/claude-agent-sdk}/tsup.config.ts +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/.env.example +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/.mcp.json +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/README.md +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/ggui/blueprints/.gitkeep +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/ggui/ggui.json +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/ggui/themes/.gitkeep +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/guuey.json +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/mcps/todo/Dockerfile +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/mcps/todo/package.json +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/mcps/todo/src/server.ts +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/mcps/todo/tsconfig.json +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/mcps/todo/tsup.config.ts +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/pnpm-workspace.yaml +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/prompts/system.md +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/scripts/dev.mjs +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/src/agent.ts +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/tsconfig.json +0 -0
- /package/dist/templates/{google-adk → agentic-app/google-adk}/tsup.config.ts +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/.env.example +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/.mcp.json +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/ggui/blueprints/.gitkeep +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/ggui/ggui.json +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/ggui/themes/.gitkeep +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/guuey.json +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/mcps/todo/Dockerfile +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/mcps/todo/package.json +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/mcps/todo/src/server.ts +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/mcps/todo/tsconfig.json +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/mcps/todo/tsup.config.ts +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/pnpm-workspace.yaml +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/prompts/system.md +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/scripts/dev.mjs +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/src/agent-config.ts +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/src/worker.ts +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/tsconfig.json +0 -0
- /package/dist/templates/{openai-agents-sdk → agentic-app/openai-agents-sdk}/tsup.config.ts +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Landing — the widget IS the hero (distribution way #1). On a linked app
|
|
3
|
+
* the real guuey widget launcher mounts in the corner; before linking, an
|
|
4
|
+
* honest placeholder explains what will appear here.
|
|
5
|
+
*/
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
|
+
import { Link } from "react-router-dom";
|
|
8
|
+
import { appConfig, isLinked } from "../config";
|
|
9
|
+
import { CHAT_PATH, HOME_PATH } from "../routes";
|
|
10
|
+
import { mountWidget, type WidgetOutcome } from "../lib/widget";
|
|
11
|
+
|
|
12
|
+
export function Landing() {
|
|
13
|
+
const [widget, setWidget] = useState<WidgetOutcome | "unlinked" | "loading">(
|
|
14
|
+
isLinked ? "loading" : "unlinked",
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (!isLinked) return;
|
|
19
|
+
mountWidget((outcome) => setWidget(outcome));
|
|
20
|
+
}, []);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<main className="page landing">
|
|
24
|
+
<section className="hero">
|
|
25
|
+
<h1>{appConfig.copy.landing.headline}</h1>
|
|
26
|
+
<p>{appConfig.copy.landing.sub}</p>
|
|
27
|
+
<div className="hero-actions">
|
|
28
|
+
<Link to={CHAT_PATH} className="btn btn-accent">
|
|
29
|
+
Open the chat
|
|
30
|
+
</Link>
|
|
31
|
+
<Link to={HOME_PATH} className="btn">
|
|
32
|
+
How this app is wired
|
|
33
|
+
</Link>
|
|
34
|
+
</div>
|
|
35
|
+
{widget === "unlinked" ? (
|
|
36
|
+
<p className="hint">
|
|
37
|
+
The floating agent launcher appears here once the app is bound to a
|
|
38
|
+
deployed guuey agent — <code>pnpm bootstrap -- --link</code>.
|
|
39
|
+
</p>
|
|
40
|
+
) : null}
|
|
41
|
+
{widget === "offline" ? (
|
|
42
|
+
<p className="hint">
|
|
43
|
+
Widget script failed to load from this environment — check the app's
|
|
44
|
+
Allowed Domains include this site.
|
|
45
|
+
</p>
|
|
46
|
+
) : null}
|
|
47
|
+
</section>
|
|
48
|
+
</main>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Login — two doors, one identity rule (never both at once):
|
|
3
|
+
*
|
|
4
|
+
* - "Continue as guest": one click, no account. A per-browser secret is
|
|
5
|
+
* minted locally; the agent remembers this browser across visits.
|
|
6
|
+
* - "Sign in": the BYO-OIDC seam. Active only when `auth.oidc` is
|
|
7
|
+
* configured in guuey.app.json (any spec-compliant IdP — this is where a
|
|
8
|
+
* "Sign in with Google" plugs in). The bound guuey app must be in BYO
|
|
9
|
+
* auth mode for the same issuer.
|
|
10
|
+
*/
|
|
11
|
+
import { useEffect, useRef, useState } from "react";
|
|
12
|
+
import { useNavigate } from "react-router-dom";
|
|
13
|
+
import { appConfig } from "../config";
|
|
14
|
+
import { CHAT_PATH } from "../routes";
|
|
15
|
+
import { continueAsGuest, setIdentityMode } from "../lib/identity";
|
|
16
|
+
import { completeSignIn, isSigninCallback, oidcConfigured, signIn, signOutOidc } from "../lib/oidc";
|
|
17
|
+
|
|
18
|
+
export function Login() {
|
|
19
|
+
const navigate = useNavigate();
|
|
20
|
+
const [error, setError] = useState<string | null>(null);
|
|
21
|
+
const [completing, setCompleting] = useState(isSigninCallback());
|
|
22
|
+
// One-shot: StrictMode double-invokes effects in dev, and the OIDC
|
|
23
|
+
// authorization code is single-use — a second signinCallback() would
|
|
24
|
+
// double-spend it and flash a bogus failure.
|
|
25
|
+
const callbackStarted = useRef(false);
|
|
26
|
+
|
|
27
|
+
// Finish the redirect flow when the IdP sent us back here.
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (!isSigninCallback() || callbackStarted.current) return;
|
|
30
|
+
callbackStarted.current = true;
|
|
31
|
+
completeSignIn()
|
|
32
|
+
.then(() => {
|
|
33
|
+
setIdentityMode("oidc");
|
|
34
|
+
navigate(CHAT_PATH, { replace: true });
|
|
35
|
+
})
|
|
36
|
+
.catch((err: unknown) => {
|
|
37
|
+
setCompleting(false);
|
|
38
|
+
setError(err instanceof Error ? err.message : String(err));
|
|
39
|
+
});
|
|
40
|
+
}, [navigate]);
|
|
41
|
+
|
|
42
|
+
function guest() {
|
|
43
|
+
// One identity mode per surface: an explicit guest choice also drops
|
|
44
|
+
// any cached OIDC session, so a stale bearer can never shadow it.
|
|
45
|
+
void signOutOidc();
|
|
46
|
+
continueAsGuest();
|
|
47
|
+
navigate(CHAT_PATH);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (completing) {
|
|
51
|
+
return (
|
|
52
|
+
<main className="page login">
|
|
53
|
+
<div className="login-card">
|
|
54
|
+
<p>Completing sign-in…</p>
|
|
55
|
+
</div>
|
|
56
|
+
</main>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<main className="page login">
|
|
62
|
+
<div className="login-card">
|
|
63
|
+
<h1>Welcome to {appConfig.brand.name}</h1>
|
|
64
|
+
{oidcConfigured() ? (
|
|
65
|
+
<button type="button" className="btn btn-accent btn-wide" onClick={() => void signIn()}>
|
|
66
|
+
Sign in
|
|
67
|
+
</button>
|
|
68
|
+
) : (
|
|
69
|
+
<button type="button" className="btn btn-wide" disabled title="Configure auth.oidc in guuey.app.json (or via bootstrap) to enable sign-in">
|
|
70
|
+
Sign in — not configured yet
|
|
71
|
+
</button>
|
|
72
|
+
)}
|
|
73
|
+
<button type="button" className="btn btn-wide" onClick={guest}>
|
|
74
|
+
Continue as guest
|
|
75
|
+
</button>
|
|
76
|
+
<p className="hint">{appConfig.copy.login.guestHint}</p>
|
|
77
|
+
{error ? <p className="error">Sign-in failed: {error}</p> : null}
|
|
78
|
+
</div>
|
|
79
|
+
</main>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Route constants shared by the chrome and pages. The agentic-app template
|
|
3
|
+
* overlays this file (its chat lives at /app/agent inside the app shell) —
|
|
4
|
+
* link via these constants, never hard-code the paths in components.
|
|
5
|
+
*/
|
|
6
|
+
export const CHAT_PATH = "/chat";
|
|
7
|
+
export const HOME_PATH = "/home";
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/* agentic-app-template site styles — one accent, light/dark, no framework. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--app-accent: #6c5ce7;
|
|
5
|
+
--bg: #ffffff;
|
|
6
|
+
--bg-soft: #f6f7f9;
|
|
7
|
+
--fg: #16181d;
|
|
8
|
+
--fg-soft: #5b6270;
|
|
9
|
+
--line: #e4e7ec;
|
|
10
|
+
--ok: #1a7f37;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:root[data-mode="dark"] {
|
|
14
|
+
--bg: #101216;
|
|
15
|
+
--bg-soft: #181b21;
|
|
16
|
+
--fg: #e8eaee;
|
|
17
|
+
--fg-soft: #9aa2b1;
|
|
18
|
+
--line: #262a33;
|
|
19
|
+
--ok: #3fb950;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
* {
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
body {
|
|
27
|
+
margin: 0;
|
|
28
|
+
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
29
|
+
background: var(--bg);
|
|
30
|
+
color: var(--fg);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
code,
|
|
34
|
+
pre {
|
|
35
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
36
|
+
font-size: 0.9em;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
pre {
|
|
40
|
+
background: var(--bg-soft);
|
|
41
|
+
border: 1px solid var(--line);
|
|
42
|
+
border-radius: 8px;
|
|
43
|
+
padding: 12px 14px;
|
|
44
|
+
overflow-x: auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
a {
|
|
48
|
+
color: var(--app-accent);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.shell {
|
|
52
|
+
min-height: 100vh;
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.topbar {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: space-between;
|
|
61
|
+
padding: 12px 24px;
|
|
62
|
+
border-bottom: 1px solid var(--line);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.brand {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
gap: 10px;
|
|
69
|
+
font-weight: 700;
|
|
70
|
+
color: var(--fg);
|
|
71
|
+
text-decoration: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.brand-mark {
|
|
75
|
+
display: inline-flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
width: 30px;
|
|
79
|
+
height: 30px;
|
|
80
|
+
border-radius: 8px;
|
|
81
|
+
background: var(--app-accent);
|
|
82
|
+
color: #fff;
|
|
83
|
+
font-size: 13px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.topbar nav {
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
gap: 16px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.topbar nav a {
|
|
93
|
+
color: var(--fg-soft);
|
|
94
|
+
text-decoration: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.topbar nav a.active {
|
|
98
|
+
color: var(--fg);
|
|
99
|
+
font-weight: 600;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.btn {
|
|
103
|
+
display: inline-flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
padding: 8px 16px;
|
|
107
|
+
border-radius: 8px;
|
|
108
|
+
border: 1px solid var(--line);
|
|
109
|
+
background: var(--bg);
|
|
110
|
+
color: var(--fg);
|
|
111
|
+
font-size: 14px;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
text-decoration: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.btn:disabled {
|
|
117
|
+
opacity: 0.5;
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.btn-accent {
|
|
122
|
+
background: var(--app-accent);
|
|
123
|
+
border-color: var(--app-accent);
|
|
124
|
+
color: #fff;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.btn-wide {
|
|
128
|
+
width: 100%;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.page {
|
|
132
|
+
flex: 1;
|
|
133
|
+
width: 100%;
|
|
134
|
+
max-width: 880px;
|
|
135
|
+
margin: 0 auto;
|
|
136
|
+
padding: 32px 24px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.hero {
|
|
140
|
+
text-align: center;
|
|
141
|
+
padding: 64px 0;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.hero h1 {
|
|
145
|
+
font-size: 44px;
|
|
146
|
+
margin: 0 0 12px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.hero p {
|
|
150
|
+
color: var(--fg-soft);
|
|
151
|
+
font-size: 18px;
|
|
152
|
+
margin: 0 0 28px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.hero-actions {
|
|
156
|
+
display: flex;
|
|
157
|
+
gap: 12px;
|
|
158
|
+
justify-content: center;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.login {
|
|
162
|
+
display: flex;
|
|
163
|
+
justify-content: center;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.login-card,
|
|
167
|
+
.gate-card {
|
|
168
|
+
width: 100%;
|
|
169
|
+
max-width: 380px;
|
|
170
|
+
margin-top: 48px;
|
|
171
|
+
padding: 28px;
|
|
172
|
+
border: 1px solid var(--line);
|
|
173
|
+
border-radius: 12px;
|
|
174
|
+
background: var(--bg-soft);
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
gap: 12px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.gate {
|
|
181
|
+
min-height: 100vh;
|
|
182
|
+
display: flex;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
background: var(--bg);
|
|
185
|
+
color: var(--fg);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.gate-card {
|
|
189
|
+
max-width: 520px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.chat-page {
|
|
193
|
+
display: flex;
|
|
194
|
+
max-width: 880px;
|
|
195
|
+
height: calc(100vh - 61px);
|
|
196
|
+
padding: 16px 24px 24px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.chat-fill {
|
|
200
|
+
flex: 1;
|
|
201
|
+
min-height: 0;
|
|
202
|
+
border: 1px solid var(--line);
|
|
203
|
+
border-radius: 12px;
|
|
204
|
+
overflow: hidden;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.card {
|
|
208
|
+
border: 1px solid var(--line);
|
|
209
|
+
border-radius: 12px;
|
|
210
|
+
padding: 20px 24px;
|
|
211
|
+
margin-bottom: 24px;
|
|
212
|
+
background: var(--bg);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.facts {
|
|
216
|
+
display: grid;
|
|
217
|
+
grid-template-columns: 140px 1fr;
|
|
218
|
+
gap: 8px 16px;
|
|
219
|
+
margin: 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.facts dt {
|
|
223
|
+
color: var(--fg-soft);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.facts dd {
|
|
227
|
+
margin: 0;
|
|
228
|
+
overflow-wrap: anywhere;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.ok {
|
|
232
|
+
color: var(--ok);
|
|
233
|
+
font-weight: 600;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.calm {
|
|
237
|
+
color: var(--fg-soft);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.hint {
|
|
241
|
+
color: var(--fg-soft);
|
|
242
|
+
font-size: 14px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.error {
|
|
246
|
+
color: #c0392b;
|
|
247
|
+
font-size: 14px;
|
|
248
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"resolveJsonModule": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"jsx": "react-jsx",
|
|
10
|
+
"strict": true,
|
|
11
|
+
"noUncheckedIndexedAccess": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"skipLibCheck": true,
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"types": ["vite/client", "node"]
|
|
16
|
+
},
|
|
17
|
+
"include": ["src", "vite.config.ts", "../guuey.app.json"]
|
|
18
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join, dirname } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { defineConfig, type Plugin } from "vite";
|
|
5
|
+
import react from "@vitejs/plugin-react";
|
|
6
|
+
|
|
7
|
+
const projectRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Fail-loud production gate (never a half-styled deploy): `pnpm bootstrap`
|
|
11
|
+
* not run yet → the BUILD fails with the exact command. An UNLINKED build
|
|
12
|
+
* is allowed — the pages state the missing binding honestly — but gets a
|
|
13
|
+
* loud warning, since a deployed frontend without a bound guuey app has no
|
|
14
|
+
* live agent to talk to.
|
|
15
|
+
*
|
|
16
|
+
* Dev is NOT gated here — `src/components/BootstrapGate.tsx` renders the
|
|
17
|
+
* "run bootstrap first" screen instead, so `pnpm dev` always starts.
|
|
18
|
+
*/
|
|
19
|
+
function bootstrapGatePlugin(): Plugin {
|
|
20
|
+
return {
|
|
21
|
+
name: "guuey-bootstrap-gate",
|
|
22
|
+
apply: "build",
|
|
23
|
+
buildStart() {
|
|
24
|
+
const raw = readFileSync(join(projectRoot, "guuey.app.json"), "utf8");
|
|
25
|
+
const app = JSON.parse(raw) as { bootstrapped?: boolean; link?: object | null };
|
|
26
|
+
if (app.bootstrapped !== true) {
|
|
27
|
+
throw new Error(
|
|
28
|
+
"guuey.app.json is not bootstrapped — run `pnpm bootstrap` at the project root first.",
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
if (!app.link) {
|
|
32
|
+
console.warn(
|
|
33
|
+
"[guuey-bootstrap-gate] building WITHOUT a bound guuey app — the deployed site will have " +
|
|
34
|
+
"no live agent until you run `pnpm bootstrap -- --link --app-id <appId>` and rebuild.",
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Port is passed via the `dev` script's `--port 6890` flag (see package.json)
|
|
42
|
+
// so it stays visible in one place; `scripts/dev.mjs` boots this on the same
|
|
43
|
+
// port.
|
|
44
|
+
export default defineConfig({
|
|
45
|
+
plugins: [react(), bootstrapGatePlugin()],
|
|
46
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "mcpServers": { "ggui-dev": { "type": "http", "url": "https://mcp.ggui.ai/dev" } } }
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# AGENTS.md — steering for the coding agent working in this repo
|
|
2
|
+
|
|
3
|
+
You (the coding agent) are extending a guuey agentic app. Before you reach
|
|
4
|
+
for a database or a cache, read this file. The single most common mistake
|
|
5
|
+
here is standing up local Redis/SQLite/file-based state "just to get
|
|
6
|
+
something working" — **don't.** Every pod this project deploys to
|
|
7
|
+
(the agent entry's pod — `src/worker.ts`, or `src/agent.ts` in a google-adk scaffold — including every `kind: colocated` `mcps/*`
|
|
8
|
+
server auto-spawned inside it, like this scaffold's `mcps/todo` — and every
|
|
9
|
+
`mcps/*` server deployed with `kind: hosted`) is **ephemeral and horizontally
|
|
10
|
+
replaced**: gVisor-isolated,
|
|
11
|
+
scale-to-zero, ordinary process death on every deploy or idle timeout. A
|
|
12
|
+
local file or an in-process `Map` used as a database is not a shortcut —
|
|
13
|
+
it is silent data loss the first time the pod recycles.
|
|
14
|
+
|
|
15
|
+
Use this table to route persistence decisions. Pick a row, don't invent one.
|
|
16
|
+
|
|
17
|
+
| Need | Use | Why |
|
|
18
|
+
| ------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| Small per-user state on an MCP server (idempotency keys, rate-limit counters, OAuth nonces, prefs, a few KB) | [`@guuey/state`](https://www.npmjs.com/package/@guuey/state) — `withGuueyContext(scopeFromAuthorization(...), fn)` | Zero auth code — guuey owns the identity rails. Durable, per-`(user, mcp)`, survives pod restarts. |
|
|
20
|
+
| Large or relational data (rows, queries, joins, anything you'd reach for Postgres/Redis for) | An external managed serverless DB — Neon, Upstash, Supabase, or Turso — wired in via `guuey mcp secrets set DATABASE_URL=... --server <id>` (hosted MCP) or `guuey env set DATABASE_URL=...` (the agent worker and its colocated MCP children — the pod's declared env/secrets are handed to every colocated child), consumed through the provider's serverless driver | Guuey **integrates, never operates** databases — that's the platform's hosting policy, not a v1 gap. Pick the provider's **`us-east-1`** region: a guuey-hosted MCP → provider hop is then same-region AWS backbone, single-digit-ms — comparable to a cross-AZ hop, and agent turns are already dominated by seconds of LLM inference. |
|
|
21
|
+
| Local Redis, SQLite, or any file written as a database | **Never.** Not for v1, not "temporarily." | Pods are ephemeral and horizontally replaced — a local store vanishes on the next deploy, restart, or scale event, with no warning to you or the user. |
|
|
22
|
+
| Per-user files/blobs from **inside the agent pod** (the agent entry) | [`@guuey/fs`](https://www.npmjs.com/package/@guuey/fs)'s `homeDir()`/`appDir()`/`sessionDir()`, or the raw `$GUUEY_HOME_DIR`/`$GUUEY_APP_DIR` env vars + `node:fs` | Every invoke already gets these three bound directories — `$GUUEY_HOME_DIR` is durable per-user, `$GUUEY_APP_DIR` is read-only shared, cwd is session scratch. No wrapper API required, but the helpers save you the env-var lookups. |
|
|
23
|
+
| Per-user files/blobs from **inside an MCP server** (`mcps/*`) | Not yet available — `@guuey/files` is planned but not shipped. Fall back to the managed-DB row above (e.g. store blobs in the provider's object storage) until it lands. | Don't build against an API that doesn't exist yet. |
|
|
24
|
+
| Conversation / chat history | **Do not re-implement.** The platform already persists it. | Guuey writes thread history to DynamoDB and streams it back over AppSync; agents that keep their own transcript store are duplicating (and diverging from) data the platform already owns. |
|
|
25
|
+
|
|
26
|
+
## `@guuey/state`: the one-line pattern
|
|
27
|
+
|
|
28
|
+
`@guuey/state` only works inside an MCP server whose `guuey.json` entry is
|
|
29
|
+
**federated** — that's the opt-in. A `kind: colocated` entry (like
|
|
30
|
+
`mcps/todo` in this scaffold) or a `kind: hosted` entry is federated
|
|
31
|
+
automatically. If you add a `kind: external` entry (a server you host
|
|
32
|
+
yourself, reached by URL), you must set `federate: true` on it:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"kind": "external",
|
|
37
|
+
"url": "https://your-server.example.com",
|
|
38
|
+
"federate": true
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Without `federate: true` (or `kind: colocated`/`kind: hosted`/a `ggui`
|
|
43
|
+
URL), guuey has no
|
|
44
|
+
identity to hand your server — a plain external entry with static
|
|
45
|
+
`headers` gets **no token and no state.** The token guuey sends on every
|
|
46
|
+
request to a federated server IS the credential; there is no separate
|
|
47
|
+
API key to provision.
|
|
48
|
+
|
|
49
|
+
Inside a federated MCP server, wrap each request in
|
|
50
|
+
`withGuueyContext(scopeFromAuthorization(header), fn)` and use the
|
|
51
|
+
barrel-exported `kv` inside `fn` — that's the whole integration. One
|
|
52
|
+
complete, runnable example — an idempotency-key check on a tool call,
|
|
53
|
+
using the raw Node `http` transport this scaffold's `mcps/todo/src/server.ts`
|
|
54
|
+
already uses:
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { createHash } from "node:crypto";
|
|
58
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
59
|
+
import { withGuueyContext, scopeFromAuthorization, kv, QuotaExceededError } from "@guuey/state";
|
|
60
|
+
|
|
61
|
+
// Inside the per-request handler (see mcps/todo/src/server.ts for the
|
|
62
|
+
// full StreamableHTTPServerTransport wiring this drops into):
|
|
63
|
+
async function handleRequest(req: IncomingMessage, res: ServerResponse): Promise<void> {
|
|
64
|
+
const authHeader = req.headers.authorization;
|
|
65
|
+
if (typeof authHeader !== "string") {
|
|
66
|
+
res.writeHead(401).end();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
await withGuueyContext(scopeFromAuthorization(authHeader), async () => {
|
|
71
|
+
// ... hand off to your MCP transport/tool dispatch here; the
|
|
72
|
+
// AsyncLocalStorage context set above is visible to every `kv.*`
|
|
73
|
+
// call for the lifetime of this request, however deep the call
|
|
74
|
+
// stack goes (tool handlers, helper functions, etc.).
|
|
75
|
+
await handleCreateOrder({ orderPayload: "..." });
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async function handleCreateOrder(input: { orderPayload: string }): Promise<{ duplicate: boolean }> {
|
|
80
|
+
const idempotencyKey = `order:${createHash("sha256").update(input.orderPayload).digest("hex")}`;
|
|
81
|
+
|
|
82
|
+
if (await kv.has(idempotencyKey)) {
|
|
83
|
+
return { duplicate: true };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
try {
|
|
87
|
+
// TTL is required on every `set` — no permanent keys. Pick a window
|
|
88
|
+
// that covers realistic retry storms; 1 hour is a reasonable default
|
|
89
|
+
// for an idempotency key.
|
|
90
|
+
await kv.set(idempotencyKey, true, { ttl: 60 * 60 });
|
|
91
|
+
} catch (err) {
|
|
92
|
+
if (err instanceof QuotaExceededError) {
|
|
93
|
+
// The (user, mcp) scope hit its 1 MiB cap. Surface this to the
|
|
94
|
+
// caller instead of silently dropping the idempotency guard.
|
|
95
|
+
throw new Error("state quota exceeded — cannot verify idempotency");
|
|
96
|
+
}
|
|
97
|
+
throw err;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// ... actually create the order here.
|
|
101
|
+
return { duplicate: false };
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
`scopeFromAuthorization` derives `{ userId, mcpId }` from the inbound
|
|
106
|
+
`Authorization: Bearer <jwt>` header guuey sends on every federated call —
|
|
107
|
+
`userId` from the JWT's `sub`, `mcpId` deterministically from its `aud`
|
|
108
|
+
(your server's federated resource URL). You never assert either id
|
|
109
|
+
yourself; a mismatched or missing token is rejected server-side.
|
|
110
|
+
|
|
111
|
+
## The hard caps (design your data model around these, don't work around them)
|
|
112
|
+
|
|
113
|
+
`@guuey/state` is a KV, not a database — enforced, not a suggestion:
|
|
114
|
+
|
|
115
|
+
| Cap | Value |
|
|
116
|
+
| ------------------ | --------------------------------------------- |
|
|
117
|
+
| Scope size | 1 MiB (per `(user, mcp)`, key bytes included) |
|
|
118
|
+
| Single value | 64 KiB |
|
|
119
|
+
| TTL | required, ≤ 90 days — no permanent keys |
|
|
120
|
+
| `keys()` page size | ≤ 1000 |
|
|
121
|
+
| `mget()` batch | ≤ 100 keys |
|
|
122
|
+
| Counters | safe integers only (`increment`/`decrement`) |
|
|
123
|
+
|
|
124
|
+
If your data model needs more than this — queries, joins, cross-user
|
|
125
|
+
data, anything past a long tail of small per-user facts — that's the
|
|
126
|
+
signal to use the managed-DB row above, not to fight the cap.
|
|
127
|
+
|
|
128
|
+
## Chat history: really, don't
|
|
129
|
+
|
|
130
|
+
If you find yourself writing message transcripts to `@guuey/state`,
|
|
131
|
+
`$GUUEY_HOME_DIR`, or an external DB keyed by conversation, stop — that's
|
|
132
|
+
the platform's job. Guuey persists every thread to DynamoDB and streams
|
|
133
|
+
history back over AppSync subscriptions; the client and Portal already
|
|
134
|
+
read it from there. A parallel, agent-owned history store will drift from
|
|
135
|
+
the platform's copy and confuse users about which one is authoritative.
|