@zibby/skills 0.1.10 → 0.1.12

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.
@@ -1,338 +1,202 @@
1
1
  ---
2
- sidebar_position: 6
2
+ sidebar_position: 4
3
3
  title: CLI Reference
4
4
  ---
5
5
 
6
6
  # CLI Reference
7
7
 
8
- ## Installation
8
+ Every command lives under `zibby workflow <verb>` for consistency. The bare top-level forms (`zibby start`, `zibby deploy`, `zibby trigger`, `zibby logs`, `zibby g workflow`) are kept as backward-compat aliases — they call the same handlers — but new code should use the namespaced forms.
9
9
 
10
- ```bash
11
- npm install -g @zibby/cli
12
- ```
13
-
14
- ---
15
-
16
- ## Commands
17
-
18
- ### `zibby test [spec-path]`
19
-
20
- Run a test specification.
21
-
22
- ```bash
23
- # Run a local test spec
24
- zibby test test-specs/login.txt --agent cursor
25
-
26
- # Run without any project setup
27
- echo "Go to example.com" > test.txt && zibby test test.txt --agent cursor
28
-
29
- # Run with cloud sync
30
- zibby test test-specs/login.txt --sync
10
+ ## Workflow commands
31
11
 
32
- # Run test cases from cloud
33
- zibby test --sources TC001,TC002 --execution abc123
34
- ```
35
-
36
- | Flag | Description |
12
+ | Command | What it does |
37
13
  |---|---|
38
- | `--agent <type>` | AI agent: `cursor`, `claude`, or `codex` |
39
- | `--workflow <name>` | Workflow to use (e.g., `QuickSmokeWorkflow`, `quick-smoke`) |
40
- | `--headless` | Run browser in headless mode |
41
- | `--node <name>` | Run only a specific node (`preflight`, `execute_live`, `generate_script`) |
42
- | `--session <id>` | Reuse an existing session (`last` for most recent) requires `--node` |
43
- | `--sources <ids>` | Comma-separated test case IDs to fetch from cloud |
44
- | `--execution <id>` | Execution ID (required with `--sources`) |
45
- | `--project <id>` | Project ID or API token (auto-detected from `ZIBBY_API_KEY`) |
46
- | `--collection <id-or-name>` | Collection to organize the run into (creates if name is new) |
47
- | `--folder <path>` | Folder within the collection |
48
- | `--sync` | Force upload results to cloud |
49
- | `--no-sync` | Skip cloud upload |
50
- | `--config <path>` | Config file path (default: `.zibby.config.js`) |
51
- | `--auto-approve` | Auto-approve MCP tool calls (for CI/CD) |
52
- | `-o, --open` | Open results in browser after upload |
53
- | `--verbose` | Show info-level logs |
54
- | `--debug` | Show debug-level logs |
55
-
56
- ---
57
-
58
- ### `zibby init [project-name]`
59
-
60
- Initialize a Zibby project with config and workflow files. **Optional** — `zibby test` works without it using the built-in workflow.
61
-
62
- ```bash
63
- zibby init
64
- zibby init my-project --agent cursor --cloud-sync
65
- ```
66
-
67
- | Flag | Description |
14
+ | [`zibby workflow new <name>`](#workflow-new) | Scaffold a new custom workflow under `.zibby/workflows/<name>/`. |
15
+ | [`zibby workflow run <name>`](#workflow-run) | One-shot local execution. Same input flags as `trigger`. |
16
+ | [`zibby workflow list`](#workflow-list) | List local + deployed workflows. |
17
+ | [`zibby workflow deploy [name]`](#workflow-deploy) | Deploy to Zibby Cloud. Interactive picker if name omitted. |
18
+ | [`zibby workflow trigger [uuid]`](#workflow-trigger) | Run a deployed workflow remotely. UUID is canonical. |
19
+ | [`zibby workflow logs [uuid] -t`](#workflow-logs) | Tail logs from a run, Heroku-style. |
20
+ | [`zibby workflow download <uuid>`](#workflow-download) | Pull a deployed workflow back to local. Edit + redeploy. |
21
+ | [`zibby workflow delete <uuid>`](#workflow-delete) | Delete a deployed workflow. |
22
+ | [`zibby workflow start <name>`](#workflow-start) | Long-lived dev server (Studio integration). Most users want `run`. |
23
+ | [`zibby workflow env <verb>`](#workflow-env) | Manage per-workflow encrypted env vars: `list`, `set`, `unset`, `push`. |
24
+
25
+ Plus auth + admin:
26
+
27
+ | Command | What it does |
68
28
  |---|---|
69
- | `--agent <type>` | `cursor`, `claude`, or `codex` |
70
- | `--cloud-sync` | Enable cloud sync |
71
- | `--headless` | Headless browser mode |
72
- | `--headed` | Headed browser mode |
73
- | `--api-key <key>` | Zibby API key |
74
- | `--skip-install` | Skip `npm install` |
75
- | `-f, --force` | Overwrite existing config |
29
+ | `zibby login` | OAuth in browser. Writes session to `~/.zibby/config.json`. |
30
+ | `zibby logout` | Clear session. |
31
+ | `zibby status` | Show current auth state. |
32
+ | `zibby project list` | List projects you have access to. |
76
33
 
77
- ---
78
-
79
- ### `zibby login`
80
-
81
- Authenticate with Zibby (opens browser for OAuth).
34
+ ## workflow new {#workflow-new}
82
35
 
83
36
  ```bash
84
- zibby login
37
+ zibby workflow new [name]
85
38
  ```
86
39
 
87
- ---
40
+ Scaffolds `.zibby/workflows/<name>/` with a starter `graph.mjs`, `nodes/example.mjs`, `package.json`, and `workflow.json` manifest. Auto-runs `npm install` in the new folder unless `--skip-install`.
88
41
 
89
- ### `zibby logout`
42
+ Options:
43
+ - `--skip-install` — skip `npm install`
44
+ - If `name` is omitted, the CLI generates one (`zealous-otter`, etc.)
90
45
 
91
- Clear saved session.
46
+ ## workflow run {#workflow-run}
92
47
 
93
48
  ```bash
94
- zibby logout
49
+ zibby workflow run <workflow-name>
95
50
  ```
96
51
 
97
- ---
98
-
99
- ### `zibby status`
100
-
101
- Show current authentication status.
102
-
103
- ```bash
104
- zibby status
105
- zibby status --json
106
- ```
107
-
108
- ---
52
+ Loads `graph.mjs`, instantiates the entry class, runs the graph **once** in-process, prints results, and exits. Output → `.zibby/output/sessions/<sessionId>/`.
109
53
 
110
- ### `zibby list`
54
+ Mirrors `zibby workflow trigger` so the same input flags work locally and in the cloud — flip the verb and the project, and your local dev loop is exactly the same call shape your CI/CD uses.
111
55
 
112
- List your projects and API tokens.
56
+ Options:
57
+ - `-p, --param <key=value>` — input param (repeatable, highest precedence). Example: `-p ticket=BUG-123 -p priority=high`
58
+ - `--input <json>` — input as JSON string
59
+ - `--input-file <path>` — input as JSON file (lowest precedence)
113
60
 
61
+ Examples:
114
62
  ```bash
115
- zibby list
63
+ zibby workflow run my-pipeline
64
+ zibby workflow run my-pipeline -p ticket=BUG-123
65
+ zibby workflow run my-pipeline --input '{"ticket":"BUG-123","priority":"high"}'
66
+ zibby workflow run my-pipeline --input-file payload.json -p priority=urgent
116
67
  ```
117
68
 
118
- ---
119
-
120
- ### `zibby upload <spec-path>`
121
-
122
- Upload existing test artifacts to Zibby Cloud.
123
-
124
- ```bash
125
- zibby upload test-specs/login.txt --collection "Auth Tests"
126
- ```
127
-
128
- | Flag | Description |
129
- |---|---|
130
- | `--project <id>` | Project ID (required) |
131
- | `--collection <id-or-name>` | Collection to upload into |
132
- | `--folder <path>` | Folder within collection |
133
-
134
- ---
135
-
136
- ### `zibby video`
137
-
138
- Organize test videos — moves videos from `test-results/` to sit next to test files.
69
+ ## workflow start {#workflow-start}
139
70
 
140
71
  ```bash
141
- zibby video
72
+ zibby workflow start <workflow-name>
142
73
  ```
143
74
 
144
- ---
75
+ Long-lived local dev server (default port 3848). Listens on `POST /trigger` for input payloads and runs the workflow in-process. Used today by the Studio desktop app — for plain CLI use, prefer `workflow run`.
145
76
 
146
- ### `zibby setup-playwright`
77
+ Options:
78
+ - `-p, --port <port>` — override the default port (3848)
147
79
 
148
- Configure the Playwright MCP server.
80
+ ## workflow list {#workflow-list}
149
81
 
150
82
  ```bash
151
- zibby setup-playwright
152
- zibby setup-playwright --headed --viewport-width 1920 --viewport-height 1080
83
+ zibby workflow list
153
84
  ```
154
85
 
155
- ---
86
+ Shows both local workflows (folders under `.zibby/workflows/`) and deployed ones (from cloud, scoped to projects you have access to). Output is a table with UUID, Name, Project, Version. `-` in any column means "not applicable" (e.g. local-only workflows have no UUID yet).
156
87
 
157
- ### `zibby ci-setup`
88
+ Options:
89
+ - `--local-only` — skip the cloud query
90
+ - `--remote-only` — skip the local scan
91
+ - `--project <id>` — filter to one project
158
92
 
159
- Configure Cursor Agent for CI/CD pipelines.
93
+ ## workflow deploy {#workflow-deploy}
160
94
 
161
95
  ```bash
162
- zibby ci-setup
163
- zibby ci-setup --get-keys
164
- zibby ci-setup --save
96
+ zibby workflow deploy [workflow-name]
165
97
  ```
166
98
 
167
- ---
168
-
169
- ### `zibby g workflow [name]`
170
-
171
- Scaffold a new custom workflow. Auto-generates a name if omitted.
172
-
173
- ```bash
174
- zibby g workflow ticket-triage
175
- zibby g workflow # auto-generates name
176
- ```
99
+ Two phases:
100
+ 1. Upload sources to S3 (presigned PUT). The CLI also resolves your `.zibby.config.mjs` (if present at project root) and includes it in the bundle as `zibby.config.json` — see [Bundle build](./cloud/bundles).
101
+ 2. CodeBuild downloads, runs `npm install --omit=dev`, packages a tarball, uploads it. The tarball is what each cloud execution downloads at trigger time.
177
102
 
178
- ---
103
+ After success, the CLI writes `.zibby/workflows/<name>/.zibby-deploy.json` with the canonical UUID. Commit this file.
179
104
 
180
- ### `zibby start <workflow-name>`
105
+ Options:
106
+ - `--project <id>` — skip the project picker
107
+ - `--api-key <key>` — auth via API key (or set `ZIBBY_API_KEY`)
108
+ - `--env <path>` — sync a `.env` file into per-workflow env vars after deploy. Repeatable (later files override). See [Per-workflow env vars](./cloud/env-vars).
109
+ - `--verbose` — show raw CodeBuild logs during the bundle build
181
110
 
182
- Start a local dev server for testing a custom workflow.
111
+ ## workflow trigger {#workflow-trigger}
183
112
 
184
113
  ```bash
185
- zibby start ticket-triage
186
- zibby start ticket-triage --port 3850
114
+ zibby workflow trigger <uuid>
187
115
  ```
188
116
 
189
- | Flag | Description |
190
- |---|---|
191
- | `-p, --port <port>` | Server port (default: 3848) |
192
-
193
- ---
117
+ UUID is required (or omit for interactive picker). Names aren't accepted — pass the UUID from `.zibby-deploy.json` or `workflow list`.
194
118
 
195
- ### `zibby deploy <workflow-name>`
119
+ Options:
120
+ - `-p, --param <key=value>` — input param (repeatable, highest precedence)
121
+ - `--input <json>` — input as JSON string
122
+ - `--input-file <path>` — input as JSON/YAML file (lowest precedence)
123
+ - `--idempotency-key <key>` — prevent duplicate executions
124
+ - `--api-key <key>` — auth via API key
196
125
 
197
- Deploy a custom workflow to Zibby Cloud. Returns the trigger URL and workflow UUID.
126
+ ## workflow logs {#workflow-logs}
198
127
 
199
128
  ```bash
200
- zibby deploy ticket-triage --project <id>
129
+ zibby workflow logs <uuid> # dump latest run
130
+ zibby workflow logs <uuid> -t # tail live (Heroku-style)
201
131
  ```
202
132
 
203
- | Flag | Description |
204
- |---|---|
205
- | `--project <id>` | Project ID (or `ZIBBY_PROJECT_ID` env) |
206
- | `--api-key <key>` | API key (or `ZIBBY_API_KEY` env, or session token) |
133
+ When `-t` is set and the workflow finishes, the stream waits for the next trigger of the same workflow and auto-switches to streaming it. Ctrl+C to exit.
207
134
 
208
- ---
135
+ Options:
136
+ - `-t, --follow` — live tail
137
+ - `--lines <n>` — max log lines per fetch (default: 500)
138
+ - `--all --workflow <name>` — interleaved logs from all runs (requires `--workflow`)
139
+ - `--api-key <key>` — auth via API key
209
140
 
210
- ### `zibby trigger <workflow-uuid>`
141
+ **Storage & retention.** Live logs are kept in CloudWatch for 30 days. Beyond that, the per-run session folder (uploaded to S3 at the end of every execution) is the long-term archive — pull it back with `zibby workflow download <uuid>`.
211
142
 
212
- Trigger a deployed workflow by its UUID. The CLI automatically discovers the project.
143
+ ## workflow env {#workflow-env}
213
144
 
214
- ```bash
215
- # Trigger by UUID (project auto-discovered)
216
- zibby trigger 562e48d7-ef67-4900-96b7-0d7b51a33405
217
-
218
- # Trigger by UUID with input data
219
- zibby trigger 562e48d7-ef67-4900-96b7-0d7b51a33405 \
220
- --input '{"ticket":"JIRA-123"}'
221
-
222
- # Trigger by name (requires project)
223
- zibby trigger custom-flow --project <id>
224
-
225
- # With idempotency key (prevents duplicate runs)
226
- zibby trigger 562e48d7-ef67-4900-96b7-0d7b51a33405 \
227
- --idempotency-key "daily-scan-2026-04-27"
228
- ```
229
-
230
- | Flag | Description |
231
- |---|---|
232
- | `--input <json>` | Input data as JSON string |
233
- | `--idempotency-key <key>` | Prevent duplicate executions (same key within 24h) |
234
- | `--project <id>` | Project ID (only needed if triggering by workflow name) |
235
-
236
- **After triggering, stream logs:**
145
+ Per-workflow encrypted env vars — KMS-stored on the workflow record, injected into the Fargate task at trigger time. Workflow env wins over project secrets on conflict.
237
146
 
238
147
  ```bash
239
- zibby logs 562e48d7-ef67-4900-96b7-0d7b51a33405 -t
148
+ zibby workflow env list <uuid> # show key names (no values)
149
+ zibby workflow env set <uuid> ANTHROPIC_API_KEY=sk-… # add or rotate one
150
+ zibby workflow env unset <uuid> OLD_KEY # remove one
151
+ zibby workflow env push <uuid> --file .env [--file .env.prod] # bulk replace from .env files
240
152
  ```
241
153
 
242
- ---
154
+ `push` accepts repeatable `--file` (later files override). `list` only ever returns key names — values never leave the encrypted blob.
243
155
 
244
- ### `zibby logs <workflow-uuid>`
156
+ The shortcut for first-time setup is `zibby workflow deploy --env .env`, which runs `push` automatically against the new UUID. Full guide: [Per-workflow env vars](./cloud/env-vars).
245
157
 
246
- Fetch and display logs from a workflow's latest execution.
158
+ ## workflow download {#workflow-download}
247
159
 
248
160
  ```bash
249
- # Fetch logs for latest execution (simple, one-time fetch)
250
- zibby logs 562e48d7-ef67-4900-96b7-0d7b51a33405
251
-
252
- # Stream logs in real-time (like "heroku logs -t")
253
- zibby logs 562e48d7-ef67-4900-96b7-0d7b51a33405 -t
254
-
255
- # Stream logs by workflow name
256
- zibby logs --workflow custom-flow --project <id> -t
161
+ zibby workflow download <uuid>
257
162
  ```
258
163
 
259
- | Flag | Description |
260
- |---|---|
261
- | `-t, --follow` | Stream logs in real-time via SSE (Server-Sent Events) |
262
- | `--project <id>` | Project ID (optional, auto-discovered from workflow UUID) |
263
- | `--workflow <name>` | Workflow name (fetches latest run) |
264
- | `--all` | Interleaved logs from all runs (requires `--workflow`) |
265
- | `--lines <n>` | Max log lines per fetch (default: 1000) |
266
-
267
- **How it works:**
268
-
269
- - **Without `-t`**: Fetches complete logs from CloudWatch (permanent storage) and exits. Perfect for historical logs and debugging old executions.
270
- - **With `-t`**: Streams logs in real-time via SSE from DynamoDB hot cache (24h TTL). Only works for active/recent executions. Press Ctrl+C to stop.
164
+ Pulls the deployed workflow's sources back into `.zibby/workflows/<name>/`, including the `.zibby-deploy.json` manifest. Useful when collaborators need the source from cloud.
271
165
 
272
- **Architecture:**
166
+ Options:
167
+ - `--type <type>` — for built-in workflows (`analysis`, `implementation`, `run_test`)
168
+ - `--output <dir>` — alternate output base
169
+ - `--include-default` — pull the built-in default graph if no custom one exists
273
170
 
274
- ```
275
- CloudWatch Logs (permanent) ──────────> CLI (without -t)
276
-
277
- └──> Kinesis ──> Lambda ──> DynamoDB (24h TTL) ──> SSE ──> CLI (with -t)
278
- ```
279
-
280
- ---
281
-
282
- ### `zibby workflow download`
283
-
284
- Download a workflow graph from Zibby Cloud.
171
+ ## workflow delete {#workflow-delete}
285
172
 
286
173
  ```bash
287
- zibby workflow download --type run_test
174
+ zibby workflow delete <uuid>
288
175
  ```
289
176
 
290
- ### `zibby workflow list`
177
+ Removes the workflow from cloud (and its trigger URL). Local files are not touched.
291
178
 
292
- List all workflows for a project.
179
+ ## Environment variables
293
180
 
294
- ```bash
295
- zibby workflow list
296
- ```
181
+ | Var | Purpose |
182
+ |---|---|
183
+ | `ZIBBY_API_KEY` | API key for non-interactive auth (CI). Preferred over saved session. |
184
+ | `ZIBBY_PROJECT_ID` | Default project for commands that take `--project` |
185
+ | `AGENT_TYPE` | Default agent strategy when no per-node override and no project default |
186
+ | `ZIBBY_DEPLOY_VERBOSE=1` | Same as `--verbose` on `workflow deploy` |
187
+ | `ZIBBY_SESSION_LOG=1` | Re-enable the diagnostic `[zibby:session]` log line in run output |
188
+ | `ZIBBY_RUN_DIAG=1` | Cloud runtime: dump per-copy `agent-workflow` registry state |
189
+ | `ZIBBY_DEBUG=true` | Verbose debug logs from the framework |
297
190
 
298
- ---
191
+ ## Legacy aliases
299
192
 
300
- ## Environment Variables
193
+ These still work and route to the same handlers, but new code should use the `zibby workflow <verb>` form:
301
194
 
302
- | Variable | Description |
195
+ | Legacy | Canonical |
303
196
  |---|---|
304
- | `CURSOR_API_KEY` | Cursor agent API key (required in CI, optional locally) |
305
- | `ANTHROPIC_API_KEY` | Claude agent API key |
306
- | `OPENAI_API_KEY` | Codex agent API key |
307
- | `ZIBBY_API_KEY` | Project API key for cloud sync (from dashboard Settings) |
308
- | `ZIBBY_USER_TOKEN` | Personal Access Token for CI/CD uploads |
309
- | `ZIBBY_ENV` | Environment override: `local`, `staging`, `prod` |
310
-
311
- ## Configuration File
312
-
313
- `.zibby.config.js` in your project root (ESM):
314
-
315
- ```javascript
316
- export default {
317
- agent: {
318
- cursor: { model: 'auto' },
319
- // claude: { model: 'auto' },
320
- // codex: { model: 'gpt-5.2-codex' },
321
- },
322
-
323
- paths: {
324
- specs: 'test-specs',
325
- generated: 'tests',
326
- output: '.zibby/output',
327
- },
328
-
329
- context: {
330
- filenames: ['CONTEXT.md', 'AGENTS.md'],
331
- },
332
-
333
- video: 'on',
334
- viewport: { width: 1280, height: 720 },
335
- playwrightArtifacts: true,
336
- cloudSync: false,
337
- };
338
- ```
197
+ | `zibby g workflow <name>` | `zibby workflow new <name>` |
198
+ | `zibby start <name>` | `zibby workflow start <name>` |
199
+ | `zibby run <name>` | `zibby workflow run <name>` |
200
+ | `zibby deploy [name]` | `zibby workflow deploy [name]` |
201
+ | `zibby trigger <uuid>` | `zibby workflow trigger <uuid>` |
202
+ | `zibby logs <uuid>` | `zibby workflow logs <uuid>` |
@@ -269,7 +269,7 @@ Common failure reasons:
269
269
 
270
270
  ## Local Development
271
271
 
272
- When running workflows locally (`zibby start`), you'll need to:
272
+ When running workflows locally (`zibby workflow run`), you'll need to:
273
273
  1. Set `REPOS` env var manually (JSON array)
274
274
  2. Provide `GITHUB_TOKEN` or `GITLAB_TOKEN`
275
275
  3. Ensure `git` is installed
@@ -279,7 +279,7 @@ Example for local testing:
279
279
  ```bash
280
280
  export REPOS='[{"name":"myorg/backend","provider":"github","cloneUrl":"https://github.com/myorg/backend.git"}]'
281
281
  export GITHUB_TOKEN="ghp_your_token"
282
- zibby start my-workflow
282
+ zibby workflow run my-workflow
283
283
  ```
284
284
 
285
285
  In production (cloud), these are injected automatically.
@@ -0,0 +1,92 @@
1
+ ---
2
+ sidebar_position: 3
3
+ title: Bundle build (Heroku-style)
4
+ ---
5
+
6
+ # Bundle build
7
+
8
+ When you `zibby workflow deploy`, two things happen:
9
+
10
+ 1. **Source upload** — your workflow folder (sources only, no `node_modules`) is sent to S3 via a presigned PUT URL. The CLI does this; the backend never has S3 IAM credentials for your account's bucket.
11
+ 2. **Bundle build** — a CodeBuild job downloads the sources, runs `npm install --omit=dev`, packages a tarball, uploads it back to S3.
12
+
13
+ The tarball is what the cloud runtime downloads at trigger time. **No `npm install` happens at runtime** — workflows boot in seconds regardless of dependency tree size.
14
+
15
+ ## What's in the bundle
16
+
17
+ The CLI uploads:
18
+
19
+ | File | Source | What it does |
20
+ |---|---|---|
21
+ | `graph.mjs` | `.zibby/workflows/<name>/graph.mjs` | The workflow definition. Required. |
22
+ | `nodes/*.mjs` | `.zibby/workflows/<name>/nodes/` | Per-node logic. Optional. |
23
+ | `workflow.json` | `.zibby/workflows/<name>/workflow.json` | Manifest (entry class, triggers). Optional. |
24
+ | `package.json` + `package-lock.json` | `.zibby/workflows/<name>/` | Dependency resolution. Required when graph.mjs imports `@zibby/*`. |
25
+ | `zibby.config.json` | resolved from `.zibby.config.mjs` at project root | Your config (`agent`, `models`, `browser`, …) serialized to JSON. Optional. |
26
+
27
+ `zibby.config.json` is **resolved locally at deploy time** — the CLI imports your `.zibby.config.mjs`, runs any expressions in it (e.g. `process.env.X`), then `JSON.stringify`s the result. The cloud never executes user JS to load config; it just reads the JSON. Function values are dropped silently — config is data, not code.
28
+
29
+ This is what makes per-node `models` overrides actually work in cloud:
30
+
31
+ ```js
32
+ // .zibby.config.mjs
33
+ export default {
34
+ agent: { cursor: { model: 'auto' } },
35
+ models: {
36
+ default: 'auto',
37
+ execute_live: 'claude-opus-4.6', // overrides JUST the execute_live node
38
+ },
39
+ };
40
+ ```
41
+
42
+ ## Why this matters
43
+
44
+ Without bundling, every cloud trigger would run `npm install` inside the ECS task. For a typical workflow with `@zibby/core` + a few skills, that's 30–90 seconds per cold start. With the bundle:
45
+
46
+ ```
47
+ trigger → tarball download (3s) → graph.run() → done
48
+ ```
49
+
50
+ 3-second cold start instead of 60.
51
+
52
+ ## Spinner output
53
+
54
+ ```
55
+ ⠋ Building bundle on Zibby Cloud... (provisioning) — 14s
56
+ ⠙ Building bundle on Zibby Cloud... [1/4] Downloading sources — 22s
57
+ ⠹ Building bundle on Zibby Cloud... [2/4] Materializing source files — 24s
58
+ ⠸ Building bundle on Zibby Cloud... [3/4] Installing dependencies — 32s
59
+ ⠴ Building bundle on Zibby Cloud... [4/4] Packaging bundle — 56s
60
+ ✔ Bundle ready (78s) — runtime npm install eliminated
61
+ ```
62
+
63
+ Pass `--verbose` (or set `ZIBBY_DEPLOY_VERBOSE=1`) to see the raw CodeBuild logs.
64
+
65
+ ## Re-deploys reuse the bundle path
66
+
67
+ The bundle URL is keyed by workflow UUID — re-deploys overwrite the previous bundle. Old executions in flight finish against the *previous* bundle (no rug-pull) because each ECS task downloads the tarball at the moment it starts.
68
+
69
+ ## Security model
70
+
71
+ The CodeBuild role has **zero S3 IAM permissions**. It receives presigned GET (for sources) and PUT (for bundle) URLs as build-time env vars. URLs are scoped to single keys, expire after 15 minutes.
72
+
73
+ This means a malicious `postinstall` script in a workflow's `package.json` can't escape its sandbox to read other customers' bundles or sources.
74
+
75
+ ## Bundle size
76
+
77
+ Typical: 100–200 MB compressed. Mostly node_modules. The bundle includes everything `npm install --omit=dev` produces — runtime deps only, no dev deps.
78
+
79
+ To slim it: audit your workflow's `package.json` for unused deps, and prefer the lightest agent SDK that does the job.
80
+
81
+ ## Source-fetch fallback
82
+
83
+ If the bundle is missing or fails to extract, the cloud runtime falls back to source-fetch + runtime `npm install`. Slower, but workflows still run. You'll see this in logs:
84
+
85
+ ```
86
+ [setup] Bundle extract failed (...); falling back to source install
87
+ [setup] Workflow v3 — 6 source files
88
+ [setup] Wrote 6 files
89
+ [setup] Installing dependencies...
90
+ ```
91
+
92
+ The fallback exists so a deploy that never produced a bundle (e.g. CodeBuild job hadn't completed yet) still works.