@haven_ai/cli 0.0.0-dev.202610231710.79f6802 → 0.0.0-dev.202610231936.2d0713d

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 CHANGED
@@ -166,7 +166,8 @@ never calls `activate` — that is the whole design.
166
166
  route). `--amount` is in
167
167
  whole tokens, read from your wallet's balances exactly like
168
168
  `agents connect`; `--recipient` pins the budget to one address (omit for an
169
- open budget); `--expires` takes unix seconds (default: 90 days). A grant
169
+ open budget); `--expires` takes unix seconds, at most 365 days from now
170
+ (`#4351`; default: 90 days). A grant
170
171
  adds a budget to an EMPTY (token, recipient) slot only: when the agent
171
172
  already has a live budget there, the build is refused (exit 4,
172
173
  `error_code: BUDGET_SLOT_OCCUPIED` with `existing_delegation_hash` under
package/dist/cli.cjs CHANGED
@@ -90,6 +90,9 @@ function parseArgs(argv) {
90
90
  } else if (arg === "--expires") {
91
91
  const n = Number(value);
92
92
  if (!Number.isInteger(n) || n <= 0) throw new Error("--expires must be a unix timestamp in seconds");
93
+ if (n > Math.floor(Date.now() / 1e3) + 365 * 86400) {
94
+ throw new Error("--expires must be at most 365 days from now");
95
+ }
93
96
  flags.expires = n;
94
97
  } else if (arg === "--format") {
95
98
  if (value !== "csv" && value !== "sie") throw new Error('--format must be "csv" or "sie"');
@@ -3152,7 +3155,7 @@ async function checkTextForSecrets(text, deps) {
3152
3155
 
3153
3156
  // src/commands.ts
3154
3157
  var DEFAULT_API = "https://havenbackend-production-8a00.up.railway.app";
3155
- var CLI_VERSION = "0.0.0-dev.202610231710.79f6802";
3158
+ var CLI_VERSION = "0.0.0-dev.202610231936.2d0713d";
3156
3159
  var CLI_CLIENT_IDENTITY = `@haven_ai/cli/${CLI_VERSION}`;
3157
3160
  function accountAddressOf(s) {
3158
3161
  return s.account_address ?? "";