Skip to content

feat(run): pass quote.transactabilityTrace through to --dry-run --json - #176

Merged
SELAT-DEV merged 1 commit into
mainfrom
feat/run-trace-passthrough
Aug 26, 2026
Merged

feat(run): pass quote.transactabilityTrace through to --dry-run --json#176
SELAT-DEV merged 1 commit into
mainfrom
feat/run-trace-passthrough

Conversation

@SELAT-DEV

Copy link
Copy Markdown
Contributor

What

selat run "<intent>" --dry-run --live-probe --json now includes the full machine-readable decision trace as a transactabilityTrace field, alongside the existing human transactability line.

Previously the dry-run probe ran selat-pay's --probe-only and kept only the one-line score string from stderr, discarding the stdout JSON that carries quote.transactabilityTrace. Machine consumers who wanted the attribution-typed trace (network vs first-party, never blended; primarySource; divergence; advisories) had to shell out to the internal selat-pay engine CLI directly — which is also what forced the docs (selat.ai/docs/transactability/decision-trace and /first-party) to document selat-pay commands.

How

  • The dry-run probe now captures stdout too and parses quote.transactabilityTrace from the --probe-only JSON (pure, exported parser; absent/non-JSON/trace-less output degrades to "no trace field", never an error).
  • --json output gains transactabilityTrace when the probe surfaced one; the human (non-json) rendering is unchanged.

Verification

  • 529/529 tests pass, including 12 new ones in test/run-transactability.test.mjs covering the passthrough (parse, absence, degradation).
  • Live end-to-end against production: selat run "token prices by symbol" --dry-run --live-probe --json --endpoint https://x402.alchemy.com/prices/v1/tokens/by-symbol --param symbols=ETH returns one JSON object with the plan, the score line, and a transactabilityTrace identical to the selat-pay probe's (dataStatus: measured, primarySource: first-party, windows 24h/7d/all = 6/15/96). $0 spent.

Follow-up

Once released, the two docs pages can replace their selat-pay … --probe-only --live-probe snippets with this command, removing the last references to the internal engine CLI.

🤖 Generated with Claude Code

A dry run with --live-probe already spawns selat-pay --probe-only once for
the one-line Transactability Score; that probe's stdout IS selat-pay's
--probe-only JSON, whose quote.transactabilityTrace carries the full
attribution-typed decision trace. Harvest both halves from the single
spawn and, under --json, include the trace as a transactabilityTrace
field in the dry-run object — so machine consumers (and the docs
decision-trace / first-party pages) can use `selat run` instead of the
internal selat-pay CLI.

Human (non-json) output is unchanged: the score line only. The trace is
passed through opaquely (shape owned by selat-pay); absent, non-JSON, or
trace-less probe output omits the field rather than failing the dry run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@SELAT-DEV
SELAT-DEV merged commit 00d82ea into main Aug 26, 2026
1 check passed
SELAT-DEV added a commit that referenced this pull request Aug 26, 2026
The --dry-run --live-probe --json dry run now carries the machine-readable
decision trace (transactabilityTrace, #176) alongside the human score line,
so agents get the attribution-typed reading from the selat CLI without
shelling out to selat-pay. Also includes selat setup-policy
--quarantine-days (#174) and the search probe-hint wording fix (#175).
SELAT-DEV added a commit that referenced this pull request Aug 29, 2026
…-json (#177)

Companion to selat-pay's challenge-schema harvest: the probe-only JSON now
carries quote.inputSchema (bazaar / MPP-opaque / probe-confirmed, merged),
and the dry run passes it through as challengeInputSchema so an agent gets
the endpoint's param table before any payment exists. Same seam and
null-on-anything contract as the transactabilityTrace passthrough (#176).

Co-authored-by: Karen Sheng <ksherlocked@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant