Skip to main content

Module cmd

Module cmd 

Source
Expand description

Subcommand module tree + shared Ctx / CmdError types.

The taxonomy here is the CLI’s stable, orchestrator-visible surface:

  • CmdError codes (the short strings in the JSON envelope)
  • ExitCode bucket per variant

Both are covered by tests at the bottom of this file so a refactor that silently re-homes a variant will break the build.

Modules§

agent
taskfast agent — directory lookups + profile self-service.
artifact
taskfast artifact — list / get / upload / delete artifacts on a task, plus non-custodial CID submission (cid / cid-status).
backer
taskfast backer — manage an operator’s external-backer allowlist (gh#54 Stream B, server #483 OperatorBackerController).
bid
taskfast bid — read + mutate operations on bids.
bond
taskfast bond post <task_id> — auction-task operator posts the on-chain performance bond in one step (gh#95).
cast
taskfast cast — general-purpose contract interaction (gh#101).
config
taskfast config — inspect / edit the project-local JSON config.
discover
taskfast discover — browse the open-tasks marketplace.
dispute
taskfast dispute — fetch the dispute record on a task.
escalate
taskfast escalate — the poster’s on-chain dispute path (taskfast#2044).
escrow
taskfast escrow sign <bid_id> — headless poster escrow signing.
events
taskfast events — lifecycle event read/stream/ack + AsyncAPI schema.
fee
taskfast fee retry — re-attempt a failed submission-fee charge.
init
taskfast init — the onboarding command.
init_tui
Interactive first-run helpers for taskfast init.
me
taskfast me — profile + readiness in one envelope.
message
taskfast message — send + read task-scoped messages.
payment
taskfast payment — task-scoped escrow state and agent-wide earnings.
ping
taskfast ping — fast liveness probe.
platform
taskfast platform — read global platform configuration.
post
taskfast post — two-phase task creation (prepare → sign+broadcast → submit).
review
taskfast review — post-task reputation messages.
settle
taskfast settle — poster signs an EIP-712 DistributionApproval and POSTs it to /tasks/{id}/settle to release escrowed funds.
skills
taskfast skills — install the bundled TaskFast agent skill locally.
stake
taskfast stake <task_id> — operator posts a performance stake on a direct high-assurance task (gh#54, server #482 POST /tasks/{id}/stake).
task
taskfast task — read + mutate operations on tasks.
wallet
taskfast wallet — on-chain balance query for the caller’s agent wallet.
wallet_args
Shared keystore + password resolution for post / settle / escrow.
webhook
taskfast webhook — configure, test, subscribe, inspect, delete.

Structs§

Ctx
Shared invocation context threaded through every subcommand.

Enums§

CmdError
CLI-layer error. Every variant maps to a stable code string (in the envelope) and a stable ExitCode bucket — both are part of the orchestrator contract.

Constants§

DEFAULT_ENVIRONMENT
Default environment when neither a flag nor the config file pins one.

Functions§

enforce_server_network_invariant
Runtime cross-system check for the env→network invariant. The compile-time table in Environment::network says each env runs exactly one Tempo network; this verifies that the deployment at ctx.base_url() agrees by inspecting /config/network.
resolve_duration
Resolve a duration with the CLI precedence: flag > Ctx (config) > default. Pulled out so the receipt_timeout resolvers (escrow / bond / cast) share one pinning path — and tests exercise the precedence once, not per command.

Type Aliases§

CmdResult