@kitman-sh/cli 0.15.0 → 0.16.0

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 (28) hide show
  1. package/dist/{chunk-8wpg3rph.js → chunk-1scjh42j.js} +2 -2
  2. package/dist/{chunk-b16qxawc.js → chunk-23nvmnkp.js} +1 -1
  3. package/dist/{chunk-rt0qfdtg.js → chunk-4g7cj90y.js} +6 -6
  4. package/dist/{chunk-k2wd9r6t.js → chunk-4pq5vq59.js} +2 -2
  5. package/dist/{chunk-djp6t2g6.js → chunk-4v691rg5.js} +18 -18
  6. package/dist/{chunk-fv2zpgh0.js → chunk-5jt8b98c.js} +4 -4
  7. package/dist/{chunk-mrkrt2hg.js → chunk-9n6hd7es.js} +10 -10
  8. package/dist/{chunk-58hehm8d.js → chunk-cqejv8e6.js} +111 -28
  9. package/dist/{chunk-fzaecdgv.js → chunk-djdhep8n.js} +3 -3
  10. package/dist/{chunk-snwjv2sd.js → chunk-f02v4cdn.js} +1 -1
  11. package/dist/{chunk-csxxwscf.js → chunk-f2y0z04q.js} +1 -1
  12. package/dist/{chunk-3n99j4z0.js → chunk-g6nhny28.js} +23 -23
  13. package/dist/{chunk-4x7a1qkj.js → chunk-gpcrp0tc.js} +3 -3
  14. package/dist/{chunk-wfz64h9p.js → chunk-gt7gk0d4.js} +4 -4
  15. package/dist/{chunk-3ns4sbfb.js → chunk-gwzzacep.js} +1 -1
  16. package/dist/{chunk-xx711t5r.js → chunk-hbm0hybe.js} +4 -4
  17. package/dist/{chunk-vq7caqt2.js → chunk-n9fhwgzm.js} +36 -32
  18. package/dist/{chunk-vg78dz3w.js → chunk-ppdf5m4j.js} +34 -177
  19. package/dist/{chunk-qkt77rtj.js → chunk-r58fc2x9.js} +6 -6
  20. package/dist/{chunk-dx792s4w.js → chunk-rfnasm3c.js} +61 -61
  21. package/dist/{chunk-cf1hxp43.js → chunk-rv6d2r5v.js} +14 -14
  22. package/dist/{chunk-0ws25xvg.js → chunk-sd8b4k1t.js} +2 -2
  23. package/dist/{chunk-5hkdgzh4.js → chunk-x83q18w0.js} +1 -1
  24. package/dist/{chunk-4zc1g45m.js → chunk-xc76s9kk.js} +7 -7
  25. package/dist/{chunk-39ykbhq8.js → chunk-yg34g1m8.js} +5 -5
  26. package/dist/{chunk-8393zths.js → chunk-zgbjha6j.js} +286 -131
  27. package/dist/index.js +4 -4
  28. package/package.json +1 -1
@@ -24,11 +24,11 @@ import {
24
24
  Record,
25
25
  Int,
26
26
  fromJsonString
27
- } from "./chunk-dx792s4w.js";
27
+ } from "./chunk-rfnasm3c.js";
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-vg78dz3w.js";
31
+ } from "./chunk-ppdf5m4j.js";
32
32
  import {
33
33
  newerKitmanVersion,
34
34
  digestSha256,
@@ -39,7 +39,7 @@ import {
39
39
  get2,
40
40
  layer4,
41
41
  KitDigest
42
- } from "./chunk-8393zths.js";
42
+ } from "./chunk-zgbjha6j.js";
43
43
 
44
44
  // packages/core/src/npm-registry.ts
45
45
  var KitManifest = Struct({
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-k2wd9r6t.js";
2
+ import"./chunk-4pq5vq59.js";
3
3
  import {
4
4
  HERDR_CORE_GENERATION2,
5
5
  HERDR_CORE_INSTALL_COMMAND2,
@@ -12,9 +12,9 @@ import {
12
12
  herdrCoreLayer2,
13
13
  herdrCoreTransportLayer2,
14
14
  updateHerdrCore2
15
- } from "./chunk-8393zths.js";
16
- import"./chunk-vg78dz3w.js";
17
- import"./chunk-dx792s4w.js";
15
+ } from "./chunk-zgbjha6j.js";
16
+ import"./chunk-ppdf5m4j.js";
17
+ import"./chunk-rfnasm3c.js";
18
18
  export {
19
19
  HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
20
20
  HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,
@@ -3,7 +3,7 @@ import {
3
3
  Random,
4
4
  succeed6,
5
5
  withFiber2
6
- } from "./chunk-dx792s4w.js";
6
+ } from "./chunk-rfnasm3c.js";
7
7
 
8
8
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Random.js
9
9
  var Random2 = Random;
@@ -7,10 +7,10 @@ import {
7
7
  decoded2,
8
8
  readOpencode2,
9
9
  runOpencodeReader2
10
- } from "./chunk-39ykbhq8.js";
11
- import"./chunk-k2wd9r6t.js";
12
- import"./chunk-vg78dz3w.js";
13
- import"./chunk-dx792s4w.js";
10
+ } from "./chunk-yg34g1m8.js";
11
+ import"./chunk-4pq5vq59.js";
12
+ import"./chunk-ppdf5m4j.js";
13
+ import"./chunk-rfnasm3c.js";
14
14
  export {
15
15
  decoded2 as decoded,
16
16
  decodedOption2 as decodedOption,
@@ -12,7 +12,7 @@ import {
12
12
  succeed,
13
13
  isSuccess,
14
14
  TaggedError,
15
- make16,
15
+ make15,
16
16
  _await,
17
17
  fail5,
18
18
  succeed5,
@@ -108,21 +108,8 @@ import {
108
108
  decodeJsonStringOption,
109
109
  encodeJsonStringSync,
110
110
  encodePrettyJsonString
111
- } from "./chunk-dx792s4w.js";
111
+ } from "./chunk-rfnasm3c.js";
112
112
  import {
113
- tap,
114
- mapError,
115
- decodeText,
116
- run,
117
- mkString,
118
- FileSystem,
119
- Path,
120
- withDefault,
121
- option,
122
- String2
123
- } from "./chunk-vg78dz3w.js";
124
- import {
125
- currentTimeMillis,
126
113
  SecureRandom,
127
114
  layerWebCrypto,
128
115
  runMain,
@@ -251,15 +238,28 @@ import {
251
238
  harnessNames,
252
239
  herdrRunnerCapabilities2,
253
240
  declaredChecks
254
- } from "./chunk-8393zths.js";
241
+ } from "./chunk-zgbjha6j.js";
255
242
  import {
256
- Id,
257
- Timestamp
258
- } from "./chunk-5hkdgzh4.js";
243
+ currentTimeMillis,
244
+ tap,
245
+ mapError,
246
+ decodeText,
247
+ run,
248
+ mkString,
249
+ FileSystem,
250
+ Path,
251
+ withDefault,
252
+ option,
253
+ String2
254
+ } from "./chunk-ppdf5m4j.js";
259
255
  import {
260
256
  ChildProcessSpawner,
261
257
  make3
262
- } from "./chunk-k2wd9r6t.js";
258
+ } from "./chunk-4pq5vq59.js";
259
+ import {
260
+ Id,
261
+ Timestamp
262
+ } from "./chunk-x83q18w0.js";
263
263
 
264
264
  // apps/cli/src/cli-error.ts
265
265
  function cliErrorCode(error, status) {
@@ -1326,10 +1326,10 @@ var sandboxMissing = (sandbox, missing) => ({
1326
1326
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
1327
1327
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
1328
1328
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
1329
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-wfz64h9p.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1329
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-gt7gk0d4.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
1330
1330
  });
1331
1331
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
1332
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-wfz64h9p.js")), (module) => module.updateHerdrCore(options))
1332
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-gt7gk0d4.js")), (module) => module.updateHerdrCore(options))
1333
1333
  });
1334
1334
  var herdrCoreMissing = (error) => {
1335
1335
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1773,7 +1773,7 @@ var syncTargets = (harness) => gen(function* () {
1773
1773
  });
1774
1774
  var syncKits = (input) => gen(function* () {
1775
1775
  const fs = yield* FileSystem;
1776
- const { syncKitSetup } = yield* promise(() => import("./chunk-4zc1g45m.js"));
1776
+ const { syncKitSetup } = yield* promise(() => import("./chunk-xc76s9kk.js"));
1777
1777
  const harnesses = yield* syncTargets(input.harness);
1778
1778
  const chain = yield* input.client.getKitChain(input.workspaceId);
1779
1779
  for (const { name, problem } of chain.skipped)
@@ -3268,7 +3268,7 @@ var shipped_steps_generated_default = {
3268
3268
  };
3269
3269
 
3270
3270
  // apps/cli/src/scaffold-files.ts
3271
- var cliVersion = "0.15.0";
3271
+ var cliVersion = "0.16.0";
3272
3272
  var shippedLoopSteps = new Map(Object.entries(shipped_steps_generated_default));
3273
3273
  var loopSteps = (loop) => shippedLoopSteps.get(loop) ?? [];
3274
3274
  var replacedStep = (loop) => loopSteps(loop).find((step) => step.from === defaultKitName && step.exported?.startsWith("steps.") === true);
@@ -3533,7 +3533,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
3533
3533
 
3534
3534
  // apps/cli/src/commands.ts
3535
3535
  var ClientId = "kitman-cli";
3536
- var agentRuntime = promise(() => import("./chunk-58hehm8d.js"));
3536
+ var agentRuntime = promise(() => import("./chunk-cqejv8e6.js"));
3537
3537
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
3538
3538
  defaultValue: () => gen(function* () {
3539
3539
  const tui = yield* tryPromise({
@@ -5072,7 +5072,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
5072
5072
  });
5073
5073
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
5074
5074
  defaultValue: () => (options) => gen(function* () {
5075
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-qkt77rtj.js"));
5075
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-r58fc2x9.js"));
5076
5076
  return yield* makeRunnerRpcClient({
5077
5077
  runnerId: options.runnerId,
5078
5078
  bearer: options.bearer,
@@ -5385,7 +5385,7 @@ function startCanonicalHerdrRunnerCommand(input) {
5385
5385
  yield* controlPlane.client.listRepoBindings(runner.workspaceId).pipe(flatMap3(({ items }) => forEach(items.filter((binding) => binding.status === "active" && (teamId === undefined || binding.teamId === teamId)), (repoBinding) => map9(checkouts.reaches(repoBinding), (reachable) => ({ repoBinding, reachable })), { concurrency: 4 })), tap2((probed) => sync2(() => reached = probed)), catch_((error) => logWarning("runner_repository_probe_failed", error.message)), flatMap3(() => sleep(reached.some((probe) => !probe.reachable) ? repositoryRetryInterval : repositoryProbeInterval)), forever, forkScoped);
5386
5386
  yield* suspend3(() => sleep(ownerLogin.expired() ? ownerLoginRetryInterval : ownerLoginInterval)).pipe(andThen2(checkOwnerLogin), forever, forkScoped);
5387
5387
  const platform = yield* context();
5388
- const updated = yield* make16();
5388
+ const updated = yield* make15();
5389
5389
  const scope = yield* scope2;
5390
5390
  const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
5391
5391
  const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
@@ -5645,7 +5645,7 @@ function mcpCommand(args) {
5645
5645
  if (command.action === "run") {
5646
5646
  if (command.args.length > 0)
5647
5647
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
5648
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-3n99j4z0.js"));
5648
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-g6nhny28.js"));
5649
5649
  return yield* runMcpServerCommand({ flags: command.flags });
5650
5650
  }
5651
5651
  if (command.action !== "setup")
@@ -6145,7 +6145,7 @@ function programLoopCommand(command) {
6145
6145
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
6146
6146
  });
6147
6147
  }
6148
- var docsModule = promise(() => import("./chunk-b16qxawc.js"));
6148
+ var docsModule = promise(() => import("./chunk-23nvmnkp.js"));
6149
6149
  function docsCommand(args) {
6150
6150
  return gen(function* () {
6151
6151
  const command = parseCommand(args);
@@ -6648,6 +6648,8 @@ var transcriptEventLine = (event) => {
6648
6648
  return `${event.kind}: ${event.text}`;
6649
6649
  case "secret_refused":
6650
6650
  return `refused ${event.reference ?? "a tunnel"} for ${event.host}: ${event.reason}`;
6651
+ case "harness_error":
6652
+ return `harness error: ${event.text}`;
6651
6653
  case "lifecycle":
6652
6654
  return `session ${event.state}`;
6653
6655
  }
@@ -7147,7 +7149,7 @@ function changeRequestCommand(args) {
7147
7149
  yield* log(command.action === "approve" ? `Approved ${short} of ${changeRequest.title}. A Run waiting on approval of ${short} resumes; one waiting on another head does not.` : `Requested changes to ${short} of ${changeRequest.title}`);
7148
7150
  });
7149
7151
  }
7150
- var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-mrkrt2hg.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
7152
+ var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-9n6hd7es.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
7151
7153
  var loopOutline = (command) => gen(function* () {
7152
7154
  const path = yield* Path;
7153
7155
  const loop = requiredArg(command, "a Loop id");
@@ -7167,9 +7169,9 @@ var loopOutline = (command) => gen(function* () {
7167
7169
  `).pipe(mapError2((error) => new CliError({ message: error.message })));
7168
7170
  yield* log(`Wrote the outline of ${loop} to ${out}`);
7169
7171
  });
7170
- var KitWriter = map9(promise(() => import("./chunk-mrkrt2hg.js")), (build) => build.writeKit);
7172
+ var KitWriter = map9(promise(() => import("./chunk-9n6hd7es.js")), (build) => build.writeKit);
7171
7173
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
7172
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-mrkrt2hg.js")), (build) => build.buildKit(directory))
7174
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-9n6hd7es.js")), (build) => build.buildKit(directory))
7173
7175
  });
7174
7176
  var uploadKit = (client, workspaceId, built) => gen(function* () {
7175
7177
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -8218,6 +8220,8 @@ function agentStepRunOutcome(outcome, step) {
8218
8220
  case "failed":
8219
8221
  if (outcome.reason === "harness_login_lost")
8220
8222
  return { status: "failed", summary: outcome.summary, restart: { reason: "login_revoked" } };
8223
+ if (outcome.reason === "harness_error")
8224
+ return { status: "failed", summary: outcome.summary, restart: { reason: "harness_error" } };
8221
8225
  if (!failedToStart(outcome.reason))
8222
8226
  return { status: "failed", summary: outcome.summary };
8223
8227
  return {
@@ -34,11 +34,8 @@ import {
34
34
  getOrUndefined,
35
35
  map4,
36
36
  Service2,
37
- add,
38
- get4,
37
+ get3,
39
38
  Reference,
40
- fromInputUnsafe,
41
- isFinite,
42
39
  normalize,
43
40
  succeed,
44
41
  fail3,
@@ -81,12 +78,13 @@ import {
81
78
  fiberRunIn,
82
79
  makeLatchUnsafe,
83
80
  makeLatch,
81
+ ClockRef,
82
+ currentTimeMillis2,
84
83
  succeed3,
85
84
  failCause2,
86
85
  fail4,
87
86
  interrupt2,
88
87
  void_2,
89
- isSuccess2,
90
88
  isFailure2,
91
89
  asVoidAll,
92
90
  makeUnsafe5,
@@ -158,14 +156,12 @@ import {
158
156
  tapError2,
159
157
  ignoreCause,
160
158
  orElseSucceed,
161
- sleep,
162
159
  raceFirst,
163
160
  when,
164
161
  matchCauseEffect,
165
162
  context,
166
163
  contextWith,
167
164
  provideContext2,
168
- scope2,
169
165
  scoped,
170
166
  scopedWith,
171
167
  acquireRelease,
@@ -176,7 +172,6 @@ import {
176
172
  interrupt3,
177
173
  onInterrupt,
178
174
  uninterruptible,
179
- uninterruptibleMask2,
180
175
  forever,
181
176
  forkChild,
182
177
  forkIn,
@@ -199,11 +194,11 @@ import {
199
194
  toEncoded,
200
195
  decodeUnknownEffect,
201
196
  SchemaError,
202
- make17,
197
+ make16,
203
198
  String4,
204
199
  toCodecStringTree,
205
200
  encodeUnknownJsonStringSync
206
- } from "./chunk-dx792s4w.js";
201
+ } from "./chunk-rfnasm3c.js";
207
202
 
208
203
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
209
204
  var headUnsafe = (self) => {
@@ -252,6 +247,10 @@ var makeEquivalence = (equivalence) => {
252
247
  return (self, that) => is(self, that) && is(that, self);
253
248
  };
254
249
 
250
+ // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Clock.js
251
+ var Clock = ClockRef;
252
+ var currentTimeMillis = currentTimeMillis2;
253
+
255
254
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/ByteSize.js
256
255
  var bigint0 = /* @__PURE__ */ BigInt(0);
257
256
  var bigint1 = /* @__PURE__ */ BigInt(1);
@@ -372,7 +371,7 @@ var fromStringUnsafe = (input) => {
372
371
  return invalid(`${JSON.stringify(input)} does not represent an integral number of bytes`);
373
372
  return make(value);
374
373
  };
375
- var fromInputUnsafe2 = (input) => {
374
+ var fromInputUnsafe = (input) => {
376
375
  switch (typeof input) {
377
376
  case "bigint":
378
377
  if (input < bigint0)
@@ -385,7 +384,7 @@ var fromInputUnsafe2 = (input) => {
385
384
  }
386
385
  return invalid(`unsupported input ${input}`);
387
386
  };
388
- var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe2(value) : fromNumber(value);
387
+ var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe(value) : fromNumber(value);
389
388
 
390
389
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Fiber.js
391
390
  var join = fiberJoin;
@@ -1311,7 +1310,7 @@ var publishUnsafe = /* @__PURE__ */ dual(2, (self, value) => {
1311
1310
  return false;
1312
1311
  });
1313
1312
  var subscribe = (self) => uninterruptible(contextWith((services) => {
1314
- const localScope = get4(services, Scope);
1313
+ const localScope = get3(services, Scope);
1315
1314
  const scope = forkUnsafe(self.scope);
1316
1315
  const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
1317
1316
  return addFinalizer(scope, unsubscribe(subscription)).pipe(andThen2(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
@@ -2808,158 +2807,16 @@ var forEachArray = (f) => fromTransform2((upstream) => upstream.pipe(flatMap3(f)
2808
2807
  }), catchDone(() => endVoid)));
2809
2808
  var unwrap3 = (effect) => fromChannel(unwrap2(map9(effect, toChannel)));
2810
2809
 
2811
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/rcRef.js
2812
- var TypeId8 = "~effect/RcRef";
2813
- var stateEmpty = {
2814
- _tag: "Empty"
2815
- };
2816
- var stateClosed = {
2817
- _tag: "Closed"
2818
- };
2819
- var variance2 = {
2820
- _A: identity,
2821
- _E: identity
2822
- };
2823
-
2824
- class RcRefImpl {
2825
- [TypeId8] = variance2;
2826
- pipe() {
2827
- return pipeArguments(this, arguments);
2828
- }
2829
- state = stateEmpty;
2830
- acquire;
2831
- context;
2832
- scope;
2833
- idleTimeToLive;
2834
- constructor(acquire, context, scope, idleTimeToLive) {
2835
- this.acquire = acquire;
2836
- this.context = context;
2837
- this.scope = scope;
2838
- this.idleTimeToLive = idleTimeToLive;
2839
- }
2840
- }
2841
- var make6 = (options) => withFiber2((fiber) => {
2842
- const context = fiber.context;
2843
- const scope = get4(context, Scope);
2844
- const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
2845
- return as(addFinalizerExit(scope, () => {
2846
- const state = ref.state;
2847
- ref.state = stateClosed;
2848
- if (state._tag === "Acquired")
2849
- return close(state.scope, void_2);
2850
- if (state._tag === "Acquiring")
2851
- return interrupt(state.fiber);
2852
- return void_3;
2853
- }), ref);
2854
- });
2855
- var getState = (self, restore) => {
2856
- switch (self.state._tag) {
2857
- case "Closed": {
2858
- return interrupt3;
2859
- }
2860
- case "Acquired": {
2861
- const state = self.state;
2862
- state.refCount++;
2863
- return state.fiber ? as(interrupt(state.fiber), state) : succeed6(state);
2864
- }
2865
- case "Acquiring": {
2866
- const state = self.state;
2867
- state.awaiters++;
2868
- return awaitAcquiring(self, state, restore);
2869
- }
2870
- case "Empty": {
2871
- const acquiring = {
2872
- _tag: "Acquiring",
2873
- fiber: undefined,
2874
- awaiters: 1,
2875
- acquired: undefined
2876
- };
2877
- self.state = acquiring;
2878
- const scope = makeUnsafe6();
2879
- const acquire = provideContext2(self.acquire, add(self.context, Scope, scope)).pipe(flatMap3((value) => {
2880
- if (self.state !== acquiring) {
2881
- return interrupt3;
2882
- }
2883
- const state = {
2884
- _tag: "Acquired",
2885
- value,
2886
- scope,
2887
- fiber: undefined,
2888
- refCount: acquiring.awaiters,
2889
- invalidated: false
2890
- };
2891
- self.state = state;
2892
- acquiring.acquired = state;
2893
- return succeed6(state);
2894
- }), onExit((exit) => {
2895
- if (isSuccess2(exit))
2896
- return void_3;
2897
- if (self.state === acquiring)
2898
- self.state = stateEmpty;
2899
- return close(scope, exit);
2900
- }));
2901
- acquiring.fiber = runForkWith(getCurrent().context)(acquire);
2902
- return awaitAcquiring(self, acquiring, restore);
2903
- }
2904
- }
2905
- };
2906
- var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
2907
- const acquired = acquiring.acquired;
2908
- if (acquired !== undefined) {
2909
- return isFailure2(exit) ? release(self, acquired) : void_3;
2910
- }
2911
- if (--acquiring.awaiters > 0 || self.state !== acquiring)
2912
- return void_3;
2913
- self.state = stateEmpty;
2914
- return interrupt(acquiring.fiber);
2915
- });
2916
- var get2 = (self_) => {
2917
- const self = self_;
2918
- return uninterruptibleMask2((restore) => flatMap3(scope2, (scope) => flatMap3(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
2919
- };
2920
- var release = (self, state) => {
2921
- state.refCount--;
2922
- if (state.refCount > 0) {
2923
- return void_3;
2924
- }
2925
- const idleTimeToLive = self.idleTimeToLive;
2926
- if (idleTimeToLive === undefined || state.invalidated) {
2927
- if (self.state === state) {
2928
- self.state = stateEmpty;
2929
- }
2930
- return close(state.scope, void_2);
2931
- } else if (!isFinite(idleTimeToLive)) {
2932
- return void_3;
2933
- }
2934
- state.fiber = uninterruptibleMask2((restore) => flatMap3(restore(sleep(idleTimeToLive)), () => {
2935
- if (self.state === state && state.refCount === 0) {
2936
- self.state = stateEmpty;
2937
- return ignoreCause(close(state.scope, void_2), {
2938
- log: "Unhandled",
2939
- message: "Unhandled error in RcRef finalizer"
2940
- });
2941
- }
2942
- return void_3;
2943
- })).pipe(ensuring2(sync2(() => {
2944
- state.fiber = undefined;
2945
- })), runForkWith(self.context), runIn(self.scope));
2946
- return void_3;
2947
- };
2948
-
2949
- // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
2950
- var make10 = make6;
2951
- var get3 = get2;
2952
-
2953
2810
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
2954
- var TypeId9 = "~effect/Stream";
2955
- var isStream = (u) => hasProperty(u, TypeId9);
2811
+ var TypeId8 = "~effect/Stream";
2812
+ var isStream = (u) => hasProperty(u, TypeId8);
2956
2813
  var fromChannel2 = fromChannel3;
2957
2814
  var fromPull2 = (pull) => fromChannel2(fromPull(pull));
2958
2815
  var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatMap3(toPullScoped(self.channel, scope), (pull) => f(pull, scope))));
2959
2816
  var toChannel2 = (stream) => stream.channel;
2960
2817
  var callback = (f, options) => fromChannel2(callbackArray(f, options));
2961
2818
  var empty2 = /* @__PURE__ */ fromChannel2(empty);
2962
- var make11 = (...values) => fromArray2(values);
2819
+ var make10 = (...values) => fromArray2(values);
2963
2820
  var suspend = (stream) => {
2964
2821
  const suspended = fromChannel2(suspend4(() => stream().channel));
2965
2822
  suspendedStreams.set(suspended, stream);
@@ -3157,11 +3014,11 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
3157
3014
  var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map9(context(), (context) => toReadableStreamWith(self, context, options)));
3158
3015
 
3159
3016
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
3160
- var TypeId10 = "~effect/FileSystem";
3017
+ var TypeId9 = "~effect/FileSystem";
3161
3018
  var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
3162
- var make12 = (impl) => FileSystem.of({
3019
+ var make11 = (impl) => FileSystem.of({
3163
3020
  ...impl,
3164
- [TypeId10]: TypeId10,
3021
+ [TypeId9]: TypeId9,
3165
3022
  glob: make2(impl),
3166
3023
  exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) : fail7(e))),
3167
3024
  readFileString: (path, encoding) => flatMap3(impl.readFile(path), (_) => try_2({
@@ -3177,11 +3034,11 @@ var make12 = (impl) => FileSystem.of({
3177
3034
  const file = yield* impl.open(path, {
3178
3035
  flag: "r"
3179
3036
  });
3180
- const offset = options?.offset === undefined ? undefined : fromInputUnsafe2(options.offset);
3037
+ const offset = options?.offset === undefined ? undefined : fromInputUnsafe(options.offset);
3181
3038
  if (offset) {
3182
3039
  yield* file.seek(offset, "start");
3183
3040
  }
3184
- const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe2(options.bytesToRead);
3041
+ const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe(options.bytesToRead);
3185
3042
  let totalBytesRead = BigInt(0);
3186
3043
  const chunkSize = Number(BigInt(options?.chunkSize ?? 64 * 1024));
3187
3044
  const readChunk = file.readAlloc(chunkSize);
@@ -3217,11 +3074,11 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
3217
3074
  }
3218
3075
 
3219
3076
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
3220
- var TypeId11 = "~effect/Path";
3077
+ var TypeId10 = "~effect/Path";
3221
3078
  var Path = /* @__PURE__ */ Service2("effect/Path");
3222
- var make13 = (impl) => Path.of({
3079
+ var make12 = (impl) => Path.of({
3223
3080
  ...impl,
3224
- [TypeId11]: TypeId11,
3081
+ [TypeId10]: TypeId10,
3225
3082
  resolveWithin(root, input) {
3226
3083
  if (impl.parse(input).root !== "")
3227
3084
  return none();
@@ -3294,7 +3151,7 @@ function makeProvider(load, mapInput) {
3294
3151
  function makeSource(get, transform) {
3295
3152
  return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
3296
3153
  }
3297
- function make7(get) {
3154
+ function make6(get) {
3298
3155
  return makeSource(get, identityPath);
3299
3156
  }
3300
3157
  function emptyStringAsMissing(value, preserveEmptyStrings) {
@@ -3303,7 +3160,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
3303
3160
  function fromEnvRecord(env, options) {
3304
3161
  const preserveEmptyStrings = options?.preserveEmptyStrings === true;
3305
3162
  const trie = buildEnvTrie(env);
3306
- return make7((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
3163
+ return make6((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
3307
3164
  }
3308
3165
  function fromEnv(options) {
3309
3166
  const env = options?.env ?? {
@@ -3356,7 +3213,7 @@ function trieNodeAt(root, path) {
3356
3213
  }
3357
3214
 
3358
3215
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Config.js
3359
- var TypeId12 = "~effect/Config";
3216
+ var TypeId11 = "~effect/Config";
3360
3217
  class ConfigError {
3361
3218
  _tag = "ConfigError";
3362
3219
  name = "ConfigError";
@@ -3378,14 +3235,14 @@ var Proto2 = {
3378
3235
  return this.parse(fiber.getRef(ConfigProvider));
3379
3236
  }
3380
3237
  }),
3381
- [TypeId12]: TypeId12,
3238
+ [TypeId11]: TypeId11,
3382
3239
  toJSON() {
3383
3240
  return {
3384
3241
  _id: "Config"
3385
3242
  };
3386
3243
  }
3387
3244
  };
3388
- function make14(evaluator) {
3245
+ function make7(evaluator) {
3389
3246
  const self = Object.create(Proto2);
3390
3247
  self.evaluator = evaluator;
3391
3248
  self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
@@ -3393,14 +3250,14 @@ function make14(evaluator) {
3393
3250
  }
3394
3251
  var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
3395
3252
  var map3 = /* @__PURE__ */ dual(2, (self, f) => {
3396
- return make14((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
3253
+ return make7((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
3397
3254
  });
3398
3255
  function all(arg) {
3399
3256
  const configs = globalThis.Array.isArray(arg) ? arg : (Symbol.iterator in arg) ? [...arg] : arg;
3400
- return make14((provider, pathPrefix) => globalThis.Array.isArray(configs) ? mapEager(all3(configs.map((config) => evaluateAt(config, provider, pathPrefix))), all2) : mapEager(all3(map(configs, (config) => evaluateAt(config, provider, pathPrefix))), all2));
3257
+ return make7((provider, pathPrefix) => globalThis.Array.isArray(configs) ? mapEager(all3(configs.map((config) => evaluateAt(config, provider, pathPrefix))), all2) : mapEager(all3(map(configs, (config) => evaluateAt(config, provider, pathPrefix))), all2));
3401
3258
  }
3402
3259
  var withDefault = /* @__PURE__ */ dual(2, (self, defaultValue) => {
3403
- return make14((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
3260
+ return make7((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
3404
3261
  });
3405
3262
  var option = (self) => self.pipe(map3(some), withDefault(none()));
3406
3263
  var isSourceError = (u) => isTagged(u, "SourceError");
@@ -3517,9 +3374,9 @@ var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
3517
3374
  function schema(codec, path) {
3518
3375
  const codecStringTree = toCodecStringTree(codec);
3519
3376
  const encodedAst = toEncoded(codecStringTree.ast);
3520
- const decodeCursor = decodeUnknownEffect(make17(toConfigCursorAST(codecStringTree.ast)));
3377
+ const decodeCursor = decodeUnknownEffect(make16(toConfigCursorAST(codecStringTree.ast)));
3521
3378
  const localPath = typeof path === "string" ? [path] : path ?? [];
3522
- return make14((provider, pathPrefix) => {
3379
+ return make7((provider, pathPrefix) => {
3523
3380
  const fullPath = [...pathPrefix, ...localPath];
3524
3381
  return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed), catchEager((issue) => {
3525
3382
  const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
@@ -3635,4 +3492,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
3635
3492
  ...argv
3636
3493
  ];
3637
3494
 
3638
- export { map, makeEquivalence, bytes, join, interrupt, getCurrent, BadArgument, systemError, badArgument, makeUnsafe2, make8, unbounded, publishUnsafe, make9, bounded, sliding, unbounded2, offer, offerUnsafe, offerAll, fail, failCause, failCauseUnsafe, end, endUnsafe, shutdownUnsafe, take, poll, makeUnsafe3, fromTransform, mapDone, isSink, fromChannel, drain, make10, get3, isStream, fromChannel2, callback, empty2, make11, suspend, fail2, fromQueue, fromPubSub, fromReadableStream, unwrap, map2, tap, drainFork, concat, merge2, filter, catchCause, tapError, mapError, take2, mapAccum, transduce, decodeText, encodeText, splitLines, interruptWhen, ensuring, provideContext, run, runCollect, runFold, runHead, runForEach, runDrain, mkString, mkArrayBuffer, toReadableStreamEffect, FileSystem, make12, FileTypeId, WatchBackend, Path, make13, embeddedFile, extractEmbeddedFile, map3, all, withDefault, option, String2, optionalEnv, operatorConfigHome, tempDirectoryScoped, harnessesUnsupportedInSrt2, harnessesUnsupportedInDocker2, compiled2, pinnedSrtCommand2, pinnedSrtStepCommand2, runSrtCli2, kitmanCacheDirectory2, srtSettings2, srtCacheEnvironment2, srtInheritedEnv2, inheritedEnvironment2, withOnlyEnvironment2, writeSrtSettings2, srtStepArgv2, srtArgv2 };
3495
+ export { map, makeEquivalence, Clock, currentTimeMillis, bytes, join, interrupt, getCurrent, runIn, BadArgument, systemError, badArgument, makeUnsafe2, make8, unbounded, publishUnsafe, make9, bounded, sliding, unbounded2, offer, offerUnsafe, offerAll, fail, failCause, failCauseUnsafe, end, endUnsafe, shutdownUnsafe, take, poll, makeUnsafe3, fromTransform, mapDone, isSink, fromChannel, drain, isStream, fromChannel2, callback, empty2, make10, suspend, fail2, fromQueue, fromPubSub, fromReadableStream, unwrap, map2, tap, drainFork, concat, merge2, filter, catchCause, tapError, mapError, take2, mapAccum, transduce, decodeText, encodeText, splitLines, interruptWhen, ensuring, provideContext, run, runCollect, runFold, runHead, runForEach, runDrain, mkString, mkArrayBuffer, toReadableStreamEffect, FileSystem, make11, FileTypeId, WatchBackend, Path, make12, embeddedFile, extractEmbeddedFile, map3, all, withDefault, option, String2, optionalEnv, operatorConfigHome, tempDirectoryScoped, harnessesUnsupportedInSrt2, harnessesUnsupportedInDocker2, compiled2, pinnedSrtCommand2, pinnedSrtStepCommand2, runSrtCli2, kitmanCacheDirectory2, srtSettings2, srtCacheEnvironment2, srtInheritedEnv2, inheritedEnvironment2, withOnlyEnvironment2, writeSrtSettings2, srtStepArgv2, srtArgv2 };
@@ -4,12 +4,12 @@ import {
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2,
6
6
  makeProgramRpcClient2
7
- } from "./chunk-rt0qfdtg.js";
8
- import"./chunk-djp6t2g6.js";
9
- import"./chunk-8393zths.js";
10
- import"./chunk-5hkdgzh4.js";
11
- import"./chunk-vg78dz3w.js";
12
- import"./chunk-dx792s4w.js";
7
+ } from "./chunk-4g7cj90y.js";
8
+ import"./chunk-4v691rg5.js";
9
+ import"./chunk-zgbjha6j.js";
10
+ import"./chunk-x83q18w0.js";
11
+ import"./chunk-ppdf5m4j.js";
12
+ import"./chunk-rfnasm3c.js";
13
13
  export {
14
14
  makeProgramRpcClient2 as makeProgramRpcClient,
15
15
  makeRunnerRpcClient2 as makeRunnerRpcClient,