@leitwerk-dev/worker-runners 0.1.9 → 0.2.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 (161) hide show
  1. package/dist/{chunk-6WACBFXN.js → chunk-2P3CWUP3.js} +16 -5
  2. package/dist/chunk-2P3CWUP3.js.map +1 -0
  3. package/dist/chunk-4F7EMXMU.js +119 -0
  4. package/dist/chunk-4F7EMXMU.js.map +1 -0
  5. package/dist/chunk-6UZ2REWV.js +90 -0
  6. package/dist/chunk-6UZ2REWV.js.map +1 -0
  7. package/dist/{chunk-DL3Y3R6E.js → chunk-A3XSYWA5.js} +74 -8
  8. package/dist/chunk-A3XSYWA5.js.map +1 -0
  9. package/dist/{chunk-2TSWMVLZ.js → chunk-BRIIMAZX.js} +158 -39
  10. package/dist/chunk-BRIIMAZX.js.map +1 -0
  11. package/dist/{chunk-IRFVGUXJ.js → chunk-DFPYUJIK.js} +10 -3
  12. package/dist/chunk-DFPYUJIK.js.map +1 -0
  13. package/dist/{chunk-HLTGLGUS.js → chunk-H4JEE3ZT.js} +70 -93
  14. package/dist/chunk-H4JEE3ZT.js.map +1 -0
  15. package/dist/chunk-ISH4647R.js +506 -0
  16. package/dist/chunk-ISH4647R.js.map +1 -0
  17. package/dist/chunk-UGKQOL5E.js +39 -0
  18. package/dist/chunk-UGKQOL5E.js.map +1 -0
  19. package/dist/chunk-V7TTFLGE.js +899 -0
  20. package/dist/chunk-V7TTFLGE.js.map +1 -0
  21. package/dist/chunk-YDYI3BD2.js +315 -0
  22. package/dist/chunk-YDYI3BD2.js.map +1 -0
  23. package/dist/chunk-ZGFD76I6.js +16 -0
  24. package/dist/chunk-ZGFD76I6.js.map +1 -0
  25. package/dist/docker-client-public.d.ts +2 -0
  26. package/dist/docker-client-public.d.ts.map +1 -0
  27. package/dist/docker-client-public.js +7 -0
  28. package/dist/docker-client-public.js.map +1 -0
  29. package/dist/{docker-engine-client-Cpmy2yma.d.ts → docker-engine-client-Btw6ZTXk.d.ts} +48 -34
  30. package/dist/docker-engine-client.d.ts +47 -33
  31. package/dist/docker-engine-client.d.ts.map +1 -1
  32. package/dist/docker-engine-http-client.d.ts +18 -9
  33. package/dist/docker-engine-http-client.d.ts.map +1 -1
  34. package/dist/docker-engine-http-client.js +12 -201
  35. package/dist/docker-engine-http-client.js.map +1 -1
  36. package/dist/docker-public.d.ts +2 -0
  37. package/dist/docker-public.d.ts.map +1 -0
  38. package/dist/docker-public.js +13 -0
  39. package/dist/docker-public.js.map +1 -0
  40. package/dist/docker-worker-runner.d.ts +25 -8
  41. package/dist/docker-worker-runner.d.ts.map +1 -1
  42. package/dist/docker-worker-runner.js +12 -235
  43. package/dist/docker-worker-runner.js.map +1 -1
  44. package/dist/fake-docker-engine-client.d.ts.map +1 -1
  45. package/dist/filesystem-process-state-exporter.d.ts +10 -0
  46. package/dist/filesystem-process-state-exporter.d.ts.map +1 -0
  47. package/dist/helper-process-state-exporter.d.ts +28 -0
  48. package/dist/helper-process-state-exporter.d.ts.map +1 -0
  49. package/dist/index.d.ts +2 -11
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +46 -9
  52. package/dist/index.js.map +1 -1
  53. package/dist/kubernetes-api-client-CEe7pHC4.d.ts +453 -0
  54. package/dist/kubernetes-api-client.d.ts +113 -6
  55. package/dist/kubernetes-api-client.d.ts.map +1 -1
  56. package/dist/kubernetes-client-public.d.ts +2 -0
  57. package/dist/kubernetes-client-public.d.ts.map +1 -0
  58. package/dist/kubernetes-client-public.js +9 -0
  59. package/dist/kubernetes-client-public.js.map +1 -0
  60. package/dist/kubernetes-http-client.d.ts +11 -0
  61. package/dist/kubernetes-http-client.d.ts.map +1 -1
  62. package/dist/kubernetes-http-client.js +10 -295
  63. package/dist/kubernetes-http-client.js.map +1 -1
  64. package/dist/kubernetes-manifests.d.ts +189 -83
  65. package/dist/kubernetes-manifests.d.ts.map +1 -1
  66. package/dist/kubernetes-public.d.ts +2 -0
  67. package/dist/kubernetes-public.d.ts.map +1 -0
  68. package/dist/kubernetes-public.js +13 -0
  69. package/dist/kubernetes-public.js.map +1 -0
  70. package/dist/kubernetes-startup-sampler.d.ts +14 -0
  71. package/dist/kubernetes-startup-sampler.d.ts.map +1 -0
  72. package/dist/kubernetes-volume-pool-api.d.ts +114 -0
  73. package/dist/kubernetes-volume-pool-api.d.ts.map +1 -0
  74. package/dist/kubernetes-volume-pool.d.ts +41 -0
  75. package/dist/kubernetes-volume-pool.d.ts.map +1 -0
  76. package/dist/kubernetes-worker-runner.d.ts +46 -6
  77. package/dist/kubernetes-worker-runner.d.ts.map +1 -1
  78. package/dist/kubernetes-worker-runner.js +12 -161
  79. package/dist/kubernetes-worker-runner.js.map +1 -1
  80. package/dist/local-public.d.ts +2 -0
  81. package/dist/local-public.d.ts.map +1 -0
  82. package/dist/local-public.js +11 -0
  83. package/dist/local-public.js.map +1 -0
  84. package/dist/local-worker-runner.d.ts +22 -5
  85. package/dist/local-worker-runner.d.ts.map +1 -1
  86. package/dist/local-worker-runner.js +14 -108
  87. package/dist/local-worker-runner.js.map +1 -1
  88. package/dist/process-volume-retention.d.ts +15 -0
  89. package/dist/process-volume-retention.d.ts.map +1 -1
  90. package/dist/runner-utils.d.ts +8 -1
  91. package/dist/runner-utils.d.ts.map +1 -1
  92. package/dist/session-transfer-helper-cli.d.ts +2 -0
  93. package/dist/session-transfer-helper-cli.d.ts.map +1 -0
  94. package/dist/session-transfer-helper-cli.js +9 -0
  95. package/dist/session-transfer-helper-cli.js.map +1 -0
  96. package/dist/session-transfer-helper.d.ts +7 -0
  97. package/dist/session-transfer-helper.d.ts.map +1 -0
  98. package/dist/session-transfer-helper.js +11 -0
  99. package/dist/session-transfer-helper.js.map +1 -0
  100. package/dist/types-public.d.ts +3 -0
  101. package/dist/types-public.d.ts.map +1 -0
  102. package/dist/types-public.js +7 -0
  103. package/dist/types-public.js.map +1 -0
  104. package/dist/types.d.ts +140 -39
  105. package/dist/types.d.ts.map +1 -1
  106. package/dist/types.js +6 -11
  107. package/dist/types.js.map +1 -1
  108. package/dist/worker-labels.d.ts +36 -2
  109. package/dist/worker-labels.d.ts.map +1 -1
  110. package/package.json +26 -23
  111. package/src/docker-client-public.ts +1 -0
  112. package/src/docker-engine-client.ts +62 -36
  113. package/src/docker-engine-http-client.ts +90 -96
  114. package/src/docker-public.ts +1 -0
  115. package/src/docker-worker-runner.ts +194 -58
  116. package/src/fake-docker-engine-client.ts +13 -41
  117. package/src/filesystem-process-state-exporter.ts +42 -0
  118. package/src/helper-process-state-exporter.ts +149 -0
  119. package/src/index.ts +5 -94
  120. package/src/kubernetes-api-client.ts +179 -13
  121. package/src/kubernetes-client-public.ts +1 -0
  122. package/src/kubernetes-http-client.ts +239 -92
  123. package/src/kubernetes-manifests.ts +469 -345
  124. package/src/kubernetes-public.ts +1 -0
  125. package/src/kubernetes-startup-sampler.ts +191 -0
  126. package/src/kubernetes-volume-pool-api.ts +241 -0
  127. package/src/kubernetes-volume-pool.ts +375 -0
  128. package/src/kubernetes-worker-runner.ts +361 -44
  129. package/src/local-public.ts +1 -0
  130. package/src/local-worker-runner.ts +93 -10
  131. package/src/process-volume-retention.ts +15 -0
  132. package/src/runner-utils.ts +17 -2
  133. package/src/session-transfer-helper-cli.ts +5 -0
  134. package/src/session-transfer-helper.ts +108 -0
  135. package/src/types-public.ts +12 -0
  136. package/src/types.ts +169 -36
  137. package/src/worker-labels.ts +47 -2
  138. package/dist/chunk-2TSWMVLZ.js.map +0 -1
  139. package/dist/chunk-6WACBFXN.js.map +0 -1
  140. package/dist/chunk-DL3Y3R6E.js.map +0 -1
  141. package/dist/chunk-DUFA24LP.js +0 -401
  142. package/dist/chunk-DUFA24LP.js.map +0 -1
  143. package/dist/chunk-HLTGLGUS.js.map +0 -1
  144. package/dist/chunk-IRFVGUXJ.js.map +0 -1
  145. package/dist/chunk-P4DIFRBH.js +0 -187
  146. package/dist/chunk-P4DIFRBH.js.map +0 -1
  147. package/dist/docker-engine-client.js +0 -10
  148. package/dist/docker-engine-client.js.map +0 -1
  149. package/dist/fake-docker-engine-client.js +0 -131
  150. package/dist/fake-docker-engine-client.js.map +0 -1
  151. package/dist/kubernetes-api-client-BcwF2uon.d.ts +0 -286
  152. package/dist/kubernetes-api-client.js +0 -142
  153. package/dist/kubernetes-api-client.js.map +0 -1
  154. package/dist/kubernetes-manifests.js +0 -379
  155. package/dist/kubernetes-manifests.js.map +0 -1
  156. package/dist/process-volume-retention.js +0 -46
  157. package/dist/process-volume-retention.js.map +0 -1
  158. package/dist/runner-utils.js +0 -36
  159. package/dist/runner-utils.js.map +0 -1
  160. package/dist/worker-labels.js +0 -83
  161. package/dist/worker-labels.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-transfer-helper.d.ts","sourceRoot":"","sources":["../src/session-transfer-helper.ts"],"names":[],"mappings":"AAOA,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,qEACoB,CAAC;AACpE,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,WAAW,CAAC;AAkE3D,gBAAgB;AAChB,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,IAAI,CAAC,CA6B9D"}
@@ -0,0 +1,11 @@
1
+ import {
2
+ SESSION_TRANSFER_HELPER_ENTRY_PATH,
3
+ SESSION_TRANSFER_HELPER_MOUNT_PATH,
4
+ runSessionTransferHelper
5
+ } from "./chunk-6UZ2REWV.js";
6
+ export {
7
+ SESSION_TRANSFER_HELPER_ENTRY_PATH,
8
+ SESSION_TRANSFER_HELPER_MOUNT_PATH,
9
+ runSessionTransferHelper
10
+ };
11
+ //# sourceMappingURL=session-transfer-helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,3 @@
1
+ export type { ProcessVolume, ResolvedWorkerImage, StopWorkerOptions, WorkerExitInfo, WorkerRunner, WorkerStartObserver, WorkerUnit, WorkerUnitDescriptor, WorkerUnitRef, } from "./types.js";
2
+ export { WorkerStartDiagnosticError } from "./types.js";
3
+ //# sourceMappingURL=types-public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-public.d.ts","sourceRoot":"","sources":["../src/types-public.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,oBAAoB,EACpB,aAAa,GACb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ import {
2
+ WorkerStartDiagnosticError
3
+ } from "./chunk-ZGFD76I6.js";
4
+ export {
5
+ WorkerStartDiagnosticError
6
+ };
7
+ //# sourceMappingURL=types-public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/types.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { Readable } from "node:stream";
2
+ import type { LeitwerkTransferManifestV1, SessionTransferLimits, SessionTransferPreflight, SessionTransferPreflightReport } from "@leitwerk-dev/session-transfer";
1
3
  /**
2
4
  * Runner API seams shared by worker run modes (Docker, Kubernetes, best-effort local).
3
5
  *
@@ -15,107 +17,206 @@
15
17
  * state over the protocol (the session-snapshot exchange), never by reading the
16
18
  * volume, which keeps every run mode symmetric.
17
19
  */
20
+ /** @internal */
18
21
  export interface VolumeRef {
22
+ /** @internal */
19
23
  instanceId: string;
20
- /** Runtime-specific identifier (host path, named volume, PVC name). */
24
+ /** Runtime-specific identifier (host path, named volume, PVC name). @internal */
21
25
  id: string;
22
- /** Path inside the worker container where the volume is mounted. */
26
+ /** Path inside the worker container where the volume is mounted. @internal */
23
27
  mountPath: string;
24
- /** Runtime-specific namespace/project for the volume (Kubernetes process namespace). */
28
+ /** Runtime-specific namespace/project for the volume (Kubernetes process namespace). @internal */
25
29
  namespace?: string;
26
30
  }
31
+ /** @internal */
32
+ export interface ProcessVolumeRequirements {
33
+ /** New Kubernetes PVC capacity. Existing volumes are unchanged; other runners ignore it. @internal */
34
+ size?: string;
35
+ /** Select storage compatible with a private Docker daemon. @internal */
36
+ docker?: boolean;
37
+ }
38
+ /** @internal */
39
+ export type ProcessStateExportPreflight = SessionTransferPreflight;
40
+ /** @internal */
41
+ export type ProcessStateExportHelperReport = SessionTransferPreflightReport;
42
+ /** Server-owned, credential-scoped relay used by isolated export helpers. @internal */
43
+ export interface ProcessStateExportHelperRelay {
44
+ /** @internal */
45
+ readonly exportId: string;
46
+ /** @internal */
47
+ readonly credential: string;
48
+ /** @internal */
49
+ waitForPreflight(signal?: AbortSignal): Promise<ProcessStateExportHelperReport>;
50
+ /** @internal */
51
+ activateStream(): Readable;
52
+ /** @internal */
53
+ fail(error: Error): void;
54
+ }
55
+ /** @internal */
56
+ export interface PreparedProcessStateExport {
57
+ /** @internal */
58
+ manifest: LeitwerkTransferManifestV1;
59
+ /** @internal */
60
+ preflight: ProcessStateExportPreflight;
61
+ /** @internal */
62
+ stream(input: {
63
+ /** @internal */
64
+ signal?: AbortSignal;
65
+ }): Readable;
66
+ }
67
+ /** Purpose-specific read-only export seam. It never creates a worker lease. @internal */
68
+ export interface ProcessStateExporter {
69
+ /** @internal */
70
+ prepare(input: {
71
+ /** @internal */
72
+ instanceId: string;
73
+ /** @internal */
74
+ manifest: LeitwerkTransferManifestV1;
75
+ /** @internal */
76
+ limits: SessionTransferLimits;
77
+ /** @internal */
78
+ signal?: AbortSignal;
79
+ }): Promise<PreparedProcessStateExport>;
80
+ /** Removes stale runner-specific export helpers after restart. @internal */
81
+ reconcile(): Promise<void>;
82
+ }
83
+ /** @internal */
84
+ export interface ProcessStateExportHelperRelayProvider {
85
+ /** @internal */
86
+ create(input: {
87
+ /** @internal */
88
+ instanceId: string;
89
+ /** @internal */
90
+ manifest: LeitwerkTransferManifestV1;
91
+ }): ProcessStateExportHelperRelay;
92
+ }
93
+ /** @internal */
27
94
  export interface ProcessVolume {
28
- /** Idempotently provisions durable storage for a process instance. */
29
- ensure(instanceId: string): Promise<VolumeRef>;
30
- /** Retention cleanup only. Stopping a worker never calls this. */
95
+ /** Idempotently provisions durable storage for a process instance. @internal */
96
+ ensure(instanceId: string, requirements?: ProcessVolumeRequirements, observer?: WorkerStartObserver): Promise<VolumeRef>;
97
+ /** Retention cleanup only. Stopping a worker never calls this. @internal */
31
98
  release(instanceId: string): Promise<void>;
32
- /** Permanently deletes every runner-managed resource owned by a deleted process. */
99
+ /** Permanently deletes every runner-managed resource owned by a deleted process. @internal */
33
100
  deleteProcessResources(instanceId: string): Promise<void>;
34
101
  }
35
102
  /**
36
103
  * Output of runtime-profile selection. MVP resolves to a single configured
37
104
  * worker image; repository branch content must never select an image.
38
105
  */
106
+ /** @internal */
39
107
  export interface ResolvedWorkerImage {
40
- /** Fully qualified image reference, ideally digest-pinned. */
108
+ /** Fully qualified image reference, ideally digest-pinned. @internal */
41
109
  reference: string;
42
110
  }
111
+ /** @internal */
43
112
  export interface WorkerResourceLimits {
113
+ /** @internal */
44
114
  cpu?: string;
115
+ /** @internal */
45
116
  memory?: string;
46
117
  }
47
- /**
48
- * Nested-container capability for the worker.
49
- *
50
- * - `{ dind: false }` — default unprivileged worker.
51
- * - `{ dind: "privileged" }` — inner `dockerd` started inside the worker.
52
- * - `{ dind: "sysbox" }` — nested daemon without `--privileged` (host must
53
- * provide the sysbox runtime).
54
- */
55
- export type WorkerIsolation = {
56
- dind: false;
57
- } | {
58
- dind: "privileged" | "sysbox";
59
- };
118
+ /** @internal */
60
119
  export interface WorkerUnitRef {
120
+ /** @internal */
61
121
  instanceId: string;
122
+ /** @internal */
62
123
  workerId: string;
63
- /** Runtime-specific handle id (container id, pod name). */
124
+ /** Runtime-specific handle id (container id, pod name). @internal */
64
125
  unitId: string;
65
- /** Runtime-specific namespace/project for the unit (Kubernetes process namespace). */
126
+ /** Runtime-specific namespace/project for the unit (Kubernetes process namespace). @internal */
66
127
  namespace?: string;
67
128
  }
129
+ /** @internal */
130
+ export declare class WorkerStartDiagnosticError extends Error {
131
+ /** @internal */
132
+ readonly publicDiagnostic: string;
133
+ /** @internal */
134
+ constructor(publicDiagnostic: string, cause?: unknown);
135
+ }
136
+ /** @internal */
68
137
  export interface WorkerExitInfo {
69
- /** Process exit code when the runtime reports one. */
138
+ /** Process exit code when the runtime reports one. @internal */
70
139
  exitCode: number | null;
71
- /** Termination signal when the runtime reports one. */
140
+ /** Termination signal when the runtime reports one. @internal */
72
141
  signal: string | null;
73
- /** True when the runtime killed the unit for exceeding memory limits. */
142
+ /** True when the runtime killed the unit for exceeding memory limits. @internal */
74
143
  oomKilled?: boolean;
75
- /** Human-readable reason surfaced by the runtime, if any. */
144
+ /** Human-readable reason surfaced by the runtime, if any. @internal */
76
145
  reason?: string;
77
146
  }
147
+ /** @internal */
78
148
  export interface WorkerUnit extends WorkerUnitRef {
79
- /** Maps physical worker exit into the supervisor's existing failure paths. */
149
+ /** Require successful runtime removal before the supervisor permits replacement. @internal */
150
+ replacementHandoff?: "stop-before-replacement";
151
+ /** Maps physical worker exit into the supervisor's existing failure paths. @internal */
80
152
  onExit(listener: (info: WorkerExitInfo) => void): void;
81
153
  }
154
+ /** @internal */
82
155
  export interface WorkerUnitDescriptor extends WorkerUnitRef {
156
+ /** @internal */
83
157
  observedState?: "running" | "pending" | "terminal" | "unknown";
84
158
  }
159
+ /** @internal */
85
160
  interface StartWorkerInputBase {
161
+ /** @internal */
86
162
  instanceId: string;
163
+ /** @internal */
87
164
  workerId: string;
165
+ /** @internal */
88
166
  serverEpoch: string;
89
- /** Runtime-profile selection output; MVP = single image. */
167
+ /** Runtime-profile selection output; MVP = single image. @internal */
90
168
  image: ResolvedWorkerImage;
91
- /** Server URL, ids, connect token, `PI_CODING_AGENT_DIR`, etc. */
169
+ /** Server URL, ids, connect token, `PI_CODING_AGENT_DIR`, etc. @internal */
92
170
  env: Record<string, string>;
93
- isolation: WorkerIsolation;
171
+ /** Start the image's private Docker daemon before the worker. @internal */
172
+ docker: boolean;
173
+ /** @internal */
94
174
  resources?: WorkerResourceLimits;
175
+ /** @internal */
176
+ resourceRequests?: WorkerResourceLimits;
95
177
  }
96
- /** Start input for the best-effort local runner, which uses configured host storage. */
178
+ /** Start input for the best-effort local runner, which uses configured host storage. @internal */
97
179
  export interface LocalStartWorkerInput extends StartWorkerInputBase {
180
+ /** @internal */
98
181
  runnerKind: "local";
182
+ /** @internal */
99
183
  volume?: never;
100
184
  }
101
- /** Start input for isolated runners, whose durable process volume is mandatory. */
185
+ /** Start input for isolated runners, whose durable process volume is mandatory. @internal */
102
186
  export interface IsolatedStartWorkerInput extends StartWorkerInputBase {
187
+ /** @internal */
103
188
  runnerKind: "isolated";
189
+ /** @internal */
104
190
  volume: VolumeRef;
105
191
  }
192
+ /** @internal */
106
193
  export type StartWorkerInput = LocalStartWorkerInput | IsolatedStartWorkerInput;
194
+ /** @internal */
107
195
  export interface StopWorkerOptions {
108
- /** Grace period before forceful termination. The volume is always kept. */
196
+ /** Grace period before forceful termination. The volume is always kept. @internal */
109
197
  graceMs: number;
110
198
  }
199
+ /** @internal */
200
+ export type WorkerStartPhase = "preparing_runtime" | "allocating_runtime" | "starting_runtime";
201
+ /** @internal */
202
+ export interface WorkerStartObserver {
203
+ /** @internal */
204
+ observe?(observation: Omit<import("@leitwerk-dev/domain").StartupObservation, "workerLeaseId" | "turnRecordId">): void;
205
+ /** @internal */
206
+ shouldStop?(): boolean;
207
+ /** @internal */
208
+ report(phase: WorkerStartPhase): void;
209
+ }
210
+ /** @internal */
111
211
  export interface WorkerRunner<TStartInput extends StartWorkerInput = StartWorkerInput> {
112
- start(input: TStartInput): Promise<WorkerUnit>;
113
- /** Stops the unit but keeps the process volume for resume. */
212
+ /** @internal */
213
+ start(input: TStartInput, observer?: WorkerStartObserver): Promise<WorkerUnit>;
214
+ /** Stops the unit but keeps the process volume for resume. @internal */
114
215
  stop(ref: WorkerUnitRef, opts: StopWorkerOptions): Promise<void>;
115
- /** Adoption scan: lists labelled worker units. */
216
+ /** Adoption scan: lists labelled worker units. @internal */
116
217
  list(): Promise<WorkerUnitDescriptor[]>;
117
- /** Reconnects to a live unit discovered by {@link WorkerRunner.list}. */
118
- adopt(descriptor: WorkerUnitDescriptor): Promise<WorkerUnit>;
218
+ /** Reconnects to a live unit discovered by {@link WorkerRunner.list}. @internal */
219
+ adopt(descriptor: WorkerUnitDescriptor, observer?: WorkerStartObserver): Promise<WorkerUnit>;
119
220
  }
120
221
  export {};
121
222
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,SAAS,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC7B,sEAAsE;IACtE,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/C,kEAAkE;IAClE,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,oFAAoF;IACpF,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1D;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,IAAI,EA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7 @@
1
- /**
2
- * Runner API seams shared by worker run modes (Docker, Kubernetes, best-effort local).
3
- *
4
- * The seam is cut so the runtimes share everything except the runtime-specific
5
- * bodies of two interfaces. The IPC transport is deliberately *not* a runner
6
- * axis: the runner only injects connect env, the worker dials back over
7
- * WebSocket, and the existing `WorkerWebSocketIpcManager` binds the socket to
8
- * the lease. The supervisor stays the lease/lifecycle coordinator; the runner
9
- * only does runtime-specific work.
10
- */
11
- export {};
1
+ import {
2
+ WorkerStartDiagnosticError
3
+ } from "./chunk-ZGFD76I6.js";
4
+ export {
5
+ WorkerStartDiagnosticError
6
+ };
12
7
  //# sourceMappingURL=types.js.map
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -7,44 +7,78 @@
7
7
  * them back during the adoption scan, so the keys and parse rules live here
8
8
  * rather than in a runtime-specific body.
9
9
  */
10
+ /** @internal */
10
11
  export declare const WORKER_LABEL_MANAGED_BY = "leitwerk.dev/managed-by";
12
+ /** @internal */
11
13
  export declare const WORKER_LABEL_COMPONENT = "leitwerk.dev/component";
14
+ /** @internal */
12
15
  export declare const WORKER_LABEL_INSTANCE_ID = "leitwerk.dev/instance-id";
16
+ /** @internal */
13
17
  export declare const WORKER_LABEL_WORKER_ID = "leitwerk.dev/worker-id";
18
+ /** @internal */
14
19
  export declare const WORKER_LABEL_SERVER_EPOCH = "leitwerk.dev/server-epoch";
20
+ /** @internal */
15
21
  export declare const WORKER_LABEL_MANAGED_BY_VALUE = "leitwerk";
22
+ /** @internal */
16
23
  export declare const WORKER_LABEL_COMPONENT_VALUE = "worker";
24
+ /** @internal */
17
25
  export declare const PROCESS_NAMESPACE_COMPONENT_VALUE = "process-namespace";
26
+ /** @internal */
18
27
  export declare const PROCESS_VOLUME_COMPONENT_VALUE = "process-volume";
28
+ /** @internal */
19
29
  export declare const PROCESS_SERVER_CA_COMPONENT_VALUE = "server-ca";
30
+ /** @internal */
20
31
  export declare const PROCESS_IMAGE_PULL_SECRET_COMPONENT_VALUE = "image-pull-secret";
32
+ /** @internal */
33
+ export declare const EXPORT_HELPER_COMPONENT_VALUE = "session-export-helper";
34
+ /** @internal */
35
+ export declare const EXPORT_HELPER_LABEL_EXPORT_ID = "leitwerk.dev/export-id";
36
+ /** @internal */
21
37
  export interface WorkerUnitIdentity {
38
+ /** @internal */
22
39
  instanceId: string;
40
+ /** @internal */
23
41
  workerId: string;
42
+ /** @internal */
24
43
  serverEpoch: string;
25
44
  }
26
45
  /**
27
46
  * Builds the canonical label set for a worker unit. Extra labels are merged in
28
47
  * but can never override the managed identity keys.
29
48
  */
49
+ /** @internal */
30
50
  export declare function buildWorkerUnitLabels(identity: WorkerUnitIdentity, extra?: Record<string, string>): Record<string, string>;
31
51
  /**
32
52
  * Builds labels for durable process-scoped resources (namespace/PVC). These
33
53
  * intentionally omit worker-id and server-epoch because the resources outlive a
34
54
  * specific worker lease and are not adoption targets.
35
55
  */
56
+ /** @internal */
36
57
  export declare function buildProcessResourceLabels(args: {
58
+ /** @internal */
37
59
  instanceId: string;
60
+ /** @internal */
38
61
  component: typeof PROCESS_NAMESPACE_COMPONENT_VALUE | typeof PROCESS_VOLUME_COMPONENT_VALUE | typeof PROCESS_SERVER_CA_COMPONENT_VALUE | typeof PROCESS_IMAGE_PULL_SECRET_COMPONENT_VALUE;
39
62
  }, extra?: Record<string, string>): Record<string, string>;
63
+ /** @internal */
40
64
  export declare function managedProcessNamespaceLabelSelector(): Record<string, string>;
41
- /** True when the labels identify an leitwerk-managed worker unit. */
65
+ /** @internal */
66
+ export declare function buildExportHelperLabels(input: {
67
+ /** @internal */
68
+ instanceId: string;
69
+ /** @internal */
70
+ exportId: string;
71
+ }): Record<string, string>;
72
+ /** @internal */
73
+ export declare function managedExportHelperLabelSelector(): Record<string, string>;
74
+ /** True when the labels identify an leitwerk-managed worker unit. @internal */
42
75
  export declare function isManagedWorkerUnitLabels(labels: Record<string, string>): boolean;
43
76
  /**
44
77
  * Recovers the worker identity from a unit's labels, or `null` when the labels
45
78
  * do not describe a complete leitwerk-managed worker.
46
79
  */
80
+ /** @internal */
47
81
  export declare function parseWorkerUnitIdentity(labels: Record<string, string>): WorkerUnitIdentity | null;
48
- /** Label selector for listing managed worker units in a runtime query. */
82
+ /** Label selector for listing managed worker units in a runtime query. @internal */
49
83
  export declare function managedWorkerLabelSelector(): Record<string, string>;
50
84
  //# sourceMappingURL=worker-labels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"worker-labels.d.ts","sourceRoot":"","sources":["../src/worker-labels.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AACjE,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AAErE,eAAO,MAAM,6BAA6B,aAAa,CAAC;AACxD,eAAO,MAAM,4BAA4B,WAAW,CAAC;AACrD,eAAO,MAAM,iCAAiC,sBAAsB,CAAC;AACrE,eAAO,MAAM,8BAA8B,mBAAmB,CAAC;AAC/D,eAAO,MAAM,iCAAiC,cAAc,CAAC;AAC7D,eAAO,MAAM,yCAAyC,sBAAsB,CAAC;AAE7E,MAAM,WAAW,kBAAkB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACpC,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAChC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASxB;AAED;;;;GAIG;A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;AAED,gBAAgB;AAChB,wBAAgB,gCAAgC,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEzE;AAED,+EAA+E;AAC/E,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAKjF;AAED;;;GAGG;AACH,gBAAgB;AAChB,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,kBAAkB,GAAG,IAAI,CAWjG;AAED,oFAAoF;AACpF,wBAAgB,0BAA0B,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEnE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leitwerk-dev/worker-runners",
3
- "version": "0.1.9",
3
+ "version": "0.2.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/leitwerk-dev/leitwerk.git",
@@ -14,42 +14,44 @@
14
14
  "types": "./dist/index.d.ts"
15
15
  },
16
16
  "./types": {
17
- "source": "./src/types.ts",
18
- "import": "./dist/types.js",
19
- "types": "./dist/types.d.ts"
17
+ "source": "./src/types-public.ts",
18
+ "import": "./dist/types-public.js",
19
+ "types": "./dist/types-public.d.ts"
20
20
  },
21
21
  "./local": {
22
- "source": "./src/local-worker-runner.ts",
23
- "import": "./dist/local-worker-runner.js",
24
- "types": "./dist/local-worker-runner.d.ts"
22
+ "source": "./src/local-public.ts",
23
+ "import": "./dist/local-public.js",
24
+ "types": "./dist/local-public.d.ts"
25
25
  },
26
26
  "./docker": {
27
- "source": "./src/docker-worker-runner.ts",
28
- "import": "./dist/docker-worker-runner.js",
29
- "types": "./dist/docker-worker-runner.d.ts"
27
+ "source": "./src/docker-public.ts",
28
+ "import": "./dist/docker-public.js",
29
+ "types": "./dist/docker-public.d.ts"
30
30
  },
31
31
  "./docker-client": {
32
- "source": "./src/docker-engine-http-client.ts",
33
- "import": "./dist/docker-engine-http-client.js",
34
- "types": "./dist/docker-engine-http-client.d.ts"
32
+ "source": "./src/docker-client-public.ts",
33
+ "import": "./dist/docker-client-public.js",
34
+ "types": "./dist/docker-client-public.d.ts"
35
35
  },
36
36
  "./kubernetes": {
37
- "source": "./src/kubernetes-worker-runner.ts",
38
- "import": "./dist/kubernetes-worker-runner.js",
39
- "types": "./dist/kubernetes-worker-runner.d.ts"
37
+ "source": "./src/kubernetes-public.ts",
38
+ "import": "./dist/kubernetes-public.js",
39
+ "types": "./dist/kubernetes-public.d.ts"
40
40
  },
41
41
  "./kubernetes-client": {
42
- "source": "./src/kubernetes-http-client.ts",
43
- "import": "./dist/kubernetes-http-client.js",
44
- "types": "./dist/kubernetes-http-client.d.ts"
42
+ "source": "./src/kubernetes-client-public.ts",
43
+ "import": "./dist/kubernetes-client-public.js",
44
+ "types": "./dist/kubernetes-client-public.d.ts"
45
45
  }
46
46
  },
47
47
  "scripts": {
48
48
  "build": "tsup --silent"
49
49
  },
50
50
  "dependencies": {
51
- "@leitwerk-dev/domain": "0.1.9",
52
- "@leitwerk-dev/watcher-utils": "0.1.9"
51
+ "@leitwerk-dev/domain": "0.2.1",
52
+ "@leitwerk-dev/session-transfer": "0.2.1",
53
+ "@leitwerk-dev/watcher-utils": "0.2.1",
54
+ "@leitwerk-dev/worker-protocol": "0.2.1"
53
55
  },
54
56
  "devDependencies": {
55
57
  "@types/node": "^22.15.30",
@@ -60,12 +62,13 @@
60
62
  "access": "public"
61
63
  },
62
64
  "engines": {
63
- "node": ">=22"
65
+ "node": ">=26 <27"
64
66
  },
65
67
  "files": [
66
68
  "dist/**",
67
69
  "src/**",
68
70
  "!dist/**/*.test.*",
69
- "!src/**/*.test.ts"
71
+ "!src/**/*.test.ts",
72
+ "!src/**/*.test-helper.ts"
70
73
  ]
71
74
  }
@@ -0,0 +1 @@
1
+ export { createDockerEngineHttpClient } from "./docker-engine-http-client.js";