@getjack/jack 0.1.33 → 0.1.35

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 (94) hide show
  1. package/README.md +6 -6
  2. package/package.json +1 -1
  3. package/src/commands/down.ts +39 -7
  4. package/src/commands/link.ts +2 -4
  5. package/src/commands/logs.ts +2 -4
  6. package/src/commands/mcp.ts +12 -10
  7. package/src/commands/secrets.ts +3 -1
  8. package/src/commands/services.ts +4 -2
  9. package/src/commands/sync.ts +5 -6
  10. package/src/lib/auth/client.ts +5 -2
  11. package/src/lib/binding-validator.ts +39 -3
  12. package/src/lib/build-helper.ts +18 -19
  13. package/src/lib/control-plane.ts +1 -0
  14. package/src/lib/crypto.ts +84 -0
  15. package/src/lib/deploy-upload.ts +7 -3
  16. package/src/lib/do-config.ts +110 -0
  17. package/src/lib/do-export-validator.ts +26 -0
  18. package/src/lib/hooks.ts +1 -2
  19. package/src/lib/jsonc-edit.ts +292 -0
  20. package/src/lib/managed-deploy.ts +36 -1
  21. package/src/lib/project-link.ts +37 -0
  22. package/src/lib/project-operations.ts +37 -46
  23. package/src/lib/prompts.ts +2 -2
  24. package/src/lib/resources.ts +4 -5
  25. package/src/lib/schema.ts +8 -12
  26. package/src/lib/services/db-create.ts +2 -2
  27. package/src/lib/services/db-execute.ts +9 -6
  28. package/src/lib/services/db-list.ts +6 -4
  29. package/src/lib/services/endpoint-test.ts +275 -0
  30. package/src/lib/services/project-delete.ts +190 -0
  31. package/src/lib/services/project-environment.ts +457 -0
  32. package/src/lib/services/storage-config.ts +7 -309
  33. package/src/lib/services/storage-create.ts +2 -1
  34. package/src/lib/services/storage-delete.ts +3 -2
  35. package/src/lib/services/storage-info.ts +2 -1
  36. package/src/lib/services/storage-list.ts +6 -3
  37. package/src/lib/services/vectorize-config.ts +7 -264
  38. package/src/lib/services/vectorize-create.ts +2 -1
  39. package/src/lib/services/vectorize-delete.ts +6 -4
  40. package/src/lib/services/vectorize-list.ts +6 -3
  41. package/src/lib/storage/index.ts +21 -23
  42. package/src/lib/telemetry.ts +1 -0
  43. package/src/lib/wrangler-config.ts +43 -312
  44. package/src/lib/zip-packager.ts +28 -0
  45. package/src/mcp/test-utils.ts +31 -0
  46. package/src/mcp/tools/index.ts +271 -0
  47. package/src/templates/index.ts +5 -0
  48. package/src/templates/types.ts +4 -0
  49. package/templates/AI-BINDINGS.md +34 -76
  50. package/templates/CLAUDE.md +22 -1
  51. package/templates/ai-chat/src/index.ts +7 -14
  52. package/templates/ai-chat/src/jack-ai.ts +0 -6
  53. package/templates/chat/.jack.json +45 -0
  54. package/templates/chat/bun.lock +1588 -0
  55. package/templates/chat/components.json +23 -0
  56. package/templates/chat/index.html +12 -0
  57. package/templates/chat/package.json +41 -0
  58. package/templates/chat/src/chat-agent.ts +61 -0
  59. package/templates/chat/src/client/app.tsx +189 -0
  60. package/templates/chat/src/client/chat.tsx +222 -0
  61. package/templates/chat/src/client/components/prompt-kit/chat-container.tsx +47 -0
  62. package/templates/chat/src/client/components/prompt-kit/loader.tsx +33 -0
  63. package/templates/chat/src/client/components/prompt-kit/markdown.tsx +84 -0
  64. package/templates/chat/src/client/components/prompt-kit/message.tsx +54 -0
  65. package/templates/chat/src/client/components/prompt-kit/prompt-suggestion.tsx +20 -0
  66. package/templates/chat/src/client/components/prompt-kit/reasoning.tsx +134 -0
  67. package/templates/chat/src/client/components/prompt-kit/scroll-button.tsx +28 -0
  68. package/templates/chat/src/client/components/ui/button.tsx +38 -0
  69. package/templates/chat/src/client/lib/utils.ts +6 -0
  70. package/templates/chat/src/client/main.tsx +11 -0
  71. package/templates/chat/src/client/styles.css +125 -0
  72. package/templates/chat/src/index.ts +25 -0
  73. package/templates/chat/src/jack-ai.ts +94 -0
  74. package/templates/chat/tsconfig.json +18 -0
  75. package/templates/chat/vite.config.ts +14 -0
  76. package/templates/chat/wrangler.jsonc +18 -0
  77. package/templates/cron/.jack.json +18 -28
  78. package/templates/cron/schema.sql +10 -20
  79. package/templates/cron/src/admin.ts +321 -0
  80. package/templates/cron/src/index.ts +151 -81
  81. package/templates/cron/src/monitor.ts +124 -0
  82. package/templates/nextjs-clerk/app/layout.tsx +2 -0
  83. package/templates/semantic-search/src/index.ts +5 -43
  84. package/templates/semantic-search/src/jack-ai.ts +0 -6
  85. package/templates/telegram-bot/.jack.json +56 -0
  86. package/templates/telegram-bot/bun.lock +41 -0
  87. package/templates/telegram-bot/package.json +16 -0
  88. package/templates/telegram-bot/src/index.ts +236 -0
  89. package/templates/telegram-bot/src/jack-ai.ts +100 -0
  90. package/templates/telegram-bot/tsconfig.json +11 -0
  91. package/templates/telegram-bot/wrangler.jsonc +8 -0
  92. package/templates/cron/src/jobs.ts +0 -139
  93. package/templates/cron/src/webhooks.ts +0 -95
  94. package/templates/semantic-search/src/jack-vectorize.ts +0 -169
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "chat",
3
+ "description": "AI chat with real-time rooms — no database, no WebSocket server, just code",
4
+ "secrets": [],
5
+ "capabilities": ["ai"],
6
+ "intent": {
7
+ "keywords": [
8
+ "chat",
9
+ "realtime",
10
+ "room",
11
+ "websocket",
12
+ "multiplayer",
13
+ "ai chat",
14
+ "agent",
15
+ "durable object",
16
+ "collaborative"
17
+ ],
18
+ "examples": [
19
+ "real-time AI chat",
20
+ "multi-user chatroom",
21
+ "collaborative AI assistant",
22
+ "shareable chat rooms",
23
+ "websocket chat app"
24
+ ]
25
+ },
26
+ "agentContext": {
27
+ "summary": "Real-time AI chat with persistent, shareable rooms. No database or WebSocket infrastructure — just one class that handles persistence, real-time sync, and AI streaming out of the box.",
28
+ "full_text": "## Project Structure\n\n- `src/index.ts` — Worker entry, routes agent requests and serves assets\n- `src/chat-agent.ts` — AIChatAgent subclass with AI streaming logic\n- `src/jack-ai.ts` — Jack AI proxy wrapper (do not modify)\n- `src/client/` — React app with chat UI (prompt-kit components)\n\n## What You Get For Free\n\n- **Real-time sync** — share a link, anyone who opens it joins the same conversation live\n- **Persistence** — close your browser, come back tomorrow, conversation is still there\n- **Automatic scaling** — 1 room or 100,000 rooms, same code, no config\n- **Zero infrastructure** — no database, no WebSocket server, no pub/sub, no load balancer\n\n## AI Integration\n\nUses AI SDK `streamText` with workers-ai-provider and `extractReasoningMiddleware` for chain-of-thought models.\n\n### Changing Models\n\nEdit the model in `src/chat-agent.ts`:\n```typescript\n// Fast general-purpose\nmodel: provider('@cf/meta/llama-3.3-70b-instruct-fp8-fast')\n\n// Reasoning (shows thinking process)\nmodel: provider('@cf/deepseek-ai/deepseek-r1-distill-qwen-32b')\n```\n\nThe reasoning middleware extracts `<think>` tags automatically — just swap the model.\n\n### Using OpenAI Instead\n\nInstall `@ai-sdk/openai`, set `OPENAI_API_KEY` secret, then change `chat-agent.ts` to use the OpenAI provider.\n\n## Multi-User Rooms\n\n- Every new chat creates a room with a unique link\n- Share the link — anyone who opens it joins the same conversation in real-time\n- Each room is fully isolated with its own message history\n\n## UI Components (prompt-kit)\n\n- `Message` — structured message layout with avatars\n- `Markdown` — GFM rendering with styled code blocks\n- `Reasoning` — collapsible chain-of-thought display\n- `ChatContainer` — smart auto-scroll\n- `PromptSuggestion` — clickable suggestion chips\n- `ScrollButton` — floating scroll-to-bottom\n\n## Resources\n\n- [Agents SDK Docs](https://developers.cloudflare.com/agents/)\n- [AI SDK Docs](https://sdk.vercel.ai/docs)\n- [Workers AI Models](https://developers.cloudflare.com/workers-ai/models)\n- [prompt-kit](https://prompt-kit.com)"
29
+ },
30
+ "hooks": {
31
+ "postDeploy": [
32
+ { "action": "clipboard", "text": "{{url}}", "message": "URL copied to clipboard" },
33
+ {
34
+ "action": "box",
35
+ "title": "{{name}}",
36
+ "lines": [
37
+ "{{url}}",
38
+ "",
39
+ "Share the link — anyone who opens it joins your chat in real-time",
40
+ "jack open to start chatting"
41
+ ]
42
+ }
43
+ ]
44
+ }
45
+ }