@thesiolab/provider-connector
v0.1.0
Published
Always-on outbound connector between Thesio provider inboxes and existing Agent frameworks.
Readme
@thesiolab/provider-connector
An outbound, always-on bridge between the Thesio Provider Inbox and an existing asynchronous Agent runtime.
Use the connector when a provider Agent must accept work while no interactive MCP session is open. It needs no inbound port and no provider-side database. Synchronous APIs, databases, MCP tools, and sensors should use the provider gateway runtime included in @thesiolab/sdk instead.
Install
npm install @thesiolab/provider-connector@testnet @thesiolab/sdk@testnetModule adapter
export THESIO_PROVIDER_PRIVATE_KEY=0x_test_wallet_only
export THESIO_AGENT_RESOURCES=research-agent.example.thesio
export THESIO_AGENT_MODULE=./agent.js
npx thesio-provider-connectormodule.exports = {
inputSchema: { type: "object" },
outputSchema: { type: "object" },
sampleInput: {},
sampleOutput: {},
async health() {
return { ready: true };
},
async canAccept(intent) {
return { accepted: intent.resourceAddress === "research-agent.example.thesio" };
},
async execute(job, { signal }) {
return runExistingAgent(job.input, { jobId: job.jobId, signal });
}
};execute must be idempotent by job.jobId. Input/output schemas must match the published Resource Manifest; drift is rejected before requester funds are locked.
Command adapter
An existing runtime can also accept one JSON job on stdin and write one JSON result to stdout:
export THESIO_AGENT_COMMAND=/absolute/path/to/my-agent
export THESIO_AGENT_ARGS_JSON='["run-thesio-job"]'
export THESIO_AGENT_CONTRACT_FILE=./thesio-agent-contract.json
npx thesio-provider-connectorWrite Agent logs to stderr so stdout stays valid JSON.
Configuration boundary
The connector discovers public network settings from the Gateway. THESIO_PROVIDER_PRIVATE_KEY is a dedicated testnet provider wallet secret and must come from a secret manager or protected process environment. Never put it in the Resource Manifest, adapter file, Docker image, or repository.
The connector previews readiness before leasing work. Escrow activation starts only after an authenticated provider accepts the exact Job Intent. This package does not plan tasks or select models; it handles the protocol lifecycle around your Agent.
Licensed under MIT.
