@robota-sdk/agent-transport-mcp 3.0.0-beta.43 → 3.0.0-beta.45
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 +2 -3
- package/dist/node/index.cjs +3 -3
- package/dist/node/index.d.cts +1 -4
- package/dist/node/index.d.ts +1 -4
- package/dist/node/index.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -12,14 +12,13 @@ pnpm add @robota-sdk/agent-transport-mcp
|
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
14
|
import { createAgentMcpServer } from '@robota-sdk/agent-transport-mcp';
|
|
15
|
-
import { InteractiveSession
|
|
15
|
+
import type { InteractiveSession } from '@robota-sdk/agent-sdk';
|
|
16
16
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
17
17
|
|
|
18
18
|
const mcpServer = createAgentMcpServer({
|
|
19
19
|
name: 'robota-agent',
|
|
20
20
|
version: '1.0.0',
|
|
21
21
|
session: interactiveSession,
|
|
22
|
-
commandExecutor,
|
|
23
22
|
});
|
|
24
23
|
|
|
25
24
|
// Connect via stdio (subprocess / Claude Desktop)
|
|
@@ -45,6 +44,6 @@ The `submit` tool waits for the session to reach `complete` or `interrupted` sta
|
|
|
45
44
|
|
|
46
45
|
## Dependencies
|
|
47
46
|
|
|
48
|
-
- `@robota-sdk/agent-sdk` — `InteractiveSession
|
|
47
|
+
- `@robota-sdk/agent-sdk` — `InteractiveSession`
|
|
49
48
|
- `@modelcontextprotocol/sdk` — MCP server implementation
|
|
50
49
|
- `zod` — input schema definitions
|
package/dist/node/index.cjs
CHANGED
|
@@ -28,7 +28,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
28
28
|
var import_server = require("@modelcontextprotocol/sdk/server/index.js");
|
|
29
29
|
var import_types = require("@modelcontextprotocol/sdk/types.js");
|
|
30
30
|
function createAgentMcpServer(options) {
|
|
31
|
-
const { name, version, session,
|
|
31
|
+
const { name, version, session, exposeCommands = true } = options;
|
|
32
32
|
const server = new import_server.Server({ name, version }, { capabilities: { tools: {} } });
|
|
33
33
|
const tools = [
|
|
34
34
|
{
|
|
@@ -44,7 +44,7 @@ function createAgentMcpServer(options) {
|
|
|
44
44
|
}
|
|
45
45
|
];
|
|
46
46
|
if (exposeCommands) {
|
|
47
|
-
for (const cmd of
|
|
47
|
+
for (const cmd of session.listCommands()) {
|
|
48
48
|
tools.push({
|
|
49
49
|
name: `command_${cmd.name}`,
|
|
50
50
|
description: cmd.description,
|
|
@@ -78,7 +78,7 @@ function createAgentMcpServer(options) {
|
|
|
78
78
|
if (toolName.startsWith("command_")) {
|
|
79
79
|
const cmdName = toolName.slice("command_".length);
|
|
80
80
|
const args = toolArgs?.args ?? "";
|
|
81
|
-
const result = await
|
|
81
|
+
const result = await session.executeCommand(cmdName, args);
|
|
82
82
|
return {
|
|
83
83
|
content: [
|
|
84
84
|
{
|
package/dist/node/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
-
import { InteractiveSession
|
|
2
|
+
import { InteractiveSession } from '@robota-sdk/agent-sdk';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* MCP transport adapter — exposes InteractiveSession as an MCP server.
|
|
@@ -16,8 +16,6 @@ interface IAgentMcpOptions {
|
|
|
16
16
|
version: string;
|
|
17
17
|
/** InteractiveSession to expose. */
|
|
18
18
|
session: InteractiveSession;
|
|
19
|
-
/** System command executor. */
|
|
20
|
-
commandExecutor: SystemCommandExecutor;
|
|
21
19
|
/** If true, register each system command as a separate MCP tool. Default: true. */
|
|
22
20
|
exposeCommands?: boolean;
|
|
23
21
|
}
|
|
@@ -30,7 +28,6 @@ interface IAgentMcpOptions {
|
|
|
30
28
|
* name: 'robota-agent',
|
|
31
29
|
* version: '1.0.0',
|
|
32
30
|
* session: interactiveSession,
|
|
33
|
-
* commandExecutor,
|
|
34
31
|
* });
|
|
35
32
|
*
|
|
36
33
|
* import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
-
import { InteractiveSession
|
|
2
|
+
import { InteractiveSession } from '@robota-sdk/agent-sdk';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* MCP transport adapter — exposes InteractiveSession as an MCP server.
|
|
@@ -16,8 +16,6 @@ interface IAgentMcpOptions {
|
|
|
16
16
|
version: string;
|
|
17
17
|
/** InteractiveSession to expose. */
|
|
18
18
|
session: InteractiveSession;
|
|
19
|
-
/** System command executor. */
|
|
20
|
-
commandExecutor: SystemCommandExecutor;
|
|
21
19
|
/** If true, register each system command as a separate MCP tool. Default: true. */
|
|
22
20
|
exposeCommands?: boolean;
|
|
23
21
|
}
|
|
@@ -30,7 +28,6 @@ interface IAgentMcpOptions {
|
|
|
30
28
|
* name: 'robota-agent',
|
|
31
29
|
* version: '1.0.0',
|
|
32
30
|
* session: interactiveSession,
|
|
33
|
-
* commandExecutor,
|
|
34
31
|
* });
|
|
35
32
|
*
|
|
36
33
|
* import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
package/dist/node/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
3
|
import { ListToolsRequestSchema, CallToolRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
4
4
|
function createAgentMcpServer(options) {
|
|
5
|
-
const { name, version, session,
|
|
5
|
+
const { name, version, session, exposeCommands = true } = options;
|
|
6
6
|
const server = new Server({ name, version }, { capabilities: { tools: {} } });
|
|
7
7
|
const tools = [
|
|
8
8
|
{
|
|
@@ -18,7 +18,7 @@ function createAgentMcpServer(options) {
|
|
|
18
18
|
}
|
|
19
19
|
];
|
|
20
20
|
if (exposeCommands) {
|
|
21
|
-
for (const cmd of
|
|
21
|
+
for (const cmd of session.listCommands()) {
|
|
22
22
|
tools.push({
|
|
23
23
|
name: `command_${cmd.name}`,
|
|
24
24
|
description: cmd.description,
|
|
@@ -52,7 +52,7 @@ function createAgentMcpServer(options) {
|
|
|
52
52
|
if (toolName.startsWith("command_")) {
|
|
53
53
|
const cmdName = toolName.slice("command_".length);
|
|
54
54
|
const args = toolArgs?.args ?? "";
|
|
55
|
-
const result = await
|
|
55
|
+
const result = await session.executeCommand(cmdName, args);
|
|
56
56
|
return {
|
|
57
57
|
content: [
|
|
58
58
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robota-sdk/agent-transport-mcp",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.45",
|
|
4
4
|
"description": "MCP transport adapter for exposing InteractiveSession as an MCP server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/node/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
26
26
|
"zod": "^3.24.4",
|
|
27
|
-
"@robota-sdk/agent-sdk": "3.0.0-beta.
|
|
27
|
+
"@robota-sdk/agent-sdk": "3.0.0-beta.45"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"rimraf": "^5.0.5",
|