Repository navigation
Conversation
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.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
@goat-sdk/plugin-taskmarketwith 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-partytaskmarketCLI 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.Safety gates
createTaskrequires an explicitconfirmationboolean; without it the tool refuses and returnsrequires_confirmation.TASKMARKET_MAX_SPEND_USDC(default 10 USDC); rewards above the limit throw.ETIMEDOUTit throws with an explicit "do not retry the payment, verify first" message.Tests
pnpm --filter @goat-sdk/plugin-taskmarket testgit grep -i taskmarketon upstream main: zero hits (no existing support).Note on the test toolchain
The plugin's tests compile through swc (
unplugin-swc) invitest.config.tsbecause Vite's esbuild transform does not implementemitDecoratorMetadata, which the@goat-sdk/core@Tooldecorator requires to introspect method parameters at runtime.