oh-my-customcode 1.1.98 → 1.1.99

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
@@ -115,6 +115,7 @@ function shortenHome(path, home) {
115
115
  var init_home = () => {};
116
116
 
117
117
  // src/core/registry.ts
118
+ import { realpathSync } from "node:fs";
118
119
  import { mkdir, readFile, writeFile } from "node:fs/promises";
119
120
  import { tmpdir } from "node:os";
120
121
  import { basename, join, resolve, sep as sep2 } from "node:path";
@@ -130,6 +131,11 @@ function isTempPath(projectPath) {
130
131
  candidates.add("/tmp");
131
132
  candidates.add("/var/tmp");
132
133
  candidates.add("/var/folders");
134
+ for (const candidate of [...candidates]) {
135
+ try {
136
+ candidates.add(realpathSync(candidate));
137
+ } catch {}
138
+ }
133
139
  for (const candidate of candidates) {
134
140
  if (normalized === candidate || normalized.startsWith(candidate + sep2)) {
135
141
  return true;
@@ -291,7 +297,7 @@ var init_package = __esm(() => {
291
297
  workspaces: [
292
298
  "packages/*"
293
299
  ],
294
- version: "1.1.98",
300
+ version: "1.1.99",
295
301
  description: "Batteries-included agent harness for Claude Code",
296
302
  type: "module",
297
303
  bin: {
@@ -7499,7 +7505,7 @@ var UTF8_BOM = "\uFEFF";
7499
7505
  var init_fs = () => {};
7500
7506
 
7501
7507
  // src/cli/projects.ts
7502
- import { basename as basename4, join as join11, sep as sep4 } from "node:path";
7508
+ import { basename as basename4, join as join11, resolve as resolve3 } from "node:path";
7503
7509
  async function readLockFile(projectDir) {
7504
7510
  const lockFilePath = join11(projectDir, ".omcustom.lock.json");
7505
7511
  try {
@@ -7533,10 +7539,15 @@ async function getTemplateVersion() {
7533
7539
  }
7534
7540
  return package_default.version;
7535
7541
  }
7542
+ function normalizeSearchPaths(paths) {
7543
+ if (!paths || paths.length === 0)
7544
+ return;
7545
+ return paths.map((p) => resolve3(p));
7546
+ }
7536
7547
  function matchesSearchPaths(projectPath, searchPaths) {
7537
7548
  if (!searchPaths || searchPaths.length === 0)
7538
7549
  return true;
7539
- return searchPaths.some((searchPath) => projectPath === searchPath || projectPath.startsWith(searchPath + sep4));
7550
+ return searchPaths.some((searchPath) => isPathWithin(projectPath, searchPath));
7540
7551
  }
7541
7552
  function sortProjects(projects) {
7542
7553
  return projects.sort((a, b) => {
@@ -7552,15 +7563,16 @@ async function findProjects(options = {}) {
7552
7563
  const registry = await readRegistry();
7553
7564
  if (Object.keys(registry.projects).length === 0) {
7554
7565
  const fallbackResults = await _findProjectsFromLockfiles(options, currentVersion);
7555
- if (fallbackResults.length === 0 && !options.paths) {
7566
+ if (fallbackResults.length === 0 && !normalizeSearchPaths(options.paths)) {
7556
7567
  process.stderr.write(" No projects in registry. Run `omcustom projects --migrate` to import existing projects.\n");
7557
7568
  }
7558
7569
  return fallbackResults;
7559
7570
  }
7560
7571
  const results = [];
7561
7572
  const home = resolveHomeDir();
7573
+ const searchPaths = normalizeSearchPaths(options.paths);
7562
7574
  for (const [projectPath, entry] of Object.entries(registry.projects)) {
7563
- if (!matchesSearchPaths(projectPath, options.paths))
7575
+ if (!matchesSearchPaths(projectPath, searchPaths))
7564
7576
  continue;
7565
7577
  if (!isUnderHome(projectPath, home))
7566
7578
  continue;
@@ -7613,8 +7625,9 @@ async function _findProjectsFromLockfiles(options, currentVersion) {
7613
7625
  const seen = new Set;
7614
7626
  const results = [];
7615
7627
  const home = resolveHomeDir();
7616
- const searchPaths = options.paths ? [...options.paths] : [];
7617
- if (!options.paths) {
7628
+ const providedPaths = normalizeSearchPaths(options.paths);
7629
+ const searchPaths = providedPaths ? [...providedPaths] : [];
7630
+ if (!providedPaths) {
7618
7631
  const cwd = process.cwd();
7619
7632
  if (!searchPaths.includes(cwd))
7620
7633
  searchPaths.push(cwd);
@@ -20948,7 +20961,7 @@ function runForeground(projectRoot, port, buildDirOpts) {
20948
20961
  }
20949
20962
 
20950
20963
  // src/cli/sync.ts
20951
- import { resolve as resolve3 } from "node:path";
20964
+ import { resolve as resolve4 } from "node:path";
20952
20965
 
20953
20966
  // src/core/sync.ts
20954
20967
  init_fs();
@@ -21068,7 +21081,7 @@ async function exportSnapshot(targetDir, outputPath) {
21068
21081
 
21069
21082
  // src/cli/sync.ts
21070
21083
  async function runExport(targetDir, outputPath) {
21071
- const result = await exportSnapshot(targetDir, resolve3(outputPath));
21084
+ const result = await exportSnapshot(targetDir, resolve4(outputPath));
21072
21085
  if (!result.success) {
21073
21086
  console.error(`
21074
21087
  Export failed — no .claude/ directory found in current project.`);
@@ -21125,7 +21138,7 @@ Summary: ${result.unchanged} unchanged, ${result.modified.length} modified, ${re
21125
21138
  }
21126
21139
  function syncCommand(program) {
21127
21140
  program.command("sync").description(i18n.t("cli.sync.description")).option("--check", "Compare current state against lockfile (default behavior)").option("--reference <path>", "Compare against an external snapshot instead of the lockfile").option("--export <path>", "Export current .claude/ state as a reusable snapshot").action(async (options) => {
21128
- const targetDir = resolve3(".");
21141
+ const targetDir = resolve4(".");
21129
21142
  if (options.export) {
21130
21143
  await runExport(targetDir, options.export);
21131
21144
  return;
package/dist/index.js CHANGED
@@ -243,6 +243,7 @@ function resolveHomeDir(sources = {}) {
243
243
  var init_home = () => {};
244
244
 
245
245
  // src/core/registry.ts
246
+ import { realpathSync } from "node:fs";
246
247
  import { mkdir, readFile, writeFile } from "node:fs/promises";
247
248
  import { tmpdir } from "node:os";
248
249
  import { basename as basename3, join as join6, resolve as resolve2, sep as sep3 } from "node:path";
@@ -258,6 +259,11 @@ function isTempPath(projectPath) {
258
259
  candidates.add("/tmp");
259
260
  candidates.add("/var/tmp");
260
261
  candidates.add("/var/folders");
262
+ for (const candidate of [...candidates]) {
263
+ try {
264
+ candidates.add(realpathSync(candidate));
265
+ } catch {}
266
+ }
261
267
  for (const candidate of candidates) {
262
268
  if (normalized === candidate || normalized.startsWith(candidate + sep3)) {
263
269
  return true;
@@ -2808,7 +2814,7 @@ var package_default = {
2808
2814
  workspaces: [
2809
2815
  "packages/*"
2810
2816
  ],
2811
- version: "1.1.98",
2817
+ version: "1.1.99",
2812
2818
  description: "Batteries-included agent harness for Claude Code",
2813
2819
  type: "module",
2814
2820
  bin: {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "packages/*"
5
5
  ],
6
- "version": "1.1.98",
6
+ "version": "1.1.99",
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": "1.1.98",
2
+ "version": "1.1.99",
3
3
  "lastUpdated": "2026-09-03",
4
4
  "omcustomMinClaudeCode": "2.1.121",
5
5
  "omcustomMinClaudeCodeReason": "Sensitive-path direct Write/Edit on .claude/** under bypassPermissions (R010 deprecation, #1101)",