Skip to content

feat: add Taskmarket plugin - #598

Open
MohDev212 wants to merge 1 commit into
goat-sdk:mainfrom
MohDev212:feat/taskmarket-plugin
Open

MohDev212 wants to merge 1 commit into
goat-sdk:mainfrom
MohDev212:feat/taskmarket-plugin

Conversation

@MohDev212

Copy link
Copy Markdown

What problem this solves

Goat SDK agents have no way to find or fund work on Taskmarket (https://taskmarket.dev), an onchain agent task marketplace paying USDC on Base via x402. This plugin adds Taskmarket as a first-class Goat plugin so agents can discover open tasks and create funded tasks from inside the Goat toolkit.

Change summary

  • Adds @goat-sdk/plugin-taskmarket with three tools:
    • taskmarket_list_tasks (read-only): open tasks from the public Taskmarket REST API, with optional min/max reward (USDC) and mode filters.
    • taskmarket_get_task (read-only): task detail by ID.
    • taskmarket_create_task (write): creates a task through the first-party taskmarket CLI via child_process, so the CLI owns the wallet, x402 payment flow, and signatures. No API keys or private keys are handled by the plugin.
  • Adds changeset + README documenting setup and safety gates.

Safety gates

  • createTask requires an explicit confirmation boolean; without it the tool refuses and returns requires_confirmation.
  • Enforces TASKMARKET_MAX_SPEND_USDC (default 10 USDC); rewards above the limit throw.
  • Echoes the full order (description, reward, duration, mode, Base network) before executing.
  • 120s child-process timeout; on ETIMEDOUT it throws with an explicit "do not retry the payment, verify first" message.
  • No secrets are ever logged or committed.

Tests

  • 12 unit tests pass: pnpm --filter @goat-sdk/plugin-taskmarket test
  • Tests mock fetch and child_process; no live API calls, no wallet/keystore touched.
  • git grep -i taskmarket on upstream main: zero hits (no existing support).

Note on the test toolchain

The plugin's tests compile through swc (unplugin-swc) in vitest.config.ts because Vite's esbuild transform does not implement emitDecoratorMetadata, which the @goat-sdk/core @Tool decorator requires to introspect method parameters at runtime.

Adds @goat-sdk/plugin-taskmarket with three tools:
- taskmarket_list_tasks (read-only): open tasks from the public
  Taskmarket REST API with optional reward/mode filters.
- taskmarket_get_task (read-only): task detail by ID.
- taskmarket_create_task (write): creates a task through the first-party
  taskmarket CLI via child_process. Requires explicit confirmation,
  enforces TASKMARKET_MAX_SPEND_USDC (default 10), echoes the order
  before executing, and never retries payments with unknown settlement.

Tests run through swc (unplugin-swc) because esbuild does not implement
emitDecoratorMetadata, which the @goat-sdk/core @tool decorator requires.
12 unit tests pass.
@changeset-bot

changeset-bot Bot commented Aug 15, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8c02fb9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

This branch has not been deployed

No deployments
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