@pleri/olam-cli 0.1.24 → 0.1.29

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/index.js CHANGED
@@ -6824,6 +6824,47 @@ var init_dist = __esm({
6824
6824
  }
6825
6825
  });
6826
6826
 
6827
+ // src/docker-host.ts
6828
+ var docker_host_exports = {};
6829
+ __export(docker_host_exports, {
6830
+ resolveDockerHostOptions: () => resolveDockerHostOptions
6831
+ });
6832
+ import { spawnSync as spawnSync2 } from "node:child_process";
6833
+ function resolveDockerHostOptions(spawnImpl = spawnSync2) {
6834
+ if (process.env.DOCKER_HOST && process.env.DOCKER_HOST.length > 0) {
6835
+ return {};
6836
+ }
6837
+ try {
6838
+ const result = spawnImpl(
6839
+ "docker",
6840
+ ["context", "inspect", "--format", "{{.Endpoints.docker.Host}}"],
6841
+ { encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"] }
6842
+ );
6843
+ if (result.status === 0) {
6844
+ const host = (result.stdout ?? "").trim();
6845
+ if (host.startsWith("unix://")) {
6846
+ return { socketPath: host.slice("unix://".length) };
6847
+ }
6848
+ if (host.startsWith("npipe://")) {
6849
+ return { socketPath: host.slice("npipe://".length) };
6850
+ }
6851
+ if (host.startsWith("tcp://") || host.startsWith("http://") || host.startsWith("https://")) {
6852
+ const url = new URL(host.startsWith("tcp://") ? host.replace("tcp://", "http://") : host);
6853
+ const protocol = host.startsWith("https://") ? "https" : "http";
6854
+ const port = url.port ? parseInt(url.port, 10) : protocol === "https" ? 2376 : 2375;
6855
+ return { host: url.hostname, port, protocol };
6856
+ }
6857
+ }
6858
+ } catch {
6859
+ }
6860
+ return { socketPath: "/var/run/docker.sock" };
6861
+ }
6862
+ var init_docker_host = __esm({
6863
+ "src/docker-host.ts"() {
6864
+ "use strict";
6865
+ }
6866
+ });
6867
+
6827
6868
  // ../core/src/world/state.ts
6828
6869
  var VALID_TRANSITIONS, WorldStateMachine;
6829
6870
  var init_state = __esm({
@@ -11736,7 +11777,8 @@ async function loadContext() {
11736
11777
  const { PleriClient: PleriClient2 } = await Promise.resolve().then(() => (init_pleri(), pleri_exports));
11737
11778
  const config = loadConfig2(process.env.OLAM_CONFIG_DIR);
11738
11779
  const registry = new WorldRegistry3();
11739
- const computeProvider = new DockerProvider2();
11780
+ const { resolveDockerHostOptions: resolveDockerHostOptions2 } = await Promise.resolve().then(() => (init_docker_host(), docker_host_exports));
11781
+ const computeProvider = new DockerProvider2(resolveDockerHostOptions2());
11740
11782
  const dashboardManager = new DashboardManager2(config.dashboard);
11741
11783
  let pleriClient;
11742
11784
  if (config.pleri) {
@@ -12733,7 +12775,7 @@ async function runAuthStatus(getStatus) {
12733
12775
  // src/commands/auth-upgrade.ts
12734
12776
  import * as fs20 from "node:fs";
12735
12777
  import * as path23 from "node:path";
12736
- import { spawnSync as spawnSync6 } from "node:child_process";
12778
+ import { spawnSync as spawnSync7 } from "node:child_process";
12737
12779
  import ora2 from "ora";
12738
12780
  import pc7 from "picocolors";
12739
12781
 
@@ -12743,11 +12785,12 @@ import * as crypto5 from "node:crypto";
12743
12785
  import * as fs19 from "node:fs";
12744
12786
  import * as os12 from "node:os";
12745
12787
  import * as path22 from "node:path";
12746
- import { spawnSync as spawnSync3 } from "node:child_process";
12788
+ import { spawnSync as spawnSync4 } from "node:child_process";
12747
12789
  import Dockerode2 from "dockerode";
12790
+ init_docker_host();
12748
12791
 
12749
12792
  // ../core/src/util/open-url.ts
12750
- import { spawnSync as spawnSync2 } from "node:child_process";
12793
+ import { spawnSync as spawnSync3 } from "node:child_process";
12751
12794
  function openUrl(url) {
12752
12795
  if (process.env.CI === "true") {
12753
12796
  return { opened: false, reason: "CI environment detected" };
@@ -12771,7 +12814,7 @@ function openUrl(url) {
12771
12814
  args = [url];
12772
12815
  }
12773
12816
  try {
12774
- const result = spawnSync2(cmd, args, { stdio: "ignore", timeout: 5e3 });
12817
+ const result = spawnSync3(cmd, args, { stdio: "ignore", timeout: 5e3 });
12775
12818
  if (result.error) {
12776
12819
  return { opened: false, reason: `spawn ${cmd}: ${result.error.message}` };
12777
12820
  }
@@ -12851,7 +12894,7 @@ function removePid() {
12851
12894
  return true;
12852
12895
  }
12853
12896
  async function findHostCpContainer() {
12854
- const docker2 = new Dockerode2();
12897
+ const docker2 = new Dockerode2(resolveDockerHostOptions());
12855
12898
  const containers = await docker2.listContainers({ all: true });
12856
12899
  for (const c of containers) {
12857
12900
  const names = (c.Names ?? []).map((n) => n.replace(/^\//, ""));
@@ -12940,7 +12983,7 @@ async function probeHealth() {
12940
12983
  }
12941
12984
  }
12942
12985
  function runCompose(args, composeFile, extraEnv = {}) {
12943
- const result = spawnSync3("docker", ["compose", "-f", composeFile, ...args], {
12986
+ const result = spawnSync4("docker", ["compose", "-f", composeFile, ...args], {
12944
12987
  encoding: "utf-8",
12945
12988
  stdio: ["ignore", "pipe", "pipe"],
12946
12989
  env: { ...process.env, ...extraEnv }
@@ -12963,7 +13006,7 @@ function buildComposeEnv(authSecret, ghToken) {
12963
13006
  }
12964
13007
  function captureGhToken() {
12965
13008
  try {
12966
- const result = spawnSync3("gh", ["auth", "token"], {
13009
+ const result = spawnSync4("gh", ["auth", "token"], {
12967
13010
  encoding: "utf-8",
12968
13011
  stdio: ["ignore", "pipe", "pipe"]
12969
13012
  });
@@ -12990,7 +13033,7 @@ async function handleStart(opts) {
12990
13033
  return;
12991
13034
  }
12992
13035
  try {
12993
- const docker2 = new Dockerode2();
13036
+ const docker2 = new Dockerode2(resolveDockerHostOptions());
12994
13037
  await auditPortsForZombies(docker2, [HOST_CP_PORT]);
12995
13038
  } catch (err) {
12996
13039
  if (err instanceof PortHeldByZombieError) {
@@ -13030,7 +13073,7 @@ async function handleStart(opts) {
13030
13073
  await new Promise((r) => setTimeout(r, PULL_BACKOFF_MS[attempt]));
13031
13074
  }
13032
13075
  const pullResult = runCompose(
13033
- ["pull", "--quiet", "--ignore-buildable"],
13076
+ ["pull", "--quiet", "docker-socket-proxy"],
13034
13077
  composeFile,
13035
13078
  composeEnv
13036
13079
  );
@@ -13041,13 +13084,13 @@ async function handleStart(opts) {
13041
13084
  lastPullStderr = pullResult.stderr;
13042
13085
  }
13043
13086
  if (!pullOk) {
13044
- printError("docker compose pull failed after 3 attempts (sidecar image)");
13087
+ printError("docker compose pull docker-socket-proxy failed after 3 attempts");
13045
13088
  process.stderr.write(lastPullStderr);
13046
13089
  removeToken();
13047
13090
  process.exitCode = 1;
13048
13091
  return;
13049
13092
  }
13050
- const result = runCompose(["up", "-d", "--build"], composeFile, composeEnv);
13093
+ const result = runCompose(["up", "-d"], composeFile, composeEnv);
13051
13094
  if (!result.ok) {
13052
13095
  printError("docker compose up failed");
13053
13096
  process.stderr.write(result.stderr);
@@ -13320,14 +13363,14 @@ init_auth();
13320
13363
 
13321
13364
  // src/commands/bootstrap.ts
13322
13365
  init_install_root();
13323
- import { spawn as spawn2, spawnSync as spawnSync5 } from "node:child_process";
13366
+ import { spawn as spawn2, spawnSync as spawnSync6 } from "node:child_process";
13324
13367
  import { existsSync as existsSync18, readFileSync as readFileSync15 } from "node:fs";
13325
13368
  import { join as join25 } from "node:path";
13326
13369
  import ora from "ora";
13327
13370
  import pc6 from "picocolors";
13328
13371
 
13329
13372
  // src/protocol-version.ts
13330
- import { spawnSync as spawnSync4 } from "node:child_process";
13373
+ import { spawnSync as spawnSync5 } from "node:child_process";
13331
13374
  var OLAM_PROTOCOL_VERSIONS_SUPPORTED = [1];
13332
13375
  function parseProtocolVersionsLabel(labelValue) {
13333
13376
  if (!labelValue) return [];
@@ -13416,6 +13459,9 @@ var realDocker = {
13416
13459
  "--format",
13417
13460
  `{{ index .Config.Labels "${label}" }}`
13418
13461
  ]);
13462
+ },
13463
+ async tag(source, target) {
13464
+ return spawnAsync("docker", ["tag", source, target]);
13419
13465
  }
13420
13466
  };
13421
13467
  function spawnAsync(cmd, args, opts = {}) {
@@ -13476,7 +13522,7 @@ async function pullOnce(imageRef, docker2, timeoutMs) {
13476
13522
  }
13477
13523
  }
13478
13524
  var REAL_OLAM_SUBCOMMAND = (args) => {
13479
- const result = spawnSync5(process.execPath, [
13525
+ const result = spawnSync6(process.execPath, [
13480
13526
  process.argv[1] ?? "olam",
13481
13527
  ...args
13482
13528
  ], {
@@ -13569,6 +13615,24 @@ async function runBootstrap2(opts, deps = {}) {
13569
13615
  }
13570
13616
  }
13571
13617
  handshakeSpinner.succeed("Protocol handshake passed (all 3 images)");
13618
+ const tagSpinner = ora("Aliasing pulled digests as :latest").start();
13619
+ const tagPlan = [
13620
+ { name: "host-cp", from: imageRefs[0].ref, to: `${registry}/olam-host-cp:latest` },
13621
+ { name: "auth", from: imageRefs[1].ref, to: `${registry}/olam-auth:latest` },
13622
+ { name: "devbox", from: imageRefs[2].ref, to: `${registry}/olam-devbox:latest` }
13623
+ ];
13624
+ for (const { name, from, to } of tagPlan) {
13625
+ const result = await docker2.tag(from, to);
13626
+ if (result.exitCode !== 0) {
13627
+ tagSpinner.fail(`Failed to tag ${name}`);
13628
+ process.stderr.write(
13629
+ `${pc6.red("error")} docker tag ${from} ${to} failed: ${result.stderr}
13630
+ `
13631
+ );
13632
+ return { exitCode: EXIT_GENERIC_ERROR, summary: `tag failed: ${name}` };
13633
+ }
13634
+ }
13635
+ tagSpinner.succeed("Aliased 3 images as :latest");
13572
13636
  const runOlam = deps.runOlamSubcommand ?? REAL_OLAM_SUBCOMMAND;
13573
13637
  const hostCpSpinner = ora("Starting host-cp").start();
13574
13638
  const hostCp = runOlam(["host-cp", "start"]);
@@ -13720,7 +13784,7 @@ async function smokeTestCodexProvider(authSecret) {
13720
13784
  function runStep(label, cmd, args, opts = {}) {
13721
13785
  const start = Date.now();
13722
13786
  process.stdout.write(` ${pc7.dim(label.padEnd(34))}`);
13723
- const result = spawnSync6(cmd, [...args], {
13787
+ const result = spawnSync7(cmd, [...args], {
13724
13788
  encoding: "utf-8",
13725
13789
  stdio: ["ignore", "pipe", "pipe"],
13726
13790
  cwd: opts.cwd ?? process.cwd(),
@@ -13840,7 +13904,7 @@ async function runAuthUpgradePullByDigest(deps = {}) {
13840
13904
  }
13841
13905
  function defaultTagAuth(from, to) {
13842
13906
  try {
13843
- const r = spawnSync6("docker", ["tag", from, to], {
13907
+ const r = spawnSync7("docker", ["tag", from, to], {
13844
13908
  encoding: "utf-8",
13845
13909
  stdio: ["ignore", "ignore", "pipe"]
13846
13910
  });
@@ -13858,11 +13922,11 @@ function defaultTagAuth(from, to) {
13858
13922
  }
13859
13923
  async function defaultRecreateAuth() {
13860
13924
  try {
13861
- spawnSync6("docker", ["stop", "olam-auth"], {
13925
+ spawnSync7("docker", ["stop", "olam-auth"], {
13862
13926
  encoding: "utf-8",
13863
13927
  stdio: ["ignore", "ignore", "ignore"]
13864
13928
  });
13865
- spawnSync6("docker", ["rm", "olam-auth"], {
13929
+ spawnSync7("docker", ["rm", "olam-auth"], {
13866
13930
  encoding: "utf-8",
13867
13931
  stdio: ["ignore", "ignore", "ignore"]
13868
13932
  });
@@ -13931,7 +13995,7 @@ ${imageResult.stderr}`);
13931
13995
  }
13932
13996
  const stopStart = Date.now();
13933
13997
  process.stdout.write(` ${pc7.dim("docker stop olam-auth".padEnd(34))}`);
13934
- spawnSync6("docker", ["stop", "olam-auth"], {
13998
+ spawnSync7("docker", ["stop", "olam-auth"], {
13935
13999
  encoding: "utf-8",
13936
14000
  stdio: ["ignore", "pipe", "pipe"]
13937
14001
  });
@@ -13941,7 +14005,7 @@ ${imageResult.stderr}`);
13941
14005
  timings.push({ label: "container stop", durationMs: stopDurationMs });
13942
14006
  const rmStart = Date.now();
13943
14007
  process.stdout.write(` ${pc7.dim("docker rm olam-auth".padEnd(34))}`);
13944
- spawnSync6("docker", ["rm", "olam-auth"], {
14008
+ spawnSync7("docker", ["rm", "olam-auth"], {
13945
14009
  encoding: "utf-8",
13946
14010
  stdio: ["ignore", "pipe", "pipe"]
13947
14011
  });
@@ -14235,7 +14299,7 @@ ${pc8.dim("Next: olam create --name my-world")}`);
14235
14299
 
14236
14300
  // src/commands/create.ts
14237
14301
  init_manager();
14238
- import { spawnSync as spawnSync7 } from "node:child_process";
14302
+ import { spawnSync as spawnSync8 } from "node:child_process";
14239
14303
  import { existsSync as existsSync21 } from "node:fs";
14240
14304
  import { dirname as dirname14, resolve as resolve7 } from "node:path";
14241
14305
  import ora3 from "ora";
@@ -14603,7 +14667,7 @@ function registerCreate(program2) {
14603
14667
  throw err;
14604
14668
  }
14605
14669
  const spinner2 = ora3("Rebuilding olam-devbox:latest\u2026").start();
14606
- const rebuild = spawnSync7(
14670
+ const rebuild = spawnSync8(
14607
14671
  "bash",
14608
14672
  [buildScript],
14609
14673
  { cwd: repoRoot, stdio: "inherit" }
@@ -17495,7 +17559,7 @@ function registerPolicyCheck(program2) {
17495
17559
  // src/commands/upgrade.ts
17496
17560
  import * as fs24 from "node:fs";
17497
17561
  import * as path28 from "node:path";
17498
- import { spawnSync as spawnSync9 } from "node:child_process";
17562
+ import { spawnSync as spawnSync10 } from "node:child_process";
17499
17563
  import ora7 from "ora";
17500
17564
  import pc16 from "picocolors";
17501
17565
 
@@ -17503,7 +17567,7 @@ import pc16 from "picocolors";
17503
17567
  import * as fs22 from "node:fs";
17504
17568
  import * as os13 from "node:os";
17505
17569
  import * as path26 from "node:path";
17506
- import { spawnSync as spawnSync8 } from "node:child_process";
17570
+ import { spawnSync as spawnSync9 } from "node:child_process";
17507
17571
  var LOCK_FILE_PATH = path26.join(os13.homedir(), ".olam", ".upgrade.lock");
17508
17572
  var STALE_LOCK_TIMEOUT_MS = 5 * 60 * 1e3;
17509
17573
  function readLockFile(lockPath) {
@@ -17528,7 +17592,7 @@ function isPidAlive(pid) {
17528
17592
  }
17529
17593
  var PS_UNAVAILABLE = "__ps_unavailable__";
17530
17594
  function getPidCommand(pid) {
17531
- const result = spawnSync8("ps", ["-p", String(pid), "-o", "comm="], {
17595
+ const result = spawnSync9("ps", ["-p", String(pid), "-o", "comm="], {
17532
17596
  encoding: "utf-8",
17533
17597
  stdio: ["ignore", "pipe", "ignore"]
17534
17598
  });
@@ -17784,7 +17848,7 @@ function extractBundleHash(indexHtml) {
17784
17848
  function runStep2(label, cmd, args, opts = {}) {
17785
17849
  const start = Date.now();
17786
17850
  process.stdout.write(` ${pc16.dim(label.padEnd(34))}`);
17787
- const result = spawnSync9(cmd, [...args], {
17851
+ const result = spawnSync10(cmd, [...args], {
17788
17852
  encoding: "utf-8",
17789
17853
  stdio: ["ignore", "pipe", "pipe"],
17790
17854
  cwd: opts.cwd ?? process.cwd(),
@@ -17803,7 +17867,7 @@ function runStep2(label, cmd, args, opts = {}) {
17803
17867
  };
17804
17868
  }
17805
17869
  function isGitDirty(cwd) {
17806
- const result = spawnSync9("git", ["status", "--porcelain"], {
17870
+ const result = spawnSync10("git", ["status", "--porcelain"], {
17807
17871
  encoding: "utf-8",
17808
17872
  stdio: ["ignore", "pipe", "pipe"],
17809
17873
  cwd
@@ -17811,7 +17875,7 @@ function isGitDirty(cwd) {
17811
17875
  return (result.stdout ?? "").trim().length > 0;
17812
17876
  }
17813
17877
  function hasGitUpstream(cwd) {
17814
- const result = spawnSync9("git", ["rev-parse", "--abbrev-ref", "@{u}"], {
17878
+ const result = spawnSync10("git", ["rev-parse", "--abbrev-ref", "@{u}"], {
17815
17879
  encoding: "utf-8",
17816
17880
  stdio: ["ignore", "pipe", "pipe"],
17817
17881
  cwd
@@ -17819,7 +17883,7 @@ function hasGitUpstream(cwd) {
17819
17883
  return result.status === 0;
17820
17884
  }
17821
17885
  function captureHeadSha(cwd) {
17822
- const result = spawnSync9("git", ["rev-parse", "HEAD"], {
17886
+ const result = spawnSync10("git", ["rev-parse", "HEAD"], {
17823
17887
  encoding: "utf-8",
17824
17888
  stdio: ["ignore", "pipe", "pipe"],
17825
17889
  cwd
@@ -17834,7 +17898,7 @@ function abbreviateSha(sha) {
17834
17898
  }
17835
17899
  function imageExists(tag) {
17836
17900
  try {
17837
- const result = spawnSync9("docker", ["image", "inspect", "--format", "{{.Id}}", tag], {
17901
+ const result = spawnSync10("docker", ["image", "inspect", "--format", "{{.Id}}", tag], {
17838
17902
  encoding: "utf-8",
17839
17903
  stdio: ["ignore", "pipe", "ignore"]
17840
17904
  });
@@ -17849,7 +17913,7 @@ function checkRollbackSetExists(plan) {
17849
17913
  return missing.join(", ");
17850
17914
  }
17851
17915
  function smokeImage(image, targetSha) {
17852
- const createResult = spawnSync9("docker", ["create", "--name", `olam-smoke-${Date.now()}`, image], {
17916
+ const createResult = spawnSync10("docker", ["create", "--name", `olam-smoke-${Date.now()}`, image], {
17853
17917
  encoding: "utf-8",
17854
17918
  stdio: ["ignore", "pipe", "pipe"]
17855
17919
  });
@@ -17862,7 +17926,7 @@ function smokeImage(image, targetSha) {
17862
17926
  };
17863
17927
  }
17864
17928
  const containerId = (createResult.stdout ?? "").trim();
17865
- const inspectResult = spawnSync9(
17929
+ const inspectResult = spawnSync10(
17866
17930
  "docker",
17867
17931
  ["inspect", "--format", '{{index .Config.Labels "olam.build.sha"}}', image],
17868
17932
  {
@@ -17871,7 +17935,7 @@ function smokeImage(image, targetSha) {
17871
17935
  }
17872
17936
  );
17873
17937
  if (containerId.length > 0) {
17874
- spawnSync9("docker", ["rm", "-f", containerId], {
17938
+ spawnSync10("docker", ["rm", "-f", containerId], {
17875
17939
  encoding: "utf-8",
17876
17940
  stdio: ["ignore", "ignore", "ignore"]
17877
17941
  });
@@ -17910,7 +17974,7 @@ var PRODUCTION_SWAP_PLAN = [
17910
17974
  ];
17911
17975
  function dockerTag(source, dest) {
17912
17976
  try {
17913
- const result = spawnSync9("docker", ["tag", source, dest], {
17977
+ const result = spawnSync10("docker", ["tag", source, dest], {
17914
17978
  encoding: "utf-8",
17915
17979
  stdio: ["ignore", "ignore", "pipe"]
17916
17980
  });
@@ -18073,11 +18137,11 @@ async function waitForAuthHealthLocal(timeoutMs = 15e3) {
18073
18137
  async function recreateAuthService() {
18074
18138
  const start = Date.now();
18075
18139
  try {
18076
- spawnSync9("docker", ["stop", "olam-auth"], {
18140
+ spawnSync10("docker", ["stop", "olam-auth"], {
18077
18141
  encoding: "utf-8",
18078
18142
  stdio: ["ignore", "ignore", "ignore"]
18079
18143
  });
18080
- spawnSync9("docker", ["rm", "olam-auth"], {
18144
+ spawnSync10("docker", ["rm", "olam-auth"], {
18081
18145
  encoding: "utf-8",
18082
18146
  stdio: ["ignore", "ignore", "ignore"]
18083
18147
  });
@@ -18241,11 +18305,11 @@ async function runUpgradePullByDigest(deps = {}) {
18241
18305
  }
18242
18306
  async function defaultRecreateAuthForUpgrade() {
18243
18307
  try {
18244
- spawnSync9("docker", ["stop", "olam-auth"], {
18308
+ spawnSync10("docker", ["stop", "olam-auth"], {
18245
18309
  encoding: "utf-8",
18246
18310
  stdio: ["ignore", "ignore", "ignore"]
18247
18311
  });
18248
- spawnSync9("docker", ["rm", "olam-auth"], {
18312
+ spawnSync10("docker", ["rm", "olam-auth"], {
18249
18313
  encoding: "utf-8",
18250
18314
  stdio: ["ignore", "ignore", "ignore"]
18251
18315
  });
@@ -18589,7 +18653,7 @@ ${spaResult.stderr}`);
18589
18653
  process.stdout.write(` ${pc16.dim(step.label.padEnd(34))}
18590
18654
  `);
18591
18655
  const start = Date.now();
18592
- const result = spawnSync9("bash", [scriptPath], {
18656
+ const result = spawnSync10("bash", [scriptPath], {
18593
18657
  stdio: "inherit",
18594
18658
  cwd,
18595
18659
  env: { ...process.env, ...olamTagEnv }
@@ -18935,7 +18999,7 @@ function registerLogs(program2) {
18935
18999
  // src/commands/ps.ts
18936
19000
  init_context();
18937
19001
  import pc18 from "picocolors";
18938
- import { spawnSync as spawnSync10 } from "node:child_process";
19002
+ import { spawnSync as spawnSync11 } from "node:child_process";
18939
19003
  var SAFE_IDENT4 = /^[a-z0-9][a-z0-9-]{0,63}$/;
18940
19004
  function parseDockerTop(stdout) {
18941
19005
  const trimmed = stdout.trim();
@@ -19035,7 +19099,7 @@ function registerPs(program2) {
19035
19099
  const containerName = `olam-${worldId}-devbox`;
19036
19100
  let watchInterval;
19037
19101
  function fetchAndPrint() {
19038
- const result = spawnSync10(
19102
+ const result = spawnSync11(
19039
19103
  "docker",
19040
19104
  ["top", containerName, "pid", "user", "pcpu", "pmem", "stime", "stat", "cmd"],
19041
19105
  { encoding: "utf-8", timeout: 3e3 }
@@ -19548,7 +19612,7 @@ init_context();
19548
19612
  import * as fs29 from "node:fs";
19549
19613
  import * as os17 from "node:os";
19550
19614
  import * as path33 from "node:path";
19551
- import { spawnSync as spawnSync11 } from "node:child_process";
19615
+ import { spawnSync as spawnSync12 } from "node:child_process";
19552
19616
  import ora8 from "ora";
19553
19617
 
19554
19618
  // src/commands/refresh-helpers.ts
@@ -19592,7 +19656,7 @@ var RESTART_TIMEOUT_S = 30;
19592
19656
  var HEALTH_POLL_MS = 500;
19593
19657
  var HEALTH_TIMEOUT_MS = 3e4;
19594
19658
  function docker(args) {
19595
- const result = spawnSync11("docker", args, {
19659
+ const result = spawnSync12("docker", args, {
19596
19660
  encoding: "utf-8",
19597
19661
  stdio: ["ignore", "pipe", "pipe"]
19598
19662
  });
@@ -26,10 +26,24 @@
26
26
  services:
27
27
  host-cp:
28
28
  container_name: olam-host-cp
29
- build:
30
- context: .
31
- dockerfile: Dockerfile
32
- image: olam-host-cp:latest
29
+ # Image-only — operator's `olam bootstrap` pulls the digest-pinned
30
+ # `ghcr.io/pleri/olam-host-cp:latest` (digest from image-digests.json)
31
+ # and tags it as the local `:latest` BEFORE compose up. No `build:`
32
+ # in this file — fresh-install operators don't have the source tree
33
+ # so a `build:` block crashes them with "Dockerfile not found".
34
+ #
35
+ # Local-dev contributors who want to test host-cp source changes
36
+ # use the sibling compose.dev.yaml as an override:
37
+ #
38
+ # docker compose \
39
+ # -f packages/host-cp/compose.yaml \
40
+ # -f packages/host-cp/compose.dev.yaml \
41
+ # up --build -d
42
+ #
43
+ # The CLI's `olam host-cp start` always uses ONLY compose.yaml, so
44
+ # operator boots are never blocked on a missing Dockerfile / build
45
+ # context.
46
+ image: ghcr.io/pleri/olam-host-cp:latest
33
47
  ports:
34
48
  # Bind to 127.0.0.1 only — single-user-per-host assumption (T4).
35
49
  # Multi-user / TLS / remote access lands in Phase G+.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pleri/olam-cli",
3
- "version": "0.1.24",
3
+ "version": "0.1.29",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "olam": "./dist/index.js"