@anastops/mcp-server 1.1.2 → 2.0.1
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/handlers/handlers.base.d.ts +20 -4
- package/dist/handlers/handlers.base.d.ts.map +1 -1
- package/dist/handlers/handlers.base.js +32 -17
- package/dist/handlers/handlers.base.js.map +1 -1
- package/dist/handlers/index.d.ts +5 -4
- package/dist/handlers/index.d.ts.map +1 -1
- package/dist/handlers/index.js +126 -135
- package/dist/handlers/index.js.map +1 -1
- package/dist/handlers/tool-definitions.d.ts +1016 -1564
- package/dist/handlers/tool-definitions.d.ts.map +1 -1
- package/dist/handlers/tool-definitions.js +617 -388
- package/dist/handlers/tool-definitions.js.map +1 -1
- package/dist/handlers/types.d.ts +34 -0
- package/dist/handlers/types.d.ts.map +1 -1
- package/dist/handlers/v3/agent-tools.d.ts +280 -0
- package/dist/handlers/v3/agent-tools.d.ts.map +1 -0
- package/dist/handlers/v3/agent-tools.js +460 -0
- package/dist/handlers/v3/agent-tools.js.map +1 -0
- package/dist/handlers/v3/index.d.ts +31 -0
- package/dist/handlers/v3/index.d.ts.map +1 -0
- package/dist/handlers/v3/index.js +56 -0
- package/dist/handlers/v3/index.js.map +1 -0
- package/dist/handlers/v3/routing-integration-example.d.ts +258 -0
- package/dist/handlers/v3/routing-integration-example.d.ts.map +1 -0
- package/dist/handlers/v3/routing-integration-example.js +454 -0
- package/dist/handlers/v3/routing-integration-example.js.map +1 -0
- package/dist/handlers/v3/routing-middleware.d.ts +191 -0
- package/dist/handlers/v3/routing-middleware.d.ts.map +1 -0
- package/dist/handlers/v3/routing-middleware.js +425 -0
- package/dist/handlers/v3/routing-middleware.js.map +1 -0
- package/dist/handlers/v3/session-tools.d.ts +303 -0
- package/dist/handlers/v3/session-tools.d.ts.map +1 -0
- package/dist/handlers/v3/session-tools.js +945 -0
- package/dist/handlers/v3/session-tools.js.map +1 -0
- package/dist/handlers/v3/task-tools.d.ts +18 -0
- package/dist/handlers/v3/task-tools.d.ts.map +1 -0
- package/dist/handlers/v3/task-tools.js +1947 -0
- package/dist/handlers/v3/task-tools.js.map +1 -0
- package/dist/handlers/v3/utility-tools.d.ts +99 -0
- package/dist/handlers/v3/utility-tools.d.ts.map +1 -0
- package/dist/handlers/v3/utility-tools.js +878 -0
- package/dist/handlers/v3/utility-tools.js.map +1 -0
- package/dist/handlers.d.ts +1 -1
- package/dist/handlers.d.ts.map +1 -1
- package/dist/handlers.js +1 -1
- package/dist/handlers.js.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/persistence.d.ts +11 -0
- package/dist/persistence.d.ts.map +1 -1
- package/dist/persistence.js +77 -0
- package/dist/persistence.js.map +1 -1
- package/dist/schemas.d.ts +95 -8
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +97 -2
- package/dist/schemas.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP v3.0 Session Management Tools
|
|
3
|
+
* Consolidated session management following aggressive consolidation plan
|
|
4
|
+
*
|
|
5
|
+
* Tools:
|
|
6
|
+
* - session_manage: Create, fork, archive, delete operations
|
|
7
|
+
* - session_query: Status, list, report query operations
|
|
8
|
+
* - session_queue_config: Configure and query queue settings
|
|
9
|
+
*
|
|
10
|
+
* @see docs/MCP-V3-AGGRESSIVE-CONSOLIDATION.md
|
|
11
|
+
*/
|
|
12
|
+
import { SessionManager, SessionForkService } from '@anastops/core';
|
|
13
|
+
declare const sessionManager: SessionManager;
|
|
14
|
+
declare const forkService: SessionForkService;
|
|
15
|
+
/**
|
|
16
|
+
* session_manage tool schema
|
|
17
|
+
*
|
|
18
|
+
* Handles create, fork, archive, and delete operations on sessions.
|
|
19
|
+
*
|
|
20
|
+
* @example Create a new session
|
|
21
|
+
* ```typescript
|
|
22
|
+
* session_manage({
|
|
23
|
+
* operation: 'create',
|
|
24
|
+
* objective: 'Build authentication system',
|
|
25
|
+
* concurrency: 3,
|
|
26
|
+
* auto_execute: true
|
|
27
|
+
* })
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @example Fork a session
|
|
31
|
+
* ```typescript
|
|
32
|
+
* session_manage({
|
|
33
|
+
* operation: 'fork',
|
|
34
|
+
* session_id: 'abc123',
|
|
35
|
+
* reason: 'Explore OAuth approach'
|
|
36
|
+
* })
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @example Archive a session
|
|
40
|
+
* ```typescript
|
|
41
|
+
* session_manage({
|
|
42
|
+
* operation: 'archive',
|
|
43
|
+
* session_id: 'abc123'
|
|
44
|
+
* })
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @example Delete a session
|
|
48
|
+
* ```typescript
|
|
49
|
+
* session_manage({
|
|
50
|
+
* operation: 'delete',
|
|
51
|
+
* session_id: 'abc123',
|
|
52
|
+
* confirm: true
|
|
53
|
+
* })
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare const sessionManageSchema: {
|
|
57
|
+
name: string;
|
|
58
|
+
description: string;
|
|
59
|
+
inputSchema: {
|
|
60
|
+
type: "object";
|
|
61
|
+
properties: {
|
|
62
|
+
operation: {
|
|
63
|
+
type: string;
|
|
64
|
+
enum: string[];
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
objective: {
|
|
68
|
+
type: string;
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
context_files: {
|
|
72
|
+
type: string;
|
|
73
|
+
items: {
|
|
74
|
+
type: string;
|
|
75
|
+
};
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
parent_session: {
|
|
79
|
+
type: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
concurrency: {
|
|
83
|
+
type: string;
|
|
84
|
+
description: string;
|
|
85
|
+
};
|
|
86
|
+
auto_execute: {
|
|
87
|
+
type: string;
|
|
88
|
+
description: string;
|
|
89
|
+
};
|
|
90
|
+
session_id: {
|
|
91
|
+
type: string;
|
|
92
|
+
description: string;
|
|
93
|
+
};
|
|
94
|
+
fork_point: {
|
|
95
|
+
type: string;
|
|
96
|
+
description: string;
|
|
97
|
+
};
|
|
98
|
+
reason: {
|
|
99
|
+
type: string;
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
session_ids: {
|
|
103
|
+
type: string;
|
|
104
|
+
items: {
|
|
105
|
+
type: string;
|
|
106
|
+
};
|
|
107
|
+
description: string;
|
|
108
|
+
};
|
|
109
|
+
status: {
|
|
110
|
+
type: string;
|
|
111
|
+
enum: string[];
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
114
|
+
older_than_days: {
|
|
115
|
+
type: string;
|
|
116
|
+
description: string;
|
|
117
|
+
};
|
|
118
|
+
confirm: {
|
|
119
|
+
type: string;
|
|
120
|
+
description: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
required: string[];
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* session_query tool schema
|
|
128
|
+
*
|
|
129
|
+
* Queries session information: get status, list sessions, or generate reports.
|
|
130
|
+
*
|
|
131
|
+
* @example Get session status
|
|
132
|
+
* ```typescript
|
|
133
|
+
* session_query({
|
|
134
|
+
* operation: 'status',
|
|
135
|
+
* session_id: 'abc123'
|
|
136
|
+
* })
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* @example List active sessions
|
|
140
|
+
* ```typescript
|
|
141
|
+
* session_query({
|
|
142
|
+
* operation: 'list',
|
|
143
|
+
* status_filter: 'active',
|
|
144
|
+
* format: 'table'
|
|
145
|
+
* })
|
|
146
|
+
* ```
|
|
147
|
+
*
|
|
148
|
+
* @example Generate session report
|
|
149
|
+
* ```typescript
|
|
150
|
+
* session_query({
|
|
151
|
+
* operation: 'report',
|
|
152
|
+
* session_id: 'abc123',
|
|
153
|
+
* include_output: true,
|
|
154
|
+
* include_artifacts: false
|
|
155
|
+
* })
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
export declare const sessionQuerySchema: {
|
|
159
|
+
name: string;
|
|
160
|
+
description: string;
|
|
161
|
+
inputSchema: {
|
|
162
|
+
type: "object";
|
|
163
|
+
properties: {
|
|
164
|
+
operation: {
|
|
165
|
+
type: string;
|
|
166
|
+
enum: string[];
|
|
167
|
+
description: string;
|
|
168
|
+
};
|
|
169
|
+
session_id: {
|
|
170
|
+
type: string;
|
|
171
|
+
description: string;
|
|
172
|
+
};
|
|
173
|
+
status_filter: {
|
|
174
|
+
type: string;
|
|
175
|
+
enum: string[];
|
|
176
|
+
description: string;
|
|
177
|
+
};
|
|
178
|
+
include_forks: {
|
|
179
|
+
type: string;
|
|
180
|
+
description: string;
|
|
181
|
+
};
|
|
182
|
+
limit: {
|
|
183
|
+
type: string;
|
|
184
|
+
description: string;
|
|
185
|
+
};
|
|
186
|
+
format: {
|
|
187
|
+
type: string;
|
|
188
|
+
enum: string[];
|
|
189
|
+
description: string;
|
|
190
|
+
};
|
|
191
|
+
include_output: {
|
|
192
|
+
type: string;
|
|
193
|
+
description: string;
|
|
194
|
+
};
|
|
195
|
+
include_artifacts: {
|
|
196
|
+
type: string;
|
|
197
|
+
description: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
required: string[];
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* session_queue_config tool schema
|
|
205
|
+
*
|
|
206
|
+
* Configure queue settings or query queue status for a session.
|
|
207
|
+
*
|
|
208
|
+
* @example Configure queue settings
|
|
209
|
+
* ```typescript
|
|
210
|
+
* session_queue_config({
|
|
211
|
+
* operation: 'configure',
|
|
212
|
+
* session_id: 'abc123',
|
|
213
|
+
* concurrency: 5,
|
|
214
|
+
* auto_execute: true
|
|
215
|
+
* })
|
|
216
|
+
* ```
|
|
217
|
+
*
|
|
218
|
+
* @example Query queue status
|
|
219
|
+
* ```typescript
|
|
220
|
+
* session_queue_config({
|
|
221
|
+
* operation: 'status',
|
|
222
|
+
* session_id: 'abc123'
|
|
223
|
+
* })
|
|
224
|
+
* ```
|
|
225
|
+
*/
|
|
226
|
+
export declare const sessionQueueConfigSchema: {
|
|
227
|
+
name: string;
|
|
228
|
+
description: string;
|
|
229
|
+
inputSchema: {
|
|
230
|
+
type: "object";
|
|
231
|
+
properties: {
|
|
232
|
+
operation: {
|
|
233
|
+
type: string;
|
|
234
|
+
enum: string[];
|
|
235
|
+
description: string;
|
|
236
|
+
};
|
|
237
|
+
session_id: {
|
|
238
|
+
type: string;
|
|
239
|
+
description: string;
|
|
240
|
+
};
|
|
241
|
+
concurrency: {
|
|
242
|
+
type: string;
|
|
243
|
+
description: string;
|
|
244
|
+
};
|
|
245
|
+
auto_execute: {
|
|
246
|
+
type: string;
|
|
247
|
+
description: string;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
required: string[];
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* session_resume tool schema
|
|
255
|
+
*
|
|
256
|
+
* Discover active sessions with incomplete tasks and display them as a checklist.
|
|
257
|
+
*
|
|
258
|
+
* @example Resume specific session
|
|
259
|
+
* ```typescript
|
|
260
|
+
* session_resume({
|
|
261
|
+
* session_id: 'abc123'
|
|
262
|
+
* })
|
|
263
|
+
* ```
|
|
264
|
+
*
|
|
265
|
+
* @example Discover all resumable sessions
|
|
266
|
+
* ```typescript
|
|
267
|
+
* session_resume({})
|
|
268
|
+
* ```
|
|
269
|
+
*/
|
|
270
|
+
export declare const sessionResumeSchema: {
|
|
271
|
+
name: string;
|
|
272
|
+
description: string;
|
|
273
|
+
inputSchema: {
|
|
274
|
+
type: "object";
|
|
275
|
+
properties: {
|
|
276
|
+
session_id: {
|
|
277
|
+
type: string;
|
|
278
|
+
description: string;
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* session_manage handler
|
|
285
|
+
* Routes to appropriate handler based on operation parameter
|
|
286
|
+
*/
|
|
287
|
+
export declare function handleSessionManage(args: Record<string, unknown>): Promise<unknown>;
|
|
288
|
+
/**
|
|
289
|
+
* session_query handler
|
|
290
|
+
* Routes to appropriate handler based on operation parameter
|
|
291
|
+
*/
|
|
292
|
+
export declare function handleSessionQuery(args: Record<string, unknown>): Promise<unknown>;
|
|
293
|
+
/**
|
|
294
|
+
* session_queue_config handler
|
|
295
|
+
* Routes to configure or status operation
|
|
296
|
+
*/
|
|
297
|
+
export declare function handleSessionQueueConfig(args: Record<string, unknown>): Promise<unknown>;
|
|
298
|
+
/**
|
|
299
|
+
* Resume a session - discover active sessions with incomplete tasks
|
|
300
|
+
*/
|
|
301
|
+
declare function handleSessionResume(args: Record<string, unknown>): Promise<unknown>;
|
|
302
|
+
export { sessionManager, forkService, handleSessionResume };
|
|
303
|
+
//# sourceMappingURL=session-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-tools.d.ts","sourceRoot":"","sources":["../../../src/handlers/v3/session-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,cAAc,EACd,kBAAkB,EAInB,MAAM,gBAAgB,CAAC;AAOxB,QAAA,MAAM,cAAc,gBAAuB,CAAC;AAC5C,QAAA,MAAM,WAAW,oBAAyC,CAAC;AAM3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyE/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsD9B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BpC,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;CAc/B,CAAC;AA4FF;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBzF;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAgBxF;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAc9F;AAuXD;;GAEG;AACH,iBAAe,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAoHlF;AA4HD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC"}
|