@gotza02/sequential-thinking 2026.1.28 → 2026.2.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.
package/README.md CHANGED
@@ -1,185 +1,155 @@
1
1
  # Sequential Thinking MCP Server
2
2
 
3
- An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process (Tree of Thoughts, Self-Reflexion).
3
+ MCP Server นี้ถูกออกแบบมาเพื่อช่วยให้ AI สามารถคิดวิเคราะห์แก้ปัญหาได้อย่างเป็นระบบ (Sequential Thinking) ผ่านกระบวนการคิดแบบทีละขั้นตอน (Step-by-step), การแตกแขนงความคิด (Tree of Thoughts) และการทบทวนตัวเอง (Self-Reflexion)
4
4
 
5
- ## Features
5
+ ## ฟีเจอร์หลัก (Features)
6
6
 
7
- - **Sequential Analysis**: Break down complex problems into manageable linear steps.
8
- - **Iterative Reasoning**: Think step-by-step in a structured manner, refining insights in loops.
9
- - **Tree of Thoughts**: Generate and evaluate multiple options, exploring Conservative, Balanced, and Aggressive strategies.
10
- - **Self-Critique**: Actively check for risks, biases, and potential errors in the thinking process.
11
- - **Branch Merging**: Synthesize and combine insights from multiple divergent reasoning paths.
12
- - **Hypothesis Testing**: Formulate specific hypotheses and verify them against evidence or logic.
13
- - **Option Evaluation**: Score and weigh different options (`evaluation`) to make informed decisions.
14
- - **Self-Reflexion**: Review and correct previous thoughts (`reflexion`) to improve accuracy.
15
- - **Dynamic Adjustment**: Adjust the total number of thoughts dynamically as understanding deepens.
7
+ - **การวิเคราะห์ตามลำดับ (Sequential Analysis)**: ย่อยปัญหาที่ซับซ้อนให้เป็นขั้นตอนย่อยๆ ที่จัดการได้ง่าย
8
+ - **การให้เหตุผลแบบวนซ้ำ (Iterative Reasoning)**: คิดทีละขั้นตอนอย่างมีโครงสร้าง และปรับปรุงผลลัพธ์ผ่านการวนรอบ
9
+ - **แตกแขนงความคิด (Tree of Thoughts)**: สร้างและประเมินทางเลือกหลายๆ ทาง (เช่น กลยุทธ์แบบระมัดระวัง, แบบสมดุล, หรือแบบกล้าเสี่ยง)
10
+ - **การวิจารณ์ตัวเอง (Self-Critique)**: ตรวจสอบความเสี่ยง ข้อผิดพลาด และอคติในกระบวนการคิดอย่างสม่ำเสมอ
11
+ - **รวมความคิด (Branch Merging)**: สังเคราะห์และรวบรวมข้อมูลเชิงลึกจากเส้นทางการคิดที่แตกต่างกัน
12
+ - **การทดสอบสมมติฐาน (Hypothesis Testing)**: ตั้งสมมติฐานและตรวจสอบความถูกต้องด้วยหลักฐานหรือตรรกะ
13
+ - **ประเมินทางเลือก (Option Evaluation)**: ให้คะแนนและชั่งน้ำหนักทางเลือกต่างๆ (`evaluation`) เพื่อช่วยตัดสินใจ
14
+ - **ทบทวนตัวเอง (Self-Reflexion)**: ย้อนกลับไปแก้ไขความคิดก่อนหน้า (`reflexion`) เพื่อปรับปรุงความแม่นยำ
15
+ - **ปรับเปลี่ยนแบบไดนามิก (Dynamic Adjustment)**: ปรับจำนวนขั้นตอนการคิดเพิ่มหรือลดได้ตามความเหมาะสมของสถานการณ์
16
16
 
17
- ## System Instruction for AI
17
+ ## คำแนะนำระบบสำหรับ AI (System Instruction)
18
18
 
19
- When connected to this server, you should follow these guidelines to maximize problem-solving effectiveness:
19
+ เมื่อเชื่อมต่อกับ Server นี้ AI ควรปฏิบัติตามแนวทางต่อไปนี้เพื่อให้แก้ปัญหาได้ดีที่สุด:
20
20
 
21
- 1. **Iterative Thinking**: Use the `sequentialthinking` tool for every complex task. Do not try to provide a final answer immediately. Instead, break the problem into steps, generate hypotheses, and evaluate them.
22
- 2. **Context Discovery**: Before modifying code, always use `build_project_graph` followed by `get_project_graph_summary` to understand the project architecture. Use `get_file_relationships` to see how specific files are connected.
23
- 3. **Fact Verification**: Use `web_search` to verify current facts, library versions, or documentation. Use `fetch` to retrieve raw data from external sources when needed.
24
- 4. **Local Execution**: Use `shell_execute` to run tests, linters, or build commands to verify your changes. Always read files using `read_file` before attempting to write or modify them.
25
- 5. **Persistence**: The thinking process is saved automatically. You can resume previous sessions by reviewing the `thoughts_history.json` file if needed.
21
+ 1. **การคิดแบบวนซ้ำ (Iterative Thinking)**: ใช้เครื่องมือ `sequentialthinking` สำหรับงานที่ซับซ้อน **อย่า** พยายามตอบทันที ให้แตกปัญหาเป็นขั้นตอน ตั้งสมมติฐาน และประเมินผล
22
+ 2. **สำรวจบริบท (Context Discovery)**: ก่อนแก้ไขโค้ด ให้ใช้ `build_project_graph` ตามด้วย `get_project_graph_summary` เพื่อเข้าใจโครงสร้างโปรเจกต์เสมอ และใช้ `get_file_relationships` เพื่อดูความสัมพันธ์ของไฟล์
23
+ 3. **ตรวจสอบข้อเท็จจริง (Fact Verification)**: ใช้ `web_search` เพื่อตรวจสอบข้อมูลล่าสุด, เวอร์ชั่นของ Library หรือเอกสาร และใช้ `fetch` เพื่อดึงข้อมูลดิบเมื่อจำเป็น
24
+ 4. **รันคำสั่ง (Local Execution)**: ใช้ `shell_execute` เพื่อรัน Test, Linter หรือ Build เพื่อตรวจสอบความถูกต้องของการแก้ไข อ่านไฟล์ด้วย `read_file` ก่อนเขียนทับเสมอ
25
+ 5. **ความต่อเนื่อง (Persistence)**: กระบวนการคิดจะถูกบันทึกอัตโนมัติ หากทำงานค้างไว้ สามารถย้อนกลับมาดูไฟล์ `thoughts_history.json` ได้
26
26
 
27
- ## Detailed Tool Guide
27
+ ## คู่มือการใช้งานเครื่องมือ (Detailed Tool Guide)
28
28
 
29
- ### 🧠 Cognitive Tools
29
+ ### 🧠 เครื่องมือช่วยคิด (Cognitive Tools)
30
30
 
31
31
  #### `sequentialthinking`
32
- The core engine for structured problem-solving. It forces a step-by-step analysis before arriving at a conclusion.
32
+ หัวใจหลักสำหรับการแก้ปัญหาอย่างมีโครงสร้าง บังคับให้คิดวิเคราะห์ทีละขั้นตอนก่อนจะสรุปผล
33
33
 
34
34
  **Inputs:**
35
- - `thought` (string, required): The content of the current thinking step.
36
- - `thoughtNumber` (integer, required): Current step number (starts at 1).
37
- - `totalThoughts` (integer, required): Estimated total steps needed (can be adjusted dynamically).
38
- - `nextThoughtNeeded` (boolean, required): `true` if you need to think more, `false` only when the final answer is ready.
39
- - `thoughtType` (enum): The nature of the thought:
40
- - `analysis`: Breaking down the problem.
41
- - `generation`: Brainstorming solutions.
42
- - `evaluation`: Weighing options (use with `score`).
43
- - `reflexion`: Reviewing previous thoughts (use with `isRevision`).
44
- - `selection`: Choosing a path.
45
- - `isRevision` (boolean): Set to `true` if you are correcting a previous mistake.
46
- - `revisesThought` (integer): The thought number you are fixing.
47
- - `branchFromThought` (integer): The parent thought number if creating a new reasoning branch.
48
- - `branchId` (string): A name for the new branch.
49
-
50
- **Best Practice:** Use this for ANY non-trivial task. Don't just answer; think first.
35
+ - `thought` (string, required): เนื้อหาของความคิดในขั้นตอนนี้
36
+ - `thoughtNumber` (integer, required): ลำดับขั้นตอนปัจจุบัน (เริ่มที่ 1)
37
+ - `totalThoughts` (integer, required): จำนวนขั้นตอนที่คาดว่าจะใช้ (ปรับเปลี่ยนได้ตลอด)
38
+ - `nextThoughtNeeded` (boolean, required): `true` ถ้าต้องคิดต่อ, `false` เมื่อได้คำตอบสุดท้ายแล้ว
39
+ - `thoughtType` (enum): ประเภทของความคิด:
40
+ - `analysis`: วิเคราะห์แยกแยะปัญหา
41
+ - `generation`: ระดมสมองหาทางออก
42
+ - `evaluation`: ประเมินทางเลือก (ใช้คู่กับ `score`)
43
+ - `reflexion`: ทบทวนความคิดก่อนหน้า (ใช้คู่กับ `isRevision`)
44
+ - `selection`: เลือกเส้นทางที่จะไปต่อ
45
+ - `isRevision` (boolean): `true` ถ้ากำลังแก้ไขข้อผิดพลาดก่อนหน้า
46
+ - `revisesThought` (integer): ระบุหมายเลขขั้นตอนที่กำลังแก้ไข
47
+ - `branchFromThought` (integer): หมายเลขขั้นตอนแม่ ถ้าต้องการแตกกิ่งความคิดใหม่
48
+ - `branchId` (string): ชื่อระบุของกิ่งความคิดนั้น (Branch ID)
49
+
50
+ **ข้อแนะนำ:** ใช้เครื่องมือนี้กับงานทุกอย่างที่ไม่ใช่คำถามพื้นฐาน อย่าเพิ่งรีบตอบ ให้คิดก่อน
51
51
 
52
52
  #### `clear_thought_history`
53
- Clears the stored thinking history. Use this to start fresh or free up context.
53
+ ล้างประวัติการคิดทั้งหมด ใช้เมื่อต้องการเริ่มงานใหม่หรือเคลียร์ Context
54
54
 
55
55
  #### `summarize_history`
56
- Compresses multiple thoughts into a single summary thought. This is essential for long reasoning chains to save token context while preserving the core insights.
56
+ ย่อรวมความคิดหลายๆ ขั้นตอนให้เป็นสรุปเดียว จำเป็นมากสำหรับการคิดที่ยาวนาน เพื่อประหยัด Token
57
57
 
58
58
  **Inputs:**
59
- - `startIndex` (integer): Start of the range to summarize.
60
- - `endIndex` (integer): End of the range to summarize.
61
- - `summary` (string): The summary text that replaces the range.
59
+ - `startIndex` (integer): จุดเริ่มต้นที่จะสรุป
60
+ - `endIndex` (integer): จุดสิ้นสุดที่จะสรุป
61
+ - `summary` (string): ข้อความสรุป
62
62
 
63
- ### 🌐 External Knowledge
63
+ ### 🌐 ความรู้ภายนอก (External Knowledge)
64
64
 
65
65
  #### `web_search`
66
- Retrieves real-time information from the internet.
66
+ ค้นหาข้อมูลแบบ Real-time จากอินเทอร์เน็ต
67
67
 
68
68
  **Inputs:**
69
- - `query` (string, required): What you want to find.
69
+ - `query` (string, required): คำค้นหา
70
70
  - `provider` (enum, optional):
71
- - `brave`: General web search (Requires `BRAVE_API_KEY`).
72
- - `exa`: AI-optimized search for deep content (Requires `EXA_API_KEY`).
73
- - `google`: Google Custom Search (Requires `GOOGLE_SEARCH_API_KEY` & `GOOGLE_SEARCH_CX`).
71
+ - `brave`: ค้นหาเว็บทั่วไป (ต้องมี `BRAVE_API_KEY`)
72
+ - `exa`: ค้นหาเชิงลึกด้วย AI (ต้องมี `EXA_API_KEY`)
73
+ - `google`: Google Custom Search (ต้องมี `GOOGLE_SEARCH_API_KEY` & `GOOGLE_SEARCH_CX`)
74
74
 
75
75
  #### `fetch`
76
- Performs a direct HTTP request to a URL. Useful for getting raw HTML, JSON, or text from a specific source found via search.
76
+ ดึงข้อมูล HTTP Request จาก URL โดยตรง มีประโยชน์มากสำหรับดึง HTML, JSON หรือ Text จากแหล่งข้อมูลที่เจอผ่าน Search
77
77
 
78
78
  **Inputs:**
79
- - `url` (string, required): The target URL.
80
- - `method`: `GET` (default), `POST`, `PUT`, `DELETE`.
81
- - `headers`: JSON object for headers (e.g., `{"Authorization": "Bearer..."}`).
82
- - `body`: Request body for POST/PUT.
79
+ - `url` (string, required): URL เป้าหมาย
80
+ - `method`: `GET` (default), `POST`, `PUT`, `DELETE`
81
+ - `headers`: JSON Object สำหรับ Headers
82
+ - `body`: Request Body สำหรับ POST/PUT
83
83
 
84
84
  #### `read_webpage`
85
- Reads a webpage and converts it to clean Markdown, removing ads and navigation. Great for reading articles or documentation to save tokens.
85
+ อ่านหน้าเว็บและแปลงเป็น Markdown ที่สะอาด (ตัดโฆษณาและเมนูออก) เหมาะสำหรับอ่านบทความหรือ Document เพื่อประหยัด Token
86
86
 
87
87
  **Inputs:**
88
- - `url` (string, required): The URL to read.
88
+ - `url` (string, required): URL ที่จะอ่าน
89
89
 
90
- ### 🏗 Codebase Intelligence
90
+ ### 🏗 ความฉลาดด้านโค้ด (Codebase Intelligence)
91
91
 
92
92
  #### `build_project_graph`
93
- **RUN THIS FIRST** when entering a new project. It scans the directory and builds a map of file dependencies using TypeScript AST analysis. Now also extracts **exported symbols** (Functions, Classes, Variables) to provide deeper structural insight.
93
+ **รันคำสั่งนี้เป็นอันดับแรก** เมื่อเริ่มโปรเจกต์ใหม่ มันจะสแกนโฟลเดอร์และสร้างแผนผังความสัมพันธ์ (Dependency Graph) โดยใช้ TypeScript AST Analysis รวมถึงดึงข้อมูล **Exported Symbols** (Functions, Classes, Variables) ออกมาด้วย
94
94
 
95
95
  **Inputs:**
96
- - `path` (string, optional): Root directory (defaults to `.`).
96
+ - `path` (string, optional): โฟลเดอร์ราก (Default คือ `.`)
97
97
 
98
98
  #### `get_project_graph_summary`
99
- Returns high-level stats: total files and the top 5 most-referenced files. Use this to identify the "core" modules of the application.
99
+ ดูภาพรวมโครงสร้างโปรเจกต์และไฟล์ที่ถูกอ้างอิงถึงบ่อยที่สุด
100
100
 
101
- #### `get_file_relationships`
102
- Zoom in on a specific file to see its context.
101
+ #### `get_project_graph_visualization`
102
+ สร้าง Mermaid Diagram String แสดงความสัมพันธ์ของไฟล์ในโปรเจกต์ สามารถนำไปแสดงผลใน Markdown Viewer ได้
103
103
 
104
- **Inputs:**
105
- - `filePath` (string, required): Path to the file (e.g., `src/index.ts`).
106
- **Returns:**
107
- - `imports`: What this file needs.
108
- - `importedBy`: Who relies on this file.
109
-
110
- #### `search_code`
111
- Searches for a text pattern across all code files in the project. Useful for finding usage examples or specific logic.
112
-
113
- **Inputs:**
114
- - `pattern` (string, required): Text to search for.
115
- - `path` (string, optional): Root directory (defaults to `.`).
116
-
117
- ### 🛠 System Operations
104
+ ### 🛠 การจัดการระบบ (System Operations)
118
105
 
119
106
  #### `read_file`
120
- Reads the content of a file. Always read a file before editing it to ensure you have the latest context.
107
+ อ่านเนื้อหาไฟล์ **ควรอ่านไฟล์ก่อนแก้ไขเสมอ**
121
108
 
122
109
  **Inputs:**
123
- - `path` (string, required): File path.
110
+ - `path` (string, required): Path ของไฟล์
124
111
 
125
112
  #### `write_file`
126
- Creates or overwrites a file.
113
+ สร้างหรือเขียนทับไฟล์
127
114
 
128
115
  **Inputs:**
129
- - `path` (string, required): File path.
130
- - `content` (string, required): The full content to write.
116
+ - `path` (string, required): Path ของไฟล์
117
+ - `content` (string, required): เนื้อหาที่จะเขียน
131
118
 
132
- #### `shell_execute`
133
- Executes a shell command. Use for running tests (`npm test`), building (`npm run build`), or file operations (`ls`, `mkdir`).
119
+ #### `edit_file`
120
+ แก้ไขข้อความบางส่วนในไฟล์ (Search & Replace) เหมาะสำหรับการแก้ไขจุดเล็กๆ โดยไม่ต้องเขียนทับทั้งไฟล์
134
121
 
135
122
  **Inputs:**
136
- - `command` (string, required): The command line string.
137
- **Warning:** Use with caution. Avoid commands that might delete data or expose secrets.
138
-
139
- ## Recommended System Instruction
140
-
141
- To optimize your AI agent's performance with these tools, we recommend adding the following instructions to its system prompt:
123
+ - `path` (string, required): Path ของไฟล์
124
+ - `oldText` (string, required): ข้อความเดิมที่ต้องการเปลี่ยน (ต้องตรงเป๊ะ)
125
+ - `newText` (string, required): ข้อความใหม่
126
+ - `allowMultiple` (boolean, optional): อนุญาตให้เปลี่ยนหลายจุดพร้อมกัน (Default: false)
142
127
 
143
- ```text
144
- # Tools & Workflow
128
+ #### `manage_notes`
129
+ จัดการความจำระยะยาว (Long-term Memory) / บันทึกช่วยจำ ใช้เก็บข้อมูลสำคัญ กฎ หรือสิ่งที่เรียนรู้เพื่อให้จำได้ข้าม Session
145
130
 
146
- 1. **Core Reasoning (`sequentialthinking`)**
147
- * **Mandatory Step:** For any complex query, bug fix, or feature request, you MUST start by using the `sequentialthinking` tool.
148
- * **Methodology:** Break the problem down. If your first hypothesis fails, use the tool again to revise your plan (`isRevision: true`).
149
- * **Goal:** Do not output code or final answers until you have a clear, verified plan.
150
-
151
- 2. **Codebase Navigation**
152
- * **Initial Scan:** On start, run `build_project_graph`.
153
- * **Context:** Before reading a file, check its context with `get_file_relationships`. This prevents "hallucinating" imports or breaking existing dependencies.
154
-
155
- 3. **External Verification**
156
- * **Docs & Facts:** If you need to use a library you aren't 100% sure about, use `web_search` to check the documentation.
157
-
158
- 4. **Safety & Persistence**
159
- * **Files:** Always `read_file` before `write_file`.
160
- * **History:** Your thoughts are saved. If you get stuck, review your previous thoughts.
161
- ```
162
-
163
- ## Usage
131
+ **Inputs:**
132
+ - `action` (enum, required): 'add', 'list', 'search', 'update', 'delete'
133
+ - `title` (string): หัวข้อ
134
+ - `content` (string): เนื้อหา
135
+ - `tags` (array): แท็กจัดหมวดหมู่
136
+ - `searchQuery` (string): คำค้นหา (สำหรับ action: search)
137
+ - `noteId` (string): ID ของโน้ต (สำหรับ update/delete)
164
138
 
165
- The Sequential Thinking tool is designed for:
166
- - Breaking down complex problems into steps
167
- - Planning and design with room for revision
168
- - Analysis that might need course correction
169
- - Problems where the full scope might not be clear initially
170
- - Tasks that need to maintain context over multiple steps
171
- - Situations where irrelevant information needs to be filtered out
139
+ #### `shell_execute`
140
+ รันคำสั่ง Shell (เช่น `npm test`, `npm run build`, `ls`)
141
+ **คำเตือน:** ใช้ด้วยความระมัดระวัง หลีกเลี่ยงคำสั่งที่ลบข้อมูลหรือเปิดเผยความลับ
172
142
 
173
- ## Configuration
143
+ ## การตั้งค่า (Configuration)
174
144
 
175
145
  ### Environment Variables
176
- - `THOUGHT_DELAY_MS`: (Optional) Milliseconds to wait before processing each thought. Default: `0`.
177
- - `DISABLE_THOUGHT_LOGGING`: (Optional) Set to `true` to hide colored logs.
178
- - `THOUGHTS_STORAGE_PATH`: (Optional) Path to history file. Default: `thoughts_history.json`.
146
+ - `THOUGHT_DELAY_MS`: (Optional) เวลาหน่วง (ms) ก่อนประมวลผลความคิดถัดไป เพื่อป้องกัน Rate Limit (Default: `0`)
147
+ - `DISABLE_THOUGHT_LOGGING`: (Optional) ตั้งเป็น `true` เพื่อปิดการแสดงผล Log สีสวยงาม
148
+ - `THOUGHTS_STORAGE_PATH`: (Optional) Path ของไฟล์ประวัติการคิด (Default: `thoughts_history.json`)
179
149
 
180
- ### Usage with Claude Desktop
150
+ ### การใช้งานกับ Claude Desktop
181
151
 
182
- Add this to your `claude_desktop_config.json`. You can configure API keys directly here:
152
+ เพิ่ม Config นี้ใน `claude_desktop_config.json`:
183
153
 
184
154
  #### npx
185
155
 
@@ -203,81 +173,53 @@ Add this to your `claude_desktop_config.json`. You can configure API keys direct
203
173
  }
204
174
  ```
205
175
 
206
- ### Usage with VS Code
176
+ ### การติดตั้งกับ VS Code
207
177
 
208
- For quick installation, click one of the installation buttons below...
178
+ คลิกปุ่มด้านล่างเพื่อติดตั้งด่วน...
209
179
 
210
180
  [![Install with NPX in VS Code](https://img.shields.io/badge/VS_Code-NPM-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=sequentialthinking&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40gotza02%2Fsequential-thinking%22%5D%7D)
211
181
 
212
- ## Building
182
+ ## การ Build และ Test
213
183
 
214
184
  ```bash
215
185
  npm install
216
186
  npm run build
217
187
  ```
218
188
 
219
- ## Testing
220
-
221
189
  ```bash
222
190
  npm test
223
191
  ```
224
192
 
225
- ## Recent Updates (v2026.1.28)
226
- - **Robustness**:
227
- - Implemented **Atomic Writes** for `thoughts_history.json` to prevent file corruption.
228
- - Added **Internal Locking** to handle concurrent save requests gracefully.
229
- - Added **API Retry Logic** with exponential backoff for all search and web tools (handles HTTP 429/5xx).
230
- - Improved HTTP requests with browser-like headers (User-Agent) to reduce blocking.
231
- - **New Tools**:
232
- - `summarize_history`: Archive and condense long reasoning chains.
233
- - **Graph Enhancements**:
234
- - Added **Symbol Extraction**: The project graph now tracks exported functions, classes, and variables.
235
-
236
- ## Recent Updates (v2026.1.27)
237
- - **New Tools**:
238
- - `read_webpage`: Convert webpages to Markdown for efficient reading.
239
- - `search_code`: Recursive text search in code files.
240
- - `clear_thought_history`: Reset the thinking process.
241
-
242
- ## Recent Updates (v2026.1.26)
243
-
244
- - **Rate Limiting**:
245
- - Added `THOUGHT_DELAY_MS` environment variable to introduce a delay between thought steps. This helps prevent request flooding and rate limit issues.
246
-
247
- ## Recent Updates (v2026.1.24)
248
-
249
- - **Bug Fixes**:
250
- - Fixed `get_file_relationships` to correctly resolve absolute imports and imports from project root (e.g., `src/utils`), ensuring the dependency graph is complete for projects using path aliases or absolute paths.
193
+ ## ประวัติการอัปเดต (Recent Updates)
251
194
 
252
- ## Recent Updates (v2026.1.22)
195
+ ### v2026.2.0 (Latest)
196
+ - **Refactoring**: ปรับโครงสร้างโค้ดครั้งใหญ่ แยกการทำงานเป็นโมดูล (`src/tools/`) เพื่อให้อ่านง่ายและรองรับการขยายตัวในอนาคต
253
197
 
254
- - **Environment Variables**:
255
- - Renamed Google Search environment variables to `GOOGLE_SEARCH_API_KEY` and `GOOGLE_SEARCH_CX` to avoid conflicts and improve clarity.
256
-
257
- ## Recent Updates (v2026.1.21)
258
-
259
- - **Performance & Accuracy**:
260
- - Replaced Regex-based code analysis with **TypeScript Compiler API (AST)** for 100% accurate import/export detection.
261
- - Improved `web_search` robustness and error handling.
262
- - **Persistence**:
263
- - Implemented **File-based Persistence** for the thinking process. Your thoughts are now saved to `thoughts_history.json` automatically.
264
- - Switched to **Asynchronous File I/O** to prevent server blocking.
265
- - **Bug Fixes**:
266
- - Fixed duplicate import entries in the project graph.
267
- - Resolved memory growth issues in long-running sessions.
198
+ ### v2026.1.31
199
+ - **New Tools**:
200
+ - `manage_notes`: ระบบความจำระยะยาวสำหรับเก็บข้อมูลข้าม Session
268
201
 
269
- ## Recent Updates (v2026.1.20)
202
+ ### v2026.1.30
203
+ - **New Tools**:
204
+ - `get_project_graph_visualization`: สร้าง Mermaid Diagram แสดงโครงสร้างโปรเจกต์
270
205
 
271
- - **New Features**:
272
- - Added support for **Google Custom Search** in the `web_search` tool. (Requires `GOOGLE_API_KEY` and `GOOGLE_CX`).
206
+ ### v2026.1.29
207
+ - **New Tools**:
208
+ - `edit_file`: แก้ไขไฟล์เฉพาะจุดโดยไม่ต้องเขียนทับทั้งหมด
273
209
 
274
- ## Recent Updates (v2026.1.18)
210
+ ### v2026.1.28
211
+ - **Robustness**:
212
+ - เพิ่ม **Atomic Writes** สำหรับ `thoughts_history.json` ป้องกันไฟล์เสีย
213
+ - เพิ่ม **API Retry Logic** (Exponential Backoff) สำหรับเครื่องมือ Web Search ทั้งหมด
214
+ - **New Tools**:
215
+ - `summarize_history`: ย่อประวัติการคิด
275
216
 
276
- - **Bug Fixes**:
277
- - Fixed an issue where commented-out imports were incorrectly parsed by the graph analyzer.
278
- - Resolved a branching logic issue where branch IDs could collide.
279
- - Fixed version mismatch between package.json and server instance.
217
+ ### v2026.1.27
218
+ - **New Tools**:
219
+ - `read_webpage`: อ่านหน้าเว็บเป็น Markdown
220
+ - `search_code`: ค้นหาข้อความในไฟล์โค้ดแบบ Recursive
221
+ - `clear_thought_history`: ล้างประวัติการคิด
280
222
 
281
223
  ## License
282
224
 
283
- This MCP server is licensed under the MIT License.
225
+ MIT License
package/dist/graph.js CHANGED
@@ -186,4 +186,29 @@ export class ProjectKnowledgeGraph {
186
186
  }))
187
187
  };
188
188
  }
189
+ toMermaid() {
190
+ const lines = ['graph TD'];
191
+ const fileToId = new Map();
192
+ let idCounter = 0;
193
+ // Assign IDs
194
+ for (const [filePath, _] of this.nodes) {
195
+ const relative = path.relative(this.rootDir, filePath);
196
+ const id = `N${idCounter++}`;
197
+ fileToId.set(filePath, id);
198
+ // Escape quotes in label
199
+ const label = relative.replace(/"/g, "'");
200
+ lines.push(` ${id}["${label}"]`);
201
+ }
202
+ // Add Edges
203
+ for (const [filePath, node] of this.nodes) {
204
+ const sourceId = fileToId.get(filePath);
205
+ for (const importPath of node.imports) {
206
+ const targetId = fileToId.get(importPath);
207
+ if (sourceId && targetId) {
208
+ lines.push(` ${sourceId} --> ${targetId}`);
209
+ }
210
+ }
211
+ }
212
+ return lines.join('\\n');
213
+ }
189
214
  }
File without changes
File without changes