@gotza02/sequential-thinking 2026.2.45 → 2026.2.46

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.
@@ -74,11 +74,11 @@ If you have tried to fix the same problem 3 times and failed:
74
74
  2. Do not attempt a 4th fix in the same chain.
75
75
  3. Branch back to the analysis phase before the first fix attempt.`, {
76
76
  thought: z.string().describe("Your current thinking step"),
77
- thoughtType: z.enum([
77
+ thoughtType: z.preprocess((val) => (typeof val === 'string' && val.toLowerCase() === 'reflection' ? 'reflexion' : val), z.enum([
78
78
  'analysis', 'planning', 'execution', 'observation',
79
79
  'hypothesis', 'reflexion', 'solution',
80
80
  'generation', 'evaluation', 'selection'
81
- ]).describe("The structural role of this thought (see THOUGHT TYPES above)"),
81
+ ])).describe("The structural role of this thought (see THOUGHT TYPES above)"),
82
82
  thoughtNumber: z.number().int().min(1).describe("Current thought number (e.g., 1, 2, 3)"),
83
83
  totalThoughts: z.number().int().min(1).describe("Estimated total thoughts needed (can be adjusted)"),
84
84
  nextThoughtNeeded: z.boolean().optional().default(true).describe("True if more thinking/action is needed"),
package/dist/utils.js CHANGED
@@ -136,9 +136,14 @@ function validateCommand(command) {
136
136
  * @throws Error if command contains shell metacharacters or is not whitelisted
137
137
  */
138
138
  export function execAsync(command, options = {}) {
139
- // Validate command for security
140
- validateCommand(command);
141
139
  return new Promise((resolve, reject) => {
140
+ try {
141
+ // Validate command for security
142
+ validateCommand(command);
143
+ }
144
+ catch (error) {
145
+ return reject(error);
146
+ }
142
147
  const timeout = options.timeout || 60000; // Default 60s timeout
143
148
  const maxBuffer = options.maxBuffer || 1024 * 1024 * 5; // Default 5MB buffer
144
149
  // Parse command into parts
@@ -213,7 +218,7 @@ export function validatePath(requestedPath) {
213
218
  absolutePath = resolvedPath;
214
219
  rootDir = path.resolve(process.cwd());
215
220
  }
216
- if (!absolutePath.startsWith(rootDir)) {
221
+ if (!absolutePath.startsWith(rootDir) || (absolutePath.length > rootDir.length && absolutePath[rootDir.length] !== path.sep)) {
217
222
  throw new Error(`Access denied: Path '${requestedPath}' (resolved to '${absolutePath}') is outside the project root '${rootDir}'.`);
218
223
  }
219
224
  return absolutePath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gotza02/sequential-thinking",
3
- "version": "2026.2.45",
3
+ "version": "2026.2.46",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },