@f-o-h/cli 0.1.19 → 0.1.21
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/README.md +1 -1
- package/dist/foh.js +17 -4
- 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.
|
|
7
|
+
Current published baseline: `@f-o-h/cli@0.1.21`
|
|
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
|
@@ -10076,6 +10076,9 @@ function credentialsFromEnv(apiUrlOverride, env = process.env) {
|
|
|
10076
10076
|
...isUsableOrgId(orgId) ? { orgId } : {}
|
|
10077
10077
|
};
|
|
10078
10078
|
}
|
|
10079
|
+
function hasEnvCredentials(env = process.env) {
|
|
10080
|
+
return Boolean(normalizeEnv(env[SERVICE_TOKEN_ENV]));
|
|
10081
|
+
}
|
|
10079
10082
|
function loadCredentials(apiUrlOverride) {
|
|
10080
10083
|
const envCreds = credentialsFromEnv(apiUrlOverride);
|
|
10081
10084
|
if (envCreds) return envCreds;
|
|
@@ -10499,12 +10502,13 @@ async function runDeviceLogin(opts) {
|
|
|
10499
10502
|
expires_in: start.expires_in,
|
|
10500
10503
|
poll_interval_seconds: start.interval
|
|
10501
10504
|
};
|
|
10502
|
-
|
|
10505
|
+
const shouldWait = opts.wait !== false && !(jsonMode && !process.stdin.isTTY && !opts.timeoutSeconds);
|
|
10506
|
+
if (!shouldWait) {
|
|
10503
10507
|
format({
|
|
10504
10508
|
...startedPacket,
|
|
10505
10509
|
next_commands: [
|
|
10506
10510
|
"Complete approval in the opened browser window.",
|
|
10507
|
-
"Then rerun: foh auth login --web --json"
|
|
10511
|
+
"Then rerun: foh auth login --web --json --timeout-seconds 60, or use FOH_SERVICE_TOKEN/FOH_ORG_ID for non-interactive automation."
|
|
10508
10512
|
]
|
|
10509
10513
|
}, { json: jsonMode });
|
|
10510
10514
|
return;
|
|
@@ -10859,6 +10863,15 @@ function registerOrg(program3) {
|
|
|
10859
10863
|
apiUrlOverride: opts.apiUrl
|
|
10860
10864
|
});
|
|
10861
10865
|
const creds = loadCredentials(opts.apiUrl);
|
|
10866
|
+
if (hasEnvCredentials()) {
|
|
10867
|
+
format({
|
|
10868
|
+
status: "ok",
|
|
10869
|
+
default_org_id: opts.org,
|
|
10870
|
+
persisted: false,
|
|
10871
|
+
note: "FOH_SERVICE_TOKEN is active; pass --org or set FOH_ORG_ID to persist default org for this environment."
|
|
10872
|
+
}, { json: opts.json ?? false });
|
|
10873
|
+
return;
|
|
10874
|
+
}
|
|
10862
10875
|
saveCredentials({ ...creds, orgId: opts.org });
|
|
10863
10876
|
format({ status: "ok", default_org_id: opts.org, note: "--org flag is now optional" }, { json: opts.json ?? false });
|
|
10864
10877
|
}));
|
|
@@ -32681,7 +32694,7 @@ var StdioServerTransport = class {
|
|
|
32681
32694
|
};
|
|
32682
32695
|
|
|
32683
32696
|
// src/lib/cli-version.ts
|
|
32684
|
-
var CLI_VERSION = "0.1.
|
|
32697
|
+
var CLI_VERSION = "0.1.21";
|
|
32685
32698
|
|
|
32686
32699
|
// src/commands/mcp-serve.ts
|
|
32687
32700
|
var DEFAULT_TIMEOUT_MS = 12e4;
|
|
@@ -38450,7 +38463,7 @@ var EXTERNAL_AGENT_RUN_DIR_ENV = "FOH_EXTERNAL_AGENT_RUN_DIR";
|
|
|
38450
38463
|
var EXTERNAL_AGENT_PROMPT_VERSION_ENV = "FOH_EXTERNAL_AGENT_PROMPT_VERSION";
|
|
38451
38464
|
var SECRET_RE3 = /\b(?:Bearer\s+)?(?:sk|pk|xai|whsec|EAAN|ghp|gho|github_pat|npm_)[A-Za-z0-9_\-.]{12,}\b/gi;
|
|
38452
38465
|
function redactText(value) {
|
|
38453
|
-
return value.replace(SECRET_RE3, "[redacted_secret]");
|
|
38466
|
+
return redactExternalAgentSecretText(value).replace(SECRET_RE3, "[redacted_secret]");
|
|
38454
38467
|
}
|
|
38455
38468
|
function redactPath(value) {
|
|
38456
38469
|
let redacted = redactText(value);
|