@band-ai/sdk 0.1.2 → 0.1.4
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/dist/{CodexAdapter-A1k_LMdZ.d.ts → ClaudeSDKAdapter-BHOkjN3X.d.ts} +222 -222
- package/dist/{CodexAdapter-BbZD-nBd.d.cts → ClaudeSDKAdapter-CRq4R-WB.d.cts} +222 -222
- package/dist/adapters.cjs +375 -275
- package/dist/adapters.d.cts +21 -21
- package/dist/adapters.d.ts +21 -21
- package/dist/adapters.js +1512 -13
- package/dist/{backends-C4n6cKOf.d.ts → backends-CzDbiQar.d.ts} +1 -1
- package/dist/{backends-BnOLsG7w.d.cts → backends-SVMT-7l4.d.cts} +1 -1
- package/dist/chunk-FYVLUGW7.js +59 -0
- package/dist/{chunk-6AJA2OPC.js → chunk-I5EZG52P.js} +11 -4
- package/dist/{chunk-NIAQBANR.js → chunk-MSL6CWHY.js} +1 -1
- package/dist/{chunk-A3TDK6GP.js → chunk-RHVH2GZR.js} +4589 -5993
- package/dist/{chunk-FUODYQRE.js → chunk-W5NDZSYE.js} +2 -59
- package/dist/converters.d.cts +1 -1
- package/dist/converters.d.ts +1 -1
- package/dist/converters.js +5 -3
- package/dist/index.cjs +7161 -7116
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -6
- package/dist/mcp-claude.cjs +4 -6
- package/dist/mcp-claude.d.cts +1 -1
- package/dist/mcp-claude.d.ts +1 -1
- package/dist/mcp-claude.js +47 -5
- package/dist/mcp.d.cts +3 -3
- package/dist/mcp.d.ts +3 -3
- package/dist/mcp.js +1 -1
- package/dist/runtime.cjs +11 -4
- package/dist/runtime.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-5CXIMAH2.js +0 -52
- package/dist/chunk-LY55KYVI.js +0 -0
- package/dist/sdk-HJUVSSWA.js +0 -10
- package/dist/{history-ByessXNq.d.ts → acp-server-B1Da7L6u.d.ts} +4 -4
- package/dist/{history-i6yN7neC.d.cts → acp-server-BdRz9_UN.d.cts} +4 -4
- /package/dist/{claude-CcnQ5OUC.d.ts → sdk-CcnQ5OUC.d.ts} +0 -0
- /package/dist/{claude-CwTAxhwI.d.cts → sdk-CwTAxhwI.d.cts} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -6,7 +6,7 @@ import { P as PlatformRuntime, a as PlatformRuntimeOptions } from './schemas-BpE
|
|
|
6
6
|
export { A as AgentRuntime, D as DefaultPreprocessor, E as ExecutionContextOptions, M as MCP_TOOL_PREFIX, T as TOOL_MODELS, b as ThenvoiLink } from './schemas-BpEBkq5V.cjs';
|
|
7
7
|
import { P as PlatformMessage } from './types-CovcHpYf.cjs';
|
|
8
8
|
export { A as AgentConfig, a as AgentInput, C as ContactEvent, b as ContactEventCallback, c as ContactEventConfig, d as ContactEventStrategy, e as ConversationContext, H as HistoryProvider, M as MessageHandler, f as PlatformEvent, S as SessionConfig } from './types-CovcHpYf.cjs';
|
|
9
|
-
export { A as A2AAdapter, a as A2AAdapterOptions, b as A2AGatewayAdapter, c as AnthropicAdapter, d as AnthropicAdapterOptions, C as CODEX_REASONING_EFFORTS, e as CODEX_REASONING_SUMMARIES, f as CODEX_WEB_SEARCH_MODES, g as ClaudePermissionMode, h as ClaudeSDKAdapter, i as ClaudeSDKAdapterOptions, j as CodexAdapter, k as CodexAdapterConfig, l as CodexApprovalPolicy, m as CodexReasoningEffort, n as CodexReasoningSummary, o as CodexSandboxMode, p as CodexWebSearchMode, G as GeminiAdapter, q as GeminiAdapterOptions, r as GenericAdapter, s as GenericAdapterHandler, t as GoogleADKAdapter, u as GoogleADKAdapterOptions, L as LangGraphAdapter, v as LangGraphAdapterOptions, w as LangGraphGraph, x as LettaAdapter, y as LettaAdapterOptions, O as OpenAIAdapter, z as OpenAIAdapterOptions, B as OpencodeAdapter, D as OpencodeAdapterConfig, E as OpencodeApprovalMode, F as OpencodeApprovalReply, H as OpencodeQuestionMode, P as ParlantAdapter, I as ParlantAdapterOptions, T as ToolCallingModel, V as VercelAISDKAdapter, J as VercelAISDKAdapterOptions } from './
|
|
9
|
+
export { A as A2AAdapter, a as A2AAdapterOptions, b as A2AGatewayAdapter, c as AnthropicAdapter, d as AnthropicAdapterOptions, C as CODEX_REASONING_EFFORTS, e as CODEX_REASONING_SUMMARIES, f as CODEX_WEB_SEARCH_MODES, g as ClaudePermissionMode, h as ClaudeSDKAdapter, i as ClaudeSDKAdapterOptions, j as CodexAdapter, k as CodexAdapterConfig, l as CodexApprovalPolicy, m as CodexReasoningEffort, n as CodexReasoningSummary, o as CodexSandboxMode, p as CodexWebSearchMode, G as GeminiAdapter, q as GeminiAdapterOptions, r as GenericAdapter, s as GenericAdapterHandler, t as GoogleADKAdapter, u as GoogleADKAdapterOptions, L as LangGraphAdapter, v as LangGraphAdapterOptions, w as LangGraphGraph, x as LettaAdapter, y as LettaAdapterOptions, O as OpenAIAdapter, z as OpenAIAdapterOptions, B as OpencodeAdapter, D as OpencodeAdapterConfig, E as OpencodeApprovalMode, F as OpencodeApprovalReply, H as OpencodeQuestionMode, P as ParlantAdapter, I as ParlantAdapterOptions, T as ToolCallingModel, V as VercelAISDKAdapter, J as VercelAISDKAdapterOptions } from './ClaudeSDKAdapter-CRq4R-WB.cjs';
|
|
10
10
|
export { S as SimpleAdapter } from './simpleAdapter-DqhvjsGr.cjs';
|
|
11
11
|
export { A as A2AAuth, a as A2AGatewayAdapterOptions } from './opencode-BBcDchcN.cjs';
|
|
12
12
|
import './dtos-DUpbIu8k.cjs';
|
|
@@ -15,8 +15,8 @@ import './types-CSHFipIc.cjs';
|
|
|
15
15
|
import './pagination-BPiys10t.cjs';
|
|
16
16
|
import 'zod';
|
|
17
17
|
import './customTools-BzF0IISO.cjs';
|
|
18
|
-
import './backends-
|
|
19
|
-
import './
|
|
18
|
+
import './backends-SVMT-7l4.cjs';
|
|
19
|
+
import './sdk-CwTAxhwI.cjs';
|
|
20
20
|
import '@anthropic-ai/claude-agent-sdk';
|
|
21
21
|
|
|
22
22
|
interface AgentCreateOptions extends Omit<PlatformRuntimeOptions, "agentId" | "apiKey" | "wsUrl" | "restUrl"> {
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { P as PlatformRuntime, a as PlatformRuntimeOptions } from './schemas-vos
|
|
|
6
6
|
export { A as AgentRuntime, D as DefaultPreprocessor, E as ExecutionContextOptions, M as MCP_TOOL_PREFIX, T as TOOL_MODELS, b as ThenvoiLink } from './schemas-vos1AaBc.js';
|
|
7
7
|
import { P as PlatformMessage } from './types-7jVzOeOP.js';
|
|
8
8
|
export { A as AgentConfig, a as AgentInput, C as ContactEvent, b as ContactEventCallback, c as ContactEventConfig, d as ContactEventStrategy, e as ConversationContext, H as HistoryProvider, M as MessageHandler, f as PlatformEvent, S as SessionConfig } from './types-7jVzOeOP.js';
|
|
9
|
-
export { A as A2AAdapter, a as A2AAdapterOptions, b as A2AGatewayAdapter, c as AnthropicAdapter, d as AnthropicAdapterOptions, C as CODEX_REASONING_EFFORTS, e as CODEX_REASONING_SUMMARIES, f as CODEX_WEB_SEARCH_MODES, g as ClaudePermissionMode, h as ClaudeSDKAdapter, i as ClaudeSDKAdapterOptions, j as CodexAdapter, k as CodexAdapterConfig, l as CodexApprovalPolicy, m as CodexReasoningEffort, n as CodexReasoningSummary, o as CodexSandboxMode, p as CodexWebSearchMode, G as GeminiAdapter, q as GeminiAdapterOptions, r as GenericAdapter, s as GenericAdapterHandler, t as GoogleADKAdapter, u as GoogleADKAdapterOptions, L as LangGraphAdapter, v as LangGraphAdapterOptions, w as LangGraphGraph, x as LettaAdapter, y as LettaAdapterOptions, O as OpenAIAdapter, z as OpenAIAdapterOptions, B as OpencodeAdapter, D as OpencodeAdapterConfig, E as OpencodeApprovalMode, F as OpencodeApprovalReply, H as OpencodeQuestionMode, P as ParlantAdapter, I as ParlantAdapterOptions, T as ToolCallingModel, V as VercelAISDKAdapter, J as VercelAISDKAdapterOptions } from './
|
|
9
|
+
export { A as A2AAdapter, a as A2AAdapterOptions, b as A2AGatewayAdapter, c as AnthropicAdapter, d as AnthropicAdapterOptions, C as CODEX_REASONING_EFFORTS, e as CODEX_REASONING_SUMMARIES, f as CODEX_WEB_SEARCH_MODES, g as ClaudePermissionMode, h as ClaudeSDKAdapter, i as ClaudeSDKAdapterOptions, j as CodexAdapter, k as CodexAdapterConfig, l as CodexApprovalPolicy, m as CodexReasoningEffort, n as CodexReasoningSummary, o as CodexSandboxMode, p as CodexWebSearchMode, G as GeminiAdapter, q as GeminiAdapterOptions, r as GenericAdapter, s as GenericAdapterHandler, t as GoogleADKAdapter, u as GoogleADKAdapterOptions, L as LangGraphAdapter, v as LangGraphAdapterOptions, w as LangGraphGraph, x as LettaAdapter, y as LettaAdapterOptions, O as OpenAIAdapter, z as OpenAIAdapterOptions, B as OpencodeAdapter, D as OpencodeAdapterConfig, E as OpencodeApprovalMode, F as OpencodeApprovalReply, H as OpencodeQuestionMode, P as ParlantAdapter, I as ParlantAdapterOptions, T as ToolCallingModel, V as VercelAISDKAdapter, J as VercelAISDKAdapterOptions } from './ClaudeSDKAdapter-BHOkjN3X.js';
|
|
10
10
|
export { S as SimpleAdapter } from './simpleAdapter-9OE_p6QW.js';
|
|
11
11
|
export { A as A2AAuth, a as A2AGatewayAdapterOptions } from './opencode-DthQQUsZ.js';
|
|
12
12
|
import './dtos-DUpbIu8k.js';
|
|
@@ -15,8 +15,8 @@ import './types-CxII3XkA.js';
|
|
|
15
15
|
import './pagination-CcDkVFxK.js';
|
|
16
16
|
import 'zod';
|
|
17
17
|
import './customTools-BzF0IISO.js';
|
|
18
|
-
import './backends-
|
|
19
|
-
import './
|
|
18
|
+
import './backends-CzDbiQar.js';
|
|
19
|
+
import './sdk-CcnQ5OUC.js';
|
|
20
20
|
import '@anthropic-ai/claude-agent-sdk';
|
|
21
21
|
|
|
22
22
|
interface AgentCreateOptions extends Omit<PlatformRuntimeOptions, "agentId" | "apiKey" | "wsUrl" | "restUrl"> {
|
package/dist/index.js
CHANGED
|
@@ -13,10 +13,8 @@ import {
|
|
|
13
13
|
OpenAIAdapter,
|
|
14
14
|
OpencodeAdapter,
|
|
15
15
|
VercelAISDKAdapter
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-LY55KYVI.js";
|
|
19
|
-
import "./chunk-5CXIMAH2.js";
|
|
16
|
+
} from "./chunk-RHVH2GZR.js";
|
|
17
|
+
import "./chunk-MSL6CWHY.js";
|
|
20
18
|
import "./chunk-EDPKUUJL.js";
|
|
21
19
|
import {
|
|
22
20
|
loadAgentConfig,
|
|
@@ -26,7 +24,7 @@ import {
|
|
|
26
24
|
A2AAdapter,
|
|
27
25
|
A2AGatewayAdapter,
|
|
28
26
|
ParlantAdapter
|
|
29
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-W5NDZSYE.js";
|
|
30
28
|
import {
|
|
31
29
|
SimpleAdapter
|
|
32
30
|
} from "./chunk-AVVDPXP4.js";
|
|
@@ -36,7 +34,7 @@ import {
|
|
|
36
34
|
PlatformRuntime,
|
|
37
35
|
ThenvoiLink,
|
|
38
36
|
runWithGracefulShutdown
|
|
39
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-I5EZG52P.js";
|
|
40
38
|
import "./chunk-INA6YZTZ.js";
|
|
41
39
|
import {
|
|
42
40
|
MCP_TOOL_PREFIX,
|
package/dist/mcp-claude.cjs
CHANGED
|
@@ -17,14 +17,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// src/mcp/
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
20
|
+
// src/mcp/sdk.ts
|
|
21
|
+
var sdk_exports = {};
|
|
22
|
+
__export(sdk_exports, {
|
|
23
23
|
createThenvoiSdkMcpServer: () => createThenvoiSdkMcpServer
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
26
|
-
|
|
27
|
-
// src/mcp/sdk.ts
|
|
25
|
+
module.exports = __toCommonJS(sdk_exports);
|
|
28
26
|
var import_claude_agent_sdk = require("@anthropic-ai/claude-agent-sdk");
|
|
29
27
|
var import_zod = require("zod");
|
|
30
28
|
|
package/dist/mcp-claude.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CreateThenvoiSdkMcpServerOptions, T as ThenvoiSdkMcpServer, f as createThenvoiSdkMcpServer } from './claude-CwTAxhwI.cjs';
|
|
2
1
|
import '@anthropic-ai/claude-agent-sdk';
|
|
3
2
|
import './protocols-CInhtFpA.cjs';
|
|
3
|
+
export { C as CreateThenvoiSdkMcpServerOptions, T as ThenvoiSdkMcpServer, f as createThenvoiSdkMcpServer } from './sdk-CwTAxhwI.cjs';
|
|
4
4
|
import './dtos-DUpbIu8k.cjs';
|
package/dist/mcp-claude.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CreateThenvoiSdkMcpServerOptions, T as ThenvoiSdkMcpServer, f as createThenvoiSdkMcpServer } from './claude-CcnQ5OUC.js';
|
|
2
1
|
import '@anthropic-ai/claude-agent-sdk';
|
|
3
2
|
import './protocols-DrhzOH6K.js';
|
|
3
|
+
export { C as CreateThenvoiSdkMcpServerOptions, T as ThenvoiSdkMcpServer, f as createThenvoiSdkMcpServer } from './sdk-CcnQ5OUC.js';
|
|
4
4
|
import './dtos-DUpbIu8k.js';
|
package/dist/mcp-claude.js
CHANGED
|
@@ -1,11 +1,53 @@
|
|
|
1
|
-
import "./chunk-LY55KYVI.js";
|
|
2
1
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import
|
|
2
|
+
buildRoomScopedRegistrations,
|
|
3
|
+
buildZodShape
|
|
4
|
+
} from "./chunk-EDPKUUJL.js";
|
|
5
|
+
import {
|
|
6
|
+
mcpToolNames
|
|
7
|
+
} from "./chunk-GVEQ3RAH.js";
|
|
7
8
|
import "./chunk-3BKAC4OZ.js";
|
|
8
9
|
import "./chunk-YR3BOQNW.js";
|
|
10
|
+
|
|
11
|
+
// src/mcp/sdk.ts
|
|
12
|
+
import {
|
|
13
|
+
createSdkMcpServer,
|
|
14
|
+
tool
|
|
15
|
+
} from "@anthropic-ai/claude-agent-sdk";
|
|
16
|
+
import { z } from "zod";
|
|
17
|
+
function createThenvoiSdkMcpServer(options) {
|
|
18
|
+
const registrations = buildRoomScopedRegistrations(
|
|
19
|
+
options.getToolsForRoom,
|
|
20
|
+
{
|
|
21
|
+
enableMemoryTools: options.enableMemoryTools,
|
|
22
|
+
enableContactTools: true,
|
|
23
|
+
additionalTools: options.additionalTools
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
const toolDefinitions = registrations.map(toSdkToolDefinition);
|
|
27
|
+
const toolNames = new Set(registrations.map((r) => r.name));
|
|
28
|
+
const serverConfig = createSdkMcpServer({
|
|
29
|
+
name: "thenvoi",
|
|
30
|
+
tools: toolDefinitions
|
|
31
|
+
});
|
|
32
|
+
return {
|
|
33
|
+
serverConfig,
|
|
34
|
+
allowedTools: mcpToolNames(toolNames),
|
|
35
|
+
toolDefinitions
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function toSdkToolDefinition(registration) {
|
|
39
|
+
const shape = buildZodShape(
|
|
40
|
+
z,
|
|
41
|
+
registration.inputSchema.properties,
|
|
42
|
+
new Set(registration.inputSchema.required)
|
|
43
|
+
);
|
|
44
|
+
return tool(
|
|
45
|
+
registration.name,
|
|
46
|
+
registration.description,
|
|
47
|
+
shape,
|
|
48
|
+
async (args) => registration.execute(args)
|
|
49
|
+
);
|
|
50
|
+
}
|
|
9
51
|
export {
|
|
10
52
|
createThenvoiSdkMcpServer
|
|
11
53
|
};
|
package/dist/mcp.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as CreateThenvoiMcpBackendOptions, T as ThenvoiMcpBackend, a as ThenvoiMcpBackendKind, c as createThenvoiMcpBackend, g as getThenvoiSdkMcpServerConfig } from './backends-
|
|
2
|
-
import { M as McpToolRegistration } from './
|
|
3
|
-
export { B as BuildRegistrationsOptions, a as McpToolInputSchema, b as McpToolResult, c as buildRoomScopedRegistrations, d as buildSingleContextRegistrations, e as errorResult, s as successResult } from './
|
|
1
|
+
export { C as CreateThenvoiMcpBackendOptions, T as ThenvoiMcpBackend, a as ThenvoiMcpBackendKind, c as createThenvoiMcpBackend, g as getThenvoiSdkMcpServerConfig } from './backends-SVMT-7l4.cjs';
|
|
2
|
+
import { M as McpToolRegistration } from './sdk-CwTAxhwI.cjs';
|
|
3
|
+
export { B as BuildRegistrationsOptions, a as McpToolInputSchema, b as McpToolResult, c as buildRoomScopedRegistrations, d as buildSingleContextRegistrations, e as errorResult, s as successResult } from './sdk-CwTAxhwI.cjs';
|
|
4
4
|
import { A as AdapterToolsProtocol } from './protocols-CInhtFpA.cjs';
|
|
5
5
|
import { Readable, Writable } from 'node:stream';
|
|
6
6
|
import '@anthropic-ai/claude-agent-sdk';
|
package/dist/mcp.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as CreateThenvoiMcpBackendOptions, T as ThenvoiMcpBackend, a as ThenvoiMcpBackendKind, c as createThenvoiMcpBackend, g as getThenvoiSdkMcpServerConfig } from './backends-
|
|
2
|
-
import { M as McpToolRegistration } from './
|
|
3
|
-
export { B as BuildRegistrationsOptions, a as McpToolInputSchema, b as McpToolResult, c as buildRoomScopedRegistrations, d as buildSingleContextRegistrations, e as errorResult, s as successResult } from './
|
|
1
|
+
export { C as CreateThenvoiMcpBackendOptions, T as ThenvoiMcpBackend, a as ThenvoiMcpBackendKind, c as createThenvoiMcpBackend, g as getThenvoiSdkMcpServerConfig } from './backends-CzDbiQar.js';
|
|
2
|
+
import { M as McpToolRegistration } from './sdk-CcnQ5OUC.js';
|
|
3
|
+
export { B as BuildRegistrationsOptions, a as McpToolInputSchema, b as McpToolResult, c as buildRoomScopedRegistrations, d as buildSingleContextRegistrations, e as errorResult, s as successResult } from './sdk-CcnQ5OUC.js';
|
|
4
4
|
import { A as AdapterToolsProtocol } from './protocols-DrhzOH6K.js';
|
|
5
5
|
import { Readable, Writable } from 'node:stream';
|
|
6
6
|
import '@anthropic-ai/claude-agent-sdk';
|
package/dist/mcp.js
CHANGED
package/dist/runtime.cjs
CHANGED
|
@@ -4623,11 +4623,18 @@ var ThenvoiLink = class {
|
|
|
4623
4623
|
}
|
|
4624
4624
|
}
|
|
4625
4625
|
async getNextMessage(roomId) {
|
|
4626
|
-
|
|
4627
|
-
|
|
4626
|
+
try {
|
|
4627
|
+
if (!this.rest.getNextMessage) {
|
|
4628
|
+
return null;
|
|
4629
|
+
}
|
|
4630
|
+
const message = await this.rest.getNextMessage({ chatId: roomId });
|
|
4631
|
+
return message ? toPlatformMessage(roomId, message) : null;
|
|
4632
|
+
} catch (error) {
|
|
4633
|
+
if (error instanceof UnsupportedFeatureError) {
|
|
4634
|
+
return null;
|
|
4635
|
+
}
|
|
4636
|
+
throw error;
|
|
4628
4637
|
}
|
|
4629
|
-
const message = await this.rest.getNextMessage({ chatId: roomId });
|
|
4630
|
-
return message ? toPlatformMessage(roomId, message) : null;
|
|
4631
4638
|
}
|
|
4632
4639
|
async getStaleProcessingMessages(roomId) {
|
|
4633
4640
|
if (!this.rest.listMessages) {
|
package/dist/runtime.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@band-ai/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Thenvoi TypeScript SDK core runtime",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"node": ">=22"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@thenvoi/rest-client": "0.0.
|
|
90
|
+
"@thenvoi/rest-client": "0.0.113",
|
|
91
91
|
"js-yaml": "^4.1.1",
|
|
92
92
|
"phoenix": "^1.8.4",
|
|
93
93
|
"ws": "^8.19.0",
|
package/dist/chunk-5CXIMAH2.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildRoomScopedRegistrations,
|
|
3
|
-
buildZodShape
|
|
4
|
-
} from "./chunk-EDPKUUJL.js";
|
|
5
|
-
import {
|
|
6
|
-
mcpToolNames
|
|
7
|
-
} from "./chunk-GVEQ3RAH.js";
|
|
8
|
-
|
|
9
|
-
// src/mcp/sdk.ts
|
|
10
|
-
import {
|
|
11
|
-
createSdkMcpServer,
|
|
12
|
-
tool
|
|
13
|
-
} from "@anthropic-ai/claude-agent-sdk";
|
|
14
|
-
import { z } from "zod";
|
|
15
|
-
function createThenvoiSdkMcpServer(options) {
|
|
16
|
-
const registrations = buildRoomScopedRegistrations(
|
|
17
|
-
options.getToolsForRoom,
|
|
18
|
-
{
|
|
19
|
-
enableMemoryTools: options.enableMemoryTools,
|
|
20
|
-
enableContactTools: true,
|
|
21
|
-
additionalTools: options.additionalTools
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
const toolDefinitions = registrations.map(toSdkToolDefinition);
|
|
25
|
-
const toolNames = new Set(registrations.map((r) => r.name));
|
|
26
|
-
const serverConfig = createSdkMcpServer({
|
|
27
|
-
name: "thenvoi",
|
|
28
|
-
tools: toolDefinitions
|
|
29
|
-
});
|
|
30
|
-
return {
|
|
31
|
-
serverConfig,
|
|
32
|
-
allowedTools: mcpToolNames(toolNames),
|
|
33
|
-
toolDefinitions
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
function toSdkToolDefinition(registration) {
|
|
37
|
-
const shape = buildZodShape(
|
|
38
|
-
z,
|
|
39
|
-
registration.inputSchema.properties,
|
|
40
|
-
new Set(registration.inputSchema.required)
|
|
41
|
-
);
|
|
42
|
-
return tool(
|
|
43
|
-
registration.name,
|
|
44
|
-
registration.description,
|
|
45
|
-
shape,
|
|
46
|
-
async (args) => registration.execute(args)
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export {
|
|
51
|
-
createThenvoiSdkMcpServer
|
|
52
|
-
};
|
package/dist/chunk-LY55KYVI.js
DELETED
|
File without changes
|
package/dist/sdk-HJUVSSWA.js
DELETED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { H as HistoryConverter } from './protocols-DrhzOH6K.js';
|
|
2
2
|
import { G as GatewaySessionState } from './opencode-DthQQUsZ.js';
|
|
3
3
|
|
|
4
|
+
declare class GatewayHistoryConverter implements HistoryConverter<GatewaySessionState> {
|
|
5
|
+
convert(raw: Array<Record<string, unknown>>): GatewaySessionState;
|
|
6
|
+
}
|
|
7
|
+
|
|
4
8
|
interface ACPClientSessionState {
|
|
5
9
|
roomToSession: Record<string, string>;
|
|
6
10
|
}
|
|
@@ -17,8 +21,4 @@ declare class ACPServerHistoryConverter implements HistoryConverter<ACPServerSes
|
|
|
17
21
|
convert(raw: Array<Record<string, unknown>>): ACPServerSessionState;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
|
-
declare class GatewayHistoryConverter implements HistoryConverter<GatewaySessionState> {
|
|
21
|
-
convert(raw: Array<Record<string, unknown>>): GatewaySessionState;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
24
|
export { type ACPClientSessionState as A, GatewayHistoryConverter as G, type ACPServerSessionState as a, ACPClientHistoryConverter as b, ACPServerHistoryConverter as c };
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { H as HistoryConverter } from './protocols-CInhtFpA.cjs';
|
|
2
2
|
import { G as GatewaySessionState } from './opencode-BBcDchcN.cjs';
|
|
3
3
|
|
|
4
|
+
declare class GatewayHistoryConverter implements HistoryConverter<GatewaySessionState> {
|
|
5
|
+
convert(raw: Array<Record<string, unknown>>): GatewaySessionState;
|
|
6
|
+
}
|
|
7
|
+
|
|
4
8
|
interface ACPClientSessionState {
|
|
5
9
|
roomToSession: Record<string, string>;
|
|
6
10
|
}
|
|
@@ -17,8 +21,4 @@ declare class ACPServerHistoryConverter implements HistoryConverter<ACPServerSes
|
|
|
17
21
|
convert(raw: Array<Record<string, unknown>>): ACPServerSessionState;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
|
-
declare class GatewayHistoryConverter implements HistoryConverter<GatewaySessionState> {
|
|
21
|
-
convert(raw: Array<Record<string, unknown>>): GatewaySessionState;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
24
|
export { type ACPClientSessionState as A, GatewayHistoryConverter as G, type ACPServerSessionState as a, ACPClientHistoryConverter as b, ACPServerHistoryConverter as c };
|
|
File without changes
|
|
File without changes
|