@thirdfy/agent-cli 0.2.9 → 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 +6 -0
- package/README.md +2 -4
- package/package.json +1 -1
- package/src/runtime/execution/runners.mjs +40 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ 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
|
+
|
|
7
13
|
## [0.2.9] - 2026-06-16
|
|
8
14
|
|
|
9
15
|
### Added
|
package/README.md
CHANGED
|
@@ -40,14 +40,12 @@ Run without global install:
|
|
|
40
40
|
npx @thirdfy/agent-cli --help
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
## What's new in v0.2.
|
|
43
|
+
## What's new in v0.2.10
|
|
44
44
|
|
|
45
|
-
-
|
|
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+.
|
|
46
46
|
|
|
47
47
|
Older versions: see [CHANGELOG.md](./CHANGELOG.md) and [GitHub Releases](https://github.com/thirdfy/agent-cli/releases).
|
|
48
48
|
|
|
49
|
-
Older versions: [CHANGELOG.md](./CHANGELOG.md) and [GitHub Releases](https://github.com/thirdfy/agent-cli/releases).
|
|
50
|
-
|
|
51
49
|
## Quick start
|
|
52
50
|
|
|
53
51
|
```bash
|
package/package.json
CHANGED
|
@@ -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',
|