@f-o-h/cli 0.1.67 → 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 (3) hide show
  1. package/README.md +1 -1
  2. package/dist/foh.js +35 -5
  3. package/package.json +41 -41
package/README.md CHANGED
@@ -89,7 +89,7 @@ returned short-lived token. Credential auth remains available as fallback.
89
89
  `foh prove` produces a compact signed proof report across auth, org context,
90
90
  agent validation, contact phone readiness, voice provider health, widget
91
91
  channel/embed readiness, and widget smoke. It does not run release
92
- certification by default; run `foh certify run --agent <id> --profile release`
92
+ certification by default; run `foh certify run --agent <id> --profile release` (budget-safe default)
93
93
  before publish, or pass `--include-certification` only when you intentionally
94
94
  want the slower certification check inside proof. It is read-only by default;
95
95
  pass `--mutation-mode ensure` or `--repair` only when you explicitly want proof
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.67";
32789
+ var CLI_VERSION = "0.1.69";
32790
32790
 
32791
32791
  // src/commands/mcp-serve.ts
32792
32792
  var DEFAULT_TIMEOUT_MS = 12e4;
@@ -35415,6 +35415,11 @@ function modeForProfile(profile) {
35415
35415
  if (profile === "stress") return "stress";
35416
35416
  return "full";
35417
35417
  }
35418
+ function defaultAdaptiveRuns(profile) {
35419
+ if (profile === "smoke") return 1;
35420
+ if (profile === "stress") return 30;
35421
+ return 5;
35422
+ }
35418
35423
  function csv(raw) {
35419
35424
  if (!raw) return void 0;
35420
35425
  const values = String(raw).split(",").map((value) => value.trim()).filter(Boolean);
@@ -35427,11 +35432,11 @@ function channel(raw) {
35427
35432
  }
35428
35433
  function registerCertify(program3) {
35429
35434
  const certify = program3.command("certify").description("Produce release certification evidence for an agent");
35430
- certify.command("run").description("Run certification for an exact agent draft/profile and emit release evidence").requiredOption("--agent <id>", "Agent ID to certify").option("--profile <profile>", "Certification profile: smoke, release, or stress", "release").option("--adaptive-runs <n>", "Adaptive runs for release/stress profiles", "30").option("--journeys <list>", "Comma-separated journey allowlist").option("--scenario-ids <list>", "Comma-separated scenario ID allowlist").option("--channel <channel>", "Channel filter: chat, voice, or mixed", "mixed").option("--out <path>", "Write certification run JSON to this file path").option("--api-url <url>", "API base URL override").option("--json", "Output as machine-readable JSON").action(async (opts) => {
35435
+ certify.command("run").description("Run certification for an exact agent draft/profile and emit release evidence").requiredOption("--agent <id>", "Agent ID to certify").option("--profile <profile>", "Certification profile: smoke, release, or stress", "release").option("--adaptive-runs <n>", "Adaptive runs override; release defaults to a budget-safe 5").option("--journeys <list>", "Comma-separated journey allowlist").option("--scenario-ids <list>", "Comma-separated scenario ID allowlist").option("--channel <channel>", "Channel filter: chat, voice, or mixed", "mixed").option("--out <path>", "Write certification run JSON to this file path").option("--api-url <url>", "API base URL override").option("--json", "Output as machine-readable JSON").action(async (opts) => {
35431
35436
  try {
35432
35437
  const profile = normalizeProfile(opts.profile);
35433
35438
  const mode = modeForProfile(profile);
35434
- const adaptiveRuns = Math.max(1, Math.min(120, Number(opts.adaptiveRuns ?? 30) || 30));
35439
+ const adaptiveRuns = Math.max(1, Math.min(120, Number(opts.adaptiveRuns ?? defaultAdaptiveRuns(profile)) || defaultAdaptiveRuns(profile)));
35435
35440
  const response = await apiFetch(
35436
35441
  `/v1/console/agents/${opts.agent}/sim-certify`,
35437
35442
  {
@@ -39864,6 +39869,27 @@ function resolveWorkspaceRoot(input) {
39864
39869
  const repoStem = (0, import_path13.basename)((0, import_path13.resolve)(input.privateRepoRoot)).replace(/[^a-zA-Z0-9_.-]+/g, "-");
39865
39870
  return (0, import_path13.resolve)((0, import_os2.tmpdir)(), "foh-external-agent-workspaces", repoStem, batchStem);
39866
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
+ }
39867
39893
  function promptVersionFromPath(promptPath) {
39868
39894
  const raw = (0, import_fs15.readFileSync)(promptPath, "utf8");
39869
39895
  if (raw.includes("Do not assume access to the private source repository")) return "blank-setup.v1";
@@ -39881,7 +39907,11 @@ function createExternalAgentExecutorPlan(options) {
39881
39907
  const codexSandboxMode = normalizeCodexSandboxMode(options.codexSandboxMode);
39882
39908
  const codexModel = runner === "codex" ? normalizeCodexModel(options.codexModel) : null;
39883
39909
  const codexNetworkAccess = options.codexNetworkAccess === true;
39884
- 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;
39885
39915
  const workspaceRoot = resolveWorkspaceRoot({ batchPath, workspaceRoot: options.workspaceRoot, privateRepoRoot });
39886
39916
  if (isPathInside(workspaceRoot, privateRepoRoot)) {
39887
39917
  throw new ExternalAgentExecutorError(
@@ -39972,7 +40002,7 @@ function createExternalAgentExecutorPlan(options) {
39972
40002
  batch_path: batchPath,
39973
40003
  batch_dir: batchDir,
39974
40004
  private_repo_root: privateRepoRoot,
39975
- private_repo_root_explicit: Boolean(options.privateRepoRoot),
40005
+ private_repo_root_explicit: privateRepo.explicit,
39976
40006
  workspace_root: workspaceRoot,
39977
40007
  timeout_minutes: timeoutMinutes,
39978
40008
  safety: {
package/package.json CHANGED
@@ -1,41 +1,41 @@
1
- {
2
- "name": "@f-o-h/cli",
3
- "version": "0.1.67",
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
+ }