rush-ai 0.9.1 → 0.10.0-rc.1
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 +62 -0
- package/dist/index.js +611 -95
- package/dist/index.js.map +1 -1
- package/dist/skills/README.md +20 -1
- package/dist/skills/deploy-to-prod.md +178 -0
- package/dist/skills/general-task.md +189 -0
- package/dist/skills/hand-off.md +4 -1
- package/dist/skills/onboarding.md +160 -0
- package/dist/skills/project-setup.md +203 -0
- package/dist/skills/push-local-project.md +177 -0
- package/package.json +1 -1
- package/skills/README.md +20 -1
- package/skills/deploy-to-prod.md +178 -0
- package/skills/general-task.md +189 -0
- package/skills/hand-off.md +4 -1
- package/skills/onboarding.md +160 -0
- package/skills/project-setup.md +203 -0
- package/skills/push-local-project.md +177 -0
package/README.md
CHANGED
|
@@ -225,6 +225,68 @@ rush-ai task messages <task-id> --json
|
|
|
225
225
|
rush-ai task list -l 10 -s completed
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
+
### Setting up a full-stack local project
|
|
229
|
+
|
|
230
|
+
Got a local Next.js / Vite project that needs a database + file uploads on Rush?
|
|
231
|
+
`task init` provisions a pod + Supabase DB + Rush-proxied object storage, then
|
|
232
|
+
writes credentials to `.rush/env.md` and a machine-readable checklist at
|
|
233
|
+
`.rush/agent-handoff.md` telling your IDE agent exactly which local files to edit.
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
# From your local project directory:
|
|
237
|
+
cd my-app
|
|
238
|
+
|
|
239
|
+
# Detect, confirm, and provision. Flags:
|
|
240
|
+
# --db create a Supabase database
|
|
241
|
+
# --oss record Rush-proxied storage endpoint (no per-project token)
|
|
242
|
+
# --name project slug (defaults to directory name)
|
|
243
|
+
# -y skip interactive prompts after detection
|
|
244
|
+
rush-ai task init --db --oss -y
|
|
245
|
+
|
|
246
|
+
# You now have .rush/env.md:
|
|
247
|
+
# PROJECT_ID=<id>
|
|
248
|
+
# PREVIEW_URL=https://<id>-preview.rush.zhenguanyu.com
|
|
249
|
+
# DATABASE_URL=postgres://...
|
|
250
|
+
# SUPABASE_URL=https://...
|
|
251
|
+
# SUPABASE_ANON_KEY=...
|
|
252
|
+
# STORAGE_API_BASE=https://rush.zhenguanyu.com/api/tasks/<id>/storage
|
|
253
|
+
# STATE=complete
|
|
254
|
+
|
|
255
|
+
# Your IDE agent reads .rush/agent-handoff.md and rewrites .env.local / upload code.
|
|
256
|
+
# When you're ready:
|
|
257
|
+
rush-ai task push # reuses PROJECT_ID from .rush/env.md
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**Storage API**: uploads go through Rush proxy (not direct OSS) to avoid exposing
|
|
261
|
+
AccessKeys. Server-side code in your app uses `$RUSH_PLATFORM_TOKEN` (already in
|
|
262
|
+
your environment via `rush-ai auth login`) to upload:
|
|
263
|
+
|
|
264
|
+
```ts
|
|
265
|
+
// apps/your-app/app/api/upload/route.ts — Next.js server route
|
|
266
|
+
export async function POST(req: Request) {
|
|
267
|
+
const fd = await req.formData();
|
|
268
|
+
const res = await fetch(`${process.env.STORAGE_API_BASE}/upload`, {
|
|
269
|
+
method: 'POST',
|
|
270
|
+
headers: { Authorization: `Bearer ${process.env.RUSH_PLATFORM_TOKEN}` },
|
|
271
|
+
body: fd,
|
|
272
|
+
});
|
|
273
|
+
return Response.json(await res.json());
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Then your browser uploads to `/api/upload` (your own app's server route),
|
|
278
|
+
**never** directly to the storage API with a bearer token. The `task init`
|
|
279
|
+
handoff enforces this two-hop proxy pattern.
|
|
280
|
+
|
|
281
|
+
Constraints:
|
|
282
|
+
- `.rush/env.md` is auto-gitignored — never commit it
|
|
283
|
+
- Single file ≤ 30 MB (larger streaming planned for Phase 2)
|
|
284
|
+
- Each task has a 5 GB soft storage quota
|
|
285
|
+
- `task init` projects have `template = null` and can't flow through `task deploy` — use `task push` for iterative updates
|
|
286
|
+
- `task init` is compensating, not atomic: if it fails mid-way, just re-run it; it resumes from the last checkpoint in `.rush/env.md`
|
|
287
|
+
|
|
288
|
+
Full design contract: `specs/rush-v2/cli/task-storage-api.spec.md` (v1.0).
|
|
289
|
+
|
|
228
290
|
### Deploying a web-builder task
|
|
229
291
|
|
|
230
292
|
Once a `web-builder` task has built at least one version (you've sent it a
|