ai-whisper 0.4.1 → 0.4.2

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 (2) hide show
  1. package/dist/bin/whisper.js +11 -15
  2. package/package.json +3 -3
@@ -4758,7 +4758,7 @@ function acquireCaptureLease(db, collabId, pid, options = {}) {
4758
4758
  acquired_at = excluded.acquired_at`).run(LEASE_ID, collabId, pid, acquiredAt);
4759
4759
  return true;
4760
4760
  });
4761
- return tx();
4761
+ return tx.immediate();
4762
4762
  }
4763
4763
  function releaseCaptureLease(db, collabId) {
4764
4764
  const tx = db.transaction(() => {
@@ -10183,12 +10183,16 @@ async function captureHandbackText(input) {
10183
10183
  let acquired = false;
10184
10184
  const deadline = Date.now() + acquireMaxWaitMs;
10185
10185
  for (; ; ) {
10186
- acquired = acquireCaptureLease(
10187
- input.db,
10188
- input.collabId,
10189
- input.pid,
10190
- input.leaseOptions
10191
- );
10186
+ try {
10187
+ acquired = acquireCaptureLease(
10188
+ input.db,
10189
+ input.collabId,
10190
+ input.pid,
10191
+ input.leaseOptions
10192
+ );
10193
+ } catch {
10194
+ acquired = false;
10195
+ }
10192
10196
  if (acquired) break;
10193
10197
  if (Date.now() >= deadline) break;
10194
10198
  await sleep3(acquireBackoffMs);
@@ -10563,14 +10567,6 @@ function createMountSessionRuntime(input) {
10563
10567
  pid: process.pid,
10564
10568
  turnText,
10565
10569
  readChangeCount,
10566
- // TEMP 2026-05-29: bump lease poll-acquire from default 4s to 30s
10567
- // to absorb concurrent-collab contention while we land the proper
10568
- // fix (per-provider capture strategies, design doc Phase 2). The
10569
- // auto-handback already waits ≥30s grace + however long the
10570
- // provider takes to idle, so an extra 0–30s of lease wait is
10571
- // invisible. Revert once mount restart / per-provider strategy
10572
- // removes the host-global single-lease bottleneck.
10573
- acquireMaxWaitMs: 3e4,
10574
10570
  runCapture: () => captureClipboardHandback({
10575
10571
  triggerCopy: () => submitInjectedInput2("/copy"),
10576
10572
  // Some provider versions show a picker after /copy (e.g. Claude
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-whisper",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Terminal-first relay for paired AI coding agents (Claude + Codex), driven by structured workflows.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -46,10 +46,10 @@
46
46
  "@types/react": "^19.2.14",
47
47
  "ink-testing-library": "^4.0.0",
48
48
  "@ai-whisper/adapter-claude": "0.0.0",
49
- "@ai-whisper/adapter-codex": "0.0.0",
50
49
  "@ai-whisper/companion-core": "0.0.0",
50
+ "@ai-whisper/broker": "0.0.0",
51
51
  "@ai-whisper/shared": "0.0.0",
52
- "@ai-whisper/broker": "0.0.0"
52
+ "@ai-whisper/adapter-codex": "0.0.0"
53
53
  },
54
54
  "files": [
55
55
  "dist",