feat(action-providers): add read-only TaskMarket discovery provider - #1452
Open
wilddoc wants to merge 1 commit into
Open
feat(action-providers): add read-only TaskMarket discovery provider#1452wilddoc wants to merge 1 commit into
wilddoc wants to merge 1 commit into
Conversation
Adds a TaskMarket action provider so an agent can discover paid work on
TaskMarket, a task marketplace settling in USDC on Base.
The motivation is delegation. An agent that recognises a request is better
handled by external workers can look for existing funded work instead of
burning inference on something it will do badly, and can hand its operator a
link rather than an unreliable answer.
Actions:
- browse_tasks list open tasks by net reward, with deadline and how
contested each already is
- get_task_details full acceptance criteria for one task
- evaluate_delegation given work in hand, surface open tasks overlapping it
Scope is deliberately read-only. Nothing here spends funds, touches a wallet,
creates a task, claims work, or requires an API key. Task creation and
submission move real USDC through escrow, so they are left to the first-party
TaskMarket CLI behind explicit human authorization rather than exposed as
agent actions.
Notes:
- rewards are reported net of the platform fee, which is what a worker
actually receives
- submission counts are surfaced, because a 64 USDC task with 142 submissions
is often worth less in expectation than a 4 USDC task with three
- list views collapse descriptions to one line; task descriptions run to
hundreds of words of markdown and would otherwise dominate the context
- evaluate_delegation uses transparent keyword overlap rather than embeddings,
so it costs no extra model call and its behaviour is predictable
The discovery endpoints used are unauthenticated and read-only, so the
provider needs no configuration. supportsNetwork returns true because
browsing touches no wallet.
Includes unit tests covering USDC conversion, expiry handling (a task can be
status=open but past expiry), stopword-filtered matching, reward sorting and
API-failure paths.
🟡 Heimdall Review Status
|
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.
Description
Adds a TaskMarket action provider so an agent can discover paid work on TaskMarket, a task marketplace where requesters escrow USDC on Base and workers submit deliverables.
The motivation is delegation. An agent that recognises a request is better handled by external workers can look for existing funded work instead of burning inference on something it will do badly, and can hand its operator a link rather than an unreliable answer.
Actions
browse_tasksget_task_detailsevaluate_delegationScope: read-only, on purpose
Nothing in this provider spends funds, touches a wallet, creates a task, claims work, or requires an API key.
Task creation and submission move real USDC through escrow, so they are deliberately left to the first-party TaskMarket CLI behind explicit human authorization rather than exposed as agent actions.
evaluate_delegationstates this in its own output: it returns candidates and says plainly that acting on them needs operator authorization.Because of that, the provider needs no configuration and no secrets. The discovery endpoints are unauthenticated and read-only.
Design notes
supportsNetworkreturnstrue: browsing reads a public HTTP API and touches no wallet. Settlement is USDC on Base, but only once a user acts outside this provider.Tests
taskmarketActionProvider.test.tscovers USDC base-unit conversion from both strings and numbers, hours-remaining parsing, description collapsing, reward-floor filtering, sorting by reward, delegation matching including the stopword and no-match paths, full task rendering, and the API-failure path (returns an error string rather than throwing).One case worth calling out: a task can be
status: "open"and already past itsexpiryTime.isOpenForWorkchecks status, submission window and expiry together, and there is a test for exactly that combination.Checklist
action-providers/index.ts