oh-my-customcode 0.87.1 → 0.87.3

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/cli/index.js CHANGED
@@ -2301,7 +2301,7 @@ var init_package = __esm(() => {
2301
2301
  workspaces: [
2302
2302
  "packages/*"
2303
2303
  ],
2304
- version: "0.87.1",
2304
+ version: "0.87.3",
2305
2305
  description: "Batteries-included agent harness for Claude Code",
2306
2306
  type: "module",
2307
2307
  bin: {
@@ -25031,6 +25031,9 @@ var en_default = {
25031
25031
  newVersionAvailable: "[Info] oh-my-customcode v{{latest}} available (current: v{{current}}). Run 'npm i -g oh-my-customcode' to upgrade.",
25032
25032
  selfUpdateDone: "✓ oh-my-customcode updated ({{from}} → {{to}})",
25033
25033
  selfUpdateFailed: "⚠ Self-update check failed — continuing with external updates",
25034
+ selfUpdateReexec: "↻ Re-executing with updated CLI (v{{version}})...",
25035
+ reexecArgvMissing: "⚠ Cannot re-exec: process.argv[1] is empty — continuing without re-exec",
25036
+ allProjectSkippedSource: " ℹ Skipped: {{name}} (source project cannot self-update)",
25034
25037
  rtkMissing: "[RTK] RTK is not installed. Attempting installation...",
25035
25038
  rtkInstalled: "[RTK] ✓ RTK installed — 60-90% token savings activated",
25036
25039
  codexMissing: "[Codex] Codex CLI is not installed. Attempting installation...",
@@ -25446,6 +25449,9 @@ var ko_default = {
25446
25449
  newVersionAvailable: "[정보] oh-my-customcode v{{latest}} 사용 가능 (현재: v{{current}}). 'npm i -g oh-my-customcode'를 실행하여 업그레이드하세요.",
25447
25450
  selfUpdateDone: "✓ oh-my-customcode 업데이트 완료 ({{from}} → {{to}})",
25448
25451
  selfUpdateFailed: "⚠ 자체 업데이트 확인 실패 — 외부 업데이트를 계속 진행합니다",
25452
+ selfUpdateReexec: "↻ 새 CLI(v{{version}})로 재실행 중...",
25453
+ reexecArgvMissing: "⚠ 재실행 불가: process.argv[1]이 비어있습니다 — 재실행 없이 계속합니다",
25454
+ allProjectSkippedSource: " ℹ 스킵: {{name}} (소스 프로젝트는 자체 업데이트할 수 없음)",
25449
25455
  rtkMissing: "[RTK] RTK가 설치되지 않았습니다. 설치를 시도합니다...",
25450
25456
  rtkInstalled: "[RTK] ✓ RTK 설치 완료 — 토큰 60-90% 절감 활성화",
25451
25457
  codexMissing: "[Codex] Codex CLI가 설치되지 않았습니다. 설치를 시도합니다...",
@@ -25930,7 +25936,7 @@ function executeSelfUpdate(options = {}) {
25930
25936
  currentVersion,
25931
25937
  packageName,
25932
25938
  cachePath: options.cachePath,
25933
- cacheTtlMs: options.cacheTtlMs,
25939
+ cacheTtlMs: options.forceRefresh ? 0 : options.cacheTtlMs,
25934
25940
  fetchLatestVersion: options.fetchLatestVersion,
25935
25941
  now: options.now,
25936
25942
  argv,
@@ -30677,6 +30683,7 @@ function syncCommand(program2) {
30677
30683
 
30678
30684
  // src/cli/update.ts
30679
30685
  init_package();
30686
+ import { constants as osConstants } from "node:os";
30680
30687
 
30681
30688
  // src/core/updater.ts
30682
30689
  init_package();
@@ -31038,6 +31045,7 @@ async function shouldSkipSelfUpdate2(targetDir, result) {
31038
31045
  if (targetPkg.name === "oh-my-customcode") {
31039
31046
  warn("update.self_update_skipped");
31040
31047
  result.success = true;
31048
+ result.skippedSource = true;
31041
31049
  result.warnings.push("Skipped: source project cannot update itself");
31042
31050
  return true;
31043
31051
  }
@@ -31455,19 +31463,46 @@ async function checkCliVersion(checkFn) {
31455
31463
  }
31456
31464
  } catch {}
31457
31465
  }
31458
- async function updateCommand(options = {}, cliVersionCheck = checkSelfUpdate) {
31459
- if (!options.skipSelf) {
31460
- try {
31461
- const selfUpdateResult = executeSelfUpdate();
31462
- if (selfUpdateResult.updated) {
31463
- console.log(i18n.t("cli.update.selfUpdateDone", {
31464
- from: selfUpdateResult.fromVersion,
31465
- to: selfUpdateResult.toVersion
31466
- }));
31466
+ function exitWithChildStatus(child) {
31467
+ if (child.signal) {
31468
+ const signalNumber = osConstants.signals[child.signal] ?? 0;
31469
+ process.exit(128 + signalNumber);
31470
+ }
31471
+ process.exit(child.status ?? 1);
31472
+ }
31473
+ async function reexecUpdatedCli(toVersion, spawnFn) {
31474
+ const cliEntry = process.argv[1];
31475
+ if (!cliEntry) {
31476
+ console.warn(i18n.t("cli.update.reexecArgvMissing"));
31477
+ return;
31478
+ }
31479
+ console.log(i18n.t("cli.update.selfUpdateReexec", { version: toVersion }));
31480
+ const { spawnSync: spawnSync4 } = await import("node:child_process");
31481
+ const child = (spawnFn ?? spawnSync4)(process.execPath, [cliEntry, ...process.argv.slice(2)], {
31482
+ stdio: "inherit",
31483
+ env: { ...process.env, OMCUSTOM_SKIP_SELF_UPDATE: "true" }
31484
+ });
31485
+ exitWithChildStatus(child);
31486
+ }
31487
+ async function handleSelfUpdate(spawnFn) {
31488
+ try {
31489
+ const selfUpdateResult = executeSelfUpdate({ forceRefresh: true });
31490
+ if (selfUpdateResult.updated) {
31491
+ console.log(i18n.t("cli.update.selfUpdateDone", {
31492
+ from: selfUpdateResult.fromVersion,
31493
+ to: selfUpdateResult.toVersion
31494
+ }));
31495
+ if (process.env.OMCUSTOM_SKIP_SELF_UPDATE !== "true") {
31496
+ await reexecUpdatedCli(selfUpdateResult.toVersion, spawnFn);
31467
31497
  }
31468
- } catch {
31469
- console.warn(i18n.t("cli.update.selfUpdateFailed"));
31470
31498
  }
31499
+ } catch {
31500
+ console.warn(i18n.t("cli.update.selfUpdateFailed"));
31501
+ }
31502
+ }
31503
+ async function updateCommand(options = {}, cliVersionCheck = checkSelfUpdate, spawnFn) {
31504
+ if (!options.skipSelf) {
31505
+ await handleSelfUpdate(spawnFn);
31471
31506
  } else {
31472
31507
  await checkCliVersion(cliVersionCheck);
31473
31508
  }
@@ -31510,6 +31545,21 @@ async function updateSingleProject(targetDir, options) {
31510
31545
  }
31511
31546
  return true;
31512
31547
  }
31548
+ function reportProjectUpdateResult(project, result, currentVersion) {
31549
+ if (result.success) {
31550
+ if (result.skippedSource) {
31551
+ console.log(i18n.t("cli.update.allProjectSkippedSource", { name: project.name }));
31552
+ return "skipped";
31553
+ }
31554
+ const from = result.previousVersion || project.version || "unknown";
31555
+ const to = result.newVersion || currentVersion;
31556
+ console.log(i18n.t("cli.update.allProjectUpdated", { from, to }));
31557
+ return "updated";
31558
+ }
31559
+ const errorMsg = result.error ?? "unknown error";
31560
+ console.log(i18n.t("cli.update.allProjectFailed", { error: errorMsg }));
31561
+ return "failed";
31562
+ }
31513
31563
  async function updateAllProjects(options) {
31514
31564
  const { findProjects: findProjects2 } = await Promise.resolve().then(() => (init_projects(), exports_projects));
31515
31565
  const currentVersion = package_default.version;
@@ -31544,14 +31594,10 @@ async function updateAllProjects(options) {
31544
31594
  hard: options.hard
31545
31595
  };
31546
31596
  const result = await update(updateOptions);
31547
- if (result.success) {
31548
- const from = result.previousVersion || project.version || "unknown";
31549
- const to = result.newVersion || currentVersion;
31550
- console.log(i18n.t("cli.update.allProjectUpdated", { from, to }));
31597
+ const outcome = reportProjectUpdateResult(project, result, currentVersion);
31598
+ if (outcome === "updated") {
31551
31599
  updatedCount++;
31552
- } else {
31553
- const errorMsg = result.error ?? "unknown error";
31554
- console.log(i18n.t("cli.update.allProjectFailed", { error: errorMsg }));
31600
+ } else if (outcome === "failed") {
31555
31601
  failedCount++;
31556
31602
  }
31557
31603
  } catch (error2) {
package/dist/index.js CHANGED
@@ -1974,7 +1974,7 @@ var package_default = {
1974
1974
  workspaces: [
1975
1975
  "packages/*"
1976
1976
  ],
1977
- version: "0.87.1",
1977
+ version: "0.87.3",
1978
1978
  description: "Batteries-included agent harness for Claude Code",
1979
1979
  type: "module",
1980
1980
  bin: {
@@ -4843,6 +4843,7 @@ async function shouldSkipSelfUpdate(targetDir, result) {
4843
4843
  if (targetPkg.name === "oh-my-customcode") {
4844
4844
  warn("update.self_update_skipped");
4845
4845
  result.success = true;
4846
+ result.skippedSource = true;
4846
4847
  result.warnings.push("Skipped: source project cannot update itself");
4847
4848
  return true;
4848
4849
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "0.87.1",
6
+ "version": "0.87.3",
7
7
  "description": "Batteries-included agent harness for Claude Code",
8
8
  "type": "module",
9
9
  "bin": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.87.1",
2
+ "version": "0.87.3",
3
3
  "lastUpdated": "2026-04-14T00:00:00.000Z",
4
4
  "components": [
5
5
  {