@f-o-h/cli 0.1.25 → 0.1.28

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 +24 -11
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@ AI-operator provisioning CLI for Front Of House.
4
4
 
5
5
  Public mirror: https://github.com/iiko38/front-of-house-cli
6
6
 
7
- Current published baseline: `@f-o-h/cli@0.1.25`
7
+ Current published baseline: `@f-o-h/cli@0.1.28`
8
8
 
9
9
  This mirror is a generated release artifact. The private product monorepo is not
10
10
  published here, and no open-source license is granted unless stated separately.
package/dist/foh.js CHANGED
@@ -10465,8 +10465,11 @@ async function storeAuthenticatedSession(params) {
10465
10465
  function sleep(ms) {
10466
10466
  return new Promise((resolve12) => setTimeout(resolve12, ms));
10467
10467
  }
10468
+ function hasExplicitTimeoutFlag(argv = process.argv) {
10469
+ return argv.some((arg) => arg === "--timeout-seconds" || arg.startsWith("--timeout-seconds="));
10470
+ }
10468
10471
  async function runDeviceLogin(opts) {
10469
- const jsonMode = Boolean(opts.json);
10472
+ const jsonMode = resolveJsonMode({ json: opts.json });
10470
10473
  let startRes;
10471
10474
  try {
10472
10475
  startRes = await fetch(`${opts.apiUrl}/v1/console/auth/device/start`, {
@@ -10502,7 +10505,8 @@ async function runDeviceLogin(opts) {
10502
10505
  expires_in: start.expires_in,
10503
10506
  poll_interval_seconds: start.interval
10504
10507
  };
10505
- const shouldWait = opts.wait !== false && !(jsonMode && !opts.timeoutSeconds);
10508
+ const hasExplicitTimeout = Boolean(opts.timeoutSeconds) || hasExplicitTimeoutFlag();
10509
+ const shouldWait = opts.wait !== false && !(jsonMode && !hasExplicitTimeout);
10506
10510
  if (!shouldWait) {
10507
10511
  format({
10508
10512
  ...startedPacket,
@@ -32694,7 +32698,7 @@ var StdioServerTransport = class {
32694
32698
  };
32695
32699
 
32696
32700
  // src/lib/cli-version.ts
32697
- var CLI_VERSION = "0.1.25";
32701
+ var CLI_VERSION = "0.1.28";
32698
32702
 
32699
32703
  // src/commands/mcp-serve.ts
32700
32704
  var DEFAULT_TIMEOUT_MS = 12e4;
@@ -38390,6 +38394,7 @@ function artifactFiles(runDir) {
38390
38394
  return (0, import_fs12.readdirSync)(runDir).map((name) => (0, import_path10.join)(runDir, name)).filter((path2) => {
38391
38395
  const stat = (0, import_fs12.statSync)(path2);
38392
38396
  const name = path2.split(/[\\/]/).pop() || "";
38397
+ if (name.endsWith(".redacted")) return false;
38393
38398
  return stat.isFile() && (TEXT_ARTIFACT_NAMES.has(name) || name.startsWith("command-output-cmd_"));
38394
38399
  }).sort();
38395
38400
  }
@@ -38969,16 +38974,23 @@ function proofArtifactPasses(runDir) {
38969
38974
  function readIfExists(path2) {
38970
38975
  return (0, import_fs14.existsSync)(path2) ? (0, import_fs14.readFileSync)(path2, "utf8") : "";
38971
38976
  }
38972
- function redactSecretLikeFile(path2) {
38977
+ function redactArtifactFile(path2, input = {}) {
38973
38978
  if (!(0, import_fs14.existsSync)(path2)) return;
38974
38979
  const original = (0, import_fs14.readFileSync)(path2, "utf8");
38975
- const redacted = redactExternalAgentSecretText(original);
38980
+ const redacted = redactExternalAgentArtifactText(original, input);
38976
38981
  if (redacted !== original) (0, import_fs14.writeFileSync)(path2, redacted, "utf8");
38977
38982
  }
38978
- function redactSecretLikeOutputArtifacts(run) {
38979
- redactSecretLikeFile(run.outputs.jsonl);
38980
- redactSecretLikeFile(run.outputs.last_message);
38981
- redactSecretLikeFile(run.outputs.stderr);
38983
+ function redactOutputArtifacts(run, input = {}) {
38984
+ redactArtifactFile(run.outputs.jsonl, input);
38985
+ redactArtifactFile(run.outputs.last_message, input);
38986
+ redactArtifactFile(run.outputs.stderr, input);
38987
+ redactArtifactFile((0, import_path12.join)(run.run_dir, "commands.ndjson"), input);
38988
+ if (!(0, import_fs14.existsSync)(run.run_dir)) return;
38989
+ for (const name of (0, import_fs14.readdirSync)(run.run_dir)) {
38990
+ if (name.startsWith("command-output-cmd_") && !name.endsWith(".redacted")) {
38991
+ redactArtifactFile((0, import_path12.join)(run.run_dir, name), input);
38992
+ }
38993
+ }
38982
38994
  }
38983
38995
  function copyCommandCaptureArtifacts(input) {
38984
38996
  const commandLog = (0, import_path12.join)(input.captureDir, "commands.ndjson");
@@ -39163,10 +39175,11 @@ async function executeExternalAgentExecutorPlan(plan, options = {}) {
39163
39175
  timeoutMs: plan.timeout_minutes * 60 * 1e3
39164
39176
  });
39165
39177
  copyCommandCaptureArtifacts({ captureDir: commandCaptureDir, runDir: run.run_dir });
39166
- redactSecretLikeOutputArtifacts(run);
39178
+ const privateRepoRoot = options.privateRepoRoot || plan.private_repo_root;
39179
+ redactOutputArtifacts(run, { privateRepoRoot });
39167
39180
  const artifactSafety = scanExternalAgentArtifacts({
39168
39181
  runDir: run.run_dir,
39169
- privateRepoRoot: options.privateRepoRoot || plan.private_repo_root,
39182
+ privateRepoRoot,
39170
39183
  writeRedacted: true
39171
39184
  });
39172
39185
  (0, import_fs14.writeFileSync)(run.outputs.artifact_safety, `${JSON.stringify(artifactSafety, null, 2)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@f-o-h/cli",
3
- "version": "0.1.25",
3
+ "version": "0.1.28",
4
4
  "description": "FOH CLI - AI-operator provisioning tool for Front Of House",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {