lorenz 0.1.4 → 0.1.6

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 (249) hide show
  1. package/README.md +83 -20
  2. package/RELEASE-MANIFEST.json +6 -1
  3. package/node_modules/@lorenz/agent-sdk/dist/index.d.ts +1 -0
  4. package/node_modules/@lorenz/agent-sdk/dist/index.d.ts.map +1 -1
  5. package/node_modules/@lorenz/agent-sdk/dist/index.js +1 -0
  6. package/node_modules/@lorenz/agent-sdk/dist/index.js.map +1 -1
  7. package/node_modules/@lorenz/agent-sdk/dist/module.d.ts +38 -0
  8. package/node_modules/@lorenz/agent-sdk/dist/module.d.ts.map +1 -0
  9. package/node_modules/@lorenz/agent-sdk/dist/module.js +41 -0
  10. package/node_modules/@lorenz/agent-sdk/dist/module.js.map +1 -0
  11. package/node_modules/@lorenz/cli/dist/agentExecutorLoader.d.ts +30 -0
  12. package/node_modules/@lorenz/cli/dist/agentExecutorLoader.d.ts.map +1 -0
  13. package/node_modules/@lorenz/cli/dist/agentExecutorLoader.js +63 -0
  14. package/node_modules/@lorenz/cli/dist/agentExecutorLoader.js.map +1 -0
  15. package/node_modules/@lorenz/cli/dist/daemon.d.ts +42 -19
  16. package/node_modules/@lorenz/cli/dist/daemon.d.ts.map +1 -1
  17. package/node_modules/@lorenz/cli/dist/daemon.js +72 -23
  18. package/node_modules/@lorenz/cli/dist/daemon.js.map +1 -1
  19. package/node_modules/@lorenz/cli/dist/daemonLock.d.ts +59 -0
  20. package/node_modules/@lorenz/cli/dist/daemonLock.d.ts.map +1 -0
  21. package/node_modules/@lorenz/cli/dist/daemonLock.js +304 -0
  22. package/node_modules/@lorenz/cli/dist/daemonLock.js.map +1 -0
  23. package/node_modules/@lorenz/cli/dist/daemonStatus.d.ts +16 -0
  24. package/node_modules/@lorenz/cli/dist/daemonStatus.d.ts.map +1 -0
  25. package/node_modules/@lorenz/cli/dist/daemonStatus.js +21 -0
  26. package/node_modules/@lorenz/cli/dist/daemonStatus.js.map +1 -0
  27. package/node_modules/@lorenz/cli/dist/doctor.d.ts +6 -0
  28. package/node_modules/@lorenz/cli/dist/doctor.d.ts.map +1 -1
  29. package/node_modules/@lorenz/cli/dist/doctor.js +39 -2
  30. package/node_modules/@lorenz/cli/dist/doctor.js.map +1 -1
  31. package/node_modules/@lorenz/cli/dist/extensionLoader.d.ts +126 -0
  32. package/node_modules/@lorenz/cli/dist/extensionLoader.d.ts.map +1 -0
  33. package/node_modules/@lorenz/cli/dist/extensionLoader.js +187 -0
  34. package/node_modules/@lorenz/cli/dist/extensionLoader.js.map +1 -0
  35. package/node_modules/@lorenz/cli/dist/flags-manifest.d.ts +42 -0
  36. package/node_modules/@lorenz/cli/dist/flags-manifest.d.ts.map +1 -0
  37. package/node_modules/@lorenz/cli/dist/flags-manifest.js +67 -0
  38. package/node_modules/@lorenz/cli/dist/flags-manifest.js.map +1 -0
  39. package/node_modules/@lorenz/cli/dist/index.d.ts +6 -0
  40. package/node_modules/@lorenz/cli/dist/index.d.ts.map +1 -1
  41. package/node_modules/@lorenz/cli/dist/index.js +4 -0
  42. package/node_modules/@lorenz/cli/dist/index.js.map +1 -1
  43. package/node_modules/@lorenz/cli/dist/leadershipStore.d.ts +42 -0
  44. package/node_modules/@lorenz/cli/dist/leadershipStore.d.ts.map +1 -0
  45. package/node_modules/@lorenz/cli/dist/leadershipStore.js +2 -0
  46. package/node_modules/@lorenz/cli/dist/leadershipStore.js.map +1 -0
  47. package/node_modules/@lorenz/cli/dist/main.d.ts +11 -7
  48. package/node_modules/@lorenz/cli/dist/main.d.ts.map +1 -1
  49. package/node_modules/@lorenz/cli/dist/main.js +58 -8
  50. package/node_modules/@lorenz/cli/dist/main.js.map +1 -1
  51. package/node_modules/@lorenz/cli/dist/toolLoader.d.ts +28 -0
  52. package/node_modules/@lorenz/cli/dist/toolLoader.d.ts.map +1 -0
  53. package/node_modules/@lorenz/cli/dist/toolLoader.js +62 -0
  54. package/node_modules/@lorenz/cli/dist/toolLoader.js.map +1 -0
  55. package/node_modules/@lorenz/cli/dist/trackerLoader.d.ts +24 -0
  56. package/node_modules/@lorenz/cli/dist/trackerLoader.d.ts.map +1 -0
  57. package/node_modules/@lorenz/cli/dist/trackerLoader.js +34 -0
  58. package/node_modules/@lorenz/cli/dist/trackerLoader.js.map +1 -0
  59. package/node_modules/@lorenz/cli/dist/workerDriverLoader.d.ts +15 -55
  60. package/node_modules/@lorenz/cli/dist/workerDriverLoader.d.ts.map +1 -1
  61. package/node_modules/@lorenz/cli/dist/workerDriverLoader.js +26 -203
  62. package/node_modules/@lorenz/cli/dist/workerDriverLoader.js.map +1 -1
  63. package/node_modules/@lorenz/cli/package.json +1 -0
  64. package/node_modules/@lorenz/config/dist/index.d.ts +1 -1
  65. package/node_modules/@lorenz/config/dist/index.d.ts.map +1 -1
  66. package/node_modules/@lorenz/config/dist/index.js +1 -1
  67. package/node_modules/@lorenz/config/dist/index.js.map +1 -1
  68. package/node_modules/@lorenz/config/dist/parse.d.ts +17 -0
  69. package/node_modules/@lorenz/config/dist/parse.d.ts.map +1 -1
  70. package/node_modules/@lorenz/config/dist/parse.js +107 -11
  71. package/node_modules/@lorenz/config/dist/parse.js.map +1 -1
  72. package/node_modules/@lorenz/config/dist/schemas.d.ts +0 -2
  73. package/node_modules/@lorenz/config/dist/schemas.d.ts.map +1 -1
  74. package/node_modules/@lorenz/config/dist/schemas.js +5 -1
  75. package/node_modules/@lorenz/config/dist/schemas.js.map +1 -1
  76. package/node_modules/@lorenz/dispatch-coordinator/dist/coordinator.d.ts +55 -21
  77. package/node_modules/@lorenz/dispatch-coordinator/dist/coordinator.d.ts.map +1 -1
  78. package/node_modules/@lorenz/dispatch-coordinator/dist/coordinator.js +187 -82
  79. package/node_modules/@lorenz/dispatch-coordinator/dist/coordinator.js.map +1 -1
  80. package/node_modules/@lorenz/dispatch-coordinator/dist/gate.d.ts +6 -4
  81. package/node_modules/@lorenz/dispatch-coordinator/dist/gate.d.ts.map +1 -1
  82. package/node_modules/@lorenz/dispatch-coordinator/dist/gate.js +9 -6
  83. package/node_modules/@lorenz/dispatch-coordinator/dist/gate.js.map +1 -1
  84. package/node_modules/@lorenz/dispatch-coordinator/dist/index.d.ts +1 -1
  85. package/node_modules/@lorenz/dispatch-coordinator/dist/index.d.ts.map +1 -1
  86. package/node_modules/@lorenz/dispatch-coordinator/dist/index.js +5 -6
  87. package/node_modules/@lorenz/dispatch-coordinator/dist/index.js.map +1 -1
  88. package/node_modules/@lorenz/dispatch-coordinator/dist/mcpEndpointManager.d.ts +7 -5
  89. package/node_modules/@lorenz/dispatch-coordinator/dist/mcpEndpointManager.d.ts.map +1 -1
  90. package/node_modules/@lorenz/dispatch-coordinator/dist/mcpEndpointManager.js +12 -10
  91. package/node_modules/@lorenz/dispatch-coordinator/dist/mcpEndpointManager.js.map +1 -1
  92. package/node_modules/@lorenz/dispatch-coordinator/dist/nullEndpointManager.d.ts +11 -10
  93. package/node_modules/@lorenz/dispatch-coordinator/dist/nullEndpointManager.d.ts.map +1 -1
  94. package/node_modules/@lorenz/dispatch-coordinator/dist/nullEndpointManager.js +15 -22
  95. package/node_modules/@lorenz/dispatch-coordinator/dist/nullEndpointManager.js.map +1 -1
  96. package/node_modules/@lorenz/dispatch-coordinator/dist/types.d.ts +16 -15
  97. package/node_modules/@lorenz/dispatch-coordinator/dist/types.d.ts.map +1 -1
  98. package/node_modules/@lorenz/dispatch-coordinator/dist/types.js +6 -7
  99. package/node_modules/@lorenz/dispatch-coordinator/dist/types.js.map +1 -1
  100. package/node_modules/@lorenz/domain/dist/index.d.ts +75 -9
  101. package/node_modules/@lorenz/domain/dist/index.d.ts.map +1 -1
  102. package/node_modules/@lorenz/domain/dist/index.js +40 -0
  103. package/node_modules/@lorenz/domain/dist/index.js.map +1 -1
  104. package/node_modules/@lorenz/flags/dist/coerce.d.ts +12 -0
  105. package/node_modules/@lorenz/flags/dist/coerce.d.ts.map +1 -0
  106. package/node_modules/@lorenz/flags/dist/coerce.js +44 -0
  107. package/node_modules/@lorenz/flags/dist/coerce.js.map +1 -0
  108. package/node_modules/@lorenz/flags/dist/default.d.ts +6 -0
  109. package/node_modules/@lorenz/flags/dist/default.d.ts.map +1 -0
  110. package/node_modules/@lorenz/flags/dist/default.js +22 -0
  111. package/node_modules/@lorenz/flags/dist/default.js.map +1 -0
  112. package/node_modules/@lorenz/flags/dist/deprecations.d.ts +20 -0
  113. package/node_modules/@lorenz/flags/dist/deprecations.d.ts.map +1 -0
  114. package/node_modules/@lorenz/flags/dist/deprecations.js +42 -0
  115. package/node_modules/@lorenz/flags/dist/deprecations.js.map +1 -0
  116. package/node_modules/@lorenz/flags/dist/env.d.ts +17 -0
  117. package/node_modules/@lorenz/flags/dist/env.d.ts.map +1 -0
  118. package/node_modules/@lorenz/flags/dist/env.js +90 -0
  119. package/node_modules/@lorenz/flags/dist/env.js.map +1 -0
  120. package/node_modules/@lorenz/flags/dist/errors.d.ts +22 -0
  121. package/node_modules/@lorenz/flags/dist/errors.d.ts.map +1 -0
  122. package/node_modules/@lorenz/flags/dist/errors.js +61 -0
  123. package/node_modules/@lorenz/flags/dist/errors.js.map +1 -0
  124. package/node_modules/@lorenz/flags/dist/index.d.ts +8 -0
  125. package/node_modules/@lorenz/flags/dist/index.d.ts.map +1 -0
  126. package/node_modules/@lorenz/flags/dist/index.js +11 -0
  127. package/node_modules/@lorenz/flags/dist/index.js.map +1 -0
  128. package/node_modules/@lorenz/flags/dist/keys.d.ts +6 -0
  129. package/node_modules/@lorenz/flags/dist/keys.d.ts.map +1 -0
  130. package/node_modules/@lorenz/flags/dist/keys.js +15 -0
  131. package/node_modules/@lorenz/flags/dist/keys.js.map +1 -0
  132. package/node_modules/@lorenz/flags/dist/layers.d.ts +14 -0
  133. package/node_modules/@lorenz/flags/dist/layers.d.ts.map +1 -0
  134. package/node_modules/@lorenz/flags/dist/layers.js +107 -0
  135. package/node_modules/@lorenz/flags/dist/layers.js.map +1 -0
  136. package/node_modules/@lorenz/flags/dist/manifest.d.ts +71 -0
  137. package/node_modules/@lorenz/flags/dist/manifest.d.ts.map +1 -0
  138. package/node_modules/@lorenz/flags/dist/manifest.js +137 -0
  139. package/node_modules/@lorenz/flags/dist/manifest.js.map +1 -0
  140. package/node_modules/@lorenz/flags/dist/resolve.d.ts +8 -0
  141. package/node_modules/@lorenz/flags/dist/resolve.d.ts.map +1 -0
  142. package/node_modules/@lorenz/flags/dist/resolve.js +178 -0
  143. package/node_modules/@lorenz/flags/dist/resolve.js.map +1 -0
  144. package/node_modules/@lorenz/flags/dist/testing.d.ts +19 -0
  145. package/node_modules/@lorenz/flags/dist/testing.d.ts.map +1 -0
  146. package/node_modules/@lorenz/flags/dist/testing.js +68 -0
  147. package/node_modules/@lorenz/flags/dist/testing.js.map +1 -0
  148. package/node_modules/@lorenz/flags/dist/types.d.ts +93 -0
  149. package/node_modules/@lorenz/flags/dist/types.d.ts.map +1 -0
  150. package/node_modules/@lorenz/flags/dist/types.js +2 -0
  151. package/node_modules/@lorenz/flags/dist/types.js.map +1 -0
  152. package/node_modules/@lorenz/flags/package.json +16 -0
  153. package/node_modules/@lorenz/mcp/dist/agentEndpoint.d.ts +16 -3
  154. package/node_modules/@lorenz/mcp/dist/agentEndpoint.d.ts.map +1 -1
  155. package/node_modules/@lorenz/mcp/dist/agentEndpoint.js +105 -17
  156. package/node_modules/@lorenz/mcp/dist/agentEndpoint.js.map +1 -1
  157. package/node_modules/@lorenz/mcp/dist/auth.d.ts +88 -0
  158. package/node_modules/@lorenz/mcp/dist/auth.d.ts.map +1 -1
  159. package/node_modules/@lorenz/mcp/dist/auth.js +53 -0
  160. package/node_modules/@lorenz/mcp/dist/auth.js.map +1 -1
  161. package/node_modules/@lorenz/mcp/dist/index.d.ts +3 -2
  162. package/node_modules/@lorenz/mcp/dist/index.d.ts.map +1 -1
  163. package/node_modules/@lorenz/mcp/dist/index.js +1 -1
  164. package/node_modules/@lorenz/mcp/dist/index.js.map +1 -1
  165. package/node_modules/@lorenz/mcp/dist/server.d.ts +22 -0
  166. package/node_modules/@lorenz/mcp/dist/server.d.ts.map +1 -1
  167. package/node_modules/@lorenz/mcp/dist/server.js +85 -12
  168. package/node_modules/@lorenz/mcp/dist/server.js.map +1 -1
  169. package/node_modules/@lorenz/orchestrator/dist/claimStore.d.ts +157 -0
  170. package/node_modules/@lorenz/orchestrator/dist/claimStore.d.ts.map +1 -0
  171. package/node_modules/@lorenz/orchestrator/dist/claimStore.js +621 -0
  172. package/node_modules/@lorenz/orchestrator/dist/claimStore.js.map +1 -0
  173. package/node_modules/@lorenz/orchestrator/dist/codec.d.ts +38 -0
  174. package/node_modules/@lorenz/orchestrator/dist/codec.d.ts.map +1 -0
  175. package/node_modules/@lorenz/orchestrator/dist/codec.js +176 -0
  176. package/node_modules/@lorenz/orchestrator/dist/codec.js.map +1 -0
  177. package/node_modules/@lorenz/orchestrator/dist/index.d.ts +55 -51
  178. package/node_modules/@lorenz/orchestrator/dist/index.d.ts.map +1 -1
  179. package/node_modules/@lorenz/orchestrator/dist/index.js +285 -45
  180. package/node_modules/@lorenz/orchestrator/dist/index.js.map +1 -1
  181. package/node_modules/@lorenz/orchestrator/dist/sqlite.d.ts +34 -0
  182. package/node_modules/@lorenz/orchestrator/dist/sqlite.d.ts.map +1 -0
  183. package/node_modules/@lorenz/orchestrator/dist/sqlite.js +142 -0
  184. package/node_modules/@lorenz/orchestrator/dist/sqlite.js.map +1 -0
  185. package/node_modules/@lorenz/orchestrator/dist/state.d.ts +47 -0
  186. package/node_modules/@lorenz/orchestrator/dist/state.d.ts.map +1 -0
  187. package/node_modules/@lorenz/orchestrator/dist/state.js +15 -0
  188. package/node_modules/@lorenz/orchestrator/dist/state.js.map +1 -0
  189. package/node_modules/@lorenz/orchestrator/dist/turso.d.ts +28 -0
  190. package/node_modules/@lorenz/orchestrator/dist/turso.d.ts.map +1 -0
  191. package/node_modules/@lorenz/orchestrator/dist/turso.js +125 -0
  192. package/node_modules/@lorenz/orchestrator/dist/turso.js.map +1 -0
  193. package/node_modules/@lorenz/orchestrator/package.json +6 -2
  194. package/node_modules/@lorenz/presenter/dist/index.d.ts +14 -0
  195. package/node_modules/@lorenz/presenter/dist/index.d.ts.map +1 -1
  196. package/node_modules/@lorenz/presenter/dist/index.js +18 -0
  197. package/node_modules/@lorenz/presenter/dist/index.js.map +1 -1
  198. package/node_modules/@lorenz/projections/dist/index.d.ts.map +1 -1
  199. package/node_modules/@lorenz/projections/dist/index.js +1 -0
  200. package/node_modules/@lorenz/projections/dist/index.js.map +1 -1
  201. package/node_modules/@lorenz/runtime/dist/index.d.ts +27 -8
  202. package/node_modules/@lorenz/runtime/dist/index.d.ts.map +1 -1
  203. package/node_modules/@lorenz/runtime/dist/index.js +422 -98
  204. package/node_modules/@lorenz/runtime/dist/index.js.map +1 -1
  205. package/node_modules/@lorenz/runtime-events/dist/index.d.ts +14 -0
  206. package/node_modules/@lorenz/runtime-events/dist/index.d.ts.map +1 -1
  207. package/node_modules/@lorenz/server/dist/index.js +1 -1
  208. package/node_modules/@lorenz/server/dist/index.js.map +1 -1
  209. package/node_modules/@lorenz/ssh/dist/index.d.ts +2 -0
  210. package/node_modules/@lorenz/ssh/dist/index.d.ts.map +1 -1
  211. package/node_modules/@lorenz/ssh/dist/index.js +2 -1
  212. package/node_modules/@lorenz/ssh/dist/index.js.map +1 -1
  213. package/node_modules/@lorenz/tool-sdk/dist/index.d.ts +1 -0
  214. package/node_modules/@lorenz/tool-sdk/dist/index.d.ts.map +1 -1
  215. package/node_modules/@lorenz/tool-sdk/dist/index.js +1 -0
  216. package/node_modules/@lorenz/tool-sdk/dist/index.js.map +1 -1
  217. package/node_modules/@lorenz/tool-sdk/dist/module.d.ts +38 -0
  218. package/node_modules/@lorenz/tool-sdk/dist/module.d.ts.map +1 -0
  219. package/node_modules/@lorenz/tool-sdk/dist/module.js +42 -0
  220. package/node_modules/@lorenz/tool-sdk/dist/module.js.map +1 -0
  221. package/node_modules/@lorenz/tracker-sdk/dist/index.d.ts +1 -0
  222. package/node_modules/@lorenz/tracker-sdk/dist/index.d.ts.map +1 -1
  223. package/node_modules/@lorenz/tracker-sdk/dist/index.js +1 -0
  224. package/node_modules/@lorenz/tracker-sdk/dist/index.js.map +1 -1
  225. package/node_modules/@lorenz/tracker-sdk/dist/module.d.ts +37 -0
  226. package/node_modules/@lorenz/tracker-sdk/dist/module.d.ts.map +1 -0
  227. package/node_modules/@lorenz/tracker-sdk/dist/module.js +38 -0
  228. package/node_modules/@lorenz/tracker-sdk/dist/module.js.map +1 -0
  229. package/node_modules/@lorenz/worker-host-pool/dist/index.d.ts +34 -6
  230. package/node_modules/@lorenz/worker-host-pool/dist/index.d.ts.map +1 -1
  231. package/node_modules/@lorenz/worker-host-pool/dist/index.js +110 -143
  232. package/node_modules/@lorenz/worker-host-pool/dist/index.js.map +1 -1
  233. package/node_modules/@lorenz/worker-sdk/dist/index.d.ts +1 -0
  234. package/node_modules/@lorenz/worker-sdk/dist/index.d.ts.map +1 -1
  235. package/node_modules/@lorenz/worker-sdk/dist/index.js +1 -0
  236. package/node_modules/@lorenz/worker-sdk/dist/index.js.map +1 -1
  237. package/node_modules/@lorenz/worker-sdk/dist/local.d.ts +74 -0
  238. package/node_modules/@lorenz/worker-sdk/dist/local.d.ts.map +1 -0
  239. package/node_modules/@lorenz/worker-sdk/dist/local.js +112 -0
  240. package/node_modules/@lorenz/worker-sdk/dist/local.js.map +1 -0
  241. package/node_modules/@lorenz/worker-sdk/dist/module.d.ts +8 -16
  242. package/node_modules/@lorenz/worker-sdk/dist/module.d.ts.map +1 -1
  243. package/node_modules/@lorenz/worker-sdk/dist/module.js +15 -35
  244. package/node_modules/@lorenz/worker-sdk/dist/module.js.map +1 -1
  245. package/node_modules/@lorenz/workflow/dist/index.d.ts +11 -0
  246. package/node_modules/@lorenz/workflow/dist/index.d.ts.map +1 -1
  247. package/node_modules/@lorenz/workflow/dist/index.js +3 -0
  248. package/node_modules/@lorenz/workflow/dist/index.js.map +1 -1
  249. package/package.json +4 -1
@@ -0,0 +1,38 @@
1
+ import { makeSdkModuleContract } from "@lorenz/domain";
2
+ /**
3
+ * The tracker SDK version this build of the engine speaks. Out-of-tree tracker
4
+ * modules declare the version they target via {@link TrackerProviderModule.sdkVersion};
5
+ * the loader rejects a mismatch before the module ever reaches the registry.
6
+ * Major-only: additive, backwards-compatible SDK changes never bump it.
7
+ */
8
+ export const TRACKER_SDK_VERSION = 1;
9
+ const contract = makeSdkModuleContract({
10
+ errorPrefix: "tracker_provider",
11
+ moduleNoun: "a tracker provider module",
12
+ identityField: "kind",
13
+ defineCall: "defineTrackerProvider({ kind, sdkVersion, createClient })",
14
+ requiredFns: [{ field: "createClient", signature: "createClient(settings, context)", article: "a" }],
15
+ sdkVersion: TRACKER_SDK_VERSION,
16
+ });
17
+ /**
18
+ * Structural check + version handshake for a dynamically loaded tracker module.
19
+ * `source` names where the value came from so every error is actionable.
20
+ */
21
+ export const assertTrackerProviderModule = contract.assertModule;
22
+ /**
23
+ * Authoring sugar for out-of-tree tracker modules: shape-asserts the module at
24
+ * definition time (so a typo fails in the author's tests, not the operator's
25
+ * daemon) and returns it unchanged. Usage:
26
+ *
27
+ * ```ts
28
+ * export default defineTrackerProvider({
29
+ * kind: "acme",
30
+ * sdkVersion: 1,
31
+ * createClient: (settings, context) => new AcmeTrackerClient(settings, context),
32
+ * });
33
+ * ```
34
+ */
35
+ export function defineTrackerProvider(module) {
36
+ return contract.defineModule(module, "defineTrackerProvider");
37
+ }
38
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAIvD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAYrC,MAAM,QAAQ,GAAG,qBAAqB,CAAwB;IAC5D,WAAW,EAAE,kBAAkB;IAC/B,UAAU,EAAE,2BAA2B;IACvC,aAAa,EAAE,MAAM;IACrB,UAAU,EAAE,2DAA2D;IACvE,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,iCAAiC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IACpG,UAAU,EAAE,mBAAmB;CAChC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAGM,QAAQ,CAAC,YAAY,CAAC;AAEpE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAA6B;IACjE,OAAO,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;AAChE,CAAC"}
@@ -9,16 +9,44 @@ export declare class WorkerHostPool {
9
9
  private readonly availableRemoteMcpPorts;
10
10
  private readonly remoteMcpTunnelsByEndpoint;
11
11
  private readonly remoteMcpTunnelEntriesByLeaseId;
12
- private readonly perRunMcpTunnels;
12
+ /**
13
+ * Monotonic generation per host:port tunnel slot, surviving entry teardown so
14
+ * a recreated entry gets a STRICTLY higher generation than the one it
15
+ * replaces. A `closeForRun` recorded against a prior generation is rejected.
16
+ */
17
+ private readonly remoteMcpTunnelGenerations;
18
+ /**
19
+ * Per-run holds on the SHARED per-host tunnels, keyed by `${workerHost}#${runKey}`.
20
+ * Each entry records which leaseId (and which generation) a run holds so
21
+ * `closeForRun` drops exactly that run's refcount - opening the tunnel on the
22
+ * first co-resident run and closing it at the last deref.
23
+ */
24
+ private readonly perRunTunnelHolds;
13
25
  acquireRemoteMcpTunnel(workerHost: string, localHost: string, localPort: number): Promise<RemoteMcpTunnelLease>;
14
26
  releaseRemoteMcpTunnel(lease: RemoteMcpTunnelLease): void;
27
+ /**
28
+ * Acquire a hold on the per-HOST reverse tunnel for one run. Co-resident runs
29
+ * on the SAME host share ONE `ssh -R` tunnel (opened on the first run, closed
30
+ * at the last `closeForRun`); they are kept apart by their per-run Token B
31
+ * claim, not by a distinct remote port. The generation captured here is what a
32
+ * later `closeForRun` is CAS-checked against, so a host:port recycle that bumps
33
+ * the slot's generation strands a stale late-close instead of decrementing the
34
+ * fresh entry.
35
+ */
15
36
  openForRun(workerHost: string, runKey: string, localHost: string, localPort: number): Promise<RemoteMcpTunnelLease>;
16
37
  closeForRun(workerHost: string, runKey: string): void;
17
- private allocateRemoteMcpPort;
18
- private isRemoteMcpPortLive;
19
- private confirmPerRunMcpTunnelReady;
20
- private handlePerRunMcpTunnelProcessEnd;
21
- private closePerRunMcpTunnel;
38
+ /**
39
+ * Drop one run's hold on its shared per-host tunnel. CAS late-close reject: if
40
+ * the live entry for the hold's endpoint has a STRICTLY higher generation than
41
+ * the hold recorded, the slot was recycled and a fresh owner holds the live
42
+ * ref - this stale release must NOT decrement the new entry's refcount. The
43
+ * hold's own leaseId either still maps to the original (same-generation) entry
44
+ * or was already cleared on that entry's teardown, so dropping it is otherwise
45
+ * idempotent.
46
+ */
47
+ private releasePerRunHold;
48
+ private ensureRemoteMcpTunnelEntry;
49
+ private dropRemoteMcpTunnelLease;
22
50
  private closeRemoteMcpTunnel;
23
51
  private handleRemoteMcpTunnelProcessEnd;
24
52
  private waitForRemoteMcpTunnelReady;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAcD,qBAAa,cAAc;IACzB,OAAO,CAAC,iBAAiB,CAAU;IACnC,OAAO,CAAC,oBAAoB,CAAK;IACjC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAgB;IACxD,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAA2C;IACtF,OAAO,CAAC,QAAQ,CAAC,+BAA+B,CAA2C;IAI3F,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA2C;IAEtE,sBAAsB,CAC1B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,0BAA0B,CAA6B;IACxE;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAuC;IAEnE,sBAAsB,CAC1B,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,oBAAoB,CAAC;IAMhC,sBAAsB,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI;IASzD;;;;;;;;OAQG;IACG,UAAU,CACd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,oBAAoB,CAAC;IAqChC,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAIrD;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;YAiBX,0BAA0B;IAkDxC,OAAO,CAAC,wBAAwB;IAQhC,OAAO,CAAC,oBAAoB;IAyB5B,OAAO,CAAC,+BAA+B;YAUzB,2BAA2B;YAW3B,2BAA2B;IAezC,OAAO,CAAC,mCAAmC;IA+B3C,OAAO,CAAC,yBAAyB;IAMjC,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,0BAA0B;IAYlC,OAAO,CAAC,0BAA0B;CAOnC;AAMD,eAAO,MAAM,cAAc,gBAAuB,CAAC"}
@@ -5,49 +5,22 @@ export class WorkerHostPool {
5
5
  availableRemoteMcpPorts = [];
6
6
  remoteMcpTunnelsByEndpoint = new Map();
7
7
  remoteMcpTunnelEntriesByLeaseId = new Map();
8
- // Per-run tunnels are keyed by `${workerHost}#${runKey}`, NOT host-coalesced,
9
- // so each run owns a distinct entry (and distinct remote port). One run's
10
- // localPort change can never replace another run's entry.
11
- perRunMcpTunnels = new Map();
8
+ /**
9
+ * Monotonic generation per host:port tunnel slot, surviving entry teardown so
10
+ * a recreated entry gets a STRICTLY higher generation than the one it
11
+ * replaces. A `closeForRun` recorded against a prior generation is rejected.
12
+ */
13
+ remoteMcpTunnelGenerations = new Map();
14
+ /**
15
+ * Per-run holds on the SHARED per-host tunnels, keyed by `${workerHost}#${runKey}`.
16
+ * Each entry records which leaseId (and which generation) a run holds so
17
+ * `closeForRun` drops exactly that run's refcount - opening the tunnel on the
18
+ * first co-resident run and closing it at the last deref.
19
+ */
20
+ perRunTunnelHolds = new Map();
12
21
  async acquireRemoteMcpTunnel(workerHost, localHost, localPort) {
13
22
  const endpointKey = this.remoteMcpTunnelEndpointKey(workerHost, localHost, localPort);
14
- const current = this.remoteMcpTunnelsByEndpoint.get(endpointKey);
15
- if (current && !current.processEnded) {
16
- await this.waitForRemoteMcpTunnelReady(current);
17
- return this.createRemoteMcpTunnelLease(current);
18
- }
19
- if (current)
20
- this.closeRemoteMcpTunnel(current, true);
21
- const recycledPort = this.availableRemoteMcpPorts.shift();
22
- const remotePort = recycledPort ?? this.nextRemoteMcpPort;
23
- let process;
24
- try {
25
- process = startReverseTunnel(workerHost, remotePort, localHost, localPort);
26
- }
27
- catch (error) {
28
- if (recycledPort !== undefined)
29
- this.recycleRemoteMcpPort(recycledPort);
30
- throw error;
31
- }
32
- if (recycledPort === undefined)
33
- this.nextRemoteMcpPort += 1;
34
- const entry = {
35
- workerHost,
36
- localHost,
37
- localPort,
38
- process,
39
- leaseIds: new Set(),
40
- readyPromise: Promise.resolve(),
41
- remotePort,
42
- processEnded: false,
43
- recyclePortOnProcessEnd: false,
44
- };
45
- this.remoteMcpTunnelsByEndpoint.set(endpointKey, entry);
46
- process.on("close", () => this.handleRemoteMcpTunnelProcessEnd(entry, endpointKey));
47
- process.on("exit", () => this.handleRemoteMcpTunnelProcessEnd(entry, endpointKey));
48
- process.on("error", () => this.handleRemoteMcpTunnelProcessEnd(entry, endpointKey));
49
- entry.readyPromise = this.confirmRemoteMcpTunnelReady(entry);
50
- await this.waitForRemoteMcpTunnelReady(entry);
23
+ const entry = await this.ensureRemoteMcpTunnelEntry(workerHost, localHost, localPort, endpointKey);
51
24
  return this.createRemoteMcpTunnelLease(entry);
52
25
  }
53
26
  releaseRemoteMcpTunnel(lease) {
@@ -57,26 +30,89 @@ export class WorkerHostPool {
57
30
  if (entry.workerHost !== lease.workerHost || entry.remotePort !== lease.remotePort) {
58
31
  return;
59
32
  }
60
- this.remoteMcpTunnelEntriesByLeaseId.delete(lease.leaseId);
61
- entry.leaseIds.delete(lease.leaseId);
62
- if (entry.leaseIds.size > 0)
63
- return;
64
- this.closeRemoteMcpTunnel(entry, true);
33
+ this.dropRemoteMcpTunnelLease(entry, lease.leaseId);
65
34
  }
35
+ /**
36
+ * Acquire a hold on the per-HOST reverse tunnel for one run. Co-resident runs
37
+ * on the SAME host share ONE `ssh -R` tunnel (opened on the first run, closed
38
+ * at the last `closeForRun`); they are kept apart by their per-run Token B
39
+ * claim, not by a distinct remote port. The generation captured here is what a
40
+ * later `closeForRun` is CAS-checked against, so a host:port recycle that bumps
41
+ * the slot's generation strands a stale late-close instead of decrementing the
42
+ * fresh entry.
43
+ */
66
44
  async openForRun(workerHost, runKey, localHost, localPort) {
67
- const key = perRunKey(workerHost, runKey);
68
- const current = this.perRunMcpTunnels.get(key);
69
- if (current &&
70
- !current.processEnded &&
71
- current.localHost === localHost &&
72
- current.localPort === localPort) {
45
+ const holdKey = perRunKey(workerHost, runKey);
46
+ const endpointKey = this.remoteMcpTunnelEndpointKey(workerHost, localHost, localPort);
47
+ // Re-opening the SAME run (e.g. resume) reuses its existing hold when the
48
+ // shared host entry is still live - no second refcount/lease for one run.
49
+ const existingHold = this.perRunTunnelHolds.get(holdKey);
50
+ if (existingHold) {
51
+ const heldEntry = this.remoteMcpTunnelEntriesByLeaseId.get(existingHold.leaseId);
52
+ if (heldEntry &&
53
+ !heldEntry.processEnded &&
54
+ heldEntry.localHost === localHost &&
55
+ heldEntry.localPort === localPort) {
56
+ await this.waitForRemoteMcpTunnelReady(heldEntry);
57
+ return {
58
+ leaseId: existingHold.leaseId,
59
+ workerHost: heldEntry.workerHost,
60
+ remotePort: heldEntry.remotePort,
61
+ };
62
+ }
63
+ // The run's prior hold is stale (entry torn down or the local endpoint
64
+ // moved): drop it and take a fresh hold on the current shared entry.
65
+ this.releasePerRunHold(holdKey);
66
+ }
67
+ const entry = await this.ensureRemoteMcpTunnelEntry(workerHost, localHost, localPort, endpointKey);
68
+ const lease = this.createRemoteMcpTunnelLease(entry);
69
+ this.perRunTunnelHolds.set(holdKey, {
70
+ leaseId: lease.leaseId,
71
+ endpointKey,
72
+ generation: entry.generation,
73
+ });
74
+ return lease;
75
+ }
76
+ closeForRun(workerHost, runKey) {
77
+ this.releasePerRunHold(perRunKey(workerHost, runKey));
78
+ }
79
+ /**
80
+ * Drop one run's hold on its shared per-host tunnel. CAS late-close reject: if
81
+ * the live entry for the hold's endpoint has a STRICTLY higher generation than
82
+ * the hold recorded, the slot was recycled and a fresh owner holds the live
83
+ * ref - this stale release must NOT decrement the new entry's refcount. The
84
+ * hold's own leaseId either still maps to the original (same-generation) entry
85
+ * or was already cleared on that entry's teardown, so dropping it is otherwise
86
+ * idempotent.
87
+ */
88
+ releasePerRunHold(holdKey) {
89
+ const hold = this.perRunTunnelHolds.get(holdKey);
90
+ if (!hold)
91
+ return;
92
+ this.perRunTunnelHolds.delete(holdKey);
93
+ const liveGeneration = this.remoteMcpTunnelGenerations.get(hold.endpointKey);
94
+ if (liveGeneration !== undefined && hold.generation < liveGeneration) {
95
+ // Stale late-close against a recycled slot: never touch the live entry.
96
+ return;
97
+ }
98
+ const entry = this.remoteMcpTunnelEntriesByLeaseId.get(hold.leaseId);
99
+ if (!entry)
100
+ return;
101
+ this.dropRemoteMcpTunnelLease(entry, hold.leaseId);
102
+ }
103
+ // Reuse-or-open a host-keyed reverse tunnel entry. A live entry for this
104
+ // host:port is shared (refcounted by leases); a torn-down one is replaced by a
105
+ // fresh entry whose generation is STRICTLY higher than the slot's last value.
106
+ async ensureRemoteMcpTunnelEntry(workerHost, localHost, localPort, endpointKey) {
107
+ const current = this.remoteMcpTunnelsByEndpoint.get(endpointKey);
108
+ if (current && !current.processEnded) {
73
109
  await this.waitForRemoteMcpTunnelReady(current);
74
- return this.createRemoteMcpTunnelLease(current);
110
+ return current;
75
111
  }
76
112
  if (current)
77
- this.closePerRunMcpTunnel(key, current, true);
78
- const remotePort = this.allocateRemoteMcpPort();
79
- const recycledPort = remotePort < this.nextRemoteMcpPort ? remotePort : undefined;
113
+ this.closeRemoteMcpTunnel(current, true);
114
+ const recycledPort = this.availableRemoteMcpPorts.shift();
115
+ const remotePort = recycledPort ?? this.nextRemoteMcpPort;
80
116
  let process;
81
117
  try {
82
118
  process = startReverseTunnel(workerHost, remotePort, localHost, localPort);
@@ -88,6 +124,12 @@ export class WorkerHostPool {
88
124
  }
89
125
  if (recycledPort === undefined)
90
126
  this.nextRemoteMcpPort += 1;
127
+ // Bump the slot's generation when a brand-new entry replaces a torn-down
128
+ // one. The first entry for a host:port gets generation 1; each recycle is
129
+ // strictly higher, so a per-run hold recorded against the prior generation
130
+ // is fenced out of the new entry's refcount.
131
+ const generation = (this.remoteMcpTunnelGenerations.get(endpointKey) ?? 0) + 1;
132
+ this.remoteMcpTunnelGenerations.set(endpointKey, generation);
91
133
  const entry = {
92
134
  workerHost,
93
135
  localHost,
@@ -98,99 +140,24 @@ export class WorkerHostPool {
98
140
  remotePort,
99
141
  processEnded: false,
100
142
  recyclePortOnProcessEnd: false,
143
+ generation,
101
144
  };
102
- this.perRunMcpTunnels.set(key, entry);
103
- process.on("close", () => this.handlePerRunMcpTunnelProcessEnd(key, entry));
104
- process.on("exit", () => this.handlePerRunMcpTunnelProcessEnd(key, entry));
105
- process.on("error", () => this.handlePerRunMcpTunnelProcessEnd(key, entry));
106
- entry.readyPromise = this.confirmPerRunMcpTunnelReady(key, entry);
145
+ this.remoteMcpTunnelsByEndpoint.set(endpointKey, entry);
146
+ process.on("close", () => this.handleRemoteMcpTunnelProcessEnd(entry, endpointKey));
147
+ process.on("exit", () => this.handleRemoteMcpTunnelProcessEnd(entry, endpointKey));
148
+ process.on("error", () => this.handleRemoteMcpTunnelProcessEnd(entry, endpointKey));
149
+ entry.readyPromise = this.confirmRemoteMcpTunnelReady(entry);
107
150
  await this.waitForRemoteMcpTunnelReady(entry);
108
- return this.createRemoteMcpTunnelLease(entry);
151
+ return entry;
109
152
  }
110
- closeForRun(workerHost, runKey) {
111
- const key = perRunKey(workerHost, runKey);
112
- const entry = this.perRunMcpTunnels.get(key);
113
- if (!entry)
153
+ dropRemoteMcpTunnelLease(entry, leaseId) {
154
+ if (!entry.leaseIds.has(leaseId))
114
155
  return;
115
- // Each openForRun call on this run minted one lease; drop one per close
116
- // and keep the tunnel while other holders of the same run remain.
117
- const [leaseId] = entry.leaseIds;
118
- if (leaseId !== undefined) {
119
- entry.leaseIds.delete(leaseId);
120
- this.remoteMcpTunnelEntriesByLeaseId.delete(leaseId);
121
- }
156
+ this.remoteMcpTunnelEntriesByLeaseId.delete(leaseId);
157
+ entry.leaseIds.delete(leaseId);
122
158
  if (entry.leaseIds.size > 0)
123
159
  return;
124
- this.closePerRunMcpTunnel(key, entry, true);
125
- }
126
- // Allocate a remote port, reusing a recycled candidate only when no live
127
- // entry (host-keyed OR per-run) still holds it. This guards the
128
- // recycled-port-vs-stale-entry interaction under N concurrent live ports.
129
- allocateRemoteMcpPort() {
130
- while (this.availableRemoteMcpPorts.length > 0) {
131
- const candidate = this.availableRemoteMcpPorts.shift();
132
- if (!this.isRemoteMcpPortLive(candidate))
133
- return candidate;
134
- }
135
- return this.nextRemoteMcpPort;
136
- }
137
- isRemoteMcpPortLive(remotePort) {
138
- for (const entry of this.remoteMcpTunnelsByEndpoint.values()) {
139
- if (entry.remotePort === remotePort)
140
- return true;
141
- }
142
- for (const entry of this.perRunMcpTunnels.values()) {
143
- if (entry.remotePort === remotePort)
144
- return true;
145
- }
146
- return false;
147
- }
148
- async confirmPerRunMcpTunnelReady(key, entry) {
149
- const processEndWatcher = this.watchRemoteMcpTunnelSetupProcessEnd(entry);
150
- try {
151
- await Promise.race([
152
- waitForRemoteTcpPort(entry.workerHost, entry.remotePort),
153
- processEndWatcher.promise,
154
- ]);
155
- }
156
- catch (error) {
157
- this.closePerRunMcpTunnel(key, entry, true);
158
- throw error;
159
- }
160
- finally {
161
- processEndWatcher.dispose();
162
- }
163
- }
164
- handlePerRunMcpTunnelProcessEnd(key, entry) {
165
- if (entry.processEnded)
166
- return;
167
- entry.processEnded = true;
168
- if (this.perRunMcpTunnels.get(key) === entry) {
169
- this.closePerRunMcpTunnel(key, entry, true);
170
- return;
171
- }
172
- if (entry.recyclePortOnProcessEnd)
173
- this.recycleRemoteMcpPort(entry.remotePort);
174
- }
175
- closePerRunMcpTunnel(key, entry, recyclePort) {
176
- if (this.perRunMcpTunnels.get(key) === entry) {
177
- this.perRunMcpTunnels.delete(key);
178
- }
179
- for (const leaseId of entry.leaseIds) {
180
- this.remoteMcpTunnelEntriesByLeaseId.delete(leaseId);
181
- }
182
- entry.leaseIds.clear();
183
- if (recyclePort) {
184
- if (entry.processEnded) {
185
- this.recycleRemoteMcpPort(entry.remotePort);
186
- }
187
- else {
188
- entry.recyclePortOnProcessEnd = true;
189
- }
190
- }
191
- if (!entry.processEnded) {
192
- entry.process.kill();
193
- }
160
+ this.closeRemoteMcpTunnel(entry, true);
194
161
  }
195
162
  closeRemoteMcpTunnel(entry, recyclePort) {
196
163
  const endpointKey = this.remoteMcpTunnelEndpointKey(entry.workerHost, entry.localHost, entry.localPort);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAoBvE,MAAM,OAAO,cAAc;IACjB,iBAAiB,GAAG,MAAM,CAAC;IAC3B,oBAAoB,GAAG,CAAC,CAAC;IAChB,uBAAuB,GAAa,EAAE,CAAC;IACvC,0BAA0B,GAAG,IAAI,GAAG,EAAgC,CAAC;IACrE,+BAA+B,GAAG,IAAI,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,CAAC,CAAC;QACzD,OAAO;YACL,OAAO;YACP,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,CAAC;IACJ,CAAC;IAEO,0BAA0B,CAChC,UAAkB,EAClB,SAAiB,EACjB,SAAiB;QAEjB,OAAO,GAAG,UAAU,KAAK,SAAS,KAAK,SAAS,EAAE,CAAC;IACrD,CAAC;CACF;AAED,SAAS,SAAS,CAAC,UAAkB,EAAE,MAAc;IACnD,OAAO,GAAG,UAAU,IAAI,MAAM,EAAE,CAAC;AACnC,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC"}
@@ -2,4 +2,5 @@ export { POOL_OWNED_LABEL, type WorkerDescriptor, type WorkerDriver, type Worker
2
2
  export { WorkerDriverRegistry, defaultWorkerDriverRegistry } from "./registry.js";
3
3
  export { WORKER_DRIVER_SDK_VERSION, assertWorkerDriverModule, defineWorkerDriver, type WorkerDriverModule, } from "./module.js";
4
4
  export { FakeWorkerDriver, fakeWorkerDriverFactory, registerFakeWorkerDriver } from "./fake.js";
5
+ export { LocalWorkerDriver, localWorkerDriverFactory, registerLocalWorkerDriver, } from "./local.js";
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,KAAK,kBAAkB,GACxB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAEhG,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,YAAY,CAAC"}
@@ -7,4 +7,5 @@ export { POOL_OWNED_LABEL, } from "./types.js";
7
7
  export { WorkerDriverRegistry, defaultWorkerDriverRegistry } from "./registry.js";
8
8
  export { WORKER_DRIVER_SDK_VERSION, assertWorkerDriverModule, defineWorkerDriver, } from "./module.js";
9
9
  export { FakeWorkerDriver, fakeWorkerDriverFactory, registerFakeWorkerDriver } from "./fake.js";
10
+ export { LocalWorkerDriver, localWorkerDriverFactory, registerLocalWorkerDriver, } from "./local.js";
10
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,wEAAwE;AACxE,mEAAmE;AACnE,6EAA6E;AAC7E,UAAU;AAEV,OAAO,EACL,gBAAgB,GAYjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,GAEnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,wEAAwE;AACxE,mEAAmE;AACnE,6EAA6E;AAC7E,UAAU;AAEV,OAAO,EACL,gBAAgB,GAYjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAElF,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,GAEnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAEhG,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,YAAY,CAAC"}
@@ -0,0 +1,74 @@
1
+ import type { WorkerDriverRegistry } from "./registry.js";
2
+ import type { WorkerDescriptor, WorkerDriver, WorkerDriverFactory, DriverCapabilities, DriverDeps, WorkerHealth, ProvisionRequest, TeardownReason } from "./types.js";
3
+ /**
4
+ * The single-machine, in-process {@link WorkerDriver}. It provisions workers
5
+ * whose `workerHost` is the EMPTY string, the canonical "no remote worker"
6
+ * signal the orchestrator/endpoint-manager understands: an empty host mints NO
7
+ * tunnel and NO MCP lease, so acp keeps its own in-process MCP endpoint and the
8
+ * run executes locally. A warm pool at `slotsPerMachine=1` over this driver
9
+ * runs one local worker, single-tenant.
10
+ *
11
+ * Mechanically it is a purely in-memory `Map<workerId, WorkerDescriptor>` with
12
+ * deterministic `createdAtMs` from the injected clock, idempotent
13
+ * provision/destroy, and a probe that returns `{ ok: true }` WITHOUT touching
14
+ * SSH (there is no remote machine to reach). The yielded `workerHost` is empty
15
+ * (so downstream wiring takes the local-execution arm), and the `driverRef`
16
+ * stays distinct per worker (`local://<workerId>`) so destroy/list/reconcile
17
+ * key per-worker even though every worker shares the empty host. There is no
18
+ * failure injection: a local in-process worker has no remote faults to model.
19
+ *
20
+ * This driver is single-machine by design: the pool affinity-keys on
21
+ * `workerHost`, so an empty host collapses every local worker into ONE affinity
22
+ * bucket. That is inert at the configuration this driver is meant for
23
+ * (`slotsPerMachine=1`, `max=1`): there is at most one local worker, so the
24
+ * bucket never matters.
25
+ */
26
+ export declare class LocalWorkerDriver implements WorkerDriver {
27
+ private readonly deps;
28
+ readonly kind = "local";
29
+ readonly capabilities: DriverCapabilities;
30
+ private readonly workers;
31
+ constructor(deps: Pick<DriverDeps, "clock">);
32
+ /**
33
+ * Provisions (or re-adopts) a local worker for `req.workerId`. Idempotent on
34
+ * `workerId`: a second call returns the SAME descriptor without creating a
35
+ * duplicate. The yielded `workerHost` is the EMPTY string (local execution,
36
+ * no tunnel); the `driverRef` is `local://<workerId>` so it stays distinct
37
+ * per worker for destroy/list keying. `createdAtMs` is stamped from the
38
+ * injected clock so it is deterministic.
39
+ */
40
+ provision(req: ProvisionRequest): Promise<WorkerDescriptor>;
41
+ /**
42
+ * Reports the worker healthy if it is in the live inventory. There is no
43
+ * remote machine to reach, so this NEVER calls SSH; an unknown/destroyed
44
+ * worker is reported `ok: false` rather than throwing (mirroring a probe
45
+ * against a gone worker).
46
+ */
47
+ probe(worker: WorkerDescriptor, _opts: {
48
+ timeoutMs: number;
49
+ signal?: AbortSignal;
50
+ }): Promise<WorkerHealth>;
51
+ /**
52
+ * Destroys a local worker. Idempotent and tolerant of an already-gone (or
53
+ * never-provisioned) worker.
54
+ */
55
+ destroy(worker: WorkerDescriptor, _opts: {
56
+ timeoutMs: number;
57
+ reason: TeardownReason;
58
+ }): Promise<void>;
59
+ /** Returns the live inventory (provisioned-minus-destroyed). */
60
+ list(): Promise<WorkerDescriptor[]>;
61
+ }
62
+ /** The registered `local` factory: constructs a fresh in-process driver per pool. */
63
+ export declare const localWorkerDriverFactory: WorkerDriverFactory;
64
+ /**
65
+ * Registers the `local` driver. The SDK ships this driver (rather than an
66
+ * extension) because it is the default backend a pool falls back to when no
67
+ * remote workers are configured: the composition root registers it next to the
68
+ * `fake`/`static-ssh`/`docker` drivers so a default-on local pool can provision
69
+ * an empty-host worker and keep execution in-process.
70
+ */
71
+ export declare function registerLocalWorkerDriver(registries?: {
72
+ workerDrivers?: WorkerDriverRegistry | undefined;
73
+ }): void;
74
+ //# sourceMappingURL=local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../src/local.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACf,MAAM,YAAY,CAAC;AAUpB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,iBAAkB,YAAW,YAAY;IAQxC,OAAO,CAAC,QAAQ,CAAC,IAAI;IAPjC,QAAQ,CAAC,IAAI,WAAQ;IACrB,QAAQ,CAAC,YAAY,qBAAgB;IAIrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuC;gBAElC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC;IAE5D;;;;;;;OAOG;IACG,SAAS,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAsBjE;;;;;OAKG;IACG,KAAK,CACT,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC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