@replayio/app-building 1.19.1 → 1.20.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 +1 -1
- package/dist/container.d.ts +2 -0
- package/dist/container.js +4 -2
- package/package.json +1 -1
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
|
|
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"`). |
|
|
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`. |
|
package/dist/container.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export interface ContainerConfig {
|
|
|
27
27
|
localPort?: number;
|
|
28
28
|
/** Absorb task files from other containers at startup. Default: false. */
|
|
29
29
|
absorbTasks?: boolean;
|
|
30
|
+
/** Container name prefix. Default: "app-building". */
|
|
31
|
+
namePrefix?: string;
|
|
30
32
|
}
|
|
31
33
|
export interface RepoOptions {
|
|
32
34
|
repoUrl: string;
|
package/dist/container.js
CHANGED
|
@@ -121,7 +121,8 @@ function isRemote(config) {
|
|
|
121
121
|
async function startLocalContainer(config, repo) {
|
|
122
122
|
buildImage(config);
|
|
123
123
|
const uniqueId = Math.random().toString(36).slice(2, 8);
|
|
124
|
-
const
|
|
124
|
+
const prefix = config.namePrefix ?? "app-building";
|
|
125
|
+
const containerName = `${prefix}-${uniqueId}`;
|
|
125
126
|
const containerPort = 3000;
|
|
126
127
|
const hostPort = config.localPort ?? findFreePort();
|
|
127
128
|
const extra = buildExtraEnv(config, containerName);
|
|
@@ -195,7 +196,8 @@ async function startRemoteContainerImpl(config, repo) {
|
|
|
195
196
|
throw new Error("flyApp is required for remote containers");
|
|
196
197
|
const imageRef = config.imageRef ?? getImageRef();
|
|
197
198
|
const uniqueId = Math.random().toString(36).slice(2, 8);
|
|
198
|
-
const
|
|
199
|
+
const prefix = config.namePrefix ?? "app-building";
|
|
200
|
+
const machineName = `${prefix}-${uniqueId}`;
|
|
199
201
|
const extra = buildExtraEnv(config, machineName);
|
|
200
202
|
const containerEnv = buildContainerEnv(repo, config.infisical, extra);
|
|
201
203
|
const existing = await listMachines(config.flyApp, config.flyToken);
|