@ponythewhite/base-context 1.0.8 → 1.0.10

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 (50) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/base-context-runtime/pyproject.toml +1 -1
  3. package/dist/base-context-runtime/uv.lock +1 -1
  4. package/dist/build-info.json +1 -1
  5. package/dist/bundle/{bundled-modules-IGMJH2MU.js → bundled-modules-MX6YNAM2.js} +2 -2
  6. package/dist/bundle/{chunk-EXEFSSF4.js → chunk-CDXQNS5P.js} +176 -37
  7. package/dist/bundle/{chunk-RVJVXZCS.js → chunk-UHLGPYMI.js} +20 -40
  8. package/dist/bundle/{cli-main-BUK7QTHO.js → cli-main-D7W3WWCV.js} +2 -2
  9. package/dist/bundle/cli.js +1 -1
  10. package/dist/bundle/{main-2FWHT2WZ.js → main-5J3QBZ5Y.js} +2 -2
  11. package/dist/core/agent-session.d.ts +3 -0
  12. package/dist/core/agent-session.d.ts.map +1 -1
  13. package/dist/core/agent-session.js +48 -5
  14. package/dist/core/agent-session.js.map +1 -1
  15. package/dist/core/canonical-context.d.ts.map +1 -1
  16. package/dist/core/canonical-context.js +115 -30
  17. package/dist/core/canonical-context.js.map +1 -1
  18. package/dist/core/context-epoch.d.ts +14 -3
  19. package/dist/core/context-epoch.d.ts.map +1 -1
  20. package/dist/core/context-epoch.js +5 -1
  21. package/dist/core/context-epoch.js.map +1 -1
  22. package/dist/core/inference-coordinator.d.ts +1 -1
  23. package/dist/core/inference-coordinator.d.ts.map +1 -1
  24. package/dist/core/inference-coordinator.js +2 -2
  25. package/dist/core/inference-coordinator.js.map +1 -1
  26. package/dist/core/public-context.d.ts.map +1 -1
  27. package/dist/core/public-context.js +20 -8
  28. package/dist/core/public-context.js.map +1 -1
  29. package/dist/core/request-view-selection.d.ts +4 -2
  30. package/dist/core/request-view-selection.d.ts.map +1 -1
  31. package/dist/core/request-view-selection.js +7 -4
  32. package/dist/core/request-view-selection.js.map +1 -1
  33. package/dist/core/session-manager.d.ts +2 -0
  34. package/dist/core/session-manager.d.ts.map +1 -1
  35. package/dist/core/session-manager.js +38 -13
  36. package/dist/core/session-manager.js.map +1 -1
  37. package/dist/modes/daemon/daemon-mode.d.ts.map +1 -1
  38. package/dist/modes/daemon/daemon-mode.js +15 -30
  39. package/dist/modes/daemon/daemon-mode.js.map +1 -1
  40. package/dist/modes/daemon/daemon-socket.d.ts +5 -0
  41. package/dist/modes/daemon/daemon-socket.d.ts.map +1 -1
  42. package/dist/modes/daemon/daemon-socket.js +19 -0
  43. package/dist/modes/daemon/daemon-socket.js.map +1 -1
  44. package/dist/modes/daemon/daemon-supervisor.d.ts.map +1 -1
  45. package/dist/modes/daemon/daemon-supervisor.js +6 -7
  46. package/dist/modes/daemon/daemon-supervisor.js.map +1 -1
  47. package/dist/modes/daemon/daemon-worker-client.d.ts.map +1 -1
  48. package/dist/modes/daemon/daemon-worker-client.js +5 -5
  49. package/dist/modes/daemon/daemon-worker-client.js.map +1 -1
  50. package/package.json +4 -4
@@ -32,7 +32,7 @@ import { DaemonRlmCapacityCoordinator } from "./daemon-rlm-capacity-coordinator.
32
32
  import { getDaemonRuntimeIdentity } from "./daemon-runtime-identity.js";
33
33
  import { matchesSessionIdSuffix } from "./daemon-session-id.js";
34
34
  import { classifySessionRosterStatus, isEvictableEmptySessionSummary, isSessionSummaryBusy, summaryForInactiveSession, } from "./daemon-session-list.js";
35
- import { acquireDaemonSocketPathLease, cleanupDaemonSocketPath, defaultDaemonSocketDir, defaultDaemonSocketPath, getDaemonSocketIdentity, normalizeSocketPath, prepareDaemonSocketPath, restrictDaemonSocketPath, } from "./daemon-socket.js";
35
+ import { acquireDaemonSocketPathLease, cleanupDaemonSocketPath, closeDaemonServer, defaultDaemonSocketDir, defaultDaemonSocketPath, getDaemonSocketIdentity, normalizeSocketPath, prepareDaemonSocketPath, restrictDaemonSocketPath, } from "./daemon-socket.js";
36
36
  import { acquireDaemonSupervisorOwnership, isDaemonShutdownAdmissionActive, waitForDaemonStartupFence, } from "./daemon-supervisor-ownership.js";
37
37
  import { DaemonWorkerAuthenticationError, DaemonWorkerClient, DaemonWorkerCompatibilityError, DaemonWorkerProbeTimeoutError, } from "./daemon-worker-client.js";
38
38
  import { DAEMON_WORKER_ACTIVE_SESSION_ID_ENV, DAEMON_WORKER_INSTANCE_ID_ENV, DAEMON_WORKER_PEER_TRANSPORT_CAPABILITY, DAEMON_WORKER_RECOVERY_JOURNAL_ENV, DAEMON_WORKER_ROLE_ENV, DAEMON_WORKER_ROSTER_CAPABILITY, DAEMON_WORKER_STARTUP_GATE_COMMIT, DAEMON_WORKER_STARTUP_GATE_FD_ENV, DAEMON_WORKER_SUPERVISOR_SOCKET_ENV, DAEMON_WORKER_TOKEN_ENV, durableDaemonCreateCommand, durableDaemonWorkerDescriptor, isDaemonRlmCapacitySnapshot, ROSTER_HEARTBEAT_INTERVAL_MS, SESSION_LEASE_OWNER_ID_ENV, SESSION_LEASES_ENABLED_ENV, } from "./daemon-worker-protocol.js";
@@ -1498,7 +1498,10 @@ export class DaemonSupervisor {
1498
1498
  this.write(client, failure(command.id, command.type, "Daemon is preparing an update restart"));
1499
1499
  return;
1500
1500
  }
1501
- if (mutation && !UPDATE_RESTART_DRAIN_COMMANDS.has(command.type)) {
1501
+ // Releasing an existing pause can unblock a mutation that eviction is draining.
1502
+ if (mutation &&
1503
+ command.type !== "release_session_input_pause" &&
1504
+ !UPDATE_RESTART_DRAIN_COMMANDS.has(command.type)) {
1502
1505
  const idleEvictionFence = this.idleEvictionFence;
1503
1506
  if (idleEvictionFence) {
1504
1507
  await idleEvictionFence;
@@ -6358,11 +6361,7 @@ export class DaemonSupervisor {
6358
6361
  }
6359
6362
  }
6360
6363
  await this.catalog.stop();
6361
- for (const client of this.clients) {
6362
- client.detachInput();
6363
- client.socket.end();
6364
- }
6365
- await new Promise((resolveClose) => this.server?.close(() => resolveClose()) ?? resolveClose());
6364
+ await closeDaemonServer(this.server, this.clients);
6366
6365
  await this.runCleanupStep("daemon socket", () => this.cleanupSocket());
6367
6366
  await this.runCleanupStep("supervisor cache", () => {
6368
6367
  rmSync(this.snapshotCacheRoot, { recursive: true, force: true });