@kitman-sh/cli 0.27.1 → 0.29.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-ja48xvcs.js → chunk-18x6rmkq.js} +9 -9
- package/dist/{chunk-tsx0347c.js → chunk-1hgsf81a.js} +1 -1
- package/dist/{chunk-nhe2pgzz.js → chunk-1yyq4nh2.js} +24 -24
- package/dist/{chunk-samxkpbz.js → chunk-4qrb09w4.js} +3 -3
- package/dist/{chunk-t6ynnbcb.js → chunk-4tdk1w0k.js} +7 -7
- package/dist/{chunk-h2f26xbd.js → chunk-61dmxexa.js} +70 -28
- package/dist/{chunk-1vnvmeqr.js → chunk-801jtbdq.js} +3 -3
- package/dist/{chunk-sxjz1jg3.js → chunk-89eskdmq.js} +26 -23
- package/dist/{chunk-vv7zg8rb.js → chunk-8andwyqa.js} +5 -5
- package/dist/{chunk-zysde2fp.js → chunk-9zxzmsmm.js} +9 -9
- package/dist/{chunk-mpxtpwqp.js → chunk-cbkj3km5.js} +1 -1
- package/dist/{chunk-dfvamygr.js → chunk-cm2sr223.js} +129 -87
- package/dist/{chunk-7re3n1ze.js → chunk-e491q405.js} +10 -10
- package/dist/{chunk-8t2wcrvv.js → chunk-eshk0da5.js} +2 -2
- package/dist/{chunk-220vzyz9.js → chunk-f9fhdprs.js} +4 -4
- package/dist/{chunk-npfdbssf.js → chunk-fyjet273.js} +4 -4
- package/dist/{chunk-bsgvmq34.js → chunk-j021bman.js} +14 -60
- package/dist/{chunk-g9z2pdfh.js → chunk-pyjx5q5s.js} +1 -1
- package/dist/{chunk-ks4q040v.js → chunk-q1medqp5.js} +6 -6
- package/dist/{chunk-vz38kngm.js → chunk-q8e58p57.js} +2 -2
- package/dist/{chunk-4qjfn1sa.js → chunk-rbpn35g5.js} +1 -1
- package/dist/{chunk-j4b1yvcd.js → chunk-sm340tvm.js} +26 -17
- package/dist/{chunk-z05pkzhf.js → chunk-vshy6fm5.js} +10 -10
- package/dist/{chunk-mvqggmpj.js → chunk-wqdxszpm.js} +19 -19
- package/dist/{chunk-xppw33hz.js → chunk-y6petreh.js} +116 -124
- package/dist/{chunk-5kqt4bqp.js → chunk-znhjs0t6.js} +1 -1
- 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,7 +108,7 @@ import {
|
|
|
108
108
|
decodeJsonStringOption,
|
|
109
109
|
encodeJsonStringSync,
|
|
110
110
|
encodePrettyJsonString
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-61dmxexa.js";
|
|
112
112
|
import {
|
|
113
113
|
tap,
|
|
114
114
|
mapError,
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
withDefault,
|
|
121
121
|
option,
|
|
122
122
|
String2
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-sm340tvm.js";
|
|
124
124
|
import {
|
|
125
125
|
currentTimeMillis,
|
|
126
126
|
SecureRandom,
|
|
@@ -185,7 +185,7 @@ import {
|
|
|
185
185
|
digestSha256,
|
|
186
186
|
sha256Hasher,
|
|
187
187
|
raw,
|
|
188
|
-
|
|
188
|
+
make4,
|
|
189
189
|
get,
|
|
190
190
|
put,
|
|
191
191
|
HttpClient,
|
|
@@ -251,15 +251,15 @@ import {
|
|
|
251
251
|
harnessNames,
|
|
252
252
|
herdrRunnerCapabilities2,
|
|
253
253
|
declaredChecks
|
|
254
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-y6petreh.js";
|
|
255
255
|
import {
|
|
256
256
|
ChildProcessSpawner,
|
|
257
|
-
|
|
258
|
-
} from "./chunk-
|
|
257
|
+
make2
|
|
258
|
+
} from "./chunk-j021bman.js";
|
|
259
259
|
import {
|
|
260
260
|
Id,
|
|
261
261
|
Timestamp
|
|
262
|
-
} from "./chunk-
|
|
262
|
+
} from "./chunk-rbpn35g5.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-f9fhdprs.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-f9fhdprs.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-vshy6fm5.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)
|
|
@@ -2290,7 +2290,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
|
|
|
2290
2290
|
run: (command, args) => runCommand2(command, args),
|
|
2291
2291
|
attach: (command, args) => gen(function* () {
|
|
2292
2292
|
const spawner = yield* ChildProcessSpawner;
|
|
2293
|
-
const handle = yield* spawner.spawn(
|
|
2293
|
+
const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
|
|
2294
2294
|
const exitCode = yield* handle.exitCode;
|
|
2295
2295
|
if (exitCode !== 0)
|
|
2296
2296
|
return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
|
|
@@ -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.29.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-cm2sr223.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-q1medqp5.js"));
|
|
5076
5076
|
return yield* makeRunnerRpcClient({
|
|
5077
5077
|
runnerId: options.runnerId,
|
|
5078
5078
|
bearer: options.bearer,
|
|
@@ -5178,6 +5178,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5178
5178
|
herdrRunnerCapabilitiesForRepoBinding,
|
|
5179
5179
|
harnessesInSrt,
|
|
5180
5180
|
homeDirectories,
|
|
5181
|
+
hostThreadBudget,
|
|
5181
5182
|
kitmanBundles,
|
|
5182
5183
|
kitmanMcpPreflight,
|
|
5183
5184
|
lacksLoginSecret,
|
|
@@ -5336,6 +5337,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5336
5337
|
const root = herdrCoreAgentBackendLayer({
|
|
5337
5338
|
sandboxBackends: host.backends,
|
|
5338
5339
|
srtBinaries,
|
|
5340
|
+
threadBudget: sync2(() => hostThreadBudget(live.settings.concurrency)),
|
|
5339
5341
|
...docker === undefined ? undefined : { docker: { ...docker, runnerId: input.runnerId } }
|
|
5340
5342
|
}).pipe(provide2(succeed5(HerdrCore, core)), provide2(succeed5(StepProcesses, stepProcesses)), provide2(layer3));
|
|
5341
5343
|
const activeSlots = new Set;
|
|
@@ -5385,7 +5387,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5385
5387
|
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
5388
|
yield* suspend3(() => sleep(ownerLogin.expired() ? ownerLoginRetryInterval : ownerLoginInterval)).pipe(andThen2(checkOwnerLogin), forever, forkScoped);
|
|
5387
5389
|
const platform = yield* context();
|
|
5388
|
-
const updated = yield*
|
|
5390
|
+
const updated = yield* make15();
|
|
5389
5391
|
const scope = yield* scope2;
|
|
5390
5392
|
const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
|
|
5391
5393
|
const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
|
|
@@ -5484,7 +5486,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5484
5486
|
runnerScope: scope,
|
|
5485
5487
|
runAfterMerge: (work, worktree, command, args) => {
|
|
5486
5488
|
const sandbox = checkSandbox();
|
|
5487
|
-
return afterMergeRunner(sandbox === undefined ? undefined : { ...sandbox, apiUrl: input.apiUrl, hosts: live.settings.checkHosts })(work, worktree, command, args);
|
|
5489
|
+
return afterMergeRunner(sandbox === undefined ? undefined : { ...sandbox, apiUrl: input.apiUrl, hosts: live.settings.checkHosts }, hostThreadBudget(live.settings.concurrency))(work, worktree, command, args);
|
|
5488
5490
|
},
|
|
5489
5491
|
runAgent: (work, worktree, session, steered, refused, launched) => flatMap3(currentTimeMillis, (now) => agentBackend.execute({
|
|
5490
5492
|
runnerId: input.runnerId,
|
|
@@ -5540,6 +5542,7 @@ function startCanonicalHerdrRunnerCommand(input) {
|
|
|
5540
5542
|
postgres: dockerCheckPostgres(input.runnerId, replica.id),
|
|
5541
5543
|
...checkDocker === undefined ? undefined : { docker: checkDocker },
|
|
5542
5544
|
runsDeployScripts: personal,
|
|
5545
|
+
threadBudget: hostThreadBudget(live.settings.concurrency),
|
|
5543
5546
|
revokedSecrets: (unit, secrets) => rpc.heartbeat({ workUnitId: unit.id, lease: leaseOf(unit), secrets: [...secrets] }).pipe(map9((state) => state.revokedSecrets ?? [])),
|
|
5544
5547
|
...sandbox === undefined ? undefined : { sandbox: { ...sandbox, apiUrl: input.apiUrl, hosts: live.settings.checkHosts } }
|
|
5545
5548
|
})(work);
|
|
@@ -5645,7 +5648,7 @@ function mcpCommand(args) {
|
|
|
5645
5648
|
if (command.action === "run") {
|
|
5646
5649
|
if (command.args.length > 0)
|
|
5647
5650
|
return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
|
|
5648
|
-
const { runMcpServerCommand } = yield* promise(() => import("./chunk-
|
|
5651
|
+
const { runMcpServerCommand } = yield* promise(() => import("./chunk-1yyq4nh2.js"));
|
|
5649
5652
|
return yield* runMcpServerCommand({ flags: command.flags });
|
|
5650
5653
|
}
|
|
5651
5654
|
if (command.action !== "setup")
|
|
@@ -6145,7 +6148,7 @@ function programLoopCommand(command) {
|
|
|
6145
6148
|
return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
|
|
6146
6149
|
});
|
|
6147
6150
|
}
|
|
6148
|
-
var docsModule = promise(() => import("./chunk-
|
|
6151
|
+
var docsModule = promise(() => import("./chunk-cbkj3km5.js"));
|
|
6149
6152
|
function docsCommand(args) {
|
|
6150
6153
|
return gen(function* () {
|
|
6151
6154
|
const command = parseCommand(args);
|
|
@@ -7149,7 +7152,7 @@ function changeRequestCommand(args) {
|
|
|
7149
7152
|
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
7153
|
});
|
|
7151
7154
|
}
|
|
7152
|
-
var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-
|
|
7155
|
+
var readOutlines = (directory) => flatMap3(promise(() => import("./chunk-wqdxszpm.js")), (build) => build.readOutlines(directory)).pipe(mapError2((error) => new CliError({ message: error.message })));
|
|
7153
7156
|
var loopOutline = (command) => gen(function* () {
|
|
7154
7157
|
const path = yield* Path;
|
|
7155
7158
|
const loop = requiredArg(command, "a Loop id");
|
|
@@ -7169,9 +7172,9 @@ var loopOutline = (command) => gen(function* () {
|
|
|
7169
7172
|
`).pipe(mapError2((error) => new CliError({ message: error.message })));
|
|
7170
7173
|
yield* log(`Wrote the outline of ${loop} to ${out}`);
|
|
7171
7174
|
});
|
|
7172
|
-
var KitWriter = map9(promise(() => import("./chunk-
|
|
7175
|
+
var KitWriter = map9(promise(() => import("./chunk-wqdxszpm.js")), (build) => build.writeKit);
|
|
7173
7176
|
var KitBuilder = Reference("kitman/cli/KitBuilder", {
|
|
7174
|
-
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-
|
|
7177
|
+
defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-wqdxszpm.js")), (build) => build.buildKit(directory))
|
|
7175
7178
|
});
|
|
7176
7179
|
var uploadKit = (client, workspaceId, built) => gen(function* () {
|
|
7177
7180
|
yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
|
|
@@ -7950,7 +7953,7 @@ function downloadPresignedAsset(download, outputPath) {
|
|
|
7950
7953
|
return gen(function* () {
|
|
7951
7954
|
const fs = yield* FileSystem;
|
|
7952
7955
|
const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
|
|
7953
|
-
const response = yield* send(
|
|
7956
|
+
const response = yield* send(make4(download.method)(download.url), failed);
|
|
7954
7957
|
if (response.status < 200 || response.status >= 300)
|
|
7955
7958
|
return yield* new CliError({ message: `Asset download failed with ${response.status}` });
|
|
7956
7959
|
const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
Defect,
|
|
97
97
|
Exit,
|
|
98
98
|
toCodecJson
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-61dmxexa.js";
|
|
100
100
|
import {
|
|
101
101
|
interrupt,
|
|
102
102
|
getCurrent,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
shutdownUnsafe,
|
|
109
109
|
fromQueue,
|
|
110
110
|
unwrap
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-sm340tvm.js";
|
|
112
112
|
import {
|
|
113
113
|
Clock,
|
|
114
114
|
empty,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
ParseOptions,
|
|
124
124
|
RpcClientDefect,
|
|
125
125
|
RpcClientError
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-y6petreh.js";
|
|
127
127
|
|
|
128
128
|
// node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workers/Transferable.js
|
|
129
129
|
class Collector extends (/* @__PURE__ */ Service2()("effect/workers/Transferable/Collector")) {
|
|
@@ -483,7 +483,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
|
|
|
483
483
|
};
|
|
484
484
|
});
|
|
485
485
|
var clientIdCounter = 0;
|
|
486
|
-
var
|
|
486
|
+
var make3 = /* @__PURE__ */ fnUntraced(function* (group, options) {
|
|
487
487
|
const clientId = clientIdCounter++;
|
|
488
488
|
const {
|
|
489
489
|
codecFor,
|
|
@@ -829,4 +829,4 @@ var layerProtocolSocket = (options) => effect(Protocol)(makeProtocolSocket(optio
|
|
|
829
829
|
class ConnectionHooks extends (/* @__PURE__ */ Service2()("effect/rpc/RpcClient/ConnectionHooks")) {
|
|
830
830
|
}
|
|
831
831
|
|
|
832
|
-
export { layerJson,
|
|
832
|
+
export { layerJson, make3, withHeaders, layerProtocolSocket, ConnectionHooks };
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import {
|
|
3
|
+
FileSystem,
|
|
4
|
+
Path,
|
|
5
|
+
optionalEnv,
|
|
6
|
+
tempDirectoryScoped
|
|
7
|
+
} from "./chunk-sm340tvm.js";
|
|
2
8
|
import {
|
|
3
9
|
Reference,
|
|
4
10
|
TaggedError,
|
|
@@ -25,21 +31,15 @@ import {
|
|
|
25
31
|
isString2,
|
|
26
32
|
encodePrettyJsonString,
|
|
27
33
|
decodeJsonStringSync
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import {
|
|
30
|
-
FileSystem,
|
|
31
|
-
Path,
|
|
32
|
-
optionalEnv,
|
|
33
|
-
tempDirectoryScoped
|
|
34
|
-
} from "./chunk-j4b1yvcd.js";
|
|
34
|
+
} from "./chunk-61dmxexa.js";
|
|
35
35
|
import {
|
|
36
36
|
AgentHarnessIds,
|
|
37
37
|
sha2562,
|
|
38
38
|
runCommand2
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-y6petreh.js";
|
|
40
40
|
import {
|
|
41
41
|
NpmRegistry
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-801jtbdq.js";
|
|
43
43
|
|
|
44
44
|
// packages/agent-runtime/src/config-convergence.ts
|
|
45
45
|
var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
|