langmart-gateway-type3 3.0.40 → 3.0.42
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/automation-tools.d.ts +18 -57
- package/dist/automation-tools.d.ts.map +1 -1
- package/dist/automation-tools.js +348 -497
- package/dist/automation-tools.js.map +1 -1
- package/dist/gateway-server.d.ts +52 -26
- package/dist/gateway-server.d.ts.map +1 -1
- package/dist/gateway-server.js +446 -150
- package/dist/gateway-server.js.map +1 -1
- package/dist/headless-session.d.ts +58 -9
- package/dist/headless-session.d.ts.map +1 -1
- package/dist/headless-session.js +338 -26
- package/dist/headless-session.js.map +1 -1
- package/dist/index-server.d.ts.map +1 -1
- package/dist/index-server.js +11 -21
- package/dist/index-server.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -20
- package/dist/index.js.map +1 -1
- package/dist/{marketplace-tools.d.ts → registry-tools.d.ts} +30 -8
- package/dist/registry-tools.d.ts.map +1 -0
- package/dist/{marketplace-tools.js → registry-tools.js} +565 -144
- package/dist/registry-tools.js.map +1 -0
- package/package.json +9 -7
- package/dist/marketplace-tools.d.ts.map +0 -1
- package/dist/marketplace-tools.js.map +0 -1
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides MCP tools for remote server management and script execution.
|
|
5
5
|
* These tools interact with the Gateway Type 1 API to:
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
6
|
+
* - Manage remote servers (add, list, test)
|
|
7
|
+
* - Manage automation sessions
|
|
8
|
+
* - Manage automation templates
|
|
9
|
+
* - List SSH keys
|
|
9
10
|
* - Execute scripts on remote servers
|
|
10
|
-
* - View
|
|
11
|
+
* - View execution logs
|
|
11
12
|
*/
|
|
12
13
|
export interface AutomationToolResult {
|
|
13
14
|
success: boolean;
|
|
@@ -46,6 +47,7 @@ export interface RemoteScript {
|
|
|
46
47
|
timeout_seconds: number;
|
|
47
48
|
tags: string[];
|
|
48
49
|
is_system: boolean;
|
|
50
|
+
script_content: string;
|
|
49
51
|
}
|
|
50
52
|
export interface ScriptParameter {
|
|
51
53
|
name: string;
|
|
@@ -70,77 +72,36 @@ export interface ScriptExecutionLog {
|
|
|
70
72
|
export declare class AutomationTools {
|
|
71
73
|
private static instance;
|
|
72
74
|
private client;
|
|
73
|
-
private
|
|
75
|
+
private registryUrl;
|
|
74
76
|
private apiKey;
|
|
75
77
|
private sessionId;
|
|
76
78
|
private serverMap;
|
|
77
79
|
private scriptMap;
|
|
78
|
-
constructor(
|
|
79
|
-
static getInstance(
|
|
80
|
+
constructor(registryUrl: string, apiKey: string);
|
|
81
|
+
static getInstance(registryUrl?: string, apiKey?: string): AutomationTools;
|
|
80
82
|
setSessionId(sessionId: string): void;
|
|
81
|
-
/**
|
|
82
|
-
* Get tool definitions for AI
|
|
83
|
-
*/
|
|
84
83
|
getTools(): any[];
|
|
85
|
-
/**
|
|
86
|
-
* Resolve server ID (handle sequence numbers like "1", "2", etc.)
|
|
87
|
-
*/
|
|
88
84
|
private resolveServerId;
|
|
89
|
-
/**
|
|
90
|
-
* Resolve script slug (handle sequence numbers like "1", "2", etc.)
|
|
91
|
-
*/
|
|
92
85
|
private resolveScriptSlug;
|
|
93
|
-
/**
|
|
94
|
-
* Execute an automation tool
|
|
95
|
-
*/
|
|
96
86
|
executeTool(toolName: string, args: Record<string, any>): Promise<AutomationToolResult>;
|
|
97
|
-
/**
|
|
98
|
-
* List remote servers
|
|
99
|
-
*/
|
|
100
87
|
private listServers;
|
|
101
|
-
|
|
102
|
-
* Test server connection
|
|
103
|
-
*/
|
|
88
|
+
private addServer;
|
|
104
89
|
private testServerConnection;
|
|
105
|
-
/**
|
|
106
|
-
* Get server info
|
|
107
|
-
*/
|
|
108
90
|
private getServerInfo;
|
|
109
|
-
/**
|
|
110
|
-
* List available scripts
|
|
111
|
-
*/
|
|
112
91
|
private listScripts;
|
|
113
|
-
/**
|
|
114
|
-
* Get script info
|
|
115
|
-
*/
|
|
116
92
|
private getScriptInfo;
|
|
117
|
-
/**
|
|
118
|
-
* Execute a script on a remote server
|
|
119
|
-
*/
|
|
120
93
|
private executeScript;
|
|
121
|
-
/**
|
|
122
|
-
* Get execution logs
|
|
123
|
-
*/
|
|
124
94
|
private getExecutionLogs;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
private
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
private
|
|
133
|
-
/**
|
|
134
|
-
* Create execution log entry
|
|
135
|
-
*/
|
|
95
|
+
private listSessions;
|
|
96
|
+
private createSession;
|
|
97
|
+
private getSession;
|
|
98
|
+
private deleteSession;
|
|
99
|
+
private listTemplates;
|
|
100
|
+
private createTemplate;
|
|
101
|
+
private listSSHKeys;
|
|
102
|
+
private buildEnvironmentExports;
|
|
136
103
|
private createExecutionLog;
|
|
137
|
-
/**
|
|
138
|
-
* Update execution log with results
|
|
139
|
-
*/
|
|
140
104
|
private updateExecutionLog;
|
|
141
|
-
/**
|
|
142
|
-
* Execute script on remote server via SSH
|
|
143
|
-
*/
|
|
144
105
|
private executeRemoteScript;
|
|
145
106
|
}
|
|
146
107
|
export default AutomationTools;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation-tools.d.ts","sourceRoot":"","sources":["../automation-tools.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"automation-tools.d.ts","sourceRoot":"","sources":["../automation-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAsBH,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EA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