foldrun 25.0.1 → 25.0.2
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/package.json +1 -1
- package/src/commands.mjs +5 -5
package/package.json
CHANGED
package/src/commands.mjs
CHANGED
|
@@ -4727,7 +4727,7 @@ async function doctor(flags) {
|
|
|
4727
4727
|
* keys create <label> --expires 90d it stops working in 90 days (30d, 365d, never)
|
|
4728
4728
|
* keys create <label> --a2a --to <ws> --flows a,b [--max-tasks N] a key for an outside agent: /a2a only
|
|
4729
4729
|
* keys create <label> --gateway --cap <usd> [--daily <usd>] a coding agent's key (Claude Code): the gateway only
|
|
4730
|
-
* keys create <label> --gateway --login on the
|
|
4730
|
+
* keys create <label> --gateway --login on the account's plan (where it has one): not billed per call
|
|
4731
4731
|
* keys create <label> --gateway --cap <usd> --claude-code …and write it into Claude Code's settings (its status line too)
|
|
4732
4732
|
* keys set <id> --opus|--sonnet|--haiku <provider/model> which model each Claude Code tier runs on (a gateway key; `-` clears one, --clear all)
|
|
4733
4733
|
* keys rotate <id> [--grace 1h] a new key, same label/role/scope; the old
|
|
@@ -4920,7 +4920,7 @@ function modelsLine(m) {
|
|
|
4920
4920
|
function gatewayLine(g) {
|
|
4921
4921
|
const map = modelsLine(g?.models);
|
|
4922
4922
|
const tail = map ? ` · ${map}` : "";
|
|
4923
|
-
if (g?.credential === "login") return `gateway · Claude Code ·
|
|
4923
|
+
if (g?.credential === "login") return `gateway · Claude Code · plan · not billed per call${tail}`;
|
|
4924
4924
|
const usd = (n) => `$${Number(n ?? 0).toFixed(2)}`;
|
|
4925
4925
|
const parts = ["gateway · Claude Code"];
|
|
4926
4926
|
if (g?.capUsd != null) parts.push(`${usd(g.spentUsd)} of ${usd(g.capUsd)}`);
|
|
@@ -4950,10 +4950,10 @@ async function keysCreateGateway(url, label, flags) {
|
|
|
4950
4950
|
}
|
|
4951
4951
|
// --login: the operator's own Claude login, for an account the operator
|
|
4952
4952
|
// allows it (its desks' accounts) — not metered, so it takes no limit.
|
|
4953
|
-
if (flags.login === true && (flags.cap !== undefined || flags.daily !== undefined)) throw new Error("--login takes no --cap or --daily — the
|
|
4953
|
+
if (flags.login === true && (flags.cap !== undefined || flags.daily !== undefined)) throw new Error("--login takes no --cap or --daily — a key on the account's plan is not billed per call, so a dollar limit could not hold it");
|
|
4954
4954
|
const capUsd = flags.login === true ? undefined : usdFlag(flags.cap, "--cap");
|
|
4955
4955
|
const dailyUsd = flags.login === true ? undefined : usdFlag(flags.daily, "--daily");
|
|
4956
|
-
if (flags.login !== true && capUsd === undefined && dailyUsd === undefined) throw new Error("a gateway key needs a limit of its own: --cap <usd> in all, or --daily <usd> per UTC day (or both) — or --login, on an account
|
|
4956
|
+
if (flags.login !== true && capUsd === undefined && dailyUsd === undefined) throw new Error("a gateway key needs a limit of its own: --cap <usd> in all, or --daily <usd> per UTC day (or both) — or --login, on an account that has a plan");
|
|
4957
4957
|
// --claude-code: read Claude Code's settings BEFORE minting, so a file we
|
|
4958
4958
|
// could not safely rewrite stops here with nothing made.
|
|
4959
4959
|
const claude = flags["claude-code"] === true ? preflightClaudeSettings() : null;
|
|
@@ -5001,7 +5001,7 @@ async function keysCreateGateway(url, label, flags) {
|
|
|
5001
5001
|
}
|
|
5002
5002
|
// A login key is not metered: there is no spend for `keys ls` to show.
|
|
5003
5003
|
const after = made.credential === "login"
|
|
5004
|
-
? `It opens the gateway only and runs on
|
|
5004
|
+
? `It opens the gateway only and runs on this account's plan: not billed per call, the plan's usage limits apply. \`foldrun keys revoke ${made.id}\` ends it.`
|
|
5005
5005
|
: `It opens the gateway only. \`foldrun keys ls\` shows what it has spent; \`foldrun keys revoke ${made.id}\` ends it.`;
|
|
5006
5006
|
console.log(` ${c.dim(after)}\n`);
|
|
5007
5007
|
return 0;
|