@pleri/olam-cli 0.1.96 → 0.1.98
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/dist/image-digests.json +3 -3
- package/dist/index.js +43 -22
- package/dist/mcp-server.js +43 -22
- package/package.json +1 -1
package/dist/image-digests.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"auth": "sha256:a985e5fb7cce881316e5bb005195255008c884aede2344151485937e7f7304a2",
|
|
3
|
-
"devbox": "sha256:
|
|
4
|
-
"host-cp": "sha256:
|
|
3
|
+
"devbox": "sha256:8cad96f1f8d71608ce61f2780a29e81afb89d9a33d2d5b3e3b45ac66a988dfb9",
|
|
4
|
+
"host-cp": "sha256:37a8d675fe57b282a81568156eba4c2b9496e6371e8930674f91adb317247d7b",
|
|
5
5
|
"mcp-auth": "sha256:e47169ad3fbc9cab216248fecbc56874343a5daab84b1f18d67529b7d415cf95",
|
|
6
6
|
"$schema_version": 1,
|
|
7
|
-
"$published_version": "0.1.
|
|
7
|
+
"$published_version": "0.1.98",
|
|
8
8
|
"$registry": "ghcr.io/pleri"
|
|
9
9
|
}
|
package/dist/index.js
CHANGED
|
@@ -10548,31 +10548,33 @@ function planManifestPipeline(repos, baselineServices, worldId, branch, portOffs
|
|
|
10548
10548
|
}
|
|
10549
10549
|
return { services: mergedServices, crossRepoEnv };
|
|
10550
10550
|
}
|
|
10551
|
-
async function runManifestRuntime(containerName, worldId, repos, exec) {
|
|
10551
|
+
async function runManifestRuntime(containerName, worldId, repos, exec, opts = {}) {
|
|
10552
10552
|
const hasAnyManifest = repos.some((r) => r.manifest !== void 0);
|
|
10553
10553
|
if (!hasAnyManifest)
|
|
10554
10554
|
return {};
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
const
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10555
|
+
if (!opts.skipBootstrap) {
|
|
10556
|
+
const bootstrapTasks = [];
|
|
10557
|
+
for (const repo of repos) {
|
|
10558
|
+
const bootstrap = repo.manifest?.bootstrap;
|
|
10559
|
+
if (!bootstrap || bootstrap.length === 0)
|
|
10560
|
+
continue;
|
|
10561
|
+
if (repo.setup_commands.length > 0) {
|
|
10562
|
+
console.warn(`[manifest] step 4e' both bootstrap[] and setup_commands populated for "${repo.name}". HARD-STOP semantics apply to bootstrap[] (OQ9): if any bootstrap step exits non-zero, the world transitions to 'error' and the legacy setup_commands path will NOT run as a fallback. Migrate setup_commands \u2192 manifest.bootstrap and remove the duplicate.`);
|
|
10563
|
+
}
|
|
10564
|
+
const workdir = `/home/olam/workspace/${repo.name}`;
|
|
10565
|
+
const cmds = bootstrap.map(bootstrapStepCmd);
|
|
10566
|
+
console.log(`[manifest] step 4e bootstrap "${repo.name}" (${cmds.length} steps)`);
|
|
10567
|
+
bootstrapTasks.push((async () => {
|
|
10568
|
+
await runBootstrap(containerName, workdir, cmds, exec);
|
|
10569
|
+
console.log(`[manifest] step 4e bootstrap "${repo.name}" complete`);
|
|
10570
|
+
})());
|
|
10562
10571
|
}
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
})());
|
|
10570
|
-
}
|
|
10571
|
-
if (bootstrapTasks.length > 0) {
|
|
10572
|
-
const results = await Promise.allSettled(bootstrapTasks);
|
|
10573
|
-
const firstFailure = results.find((r) => r.status === "rejected");
|
|
10574
|
-
if (firstFailure && firstFailure.status === "rejected") {
|
|
10575
|
-
throw firstFailure.reason;
|
|
10572
|
+
if (bootstrapTasks.length > 0) {
|
|
10573
|
+
const results = await Promise.allSettled(bootstrapTasks);
|
|
10574
|
+
const firstFailure = results.find((r) => r.status === "rejected");
|
|
10575
|
+
if (firstFailure && firstFailure.status === "rejected") {
|
|
10576
|
+
throw firstFailure.reason;
|
|
10577
|
+
}
|
|
10576
10578
|
}
|
|
10577
10579
|
}
|
|
10578
10580
|
const supervisedRepos = [];
|
|
@@ -10983,7 +10985,7 @@ ${detail}`);
|
|
|
10983
10985
|
}
|
|
10984
10986
|
}
|
|
10985
10987
|
const appPorts = [];
|
|
10986
|
-
for (const repo of
|
|
10988
|
+
for (const repo of enrichedRepos) {
|
|
10987
10989
|
const manifestPort = repo.manifest?.app?.port;
|
|
10988
10990
|
const centralPort = repo.app_port;
|
|
10989
10991
|
const port = manifestPort ?? centralPort;
|
|
@@ -11236,6 +11238,25 @@ ${detail}`);
|
|
|
11236
11238
|
const msg = err instanceof Error ? err.message : String(err);
|
|
11237
11239
|
console.warn(`[manifest] WARN: bootstrap failure allowed by --allow-bootstrap-failure: ${msg}`);
|
|
11238
11240
|
console.warn(`[manifest] WARN: world ${worldId} stays running; rerun the failing step manually inside the world if needed.`);
|
|
11241
|
+
try {
|
|
11242
|
+
await runManifestRuntime(containerName, worldId, enrichedRepos, this.dockerExec, { skipBootstrap: true });
|
|
11243
|
+
} catch (supervisorErr) {
|
|
11244
|
+
if (supervisorErr instanceof PortInUseError) {
|
|
11245
|
+
sm.transition("error");
|
|
11246
|
+
this.registry.update(worldId, { status: "error" });
|
|
11247
|
+
try {
|
|
11248
|
+
await this.provider.destroyWorld(worldId);
|
|
11249
|
+
} catch {
|
|
11250
|
+
}
|
|
11251
|
+
try {
|
|
11252
|
+
await removeWorktrees(repos, workspacePath);
|
|
11253
|
+
} catch {
|
|
11254
|
+
}
|
|
11255
|
+
throw supervisorErr;
|
|
11256
|
+
}
|
|
11257
|
+
const supervisorMsg = supervisorErr instanceof Error ? supervisorErr.message : String(supervisorErr);
|
|
11258
|
+
console.warn(`[manifest] WARN: step 4f/4g failed after bootstrap-failure escape hatch: ${supervisorMsg}`);
|
|
11259
|
+
}
|
|
11239
11260
|
} else if (err instanceof BootstrapStepError || err instanceof PortInUseError || err instanceof EnvSubstCycleError || err instanceof EnvSubstDepthExceededError) {
|
|
11240
11261
|
sm.transition("error");
|
|
11241
11262
|
this.registry.update(worldId, { status: "error" });
|
package/dist/mcp-server.js
CHANGED
|
@@ -31611,31 +31611,33 @@ function planManifestPipeline(repos, baselineServices, worldId, branch, portOffs
|
|
|
31611
31611
|
}
|
|
31612
31612
|
return { services: mergedServices, crossRepoEnv };
|
|
31613
31613
|
}
|
|
31614
|
-
async function runManifestRuntime(containerName, worldId, repos, exec) {
|
|
31614
|
+
async function runManifestRuntime(containerName, worldId, repos, exec, opts = {}) {
|
|
31615
31615
|
const hasAnyManifest = repos.some((r) => r.manifest !== void 0);
|
|
31616
31616
|
if (!hasAnyManifest)
|
|
31617
31617
|
return {};
|
|
31618
|
-
|
|
31619
|
-
|
|
31620
|
-
const
|
|
31621
|
-
|
|
31622
|
-
|
|
31623
|
-
|
|
31624
|
-
|
|
31618
|
+
if (!opts.skipBootstrap) {
|
|
31619
|
+
const bootstrapTasks = [];
|
|
31620
|
+
for (const repo of repos) {
|
|
31621
|
+
const bootstrap = repo.manifest?.bootstrap;
|
|
31622
|
+
if (!bootstrap || bootstrap.length === 0)
|
|
31623
|
+
continue;
|
|
31624
|
+
if (repo.setup_commands.length > 0) {
|
|
31625
|
+
console.warn(`[manifest] step 4e' both bootstrap[] and setup_commands populated for "${repo.name}". HARD-STOP semantics apply to bootstrap[] (OQ9): if any bootstrap step exits non-zero, the world transitions to 'error' and the legacy setup_commands path will NOT run as a fallback. Migrate setup_commands \u2192 manifest.bootstrap and remove the duplicate.`);
|
|
31626
|
+
}
|
|
31627
|
+
const workdir = `/home/olam/workspace/${repo.name}`;
|
|
31628
|
+
const cmds = bootstrap.map(bootstrapStepCmd);
|
|
31629
|
+
console.log(`[manifest] step 4e bootstrap "${repo.name}" (${cmds.length} steps)`);
|
|
31630
|
+
bootstrapTasks.push((async () => {
|
|
31631
|
+
await runBootstrap(containerName, workdir, cmds, exec);
|
|
31632
|
+
console.log(`[manifest] step 4e bootstrap "${repo.name}" complete`);
|
|
31633
|
+
})());
|
|
31625
31634
|
}
|
|
31626
|
-
|
|
31627
|
-
|
|
31628
|
-
|
|
31629
|
-
|
|
31630
|
-
|
|
31631
|
-
|
|
31632
|
-
})());
|
|
31633
|
-
}
|
|
31634
|
-
if (bootstrapTasks.length > 0) {
|
|
31635
|
-
const results = await Promise.allSettled(bootstrapTasks);
|
|
31636
|
-
const firstFailure = results.find((r) => r.status === "rejected");
|
|
31637
|
-
if (firstFailure && firstFailure.status === "rejected") {
|
|
31638
|
-
throw firstFailure.reason;
|
|
31635
|
+
if (bootstrapTasks.length > 0) {
|
|
31636
|
+
const results = await Promise.allSettled(bootstrapTasks);
|
|
31637
|
+
const firstFailure = results.find((r) => r.status === "rejected");
|
|
31638
|
+
if (firstFailure && firstFailure.status === "rejected") {
|
|
31639
|
+
throw firstFailure.reason;
|
|
31640
|
+
}
|
|
31639
31641
|
}
|
|
31640
31642
|
}
|
|
31641
31643
|
const supervisedRepos = [];
|
|
@@ -32010,7 +32012,7 @@ ${detail}`);
|
|
|
32010
32012
|
}
|
|
32011
32013
|
}
|
|
32012
32014
|
const appPorts = [];
|
|
32013
|
-
for (const repo of
|
|
32015
|
+
for (const repo of enrichedRepos) {
|
|
32014
32016
|
const manifestPort = repo.manifest?.app?.port;
|
|
32015
32017
|
const centralPort = repo.app_port;
|
|
32016
32018
|
const port = manifestPort ?? centralPort;
|
|
@@ -32263,6 +32265,25 @@ ${detail}`);
|
|
|
32263
32265
|
const msg = err instanceof Error ? err.message : String(err);
|
|
32264
32266
|
console.warn(`[manifest] WARN: bootstrap failure allowed by --allow-bootstrap-failure: ${msg}`);
|
|
32265
32267
|
console.warn(`[manifest] WARN: world ${worldId} stays running; rerun the failing step manually inside the world if needed.`);
|
|
32268
|
+
try {
|
|
32269
|
+
await runManifestRuntime(containerName, worldId, enrichedRepos, this.dockerExec, { skipBootstrap: true });
|
|
32270
|
+
} catch (supervisorErr) {
|
|
32271
|
+
if (supervisorErr instanceof PortInUseError) {
|
|
32272
|
+
sm.transition("error");
|
|
32273
|
+
this.registry.update(worldId, { status: "error" });
|
|
32274
|
+
try {
|
|
32275
|
+
await this.provider.destroyWorld(worldId);
|
|
32276
|
+
} catch {
|
|
32277
|
+
}
|
|
32278
|
+
try {
|
|
32279
|
+
await removeWorktrees(repos, workspacePath);
|
|
32280
|
+
} catch {
|
|
32281
|
+
}
|
|
32282
|
+
throw supervisorErr;
|
|
32283
|
+
}
|
|
32284
|
+
const supervisorMsg = supervisorErr instanceof Error ? supervisorErr.message : String(supervisorErr);
|
|
32285
|
+
console.warn(`[manifest] WARN: step 4f/4g failed after bootstrap-failure escape hatch: ${supervisorMsg}`);
|
|
32286
|
+
}
|
|
32266
32287
|
} else if (err instanceof BootstrapStepError || err instanceof PortInUseError || err instanceof EnvSubstCycleError || err instanceof EnvSubstDepthExceededError) {
|
|
32267
32288
|
sm.transition("error");
|
|
32268
32289
|
this.registry.update(worldId, { status: "error" });
|