@oxagen/cli 3.0.1-712 → 3.0.1-713

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.
Files changed (2) hide show
  1. package/oxagen.mjs +21 -9
  2. package/package.json +1 -1
package/oxagen.mjs CHANGED
@@ -29810,7 +29810,7 @@ import { readFileSync as readFileSync10 } from "node:fs";
29810
29810
  import { dirname as dirname9, resolve as resolve3 } from "node:path";
29811
29811
  import { fileURLToPath } from "node:url";
29812
29812
  function readVersion() {
29813
- if (true) return "3.0.1-712";
29813
+ if (true) return "3.0.1-713";
29814
29814
  try {
29815
29815
  const here = dirname9(fileURLToPath(import.meta.url));
29816
29816
  const pkg = JSON.parse(
@@ -72708,7 +72708,7 @@ var init_package = __esm({
72708
72708
  "package.json"() {
72709
72709
  package_default = {
72710
72710
  name: "@oxagen/cli",
72711
- version: "3.0.1-712",
72711
+ version: "3.0.1-713",
72712
72712
  description: "Oxagen governance CLI: spend, source tracking, grounding, credentials, and audit (agentic coding lives in the stella CLI)",
72713
72713
  type: "module",
72714
72714
  main: "./dist/index.js",
@@ -93033,7 +93033,9 @@ __export(src_exports, {
93033
93033
  HARNESS_RENDERERS: () => HARNESS_RENDERERS,
93034
93034
  HOOK_TIMEOUT_SECONDS: () => HOOK_TIMEOUT_SECONDS,
93035
93035
  INSTALLABLE: () => INSTALLABLE,
93036
+ LOCAL_SETTINGS_FILE: () => LOCAL_SETTINGS_FILE,
93036
93037
  PROJECT_DIR_NAME: () => PROJECT_DIR_NAME,
93038
+ PROJECT_SETTINGS_FILE: () => PROJECT_SETTINGS_FILE,
93037
93039
  checkSteeringFreshness: () => checkSteeringFreshness,
93038
93040
  evaluateGate: () => evaluateGate,
93039
93041
  execGit: () => execGit,
@@ -94165,6 +94167,7 @@ __export(steering_exports, {
94165
94167
  });
94166
94168
  import { execFileSync } from "node:child_process";
94167
94169
  import { existsSync as existsSync32, realpathSync as realpathSync12 } from "node:fs";
94170
+ import { homedir as homedir14 } from "node:os";
94168
94171
  import {
94169
94172
  dirname as dirname40,
94170
94173
  join as join73,
@@ -94181,16 +94184,25 @@ function locateProject(start, timeoutMs = 5e3) {
94181
94184
  const gitRoot = rawGitRoot === null ? null : realpathOr2(rawGitRoot);
94182
94185
  const from = realpathOr2(start);
94183
94186
  if (gitRoot !== null) return { root: gitRoot, insideGit: true };
94187
+ const home = realpathOr2(homedir14());
94184
94188
  let dir = from;
94185
94189
  for (; ; ) {
94186
- if (existsSync32(join73(dir, PROJECT_DIR_NAME)))
94187
- return { root: dir, insideGit: false };
94188
- if (dir === root) return { root: from, insideGit: false };
94190
+ if (hasProjectSteering(dir, home)) return { root: dir, insideGit: false };
94191
+ if (dir === home || dir === root) return { root: from, insideGit: false };
94189
94192
  const parent = dirname40(dir);
94190
94193
  if (parent === dir) return { root: from, insideGit: false };
94191
94194
  dir = parent;
94192
94195
  }
94193
94196
  }
94197
+ function hasProjectSteering(root, home = realpathOr2(homedir14())) {
94198
+ if (!existsSync32(join73(root, PROJECT_DIR_NAME))) return false;
94199
+ if (root !== home) return true;
94200
+ return [
94201
+ workspaceLinkPath(root),
94202
+ join73(root, PROJECT_DIR_NAME, PROJECT_SETTINGS_FILE),
94203
+ join73(root, PROJECT_DIR_NAME, LOCAL_SETTINGS_FILE)
94204
+ ].some((path2) => existsSync32(path2));
94205
+ }
94194
94206
  function realpathOr2(path2) {
94195
94207
  try {
94196
94208
  return realpathSync12(path2);
@@ -94710,7 +94722,7 @@ async function steeringGate(opts = {}, writer = stdoutWriter, cwd = process.cwd(
94710
94722
  const allowNetwork = opts.network !== false;
94711
94723
  const budget = budgetFrom(HOOK_PATH_BUDGET_MS);
94712
94724
  const location = locateProject(cwd, Math.min(5e3, budget.remaining()));
94713
- if (!existsSync32(join73(location.root, PROJECT_DIR_NAME)) && !location.insideGit && !budget.expired()) {
94725
+ if (!hasProjectSteering(location.root) && !location.insideGit && !budget.expired()) {
94714
94726
  process.exitCode = 0;
94715
94727
  return;
94716
94728
  }
@@ -108721,13 +108733,13 @@ __export(steering_import_exports, {
108721
108733
  harnessHome: () => harnessHome
108722
108734
  });
108723
108735
  import { readdir as readdir5, realpath as realpath3, stat as stat5 } from "node:fs/promises";
108724
- import { homedir as homedir14 } from "node:os";
108736
+ import { homedir as homedir15 } from "node:os";
108725
108737
  import { basename as basename11, extname, join as join75, relative as relative10, sep as sep13 } from "node:path";
108726
108738
  function envDir2(env, key) {
108727
108739
  const value = env[key];
108728
108740
  return value === void 0 || value.trim() === "" ? null : value;
108729
108741
  }
108730
- function harnessHome(harness, env = process.env, home = homedir14()) {
108742
+ function harnessHome(harness, env = process.env, home = homedir15()) {
108731
108743
  switch (harness) {
108732
108744
  case "claude-code": {
108733
108745
  const config2 = envDir2(env, "CLAUDE_CONFIG_DIR") ?? join75(home, ".claude");
@@ -108955,7 +108967,7 @@ function parseTarget(value, writer) {
108955
108967
  writer
108956
108968
  );
108957
108969
  }
108958
- async function handleSteeringImport(paths, opts, writer = stdoutWriter, env = process.env, home = homedir14()) {
108970
+ async function handleSteeringImport(paths, opts, writer = stdoutWriter, env = process.env, home = homedir15()) {
108959
108971
  const harness = parseHarness(opts.harness, writer);
108960
108972
  if (paths.length === 0 && harness === void 0) {
108961
108973
  failCommand(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxagen/cli",
3
- "version": "3.0.1-712",
3
+ "version": "3.0.1-713",
4
4
  "description": "Oxagen governance CLI: spend, source tracking, grounding, credentials, and audit (agentic coding lives in the stella CLI)",
5
5
  "type": "module",
6
6
  "bin": {