@kitman-sh/cli 0.18.0 → 0.19.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.
- package/dist/{chunk-d3gs4jvd.js → chunk-0sbd6e4d.js} +64 -64
- package/dist/{chunk-my92qn4x.js → chunk-2dhhyy04.js} +8 -8
- package/dist/{chunk-mqsxwm53.js → chunk-2y646fhs.js} +18 -18
- package/dist/{chunk-wg6xkkcr.js → chunk-36dejya4.js} +1 -1
- package/dist/{chunk-hj8ex4x6.js → chunk-3gmqn9yp.js} +4 -4
- package/dist/{chunk-mg3mxhxe.js → chunk-4rq880g6.js} +6 -6
- package/dist/{chunk-vz38kngm.js → chunk-6387vj9z.js} +2 -2
- package/dist/{chunk-samxkpbz.js → chunk-6hxtg6eb.js} +3 -3
- package/dist/{chunk-js64y97w.js → chunk-9cj8g584.js} +4 -4
- package/dist/{chunk-9jffw2mk.js → chunk-am57a75e.js} +3 -3
- package/dist/{chunk-x8zzax0f.js → chunk-bevxc9rx.js} +10 -10
- package/dist/{chunk-zmqm4mrm.js → chunk-e863b7v1.js} +277 -117
- package/dist/{chunk-h2f26xbd.js → chunk-ew07nt2d.js} +61 -61
- package/dist/{chunk-mca2zp8p.js → chunk-gqcz0d3j.js} +1 -1
- package/dist/{chunk-tsx0347c.js → chunk-haq904fk.js} +1 -1
- package/dist/{chunk-nfnw3dh1.js → chunk-hrdh72c7.js} +9 -9
- package/dist/{chunk-1j38xtvp.js → chunk-khn17hdn.js} +2 -2
- package/dist/{chunk-bqhfbng3.js → chunk-kx00yd3c.js} +13 -13
- package/dist/{chunk-2bagaygt.js → chunk-qp3kqaw1.js} +6 -6
- package/dist/{chunk-4qjfn1sa.js → chunk-qvpkwnky.js} +1 -1
- package/dist/{chunk-n05bj55h.js → chunk-t5gb7bqv.js} +30 -30
- package/dist/{chunk-gap0vmj7.js → chunk-t6y0c0ds.js} +2 -2
- package/dist/{chunk-63cyj9dh.js → chunk-w9mxqrsp.js} +33 -185
- package/dist/{chunk-jaa8qjky.js → chunk-y4nrvwgy.js} +9 -9
- package/dist/{chunk-5kqt4bqp.js → chunk-y7bth30s.js} +1 -1
- package/dist/{chunk-4p1k3yyc.js → chunk-zb8mwx3s.js} +17 -17
- package/dist/index.js +4 -4
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
succeed,
|
|
13
13
|
isSuccess,
|
|
14
14
|
TaggedError,
|
|
15
|
-
|
|
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-
|
|
111
|
+
} from "./chunk-ew07nt2d.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-63cyj9dh.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-
|
|
241
|
+
} from "./chunk-e863b7v1.js";
|
|
242
|
+
import {
|
|
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-w9mxqrsp.js";
|
|
255
255
|
import {
|
|
256
256
|
ChildProcessSpawner,
|
|
257
257
|
make3
|
|
258
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-t6y0c0ds.js";
|
|
259
259
|
import {
|
|
260
260
|
Id,
|
|
261
261
|
Timestamp
|
|
262
|
-
} from "./chunk-
|
|
262
|
+
} from "./chunk-qvpkwnky.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-
|
|
1329
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-3gmqn9yp.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-
|
|
1332
|
+
defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-3gmqn9yp.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-
|
|
1776
|
+
const { syncKitSetup } = yield* promise(() => import("./chunk-bevxc9rx.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.
|
|
3271
|
+
var cliVersion = "0.19.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-
|
|
3536
|
+
var agentRuntime = promise(() => import("./chunk-0sbd6e4d.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-
|
|
5075
|
+
const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-qp3kqaw1.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*
|
|
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-
|
|
5648
|
+
const { runMcpServerCommand } = yield* promise(() => import("./chunk-hrdh72c7.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-
|
|
6148
|
+
var docsModule = promise(() => import("./chunk-36dejya4.js"));
|
|
6149
6149
|
function docsCommand(args) {
|
|
6150
6150
|
return gen(function* () {
|
|
6151
6151
|
const command = parseCommand(args);
|
|
@@ -7149,7 +7149,7 @@ function changeRequestCommand(args) {
|
|
|
7149
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}`);
|
|
7150
7150
|
});
|
|
7151
7151
|
}
|
|
7152
|
-
var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-
|
|
7152
|
+
var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-zb8mwx3s.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
|
|
7153
7153
|
var loopOutline = (command) => gen(function* () {
|
|
7154
7154
|
const path = yield* Path;
|
|
7155
7155
|
const loop = requiredArg(command, "a Loop id");
|
|
@@ -7169,9 +7169,9 @@ var loopOutline = (command) => gen(function* () {
|
|
|
7169
7169
|
`).pipe(mapError2((error) => new CliError({ message: error.message })));
|
|
7170
7170
|
yield* log(`Wrote the outline of ${loop} to ${out}`);
|
|
7171
7171
|
});
|
|
7172
|
-
var KitWriter = map9(promise(() => import("./chunk-
|
|
7172
|
+
var KitWriter = map9(promise(() => import("./chunk-zb8mwx3s.js")), (build) => build.writeKit);
|
|
7173
7173
|
var KitBuilder = Reference("kitman/cli/KitBuilder", {
|
|
7174
|
-
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-
|
|
7174
|
+
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-zb8mwx3s.js")), (build) => build.buildKit(directory))
|
|
7175
7175
|
});
|
|
7176
7176
|
var uploadKit = (client, workspaceId, built) => gen(function* () {
|
|
7177
7177
|
yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
map9,
|
|
23
23
|
raceFirst,
|
|
24
24
|
scoped
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ew07nt2d.js";
|
|
26
26
|
import {
|
|
27
27
|
unwrap,
|
|
28
28
|
drainFork,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
runCollect,
|
|
32
32
|
runDrain,
|
|
33
33
|
mkString
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-w9mxqrsp.js";
|
|
35
35
|
|
|
36
36
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/redacted.js
|
|
37
37
|
var redactedRegistry = /* @__PURE__ */ new WeakMap;
|
|
@@ -34,11 +34,8 @@ import {
|
|
|
34
34
|
getOrUndefined,
|
|
35
35
|
map4,
|
|
36
36
|
Service2,
|
|
37
|
-
|
|
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
|
-
|
|
197
|
+
make16,
|
|
203
198
|
String4,
|
|
204
199
|
toCodecStringTree,
|
|
205
200
|
encodeUnknownJsonStringSync
|
|
206
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-ew07nt2d.js";
|
|
207
202
|
|
|
208
203
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
|
|
209
204
|
var headUnsafe = (self) => {
|
|
@@ -252,14 +247,9 @@ var makeEquivalence = (equivalence) => {
|
|
|
252
247
|
return (self, that) => is(self, that) && is(that, self);
|
|
253
248
|
};
|
|
254
249
|
|
|
255
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/
|
|
256
|
-
var
|
|
257
|
-
var
|
|
258
|
-
if (b > BigInt2(Number.MAX_SAFE_INTEGER) || b < BigInt2(Number.MIN_SAFE_INTEGER)) {
|
|
259
|
-
return none();
|
|
260
|
-
}
|
|
261
|
-
return some(Number(b));
|
|
262
|
-
};
|
|
250
|
+
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Clock.js
|
|
251
|
+
var Clock = ClockRef;
|
|
252
|
+
var currentTimeMillis = currentTimeMillis2;
|
|
263
253
|
|
|
264
254
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/ByteSize.js
|
|
265
255
|
var bigint0 = /* @__PURE__ */ BigInt(0);
|
|
@@ -381,7 +371,7 @@ var fromStringUnsafe = (input) => {
|
|
|
381
371
|
return invalid(`${JSON.stringify(input)} does not represent an integral number of bytes`);
|
|
382
372
|
return make(value);
|
|
383
373
|
};
|
|
384
|
-
var
|
|
374
|
+
var fromInputUnsafe = (input) => {
|
|
385
375
|
switch (typeof input) {
|
|
386
376
|
case "bigint":
|
|
387
377
|
if (input < bigint0)
|
|
@@ -394,7 +384,7 @@ var fromInputUnsafe2 = (input) => {
|
|
|
394
384
|
}
|
|
395
385
|
return invalid(`unsupported input ${input}`);
|
|
396
386
|
};
|
|
397
|
-
var bytes = (value) => typeof value === "bigint" ?
|
|
387
|
+
var bytes = (value) => typeof value === "bigint" ? fromInputUnsafe(value) : fromNumber(value);
|
|
398
388
|
|
|
399
389
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Fiber.js
|
|
400
390
|
var join = fiberJoin;
|
|
@@ -1320,7 +1310,7 @@ var publishUnsafe = /* @__PURE__ */ dual(2, (self, value) => {
|
|
|
1320
1310
|
return false;
|
|
1321
1311
|
});
|
|
1322
1312
|
var subscribe = (self) => uninterruptible(contextWith((services) => {
|
|
1323
|
-
const localScope =
|
|
1313
|
+
const localScope = get3(services, Scope);
|
|
1324
1314
|
const scope = forkUnsafe(self.scope);
|
|
1325
1315
|
const subscription = makeSubscriptionUnsafe(self.pubsub, self.subscribers, self.strategy, self.ended);
|
|
1326
1316
|
return addFinalizer(scope, unsubscribe(subscription)).pipe(andThen2(addFinalizerExit(localScope, (exit) => close(scope, exit))), as(subscription));
|
|
@@ -2817,158 +2807,16 @@ var forEachArray = (f) => fromTransform2((upstream) => upstream.pipe(flatMap3(f)
|
|
|
2817
2807
|
}), catchDone(() => endVoid)));
|
|
2818
2808
|
var unwrap3 = (effect) => fromChannel(unwrap2(map9(effect, toChannel)));
|
|
2819
2809
|
|
|
2820
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/internal/rcRef.js
|
|
2821
|
-
var TypeId8 = "~effect/RcRef";
|
|
2822
|
-
var stateEmpty = {
|
|
2823
|
-
_tag: "Empty"
|
|
2824
|
-
};
|
|
2825
|
-
var stateClosed = {
|
|
2826
|
-
_tag: "Closed"
|
|
2827
|
-
};
|
|
2828
|
-
var variance2 = {
|
|
2829
|
-
_A: identity,
|
|
2830
|
-
_E: identity
|
|
2831
|
-
};
|
|
2832
|
-
|
|
2833
|
-
class RcRefImpl {
|
|
2834
|
-
[TypeId8] = variance2;
|
|
2835
|
-
pipe() {
|
|
2836
|
-
return pipeArguments(this, arguments);
|
|
2837
|
-
}
|
|
2838
|
-
state = stateEmpty;
|
|
2839
|
-
acquire;
|
|
2840
|
-
context;
|
|
2841
|
-
scope;
|
|
2842
|
-
idleTimeToLive;
|
|
2843
|
-
constructor(acquire, context, scope, idleTimeToLive) {
|
|
2844
|
-
this.acquire = acquire;
|
|
2845
|
-
this.context = context;
|
|
2846
|
-
this.scope = scope;
|
|
2847
|
-
this.idleTimeToLive = idleTimeToLive;
|
|
2848
|
-
}
|
|
2849
|
-
}
|
|
2850
|
-
var make6 = (options) => withFiber2((fiber) => {
|
|
2851
|
-
const context = fiber.context;
|
|
2852
|
-
const scope = get4(context, Scope);
|
|
2853
|
-
const ref = new RcRefImpl(options.acquire, context, scope, options.idleTimeToLive !== undefined ? fromInputUnsafe(options.idleTimeToLive) : undefined);
|
|
2854
|
-
return as(addFinalizerExit(scope, () => {
|
|
2855
|
-
const state = ref.state;
|
|
2856
|
-
ref.state = stateClosed;
|
|
2857
|
-
if (state._tag === "Acquired")
|
|
2858
|
-
return close(state.scope, void_2);
|
|
2859
|
-
if (state._tag === "Acquiring")
|
|
2860
|
-
return interrupt(state.fiber);
|
|
2861
|
-
return void_3;
|
|
2862
|
-
}), ref);
|
|
2863
|
-
});
|
|
2864
|
-
var getState = (self, restore) => {
|
|
2865
|
-
switch (self.state._tag) {
|
|
2866
|
-
case "Closed": {
|
|
2867
|
-
return interrupt3;
|
|
2868
|
-
}
|
|
2869
|
-
case "Acquired": {
|
|
2870
|
-
const state = self.state;
|
|
2871
|
-
state.refCount++;
|
|
2872
|
-
return state.fiber ? as(interrupt(state.fiber), state) : succeed6(state);
|
|
2873
|
-
}
|
|
2874
|
-
case "Acquiring": {
|
|
2875
|
-
const state = self.state;
|
|
2876
|
-
state.awaiters++;
|
|
2877
|
-
return awaitAcquiring(self, state, restore);
|
|
2878
|
-
}
|
|
2879
|
-
case "Empty": {
|
|
2880
|
-
const acquiring = {
|
|
2881
|
-
_tag: "Acquiring",
|
|
2882
|
-
fiber: undefined,
|
|
2883
|
-
awaiters: 1,
|
|
2884
|
-
acquired: undefined
|
|
2885
|
-
};
|
|
2886
|
-
self.state = acquiring;
|
|
2887
|
-
const scope = makeUnsafe6();
|
|
2888
|
-
const acquire = provideContext2(self.acquire, add(self.context, Scope, scope)).pipe(flatMap3((value) => {
|
|
2889
|
-
if (self.state !== acquiring) {
|
|
2890
|
-
return interrupt3;
|
|
2891
|
-
}
|
|
2892
|
-
const state = {
|
|
2893
|
-
_tag: "Acquired",
|
|
2894
|
-
value,
|
|
2895
|
-
scope,
|
|
2896
|
-
fiber: undefined,
|
|
2897
|
-
refCount: acquiring.awaiters,
|
|
2898
|
-
invalidated: false
|
|
2899
|
-
};
|
|
2900
|
-
self.state = state;
|
|
2901
|
-
acquiring.acquired = state;
|
|
2902
|
-
return succeed6(state);
|
|
2903
|
-
}), onExit((exit) => {
|
|
2904
|
-
if (isSuccess2(exit))
|
|
2905
|
-
return void_3;
|
|
2906
|
-
if (self.state === acquiring)
|
|
2907
|
-
self.state = stateEmpty;
|
|
2908
|
-
return close(scope, exit);
|
|
2909
|
-
}));
|
|
2910
|
-
acquiring.fiber = runForkWith(getCurrent().context)(acquire);
|
|
2911
|
-
return awaitAcquiring(self, acquiring, restore);
|
|
2912
|
-
}
|
|
2913
|
-
}
|
|
2914
|
-
};
|
|
2915
|
-
var awaitAcquiring = (self, acquiring, restore) => onExit(restore(join(acquiring.fiber)), (exit) => {
|
|
2916
|
-
const acquired = acquiring.acquired;
|
|
2917
|
-
if (acquired !== undefined) {
|
|
2918
|
-
return isFailure2(exit) ? release(self, acquired) : void_3;
|
|
2919
|
-
}
|
|
2920
|
-
if (--acquiring.awaiters > 0 || self.state !== acquiring)
|
|
2921
|
-
return void_3;
|
|
2922
|
-
self.state = stateEmpty;
|
|
2923
|
-
return interrupt(acquiring.fiber);
|
|
2924
|
-
});
|
|
2925
|
-
var get2 = (self_) => {
|
|
2926
|
-
const self = self_;
|
|
2927
|
-
return uninterruptibleMask2((restore) => flatMap3(scope2, (scope) => flatMap3(getState(self, restore), (state) => as(addFinalizerExit(scope, () => release(self, state)), state.value))));
|
|
2928
|
-
};
|
|
2929
|
-
var release = (self, state) => {
|
|
2930
|
-
state.refCount--;
|
|
2931
|
-
if (state.refCount > 0) {
|
|
2932
|
-
return void_3;
|
|
2933
|
-
}
|
|
2934
|
-
const idleTimeToLive = self.idleTimeToLive;
|
|
2935
|
-
if (idleTimeToLive === undefined || state.invalidated) {
|
|
2936
|
-
if (self.state === state) {
|
|
2937
|
-
self.state = stateEmpty;
|
|
2938
|
-
}
|
|
2939
|
-
return close(state.scope, void_2);
|
|
2940
|
-
} else if (!isFinite(idleTimeToLive)) {
|
|
2941
|
-
return void_3;
|
|
2942
|
-
}
|
|
2943
|
-
state.fiber = uninterruptibleMask2((restore) => flatMap3(restore(sleep(idleTimeToLive)), () => {
|
|
2944
|
-
if (self.state === state && state.refCount === 0) {
|
|
2945
|
-
self.state = stateEmpty;
|
|
2946
|
-
return ignoreCause(close(state.scope, void_2), {
|
|
2947
|
-
log: "Unhandled",
|
|
2948
|
-
message: "Unhandled error in RcRef finalizer"
|
|
2949
|
-
});
|
|
2950
|
-
}
|
|
2951
|
-
return void_3;
|
|
2952
|
-
})).pipe(ensuring2(sync2(() => {
|
|
2953
|
-
state.fiber = undefined;
|
|
2954
|
-
})), runForkWith(self.context), runIn(self.scope));
|
|
2955
|
-
return void_3;
|
|
2956
|
-
};
|
|
2957
|
-
|
|
2958
|
-
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
|
|
2959
|
-
var make10 = make6;
|
|
2960
|
-
var get3 = get2;
|
|
2961
|
-
|
|
2962
2810
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
|
|
2963
|
-
var
|
|
2964
|
-
var isStream = (u) => hasProperty(u,
|
|
2811
|
+
var TypeId8 = "~effect/Stream";
|
|
2812
|
+
var isStream = (u) => hasProperty(u, TypeId8);
|
|
2965
2813
|
var fromChannel2 = fromChannel3;
|
|
2966
2814
|
var fromPull2 = (pull) => fromChannel2(fromPull(pull));
|
|
2967
2815
|
var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatMap3(toPullScoped(self.channel, scope), (pull) => f(pull, scope))));
|
|
2968
2816
|
var toChannel2 = (stream) => stream.channel;
|
|
2969
2817
|
var callback = (f, options) => fromChannel2(callbackArray(f, options));
|
|
2970
2818
|
var empty2 = /* @__PURE__ */ fromChannel2(empty);
|
|
2971
|
-
var
|
|
2819
|
+
var make10 = (...values) => fromArray2(values);
|
|
2972
2820
|
var suspend = (stream) => {
|
|
2973
2821
|
const suspended = fromChannel2(suspend4(() => stream().channel));
|
|
2974
2822
|
suspendedStreams.set(suspended, stream);
|
|
@@ -3166,11 +3014,11 @@ var toReadableStreamWith = /* @__PURE__ */ dual((args) => isStream(args[0]), (se
|
|
|
3166
3014
|
var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (self, options) => map9(context(), (context) => toReadableStreamWith(self, context, options)));
|
|
3167
3015
|
|
|
3168
3016
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
|
|
3169
|
-
var
|
|
3017
|
+
var TypeId9 = "~effect/FileSystem";
|
|
3170
3018
|
var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
|
|
3171
|
-
var
|
|
3019
|
+
var make11 = (impl) => FileSystem.of({
|
|
3172
3020
|
...impl,
|
|
3173
|
-
[
|
|
3021
|
+
[TypeId9]: TypeId9,
|
|
3174
3022
|
glob: make2(impl),
|
|
3175
3023
|
exists: (path) => pipe(impl.access(path), as(true), catchTag("PlatformError", (e) => e.reason._tag === "NotFound" ? succeed6(false) : fail7(e))),
|
|
3176
3024
|
readFileString: (path, encoding) => flatMap3(impl.readFile(path), (_) => try_2({
|
|
@@ -3186,11 +3034,11 @@ var make12 = (impl) => FileSystem.of({
|
|
|
3186
3034
|
const file = yield* impl.open(path, {
|
|
3187
3035
|
flag: "r"
|
|
3188
3036
|
});
|
|
3189
|
-
const offset = options?.offset === undefined ? undefined :
|
|
3037
|
+
const offset = options?.offset === undefined ? undefined : fromInputUnsafe(options.offset);
|
|
3190
3038
|
if (offset) {
|
|
3191
3039
|
yield* file.seek(offset, "start");
|
|
3192
3040
|
}
|
|
3193
|
-
const bytesToRead = options?.bytesToRead === undefined ? undefined :
|
|
3041
|
+
const bytesToRead = options?.bytesToRead === undefined ? undefined : fromInputUnsafe(options.bytesToRead);
|
|
3194
3042
|
let totalBytesRead = BigInt(0);
|
|
3195
3043
|
const chunkSize = Number(BigInt(options?.chunkSize ?? 64 * 1024));
|
|
3196
3044
|
const readChunk = file.readAlloc(chunkSize);
|
|
@@ -3226,11 +3074,11 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
|
|
|
3226
3074
|
}
|
|
3227
3075
|
|
|
3228
3076
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
|
|
3229
|
-
var
|
|
3077
|
+
var TypeId10 = "~effect/Path";
|
|
3230
3078
|
var Path = /* @__PURE__ */ Service2("effect/Path");
|
|
3231
|
-
var
|
|
3079
|
+
var make12 = (impl) => Path.of({
|
|
3232
3080
|
...impl,
|
|
3233
|
-
[
|
|
3081
|
+
[TypeId10]: TypeId10,
|
|
3234
3082
|
resolveWithin(root, input) {
|
|
3235
3083
|
if (impl.parse(input).root !== "")
|
|
3236
3084
|
return none();
|
|
@@ -3303,7 +3151,7 @@ function makeProvider(load, mapInput) {
|
|
|
3303
3151
|
function makeSource(get, transform) {
|
|
3304
3152
|
return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
|
|
3305
3153
|
}
|
|
3306
|
-
function
|
|
3154
|
+
function make6(get) {
|
|
3307
3155
|
return makeSource(get, identityPath);
|
|
3308
3156
|
}
|
|
3309
3157
|
function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
@@ -3312,7 +3160,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
|
|
|
3312
3160
|
function fromEnvRecord(env, options) {
|
|
3313
3161
|
const preserveEmptyStrings = options?.preserveEmptyStrings === true;
|
|
3314
3162
|
const trie = buildEnvTrie(env);
|
|
3315
|
-
return
|
|
3163
|
+
return make6((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
|
|
3316
3164
|
}
|
|
3317
3165
|
function fromEnv(options) {
|
|
3318
3166
|
const env = options?.env ?? {
|
|
@@ -3365,7 +3213,7 @@ function trieNodeAt(root, path) {
|
|
|
3365
3213
|
}
|
|
3366
3214
|
|
|
3367
3215
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Config.js
|
|
3368
|
-
var
|
|
3216
|
+
var TypeId11 = "~effect/Config";
|
|
3369
3217
|
class ConfigError {
|
|
3370
3218
|
_tag = "ConfigError";
|
|
3371
3219
|
name = "ConfigError";
|
|
@@ -3387,14 +3235,14 @@ var Proto2 = {
|
|
|
3387
3235
|
return this.parse(fiber.getRef(ConfigProvider));
|
|
3388
3236
|
}
|
|
3389
3237
|
}),
|
|
3390
|
-
[
|
|
3238
|
+
[TypeId11]: TypeId11,
|
|
3391
3239
|
toJSON() {
|
|
3392
3240
|
return {
|
|
3393
3241
|
_id: "Config"
|
|
3394
3242
|
};
|
|
3395
3243
|
}
|
|
3396
3244
|
};
|
|
3397
|
-
function
|
|
3245
|
+
function make7(evaluator) {
|
|
3398
3246
|
const self = Object.create(Proto2);
|
|
3399
3247
|
self.evaluator = evaluator;
|
|
3400
3248
|
self.parse = (provider) => flatMapEager(evaluator(provider, []), fromResult);
|
|
@@ -3402,14 +3250,14 @@ function make14(evaluator) {
|
|
|
3402
3250
|
}
|
|
3403
3251
|
var evaluateAt = (self, provider, pathPrefix) => self.evaluator(provider, pathPrefix);
|
|
3404
3252
|
var map3 = /* @__PURE__ */ dual(2, (self, f) => {
|
|
3405
|
-
return
|
|
3253
|
+
return make7((provider, pathPrefix) => map9(evaluateAt(self, provider, pathPrefix), map5(f)));
|
|
3406
3254
|
});
|
|
3407
3255
|
function all(arg) {
|
|
3408
3256
|
const configs = globalThis.Array.isArray(arg) ? arg : (Symbol.iterator in arg) ? [...arg] : arg;
|
|
3409
|
-
return
|
|
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));
|
|
3410
3258
|
}
|
|
3411
3259
|
var withDefault = /* @__PURE__ */ dual(2, (self, defaultValue) => {
|
|
3412
|
-
return
|
|
3260
|
+
return make7((provider, pathPrefix) => mapEager(evaluateAt(self, provider, pathPrefix), (resolution) => isFailure(resolution) ? succeed(defaultValue) : resolution));
|
|
3413
3261
|
});
|
|
3414
3262
|
var option = (self) => self.pipe(map3(some), withDefault(none()));
|
|
3415
3263
|
var isSourceError = (u) => isTagged(u, "SourceError");
|
|
@@ -3526,9 +3374,9 @@ var toConfigCursorAST = /* @__PURE__ */ memoize((root) => {
|
|
|
3526
3374
|
function schema(codec, path) {
|
|
3527
3375
|
const codecStringTree = toCodecStringTree(codec);
|
|
3528
3376
|
const encodedAst = toEncoded(codecStringTree.ast);
|
|
3529
|
-
const decodeCursor = decodeUnknownEffect(
|
|
3377
|
+
const decodeCursor = decodeUnknownEffect(make16(toConfigCursorAST(codecStringTree.ast)));
|
|
3530
3378
|
const localPath = typeof path === "string" ? [path] : path ?? [];
|
|
3531
|
-
return
|
|
3379
|
+
return make7((provider, pathPrefix) => {
|
|
3532
3380
|
const fullPath = [...pathPrefix, ...localPath];
|
|
3533
3381
|
return loadCursor(provider, fullPath).pipe(flatMapEager((cursor) => decodeCursor(cursor).pipe(mapEager(succeed), catchEager((issue) => {
|
|
3534
3382
|
const error = new ConfigError(new SchemaError(fullPath.length > 0 ? new Pointer(fullPath, issue) : issue));
|
|
@@ -3644,4 +3492,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
|
|
|
3644
3492
|
...argv
|
|
3645
3493
|
];
|
|
3646
3494
|
|
|
3647
|
-
export { map, makeEquivalence,
|
|
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 };
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
FileSystem,
|
|
4
|
-
Path,
|
|
5
|
-
optionalEnv,
|
|
6
|
-
tempDirectoryScoped
|
|
7
|
-
} from "./chunk-63cyj9dh.js";
|
|
8
2
|
import {
|
|
9
3
|
Reference,
|
|
10
4
|
TaggedError,
|
|
@@ -31,15 +25,21 @@ import {
|
|
|
31
25
|
isString2,
|
|
32
26
|
encodePrettyJsonString,
|
|
33
27
|
decodeJsonStringSync
|
|
34
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ew07nt2d.js";
|
|
29
|
+
import {
|
|
30
|
+
FileSystem,
|
|
31
|
+
Path,
|
|
32
|
+
optionalEnv,
|
|
33
|
+
tempDirectoryScoped
|
|
34
|
+
} from "./chunk-w9mxqrsp.js";
|
|
35
35
|
import {
|
|
36
36
|
AgentHarnessIds,
|
|
37
37
|
sha2562,
|
|
38
38
|
runCommand2
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-e863b7v1.js";
|
|
40
40
|
import {
|
|
41
41
|
NpmRegistry
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-am57a75e.js";
|
|
43
43
|
|
|
44
44
|
// packages/agent-runtime/src/config-convergence.ts
|
|
45
45
|
var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
decodeText,
|
|
4
|
-
mkString,
|
|
5
|
-
FileSystem,
|
|
6
|
-
Path,
|
|
7
|
-
withDefault,
|
|
8
|
-
String2
|
|
9
|
-
} from "./chunk-63cyj9dh.js";
|
|
10
2
|
import {
|
|
11
3
|
isString,
|
|
12
4
|
isObject,
|
|
@@ -43,7 +35,7 @@ import {
|
|
|
43
35
|
toCodecJson,
|
|
44
36
|
Json,
|
|
45
37
|
encodePrettyJsonString
|
|
46
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-ew07nt2d.js";
|
|
47
39
|
import {
|
|
48
40
|
SecureRandom,
|
|
49
41
|
layerWebCrypto,
|
|
@@ -60,26 +52,34 @@ import {
|
|
|
60
52
|
KitDeclarations,
|
|
61
53
|
kitmanMcpServer,
|
|
62
54
|
RunnerRpcProtocolVersion
|
|
63
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-e863b7v1.js";
|
|
56
|
+
import {
|
|
57
|
+
decodeText,
|
|
58
|
+
mkString,
|
|
59
|
+
FileSystem,
|
|
60
|
+
Path,
|
|
61
|
+
withDefault,
|
|
62
|
+
String2
|
|
63
|
+
} from "./chunk-w9mxqrsp.js";
|
|
64
64
|
import {
|
|
65
65
|
Packument,
|
|
66
66
|
tarballMatches
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-am57a75e.js";
|
|
68
68
|
import {
|
|
69
69
|
stepDefinedTwice,
|
|
70
70
|
hostSteps,
|
|
71
71
|
exports_activities,
|
|
72
72
|
describeFlag,
|
|
73
73
|
Described
|
|
74
|
-
} from "./chunk-
|
|
75
|
-
import"./chunk-
|
|
76
|
-
import"./chunk-
|
|
74
|
+
} from "./chunk-kx00yd3c.js";
|
|
75
|
+
import"./chunk-4rq880g6.js";
|
|
76
|
+
import"./chunk-haq904fk.js";
|
|
77
77
|
import {
|
|
78
78
|
ChildProcessSpawner,
|
|
79
79
|
make3
|
|
80
|
-
} from "./chunk-
|
|
81
|
-
import"./chunk-
|
|
82
|
-
import"./chunk-
|
|
80
|
+
} from "./chunk-t6y0c0ds.js";
|
|
81
|
+
import"./chunk-2y646fhs.js";
|
|
82
|
+
import"./chunk-qvpkwnky.js";
|
|
83
83
|
|
|
84
84
|
// packages/sdk/src/build/outline/graph.ts
|
|
85
85
|
import {
|