@thirdfy/agent-cli 0.2.73 → 0.2.75

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/CHANGELOG.md CHANGED
@@ -2,7 +2,17 @@
2
2
 
3
3
  All notable changes to `@thirdfy/agent-cli` are documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
4
 
5
- ## [Unreleased]
5
+ ## [0.2.75] - 2026-09-21
6
+
7
+ ### Fixed
8
+
9
+ - World ID complete commands no longer attach the tracking option bundle, which duplicated `--network` and `--proof` and crashed CLI startup. Deposit begin registers `--runtime-id`, `--amount-usd`, and `--destination-address`. Chain id comes from the chains bundle. Pairs with `thirdfy-mcp` **0.0.124**.
10
+
11
+ ## [0.2.74] - 2026-09-21
12
+
13
+ ### Added
14
+
15
+ - World ID deposit proof commands: `delegation world-id-begin`, `delegation world-id-complete`, `delegation world-id-deposit-begin`, `delegation world-id-deposit-complete`. Pins: `test/delegation-world-id.test.cjs`. Pairs with `thirdfy-mcp` **0.0.124** and Thirdfy API deposit receipt routes.
6
16
 
7
17
  ## [0.2.73] - 2026-09-21
8
18
 
package/README.md CHANGED
@@ -40,10 +40,10 @@ Run without global install:
40
40
  npx @thirdfy/agent-cli --help
41
41
  ```
42
42
 
43
- ## What's new in v0.2.73
43
+ ## What's new in v0.2.75
44
44
 
45
- - Hyperliquid Circle CCTP ids `quote_hyperliquid_cctp_deposit` and `deposit_hyperliquid_cctp`. Managed execute signs those on `params.sourceChainId` with no default chain.
46
- - Provider hints follow API `setupHints` and `get_hyperliquid_funding_status` `nextAction` instead of hardcoded Arbitrum / Li.Fi.
45
+ - World ID deposit proof commands load without a duplicate `--network` flag.
46
+ - `delegation world-id-deposit-begin` accepts amount, runtime, and destination flags.
47
47
  - See [CHANGELOG.md](./CHANGELOG.md) and GitHub Releases for older versions.
48
48
 
49
49
  ## Quick start
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thirdfy/agent-cli",
3
- "version": "0.2.73",
3
+ "version": "0.2.75",
4
4
  "description": "Thirdfy Agent CLI for onboarding, governance preflight, execute-intent, and status polling.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli/help.mjs CHANGED
@@ -30,6 +30,10 @@ Core commands:
30
30
  thirdfy-agent delegation balance [--auth-token <token> | --owner-session-token <token>] --agent-key <key> [--chain-id <id>] [--json]
31
31
  thirdfy-agent delegation revoke [--auth-token <token> | --owner-session-token <token>] --agent-key <key> [--reason <text>] [--chain-id <id>] [--json]
32
32
  thirdfy-agent delegation redeem --agent-api-key <key> --action <id> --params <json> [--run-mode thirdfy|hybrid|agent_wallet] [--estimated-amount-usd <usd>] [--json]
33
+ thirdfy-agent delegation world-id-begin [--auth-token <token> | --owner-session-token <token>] --agent-key <key> [--chain-id <id>] [--json]
34
+ thirdfy-agent delegation world-id-complete [--auth-token <token> | --owner-session-token <token>] --agent-key <key> --proof <json> [--chain-id <id>] [--json]
35
+ thirdfy-agent delegation world-id-deposit-begin [--auth-token <token> | --owner-session-token <token>] --org-id <uuid> --runtime-id <uuid> [--amount-usd <usd>] [--destination-address <addr>] [--deposit-signal <id>] [--chain-id <id>] [--json]
36
+ thirdfy-agent delegation world-id-deposit-complete [--auth-token <token> | --owner-session-token <token>] --org-id <uuid> --proof <json> [--chain-id <id>] [--json]
33
37
  thirdfy-agent managed wallet init [--auth-token <token> | --owner-session-token <token>] [--chain-id <id>] [--json]
34
38
  thirdfy-agent managed wallet grant [--auth-token <token> | --owner-session-token <token>] --agent-key <key> --token-address <addr> --max-usd-per-day <usd> [--chain-id <id>] [--period-duration <sec>] [--expiry-seconds <sec>] [--json]
35
39
  thirdfy-agent managed setup [--auth-token <token> | --owner-session-token <token>] --agent-key <key> [--run-mode thirdfy|hybrid|agent_wallet] [--token-address <addr>] [--max-usd-per-day <usd>] [--chain-id <id>] [--json]
@@ -412,6 +412,34 @@ export const CLI_MANIFEST = [
412
412
  options: ['auth', 'delegation'],
413
413
  description: 'Revoke delegation',
414
414
  },
415
+ {
416
+ path: ['delegation', 'world-id-begin'],
417
+ handler: 'commandDelegationWorldIdBegin',
418
+ tier: 'online',
419
+ options: ['auth', 'delegation', 'chains'],
420
+ description: 'Begin World ID proof for an agent delegation',
421
+ },
422
+ {
423
+ path: ['delegation', 'world-id-complete'],
424
+ handler: 'commandDelegationWorldIdComplete',
425
+ tier: 'online',
426
+ options: ['auth', 'delegation', 'chains'],
427
+ description: 'Complete World ID proof for an agent delegation',
428
+ },
429
+ {
430
+ path: ['delegation', 'world-id-deposit-begin'],
431
+ handler: 'commandDelegationWorldIdDepositBegin',
432
+ tier: 'online',
433
+ options: ['auth', 'delegation', 'chains'],
434
+ description: 'Begin World ID deposit proof for an organization',
435
+ },
436
+ {
437
+ path: ['delegation', 'world-id-deposit-complete'],
438
+ handler: 'commandDelegationWorldIdDepositComplete',
439
+ tier: 'online',
440
+ options: ['auth', 'delegation', 'chains'],
441
+ description: 'Complete World ID deposit proof for an organization',
442
+ },
415
443
  {
416
444
  path: ['delegation', 'redeem'],
417
445
  handler: 'commandDelegationRedeem',
@@ -20,5 +20,11 @@ export function attachDelegationOptions(cmd) {
20
20
  .option('--verify', 'verify on-chain')
21
21
  .option('--include-onchain', 'include on-chain data')
22
22
  .option('--onchain', 'alias for include on-chain')
23
- .option('--reason <text>', 'revoke reason');
23
+ .option('--reason <text>', 'revoke reason')
24
+ .option('--org-id <id>', 'EarnOrg organization id')
25
+ .option('--runtime-id <id>', 'EarnOrg runtime id')
26
+ .option('--amount-usd <usd>', 'deposit amount in USD')
27
+ .option('--destination-address <addr>', 'agent destination address')
28
+ .option('--deposit-signal <signal>', 'deposit proof signal (deposit:...)')
29
+ .option('--proof <json>', 'World ID proof JSON');
24
30
  }
@@ -326,6 +326,101 @@ async function commandDelegationBalance(ctx, flags, capabilities) {
326
326
  }
327
327
 
328
328
 
329
+ async function commandDelegationWorldIdBegin(ctx, flags, capabilities) {
330
+ const authHeaders = buildOwnerAuthHeaders(
331
+ flags,
332
+ 'Missing --auth-token/--owner-session-token (or THIRDFY_AUTH_TOKEN/THIRDFY_OWNER_SESSION_TOKEN) for delegation world-id-begin'
333
+ );
334
+ const payload = {
335
+ agentKey: requireFlag(flags, 'agentKey', 'Missing --agent-key'),
336
+ chainId: Number(flags.chainId || 8453),
337
+ };
338
+ const response = await apiPost(ctx, '/api/v1/agent/delegation/world-id/begin', payload, {
339
+ ...authHeaders,
340
+ });
341
+ const success = Boolean(response?.success !== false);
342
+ printEnvelope({
343
+ success,
344
+ code: success ? 'DELEGATION_WORLD_ID_BEGIN_OK' : 'DELEGATION_WORLD_ID_BEGIN_FAILED',
345
+ message: response?.message || (success ? 'World ID agent challenge started' : 'World ID agent begin failed'),
346
+ data: response,
347
+ meta: { apiBase: ctx.apiBase, capabilitiesVersion: capabilities?.contractVersion || null },
348
+ });
349
+ }
350
+
351
+ async function commandDelegationWorldIdComplete(ctx, flags, capabilities) {
352
+ const authHeaders = buildOwnerAuthHeaders(
353
+ flags,
354
+ 'Missing --auth-token/--owner-session-token (or THIRDFY_AUTH_TOKEN/THIRDFY_OWNER_SESSION_TOKEN) for delegation world-id-complete'
355
+ );
356
+ const payload = {
357
+ agentKey: requireFlag(flags, 'agentKey', 'Missing --agent-key'),
358
+ chainId: Number(flags.chainId || 8453),
359
+ proof: parseJsonFlag(flags, 'proof'),
360
+ };
361
+ const response = await apiPost(ctx, '/api/v1/agent/delegation/world-id/complete', payload, {
362
+ ...authHeaders,
363
+ });
364
+ const success = Boolean(response?.success !== false);
365
+ printEnvelope({
366
+ success,
367
+ code: success ? 'DELEGATION_WORLD_ID_COMPLETE_OK' : 'DELEGATION_WORLD_ID_COMPLETE_FAILED',
368
+ message: response?.message || (success ? 'World ID agent proof recorded' : 'World ID agent complete failed'),
369
+ data: response,
370
+ meta: { apiBase: ctx.apiBase, capabilitiesVersion: capabilities?.contractVersion || null },
371
+ });
372
+ }
373
+
374
+ async function commandDelegationWorldIdDepositBegin(ctx, flags, capabilities) {
375
+ const authHeaders = buildOwnerAuthHeaders(
376
+ flags,
377
+ 'Missing --auth-token/--owner-session-token (or THIRDFY_AUTH_TOKEN/THIRDFY_OWNER_SESSION_TOKEN) for delegation world-id-deposit-begin'
378
+ );
379
+ const payload = {
380
+ orgId: requireFlag(flags, 'orgId', 'Missing --org-id'),
381
+ chainId: Number(flags.chainId || 8453),
382
+ };
383
+ if (flags.runtimeId) payload.runtimeId = String(flags.runtimeId).trim();
384
+ if (flags.amountUsd != null) payload.amountUsd = Number(flags.amountUsd);
385
+ if (flags.destinationAddress) payload.destinationAddress = String(flags.destinationAddress).trim();
386
+ if (flags.depositSignal) payload.depositSignal = String(flags.depositSignal).trim();
387
+ if (flags.idempotencyKey) payload.idempotencyKey = String(flags.idempotencyKey).trim();
388
+ const response = await apiPost(ctx, '/api/v1/agent/delegation/world-id/deposit/begin', payload, {
389
+ ...authHeaders,
390
+ });
391
+ const success = Boolean(response?.success !== false);
392
+ printEnvelope({
393
+ success,
394
+ code: success ? 'DELEGATION_WORLD_ID_DEPOSIT_BEGIN_OK' : 'DELEGATION_WORLD_ID_DEPOSIT_BEGIN_FAILED',
395
+ message: response?.message || (success ? 'World ID deposit challenge started' : 'World ID deposit begin failed'),
396
+ data: response,
397
+ meta: { apiBase: ctx.apiBase, capabilitiesVersion: capabilities?.contractVersion || null },
398
+ });
399
+ }
400
+
401
+ async function commandDelegationWorldIdDepositComplete(ctx, flags, capabilities) {
402
+ const authHeaders = buildOwnerAuthHeaders(
403
+ flags,
404
+ 'Missing --auth-token/--owner-session-token (or THIRDFY_AUTH_TOKEN/THIRDFY_OWNER_SESSION_TOKEN) for delegation world-id-deposit-complete'
405
+ );
406
+ const payload = {
407
+ orgId: requireFlag(flags, 'orgId', 'Missing --org-id'),
408
+ chainId: Number(flags.chainId || 8453),
409
+ proof: parseJsonFlag(flags, 'proof'),
410
+ };
411
+ const response = await apiPost(ctx, '/api/v1/agent/delegation/world-id/deposit/complete', payload, {
412
+ ...authHeaders,
413
+ });
414
+ const success = Boolean(response?.success !== false);
415
+ printEnvelope({
416
+ success,
417
+ code: success ? 'DELEGATION_WORLD_ID_DEPOSIT_COMPLETE_OK' : 'DELEGATION_WORLD_ID_DEPOSIT_COMPLETE_FAILED',
418
+ message: response?.message || (success ? 'World ID deposit proof recorded' : 'World ID deposit complete failed'),
419
+ data: response,
420
+ meta: { apiBase: ctx.apiBase, capabilitiesVersion: capabilities?.contractVersion || null },
421
+ });
422
+ }
423
+
329
424
  async function commandDelegationRedeem(ctx, flags, capabilities) {
330
425
  const selectedRunMode = getEffectiveRunMode(ctx, flags);
331
426
  if (!['thirdfy', 'hybrid', 'agent_wallet'].includes(selectedRunMode)) {
@@ -350,6 +445,10 @@ async function commandDelegationRedeem(ctx, flags, capabilities) {
350
445
  commandDelegationInspect,
351
446
  commandDelegationRevoke,
352
447
  commandDelegationBalance,
448
+ commandDelegationWorldIdBegin,
449
+ commandDelegationWorldIdComplete,
450
+ commandDelegationWorldIdDepositBegin,
451
+ commandDelegationWorldIdDepositComplete,
353
452
  commandDelegationRedeem,
354
453
  };
355
454
  }