create-spatius-app 0.1.2 → 0.1.3-beta.2

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 (53) hide show
  1. package/README.md +18 -6
  2. package/dist/cli.js +647 -144
  3. package/dist/templates.js +529 -66
  4. package/package.json +4 -4
  5. package/schemas/result-v3.schema.json +6 -2
  6. package/schemas/result-v4.schema.json +170 -0
  7. package/templates/cloudflare-livekit/AGENTS.md +2 -0
  8. package/templates/cloudflare-livekit/agent/README.md +13 -0
  9. package/templates/cloudflare-livekit/agent/env.example +3 -0
  10. package/templates/cloudflare-livekit/agent/pyproject.toml +1 -1
  11. package/templates/cloudflare-livekit/agent/src/agent.py +7 -4
  12. package/templates/cloudflare-livekit/agent/tests/test_agent_startup.py +49 -0
  13. package/templates/cloudflare-livekit/agent/uv.lock +14 -14
  14. package/templates/cloudflare-livekit/gitignore +1 -0
  15. package/templates/cloudflare-livekit/package-lock.json +247 -158
  16. package/templates/cloudflare-livekit/package.json +9 -8
  17. package/templates/cloudflare-livekit/pnpm-lock.yaml +200 -177
  18. package/templates/cloudflare-livekit/tests/dev-events.test.mjs +23 -0
  19. package/templates/cloudflare-livekit/tests/dev-fixtures.mjs +14 -5
  20. package/templates/cloudflare-livekit/tests/dev-supervision.test.mjs +17 -14
  21. package/templates/cloudflare-livekit/tsconfig.web.json +1 -0
  22. package/templates/cloudflare-livekit/tsconfig.worker.json +1 -0
  23. package/templates/cloudflare-livekit/web/api.ts +12 -0
  24. package/templates/cloudflare-livekit/web/components/agents-ui/agent-chat-transcript.tsx +6 -90
  25. package/templates/cloudflare-livekit/web/components/transcript-view.tsx +90 -0
  26. package/templates/cloudflare-livekit/web/session-attempt.ts +23 -2
  27. package/templates/cloudflare-livekit/worker/capability.test.ts +31 -0
  28. package/templates/cloudflare-livekit/worker/capability.ts +72 -0
  29. package/templates/cloudflare-livekit/worker/index.test.ts +2 -2
  30. package/templates/cloudflare-livekit/worker/index.ts +15 -3
  31. package/templates/cloudflare-livekit/worker/session.ts +34 -0
  32. package/templates/layers/agora/AGENTS.md +13 -0
  33. package/templates/layers/agora/README.md +25 -0
  34. package/templates/layers/agora/dev.vars.example +9 -0
  35. package/templates/layers/agora/package-lock.json +6988 -0
  36. package/templates/layers/agora/package.json +60 -0
  37. package/templates/layers/agora/pnpm-lock.yaml +4648 -0
  38. package/templates/layers/agora/scripts/check-worker.mjs +98 -0
  39. package/templates/layers/agora/tsconfig.worker.json +23 -0
  40. package/templates/layers/agora/vitest.config.ts +4 -0
  41. package/templates/layers/agora/web/App.tsx +174 -0
  42. package/templates/layers/agora/web/agora-session.test.ts +70 -0
  43. package/templates/layers/agora/web/agora-session.ts +267 -0
  44. package/templates/layers/agora/worker/agora.test.ts +62 -0
  45. package/templates/layers/agora/worker/agora.ts +156 -0
  46. package/templates/layers/agora/worker/index.test.ts +66 -0
  47. package/templates/layers/agora/worker/index.ts +54 -0
  48. package/templates/layers/agora/wrangler.jsonc +24 -0
  49. package/templates/layers/catalog/DEPLOYMENT.md +3 -0
  50. package/templates/layers/catalog/spatius.config.json +1 -0
  51. package/dist/cli.js.map +0 -1
  52. package/dist/templates.js.map +0 -1
  53. package/templates/cloudflare-livekit/worker-configuration.d.ts +0 -17184
package/README.md CHANGED
@@ -1,18 +1,19 @@
1
1
  # create-spatius-app
2
2
 
3
- Create a voice-avatar app with Spatius, React, Cloudflare Workers, and LiveKit.
3
+ Create a voice-avatar app with Spatius and React. Choose LiveKit or Agora Conversational AI. Both templates run the frontend and API on Cloudflare Workers.
4
4
 
5
5
  ## Quick start
6
6
 
7
- Requires Node.js 22.12+ and Python 3.11–3.14. You’ll also need a LiveKit Cloud
8
- project and a [Spatius Studio](https://app.spatius.ai) account.
7
+ Requires Node.js 22.12+ and a [Spatius Studio](https://app.spatius.ai) account.
8
+ The LiveKit template also needs Python 3.11–3.14 and a LiveKit Cloud project.
9
+ The Agora template needs an Agora account and no Python tooling.
9
10
 
10
11
  ```sh
11
12
  npx create-spatius-app my-app
12
13
  ```
13
14
 
14
- Follow the prompts to choose package managers, install dependencies, and
15
- configure your LiveKit and Spatius credentials.
15
+ Choose LiveKit or Agora Conversational AI. Follow the remaining prompts to choose package managers, install dependencies, and
16
+ configure your provider and Spatius credentials.
16
17
  If LiveKit CLI is missing, setup offers to install it using Homebrew on macOS,
17
18
  WinGet on Windows, or LiveKit's Linux installer. You can also enter credentials
18
19
  manually or finish setup later.
@@ -25,7 +26,7 @@ pnpm dev
25
26
  # Or: npm run dev / bun run dev
26
27
  ```
27
28
 
28
- This starts the frontend, Cloudflare Worker, and Python agent together.
29
+ This starts the frontend, API, and, for LiveKit, the Python agent together. Generated DEPLOYMENT.md covers deployment to Cloudflare Workers and, for LiveKit, LiveKit Cloud.
29
30
  Open the URL printed in your terminal and start a conversation.
30
31
 
31
32
  ## Use with a coding agent
@@ -46,6 +47,17 @@ npx create-spatius-app setup . --interactive
46
47
 
47
48
  This configures local development only; it does not deploy your app.
48
49
 
50
+ ## Choose a provider
51
+
52
+ ```sh
53
+ npx create-spatius-app my-app --stack cloudflare-livekit
54
+ # Or:
55
+ npx create-spatius-app my-app --stack cloudflare-agora
56
+ ```
57
+
58
+ LiveKit is the default and deploys its Python agent to LiveKit Cloud.
59
+ Agora Conversational AI hosts the agent itself; its template needs no Python.
60
+
49
61
  ## More options
50
62
 
51
63
  ```sh