@skaile/workspaces 1.14.0 → 1.14.1

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/bridge/drivers/claude-sdk.js +19 -2
  3. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  4. package/dist/bridge/drivers/codex.js +1 -1
  5. package/dist/bridge/drivers/continue.js +2 -2
  6. package/dist/bridge/drivers/echo.js +1 -1
  7. package/dist/bridge/drivers/gemini.js +3 -3
  8. package/dist/bridge/drivers/goose.js +2 -2
  9. package/dist/bridge/drivers/omp.js +1 -1
  10. package/dist/bridge/drivers/opencode.js +2 -2
  11. package/dist/bridge/drivers/qwen.js +3 -3
  12. package/dist/bridge/index.js +2 -2
  13. package/dist/bridge/src/drivers/claude-sdk.d.ts +6 -0
  14. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  15. package/dist/bridge/src/runtime.d.ts.map +1 -1
  16. package/dist/{chunk-Q44OUGYC.js → chunk-4RI4TNMO.js} +2 -2
  17. package/dist/{chunk-Q44OUGYC.js.map → chunk-4RI4TNMO.js.map} +1 -1
  18. package/dist/{chunk-6GFQ3GXI.js → chunk-CC6LFFTI.js} +4 -4
  19. package/dist/{chunk-6GFQ3GXI.js.map → chunk-CC6LFFTI.js.map} +1 -1
  20. package/dist/{chunk-7FXOOC7N.js → chunk-G73FOLLO.js} +4 -3
  21. package/dist/chunk-G73FOLLO.js.map +1 -0
  22. package/dist/{chunk-N3OB2YY6.js → chunk-HLIN4HRK.js} +2 -2
  23. package/dist/{chunk-N3OB2YY6.js.map → chunk-HLIN4HRK.js.map} +1 -1
  24. package/dist/{chunk-2PFS666T.js → chunk-NIZNN42B.js} +3 -3
  25. package/dist/{chunk-2PFS666T.js.map → chunk-NIZNN42B.js.map} +1 -1
  26. package/dist/{chunk-LMY6XW6P.js → chunk-ZWPXSHMW.js} +4 -4
  27. package/dist/{chunk-LMY6XW6P.js.map → chunk-ZWPXSHMW.js.map} +1 -1
  28. package/dist/cli/index.js +5 -5
  29. package/dist/factory-assets/connectors/flow/run-flow.js +1 -1
  30. package/dist/runner/index.js +3 -3
  31. package/dist/sdk/bridge.js +2 -2
  32. package/dist/sdk/index.js +3 -3
  33. package/dist/sdk/runner.js +3 -3
  34. package/dist/{setup-HN6POGOA.js → setup-TNHKXCBL.js} +4 -4
  35. package/dist/{setup-HN6POGOA.js.map → setup-TNHKXCBL.js.map} +1 -1
  36. package/dist/tui/index.js +3 -3
  37. package/package.json +1 -1
  38. package/dist/chunk-7FXOOC7N.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#438](https://github.com/skaile-ai/workspaces/pull/438) [`8a51750`](https://github.com/skaile-ai/workspaces/commit/8a51750facff4172852ba6ae49aa1158b0563e31) Thanks [@peteralbert](https://github.com/peteralbert)! - Fix a session deadlock when a free-text prompt arrives while `AskUserQuestion` is pending:
8
+ the Claude SDK driver now denies the question as superseded and waits for the paused turn to
9
+ unwind before starting the new one, instead of queueing the message behind a turn that can
10
+ never finish. `BridgeRuntime.reply()` now routes an answer into the paused turn (mirroring
11
+ the runner) rather than forwarding it as a prompt.
12
+
3
13
  ## 1.14.0
4
14
 
5
15
  ### Minor Changes
@@ -2,7 +2,7 @@ import { SUPPORTED_CLOUDS, buildClaudeCloudEnv } from '../../chunk-ISQWMBKD.js';
2
2
  import { dispatchCapability } from '../../chunk-RRVQAE5D.js';
3
3
  import { fetchProviderModels } from '../../chunk-BMQKMOQY.js';
4
4
  import { AuthError, classifyClaudeSdkError, reclassifyAuthAsAccountUnavailable, AccountUnavailableError } from '../../chunk-GAH4YRCI.js';
5
- import { BUILTIN_DRIVER_CATALOG, AgentDriver, getBridgeLogger } from '../../chunk-N3OB2YY6.js';
5
+ import { BUILTIN_DRIVER_CATALOG, AgentDriver, getBridgeLogger } from '../../chunk-HLIN4HRK.js';
6
6
  import '../../chunk-6E6PKKAD.js';
7
7
  import '../../chunk-JB35MVBN.js';
8
8
  import '../../chunk-NSBPE2FW.js';
@@ -347,6 +347,12 @@ var ClaudeSdkDriver = class extends AgentDriver {
347
347
  turnResolve = null;
348
348
  /** Rejects when the current turn errors. */
349
349
  turnReject = null;
350
+ /**
351
+ * The in-flight turn's promise, awaited when a new prompt supersedes a pending question.
352
+ * Deliberately outlives {@link completeTurn} / {@link failTurn} — only {@link prompt}'s
353
+ * `finally` clears it, and not on a retry recursion. Nulling it earlier reopens #436.
354
+ */
355
+ turnPromise = null;
350
356
  /** Guards against duplicate agent_end emissions per turn. */
351
357
  turnCompleted = false;
352
358
  /** `Date.now()` of the most recent SDK message — the watchdog's liveness signal. */
@@ -454,8 +460,16 @@ var ClaudeSdkDriver = class extends AgentDriver {
454
460
  * occurs after a container crash that prevented the SDK from flushing its session file.
455
461
  */
456
462
  async prompt(message, _budget = freshRetryBudget()) {
457
- this.authSelfHealUsed = _budget.auth;
458
463
  if (!this.sdk) await this.start();
464
+ if (this.pendingQuestion) {
465
+ this.denyPendingQuestion("superseded by a new prompt");
466
+ let awaited = null;
467
+ while (this.turnPromise && this.turnPromise !== awaited) {
468
+ awaited = this.turnPromise;
469
+ await awaited.catch(() => void 0);
470
+ }
471
+ }
472
+ this.authSelfHealUsed = _budget.auth;
459
473
  let retrying = false;
460
474
  const isFirstAttempt = !_budget.staleResume && !_budget.poison && !_budget.auth;
461
475
  if (isFirstAttempt) this._lastTokens = null;
@@ -468,6 +482,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
468
482
  this.turnResolve = resolve;
469
483
  this.turnReject = reject;
470
484
  });
485
+ this.turnPromise = turnPromise;
471
486
  try {
472
487
  if (this.query) {
473
488
  const userMsg = this.buildUserMessage(message);
@@ -478,6 +493,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
478
493
  } catch (err) {
479
494
  this.turnResolve = null;
480
495
  this.turnReject = null;
496
+ this.turnPromise = null;
481
497
  this.running = false;
482
498
  throw err;
483
499
  }
@@ -513,6 +529,7 @@ var ClaudeSdkDriver = class extends AgentDriver {
513
529
  this.disarmTurnStallWatchdog();
514
530
  this.turnResolve = null;
515
531
  this.turnReject = null;
532
+ this.turnPromise = null;
516
533
  this.running = false;
517
534
  }
518
535
  }