droid-mode 0.0.4 → 0.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "droid-mode",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Progressive Code-Mode MCP integration for Factory.ai Droid - access MCP tools without context bloat",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",
@@ -175,9 +175,12 @@ export async function executeWorkflow(opts) {
175
175
  }
176
176
 
177
177
  const resultPromise = Promise.resolve().then(() => sandbox.workflow());
178
+ let timeoutId;
178
179
  const timed = Promise.race([
179
- resultPromise,
180
- new Promise((_, reject) => setTimeout(() => reject(new Error(`Workflow timed out after ${timeoutMs}ms`)), timeoutMs)),
180
+ resultPromise.finally(() => clearTimeout(timeoutId)),
181
+ new Promise((_, reject) => {
182
+ timeoutId = setTimeout(() => reject(new Error(`Workflow timed out after ${timeoutMs}ms`)), timeoutMs);
183
+ }),
181
184
  ]);
182
185
 
183
186
  const result = await timed;