@wemake.cx/sequential-thinking 0.2.12 → 0.4.0

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.
@@ -1,2 +1,82 @@
1
1
  #!/usr/bin/env bun
2
- declare module "src/index" { }
2
+ declare module "src/mcp/tools" {
3
+ import { Tool } from "@modelcontextprotocol/sdk/types.js";
4
+ export const SEQUENTIAL_THINKING_TOOL: Tool;
5
+ }
6
+ declare module "src/core/types" {
7
+ export interface ThoughtData {
8
+ thought: string;
9
+ thoughtNumber: number;
10
+ totalThoughts: number;
11
+ isRevision?: boolean | undefined;
12
+ revisesThought?: number | undefined;
13
+ branchFromThought?: number | undefined;
14
+ branchId?: string | undefined;
15
+ needsMoreThoughts?: boolean | undefined;
16
+ nextThoughtNeeded: boolean;
17
+ }
18
+ export interface ThinkingProcessResult {
19
+ content: Array<{
20
+ type: "text";
21
+ text: string;
22
+ }>;
23
+ isError?: boolean;
24
+ [key: string]: unknown;
25
+ }
26
+ }
27
+ declare module "src/core/formatter" {
28
+ import { ThoughtData } from "src/core/types";
29
+ export function formatThought(thoughtData: ThoughtData): string;
30
+ }
31
+ declare module "src/core/tracker" {
32
+ import { ThoughtData, ThinkingProcessResult } from "src/core/types";
33
+ export class SequentialThinkingTracker {
34
+ private thoughtHistory;
35
+ private branches;
36
+ private disableThoughtLogging;
37
+ constructor();
38
+ validateThoughtData(input: unknown): ThoughtData;
39
+ processThought(input: unknown): ThinkingProcessResult;
40
+ }
41
+ }
42
+ declare module "src/codemode/index" {
43
+ import { ThoughtData, ThinkingProcessResult } from "src/core/types";
44
+ /**
45
+ * Sequential Thinking Code Mode API.
46
+ *
47
+ * This class exposes the Sequential Thinking capabilities as a strictly-typed
48
+ * TypeScript API, allowing LLMs to write code that interacts directly with
49
+ * the thinking process.
50
+ */
51
+ export class SequentialThinking {
52
+ private tracker;
53
+ constructor();
54
+ /**
55
+ * Process a thought in the sequential thinking process.
56
+ *
57
+ * @param input - The thought data to process.
58
+ * @returns The result of the thinking process.
59
+ */
60
+ think(input: ThoughtData): ThinkingProcessResult;
61
+ }
62
+ }
63
+ declare module "src/mcp/server" {
64
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
65
+ /**
66
+ * Factory function that creates and configures a sequential thinking MCP server instance.
67
+ *
68
+ * This function initializes a Server with the name "sequential-thinking-server" and version "0.4.0",
69
+ * registers the SEQUENTIAL_THINKING_TOOL, and sets up request handlers.
70
+ *
71
+ * @returns A configured Server instance ready for MCP communication
72
+ */
73
+ export default function createServer(): Server;
74
+ }
75
+ declare module "src/index" {
76
+ import createServer from "src/mcp/server";
77
+ export default createServer;
78
+ export { SequentialThinking } from "src/codemode/index";
79
+ }
80
+ declare module "tests/codemode/api.test" {}
81
+ declare module "tests/core/tracker.test" {}
82
+ declare module "tests/mcp/server.test" {}
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "name": "@wemake.cx/sequential-thinking",
3
- "version": "0.2.12",
3
+ "version": "0.4.0",
4
4
  "description": "MCP server for sequential thinking and problem solving",
5
5
  "license": "MIT",
6
- "type": "module",
7
6
  "main": "./dist/index.js",
8
7
  "exports": "./dist/index.js",
9
8
  "types": "./dist/types/index.d.ts",
10
9
  "repository": {
11
10
  "type": "git",
12
- "url": "https://github.com/WeMake-AI/mcp.git",
13
- "directory": "src/sequential-reasoning"
11
+ "url": "git+https://github.com/WeMake-Labs/mcp.git",
12
+ "directory": "src/sequential-thinking"
14
13
  },
15
14
  "publishConfig": {
16
15
  "access": "public",
@@ -19,10 +18,12 @@
19
18
  "engines": {
20
19
  "bun": ">=1.3.0"
21
20
  },
22
- "homepage": "https://github.com/WeMake-AI/mcp/tree/main/src/sequential-thinking",
23
- "author": "heyFlorentin",
21
+ "bugs": {
22
+ "url": "https://github.com/WeMake-Labs/mcp/issues"
23
+ },
24
+ "homepage": "https://github.com/WeMake-Labs/mcp/tree/main/src/sequential-thinking",
25
+ "author": "Phichayut 'Florentin' Sakwiset <florentin@wemake.cx> (https://github.com/heyFlorentin)",
24
26
  "keywords": [
25
- "model-context-protocol",
26
27
  "sequential-thinking"
27
28
  ],
28
29
  "bin": {
@@ -32,12 +33,9 @@
32
33
  "dist"
33
34
  ],
34
35
  "scripts": {
35
- "clean": "rm -rf dist",
36
- "build": "bun build ./src/index.ts --outdir='./dist' --target='bun' --sourcemap='linked' && tsc",
36
+ "build": "bun build ./src/index.ts --outdir='./dist' --target='bun' && tsc",
37
37
  "start": "bun run ./dist/index.js",
38
- "prepare": "bun run build",
39
- "watch": "bun build ./src/index.ts --outdir='./dist' --target='bun' --sourcemap='linked' --watch",
40
- "publish": "bun publish"
38
+ "test": "bun test"
41
39
  },
42
40
  "dependencies": {
43
41
  "@modelcontextprotocol/sdk": "^1.17.4",