@liquidmetal-ai/raindrop 0.6.4 → 0.8.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 (190) hide show
  1. package/README.md +440 -73
  2. package/bin/cjs-shims.js +7 -0
  3. package/bin/run.js +20 -2
  4. package/bundle/chunk-5GH4FS6C.js +12148 -0
  5. package/bundle/chunk-6B4I2CKP.js +231 -0
  6. package/bundle/chunk-6UE75KX2.js +4481 -0
  7. package/bundle/chunk-AU3EGGJP.js +44 -0
  8. package/bundle/chunk-CDQRD3JA.js +75 -0
  9. package/bundle/chunk-CMCEP64V.js +380 -0
  10. package/bundle/chunk-CW5ZHVPX.js +292 -0
  11. package/bundle/chunk-G6NE675D.js +238720 -0
  12. package/bundle/chunk-GLIYVKQA.js +48 -0
  13. package/bundle/chunk-KXEV6E63.js +133 -0
  14. package/bundle/chunk-MCRKUPJY.js +4515 -0
  15. package/bundle/chunk-MGM2L2T3.js +805 -0
  16. package/bundle/chunk-MVQYQJHI.js +502 -0
  17. package/bundle/chunk-NG7CZTTE.js +147 -0
  18. package/bundle/chunk-PU4RCSXF.js +22452 -0
  19. package/bundle/chunk-VXAZKB3J.js +292 -0
  20. package/bundle/chunk-W2L3MYN6.js +4480 -0
  21. package/bundle/chunk-XYJACVNA.js +231 -0
  22. package/bundle/commands/annotation/get.js +153 -0
  23. package/bundle/commands/annotation/list.js +226 -0
  24. package/bundle/commands/annotation/put.js +177 -0
  25. package/bundle/commands/auth/list.js +75 -0
  26. package/bundle/commands/auth/login.js +1654 -0
  27. package/bundle/commands/auth/logout.js +27 -0
  28. package/bundle/commands/auth/select.js +53 -0
  29. package/bundle/commands/bucket/create-credential.js +173 -0
  30. package/bundle/commands/bucket/delete-credential.js +140 -0
  31. package/bundle/commands/bucket/get-credential.js +151 -0
  32. package/bundle/commands/bucket/list-credentials.js +148 -0
  33. package/bundle/commands/build/branch.js +126 -0
  34. package/bundle/commands/build/checkout.js +198 -0
  35. package/bundle/commands/build/clone.js +153 -0
  36. package/bundle/commands/build/delete.js +227 -0
  37. package/bundle/commands/build/deploy.js +160 -0
  38. package/bundle/commands/build/env/get.js +105 -0
  39. package/bundle/commands/build/env/set.js +115 -0
  40. package/bundle/commands/build/find.js +333 -0
  41. package/bundle/commands/build/generate.js +75 -0
  42. package/bundle/commands/build/init.js +76 -0
  43. package/bundle/commands/build/list.js +11 -0
  44. package/bundle/commands/build/sandbox.js +65 -0
  45. package/bundle/commands/build/start.js +84 -0
  46. package/bundle/commands/build/status.js +1839 -0
  47. package/bundle/commands/build/stop.js +84 -0
  48. package/bundle/commands/build/tools/check.js +32 -0
  49. package/bundle/commands/build/tools/fmt.js +49 -0
  50. package/bundle/commands/build/unsandbox.js +65 -0
  51. package/bundle/commands/build/upload.js +83 -0
  52. package/bundle/commands/build/validate.js +71 -0
  53. package/bundle/commands/build/workos/delete.js +86 -0
  54. package/bundle/commands/build/workos/env/attach.js +134 -0
  55. package/bundle/commands/build/workos/env/create.js +176 -0
  56. package/bundle/commands/build/workos/env/delete.js +84 -0
  57. package/bundle/commands/build/workos/env/detach.js +115 -0
  58. package/bundle/commands/build/workos/env/get.js +117 -0
  59. package/bundle/commands/build/workos/env/list.js +139 -0
  60. package/bundle/commands/build/workos/env/set.js +138 -0
  61. package/bundle/commands/build/workos/invite.js +91 -0
  62. package/bundle/commands/build/workos/setup.js +124 -0
  63. package/bundle/commands/build/workos/status.js +93 -0
  64. package/bundle/commands/dns/create.js +128 -0
  65. package/bundle/commands/dns/delete.js +80 -0
  66. package/bundle/commands/dns/get.js +167 -0
  67. package/bundle/commands/dns/list.js +193 -0
  68. package/bundle/commands/dns/records/create.js +150 -0
  69. package/bundle/commands/dns/records/delete.js +76 -0
  70. package/bundle/commands/dns/records/get.js +118 -0
  71. package/bundle/commands/dns/records/list.js +153 -0
  72. package/bundle/commands/dns/records/update.js +146 -0
  73. package/bundle/commands/logs/query.js +237 -0
  74. package/bundle/commands/logs/tail.js +155 -0
  75. package/bundle/commands/mcp/install-claude.js +220 -0
  76. package/bundle/commands/mcp/install-gemini.js +220 -0
  77. package/bundle/commands/mcp/install-goose.js +232 -0
  78. package/bundle/commands/mcp/status.js +153 -0
  79. package/bundle/commands/object/delete.js +180 -0
  80. package/bundle/commands/object/get.js +209 -0
  81. package/bundle/commands/object/list.js +206 -0
  82. package/bundle/commands/object/put.js +211 -0
  83. package/bundle/commands/query/chunk-search.js +123 -0
  84. package/bundle/commands/query/document.js +126 -0
  85. package/bundle/commands/query/events.js +98 -0
  86. package/bundle/commands/query/reindex.js +147 -0
  87. package/bundle/commands/query/search.js +169 -0
  88. package/bundle/commands/tail.js +31 -0
  89. package/bundle/index.js +51 -0
  90. package/dist/base-command.d.ts +6 -0
  91. package/dist/base-command.d.ts.map +1 -1
  92. package/dist/base-command.js +21 -8
  93. package/dist/build.d.ts +2 -1
  94. package/dist/build.d.ts.map +1 -1
  95. package/dist/build.js +169 -51
  96. package/dist/codegen.d.ts +1 -1
  97. package/dist/codegen.d.ts.map +1 -1
  98. package/dist/codegen.js +20 -3
  99. package/dist/codegen.test.js +59 -1
  100. package/dist/commands/build/checkout.d.ts +17 -0
  101. package/dist/commands/build/checkout.d.ts.map +1 -1
  102. package/dist/commands/build/checkout.js +144 -7
  103. package/dist/commands/build/delete.d.ts +15 -0
  104. package/dist/commands/build/delete.d.ts.map +1 -1
  105. package/dist/commands/build/delete.js +133 -0
  106. package/dist/commands/build/deploy.d.ts.map +1 -1
  107. package/dist/commands/build/deploy.js +10 -2
  108. package/dist/commands/build/find.d.ts +1 -0
  109. package/dist/commands/build/find.d.ts.map +1 -1
  110. package/dist/commands/build/find.js +33 -2
  111. package/dist/commands/build/validate.d.ts.map +1 -1
  112. package/dist/commands/build/validate.js +0 -1
  113. package/dist/commands/build/workos/delete.d.ts +18 -0
  114. package/dist/commands/build/workos/delete.d.ts.map +1 -0
  115. package/dist/commands/build/workos/delete.js +72 -0
  116. package/dist/commands/build/workos/env/attach.d.ts +24 -0
  117. package/dist/commands/build/workos/env/attach.d.ts.map +1 -0
  118. package/dist/commands/build/workos/env/attach.js +111 -0
  119. package/dist/commands/build/workos/env/create.d.ts +26 -0
  120. package/dist/commands/build/workos/env/create.d.ts.map +1 -0
  121. package/dist/commands/build/workos/env/create.js +156 -0
  122. package/dist/commands/build/workos/env/delete.d.ts +20 -0
  123. package/dist/commands/build/workos/env/delete.d.ts.map +1 -0
  124. package/dist/commands/build/workos/env/delete.js +61 -0
  125. package/dist/commands/build/workos/env/detach.d.ts +21 -0
  126. package/dist/commands/build/workos/env/detach.d.ts.map +1 -0
  127. package/dist/commands/build/workos/env/detach.js +94 -0
  128. package/dist/commands/build/workos/env/get.d.ts +20 -0
  129. package/dist/commands/build/workos/env/get.d.ts.map +1 -0
  130. package/dist/commands/build/workos/env/get.js +94 -0
  131. package/dist/commands/build/workos/env/list.d.ts +18 -0
  132. package/dist/commands/build/workos/env/list.d.ts.map +1 -0
  133. package/dist/commands/build/workos/env/list.js +114 -0
  134. package/dist/commands/build/workos/env/set.d.ts +27 -0
  135. package/dist/commands/build/workos/env/set.d.ts.map +1 -0
  136. package/dist/commands/build/workos/env/set.js +115 -0
  137. package/dist/commands/build/workos/invite.d.ts +21 -0
  138. package/dist/commands/build/workos/invite.d.ts.map +1 -0
  139. package/dist/commands/build/workos/invite.js +68 -0
  140. package/dist/commands/build/workos/setup.d.ts +20 -0
  141. package/dist/commands/build/workos/setup.d.ts.map +1 -0
  142. package/dist/commands/build/workos/setup.js +106 -0
  143. package/dist/commands/build/workos/status.d.ts +18 -0
  144. package/dist/commands/build/workos/status.d.ts.map +1 -0
  145. package/dist/commands/build/workos/status.js +70 -0
  146. package/dist/commands/mcp/install-claude.d.ts.map +1 -1
  147. package/dist/commands/mcp/install-claude.js +2 -2
  148. package/dist/commands/mcp/install-gemini.d.ts.map +1 -1
  149. package/dist/commands/mcp/install-gemini.js +2 -2
  150. package/dist/commands/mcp/install-goose.d.ts +22 -0
  151. package/dist/commands/mcp/install-goose.d.ts.map +1 -0
  152. package/dist/commands/mcp/install-goose.js +252 -0
  153. package/dist/commands/object/delete.d.ts.map +1 -1
  154. package/dist/commands/object/delete.js +20 -12
  155. package/dist/commands/object/get.d.ts.map +1 -1
  156. package/dist/commands/object/get.js +20 -12
  157. package/dist/commands/object/list.d.ts.map +1 -1
  158. package/dist/commands/object/list.js +20 -12
  159. package/dist/commands/object/put.d.ts.map +1 -1
  160. package/dist/commands/object/put.js +20 -12
  161. package/dist/deploy.d.ts.map +1 -1
  162. package/dist/deploy.js +2 -2
  163. package/dist/index.d.ts +2 -0
  164. package/dist/index.d.ts.map +1 -1
  165. package/dist/index.js +37 -4
  166. package/dist/index.test.js +54 -2
  167. package/oclif.manifest.json +4533 -2284
  168. package/package.json +8 -5
  169. package/templates/claude-code/debug-raindrop-app.md +89 -0
  170. package/templates/claude-code/new-raindrop-app.md +12 -4
  171. package/templates/claude-code/reattach-raindrop-session.md +50 -12
  172. package/templates/claude-code/update-raindrop-app.md +61 -9
  173. package/templates/db/node_modules/.bin/prisma +2 -2
  174. package/templates/db/node_modules/.bin/prisma-kysely +2 -2
  175. package/templates/db/node_modules/.bin/tsc +2 -2
  176. package/templates/db/node_modules/.bin/tsserver +2 -2
  177. package/templates/db/node_modules/.bin/zx +2 -2
  178. package/templates/gemini-code/debug-raindrop-app.toml +86 -0
  179. package/templates/gemini-code/new-raindrop-app.toml +10 -3
  180. package/templates/gemini-code/reattach-raindrop-session.toml +9 -11
  181. package/templates/gemini-code/update-raindrop-app.toml +55 -10
  182. package/templates/goose/debug-raindrop-app.yaml +91 -0
  183. package/templates/goose/new-raindrop-app.yaml +21 -0
  184. package/templates/goose/reattach-raindrop-session.yaml +20 -0
  185. package/templates/goose/update-raindrop-app.yaml +65 -0
  186. package/templates/init/src/_app/auth.ts +18 -0
  187. package/templates/init/src/_app/cors.ts +64 -0
  188. package/dist/tsconfig.tsbuildinfo +0 -1
  189. package/templates/claude-code/raindrop-guidelines.md +0 -322
  190. package/templates/gemini-code/raindrop-guidelines.md +0 -322
@@ -0,0 +1,91 @@
1
+ version: "1.0.0"
2
+ title: "Debug Existing Raindrop Application"
3
+ description: "Debug an existing deployed Raindrop application"
4
+
5
+ instructions: |
6
+ WARNING: If you cannot find the "raindrop-mcp" server or the "get-prompt" tool for the "raindrop-mcp" server, respond with:
7
+ "Please check your raindrop-mcp server status by running /mcp, and reauthenticate"
8
+
9
+ Before debugging, run `raindrop auth login` to authenticate. When the command returns, authentication is complete.
10
+
11
+ After authentication:
12
+
13
+ 1. If session_id is provided as an argument, use it and skip to step 5
14
+
15
+ 2. Otherwise, read `~/.raindrop/index.json` to get applications and sessions:
16
+ - File format:
17
+ ```json
18
+ {
19
+ "applications": {
20
+ "my-app": {
21
+ "latest_session_id": "sess_abc123",
22
+ "sessions": [...]
23
+ }
24
+ },
25
+ "sessions": {
26
+ "sess_abc123": {
27
+ "session_id": "sess_abc123",
28
+ "timeline_id": "timeline_456",
29
+ "created_at": "...",
30
+ "current_state": "...",
31
+ "application_name": "my-app"
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ 3. Handle application selection:
38
+ - If no applications exist, respond: "No Raindrop applications found. Use /new-raindrop-app to create one."
39
+ - If one application exists, use its `latest_session_id`
40
+ - If multiple applications exist:
41
+ * List all application names with their current state and last updated time
42
+ * Ask user: "Which application would you like to debug?"
43
+ * Use the selected application's `latest_session_id`
44
+
45
+ 4. If no session_id found, ask the user for it
46
+
47
+ 5. Call the `get-prompt` tool (from raindrop-mcp server) with session_id to rehydrate session context
48
+
49
+ 6. Spawn a diagnostic subagent with this prompt:
50
+ "You are debugging a deployed Raindrop application.
51
+
52
+ Session ID: [session_id from step 5]
53
+ Timeline ID: [timeline_id from step 5]
54
+ Application Name: [application_name from step 5]
55
+ Application Type: [application_type from step 5]
56
+
57
+ Your task:
58
+ 1. Ask user: 'What issues are you experiencing with your deployed application?'
59
+ 2. Gather diagnostic information:
60
+ - Run: raindrop logs [application_name] --tail 100
61
+ - Based on application_type, test endpoints/tools:
62
+ * For API: Test endpoints from interface_design
63
+ * For MCP: Test MCP tools
64
+ * For CLI: Test commands
65
+ - Record failures and error messages
66
+ 3. Aggregate test results into this format:
67
+ {
68
+ total_endpoints: X,
69
+ passing: Y,
70
+ failing: Z,
71
+ failure_details: ['endpoint/tool: error message', ...]
72
+ }
73
+ 4. Call the `update-state` tool (from raindrop-mcp server) with:
74
+ - session_id: [session_id]
75
+ - timeline_id: [timeline_id]
76
+ - artifacts: {
77
+ current_state: 'debug_analyze',
78
+ is_debugging: true,
79
+ test_results: [results from step 3]
80
+ }
81
+ - status: 'complete'
82
+ 5. Call the `get-prompt` tool with session_id
83
+ 6. Return the orchestrator_instructions from the response
84
+
85
+ Do not output messages to user beyond the initial question. Work autonomously and return orchestrator instructions."
86
+
87
+ 7. Wait for the subagent to return orchestrator_instructions
88
+ 8. The orchestrator will take over and spawn subagents for debug_analyze → debug_fix → retesting → redeployment
89
+
90
+ prompt: |
91
+ I want to debug my deployed Raindrop application. Please call the `get-prompt` tool with my session_id.
@@ -0,0 +1,21 @@
1
+ version: '1.0.0'
2
+ title: 'Create New Raindrop Application'
3
+ description: 'Start a new Raindrop application development session using the Raindrop MCP workflow'
4
+
5
+ instructions: |
6
+ WARNING: If you cannot find the "raindrop-mcp" server or the "get-prompt" tool for the "raindrop-mcp" server, respond with:
7
+ "Please check your raindrop-mcp server status by running /mcp, and reauthenticate"
8
+
9
+ Before starting the workflow, run `raindrop auth login` to authenticate. When the command returns, authentication is complete.
10
+ Call the raindrop-mcp:new-raindrop-app MCP tool to start a new session.
11
+
12
+ After authentication, call the `get-prompt` tool (from the raindrop-mcp server) without any parameters to start a new session.
13
+ This will automatically create a new session and return initial workflow instructions.
14
+
15
+ Follow the instructions returned and continue with the development workflow, using `update-state` to report task completion.
16
+
17
+ WARNING: If you cannot find the "raindrop-mcp" server or the "login" tool for the "raindrop-mcp" server, respond with:
18
+ "Please check your raindrop-mcp server status by running /mcp, and reauthenticate"
19
+
20
+ prompt: |
21
+ I want to create a new Raindrop application. First, run `raindrop auth login` to authenticate, then call the `get-prompt` tool without any parameters.
@@ -0,0 +1,20 @@
1
+ version: "1.0.0"
2
+ title: "Reattach to Raindrop Session"
3
+ description: "Resume a previous Raindrop development session"
4
+
5
+ instructions: |
6
+ WARNING: If you cannot find the "raindrop-mcp" server or the "get-prompt" tool for the "raindrop-mcp" server, respond with:
7
+ "Please check your raindrop-mcp server status by running /mcp, and reauthenticate"
8
+
9
+ Before reattaching, run `raindrop auth login` to authenticate. When the command returns, authentication is complete.
10
+
11
+ After authentication:
12
+
13
+ 1. Check if session_id is provided as an argument
14
+ 2. Otherwise, read `.raindrop.config.local.json` to get the last session_id
15
+ 3. If no session_id found, ask the user for it
16
+ 4. Call the `get-prompt` tool (from raindrop-mcp server) with the session_id parameter
17
+ 5. Follow the instructions returned and continue with the development workflow
18
+
19
+ prompt: |
20
+ I want to reattach to my previous Raindrop development session. Please call the `get-prompt` tool with my session_id.
@@ -0,0 +1,65 @@
1
+ version: "1.0.0"
2
+ title: "Update Existing Raindrop Application"
3
+ description: "Add new features to an existing Raindrop application"
4
+
5
+ instructions: |
6
+ WARNING: If you cannot find the "raindrop-mcp" server or the "get-prompt" tool for the "raindrop-mcp" server, respond with:
7
+ "Please check your raindrop-mcp server status by running /mcp, and reauthenticate"
8
+
9
+ Before updating, run `raindrop auth login` to authenticate. When the command returns, authentication is complete.
10
+
11
+ After authentication:
12
+
13
+ 1. If session_id is provided as an argument, use it and skip to step 5
14
+
15
+ 2. Otherwise, read `~/.raindrop/index.json` to get applications and sessions:
16
+ - File format:
17
+ ```json
18
+ {
19
+ "applications": {
20
+ "my-app": {
21
+ "latest_session_id": "sess_abc123",
22
+ "sessions": [...]
23
+ }
24
+ },
25
+ "sessions": {
26
+ "sess_abc123": {
27
+ "session_id": "sess_abc123",
28
+ "timeline_id": "timeline_456",
29
+ "created_at": "...",
30
+ "current_state": "...",
31
+ "application_name": "my-app"
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ 3. Handle application selection:
38
+ - If no applications exist, respond: "No Raindrop applications found. Use /new-raindrop-app to create one."
39
+ - If one application exists, use its `latest_session_id`
40
+ - If multiple applications exist:
41
+ * List all application names with their current state and last updated time
42
+ * Ask user: "Which application would you like to add features to?"
43
+ * Use the selected application's `latest_session_id`
44
+
45
+ 4. If no session_id found, ask the user for it
46
+
47
+ 5. Get the timeline_id from the session entry in index.json
48
+
49
+ 6. Call the `update-state` tool (from raindrop-mcp server) with the session_id, timeline_id, and these parameters:
50
+ ```json
51
+ {
52
+ "artifacts": {
53
+ "current_state": "merge_features"
54
+ },
55
+ "status": "complete"
56
+ }
57
+ ```
58
+ This jumps the workflow to the merge_features state for adding features.
59
+
60
+ 7. Call the `get-prompt` tool (from raindrop-mcp server) with the session_id parameter
61
+
62
+ 8. Follow the instructions returned and continue with the feature addition workflow
63
+
64
+ prompt: |
65
+ I want to update my existing Raindrop application. Please call the `get-prompt` tool with my session_id.
@@ -0,0 +1,18 @@
1
+ import { requireAuthenticated, verifyIssuer } from '@liquidmetal-ai/raindrop-framework/core/auth';
2
+
3
+ /**
4
+ * verify is the application-wide JWT verification hook.
5
+ * @param request The incoming request object.
6
+ * @param env The handler environment object.
7
+ * **Note**: adds `jwt` property to `env` if verification is successful.
8
+ * @returns true to allow request to continue.
9
+ */
10
+ export const verify = verifyIssuer;
11
+
12
+ /**
13
+ * authorize is the application-wide authorization hook.
14
+ * @param request The incoming request object.
15
+ * @param env The handler environment object with env.jwt set by verify.
16
+ * @returns true if authorized, false otherwise.
17
+ */
18
+ export const authorize = requireAuthenticated;
@@ -0,0 +1,64 @@
1
+ import { corsDisabled } from '@liquidmetal-ai/raindrop-framework/core/cors';
2
+
3
+ /**
4
+ * cors is the application-wide CORS (Cross-Origin Resource Sharing) handler.
5
+ *
6
+ * This handler is automatically applied to all HTTP services in your application.
7
+ * You can override this per-handler by exporting a `cors` function from your handler.
8
+ *
9
+ * **Default Behavior (Secure):**
10
+ * By default, CORS is disabled for security. Browsers will block cross-origin requests
11
+ * to your API unless you explicitly configure allowed origins.
12
+ *
13
+ * **When to Enable CORS:**
14
+ * Enable CORS when you need to allow web applications from different domains to access
15
+ * your API (e.g., a frontend at https://app.example.com calling an API at https://api.example.com).
16
+ *
17
+ * @example Allow all origins (public API - use with caution)
18
+ * ```typescript
19
+ * import { corsAllowAll } from '@liquidmetal-ai/raindrop-framework/core/cors';
20
+ * export const cors = corsAllowAll;
21
+ * ```
22
+ *
23
+ * @example Allow specific origins (recommended for production)
24
+ * ```typescript
25
+ * import { createCorsHandler } from '@liquidmetal-ai/raindrop-framework/core/cors';
26
+ * export const cors = createCorsHandler({
27
+ * origin: ['https://example.com', 'https://app.example.com'],
28
+ * allowMethods: ['GET', 'POST', 'PUT', 'DELETE'],
29
+ * allowHeaders: ['Content-Type', 'Authorization'],
30
+ * credentials: true, // Allow cookies/auth headers
31
+ * maxAge: 86400 // Cache preflight for 24 hours
32
+ * });
33
+ * ```
34
+ *
35
+ * @example Dynamic origin validation
36
+ * ```typescript
37
+ * import { createCorsHandler } from '@liquidmetal-ai/raindrop-framework/core/cors';
38
+ * export const cors = createCorsHandler({
39
+ * origin: (request, env) => {
40
+ * const origin = request.headers.get('origin');
41
+ * // Check against database, environment variable, or custom logic
42
+ * const allowedOrigins = env.ALLOWED_ORIGINS?.split(',') || [];
43
+ * return allowedOrigins.includes(origin || '') ? origin : null;
44
+ * },
45
+ * credentials: true
46
+ * });
47
+ * ```
48
+ *
49
+ * @example Custom handler for advanced control
50
+ * ```typescript
51
+ * export const cors = (request: Request, env: any, response?: Response): Response => {
52
+ * // Custom CORS logic with access to env
53
+ * if (!response) {
54
+ * // Handle OPTIONS preflight
55
+ * return new Response(null, { status: 204, headers: { ... } });
56
+ * }
57
+ * // Add headers to response, can use env.ALLOWED_ORIGINS, env.db, etc.
58
+ * const headers = new Headers(response.headers);
59
+ * headers.set('Access-Control-Allow-Origin', '*');
60
+ * return new Response(response.body, { ...response, headers });
61
+ * };
62
+ * ```
63
+ */
64
+ export const cors = corsDisabled;
@@ -1 +0,0 @@
1
- {"root":["../src/base-command.ts","../src/build.test.ts","../src/build.ts","../src/codegen.test.ts","../src/codegen.ts","../src/config.test.ts","../src/config.ts","../src/deploy.ts","../src/index.test.ts","../src/index.ts","../src/log-helpers.ts","../src/status.ts","../src/strict-client.ts","../src/trace.ts","../src/commands/tail.ts","../src/commands/annotation/get.ts","../src/commands/annotation/list.ts","../src/commands/annotation/put.ts","../src/commands/auth/list.ts","../src/commands/auth/login.ts","../src/commands/auth/logout.ts","../src/commands/auth/select.ts","../src/commands/bucket/create-credential.ts","../src/commands/bucket/delete-credential.ts","../src/commands/bucket/get-credential.ts","../src/commands/bucket/list-credentials.ts","../src/commands/build/branch.ts","../src/commands/build/checkout.ts","../src/commands/build/clone.ts","../src/commands/build/delete.ts","../src/commands/build/deploy.ts","../src/commands/build/find.ts","../src/commands/build/generate.ts","../src/commands/build/init.ts","../src/commands/build/list.ts","../src/commands/build/sandbox.ts","../src/commands/build/start.ts","../src/commands/build/status.ts","../src/commands/build/stop.ts","../src/commands/build/unsandbox.ts","../src/commands/build/upload.ts","../src/commands/build/validate.ts","../src/commands/build/env/get.ts","../src/commands/build/env/set.ts","../src/commands/build/tools/check.ts","../src/commands/build/tools/fmt.ts","../src/commands/dns/create.ts","../src/commands/dns/delete.ts","../src/commands/dns/get.ts","../src/commands/dns/list.ts","../src/commands/dns/records/create.ts","../src/commands/dns/records/delete.ts","../src/commands/dns/records/get.ts","../src/commands/dns/records/list.ts","../src/commands/dns/records/update.ts","../src/commands/logs/query.ts","../src/commands/logs/tail.ts","../src/commands/mcp/install-claude.ts","../src/commands/mcp/install-gemini.ts","../src/commands/mcp/status.ts","../src/commands/object/delete.ts","../src/commands/object/get.ts","../src/commands/object/list.ts","../src/commands/object/put.ts","../src/commands/query/chunk-search.ts","../src/commands/query/document.ts","../src/commands/query/events.ts","../src/commands/query/reindex.ts","../src/commands/query/search.ts","../src/lib/dns-utils.ts","../src/utils/directory-validation.ts"],"version":"5.8.3"}
@@ -1,322 +0,0 @@
1
- # RAINDROP GUIDELINES
2
-
3
- ## 🚨 ABSOLUTE COMPLIANCE REQUIRED 🚨
4
- **YOU ARE A WORKFLOW COMPILER. FOLLOW THE MCP STATE MACHINE.**
5
- **EXECUTE MCP INSTRUCTIONS EXACTLY. ZERO WORKFLOW DEVIATION.**
6
- **SOLVE PROBLEMS WITHIN EACH STEP. NEVER SKIP STEPS.**
7
-
8
- ## ⚠️ CRITICAL INSTRUCTION
9
- **FOLLOW MCP TOOLS GUIDANCE TO THE LETTER. DO NOT MAKE YOUR OWN PLANS.**
10
-
11
- ## WORKFLOWS
12
-
13
- ### NEW APPLICATION: `login` → `set_team` → `architecture_step` → `prd_step` → `sql_step` → `code_step` → `tests_step` → `deployment_step` → `endpoint_test_step`
14
-
15
- ### UPDATE APPLICATION: `update_app_step` → `update_prd_step` → `sql_step` → Continue normal flow
16
-
17
- ## DUAL-IDENTIFIER STATE MANAGEMENT
18
-
19
- ### Session-Timeline Architecture
20
- - **Session ID**: Long-term project container (persists across workflows)
21
- - **Timeline ID**: Individual workflow execution instance
22
- - **State Storage**: All state keyed by `session_id + timeline_id`
23
- - **Reattachment**: Use `reattach_to_session` to resume workflows
24
-
25
- ### State Management Pattern
26
- ```json
27
- {
28
- "session_id": "uuid-project-container",
29
- "timeline_id": "uuid-workflow-execution",
30
- "current_state": "workflow_state_name",
31
- "context": {
32
- "stakeholders": [],
33
- "prd_content": "...",
34
- "application_type": "...",
35
- "validation_status": {}
36
- }
37
- }
38
- ```
39
-
40
- ## STATE MACHINE
41
-
42
- ```mermaid
43
- flowchart TD
44
- NewApp([New App Flow]) --> Login[login]
45
-
46
- %% Debug Flow Addition
47
- Debug[debug_step] --> Code
48
-
49
- %% Main Authentication Flow
50
- Login --> SetTeam[set_team]
51
- Login --> Architecture[architecture_step]
52
- SetTeam --> Architecture
53
-
54
- %% Architecture to PRD Flow
55
- Architecture --> PRD[prd_step]
56
-
57
- %% Core Development Flow
58
- PRD --> SQL[sql_step]
59
- SQL --> Code[code_step]
60
- Code --> Tests[tests_step]
61
- Tests --> Deploy[deployment_step]
62
- Deploy --> EndpointTest[endpoint_test_step]
63
-
64
- %% Success Path
65
- EndpointTest --> Complete([Workflow Complete])
66
-
67
- %% Error Recovery Loop
68
- EndpointTest -->|Endpoints Failed| Debug[debug_step]
69
- Debug --> Code
70
- Code -->|Raindrop Build Failed| Code
71
- Tests -->|Tests Failed| Code
72
- SQL -->|SQL Schemas Invalid| SQL
73
-
74
- %% Update App Flow
75
- UpdateApp([Update App Flow]) --> UpdateStart[update_app_step]
76
- UpdateStart --> UpdatePRD[update_prd_step]
77
- UpdatePRD --> PRD
78
-
79
- %% Reattach Flow
80
- ReattachFlow([Reattach Flow]) --> Reattach[reattach_to_session]
81
- Reattach --> CheckState{Check Current State}
82
- CheckState -->|session_started| SetTeam
83
- CheckState -->|team_set| Architecture
84
- CheckState -->|architecture_analyzed| PRD
85
- CheckState -->|prd_created| SQL
86
- CheckState -->|sql_schemas_created| Code
87
- CheckState -->|coding_started| Tests
88
- CheckState -->|tests_written| Deploy
89
- CheckState -->|deployed| EndpointTest
90
- CheckState -->|tested| Complete
91
- CheckState -->|debugging| Code
92
- CheckState -->|update_app_started| UpdatePRD
93
-
94
- %% Entry Points
95
- classDef entryPoint fill:#e1f5fe
96
- classDef errorLoop fill:#ffebee
97
- classDef complete fill:#e8f5e8
98
-
99
- class NewApp,UpdateApp,ReattachFlow entryPoint
100
- class Complete complete
101
-
102
- %% Error Recovery Loops
103
- class Code,Tests,EndpointTest errorLoop
104
- ```
105
-
106
- ## MCP EXECUTION RULES
107
-
108
- ### State Tracking
109
- - State via `session_id` + `timeline_id`
110
- - Store in `.raindrop.config.local.json`
111
- - Use `reattach_to_session` to resume
112
-
113
- ### Enhanced MCP Tool Response Patterns
114
-
115
- #### Success Response
116
- ```json
117
- {
118
- "success": true,
119
- "message": "Human-readable status",
120
- "session_id": "uuid",
121
- "timeline_id": "uuid",
122
- "context_data": { "key": "value" },
123
- "next_action": "next_tool_name"
124
- }
125
- ```
126
-
127
- #### Error Response with Recovery
128
- ```json
129
- {
130
- "success": false,
131
- "message": "Human-readable error",
132
- "error": "Technical error details",
133
- "session_id": "uuid",
134
- "timeline_id": "uuid",
135
- "blocking_issue": "What is preventing progress",
136
- "required_action": "What needs to be done",
137
- "next_action": "recovery_action_or_same_step"
138
- }
139
- ```
140
-
141
- #### Validation Gate Response
142
- ```json
143
- {
144
- "success": false,
145
- "message": "🚨 VALIDATION FAILED 🚨",
146
- "blocking_issue": "Description of validation failure",
147
- "required_action": "Specific action to resolve",
148
- "validation_status": "failed",
149
- "next_action": "same_step"
150
- }
151
- ```
152
-
153
- ### MANDATORY BEHAVIORS - NO EXCEPTIONS
154
- 1. **EXECUTE `next_action` FROM EVERY MCP RESPONSE**
155
- 2. **NEVER SKIP ANY WORKFLOW STEP**
156
- 3. **FOLLOW EVERY MCP PROMPT WORD-FOR-WORD**
157
- 4. **WAIT FOR EXPLICIT USER APPROVAL WHERE STATED**
158
- 5. **SOLVE PROBLEMS TO COMPLETE CURRENT STEP**
159
- 6. **VALIDATE PREREQUISITES BEFORE STATE TRANSITIONS**
160
- 7. **PRESERVE STATE DURING ERROR RECOVERY**
161
-
162
- ### ABSOLUTELY FORBIDDEN - WILL CAUSE FAILURE
163
- - Skip MCP steps
164
- - Jump ahead in workflow
165
- - Create alternative workflows
166
- - Ignore `next_action` directive
167
- - Change the MCP workflow sequence
168
- - Suggest workflow improvements
169
- - Advance workflow without validation
170
- - Lose state during error handling
171
-
172
- ## VALIDATION FRAMEWORK
173
-
174
- ### Validation Gates (Must Pass Before State Transition)
175
- - **SQL Validation**: `validate_sql_schemas` - Must pass before `code_step`
176
- - **TDD Compliance**: `validate_tdd_cycle` - Validate during development
177
- - **Architecture Compliance**: Validate against selected patterns
178
- - **Deployment Readiness**: Pre-deployment validation gates
179
-
180
- ### Validation Implementation Pattern
181
- ```typescript
182
- // Check prerequisites before advancing
183
- const prerequisiteValid = await validatePrerequisites(session_id, timeline_id);
184
- if (!prerequisiteValid) {
185
- return createMcpResponse({
186
- success: false,
187
- message: "🚨 VALIDATION FAILED 🚨",
188
- blocking_issue: "Prerequisites not met",
189
- required_action: "Complete validation requirements",
190
- validation_status: "failed",
191
- next_action: "same_step" // Stay in current step
192
- });
193
- }
194
- ```
195
-
196
- ### Recovery Workflow Patterns
197
- - **Debug Loop**: `debugging` state returns to `code_step`
198
- - **Test Failure Loop**: Failed tests return to `code_step`
199
- - **SQL Validation Loop**: Invalid SQL returns to `sql_step`
200
- - **Endpoint Failure Loop**: Failed endpoints enter `debug_step`
201
-
202
- ## CONDITIONAL STATE TRANSITIONS
203
-
204
- ### Advanced State Mapping
205
- ```typescript
206
- const WORKFLOW_STATE_TO_NEXT_ACTION = {
207
- // Happy path with validation
208
- session_started: 'architecture_step',
209
- architecture_analyzed: 'prd_step',
210
- prd_created: 'sql_step',
211
- sql_schemas_created: 'code_step', // Only after sql validation
212
- coding_started: 'tests_step',
213
- tests_written: 'deployment_step',
214
- deployed: 'endpoint_test_step',
215
-
216
- // Conditional completion
217
- tested: 'debug_step|mcp_end_step', // User choice based on results
218
-
219
- // Recovery loops
220
- debugging: 'code_step',
221
- sql_validation_failed: 'sql_step',
222
- test_validation_failed: 'code_step',
223
- endpoint_validation_failed: 'debug_step',
224
-
225
- // Update workflows
226
- update_app_started: 'update_prd_step',
227
- update_prd_completed: 'sql_step' // FIX: Skip architecture, go directly to SQL
228
- };
229
- ```
230
-
231
- ### State Transition Guards
232
- 1. **Validation Check**: Verify prerequisites are satisfied
233
- 2. **Context Preservation**: Maintain session state during transitions
234
- 3. **Error Context**: Store error details for recovery workflows
235
- 4. **User Approval Gates**: Wait for explicit approval where required
236
-
237
- ## UTILITY TOOLS
238
- - `get_prd` - Get stored PRD
239
- - `configure_raindrop` - Setup config
240
- - `update_conversation_memory` - Store context
241
- - `validate_sql_schemas` - Validate SQL schema files before proceeding to code_step
242
- - `validate_tdd_cycle` - Validate Test-Driven Development compliance
243
- - `save_prd_file` - Save PRD content as markdown file
244
- - `storeState` - Store workflow state with session+timeline
245
- - `retrieveState` - Retrieve workflow state by key
246
- - `createSession` - Initialize new session container
247
-
248
- ## DOCUMENTATION TOOLS
249
- - `list_documentation_pages` - List all available documentation pages
250
- - `fetch_documentation_page` - Get specific documentation page content by path
251
-
252
- ## ARCHITECTURE TOOLS
253
- - `list_architecture_patterns` - List all available architecture patterns
254
- - `fetch_architecture_pattern` - Get specific architecture pattern content by path
255
-
256
- ## DOCUMENTATION ACCESS
257
- - List pages: `list_documentation_pages` MCP tool
258
- - Get page: `fetch_documentation_page` MCP tool with path parameter
259
-
260
- ## ARCHITECTURE PATTERN ACCESS
261
- - List patterns: `list_architecture_patterns` MCP tool
262
- - Get pattern: `fetch_architecture_pattern` MCP tool with path parameter
263
-
264
- ## ERROR HANDLING AND RECOVERY
265
-
266
- ### Multi-Level Error Handling
267
- 1. **Tool-Level**: Handle individual tool failures gracefully
268
- 2. **Workflow-Level**: Manage state transition failures
269
- 3. **System-Level**: Handle infrastructure and connectivity issues
270
-
271
- ### Error Recovery Pattern
272
- ```typescript
273
- try {
274
- // Execute workflow step
275
- const result = await executeStep(session_id, timeline_id, step_data);
276
-
277
- // Validate result before advancing
278
- const isValid = await validateStepCompletion(result);
279
- if (!isValid) {
280
- await storeState(session_id, timeline_id, 'current_state', 'debugging', env);
281
- return createRecoveryResponse();
282
- }
283
-
284
- // Advance to next step
285
- await storeState(session_id, timeline_id, 'current_state', next_state, env);
286
-
287
- } catch (error) {
288
- // Preserve error context for recovery
289
- await storeState(session_id, timeline_id, 'error_context', error.message, env);
290
- await storeState(session_id, timeline_id, 'current_state', 'debugging', env);
291
-
292
- return createMcpResponse({
293
- success: false,
294
- error: error.message,
295
- next_action: 'debug_step'
296
- });
297
- }
298
- ```
299
-
300
- ### Context Preservation During Recovery
301
- - **Error Details**: Store complete error context
302
- - **Partial Progress**: Preserve completed work
303
- - **Recovery Guidance**: Provide specific recovery actions
304
- - **State Integrity**: Maintain workflow state consistency
305
-
306
- ## EXECUTION STYLE
307
- - **WORKFLOW COMPILER: Execute MCP steps exactly with validation**
308
- - **PROBLEM SOLVER: Debug, code, fix within each step**
309
- - **STATE GUARDIAN: Preserve and validate state at each transition**
310
- - Auto-pilot with user status updates
311
- - Report key decisions (PRD, code choices)
312
- - Update during `code_step` and manifest creation
313
- - Validate prerequisites before advancing
314
- - Handle errors gracefully with recovery workflows
315
-
316
- ## REMEMBER
317
- **FOLLOW THE MCP WORKFLOW RELIGIOUSLY.**
318
- **SOLVE PROBLEMS INTELLIGENTLY WITHIN EACH STEP.**
319
- **NEVER DEVIATE FROM THE STATE MACHINE SEQUENCE.**
320
- **VALIDATE BEFORE EVERY STATE TRANSITION.**
321
- **PRESERVE STATE DURING ERROR RECOVERY.**
322
- **USE DUAL-IDENTIFIER STATE MANAGEMENT CONSISTENTLY.**