@f-o-h/cli 0.1.68 → 0.1.69

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/dist/foh.js +28 -3
  2. package/package.json +41 -41
package/dist/foh.js CHANGED
@@ -32786,7 +32786,7 @@ var StdioServerTransport = class {
32786
32786
  };
32787
32787
 
32788
32788
  // src/lib/cli-version.ts
32789
- var CLI_VERSION = "0.1.68";
32789
+ var CLI_VERSION = "0.1.69";
32790
32790
 
32791
32791
  // src/commands/mcp-serve.ts
32792
32792
  var DEFAULT_TIMEOUT_MS = 12e4;
@@ -39869,6 +39869,27 @@ function resolveWorkspaceRoot(input) {
39869
39869
  const repoStem = (0, import_path13.basename)((0, import_path13.resolve)(input.privateRepoRoot)).replace(/[^a-zA-Z0-9_.-]+/g, "-");
39870
39870
  return (0, import_path13.resolve)((0, import_os2.tmpdir)(), "foh-external-agent-workspaces", repoStem, batchStem);
39871
39871
  }
39872
+ function findNearestGitRoot(startPath) {
39873
+ let current = (0, import_path13.resolve)(startPath);
39874
+ while (true) {
39875
+ if ((0, import_fs15.existsSync)((0, import_path13.join)(current, ".git"))) return current;
39876
+ const parent = (0, import_path13.dirname)(current);
39877
+ if (parent === current) return null;
39878
+ current = parent;
39879
+ }
39880
+ }
39881
+ function resolvePrivateRepoRoot(input) {
39882
+ if (input.explicitPrivateRepoRoot) {
39883
+ return { root: (0, import_path13.resolve)(input.explicitPrivateRepoRoot), explicit: true };
39884
+ }
39885
+ const cwd = (0, import_path13.resolve)(input.cwd || process.cwd());
39886
+ const gitRoot = findNearestGitRoot(cwd);
39887
+ if (gitRoot) return { root: gitRoot, explicit: false };
39888
+ return {
39889
+ root: (0, import_path13.join)(cwd, ".foh-no-private-repo-root-sentinel"),
39890
+ explicit: false
39891
+ };
39892
+ }
39872
39893
  function promptVersionFromPath(promptPath) {
39873
39894
  const raw = (0, import_fs15.readFileSync)(promptPath, "utf8");
39874
39895
  if (raw.includes("Do not assume access to the private source repository")) return "blank-setup.v1";
@@ -39886,7 +39907,11 @@ function createExternalAgentExecutorPlan(options) {
39886
39907
  const codexSandboxMode = normalizeCodexSandboxMode(options.codexSandboxMode);
39887
39908
  const codexModel = runner === "codex" ? normalizeCodexModel(options.codexModel) : null;
39888
39909
  const codexNetworkAccess = options.codexNetworkAccess === true;
39889
- const privateRepoRoot = (0, import_path13.resolve)(options.privateRepoRoot || options.cwd || process.cwd());
39910
+ const privateRepo = resolvePrivateRepoRoot({
39911
+ explicitPrivateRepoRoot: options.privateRepoRoot,
39912
+ cwd: options.cwd
39913
+ });
39914
+ const privateRepoRoot = privateRepo.root;
39890
39915
  const workspaceRoot = resolveWorkspaceRoot({ batchPath, workspaceRoot: options.workspaceRoot, privateRepoRoot });
39891
39916
  if (isPathInside(workspaceRoot, privateRepoRoot)) {
39892
39917
  throw new ExternalAgentExecutorError(
@@ -39977,7 +40002,7 @@ function createExternalAgentExecutorPlan(options) {
39977
40002
  batch_path: batchPath,
39978
40003
  batch_dir: batchDir,
39979
40004
  private_repo_root: privateRepoRoot,
39980
- private_repo_root_explicit: Boolean(options.privateRepoRoot),
40005
+ private_repo_root_explicit: privateRepo.explicit,
39981
40006
  workspace_root: workspaceRoot,
39982
40007
  timeout_minutes: timeoutMinutes,
39983
40008
  safety: {
package/package.json CHANGED
@@ -1,41 +1,41 @@
1
- {
2
- "name": "@f-o-h/cli",
3
- "version": "0.1.68",
4
- "description": "FOH CLI - AI-operator provisioning tool for Front Of House",
5
- "license": "UNLICENSED",
6
- "bin": {
7
- "foh": "dist/foh.js"
8
- },
9
- "main": "dist/foh.js",
10
- "files": [
11
- "dist/",
12
- "examples/",
13
- "schemas/",
14
- "README.md",
15
- "package.json"
16
- ],
17
- "publishConfig": {
18
- "access": "public"
19
- },
20
- "engines": {
21
- "node": ">=18"
22
- },
23
- "scripts": {
24
- "build": "node build.mjs",
25
- "test": "vitest run",
26
- "typecheck": "tsc --noEmit"
27
- },
28
- "dependencies": {
29
- "@modelcontextprotocol/sdk": "^1.29.0",
30
- "commander": "^12.1.0",
31
- "js-yaml": "^4.1.1",
32
- "picocolors": "^1.1.1",
33
- "zod": "^4.3.6"
34
- },
35
- "devDependencies": {
36
- "@types/js-yaml": "^4.0.9",
37
- "@types/node": "^22.0.0",
38
- "esbuild": "^0.24.0",
39
- "vitest": "^2.0.0"
40
- }
41
- }
1
+ {
2
+ "name": "@f-o-h/cli",
3
+ "version": "0.1.69",
4
+ "description": "FOH CLI - AI-operator provisioning tool for Front Of House",
5
+ "license": "UNLICENSED",
6
+ "bin": {
7
+ "foh": "dist/foh.js"
8
+ },
9
+ "main": "dist/foh.js",
10
+ "files": [
11
+ "dist/",
12
+ "examples/",
13
+ "schemas/",
14
+ "README.md",
15
+ "package.json"
16
+ ],
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "engines": {
21
+ "node": ">=18"
22
+ },
23
+ "scripts": {
24
+ "build": "node build.mjs",
25
+ "test": "vitest run",
26
+ "typecheck": "tsc --noEmit"
27
+ },
28
+ "dependencies": {
29
+ "@modelcontextprotocol/sdk": "^1.29.0",
30
+ "commander": "^12.1.0",
31
+ "js-yaml": "^4.1.1",
32
+ "picocolors": "^1.1.1",
33
+ "zod": "^4.3.6"
34
+ },
35
+ "devDependencies": {
36
+ "@types/js-yaml": "^4.0.9",
37
+ "@types/node": "^22.0.0",
38
+ "esbuild": "^0.24.0",
39
+ "vitest": "^2.0.0"
40
+ }
41
+ }