@oneshot-agent/mcp-server 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -3
- package/dist/index.js +17 -3
- package/dist/tools/analytics.d.ts +2 -2
- package/dist/tools/browser.d.ts +2 -2
- package/dist/tools/build.d.ts +2 -2
- package/dist/tools/commerce.d.ts +2 -2
- package/dist/tools/company.d.ts +2 -2
- package/dist/tools/compute.d.ts +22 -2
- package/dist/tools/compute.js +44 -0
- package/dist/tools/domains.d.ts +2 -2
- package/dist/tools/email.d.ts +2 -2
- package/dist/tools/email.js +2 -2
- package/dist/tools/enrichment.d.ts +2 -2
- package/dist/tools/gov.d.ts +2 -2
- package/dist/tools/inbox.d.ts +2 -2
- package/dist/tools/index.d.ts +9 -2
- package/dist/tools/index.js +44 -2
- package/dist/tools/local.d.ts +2 -2
- package/dist/tools/notifications.d.ts +2 -2
- package/dist/tools/nyne.d.ts +2 -2
- package/dist/tools/people.d.ts +2 -2
- package/dist/tools/research.d.ts +2 -2
- package/dist/tools/search.d.ts +2 -2
- package/dist/tools/sms-inbox.d.ts +2 -2
- package/dist/tools/sms.d.ts +2 -2
- package/dist/tools/voice.d.ts +2 -2
- package/dist/tools/wallet.d.ts +2 -2
- package/dist/tools/wallet.js +2 -1
- package/dist/tools/web-read.d.ts +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ npm install -g @oneshot-agent/mcp-server
|
|
|
10
10
|
|
|
11
11
|
## Configuration
|
|
12
12
|
|
|
13
|
-
The server supports
|
|
13
|
+
The server supports three auth methods: **CDP Wallet** (recommended, no private keys in config), a raw private key, or an **access token** (credits-only session, no key at all — see Remote below).
|
|
14
14
|
|
|
15
15
|
### Environment Variables
|
|
16
16
|
|
|
@@ -20,6 +20,7 @@ The server supports two auth methods: **CDP Wallet** (recommended, no private ke
|
|
|
20
20
|
| `CDP_API_KEY_SECRET` | Option A | Coinbase CDP API key secret |
|
|
21
21
|
| `CDP_WALLET_SECRET` | Option A | Coinbase CDP wallet secret |
|
|
22
22
|
| `ONESHOT_WALLET_PRIVATE_KEY` | Option B | Raw private key for signing payments |
|
|
23
|
+
| `ONESHOT_ACCESS_TOKEN` | Option C | Agent access token (`oneshot_…`): credits-only session, cannot be combined with `ONESHOT_BUDGET_*` |
|
|
23
24
|
| `ONESHOT_BUDGET_DAILY` | No | Max USDC the agent may spend per UTC day (spend budget, enforced server-side) |
|
|
24
25
|
| `ONESHOT_BUDGET_PER_TRANSACTION` | No | Max USDC for any single call |
|
|
25
26
|
| `ONESHOT_BUDGET_ALERT_AT` | No | Fraction of the daily budget that triggers a warning (default 0.8) |
|
|
@@ -92,6 +93,30 @@ Get CDP credentials at [Coinbase Agentic Wallet](https://docs.cdp.coinbase.com/a
|
|
|
92
93
|
|
|
93
94
|
Read tools (inbox, SMS inbox, notifications, balance, browser profiles) return private, per-agent data. The server wraps the OneShot TypeScript SDK, which automatically signs a short-lived **EIP-712 read proof** (`x-agent-proof`) on each read so the API can verify you control the `X-Agent-ID` wallet. No configuration needed — this ships via `@oneshot-agent/sdk >= 0.25.0` (the bundled dependency). Read-proof verification is rolling out in log-only mode server-side, so older callers keep working until enforcement is enabled.
|
|
94
95
|
|
|
96
|
+
## Remote (hosted)
|
|
97
|
+
|
|
98
|
+
Clients that run in someone else's cloud — Grok Bot, hosted runners — cannot spawn this
|
|
99
|
+
server and must not hold a wallet key. For them OneShot hosts the same 53 tools over
|
|
100
|
+
Streamable HTTP at **`https://win.oneshotagent.com/mcp`**, authenticated with an
|
|
101
|
+
**agent access token** and billed to the agent's credit balance:
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"mcpServers": {
|
|
106
|
+
"oneshot": {
|
|
107
|
+
"url": "https://win.oneshotagent.com/mcp",
|
|
108
|
+
"headers": { "Authorization": "Bearer ${env:ONESHOT_ACCESS_TOKEN}" }
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Mint a token from a wallet session with `agent.createAccessToken()` (`@oneshot-agent/sdk`
|
|
115
|
+
≥ 0.33.0). Setup and billing details: https://docs.oneshotagent.com/sdk/remote-mcp
|
|
116
|
+
|
|
117
|
+
The same token also works with this local server (≥ 0.20.0): set `ONESHOT_ACCESS_TOKEN`
|
|
118
|
+
instead of the wallet variables for a credits-only session on your own machine.
|
|
119
|
+
|
|
95
120
|
## Available Tools
|
|
96
121
|
|
|
97
122
|
### Communication
|
|
@@ -168,6 +193,9 @@ Read tools (inbox, SMS inbox, notifications, balance, browser profiles) return p
|
|
|
168
193
|
| `oneshot_compute_tasks` | List tasks planned/executed under a goal |
|
|
169
194
|
| `oneshot_compute_cancel` | Cancel a goal and refund remaining budget |
|
|
170
195
|
| `oneshot_compute_respond` | Respond to a human-in-the-loop task |
|
|
196
|
+
| `oneshot_compute_pause` | Pause a recurring goal — plan and progress are kept |
|
|
197
|
+
| `oneshot_compute_resume` | Resume a paused recurring goal |
|
|
198
|
+
| `oneshot_compute_fund` | Top up a recurring goal's USDC budget |
|
|
171
199
|
|
|
172
200
|
### Domains
|
|
173
201
|
|
|
@@ -207,8 +235,9 @@ Use oneshot_email:
|
|
|
207
235
|
- subject: "Hello from AI"
|
|
208
236
|
- body: "<h1>Hello!</h1><p>This email was sent by an AI agent.</p>"
|
|
209
237
|
- from_name: "Jane Doe" (optional display name → "Jane Doe <jane@domain>")
|
|
210
|
-
- from_mailbox: "jane" (optional local-part, defaults to "agent")
|
|
211
|
-
- from_domain: "acme.com" (optional,
|
|
238
|
+
- from_mailbox: "jane" (optional local-part, defaults to "agent"; requires from_domain)
|
|
239
|
+
- from_domain: "acme.com" (optional, must be a domain you own; omit both from_domain and
|
|
240
|
+
from_mailbox to rotate across your warmed domains)
|
|
212
241
|
- mailbox_mode: "mailbox" (optional, 'relay' (default) | 'mailbox' — dedicated per-address
|
|
213
242
|
mailbox; only when first provisioning a new from_domain)
|
|
214
243
|
```
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { tools, handleToolCall } from "./tools/index.js";
|
|
|
7
7
|
import { budgetConfigFromEnv } from "./budget-env.js";
|
|
8
8
|
const CDP_KEY_ID = process.env.CDP_API_KEY_ID;
|
|
9
9
|
const PRIVATE_KEY = process.env.ONESHOT_WALLET_PRIVATE_KEY;
|
|
10
|
+
const ACCESS_TOKEN = process.env.ONESHOT_ACCESS_TOKEN;
|
|
10
11
|
async function initAgent() {
|
|
11
12
|
let budget;
|
|
12
13
|
try {
|
|
@@ -19,6 +20,19 @@ async function initAgent() {
|
|
|
19
20
|
}
|
|
20
21
|
if (budget.budgets)
|
|
21
22
|
console.error(`Spend budget: ${JSON.stringify(budget.budgets)}`);
|
|
23
|
+
if (ACCESS_TOKEN) {
|
|
24
|
+
// Option C: agent access token — credits-only, no key on this machine.
|
|
25
|
+
// Budgets are read-only for a token (a cap the token could raise is not
|
|
26
|
+
// a cap), so ONESHOT_BUDGET_* alongside it is a misconfiguration, not
|
|
27
|
+
// something to silently drop.
|
|
28
|
+
if (budget.budgets || budget.alerts) {
|
|
29
|
+
console.error("Error: ONESHOT_BUDGET_* cannot be combined with ONESHOT_ACCESS_TOKEN — budgets are read-only\n" +
|
|
30
|
+
" for access-token sessions. Set them from a wallet session (SDK budgets config or the API).");
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
console.error("Using access token (credits-only session)");
|
|
34
|
+
return OneShot.create({ accessToken: ACCESS_TOKEN });
|
|
35
|
+
}
|
|
22
36
|
if (CDP_KEY_ID) {
|
|
23
37
|
// Preferred: Coinbase CDP Server Wallet (no private key exposure)
|
|
24
38
|
console.error("Using Coinbase CDP wallet");
|
|
@@ -28,8 +42,8 @@ async function initAgent() {
|
|
|
28
42
|
// Fallback: raw private key
|
|
29
43
|
return new OneShot({ privateKey: PRIVATE_KEY, ...budget });
|
|
30
44
|
}
|
|
31
|
-
console.error("Error: Set CDP_API_KEY_ID + CDP_API_KEY_SECRET + CDP_WALLET_SECRET (recommended)
|
|
32
|
-
" or
|
|
45
|
+
console.error("Error: Set CDP_API_KEY_ID + CDP_API_KEY_SECRET + CDP_WALLET_SECRET (recommended),\n" +
|
|
46
|
+
" ONESHOT_WALLET_PRIVATE_KEY, or ONESHOT_ACCESS_TOKEN (credits-only session)");
|
|
33
47
|
process.exit(1);
|
|
34
48
|
}
|
|
35
49
|
// Start server
|
|
@@ -38,7 +52,7 @@ async function main() {
|
|
|
38
52
|
// Create MCP server
|
|
39
53
|
const server = new Server({
|
|
40
54
|
name: "oneshot-mcp",
|
|
41
|
-
version: "0.
|
|
55
|
+
version: "0.21.0", // keep in sync with package.json; guarded by version.test.ts
|
|
42
56
|
}, {
|
|
43
57
|
capabilities: {
|
|
44
58
|
tools: {},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const spendBreakdownTool: Tool;
|
|
4
4
|
export declare const rocsTool: Tool;
|
|
5
5
|
export declare const receiptsListTool: Tool;
|
package/dist/tools/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const browserTool: Tool;
|
|
4
4
|
export declare const browserCreateProfileTool: Tool;
|
|
5
5
|
export declare const browserListProfilesTool: Tool;
|
package/dist/tools/build.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const buildTool: Tool;
|
|
4
4
|
export declare const updateBuildTool: Tool;
|
|
5
5
|
export declare function handleBuild(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").BuildResult>;
|
package/dist/tools/commerce.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const commerceSearchTool: Tool;
|
|
4
4
|
export declare const commerceBuyTool: Tool;
|
|
5
5
|
export declare function handleCommerceSearch(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").CommerceSearchResult>;
|
package/dist/tools/company.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const companySearchTool: Tool;
|
|
4
4
|
export declare const enrichCompanyTool: Tool;
|
|
5
5
|
export declare function handleCompanySearch(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").CompanySearchResult>;
|
package/dist/tools/compute.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const computeTool: Tool;
|
|
4
4
|
export declare const computeStatusTool: Tool;
|
|
5
5
|
export declare const computeTasksTool: Tool;
|
|
6
6
|
export declare const computeCancelTool: Tool;
|
|
7
7
|
export declare const computeRespondTool: Tool;
|
|
8
|
+
export declare const computePauseTool: Tool;
|
|
9
|
+
export declare const computeResumeTool: Tool;
|
|
10
|
+
export declare const computeFundTool: Tool;
|
|
8
11
|
export declare function handleCompute(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").ComputeGoalResult>;
|
|
9
12
|
export declare function handleComputeStatus(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").ComputeGoalStatus>;
|
|
10
13
|
export declare function handleComputeTasks(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").ComputeTask[]>;
|
|
@@ -19,3 +22,20 @@ export declare function handleComputeRespond(agent: OneShot, args: Record<string
|
|
|
19
22
|
task_status: string;
|
|
20
23
|
orchestrator_action: string;
|
|
21
24
|
}>;
|
|
25
|
+
export declare function handleComputePause(agent: OneShot, args: Record<string, unknown>): Promise<{
|
|
26
|
+
goal_id: string;
|
|
27
|
+
status: string;
|
|
28
|
+
run_count: number;
|
|
29
|
+
}>;
|
|
30
|
+
export declare function handleComputeResume(agent: OneShot, args: Record<string, unknown>): Promise<{
|
|
31
|
+
goal_id: string;
|
|
32
|
+
status: string;
|
|
33
|
+
next_run_at: string;
|
|
34
|
+
run_count: number;
|
|
35
|
+
}>;
|
|
36
|
+
export declare function handleComputeFund(agent: OneShot, args: Record<string, unknown>): Promise<{
|
|
37
|
+
goal_id: string;
|
|
38
|
+
topped_up: number;
|
|
39
|
+
total_budget: string;
|
|
40
|
+
remaining: string;
|
|
41
|
+
}>;
|
package/dist/tools/compute.js
CHANGED
|
@@ -86,6 +86,41 @@ export const computeRespondTool = {
|
|
|
86
86
|
required: ["goal_id", "task_id"],
|
|
87
87
|
},
|
|
88
88
|
};
|
|
89
|
+
export const computePauseTool = {
|
|
90
|
+
name: "oneshot_compute_pause",
|
|
91
|
+
description: "Pause a recurring compute goal. Its plan and progress are kept — the goal stops taking scheduled runs until resumed. Only recurring (scheduled) goals can be paused. Free.",
|
|
92
|
+
inputSchema: {
|
|
93
|
+
type: "object",
|
|
94
|
+
properties: {
|
|
95
|
+
goal_id: { type: "string", description: "Compute goal id" },
|
|
96
|
+
reason: { type: "string", description: "Optional pause reason" },
|
|
97
|
+
},
|
|
98
|
+
required: ["goal_id"],
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
export const computeResumeTool = {
|
|
102
|
+
name: "oneshot_compute_resume",
|
|
103
|
+
description: "Resume a paused recurring compute goal. Picks up on the existing plan at the next scheduled run — nothing is lost. Free.",
|
|
104
|
+
inputSchema: {
|
|
105
|
+
type: "object",
|
|
106
|
+
properties: {
|
|
107
|
+
goal_id: { type: "string", description: "Compute goal id" },
|
|
108
|
+
},
|
|
109
|
+
required: ["goal_id"],
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
export const computeFundTool = {
|
|
113
|
+
name: "oneshot_compute_fund",
|
|
114
|
+
description: "Top up the USDC budget of a recurring compute goal that is running low or has hit its cap. Quote-to-pay: moves USDC into the goal. Paid tool.",
|
|
115
|
+
inputSchema: {
|
|
116
|
+
type: "object",
|
|
117
|
+
properties: {
|
|
118
|
+
goal_id: { type: "string", description: "Compute goal id" },
|
|
119
|
+
amount: { type: "number", description: "Amount of USDC to add to the goal's budget" },
|
|
120
|
+
},
|
|
121
|
+
required: ["goal_id", "amount"],
|
|
122
|
+
},
|
|
123
|
+
};
|
|
89
124
|
export async function handleCompute(agent, args) {
|
|
90
125
|
return agent.compute({
|
|
91
126
|
objective: args.objective,
|
|
@@ -113,3 +148,12 @@ export async function handleComputeRespond(agent, args) {
|
|
|
113
148
|
approved: args.approved,
|
|
114
149
|
});
|
|
115
150
|
}
|
|
151
|
+
export async function handleComputePause(agent, args) {
|
|
152
|
+
return agent.pauseComputeGoal(args.goal_id, args.reason);
|
|
153
|
+
}
|
|
154
|
+
export async function handleComputeResume(agent, args) {
|
|
155
|
+
return agent.resumeComputeGoal(args.goal_id);
|
|
156
|
+
}
|
|
157
|
+
export async function handleComputeFund(agent, args) {
|
|
158
|
+
return agent.fundComputeGoal(args.goal_id, args.amount);
|
|
159
|
+
}
|
package/dist/tools/domains.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const listDomainsTool: Tool;
|
|
4
4
|
export declare const pauseDomainTool: Tool;
|
|
5
5
|
export declare const resumeDomainTool: Tool;
|
package/dist/tools/email.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const emailTool: Tool;
|
|
4
4
|
export declare function handleEmail(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").EmailResult>;
|
package/dist/tools/email.js
CHANGED
|
@@ -22,11 +22,11 @@ export const emailTool = {
|
|
|
22
22
|
},
|
|
23
23
|
from_domain: {
|
|
24
24
|
type: "string",
|
|
25
|
-
description: "
|
|
25
|
+
description: "Domain to send from (must be one you own). Omit both from_domain and from_mailbox to rotate across your warmed domains — the chosen address comes back on the quote.",
|
|
26
26
|
},
|
|
27
27
|
from_mailbox: {
|
|
28
28
|
type: "string",
|
|
29
|
-
description: "Sender mailbox / local-part (optional, defaults to 'agent', i.e. agent@from_domain). You can use any local-part — a new address is auto-provisioned on first use (starts unwarmed, warms over time). The FIRST send from any address — including the default 'agent@' — adds a one-time mailbox_provisioning_fee to the quote; it's free only once that address is already provisioned (active). See the domains list for each domain's default_from and existing addresses.",
|
|
29
|
+
description: "Sender mailbox / local-part (optional, defaults to 'agent', i.e. agent@from_domain). Requires from_domain to be set — pinning from_mailbox alone is rejected, since there is no domain to attach it to. You can use any local-part — a new address is auto-provisioned on first use (starts unwarmed, warms over time). The FIRST send from any address — including the default 'agent@' — adds a one-time mailbox_provisioning_fee to the quote; it's free only once that address is already provisioned (active). See the domains list for each domain's default_from and existing addresses.",
|
|
30
30
|
},
|
|
31
31
|
from_name: {
|
|
32
32
|
type: "string",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const enrichProfileTool: Tool;
|
|
4
4
|
export declare const findEmailTool: Tool;
|
|
5
5
|
export declare const verifyEmailTool: Tool;
|
package/dist/tools/gov.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const govSolicitationsTool: Tool;
|
|
4
4
|
export declare function handleGovSolicitations(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").GovSolicitationsResult>;
|
package/dist/tools/inbox.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const inboxListTool: Tool;
|
|
4
4
|
export declare const inboxGetTool: Tool;
|
|
5
5
|
export declare function handleInboxList(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").InboxListResult>;
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const tools: Tool[];
|
|
4
4
|
export declare function handleToolCall(agent: OneShot, toolName: string, args: Record<string, unknown>): Promise<{
|
|
5
5
|
content: {
|
|
@@ -14,3 +14,10 @@ export declare function handleToolCall(agent: OneShot, toolName: string, args: R
|
|
|
14
14
|
}[];
|
|
15
15
|
isError?: undefined;
|
|
16
16
|
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Typed SDK errors become a JSON body the model can act on instead of a
|
|
19
|
+
* prose string. Matched on `name`, never `instanceof`: the hosted server runs
|
|
20
|
+
* the workspace SDK while this registry's types come from the published one,
|
|
21
|
+
* so the classes are different objects at runtime.
|
|
22
|
+
*/
|
|
23
|
+
export declare function structuredToolError(error: unknown): Record<string, unknown> | undefined;
|
package/dist/tools/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { deepResearchPersonTool, socialProfilesTool, articleSearchTool, personNe
|
|
|
17
17
|
import { companySearchTool, enrichCompanyTool, handleCompanySearch, handleEnrichCompany } from "./company.js";
|
|
18
18
|
import { localSearchTool, localResolveTool, handleLocalSearch, handleLocalResolve } from "./local.js";
|
|
19
19
|
import { govSolicitationsTool, handleGovSolicitations } from "./gov.js";
|
|
20
|
-
import { computeTool, computeStatusTool, computeTasksTool, computeCancelTool, computeRespondTool, handleCompute, handleComputeStatus, handleComputeTasks, handleComputeCancel, handleComputeRespond } from "./compute.js";
|
|
20
|
+
import { computeTool, computeStatusTool, computeTasksTool, computeCancelTool, computeRespondTool, computePauseTool, computeResumeTool, computeFundTool, handleCompute, handleComputeStatus, handleComputeTasks, handleComputeCancel, handleComputeRespond, handleComputePause, handleComputeResume, handleComputeFund } from "./compute.js";
|
|
21
21
|
import { listDomainsTool, pauseDomainTool, resumeDomainTool, handleListDomains, handlePauseDomain, handleResumeDomain } from "./domains.js";
|
|
22
22
|
import { spendBreakdownTool, rocsTool, rocsByGoalTool, receiptsListTool, tagReceiptValueTool, handleSpendBreakdown, handleRocs, handleRocsByGoal, handleReceiptsList, handleTagReceiptValue } from "./analytics.js";
|
|
23
23
|
// All available tools
|
|
@@ -58,6 +58,9 @@ export const tools = [
|
|
|
58
58
|
computeTasksTool,
|
|
59
59
|
computeCancelTool,
|
|
60
60
|
computeRespondTool,
|
|
61
|
+
computePauseTool,
|
|
62
|
+
computeResumeTool,
|
|
63
|
+
computeFundTool,
|
|
61
64
|
// Build
|
|
62
65
|
buildTool,
|
|
63
66
|
updateBuildTool,
|
|
@@ -122,6 +125,9 @@ const handlers = {
|
|
|
122
125
|
"oneshot_compute_tasks": handleComputeTasks,
|
|
123
126
|
"oneshot_compute_cancel": handleComputeCancel,
|
|
124
127
|
"oneshot_compute_respond": handleComputeRespond,
|
|
128
|
+
"oneshot_compute_pause": handleComputePause,
|
|
129
|
+
"oneshot_compute_resume": handleComputeResume,
|
|
130
|
+
"oneshot_compute_fund": handleComputeFund,
|
|
125
131
|
// Build
|
|
126
132
|
"oneshot_build": handleBuild,
|
|
127
133
|
"oneshot_update_build": handleUpdateBuild,
|
|
@@ -164,9 +170,45 @@ export async function handleToolCall(agent, toolName, args) {
|
|
|
164
170
|
}
|
|
165
171
|
catch (error) {
|
|
166
172
|
const message = error instanceof Error ? error.message : String(error);
|
|
173
|
+
const structured = structuredToolError(error);
|
|
167
174
|
return {
|
|
168
|
-
content: [{ type: "text", text: `Error: ${message}` }],
|
|
175
|
+
content: [{ type: "text", text: structured ? JSON.stringify(structured, null, 2) : `Error: ${message}` }],
|
|
169
176
|
isError: true,
|
|
170
177
|
};
|
|
171
178
|
}
|
|
172
179
|
}
|
|
180
|
+
/**
|
|
181
|
+
* Typed SDK errors become a JSON body the model can act on instead of a
|
|
182
|
+
* prose string. Matched on `name`, never `instanceof`: the hosted server runs
|
|
183
|
+
* the workspace SDK while this registry's types come from the published one,
|
|
184
|
+
* so the classes are different objects at runtime.
|
|
185
|
+
*/
|
|
186
|
+
export function structuredToolError(error) {
|
|
187
|
+
const e = error;
|
|
188
|
+
if (!e || typeof e !== "object")
|
|
189
|
+
return undefined;
|
|
190
|
+
switch (e.name) {
|
|
191
|
+
case "BudgetExceededError":
|
|
192
|
+
return {
|
|
193
|
+
error: "budget_exceeded",
|
|
194
|
+
message: e.message,
|
|
195
|
+
reason: e.reason,
|
|
196
|
+
cap: e.cap,
|
|
197
|
+
spent: e.spent,
|
|
198
|
+
charge: e.charge,
|
|
199
|
+
resets_at: e.resetsAt,
|
|
200
|
+
};
|
|
201
|
+
case "InsufficientCreditsError":
|
|
202
|
+
return {
|
|
203
|
+
error: "insufficient_credits",
|
|
204
|
+
message: e.message,
|
|
205
|
+
required_usdc: e.required,
|
|
206
|
+
credits_balance: e.balance,
|
|
207
|
+
shortfall_usdc: e.shortfall,
|
|
208
|
+
};
|
|
209
|
+
case "PaymentError":
|
|
210
|
+
return { error: "payment_failed", message: e.message, reason: e.reason };
|
|
211
|
+
default:
|
|
212
|
+
return undefined;
|
|
213
|
+
}
|
|
214
|
+
}
|
package/dist/tools/local.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const localSearchTool: Tool;
|
|
4
4
|
export declare const localResolveTool: Tool;
|
|
5
5
|
export declare function handleLocalSearch(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").LocalSearchResult>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const notificationsTool: Tool;
|
|
4
4
|
export declare const markReadTool: Tool;
|
|
5
5
|
export declare function handleNotifications(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").NotificationsResult>;
|
package/dist/tools/nyne.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const deepResearchPersonTool: Tool;
|
|
4
4
|
export declare const socialProfilesTool: Tool;
|
|
5
5
|
export declare const articleSearchTool: Tool;
|
package/dist/tools/people.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const peopleSearchTool: Tool;
|
|
4
4
|
export declare function handlePeopleSearch(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").PeopleSearchResult>;
|
package/dist/tools/research.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const researchTool: Tool;
|
|
4
4
|
/**
|
|
5
5
|
* Wait budget per depth. The SDK's default is 120s, but deep research runs
|
package/dist/tools/search.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const webSearchTool: Tool;
|
|
4
4
|
export declare function handleWebSearch(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").WebSearchResult>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const smsInboxListTool: Tool;
|
|
4
4
|
export declare const smsInboxGetTool: Tool;
|
|
5
5
|
export declare function handleSmsInboxList(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").SmsInboxResult>;
|
package/dist/tools/sms.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const smsTool: Tool;
|
|
4
4
|
export declare function handleSms(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").SmsSendResult>;
|
package/dist/tools/voice.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const voiceTool: Tool;
|
|
4
4
|
export declare function handleVoice(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").VoiceCallResult>;
|
package/dist/tools/wallet.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const getBalanceTool: Tool;
|
|
4
4
|
export declare function handleGetBalance(agent: OneShot, _args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").UnifiedBalance>;
|
|
5
5
|
export declare const budgetStatusTool: Tool;
|
package/dist/tools/wallet.js
CHANGED
|
@@ -15,7 +15,8 @@ export const budgetStatusTool = {
|
|
|
15
15
|
description: "Read-only: today's spend versus the agent's configured spend budget — daily cap, per-call cap, " +
|
|
16
16
|
"spent_today_usdc, remaining_usdc, pct_used and resets_at (next UTC midnight). Use it to plan " +
|
|
17
17
|
"remaining work; paid calls are rejected with budget_exceeded once the cap is reached. The budget " +
|
|
18
|
-
"itself is set by the operator
|
|
18
|
+
"itself is set by the operator (ONESHOT_BUDGET_* env vars on a local server, the SDK or API for the " +
|
|
19
|
+
"hosted endpoint) and cannot be changed from here. Free.",
|
|
19
20
|
inputSchema: {
|
|
20
21
|
type: "object",
|
|
21
22
|
properties: {},
|
package/dist/tools/web-read.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import { OneShot } from "@oneshot-agent/sdk";
|
|
1
|
+
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
+
import type { OneShot } from "@oneshot-agent/sdk";
|
|
3
3
|
export declare const webReadTool: Tool;
|
|
4
4
|
export declare function handleWebRead(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").WebReadResult>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneshot-agent/mcp-server",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MCP server for OneShot -
|
|
3
|
+
"version": "0.21.0",
|
|
4
|
+
"description": "MCP server for OneShot - 53 tools for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@coinbase/cdp-sdk": "1.45.0",
|
|
27
27
|
"@modelcontextprotocol/sdk": "1.27.1",
|
|
28
|
-
"@oneshot-agent/sdk": "^0.
|
|
28
|
+
"@oneshot-agent/sdk": "^0.33.0",
|
|
29
29
|
"zod": "3.25.76"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|