@kitman-sh/cli 0.12.0-rc.8 → 0.12.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 (27) hide show
  1. package/dist/{chunk-dh09wyed.js → chunk-0367j54r.js} +42 -42
  2. package/dist/{chunk-y7vjk8vv.js → chunk-0h49y8gf.js} +165 -31
  3. package/dist/{chunk-3kxwb7qn.js → chunk-13yrey2v.js} +7 -7
  4. package/dist/{chunk-7959aeck.js → chunk-1wbdexzg.js} +14 -6
  5. package/dist/{chunk-jg8n8z0z.js → chunk-4d4n8qjs.js} +4 -4
  6. package/dist/{chunk-8sz25ptv.js → chunk-5zhh41gb.js} +4 -4
  7. package/dist/{chunk-e711ebdj.js → chunk-5zth85pj.js} +2 -2
  8. package/dist/{chunk-6pqxsnk1.js → chunk-711r4pfw.js} +20 -20
  9. package/dist/{chunk-9q7qc1dg.js → chunk-adbzjs9g.js} +1 -1
  10. package/dist/{chunk-det0tmx7.js → chunk-beagq0pp.js} +27 -17
  11. package/dist/{chunk-9c9vrbh4.js → chunk-c7253rcg.js} +171 -132
  12. package/dist/{chunk-mmpcdj8f.js → chunk-c76ngzr6.js} +7 -7
  13. package/dist/{chunk-vkchn89k.js → chunk-cbpb2rww.js} +7 -7
  14. package/dist/{chunk-jwc8bdga.js → chunk-fs72937p.js} +5 -5
  15. package/dist/{chunk-mm2m3bys.js → chunk-gq7y5v3e.js} +1 -1
  16. package/dist/{chunk-bz4bp0q7.js → chunk-gy9rf14f.js} +3 -3
  17. package/dist/{chunk-3cgshf16.js → chunk-hvwkpnv5.js} +24 -24
  18. package/dist/{chunk-ey4mf341.js → chunk-kvt8cr8m.js} +6 -6
  19. package/dist/{chunk-892qrkb3.js → chunk-mtkstrh3.js} +60 -14
  20. package/dist/{chunk-s8m2tzdr.js → chunk-q5w3v4k1.js} +1 -1
  21. package/dist/{chunk-vrms6e1m.js → chunk-rgby07sa.js} +4 -4
  22. package/dist/{chunk-scb6qgy2.js → chunk-xmdjysn2.js} +52 -24
  23. package/dist/{chunk-skqn4h13.js → chunk-y1krmnbv.js} +2 -2
  24. package/dist/{chunk-d8qcmqh5.js → chunk-y39h1gzp.js} +4 -4
  25. package/dist/{chunk-x3cc7dfc.js → chunk-zw3gf6r5.js} +40 -226
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -12,7 +12,7 @@ import {
12
12
  succeed,
13
13
  isSuccess,
14
14
  TaggedError,
15
- make15,
15
+ make16,
16
16
  _await,
17
17
  fail5,
18
18
  succeed5,
@@ -104,7 +104,7 @@ import {
104
104
  decodeJsonString,
105
105
  encodeJsonStringSync,
106
106
  encodePrettyJsonString
107
- } from "./chunk-x3cc7dfc.js";
107
+ } from "./chunk-zw3gf6r5.js";
108
108
  import {
109
109
  tap,
110
110
  mapError,
@@ -116,11 +116,7 @@ import {
116
116
  withDefault,
117
117
  option,
118
118
  String2
119
- } from "./chunk-y7vjk8vv.js";
120
- import {
121
- ChildProcessSpawner,
122
- make2
123
- } from "./chunk-892qrkb3.js";
119
+ } from "./chunk-0h49y8gf.js";
124
120
  import {
125
121
  currentTimeMillis,
126
122
  SecureRandom,
@@ -136,6 +132,9 @@ import {
136
132
  waitingOnWords,
137
133
  queueWords,
138
134
  redactResponseSurface,
135
+ ReleaseChannels,
136
+ DefaultReleaseChannel,
137
+ newerKitmanVersion,
139
138
  NetworkHost,
140
139
  RepoBindingProviders,
141
140
  RepoBindingCredentialProviderTypes,
@@ -153,7 +152,6 @@ import {
153
152
  shownRunnerSetting,
154
153
  defaultRunnerCapabilities,
155
154
  deliveryProviderActions,
156
- newerKitmanVersion,
157
155
  MemoryStatuses,
158
156
  MemoryScopes,
159
157
  MaxMemoryListLimit,
@@ -168,7 +166,7 @@ import {
168
166
  digestSha256,
169
167
  sha256Hasher,
170
168
  raw,
171
- make4,
169
+ make5,
172
170
  get,
173
171
  put,
174
172
  HttpClient,
@@ -230,10 +228,14 @@ import {
230
228
  harnessNames,
231
229
  herdrRunnerCapabilities2,
232
230
  declaredChecks
233
- } from "./chunk-9c9vrbh4.js";
231
+ } from "./chunk-c7253rcg.js";
234
232
  import {
235
233
  Id
236
- } from "./chunk-s8m2tzdr.js";
234
+ } from "./chunk-q5w3v4k1.js";
235
+ import {
236
+ ChildProcessSpawner,
237
+ make3
238
+ } from "./chunk-mtkstrh3.js";
237
239
 
238
240
  // apps/cli/src/cli-error.ts
239
241
  function cliErrorCode(error, status) {
@@ -534,6 +536,7 @@ var moreUsage = [
534
536
  " kitman workspace list",
535
537
  " kitman workspace create <name>",
536
538
  " kitman workspace use <workspace> [--local] (--local writes it to this directory\u2019s .kitman/config.json)",
539
+ " kitman workspace channel [stable|next] (the releases its Runners and unpinned npm Kits follow; admins set it)",
537
540
  " kitman team list",
538
541
  " kitman team use <team> [--local]"
539
542
  ]
@@ -753,6 +756,7 @@ var examples = [
753
756
  "kitman workspace list",
754
757
  "kitman workspace create Acme",
755
758
  "kitman workspace use acme --local",
759
+ "kitman workspace channel next",
756
760
  "kitman mcp",
757
761
  "kitman mcp setup --name codex",
758
762
  "kitman sync --harness codex",
@@ -985,10 +989,10 @@ var sandboxMissing = (sandbox, missing) => ({
985
989
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
986
990
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
987
991
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
988
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-d8qcmqh5.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
992
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-y39h1gzp.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
989
993
  });
990
994
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
991
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-d8qcmqh5.js")), (module) => module.updateHerdrCore(options))
995
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-y39h1gzp.js")), (module) => module.updateHerdrCore(options))
992
996
  });
993
997
  var herdrCoreMissing = (error) => {
994
998
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1408,7 +1412,7 @@ var syncTargets = (harness) => gen(function* () {
1408
1412
  });
1409
1413
  var syncKits = (input) => gen(function* () {
1410
1414
  const fs = yield* FileSystem;
1411
- const { syncKitSetup } = yield* promise(() => import("./chunk-mmpcdj8f.js"));
1415
+ const { syncKitSetup } = yield* promise(() => import("./chunk-c76ngzr6.js"));
1412
1416
  const harnesses = yield* syncTargets(input.harness);
1413
1417
  const chain = yield* input.client.getKitChain(input.workspaceId);
1414
1418
  for (const { name, problem } of chain.skipped)
@@ -1801,6 +1805,7 @@ var machineRunnerCommand = (action, apiUrl, options) => gen(function* () {
1801
1805
  ` state: ${state}`,
1802
1806
  ...problems.flatMap((problem) => [` ${problem.code}: ${problem.message}`, ` fix: ${problem.fix}`]),
1803
1807
  ` kitman: ${version ?? "not installed"}`,
1808
+ ...runner?.releaseChannel === undefined ? [] : [` release channel: ${runner.releaseChannel}`],
1804
1809
  ` service: ${(yield* runnerServiceState(runnerServiceName(runnerId))) ?? "unsupported"}`
1805
1810
  ].join(`
1806
1811
  `));
@@ -1924,7 +1929,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
1924
1929
  run: (command, args) => runCommand2(command, args),
1925
1930
  attach: (command, args) => gen(function* () {
1926
1931
  const spawner = yield* ChildProcessSpawner;
1927
- const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1932
+ const handle = yield* spawner.spawn(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1928
1933
  const exitCode = yield* handle.exitCode;
1929
1934
  if (exitCode !== 0)
1930
1935
  return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
@@ -2326,7 +2331,7 @@ var package_default = {
2326
2331
  };
2327
2332
 
2328
2333
  // apps/cli/src/scaffold.ts
2329
- var cliVersion = "0.12.0-rc.8";
2334
+ var cliVersion = "0.12.1";
2330
2335
  var packageJson = (name, scaffold) => `${JSON.stringify({
2331
2336
  name,
2332
2337
  private: true,
@@ -2478,7 +2483,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
2478
2483
 
2479
2484
  // apps/cli/src/commands.ts
2480
2485
  var ClientId = "kitman-cli";
2481
- var agentRuntime = promise(() => import("./chunk-3cgshf16.js"));
2486
+ var agentRuntime = promise(() => import("./chunk-hvwkpnv5.js"));
2482
2487
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2483
2488
  defaultValue: () => gen(function* () {
2484
2489
  const tui = yield* tryPromise({
@@ -3064,6 +3069,28 @@ function workspaceCommand(args) {
3064
3069
  yield* writeActiveWorkspace(apiUrl, workspace.id);
3065
3070
  return yield* printRows([{ id: workspace.id, name: workspace.name, slug: workspace.slug, plan: workspace.plan }], command.flags.json);
3066
3071
  }
3072
+ if (command.action === "channel") {
3073
+ const workspaceId = yield* activeWorkspaceId(command.flags);
3074
+ const chosen = command.args[0];
3075
+ if (chosen === undefined) {
3076
+ const workspace = (yield* client.listWorkspaces()).items.find((each) => each.id === workspaceId);
3077
+ if (workspace === undefined)
3078
+ return yield* new CliError({ message: `No Workspace ${workspaceId}` });
3079
+ const releaseChannel = workspace.releaseChannel ?? DefaultReleaseChannel;
3080
+ if (command.flags.json)
3081
+ return yield* printRows([{ id: workspace.id, releaseChannel }], true);
3082
+ return yield* log(`${workspace.name} follows the ${releaseChannel} release channel`);
3083
+ }
3084
+ const releaseChannel = ReleaseChannels.find((channel) => channel === chosen);
3085
+ if (releaseChannel === undefined)
3086
+ return yield* new CliError({
3087
+ message: `The release channel is ${ReleaseChannels.join(" or ")}, not ${chosen}`
3088
+ });
3089
+ const workspace = yield* client.updateWorkspace(workspaceId, { releaseChannel });
3090
+ if (command.flags.json)
3091
+ return yield* printRows([{ id: workspace.id, releaseChannel: workspace.releaseChannel ?? releaseChannel }], true);
3092
+ return yield* log(`${workspace.name} now follows the ${workspace.releaseChannel ?? releaseChannel} release channel`);
3093
+ }
3067
3094
  if (command.action === "use") {
3068
3095
  const workspaceRef = requiredArg(command, "workspace");
3069
3096
  const workspace = yield* resolveWorkspace(client, workspaceRef);
@@ -3480,7 +3507,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3480
3507
  });
3481
3508
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3482
3509
  defaultValue: () => (options) => gen(function* () {
3483
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-ey4mf341.js"));
3510
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-kvt8cr8m.js"));
3484
3511
  return yield* makeRunnerRpcClient({
3485
3512
  runnerId: options.runnerId,
3486
3513
  bearer: options.bearer,
@@ -3760,7 +3787,7 @@ function startCanonicalHerdrRunnerCommand(input) {
3760
3787
  const checkouts = runCheckouts(path.join(runnerRootDir, ".kitman"), rpc.gitCredential);
3761
3788
  yield* controlPlane.client.listRepoBindings(runner.workspaceId).pipe(flatMap3(({ items }) => forEach(items.filter((binding) => binding.status === "active" && (teamId === undefined || binding.teamId === teamId)), (repoBinding) => map8(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);
3762
3789
  const platform = yield* context();
3763
- const updated = yield* make15();
3790
+ const updated = yield* make16();
3764
3791
  const scope = yield* scope2;
3765
3792
  const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
3766
3793
  const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
@@ -4012,7 +4039,7 @@ function mcpCommand(args) {
4012
4039
  if (command.action === "run") {
4013
4040
  if (command.args.length > 0)
4014
4041
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
4015
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-dh09wyed.js"));
4042
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-0367j54r.js"));
4016
4043
  return yield* runMcpServerCommand({ flags: command.flags });
4017
4044
  }
4018
4045
  if (command.action !== "setup")
@@ -4500,7 +4527,7 @@ function programLoopCommand(command) {
4500
4527
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
4501
4528
  });
4502
4529
  }
4503
- var docsModule = promise(() => import("./chunk-9q7qc1dg.js"));
4530
+ var docsModule = promise(() => import("./chunk-adbzjs9g.js"));
4504
4531
  function docsCommand(args) {
4505
4532
  return gen(function* () {
4506
4533
  const command = parseCommand(args);
@@ -5333,9 +5360,9 @@ function changeRequestCommand(args) {
5333
5360
  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}`);
5334
5361
  });
5335
5362
  }
5336
- var KitWriter = map8(promise(() => import("./chunk-6pqxsnk1.js")), (build) => build.writeKit);
5363
+ var KitWriter = map8(promise(() => import("./chunk-711r4pfw.js")), (build) => build.writeKit);
5337
5364
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5338
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-6pqxsnk1.js")), (build) => build.buildKit(directory))
5365
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-711r4pfw.js")), (build) => build.buildKit(directory))
5339
5366
  });
5340
5367
  var uploadKit = (client, workspaceId, built) => gen(function* () {
5341
5368
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -5981,6 +6008,7 @@ function runnerRow(runner) {
5981
6008
  schedulingBoundary: "scope_and_identity_gated",
5982
6009
  version: runner.version,
5983
6010
  latestVersion: runner.latestVersion,
6011
+ releaseChannel: runner.releaseChannel,
5984
6012
  lastHeartbeatAt: runner.lastHeartbeatAt
5985
6013
  };
5986
6014
  }
@@ -6111,7 +6139,7 @@ function downloadPresignedAsset(download, outputPath) {
6111
6139
  return gen(function* () {
6112
6140
  const fs = yield* FileSystem;
6113
6141
  const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
6114
- const response = yield* send(make4(download.method)(download.url), failed);
6142
+ const response = yield* send(make5(download.method)(download.url), failed);
6115
6143
  if (response.status < 200 || response.status >= 300)
6116
6144
  return yield* new CliError({ message: `Asset download failed with ${response.status}` });
6117
6145
  const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
@@ -13,11 +13,11 @@ import {
13
13
  ArraySchema,
14
14
  decodeJsonStringOption,
15
15
  encodeUnknownJsonStringSync
16
- } from "./chunk-x3cc7dfc.js";
16
+ } from "./chunk-zw3gf6r5.js";
17
17
  import {
18
18
  replaceSecretReferences,
19
19
  secretReferencesIn
20
- } from "./chunk-s8m2tzdr.js";
20
+ } from "./chunk-q5w3v4k1.js";
21
21
 
22
22
  // packages/agent-runtime/src/srt-step.ts
23
23
  import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-892qrkb3.js";
2
+ import"./chunk-mtkstrh3.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-9c9vrbh4.js";
16
- import"./chunk-y7vjk8vv.js";
17
- import"./chunk-x3cc7dfc.js";
15
+ } from "./chunk-c7253rcg.js";
16
+ import"./chunk-0h49y8gf.js";
17
+ import"./chunk-zw3gf6r5.js";
18
18
  export {
19
19
  HERDR_CORE_GENERATION2 as HERDR_CORE_GENERATION,
20
20
  HERDR_CORE_INSTALL_COMMAND2 as HERDR_CORE_INSTALL_COMMAND,