@oneshot-agent/mcp-server 0.51.0 → 0.52.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 +3 -3
- package/dist/index.js +1 -1
- package/dist/tools/annotations.js +1 -1
- package/dist/tools/compute.d.ts +24 -2
- package/dist/tools/compute.js +18 -1
- package/dist/tools/connections.d.ts +1 -1
- package/dist/tools/connections.js +2 -2
- package/dist/tools/lookup-manifest.generated.js +1103 -26
- package/dist/tools/untrusted-tools.generated.js +45 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -84,10 +84,10 @@ Every tool is named `oneshot_<name>`. Below are the names.
|
|
|
84
84
|
| [Think](https://docs.oneshotagent.com/api-reference/research) | `research` `predict` `solve` |
|
|
85
85
|
| [Web and buying](https://docs.oneshotagent.com/api-reference/web-search) | `web_search` `web_read` `browser` `product_find` `commerce_buy` |
|
|
86
86
|
| [Physical mail](https://docs.oneshotagent.com/api-reference/physical-mail/overview) | `physical_mail_upload` `physical_mail_validate_address` `physical_mail_preview` `physical_mail_quote` `physical_mail_approve` `physical_mail_send` `physical_mail_recover` `physical_mail_order` `physical_mail_cancel` |
|
|
87
|
-
| [Connected systems](https://docs.oneshotagent.com/api-reference/connections/overview) | `connections_list` `ledger_invoices` `ledger_invoice_lines` `ledger_bills` `ledger_reports` `ledger_bank_transactions` `crm_accounts` `crm_contacts` `crm_opportunities` `crm_tickets` `crm_activity` `tax_rates` `tax_calculate` `shipping_shipments` `shipping_tracking` `shipping_rates` `procurement_transactions` `procurement_bills` `procurement_suppliers` `meetings_list` `meetings_get` `field_service_clients` `field_service_jobs` `field_service_quotes` `field_service_invoices` |
|
|
87
|
+
| [Connected systems](https://docs.oneshotagent.com/api-reference/connections/overview) | `connections_list` `ledger_invoices` `ledger_invoice_lines` `ledger_bills` `ledger_reports` `ledger_bank_transactions` `crm_accounts` `crm_contacts` `crm_opportunities` `crm_tickets` `crm_activity` `tax_rates` `tax_calculate` `shipping_shipments` `shipping_tracking` `shipping_rates` `procurement_transactions` `procurement_bills` `procurement_suppliers` `meetings_list` `meetings_get` `field_service_clients` `field_service_jobs` `field_service_quotes` `field_service_invoices` `client_work_clients` `client_work_items` `client_work_timesheets` |
|
|
88
88
|
| [LinkedIn](https://docs.oneshotagent.com/api-reference/linkedin/overview) | `linkedin_connect` `linkedin_accounts` `linkedin_invite` `linkedin_message` `linkedin_reply` and more |
|
|
89
89
|
| [Build](https://docs.oneshotagent.com/api-reference/build/create) | `build` `update_build` |
|
|
90
|
-
| [Goals](https://docs.oneshotagent.com/api-reference/compute/create) | `compute` `compute_status` `compute_tasks` `compute_respond` `compute_pause` `compute_resume` `compute_fund` `compute_cancel` |
|
|
90
|
+
| [Goals](https://docs.oneshotagent.com/api-reference/compute/create) | `compute` `compute_status` `compute_tasks` `compute_respond` `compute_pause` `compute_resume` `compute_fund` `compute_cancel`. `compute` adds `quote_text` for bound hires (public soul identity and service) and unmatched specialist questions, without prices. Starting proceeds without unmatched specialists. Otherwise, the usual goal result is returned. |
|
|
91
91
|
| [Money and receipts](https://docs.oneshotagent.com/api-reference/analytics/overview) | `get_balance` `budget_status` `spend_breakdown` `return_on_spend` `receipts_list` `tag_receipt_value` |
|
|
92
92
|
| Soul Hunt | `hunt_list` `hunt_status` `hunt_predict` `hunt_collection` `hunt_leaderboard` |
|
|
93
93
|
|
|
@@ -150,7 +150,7 @@ wallet. The server signs it for you. A read with no proof and no valid token is
|
|
|
150
150
|
|
|
151
151
|
## Tool discovery
|
|
152
152
|
|
|
153
|
-
The MCP catalog contains
|
|
153
|
+
The MCP catalog contains 263 tools. `oneshot_discover_tools` is a free, read-only
|
|
154
154
|
search over the tools your token can call. Call it with no arguments for category
|
|
155
155
|
counts, `{ "query": "send a printed letter" }` to search, or `{ "category": "email" }`
|
|
156
156
|
to browse. Results contain public tool names, purposes and required inputs.
|
package/dist/index.js
CHANGED
|
@@ -50,7 +50,7 @@ async function main() {
|
|
|
50
50
|
const agent = await initAgent();
|
|
51
51
|
const server = new Server({
|
|
52
52
|
name: "oneshot-mcp",
|
|
53
|
-
version: "0.
|
|
53
|
+
version: "0.52.0", // keep in sync with package.json; guarded by version.test.ts
|
|
54
54
|
}, {
|
|
55
55
|
capabilities: {
|
|
56
56
|
tools: {},
|
|
@@ -12,7 +12,7 @@ const IRREVERSIBLE_ROUTES = new Set(["physical_mail_approve", "physical_mail_can
|
|
|
12
12
|
*/
|
|
13
13
|
const OUTBOUND_ROUTES = new Set(["physical_mail_approve", "identity_start", "watch", "watch_update", "browser_connect_account"]);
|
|
14
14
|
/** The connected-system reads (#2403): paid, but each reads the caller's own connected business system, so closed-world. */
|
|
15
|
-
const CONNECTED_SYSTEM_READ = /^\/v1\/tools\/(ledger|crm|shipping|tax|procurement|meetings|mailbox|files|field_service)\//;
|
|
15
|
+
const CONNECTED_SYSTEM_READ = /^\/v1\/tools\/(ledger|crm|shipping|tax|procurement|matters|meetings|mailbox|files|field_service|client_work|portfolio|practice)\//;
|
|
16
16
|
const OPEN = true;
|
|
17
17
|
const OWN = false;
|
|
18
18
|
const DESTRUCTIVE = true;
|
package/dist/tools/compute.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
|
-
import type { OneShot } from "@oneshot-agent/sdk";
|
|
2
|
+
import type { OneShot, ComputeQuote } from "@oneshot-agent/sdk";
|
|
3
|
+
export type { ComputeQuote } from "@oneshot-agent/sdk";
|
|
4
|
+
/** Select public quote details explicitly so prices and private identity never enter tool text. */
|
|
5
|
+
export declare function formatComputeQuote(quote: ComputeQuote): string;
|
|
3
6
|
export declare const computeTool: Tool;
|
|
4
7
|
export declare const computeStatusTool: Tool;
|
|
5
8
|
export declare const computeTasksTool: Tool;
|
|
@@ -8,7 +11,26 @@ export declare const computeRespondTool: Tool;
|
|
|
8
11
|
export declare const computePauseTool: Tool;
|
|
9
12
|
export declare const computeResumeTool: Tool;
|
|
10
13
|
export declare const computeFundTool: Tool;
|
|
11
|
-
export declare function handleCompute(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").ComputeGoalResult
|
|
14
|
+
export declare function handleCompute(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").ComputeGoalResult | {
|
|
15
|
+
quote_text: string;
|
|
16
|
+
requires?: Array<import("@oneshot-agent/sdk").ComputeRequirement | import("@oneshot-agent/sdk").ComputeToolRequirement>;
|
|
17
|
+
goal_id: string;
|
|
18
|
+
request_id: string;
|
|
19
|
+
receipt_id?: string;
|
|
20
|
+
status: string;
|
|
21
|
+
message: string;
|
|
22
|
+
memo?: string;
|
|
23
|
+
cost?: number;
|
|
24
|
+
goal: {
|
|
25
|
+
objective: string;
|
|
26
|
+
budget_usdc: string;
|
|
27
|
+
deadline?: string;
|
|
28
|
+
schedule_cron?: string;
|
|
29
|
+
budget_per_run?: number;
|
|
30
|
+
max_runs?: number;
|
|
31
|
+
next_run_at?: string;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
12
34
|
export declare function handleComputeStatus(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").ComputeGoalStatus>;
|
|
13
35
|
export declare function handleComputeTasks(agent: OneShot, args: Record<string, unknown>): Promise<import("@oneshot-agent/sdk").ComputeOutputContent | import("@oneshot-agent/sdk").ComputeTask[]>;
|
|
14
36
|
export declare function handleComputeCancel(agent: OneShot, args: Record<string, unknown>): Promise<{
|
package/dist/tools/compute.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/** Select public quote details explicitly so prices and private identity never enter tool text. */
|
|
2
|
+
export function formatComputeQuote(quote) {
|
|
3
|
+
const hires = (quote.price?.hires ?? []).map(hire => `Hires ${hire.display_name} (${hire.soul_slug}) for ${hire.service_name} (${hire.service_slug})${hire.need ? `: ${hire.need}` : ''}.`);
|
|
4
|
+
const specialists = (quote.requirements ?? []).filter(req => req.kind === 'specialist').map(req => req.question?.trim() ? req.question : `No specialist matched${req.need ? ` for ${req.need}` : ''}. Start the goal to go ahead without one, using the platform's tools.`);
|
|
5
|
+
return [...hires, ...specialists].join('\n');
|
|
6
|
+
}
|
|
1
7
|
const KNOWN_GOAL_TOOL = { type: "string", description: 'A OneShot tool name, e.g. "email", "voice", "commerce_buy"' };
|
|
2
8
|
const SCOPE_DRIVERS = { type: "object", additionalProperties: { anyOf: [{ type: "number" }, { type: "boolean" }, { type: "string" }] }, description: 'Request sizes, never prices: recipients, segments, max_duration_minutes, max_steps (e.g. {"max_steps":25}), include_phone and limit, or letter kind/pages/color/double_sided; Predict/Solve size and time_limit_s. Omitted fields use tool defaults.' };
|
|
3
9
|
const SCOPE_USE = {
|
|
@@ -36,6 +42,11 @@ export const computeTool = {
|
|
|
36
42
|
type: "number",
|
|
37
43
|
description: "Spend ceiling in USDC. Server estimates if omitted.",
|
|
38
44
|
},
|
|
45
|
+
purchase_limit_usdc: {
|
|
46
|
+
type: "number",
|
|
47
|
+
exclusiveMinimum: 0,
|
|
48
|
+
description: "The most the owner would pay for one purchase, all in. Only set a figure the owner gave you, never your own. It is added to the total and unused money comes back as credit; a live total above it waits for the owner's approval. Without it, the goal pauses at a purchase it can't afford.",
|
|
49
|
+
},
|
|
39
50
|
params: {
|
|
40
51
|
type: "object",
|
|
41
52
|
description: "Additional parameters / constraints for the objective",
|
|
@@ -217,6 +228,7 @@ export const computeTool = {
|
|
|
217
228
|
required: ["name", "reason"],
|
|
218
229
|
},
|
|
219
230
|
},
|
|
231
|
+
purchase_limit_usdc: { type: "number", exclusiveMinimum: 0, description: "The most per purchase, all in, as the owner gave it. The top-level field wins over this." },
|
|
220
232
|
},
|
|
221
233
|
required: ["unit", "per_unit", "overhead", "volume", "unpriced"],
|
|
222
234
|
},
|
|
@@ -311,6 +323,7 @@ export const computeFundTool = {
|
|
|
311
323
|
},
|
|
312
324
|
};
|
|
313
325
|
export async function handleCompute(agent, args) {
|
|
326
|
+
let quoteText = '';
|
|
314
327
|
const options = {
|
|
315
328
|
objective: args.objective,
|
|
316
329
|
budget_usdc: args.budget_usdc,
|
|
@@ -322,10 +335,14 @@ export async function handleCompute(agent, args) {
|
|
|
322
335
|
approvals: args.approvals,
|
|
323
336
|
done_check: args.done_check,
|
|
324
337
|
egress_allowlist: args.egress_allowlist,
|
|
338
|
+
onQuote: quote => { quoteText = formatComputeQuote(quote); },
|
|
325
339
|
};
|
|
326
340
|
if (args.scope !== undefined)
|
|
327
341
|
options.scope = args.scope;
|
|
328
|
-
|
|
342
|
+
if (args.purchase_limit_usdc !== undefined)
|
|
343
|
+
options.purchase_limit_usdc = args.purchase_limit_usdc;
|
|
344
|
+
const result = await agent.compute(options);
|
|
345
|
+
return quoteText ? { ...result, quote_text: quoteText } : result;
|
|
329
346
|
}
|
|
330
347
|
export async function handleComputeStatus(agent, args) {
|
|
331
348
|
return agent.getComputeGoal(args.goal_id);
|
|
@@ -3,7 +3,7 @@ import type { OneShot } from "@oneshot-agent/sdk";
|
|
|
3
3
|
/**
|
|
4
4
|
* The agent's connections (#2403). Hand-written because `GET /v1/connections` is not a declared route: the
|
|
5
5
|
* connected-system read tools (`oneshot_ledger_*`, `oneshot_crm_*`, `oneshot_shipping_*`, `oneshot_tax_*`,
|
|
6
|
-
* `oneshot_procurement_*`, `oneshot_meetings_*`, `oneshot_field_service_*`) are generated from their routes and each tells the model to call this one first.
|
|
6
|
+
* `oneshot_procurement_*`, `oneshot_meetings_*`, `oneshot_matters_*`, `oneshot_field_service_*`, `oneshot_client_work_*`, `oneshot_portfolio_*`, `oneshot_practice_*`) are generated from their routes and each tells the model to call this one first.
|
|
7
7
|
* Connecting and revoking stay in the console.
|
|
8
8
|
*/
|
|
9
9
|
export declare const connectionsListTool: Tool;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The agent's connections (#2403). Hand-written because `GET /v1/connections` is not a declared route: the
|
|
3
3
|
* connected-system read tools (`oneshot_ledger_*`, `oneshot_crm_*`, `oneshot_shipping_*`, `oneshot_tax_*`,
|
|
4
|
-
* `oneshot_procurement_*`, `oneshot_meetings_*`, `oneshot_field_service_*`) are generated from their routes and each tells the model to call this one first.
|
|
4
|
+
* `oneshot_procurement_*`, `oneshot_meetings_*`, `oneshot_matters_*`, `oneshot_field_service_*`, `oneshot_client_work_*`, `oneshot_portfolio_*`, `oneshot_practice_*`) are generated from their routes and each tells the model to call this one first.
|
|
5
5
|
* Connecting and revoking stay in the console.
|
|
6
6
|
*/
|
|
7
7
|
export const connectionsListTool = {
|
|
8
8
|
name: "oneshot_connections_list",
|
|
9
|
-
description: "List the agent's connections to business systems (accounting, CRM, shipping, tax, spend) and GitHub. " +
|
|
9
|
+
description: "List the agent's connections to business systems (accounting, CRM, shipping, tax, spend, practice management, wealth) and GitHub. " +
|
|
10
10
|
"Returns each connection's id, name, kind, system, account_label and status (only an active one can be read). " +
|
|
11
11
|
"Call it before any connected-system read: pick the connection by system and account_label and pass its id as connection_id. " +
|
|
12
12
|
"Connections are added and revoked in the console. Free.",
|