@trops/dash-core 0.1.513 → 0.1.514

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/dist/index.js CHANGED
@@ -29404,6 +29404,17 @@ var pendingConnects$1 = new Map();
29404
29404
  // Map<`${workspaceId}::${serverName}`, Promise<result>>
29405
29405
 
29406
29406
  var NO_WORKSPACE = "__no_workspace__";
29407
+
29408
+ /**
29409
+ * Renderer-side timeout for `callTool`. MUST exceed
29410
+ * `electron/mcp/jitConsent.js`'s `DEFAULT_TIMEOUT_MS` (60_000) so that
29411
+ * an in-flight JIT consent prompt can resolve before this Promise
29412
+ * rejects. Pre-fix value (30_000) caused the renderer to error out
29413
+ * mid-prompt — even on user approval the widget had already failed.
29414
+ * 90_000 = 60s main JIT timeout + 30s slack for IPC roundtrip,
29415
+ * grant write, and gate re-evaluation.
29416
+ */
29417
+ var CALL_TOOL_TIMEOUT_MS = 90000;
29407
29418
  function rendererStateKey(workspaceId, serverName) {
29408
29419
  var wid = workspaceId && typeof workspaceId === "string" ? workspaceId : NO_WORKSPACE;
29409
29420
  return wid + "::" + serverName;
@@ -30003,8 +30014,8 @@ var useMcpProvider = function useMcpProvider(providerType) {
30003
30014
  widgetIdForGate = (widgetData === null || widgetData === void 0 ? void 0 : widgetData.name) || null;
30004
30015
  return _context3.abrupt("return", new Promise(function (resolve, reject) {
30005
30016
  var timeout = setTimeout(function () {
30006
- reject(new Error("Tool call \"".concat(toolName, "\" timed out after 30s")));
30007
- }, 30000);
30017
+ reject(new Error("Tool call \"".concat(toolName, "\" timed out after ").concat(CALL_TOOL_TIMEOUT_MS, "ms")));
30018
+ }, CALL_TOOL_TIMEOUT_MS);
30008
30019
  dashApi.mcpCallTool(selectedProviderName, toolName, args, effectiveAllowedTools, function (event, result) {
30009
30020
  clearTimeout(timeout);
30010
30021
  if (result.error) {