@replayio/app-building 1.22.0 → 1.24.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 (3) hide show
  1. package/README.md +18 -4
  2. package/dist/fly.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -182,6 +182,21 @@ Set `config.absorbTasks = true` to have the container absorb task files from oth
182
182
  at startup. This is off by default. When enabled, the container scans `tasks/` for task files
183
183
  belonging to other containers, merges their tasks into its own queue, and deletes the foreign files.
184
184
 
185
+ ### Task structure
186
+
187
+ Each task in the queue (local or webhook) has the following fields:
188
+
189
+ | Field | Type | Required | Description |
190
+ |---|---|---|---|
191
+ | `id` | `string` | Auto-assigned | UUID for coordination. Auto-assigned by `add-task` if not provided. Included in `task.started`/`task.done` webhook events. |
192
+ | `skill` | `string` | Yes | Path to the skill file (e.g. `skills/tasks/build/writeApp.md`). |
193
+ | `subtasks` | `string[]` | Yes | List of subtask descriptions. |
194
+ | `app` | `string` | No | App name (directory under `apps/`). |
195
+ | `prompt` | `string` | No | Raw prompt for message-derived tasks (no skill file). |
196
+ | `command` | `string` | No | Custom command to run instead of the default `claude` CLI. |
197
+ | `maxAttempts` | `number` | No | Maximum attempts before giving up. Default: 5. |
198
+ | `timeoutMinutes` | `number` | No | Per-attempt time limit in minutes. Agent is killed if exceeded. |
199
+
185
200
  ### External task queue
186
201
 
187
202
  Set `config.taskWebhookUrl` to a GET endpoint that returns tasks to process. When the
@@ -192,8 +207,7 @@ local task queue is empty, the container GETs this URL (with the same `Bearer` t
192
207
  - `{}` or `{ "tasks": [] }` — no tasks available, go idle
193
208
 
194
209
  The first task is processed immediately; any remaining tasks are added to the local queue.
195
- Tasks support the same fields as local tasks: `skill`, `subtasks`, `app`, `command`,
196
- `maxAttempts`, `timeoutMinutes`.
210
+ Tasks use the same structure documented above.
197
211
 
198
212
  ## Webhooks
199
213
 
@@ -231,8 +245,8 @@ Every POST body has this shape:
231
245
  | `message.started` | Message processing begins | `iteration`, `prompt` |
232
246
  | `message.done` | Message processing complete | `messageId`, `cost_usd`, `duration_ms`, `num_turns` |
233
247
  | `message.error` | Message processing failed | `messageId`, `error` |
234
- | `task.started` | Task processing begins | `iteration`, `skill`, `subtasks`, `prompt` |
235
- | `task.done` | Task processing complete | `skill`, `subtasks`, `prompt`, `cost`, `totalCost`, `failed`, `pendingTasks`, `duration_ms` |
248
+ | `task.started` | Task processing begins | `id`, `iteration`, `skill`, `subtasks`, `prompt` |
249
+ | `task.done` | Task processing complete | `id`, `skill`, `subtasks`, `prompt`, `cost`, `totalCost`, `failed`, `pendingTasks`, `duration_ms` |
236
250
  | `log` | Each log line | `line` |
237
251
 
238
252
  ### Example
package/dist/fly.js CHANGED
@@ -135,7 +135,7 @@ export async function createMachine(app, token, image, env, name) {
135
135
  catch (err) {
136
136
  await deleteVolume(app, token, volumeId).catch(() => { });
137
137
  const msg = err instanceof Error ? err.message : String(err);
138
- if (msg.includes("412")) {
138
+ if (msg.includes("412") || msg.includes("insufficient")) {
139
139
  console.log(`Insufficient resources in ${region}, trying next region...`);
140
140
  continue;
141
141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replayio/app-building",
3
- "version": "1.22.0",
3
+ "version": "1.24.0",
4
4
  "description": "Library for managing agentic app-building containers",
5
5
  "type": "module",
6
6
  "exports": {