@replayio/app-building 1.21.0 → 1.22.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.
package/README.md CHANGED
@@ -80,7 +80,7 @@ The agent can also run `list-secrets` to see which secrets are available, and `s
80
80
 
81
81
  | Export | Description |
82
82
  |---|---|
83
- | `ContainerConfig` | `infisical` (required `InfisicalConfig`), optional `projectRoot` (local Docker only), `registry`, `flyToken`/`flyApp` (set both for remote Fly.io), `imageRef`, `webhookUrl`/`webhookSecret`, `detached`, `initialPrompt`, `localPort`, `absorbTasks`, `namePrefix` (default: `"app-building"`). |
83
+ | `ContainerConfig` | `infisical` (required `InfisicalConfig`), optional `projectRoot` (local Docker only), `registry`, `flyToken`/`flyApp` (set both for remote Fly.io), `imageRef`, `webhookUrl`/`webhookSecret`, `taskWebhookUrl` (GET endpoint for external task queue), `detached`, `initialPrompt`, `localPort`, `absorbTasks`, `namePrefix` (default: `"app-building"`). |
84
84
  | `RepoOptions` | Per-invocation git settings: `repoUrl`, `cloneBranch`, `pushBranch`. |
85
85
  | `AgentState` | Returned by `startContainer`. Contains `type`, `containerName`, `port`, `baseUrl`, and Fly-specific fields for remote containers. |
86
86
  | `ContainerRegistry` | Interface for container registry storage. Methods: `log`, `markStopped`, `clearStopped`, `getRecent`, `find`, `findAlive`. |
@@ -182,6 +182,19 @@ 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
+ ### External task queue
186
+
187
+ Set `config.taskWebhookUrl` to a GET endpoint that returns tasks to process. When the
188
+ local task queue is empty, the container GETs this URL (with the same `Bearer` token from
189
+ `webhookSecret`) and expects a JSON response:
190
+
191
+ - `{ "tasks": [{ "skill": "...", "subtasks": [...], ... }, ...] }` — process these tasks
192
+ - `{}` or `{ "tasks": [] }` — no tasks available, go idle
193
+
194
+ 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`.
197
+
185
198
  ## Webhooks
186
199
 
187
200
  Set `webhookUrl` on `ContainerConfig` to receive real-time notifications of container activity. The container POSTs JSON to that URL on key events (no retries; failures are logged to stderr). Set `webhookSecret` to include a `Bearer` token in the `Authorization` header for authenticating webhook requests.
@@ -19,6 +19,8 @@ export interface ContainerConfig {
19
19
  imageRef?: string;
20
20
  webhookUrl?: string;
21
21
  webhookSecret?: string;
22
+ /** GET endpoint to fetch the next task when the local queue is empty. Uses webhookSecret for auth. */
23
+ taskWebhookUrl?: string;
22
24
  /** Start the container in detached mode. It will exit after processing all messages and tasks. */
23
25
  detached?: boolean;
24
26
  /** Initial prompt to queue at container startup (before the HTTP server accepts external requests). */
package/dist/container.js CHANGED
@@ -102,6 +102,8 @@ function buildExtraEnv(config, containerName) {
102
102
  };
103
103
  if (config.webhookUrl)
104
104
  extra.WEBHOOK_URL = config.webhookUrl;
105
+ if (config.taskWebhookUrl)
106
+ extra.TASK_WEBHOOK_URL = config.taskWebhookUrl;
105
107
  if (config.webhookSecret)
106
108
  extra.WEBHOOK_SECRET = config.webhookSecret;
107
109
  if (config.detached)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replayio/app-building",
3
- "version": "1.21.0",
3
+ "version": "1.22.0",
4
4
  "description": "Library for managing agentic app-building containers",
5
5
  "type": "module",
6
6
  "exports": {