@thirdfy/agent-cli 0.2.8 → 0.2.10

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
@@ -4,6 +4,18 @@ All notable changes to `@thirdfy/agent-cli` are documented here. The format is b
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.2.10] - 2026-06-17
8
+
9
+ ### Changed
10
+
11
+ - `agent_wallet` read-only runs (for example `get_allora_market_forecast`) fall back to `execute-intent` with `solo_owner_mirror` when `/api/v1/agent/execute` rejects the action on the execute rail. Pairs with Thirdfy API **v3.4.59+**.
12
+
13
+ ## [0.2.9] - 2026-06-16
14
+
15
+ ### Added
16
+
17
+ - Command reference: Allora provider (`get_allora_price_inference`, `get_allora_market_forecast`) via `--provider allora`. Pairs with Thirdfy API v3.4.57+.
18
+
7
19
  ## [0.2.8] - 2026-06-13
8
20
 
9
21
  ### Added
package/README.md CHANGED
@@ -40,13 +40,11 @@ Run without global install:
40
40
  npx @thirdfy/agent-cli --help
41
41
  ```
42
42
 
43
- ## What's new in v0.2.8
43
+ ## What's new in v0.2.10
44
44
 
45
- - Hosted runtimes can set `THIRDFY_EXECUTION_RUNTIME_ID` and `THIRDFY_EXECUTION_ORG_ID` in machine env (EarnClaw also sets legacy `EARNCLAW_*` aliases). The CLI forwards neutral `executionContext` on Thirdfy API POSTs.
46
- - Attribution uses `x-thirdfy-execution-runtime-id`, `x-thirdfy-execution-org-id`, and `executionContext` on execute payloads.
47
- - Pairs with Thirdfy API v3.4.55+ and EarnClaw cost sync `attribution=strict`.
45
+ - `agent_wallet` read-only Allora forecasts (`get_allora_market_forecast`) fall back to `execute-intent` with `solo_owner_mirror` when the execute rail is unavailable. Hermes runtimes should use `--run-mode agent_wallet` after Thirdfy API v3.4.59+.
48
46
 
49
- Older versions: [CHANGELOG.md](./CHANGELOG.md) and [GitHub Releases](https://github.com/thirdfy/agent-cli/releases).
47
+ Older versions: see [CHANGELOG.md](./CHANGELOG.md) and [GitHub Releases](https://github.com/thirdfy/agent-cli/releases).
50
48
 
51
49
  ## Quick start
52
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thirdfy/agent-cli",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "Thirdfy Agent CLI for onboarding, governance preflight, execute-intent, and status polling.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -78,6 +78,19 @@ function applyExecutionFallbackHints(normalized, { flags, runMode, resolvedActio
78
78
  return next;
79
79
  }
80
80
 
81
+ function shouldFallbackAgentWalletToExecuteIntent(resolved, response) {
82
+ const meta = resolved?.resolvedActionMeta || {};
83
+ const action = String(resolved?.resolvedAction || '')
84
+ .trim()
85
+ .toLowerCase()
86
+ .replace(/-/g, '_');
87
+ const readOnlyByName = action.startsWith('get_') || action.startsWith('search_');
88
+ const readOnlyByMeta = meta.supportsExecute === false && meta.supportsExecuteIntent !== false;
89
+ if (!readOnlyByName && !readOnlyByMeta) return false;
90
+ const err = String(response?.error || response?.message || '').toLowerCase();
91
+ return err.includes('does not support execute rail');
92
+ }
93
+
81
94
  async function runPreflightByMode(runMode, ctx, flags, resolved, options = {}) {
82
95
  const resolvedAction = resolved.resolvedAction;
83
96
  if (runMode === 'agent_wallet') {
@@ -321,6 +334,33 @@ async function executeManagedWalletRun(ctx, flags, resolved, options) {
321
334
  forceIdempotency: true,
322
335
  });
323
336
  const response = await apiPost(ctx, '/api/v1/agent/execute', payload);
337
+ if (shouldFallbackAgentWalletToExecuteIntent(resolved, response)) {
338
+ const userDid = resolveEffectiveUserDid(flags);
339
+ const chainId = Number(flags.chainId || 8453);
340
+ const intentResult = await executeThirdfyRun(
341
+ ctx,
342
+ {
343
+ ...flags,
344
+ chainId,
345
+ runMode: 'thirdfy',
346
+ userDid: userDid || flags.userDid,
347
+ executionScope: flags.executionScope || 'solo_owner_mirror',
348
+ },
349
+ resolved,
350
+ { ...options, skipPreflight: true },
351
+ 'thirdfy'
352
+ );
353
+ intentResult.mode = 'agent_wallet';
354
+ intentResult.routeFallback = 'execute_intent_read_only';
355
+ intentResult.executionWalletPreflight = preflight;
356
+ intentResult.executionWalletAddress =
357
+ preflight?.executionWalletAddress ||
358
+ response?.executionWalletAddress ||
359
+ response?.data?.executionWalletAddress ||
360
+ null;
361
+ intentResult.signerMethod = 'managed_wallet_server';
362
+ return intentResult;
363
+ }
324
364
  const normalized = normalizeIntentResponse({
325
365
  success: Boolean(response?.success),
326
366
  status: response?.success ? 'completed' : 'failed',