mixdog 0.7.5 → 0.7.7

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 (35) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +18 -0
  3. package/README.md +18 -0
  4. package/hooks/hooks.json +6 -6
  5. package/hooks/session-start.cjs +73 -2
  6. package/hooks/shim-launcher.cjs +51 -0
  7. package/native/prebuilt/linux-aarch64/mixdog-shim +0 -0
  8. package/native/prebuilt/linux-x86_64/mixdog-shim +0 -0
  9. package/native/prebuilt/macos-aarch64/mixdog-shim +0 -0
  10. package/native/prebuilt/macos-x86_64/mixdog-shim +0 -0
  11. package/native/prebuilt/windows-x86_64/mixdog-shim.exe +0 -0
  12. package/package.json +2 -2
  13. package/scripts/bootstrap.mjs +5 -59
  14. package/scripts/ensure-deps.mjs +259 -0
  15. package/scripts/resolve-bun.mjs +60 -0
  16. package/scripts/run-mcp.mjs +13 -168
  17. package/setup/install.mjs +220 -22
  18. package/setup/launch.mjs +0 -0
  19. package/setup/locate-claude.mjs +38 -0
  20. package/setup/mixdog-cli.mjs +95 -0
  21. package/setup/setup-server.mjs +50 -2
  22. package/setup/setup.html +26 -12
  23. package/setup/tui.mjs +606 -0
  24. package/setup/wizard.mjs +220 -151
  25. package/src/agent/bridge-stall-watchdog.mjs +2 -2
  26. package/src/agent/index.mjs +3 -3
  27. package/src/agent/orchestrator/providers/anthropic-oauth.mjs +139 -0
  28. package/src/agent/orchestrator/providers/openai-oauth.mjs +96 -0
  29. package/src/agent/orchestrator/session/manager.mjs +5 -3
  30. package/src/agent/orchestrator/session/store.mjs +9 -1
  31. package/src/channels/lib/runtime-paths.mjs +112 -74
  32. package/src/memory/index.mjs +30 -7
  33. package/src/memory/lib/pg/supervisor.mjs +12 -12
  34. package/src/shared/atomic-file.mjs +16 -0
  35. package/src/status/aggregator.mjs +3 -3
@@ -192,7 +192,6 @@ const RUNNING_STALL_MS = 10 * 60 * 1000;
192
192
  // unrelated statuslines during spawn/claim races.
193
193
  function isSessionRunning(s, { hbMap, now, ownerSessionId, clientHostPid, ownerHostPid, includeClosedGrace = true }) {
194
194
  if (s.owner !== 'bridge') return false;
195
- if (!matchesOwnerSession(s, ownerSessionId)) return false;
196
195
  const isSharedBackground = s.role && SHARED_BACKGROUND_ROLES.has(s.role);
197
196
  // Scoping unit differs by role kind (invariant, not a fallback):
198
197
  // - Maintenance/background roles (cycle1/2/3-agent, scheduler-task,
@@ -210,6 +209,7 @@ function isSessionRunning(s, { hbMap, now, ownerSessionId, clientHostPid, ownerH
210
209
  // per-terminal clientHostPid and stay strictly isolated to the
211
210
  // terminal that spawned them.
212
211
  if (isSharedBackground) {
212
+ if (!matchesOwnerSession(s, ownerSessionId)) return false;
213
213
  if (ownerHostPid && clientHostPid && clientHostPid !== ownerHostPid) return false;
214
214
  } else if (!matchesClientHostPid(s, clientHostPid)) {
215
215
  return false;
@@ -236,10 +236,10 @@ function isSessionRunning(s, { hbMap, now, ownerSessionId, clientHostPid, ownerH
236
236
  // sessions/ entirely, so they fall out of allSessions and vanish from L2 with
237
237
  // no extra logic here. We surface the surviving idle workers (greyed) so the
238
238
  // user can see a worker is parked-but-present, distinct from RUNNING.
239
- // Maintenance/background roles are excluded — only owner-scoped user workers.
239
+ // Maintenance/background roles are excluded — user workers scoped by clientHostPid only
240
+ // (ownerSessionId is volatile across daemon restarts; clientHostPid is per-terminal SSOT).
240
241
  function isIdleWorkerSession(s, { ownerSessionId, clientHostPid }) {
241
242
  if (s.owner !== 'bridge') return false;
242
- if (!matchesOwnerSession(s, ownerSessionId)) return false;
243
243
  if (!matchesClientHostPid(s, clientHostPid)) return false;
244
244
  if (s.closed === true) return false; // closed → handled by closed-grace / lastCompleted
245
245
  if (s.role && SHARED_BACKGROUND_ROLES.has(s.role)) return false; // maintenance, not a user worker