@j0hanz/thinkseq-mcp 1.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/README.md +38 -0
- package/dist/app.d.ts +43 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +111 -0
- package/dist/app.js.map +1 -0
- package/dist/engine.d.ts +12 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +165 -0
- package/dist/engine.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/diagnostics.d.ts +37 -0
- package/dist/lib/diagnostics.d.ts.map +1 -0
- package/dist/lib/diagnostics.js +24 -0
- package/dist/lib/diagnostics.js.map +1 -0
- package/dist/lib/errors.d.ts +18 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +21 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/package.d.ts +15 -0
- package/dist/lib/package.d.ts.map +1 -0
- package/dist/lib/package.js +41 -0
- package/dist/lib/package.js.map +1 -0
- package/dist/lib/protocolGuards.d.ts +2 -0
- package/dist/lib/protocolGuards.d.ts.map +1 -0
- package/dist/lib/protocolGuards.js +80 -0
- package/dist/lib/protocolGuards.js.map +1 -0
- package/dist/lib/stdioGuards.d.ts +3 -0
- package/dist/lib/stdioGuards.d.ts.map +1 -0
- package/dist/lib/stdioGuards.js +57 -0
- package/dist/lib/stdioGuards.js.map +1 -0
- package/dist/lib/types.d.ts +44 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/schemas/inputs.d.ts +19 -0
- package/dist/schemas/inputs.d.ts.map +1 -0
- package/dist/schemas/inputs.js +41 -0
- package/dist/schemas/inputs.js.map +1 -0
- package/dist/schemas/outputs.d.ts +33 -0
- package/dist/schemas/outputs.d.ts.map +1 -0
- package/dist/schemas/outputs.js +42 -0
- package/dist/schemas/outputs.js.map +1 -0
- package/dist/tools/thinkseq.d.ts +7 -0
- package/dist/tools/thinkseq.d.ts.map +1 -0
- package/dist/tools/thinkseq.js +84 -0
- package/dist/tools/thinkseq.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ErrorCode, McpError, SUPPORTED_PROTOCOL_VERSIONS, } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
const INIT_FIRST_ERROR_MESSAGE = 'initialize must be the first request';
|
|
3
|
+
function isRequestHandler(value) {
|
|
4
|
+
return typeof value === 'function';
|
|
5
|
+
}
|
|
6
|
+
function getInitializeProtocolVersion(request) {
|
|
7
|
+
if (!request || typeof request !== 'object')
|
|
8
|
+
return undefined;
|
|
9
|
+
const params = Reflect.get(request, 'params');
|
|
10
|
+
if (!params || typeof params !== 'object')
|
|
11
|
+
return undefined;
|
|
12
|
+
return Reflect.get(params, 'protocolVersion');
|
|
13
|
+
}
|
|
14
|
+
function assertSupportedProtocolVersion(protocolVersion) {
|
|
15
|
+
if (typeof protocolVersion !== 'string')
|
|
16
|
+
return;
|
|
17
|
+
if (SUPPORTED_PROTOCOL_VERSIONS.includes(protocolVersion))
|
|
18
|
+
return;
|
|
19
|
+
throw new McpError(ErrorCode.InvalidRequest, `Unsupported protocolVersion: ${protocolVersion}`);
|
|
20
|
+
}
|
|
21
|
+
function wrapWithInitializationGuard(method, handler, state) {
|
|
22
|
+
if (method === 'initialize') {
|
|
23
|
+
return async (request, extra) => {
|
|
24
|
+
assertSupportedProtocolVersion(getInitializeProtocolVersion(request));
|
|
25
|
+
state.sawInitialize = true;
|
|
26
|
+
return await handler(request, extra);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return async (request, extra) => {
|
|
30
|
+
if (!state.sawInitialize) {
|
|
31
|
+
throw new McpError(ErrorCode.InvalidRequest, INIT_FIRST_ERROR_MESSAGE);
|
|
32
|
+
}
|
|
33
|
+
return await handler(request, extra);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function getProtocolObject(server) {
|
|
37
|
+
if (!server || typeof server !== 'object')
|
|
38
|
+
return undefined;
|
|
39
|
+
const protocol = Reflect.get(server, 'server');
|
|
40
|
+
return protocol && typeof protocol === 'object' ? protocol : undefined;
|
|
41
|
+
}
|
|
42
|
+
function getRequestHandlers(protocol) {
|
|
43
|
+
const handlers = Reflect.get(protocol, '_requestHandlers');
|
|
44
|
+
return handlers instanceof Map ? handlers : undefined;
|
|
45
|
+
}
|
|
46
|
+
function installFallbackRequestHandler(protocol, state) {
|
|
47
|
+
// Guard unknown methods as well (so pre-init calls to unknown methods don't
|
|
48
|
+
// fall through to MethodNotFound).
|
|
49
|
+
const handler = (request) => {
|
|
50
|
+
const method = request && typeof request === 'object'
|
|
51
|
+
? Reflect.get(request, 'method')
|
|
52
|
+
: undefined;
|
|
53
|
+
if (!state.sawInitialize && method !== 'initialize') {
|
|
54
|
+
throw new McpError(ErrorCode.InvalidRequest, INIT_FIRST_ERROR_MESSAGE);
|
|
55
|
+
}
|
|
56
|
+
throw new McpError(ErrorCode.MethodNotFound, 'Method not found');
|
|
57
|
+
};
|
|
58
|
+
Reflect.set(protocol, 'fallbackRequestHandler', handler);
|
|
59
|
+
}
|
|
60
|
+
function wrapRequestHandlers(handlers, state) {
|
|
61
|
+
for (const [method, handler] of handlers.entries()) {
|
|
62
|
+
if (typeof method !== 'string')
|
|
63
|
+
continue;
|
|
64
|
+
if (!isRequestHandler(handler))
|
|
65
|
+
continue;
|
|
66
|
+
handlers.set(method, wrapWithInitializationGuard(method, handler, state));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export function installInitializationGuards(server) {
|
|
70
|
+
const protocol = getProtocolObject(server);
|
|
71
|
+
if (!protocol)
|
|
72
|
+
return;
|
|
73
|
+
const handlers = getRequestHandlers(protocol);
|
|
74
|
+
if (!handlers)
|
|
75
|
+
return;
|
|
76
|
+
const state = { sawInitialize: false };
|
|
77
|
+
wrapRequestHandlers(handlers, state);
|
|
78
|
+
installFallbackRequestHandler(protocol, state);
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=protocolGuards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocolGuards.js","sourceRoot":"","sources":["../../src/lib/protocolGuards.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,2BAA2B,GAC5B,MAAM,oCAAoC,CAAC;AAI5C,MAAM,wBAAwB,GAAG,sCAAsC,CAAC;AAExE,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC;AAED,SAAS,4BAA4B,CAAC,OAAgB;IACpD,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC9D,MAAM,MAAM,GAAY,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACvD,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC5D,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,8BAA8B,CAAC,eAAwB;IAC9D,IAAI,OAAO,eAAe,KAAK,QAAQ;QAAE,OAAO;IAChD,IAAI,2BAA2B,CAAC,QAAQ,CAAC,eAAe,CAAC;QAAE,OAAO;IAClE,MAAM,IAAI,QAAQ,CAChB,SAAS,CAAC,cAAc,EACxB,gCAAgC,eAAe,EAAE,CAClD,CAAC;AACJ,CAAC;AAED,SAAS,2BAA2B,CAClC,MAAc,EACd,OAAuB,EACvB,KAAiC;IAEjC,IAAI,MAAM,KAAK,YAAY,EAAE,CAAC;QAC5B,OAAO,KAAK,EAAE,OAAgB,EAAE,KAAc,EAAoB,EAAE;YAClE,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.d.ts","sourceRoot":"","sources":["../../src/lib/stdioGuards.ts"],"names":[],"mappings":"AA+CA,wBAAgB,gCAAgC,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAgBzE;AAED,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAWxE"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
function isStdioMessageTransport(value) {
|
|
3
|
+
if (!value || typeof value !== 'object')
|
|
4
|
+
return false;
|
|
5
|
+
const transport = value;
|
|
6
|
+
return (typeof Reflect.get(transport, 'onmessage') === 'function' &&
|
|
7
|
+
typeof Reflect.get(transport, 'send') === 'function');
|
|
8
|
+
}
|
|
9
|
+
function sendInvalidRequest(transport) {
|
|
10
|
+
void transport
|
|
11
|
+
.send?.({
|
|
12
|
+
jsonrpc: '2.0',
|
|
13
|
+
id: null,
|
|
14
|
+
error: {
|
|
15
|
+
code: ErrorCode.InvalidRequest,
|
|
16
|
+
message: 'Invalid Request',
|
|
17
|
+
},
|
|
18
|
+
})
|
|
19
|
+
.catch(() => {
|
|
20
|
+
return;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function isInvalidJsonRpcMessageShape(message) {
|
|
24
|
+
return (message === null || typeof message !== 'object' || Array.isArray(message));
|
|
25
|
+
}
|
|
26
|
+
function isParseOrSchemaError(error) {
|
|
27
|
+
return (error instanceof SyntaxError ||
|
|
28
|
+
(error instanceof Error && error.name === 'ZodError'));
|
|
29
|
+
}
|
|
30
|
+
export function installStdioInvalidMessageGuards(transport) {
|
|
31
|
+
if (!isStdioMessageTransport(transport))
|
|
32
|
+
return;
|
|
33
|
+
const originalOnMessage = transport.onmessage;
|
|
34
|
+
if (!originalOnMessage)
|
|
35
|
+
return;
|
|
36
|
+
transport.onmessage = (message, extra) => {
|
|
37
|
+
// MCP stdio is line-delimited JSON-RPC (one object per line). JSON-RPC
|
|
38
|
+
// batching is removed in newer revisions; treat arrays as invalid.
|
|
39
|
+
if (isInvalidJsonRpcMessageShape(message)) {
|
|
40
|
+
sendInvalidRequest(transport);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
originalOnMessage(message, extra);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function installStdioParseErrorResponder(transport) {
|
|
47
|
+
if (!isStdioMessageTransport(transport))
|
|
48
|
+
return;
|
|
49
|
+
const originalOnError = transport.onerror;
|
|
50
|
+
transport.onerror = (error) => {
|
|
51
|
+
originalOnError?.(error);
|
|
52
|
+
if (!isParseOrSchemaError(error))
|
|
53
|
+
return;
|
|
54
|
+
sendInvalidRequest(transport);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=stdioGuards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdioGuards.js","sourceRoot":"","sources":["../../src/lib/stdioGuards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAQ/D,SAAS,uBAAuB,CAC9B,KAAc;IAEd,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,SAAS,GAAG,KAAK,CAAC;IACxB,OAAO,CACL,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,KAAK,UAAU;QACzD,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,UAAU,CACrD,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,SAAoC;IAC9D,KAAK,SAAS;SACX,IAAI,EAAE,CAAC;QACN,OAAO,EAAE,KAAK;QACd,EAAE,EAAE,IAAI;QACR,KAAK,EAAE;YACL,IAAI,EAAE,SAAS,CAAC,cAAc;YAC9B,OAAO,EAAE,iBAAiB;SAC3B;KACF,CAAC;SACD,KAAK,CAAC,GAAG,EA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|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type ThoughtType = 'analysis' | 'hypothesis' | 'verification' | 'revision' | 'conclusion';
|
|
2
|
+
export interface ThoughtData {
|
|
3
|
+
thought: string;
|
|
4
|
+
thoughtNumber: number;
|
|
5
|
+
totalThoughts: number;
|
|
6
|
+
nextThoughtNeeded: boolean;
|
|
7
|
+
isRevision?: boolean;
|
|
8
|
+
revisesThought?: number;
|
|
9
|
+
branchFromThought?: number;
|
|
10
|
+
branchId?: string;
|
|
11
|
+
thoughtType?: ThoughtType;
|
|
12
|
+
}
|
|
13
|
+
export interface StoredThought extends ThoughtData {
|
|
14
|
+
timestamp: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ContextSummary {
|
|
17
|
+
recentThoughts: {
|
|
18
|
+
number: number;
|
|
19
|
+
preview: string;
|
|
20
|
+
type?: ThoughtType;
|
|
21
|
+
}[];
|
|
22
|
+
currentBranch?: string;
|
|
23
|
+
hasRevisions: boolean;
|
|
24
|
+
}
|
|
25
|
+
export type ProcessResult = {
|
|
26
|
+
ok: true;
|
|
27
|
+
result: {
|
|
28
|
+
thoughtNumber: number;
|
|
29
|
+
totalThoughts: number;
|
|
30
|
+
nextThoughtNeeded: boolean;
|
|
31
|
+
thoughtHistoryLength: number;
|
|
32
|
+
branches: string[];
|
|
33
|
+
context: ContextSummary;
|
|
34
|
+
};
|
|
35
|
+
error?: never;
|
|
36
|
+
} | {
|
|
37
|
+
ok: false;
|
|
38
|
+
error: {
|
|
39
|
+
code: string;
|
|
40
|
+
message: string;
|
|
41
|
+
};
|
|
42
|
+
result?: never;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GACnB,UAAU,GACV,YAAY,GACZ,cAAc,GACd,UAAU,GACV,YAAY,CAAC;AAE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@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ThinkSeqInputSchema: z.ZodObject<{
|
|
3
|
+
thought: z.ZodString;
|
|
4
|
+
thoughtNumber: z.ZodNumber;
|
|
5
|
+
totalThoughts: z.ZodNumber;
|
|
6
|
+
nextThoughtNeeded: z.ZodBoolean;
|
|
7
|
+
isRevision: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
revisesThought: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
branchFromThought: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
branchId: z.ZodOptional<z.ZodString>;
|
|
11
|
+
thoughtType: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
analysis: "analysis";
|
|
13
|
+
hypothesis: "hypothesis";
|
|
14
|
+
verification: "verification";
|
|
15
|
+
revision: "revision";
|
|
16
|
+
conclusion: "conclusion";
|
|
17
|
+
}>>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
//# sourceMappingURL=inputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../src/schemas/inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;kBAsC9B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const ThinkSeqInputSchema = z.strictObject({
|
|
3
|
+
thought: z.string().min(1).max(50000).describe('Your current thinking step'),
|
|
4
|
+
thoughtNumber: z
|
|
5
|
+
.number()
|
|
6
|
+
.int()
|
|
7
|
+
.min(1)
|
|
8
|
+
.max(10000)
|
|
9
|
+
.describe('Current thought number in sequence'),
|
|
10
|
+
totalThoughts: z
|
|
11
|
+
.number()
|
|
12
|
+
.int()
|
|
13
|
+
.min(1)
|
|
14
|
+
.max(10000)
|
|
15
|
+
.describe('Estimated total thoughts needed (can adjust)'),
|
|
16
|
+
nextThoughtNeeded: z
|
|
17
|
+
.boolean()
|
|
18
|
+
.describe('Whether another thought step is needed'),
|
|
19
|
+
isRevision: z
|
|
20
|
+
.boolean()
|
|
21
|
+
.optional()
|
|
22
|
+
.describe('Whether this revises previous thinking'),
|
|
23
|
+
revisesThought: z
|
|
24
|
+
.number()
|
|
25
|
+
.int()
|
|
26
|
+
.min(1)
|
|
27
|
+
.optional()
|
|
28
|
+
.describe('Which thought number is being reconsidered'),
|
|
29
|
+
branchFromThought: z
|
|
30
|
+
.number()
|
|
31
|
+
.int()
|
|
32
|
+
.min(1)
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('Branching point thought number'),
|
|
35
|
+
branchId: z.string().min(1).max(100).optional().describe('Branch identifier'),
|
|
36
|
+
thoughtType: z
|
|
37
|
+
.enum(['analysis', 'hypothesis', 'verification', 'revision', 'conclusion'])
|
|
38
|
+
.optional()
|
|
39
|
+
.describe('Type of thinking step (helps with context selection)'),
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=inputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputs.js","sourceRoot":"","sources":["../../src/schemas/inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,YAAY,CAAC;IAChD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IAC5E,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,KAAK,CAAC;SACV,QAAQ,CAAC,oCAAoC,CAAC;IACjD,aAAa,EAAE,CAAC;SACb,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,KAAK,CAAC;SACV,QAAQ,CAAC,8CAA8C,CAAC;IAC3D,iBAAiB,EAAE,CAAC;SACjB,OAAO,EAAE;SACT,QAAQ,CAAC,wCAAwC,CAAC;IACrD,UAAU,EAAE,CAAC;SACV,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CAAC,wCAAwC,CAAC;IACrD,cAAc,EAAE,CAAC;SACd,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,4CAA4C,CAAC;IACzD,iBAAiB,EAAE,CAAC;SACjB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,gCAAgC,CAAC;IAC7C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAC7E,WAAW,EAAE,CAAC;SACX,IAAI,CAAC,CAAC,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;SAC1E,QAAQ,EAAE;SACV,QAAQ,CAAC,sDAAsD,CAAC;CACpE,CAAC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ThinkSeqOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
ok: z.ZodLiteral<true>;
|
|
4
|
+
result: z.ZodObject<{
|
|
5
|
+
thoughtNumber: z.ZodNumber;
|
|
6
|
+
totalThoughts: z.ZodNumber;
|
|
7
|
+
nextThoughtNeeded: z.ZodBoolean;
|
|
8
|
+
thoughtHistoryLength: z.ZodNumber;
|
|
9
|
+
branches: z.ZodArray<z.ZodString>;
|
|
10
|
+
context: z.ZodObject<{
|
|
11
|
+
recentThoughts: z.ZodArray<z.ZodObject<{
|
|
12
|
+
number: z.ZodNumber;
|
|
13
|
+
preview: z.ZodString;
|
|
14
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
analysis: "analysis";
|
|
16
|
+
hypothesis: "hypothesis";
|
|
17
|
+
verification: "verification";
|
|
18
|
+
revision: "revision";
|
|
19
|
+
conclusion: "conclusion";
|
|
20
|
+
}>>;
|
|
21
|
+
}, z.core.$strict>>;
|
|
22
|
+
currentBranch: z.ZodOptional<z.ZodString>;
|
|
23
|
+
hasRevisions: z.ZodBoolean;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
27
|
+
ok: z.ZodLiteral<false>;
|
|
28
|
+
error: z.ZodObject<{
|
|
29
|
+
code: z.ZodString;
|
|
30
|
+
message: z.ZodString;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
}, z.core.$strict>], "ok">;
|
|
33
|
+
//# sourceMappingURL=outputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputs.d.ts","sourceRoot":"","sources":["../../src/schemas/outputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsCxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAS/B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const ThoughtTypeSchema = z.enum([
|
|
3
|
+
'analysis',
|
|
4
|
+
'hypothesis',
|
|
5
|
+
'verification',
|
|
6
|
+
'revision',
|
|
7
|
+
'conclusion',
|
|
8
|
+
]);
|
|
9
|
+
const ContextSchema = z.strictObject({
|
|
10
|
+
recentThoughts: z
|
|
11
|
+
.array(z.strictObject({
|
|
12
|
+
number: z.number(),
|
|
13
|
+
preview: z.string(),
|
|
14
|
+
type: ThoughtTypeSchema.optional(),
|
|
15
|
+
}))
|
|
16
|
+
.max(5),
|
|
17
|
+
currentBranch: z.string().optional(),
|
|
18
|
+
hasRevisions: z.boolean(),
|
|
19
|
+
});
|
|
20
|
+
const ResultSchema = z.strictObject({
|
|
21
|
+
thoughtNumber: z.number(),
|
|
22
|
+
totalThoughts: z.number(),
|
|
23
|
+
nextThoughtNeeded: z.boolean(),
|
|
24
|
+
thoughtHistoryLength: z.number(),
|
|
25
|
+
branches: z.array(z.string()),
|
|
26
|
+
context: ContextSchema,
|
|
27
|
+
});
|
|
28
|
+
const ErrorSchema = z.strictObject({
|
|
29
|
+
code: z.string(),
|
|
30
|
+
message: z.string(),
|
|
31
|
+
});
|
|
32
|
+
export const ThinkSeqOutputSchema = z.discriminatedUnion('ok', [
|
|
33
|
+
z.strictObject({
|
|
34
|
+
ok: z.literal(true),
|
|
35
|
+
result: ResultSchema,
|
|
36
|
+
}),
|
|
37
|
+
z.strictObject({
|
|
38
|
+
ok: z.literal(false),
|
|
39
|
+
error: ErrorSchema,
|
|
40
|
+
}),
|
|
41
|
+
]);
|
|
42
|
+
//# sourceMappingURL=outputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputs.js","sourceRoot":"","sources":["../../src/schemas/outputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC/B,UAAU;IACV,YAAY;IACZ,cAAc;IACd,UAAU;IACV,YAAY;CACb,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,CAAC,YAAY,CAAC;IACnC,cAAc,EAAE,CAAC;SACd,KAAK,CACJ,CAAC,CAAC,YAAY,CAAC;QACb,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,iBAAiB,CAAC,QAAQ,EAAE;KACnC,CAAC,CACH;SACA,GAAG,CAAC,CAAC,CAAC;IACT,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE;CAC1B,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,CAAC,CAAC,YAAY,CAAC;IAClC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE;IAC9B,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE;IAChC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7B,OAAO,EAAE,aAAa;CACvB,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,CAAC,CAAC,YAAY,CAAC;IACjC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,kBAAkB,CAAC,IAAI,EAAE;IAC7D,CAAC,CAAC,YAAY,CAAC;QACb,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;QACnB,MAAM,EAAE,YAAY;KACrB,CAAC;IACF,CAAC,CAAC,YAAY,CAAC;QACb,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;QACpB,KAAK,EAAE,WAAW;KACnB,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { ThinkingEngine } from '../engine.js';
|
|
3
|
+
type ToolRegistrar = Pick<McpServer, 'registerTool'>;
|
|
4
|
+
type EngineLike = Pick<ThinkingEngine, 'processThought'>;
|
|
5
|
+
export declare function registerThinkSeq(server: ToolRegistrar, engine: EngineLike): void;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=thinkseq.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thinkseq.d.ts","sourceRoot":"","sources":["../../src/tools/thinkseq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAyBnD,KAAK,aAAa,GAAG,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AACrD,KAAK,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AAiCzD,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,UAAU,GACjB,IAAI,CAiCN"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { publishToolEvent } from '../lib/diagnostics.js';
|
|
2
|
+
import { createErrorResponse, getErrorMessage } from '../lib/errors.js';
|
|
3
|
+
import { ThinkSeqInputSchema } from '../schemas/inputs.js';
|
|
4
|
+
import { ThinkSeqOutputSchema } from '../schemas/outputs.js';
|
|
5
|
+
const THINKSEQ_TOOL_DEFINITION = {
|
|
6
|
+
title: 'Think Sequentially',
|
|
7
|
+
description: `Structured sequential thinking with branching and revision support.
|
|
8
|
+
|
|
9
|
+
Use for:
|
|
10
|
+
- Breaking down complex problems into steps
|
|
11
|
+
- Exploring alternative solution paths (branching)
|
|
12
|
+
- Revising earlier thinking based on new insights
|
|
13
|
+
|
|
14
|
+
Key parameters:
|
|
15
|
+
- thought: Current thinking step
|
|
16
|
+
- thoughtNumber: Step number (starts at 1)
|
|
17
|
+
- totalThoughts: Estimated total (adjustable)
|
|
18
|
+
- nextThoughtNeeded: false only when done`,
|
|
19
|
+
inputSchema: ThinkSeqInputSchema,
|
|
20
|
+
outputSchema: ThinkSeqOutputSchema,
|
|
21
|
+
};
|
|
22
|
+
function getContextFields(input) {
|
|
23
|
+
return {
|
|
24
|
+
...(input.isRevision !== undefined && { isRevision: input.isRevision }),
|
|
25
|
+
...(input.revisesThought !== undefined && {
|
|
26
|
+
revisesThought: input.revisesThought,
|
|
27
|
+
}),
|
|
28
|
+
...(input.thoughtType !== undefined && { thoughtType: input.thoughtType }),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function getBranchFields(input) {
|
|
32
|
+
return {
|
|
33
|
+
...(input.branchFromThought !== undefined && {
|
|
34
|
+
branchFromThought: input.branchFromThought,
|
|
35
|
+
}),
|
|
36
|
+
...(input.branchId !== undefined && { branchId: input.branchId }),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function normalizeThoughtInput(input) {
|
|
40
|
+
return {
|
|
41
|
+
thought: input.thought,
|
|
42
|
+
thoughtNumber: input.thoughtNumber,
|
|
43
|
+
totalThoughts: input.totalThoughts,
|
|
44
|
+
nextThoughtNeeded: input.nextThoughtNeeded,
|
|
45
|
+
...getContextFields(input),
|
|
46
|
+
...getBranchFields(input),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export function registerThinkSeq(server, engine) {
|
|
50
|
+
server.registerTool('thinkseq', THINKSEQ_TOOL_DEFINITION, (input) => {
|
|
51
|
+
const normalized = normalizeThoughtInput(input);
|
|
52
|
+
publishToolEvent({
|
|
53
|
+
type: 'tool.start',
|
|
54
|
+
tool: 'thinkseq',
|
|
55
|
+
ts: Date.now(),
|
|
56
|
+
});
|
|
57
|
+
try {
|
|
58
|
+
const result = engine.processThought(normalized);
|
|
59
|
+
publishToolEvent({
|
|
60
|
+
type: 'tool.end',
|
|
61
|
+
tool: 'thinkseq',
|
|
62
|
+
ts: Date.now(),
|
|
63
|
+
ok: true,
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
66
|
+
content: [{ type: 'text', text: JSON.stringify(result) }],
|
|
67
|
+
structuredContent: result,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
catch (err) {
|
|
71
|
+
const errorMessage = getErrorMessage(err);
|
|
72
|
+
publishToolEvent({
|
|
73
|
+
type: 'tool.end',
|
|
74
|
+
tool: 'thinkseq',
|
|
75
|
+
ts: Date.now(),
|
|
76
|
+
ok: false,
|
|
77
|
+
errorCode: 'E_THINK',
|
|
78
|
+
errorMessage,
|
|
79
|
+
});
|
|
80
|
+
return createErrorResponse('E_THINK', errorMessage);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=thinkseq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thinkseq.js","sourceRoot":"","sources":["../../src/tools/thinkseq.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,wBAAwB,GAAG;IAC/B,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE;;;;;;;;;;;0CAW2B;IACxC,WAAW,EAAE,mBAAmB;IAChC,YAAY,EAAE,oBAAoB;CACnC,CAAC;AAMF,SAAS,gBAAgB,CAAC,KAAoB;IAC5C,OAAO;QACL,GAAG,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;QACvE,GAAG,CAAC,KAAK,CAAC,cAAc,KAAK,SAAS,IAAI;YACxC,cAAc,EAAE,KAAK,CAAC,cAAc;SACrC,CAAC;QACF,GAAG,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,IAAI,EAAE,WAAW,EAAE,KAAK,CAAC,WAA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