@replayio/app-building 1.29.0 → 1.31.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), `flyGuest` (override Fly Machine guest sizing; default: 16 performance CPUs / 32 GiB), `flyVolumeSizeGb` (override Fly Volume size in GiB; default: 50), `imageRef`, `webhookUrl`/`webhookSecret`, `taskWebhookUrl` (GET endpoint for external task queue), `addTaskWebhookUrl` (POST endpoint for tasks added by `add-task` script), `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), `flyGuest` (override Fly Machine guest sizing; default: 16 performance CPUs / 32 GiB), `flyVolumeSizeGb` (override Fly Volume size in GiB; default: 50), `imageRef`, `webhookUrl`/`webhookSecret`, `taskWebhookUrl` (GET endpoint for external task queue), `addTaskWebhookUrl` (POST endpoint for tasks added by `add-task` script), `detached`, `initialPrompt`, `localPort`, `absorbTasks`, `namePrefix` (default: `"app-building"`), `env` (extra env vars to inject into the container; cannot clobber package-reserved vars). |
84
84
  | `FlyGuest` | Fly Machine guest spec: `cpu_kind` (`"shared"` \| `"performance"`), `cpus`, `memory_mb`. |
85
85
  | `RepoOptions` | Per-invocation git settings: `repoUrl`, `cloneBranch`, `pushBranch`. |
86
86
  | `AgentState` | Returned by `startContainer`. Contains `type`, `containerName`, `port`, `baseUrl`, and Fly-specific fields for remote containers. |
package/dist/index.d.ts CHANGED
@@ -119,6 +119,12 @@ interface ContainerConfig {
119
119
  flyGuest?: FlyGuest;
120
120
  /** Override the Fly Volume size in GiB. Default: 50. */
121
121
  flyVolumeSizeGb?: number;
122
+ /**
123
+ * Extra environment variables to inject into the container. Reserved vars
124
+ * set by the package (PORT, CONTAINER_NAME, WEBHOOK_URL, INFISICAL_*, etc.)
125
+ * always take precedence — values here cannot clobber them.
126
+ */
127
+ env?: Record<string, string>;
122
128
  }
123
129
  interface RepoOptions {
124
130
  repoUrl: string;
package/dist/index.js CHANGED
@@ -137,10 +137,6 @@ async function destroyMachine(app, token, machineId, volumeId) {
137
137
  });
138
138
  }
139
139
  }
140
- async function listMachines(app, token) {
141
- const res = await flyFetch(`/apps/${app}/machines`, token);
142
- return await res.json();
143
- }
144
140
  async function listVolumes(app, token) {
145
141
  const res = await flyFetch(`/apps/${app}/volumes`, token);
146
142
  return await res.json();
@@ -245,6 +241,7 @@ function buildContainerEnv(repo, infisical, extra = {}) {
245
241
  }
246
242
  function buildExtraEnv(config, containerName) {
247
243
  const extra = {
244
+ ...config.env,
248
245
  PORT: "3000",
249
246
  CONTAINER_NAME: containerName
250
247
  };
@@ -340,13 +337,6 @@ async function startRemoteContainerImpl(config, repo) {
340
337
  const machineName = `${prefix}-${uniqueId}`;
341
338
  const extra = buildExtraEnv(config, machineName);
342
339
  const containerEnv = buildContainerEnv(repo, config.infisical, extra);
343
- const existing = await listMachines(config.flyApp, config.flyToken);
344
- if (existing.length > 0) {
345
- console.log(`${existing.length} existing machine(s) in ${config.flyApp}:`);
346
- for (const m of existing) {
347
- console.log(` ${m.id} (${m.name}) \u2014 ${m.state}`);
348
- }
349
- }
350
340
  console.log("Creating Fly machine (with volume)...");
351
341
  let machineId = "";
352
342
  let volumeId = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replayio/app-building",
3
- "version": "1.29.0",
3
+ "version": "1.31.0",
4
4
  "description": "Library for managing agentic app-building containers",
5
5
  "type": "module",
6
6
  "exports": {