oh-my-customcode 0.47.0 → 0.47.1

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
@@ -9323,7 +9323,7 @@ var init_package = __esm(() => {
9323
9323
  package_default = {
9324
9324
  name: "oh-my-customcode",
9325
9325
  workspaces: ["packages/*"],
9326
- version: "0.47.0",
9326
+ version: "0.47.1",
9327
9327
  description: "Batteries-included agent harness for Claude Code",
9328
9328
  type: "module",
9329
9329
  bin: {
@@ -26944,7 +26944,7 @@ async function doctorCommand(options = {}) {
26944
26944
 
26945
26945
  // src/cli/init.ts
26946
26946
  init_package();
26947
- import { join as join11 } from "node:path";
26947
+ import { join as join10 } from "node:path";
26948
26948
 
26949
26949
  // src/core/installer.ts
26950
26950
  init_fs();
@@ -27801,85 +27801,6 @@ async function checkUvAvailable() {
27801
27801
  init_fs();
27802
27802
  init_projects();
27803
27803
 
27804
- // src/cli/serve.ts
27805
- import { spawn } from "node:child_process";
27806
- import { existsSync as existsSync2 } from "node:fs";
27807
- import { readFile as readFile2, unlink, writeFile as writeFile2 } from "node:fs/promises";
27808
- import { join as join10 } from "node:path";
27809
- var DEFAULT_PORT = 4321;
27810
- var PID_FILE = join10(process.env.HOME ?? "~", ".omcustom-serve.pid");
27811
- function findServeBuildDir(projectRoot, options) {
27812
- const localBuild = join10(projectRoot, "packages", "serve", "build");
27813
- if (existsSync2(join10(localBuild, "index.js")))
27814
- return localBuild;
27815
- if (options?.skipNpmFallback !== true) {
27816
- const npmBuild = join10(import.meta.dirname, "..", "..", "packages", "serve", "build");
27817
- if (existsSync2(join10(npmBuild, "index.js")))
27818
- return npmBuild;
27819
- }
27820
- return null;
27821
- }
27822
- async function isServeRunning() {
27823
- try {
27824
- const raw = await readFile2(PID_FILE, "utf-8");
27825
- const pid = Number(raw.trim());
27826
- if (!Number.isFinite(pid) || pid <= 0) {
27827
- await cleanupPidFile();
27828
- return false;
27829
- }
27830
- process.kill(pid, 0);
27831
- return true;
27832
- } catch {
27833
- await cleanupPidFile();
27834
- return false;
27835
- }
27836
- }
27837
- async function startServeBackground(projectRoot, port = DEFAULT_PORT, buildDirOpts) {
27838
- if (await isServeRunning()) {
27839
- return;
27840
- }
27841
- const buildDir = findServeBuildDir(projectRoot, buildDirOpts);
27842
- if (buildDir === null) {
27843
- return;
27844
- }
27845
- const child = spawn("node", [join10(buildDir, "index.js")], {
27846
- env: {
27847
- ...process.env,
27848
- OMCUSTOM_PORT: String(port),
27849
- OMCUSTOM_HOST: "localhost",
27850
- OMCUSTOM_ORIGIN: `http://localhost:${port}`,
27851
- OMX_PROJECT_ROOT: projectRoot
27852
- },
27853
- stdio: "ignore",
27854
- detached: true
27855
- });
27856
- child.unref();
27857
- if (child.pid !== undefined) {
27858
- await writeFile2(PID_FILE, String(child.pid), "utf-8");
27859
- }
27860
- }
27861
- async function stopServe() {
27862
- try {
27863
- const raw = await readFile2(PID_FILE, "utf-8");
27864
- const pid = Number(raw.trim());
27865
- if (!Number.isFinite(pid) || pid <= 0) {
27866
- await cleanupPidFile();
27867
- return false;
27868
- }
27869
- process.kill(pid, "SIGTERM");
27870
- await cleanupPidFile();
27871
- return true;
27872
- } catch {
27873
- await cleanupPidFile();
27874
- return false;
27875
- }
27876
- }
27877
- async function cleanupPidFile() {
27878
- try {
27879
- await unlink(PID_FILE);
27880
- } catch {}
27881
- }
27882
-
27883
27804
  // node_modules/.bun/@clack+core@1.1.0/node_modules/@clack/core/dist/index.mjs
27884
27805
  import { styleText as D } from "node:util";
27885
27806
  import { stdout as R, stdin as q } from "node:process";
@@ -28857,7 +28778,7 @@ async function runInitWizard(options) {
28857
28778
  // src/cli/init.ts
28858
28779
  async function checkExistingInstallation(targetDir) {
28859
28780
  const layout = getProviderLayout();
28860
- const rootDir = join11(targetDir, layout.rootDir);
28781
+ const rootDir = join10(targetDir, layout.rootDir);
28861
28782
  return fileExists(rootDir);
28862
28783
  }
28863
28784
  var PROVIDER_SUBDIR_COMPONENTS = new Set([
@@ -28871,13 +28792,13 @@ var PROVIDER_SUBDIR_COMPONENTS = new Set([
28871
28792
  function componentToPath(targetDir, component) {
28872
28793
  if (component === "entry-md") {
28873
28794
  const layout = getProviderLayout();
28874
- return join11(targetDir, layout.entryFile);
28795
+ return join10(targetDir, layout.entryFile);
28875
28796
  }
28876
28797
  if (PROVIDER_SUBDIR_COMPONENTS.has(component)) {
28877
28798
  const layout = getProviderLayout();
28878
- return join11(targetDir, layout.rootDir, component);
28799
+ return join10(targetDir, layout.rootDir, component);
28879
28800
  }
28880
- return join11(targetDir, component);
28801
+ return join10(targetDir, component);
28881
28802
  }
28882
28803
  function buildInstalledPaths(targetDir, components) {
28883
28804
  return components.map((component) => componentToPath(targetDir, component));
@@ -28983,8 +28904,6 @@ async function initCommand(options) {
28983
28904
  console.log(" /plugin install context7");
28984
28905
  console.log("");
28985
28906
  console.log('See CLAUDE.md "외부 의존성" section for details.');
28986
- await startServeBackground(targetDir).catch(() => {});
28987
- console.log(`Web UI: http://127.0.0.1:${DEFAULT_PORT}`);
28988
28907
  return {
28989
28908
  success: true,
28990
28909
  message: i18n.t("cli.init.success"),
@@ -28998,7 +28917,7 @@ async function initCommand(options) {
28998
28917
  }
28999
28918
 
29000
28919
  // src/cli/list.ts
29001
- import { basename as basename4, dirname as dirname4, join as join12, relative as relative3 } from "node:path";
28920
+ import { basename as basename4, dirname as dirname4, join as join11, relative as relative3 } from "node:path";
29002
28921
  init_fs();
29003
28922
  var ALLOWED_TOP_LEVEL_KEYS = new Set(["name", "type", "description", "version", "category"]);
29004
28923
  function parseKeyValue(line) {
@@ -29063,12 +28982,12 @@ function extractAgentTypeFromFilename(filename) {
29063
28982
  return prefixMap[prefix] || "unknown";
29064
28983
  }
29065
28984
  function extractSkillCategoryFromPath(skillPath, baseDir, rootDir) {
29066
- const relativePath = relative3(join12(baseDir, rootDir, "skills"), skillPath);
28985
+ const relativePath = relative3(join11(baseDir, rootDir, "skills"), skillPath);
29067
28986
  const parts = relativePath.split("/").filter(Boolean);
29068
28987
  return parts[0] || "unknown";
29069
28988
  }
29070
28989
  function extractGuideCategoryFromPath(guidePath, baseDir) {
29071
- const relativePath = relative3(join12(baseDir, "guides"), guidePath);
28990
+ const relativePath = relative3(join11(baseDir, "guides"), guidePath);
29072
28991
  const parts = relativePath.split("/").filter(Boolean);
29073
28992
  return parts[0] || "unknown";
29074
28993
  }
@@ -29162,7 +29081,7 @@ async function tryExtractMarkdownDescription(mdPath, options = {}) {
29162
29081
  }
29163
29082
  }
29164
29083
  async function getAgents(targetDir, rootDir = ".claude", config) {
29165
- const agentsDir = join12(targetDir, rootDir, "agents");
29084
+ const agentsDir = join11(targetDir, rootDir, "agents");
29166
29085
  if (!await fileExists(agentsDir))
29167
29086
  return [];
29168
29087
  try {
@@ -29190,7 +29109,7 @@ async function getAgents(targetDir, rootDir = ".claude", config) {
29190
29109
  }
29191
29110
  }
29192
29111
  async function getSkills(targetDir, rootDir = ".claude", config) {
29193
- const skillsDir = join12(targetDir, rootDir, "skills");
29112
+ const skillsDir = join11(targetDir, rootDir, "skills");
29194
29113
  if (!await fileExists(skillsDir))
29195
29114
  return [];
29196
29115
  try {
@@ -29200,7 +29119,7 @@ async function getSkills(targetDir, rootDir = ".claude", config) {
29200
29119
  const skillMdFiles = await listFiles(skillsDir, { recursive: true, pattern: "SKILL.md" });
29201
29120
  const skills = await Promise.all(skillMdFiles.map(async (skillMdPath) => {
29202
29121
  const skillDir = dirname4(skillMdPath);
29203
- const indexYamlPath = join12(skillDir, "index.yaml");
29122
+ const indexYamlPath = join11(skillDir, "index.yaml");
29204
29123
  const { description, version } = await tryReadIndexYamlMetadata(indexYamlPath);
29205
29124
  const relativePath = relative3(targetDir, skillDir);
29206
29125
  return {
@@ -29219,7 +29138,7 @@ async function getSkills(targetDir, rootDir = ".claude", config) {
29219
29138
  }
29220
29139
  }
29221
29140
  async function getGuides(targetDir, config) {
29222
- const guidesDir = join12(targetDir, "guides");
29141
+ const guidesDir = join11(targetDir, "guides");
29223
29142
  if (!await fileExists(guidesDir))
29224
29143
  return [];
29225
29144
  try {
@@ -29246,7 +29165,7 @@ async function getGuides(targetDir, config) {
29246
29165
  }
29247
29166
  var RULE_PRIORITY_ORDER = { MUST: 0, SHOULD: 1, MAY: 2 };
29248
29167
  async function getRules(targetDir, rootDir = ".claude", config) {
29249
- const rulesDir = join12(targetDir, rootDir, "rules");
29168
+ const rulesDir = join11(targetDir, rootDir, "rules");
29250
29169
  if (!await fileExists(rulesDir))
29251
29170
  return [];
29252
29171
  try {
@@ -29318,7 +29237,7 @@ function formatAsJson(components) {
29318
29237
  console.log(JSON.stringify(components, null, 2));
29319
29238
  }
29320
29239
  async function getHooks(targetDir, rootDir = ".claude") {
29321
- const hooksDir = join12(targetDir, rootDir, "hooks");
29240
+ const hooksDir = join11(targetDir, rootDir, "hooks");
29322
29241
  if (!await fileExists(hooksDir))
29323
29242
  return [];
29324
29243
  try {
@@ -29336,7 +29255,7 @@ async function getHooks(targetDir, rootDir = ".claude") {
29336
29255
  }
29337
29256
  }
29338
29257
  async function getContexts(targetDir, rootDir = ".claude") {
29339
- const contextsDir = join12(targetDir, rootDir, "contexts");
29258
+ const contextsDir = join11(targetDir, rootDir, "contexts");
29340
29259
  if (!await fileExists(contextsDir))
29341
29260
  return [];
29342
29261
  try {
@@ -29728,8 +29647,89 @@ async function securityCommand(_options = {}) {
29728
29647
  }
29729
29648
 
29730
29649
  // src/cli/serve-commands.ts
29731
- import { execFile, spawnSync as spawnSync2 } from "node:child_process";
29650
+ import { spawnSync as spawnSync2 } from "node:child_process";
29732
29651
  import { join as join13 } from "node:path";
29652
+
29653
+ // src/cli/serve.ts
29654
+ import { spawn } from "node:child_process";
29655
+ import { existsSync as existsSync2 } from "node:fs";
29656
+ import { readFile as readFile2, unlink, writeFile as writeFile2 } from "node:fs/promises";
29657
+ import { join as join12 } from "node:path";
29658
+ var DEFAULT_PORT = 4321;
29659
+ var PID_FILE = join12(process.env.HOME ?? "~", ".omcustom-serve.pid");
29660
+ function findServeBuildDir(projectRoot, options) {
29661
+ const localBuild = join12(projectRoot, "packages", "serve", "build");
29662
+ if (existsSync2(join12(localBuild, "index.js")))
29663
+ return localBuild;
29664
+ if (options?.skipNpmFallback !== true) {
29665
+ const npmBuild = join12(import.meta.dirname, "..", "..", "packages", "serve", "build");
29666
+ if (existsSync2(join12(npmBuild, "index.js")))
29667
+ return npmBuild;
29668
+ }
29669
+ return null;
29670
+ }
29671
+ async function isServeRunning() {
29672
+ try {
29673
+ const raw = await readFile2(PID_FILE, "utf-8");
29674
+ const pid = Number(raw.trim());
29675
+ if (!Number.isFinite(pid) || pid <= 0) {
29676
+ await cleanupPidFile();
29677
+ return false;
29678
+ }
29679
+ process.kill(pid, 0);
29680
+ return true;
29681
+ } catch {
29682
+ await cleanupPidFile();
29683
+ return false;
29684
+ }
29685
+ }
29686
+ async function startServeBackground(projectRoot, port = DEFAULT_PORT, buildDirOpts) {
29687
+ if (await isServeRunning()) {
29688
+ return;
29689
+ }
29690
+ const buildDir = findServeBuildDir(projectRoot, buildDirOpts);
29691
+ if (buildDir === null) {
29692
+ return;
29693
+ }
29694
+ const child = spawn("node", [join12(buildDir, "index.js")], {
29695
+ env: {
29696
+ ...process.env,
29697
+ OMCUSTOM_PORT: String(port),
29698
+ OMCUSTOM_HOST: "localhost",
29699
+ OMCUSTOM_ORIGIN: `http://localhost:${port}`,
29700
+ OMX_PROJECT_ROOT: projectRoot
29701
+ },
29702
+ stdio: "ignore",
29703
+ detached: true
29704
+ });
29705
+ child.unref();
29706
+ if (child.pid !== undefined) {
29707
+ await writeFile2(PID_FILE, String(child.pid), "utf-8");
29708
+ }
29709
+ }
29710
+ async function stopServe() {
29711
+ try {
29712
+ const raw = await readFile2(PID_FILE, "utf-8");
29713
+ const pid = Number(raw.trim());
29714
+ if (!Number.isFinite(pid) || pid <= 0) {
29715
+ await cleanupPidFile();
29716
+ return false;
29717
+ }
29718
+ process.kill(pid, "SIGTERM");
29719
+ await cleanupPidFile();
29720
+ return true;
29721
+ } catch {
29722
+ await cleanupPidFile();
29723
+ return false;
29724
+ }
29725
+ }
29726
+ async function cleanupPidFile() {
29727
+ try {
29728
+ await unlink(PID_FILE);
29729
+ } catch {}
29730
+ }
29731
+
29732
+ // src/cli/serve-commands.ts
29733
29733
  async function serveCommand(options) {
29734
29734
  const port = options.port !== undefined ? Number(options.port) : DEFAULT_PORT;
29735
29735
  if (!Number.isFinite(port) || port < 1 || port > 65535) {
@@ -29748,9 +29748,6 @@ async function serveCommand(options) {
29748
29748
  const running = await isServeRunning();
29749
29749
  if (running) {
29750
29750
  console.log(i18n.t("cli.web.start.started", { port }));
29751
- if (options.open === true) {
29752
- openBrowser(port);
29753
- }
29754
29751
  } else {
29755
29752
  console.error(i18n.t("cli.web.start.failed"));
29756
29753
  process.exit(1);
@@ -29782,17 +29779,6 @@ function runForeground(projectRoot, port, buildDirOpts) {
29782
29779
  stdio: "inherit"
29783
29780
  });
29784
29781
  }
29785
- function openBrowser(port) {
29786
- const url = `http://localhost:${port}`;
29787
- const platform = process.platform;
29788
- if (platform === "darwin") {
29789
- execFile("open", [url], () => {});
29790
- } else if (platform === "win32") {
29791
- execFile("cmd", ["/c", "start", url], () => {});
29792
- } else {
29793
- execFile("xdg-open", [url], () => {});
29794
- }
29795
- }
29796
29782
 
29797
29783
  // src/cli/update.ts
29798
29784
  init_package();
@@ -30595,7 +30581,6 @@ async function webOpenCommand(options) {
30595
30581
  if (!running) {
30596
30582
  console.warn(i18n.t("cli.web.open.notRunningWarn"));
30597
30583
  }
30598
- openBrowser(port);
30599
30584
  }
30600
30585
 
30601
30586
  // src/cli/index.ts
@@ -30624,7 +30609,7 @@ function createProgram() {
30624
30609
  process.exitCode = result.success ? 0 : 1;
30625
30610
  });
30626
30611
  const web = program2.command("web").description(i18n.t("cli.web.description"));
30627
- web.command("start").description(i18n.t("cli.web.start.description")).option("-p, --port <port>", i18n.t("cli.web.start.portOption"), "4321").option("--open", i18n.t("cli.web.start.openOption")).option("--foreground", i18n.t("cli.web.start.foregroundOption")).action(async (options) => {
30612
+ web.command("start").description(i18n.t("cli.web.start.description")).option("-p, --port <port>", i18n.t("cli.web.start.portOption"), "4321").option("--foreground", i18n.t("cli.web.start.foregroundOption")).action(async (options) => {
30628
30613
  await webStartCommand(options);
30629
30614
  });
30630
30615
  web.command("stop").description(i18n.t("cli.web.stop.description")).action(async () => {
@@ -30639,7 +30624,7 @@ function createProgram() {
30639
30624
  web.action(async () => {
30640
30625
  await webStatusCommand();
30641
30626
  });
30642
- program2.command("serve").description("(Deprecated) Start the Web UI server — use `omcustom web start` instead").option("-p, --port <port>", i18n.t("cli.web.start.portOption"), "4321").option("--open", i18n.t("cli.web.start.openOption")).option("--foreground", i18n.t("cli.web.start.foregroundOption")).action(async (options) => {
30627
+ program2.command("serve").description("(Deprecated) Start the Web UI server — use `omcustom web start` instead").option("-p, --port <port>", i18n.t("cli.web.start.portOption"), "4321").option("--foreground", i18n.t("cli.web.start.foregroundOption")).action(async (options) => {
30643
30628
  console.warn(i18n.t("cli.web.deprecated.serve"));
30644
30629
  await serveCommand(options);
30645
30630
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oh-my-customcode",
3
3
  "workspaces": ["packages/*"],
4
- "version": "0.47.0",
4
+ "version": "0.47.1",
5
5
  "description": "Batteries-included agent harness for Claude Code",
6
6
  "type": "module",
7
7
  "bin": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.47.0",
2
+ "version": "0.47.1",
3
3
  "lastUpdated": "2026-03-16T00:00:00.000Z",
4
4
  "components": [
5
5
  {