@webhooks-cc/mcp 1.14.0 → 1.15.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 +42 -22
- package/dist/bin/mcp.js +255 -161
- package/dist/chunk-RHQD2GRD.mjs +1819 -0
- package/dist/index.d.mts +21 -9
- package/dist/index.d.ts +21 -9
- package/dist/index.js +219 -135
- package/dist/index.mjs +161 -1861
- package/dist/tools.d.mts +171 -0
- package/dist/tools.d.ts +171 -0
- package/dist/tools.js +1827 -0
- package/dist/tools.mjs +34 -0
- package/package.json +7 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
export { REMOTE_MAX_WAIT_MS, RegisterToolsOptions, RegisteredToolHandle, ToolServer, registerTools } from './tools.mjs';
|
|
2
3
|
import { WebhooksCC } from '@webhooks-cc/sdk';
|
|
3
|
-
|
|
4
|
-
/** Register all webhook tools on an MCP server instance. */
|
|
5
|
-
declare function registerTools(server: McpServer, client: WebhooksCC): void;
|
|
4
|
+
import 'zod';
|
|
6
5
|
|
|
7
6
|
interface SandboxToolOptions {
|
|
8
7
|
/** API base URL (default: WHK_BASE_URL or https://webhooks.cc). */
|
|
@@ -11,14 +10,21 @@ interface SandboxToolOptions {
|
|
|
11
10
|
webhookUrl?: string;
|
|
12
11
|
/** The agent's name, shown to the human as self-reported. */
|
|
13
12
|
clientName?: string;
|
|
14
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* The agent credential file (default: WHK_AGENT_FILE, else
|
|
15
|
+
* ~/.config/whk/agent.json or the platform's equivalent); false keeps the
|
|
16
|
+
* sandbox and the connection in memory, for this process only.
|
|
17
|
+
*/
|
|
18
|
+
credentialsFile?: string | false;
|
|
19
|
+
/** Called whenever the tools switch to a human's account, with a client for it. */
|
|
15
20
|
onConnected?: (client: WebhooksCC) => void;
|
|
16
21
|
}
|
|
17
22
|
/**
|
|
18
|
-
* Registers the
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
23
|
+
* Registers the agent tools: the full tools when the credential file holds a
|
|
24
|
+
* live connection to a human's account, else the sandbox tools
|
|
25
|
+
* (create_endpoint, list_endpoints, get_endpoint, delete_endpoint,
|
|
26
|
+
* list_requests, get_request, wait_for_request, generate_payload_schema) with
|
|
27
|
+
* connect_account, wait_for_connection and about_sandbox.
|
|
22
28
|
*/
|
|
23
29
|
declare function registerSandboxTools(server: McpServer, options?: SandboxToolOptions): void;
|
|
24
30
|
/**
|
|
@@ -38,6 +44,12 @@ interface CreateServerOptions {
|
|
|
38
44
|
webhookUrl?: string;
|
|
39
45
|
/** Custom API base URL (default: https://webhooks.cc) */
|
|
40
46
|
baseUrl?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Without an API key: the agent credential file that keeps the sandbox and
|
|
49
|
+
* a human's connection across restarts (default: WHK_AGENT_FILE, else
|
|
50
|
+
* ~/.config/whk/agent.json or the platform's equivalent); false for none.
|
|
51
|
+
*/
|
|
52
|
+
credentialsFile?: string | false;
|
|
41
53
|
}
|
|
42
54
|
/**
|
|
43
55
|
* Create an MCP server with all webhooks.cc tools, prompts, and resources registered.
|
|
@@ -53,5 +65,5 @@ interface CreateServerOptions {
|
|
|
53
65
|
*/
|
|
54
66
|
declare function createServer(options?: CreateServerOptions): McpServer;
|
|
55
67
|
|
|
56
|
-
export { createServer, registerAgentRegistrationTools, registerPrompts, registerResources, registerSandboxTools
|
|
68
|
+
export { createServer, registerAgentRegistrationTools, registerPrompts, registerResources, registerSandboxTools };
|
|
57
69
|
export type { CreateServerOptions, SandboxToolOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
export { REMOTE_MAX_WAIT_MS, RegisterToolsOptions, RegisteredToolHandle, ToolServer, registerTools } from './tools.js';
|
|
2
3
|
import { WebhooksCC } from '@webhooks-cc/sdk';
|
|
3
|
-
|
|
4
|
-
/** Register all webhook tools on an MCP server instance. */
|
|
5
|
-
declare function registerTools(server: McpServer, client: WebhooksCC): void;
|
|
4
|
+
import 'zod';
|
|
6
5
|
|
|
7
6
|
interface SandboxToolOptions {
|
|
8
7
|
/** API base URL (default: WHK_BASE_URL or https://webhooks.cc). */
|
|
@@ -11,14 +10,21 @@ interface SandboxToolOptions {
|
|
|
11
10
|
webhookUrl?: string;
|
|
12
11
|
/** The agent's name, shown to the human as self-reported. */
|
|
13
12
|
clientName?: string;
|
|
14
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* The agent credential file (default: WHK_AGENT_FILE, else
|
|
15
|
+
* ~/.config/whk/agent.json or the platform's equivalent); false keeps the
|
|
16
|
+
* sandbox and the connection in memory, for this process only.
|
|
17
|
+
*/
|
|
18
|
+
credentialsFile?: string | false;
|
|
19
|
+
/** Called whenever the tools switch to a human's account, with a client for it. */
|
|
15
20
|
onConnected?: (client: WebhooksCC) => void;
|
|
16
21
|
}
|
|
17
22
|
/**
|
|
18
|
-
* Registers the
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
23
|
+
* Registers the agent tools: the full tools when the credential file holds a
|
|
24
|
+
* live connection to a human's account, else the sandbox tools
|
|
25
|
+
* (create_endpoint, list_endpoints, get_endpoint, delete_endpoint,
|
|
26
|
+
* list_requests, get_request, wait_for_request, generate_payload_schema) with
|
|
27
|
+
* connect_account, wait_for_connection and about_sandbox.
|
|
22
28
|
*/
|
|
23
29
|
declare function registerSandboxTools(server: McpServer, options?: SandboxToolOptions): void;
|
|
24
30
|
/**
|
|
@@ -38,6 +44,12 @@ interface CreateServerOptions {
|
|
|
38
44
|
webhookUrl?: string;
|
|
39
45
|
/** Custom API base URL (default: https://webhooks.cc) */
|
|
40
46
|
baseUrl?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Without an API key: the agent credential file that keeps the sandbox and
|
|
49
|
+
* a human's connection across restarts (default: WHK_AGENT_FILE, else
|
|
50
|
+
* ~/.config/whk/agent.json or the platform's equivalent); false for none.
|
|
51
|
+
*/
|
|
52
|
+
credentialsFile?: string | false;
|
|
41
53
|
}
|
|
42
54
|
/**
|
|
43
55
|
* Create an MCP server with all webhooks.cc tools, prompts, and resources registered.
|
|
@@ -53,5 +65,5 @@ interface CreateServerOptions {
|
|
|
53
65
|
*/
|
|
54
66
|
declare function createServer(options?: CreateServerOptions): McpServer;
|
|
55
67
|
|
|
56
|
-
export { createServer, registerAgentRegistrationTools, registerPrompts, registerResources, registerSandboxTools
|
|
68
|
+
export { createServer, registerAgentRegistrationTools, registerPrompts, registerResources, registerSandboxTools };
|
|
57
69
|
export type { CreateServerOptions, SandboxToolOptions };
|