@kitman-sh/cli 0.12.0-rc.4 → 0.12.0-rc.6

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-b50dvx41.js → chunk-0346hwh6.js} +5 -5
  2. package/dist/{chunk-6b0k02x4.js → chunk-0qz10ek8.js} +1 -1
  3. package/dist/{chunk-nzsrse8d.js → chunk-15geyg2d.js} +87 -59
  4. package/dist/{chunk-r1z41qx6.js → chunk-1t12wvv1.js} +109 -108
  5. package/dist/{chunk-7kjsvwzv.js → chunk-4w4spvb1.js} +5 -5
  6. package/dist/{chunk-k81ay8y5.js → chunk-56knbdt6.js} +8 -8
  7. package/dist/{chunk-xavcp9se.js → chunk-5j848ckb.js} +2 -2
  8. package/dist/{chunk-ydydx55z.js → chunk-bvf6e6yg.js} +1 -1
  9. package/dist/{chunk-c9007k48.js → chunk-c6rbt85q.js} +1 -1
  10. package/dist/{chunk-ezf2myj0.js → chunk-e4an66v2.js} +3 -3
  11. package/dist/{chunk-xy5f2nv9.js → chunk-ewhzaqp3.js} +2 -2
  12. package/dist/{chunk-qjd6w9sw.js → chunk-fxm2jhbd.js} +2 -2
  13. package/dist/{chunk-zmcghp8w.js → chunk-gspfm7qh.js} +17 -17
  14. package/dist/{chunk-e7q2frvs.js → chunk-j5t5nye5.js} +7 -7
  15. package/dist/{chunk-rjasmnav.js → chunk-ktr2smac.js} +41 -28
  16. package/dist/{chunk-bq55md8p.js → chunk-nzjb36ad.js} +1 -1
  17. package/dist/{chunk-w0aj9mkz.js → chunk-pd2vz4bm.js} +5 -5
  18. package/dist/{chunk-ckkpqcfv.js → chunk-qrm334c6.js} +4 -4
  19. package/dist/{chunk-kybp1mkk.js → chunk-r5sw3fe0.js} +8 -8
  20. package/dist/{chunk-t2mr6z38.js → chunk-r7f8tjc8.js} +24 -24
  21. package/dist/{chunk-79gx7ek9.js → chunk-vtfwjhzh.js} +28 -70
  22. package/dist/{chunk-aafxvmj1.js → chunk-wc2kba4z.js} +7 -7
  23. package/dist/{chunk-w6cm939j.js → chunk-x6vj1tf8.js} +12 -12
  24. package/dist/{chunk-jntxtx9j.js → chunk-xwya1er0.js} +60 -14
  25. package/dist/{chunk-pw10mq9e.js → chunk-z450wa10.js} +4 -4
  26. package/dist/{chunk-74txrt4s.js → chunk-znar1th3.js} +4 -4
  27. package/dist/index.js +4 -4
  28. package/package.json +1 -1
@@ -96,7 +96,7 @@ import {
96
96
  Defect,
97
97
  Exit,
98
98
  toCodecJson
99
- } from "./chunk-79gx7ek9.js";
99
+ } from "./chunk-vtfwjhzh.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-zmcghp8w.js";
111
+ } from "./chunk-gspfm7qh.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-r1z41qx6.js";
126
+ } from "./chunk-1t12wvv1.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 make3 = /* @__PURE__ */ fnUntraced(function* (group, options) {
486
+ var make4 = /* @__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, make3, withHeaders, layerProtocolSocket, ConnectionHooks };
832
+ export { layerJson, make4, withHeaders, layerProtocolSocket, ConnectionHooks };
@@ -22,21 +22,21 @@ import {
22
22
  NullOr,
23
23
  Finite,
24
24
  encodeUnknownJsonStringSync
25
- } from "./chunk-79gx7ek9.js";
25
+ } from "./chunk-vtfwjhzh.js";
26
26
  import {
27
27
  isNumber,
28
28
  isJsonObject,
29
29
  isString
30
- } from "./chunk-c9007k48.js";
30
+ } from "./chunk-c6rbt85q.js";
31
31
  import {
32
- make10,
32
+ make11,
33
33
  runForEach,
34
34
  compiled2
35
- } from "./chunk-zmcghp8w.js";
35
+ } from "./chunk-gspfm7qh.js";
36
36
  import {
37
37
  ChildProcessSpawner,
38
- make2
39
- } from "./chunk-jntxtx9j.js";
38
+ make3
39
+ } from "./chunk-xwya1er0.js";
40
40
 
41
41
  // packages/agent-runtime/src/opencode-store.ts
42
42
  import { lstatSync, readFileSync, realpathSync } from "fs";
@@ -169,8 +169,8 @@ var opencodeReaderCommand = () => compiled2 ? [process.execPath, "opencode-read"
169
169
  var isolatedRead = (store, name, input) => gen(function* () {
170
170
  const spawner = yield* ChildProcessSpawner;
171
171
  const [command, ...args] = opencodeReaderCommand();
172
- const handle = yield* spawner.spawn(make2(command, args, {
173
- stdin: make10(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
172
+ const handle = yield* spawner.spawn(make3(command, args, {
173
+ stdin: make11(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
174
174
  stderr: "ignore",
175
175
  extendEnv: false,
176
176
  env: {},
@@ -13,11 +13,11 @@ import {
13
13
  ArraySchema,
14
14
  decodeJsonStringOption,
15
15
  encodeUnknownJsonStringSync
16
- } from "./chunk-79gx7ek9.js";
16
+ } from "./chunk-vtfwjhzh.js";
17
17
  import {
18
18
  replaceSecretReferences,
19
19
  secretReferencesIn
20
- } from "./chunk-6b0k02x4.js";
20
+ } from "./chunk-0qz10ek8.js";
21
21
 
22
22
  // packages/agent-runtime/src/srt-step.ts
23
23
  import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
@@ -4,7 +4,7 @@ import {
4
4
  searchDocs2,
5
5
  readDoc2,
6
6
  pinnedLink2
7
- } from "./chunk-qjd6w9sw.js";
7
+ } from "./chunk-fxm2jhbd.js";
8
8
  export {
9
9
  DefaultDocsSearchLimit2 as DefaultDocsSearchLimit,
10
10
  pinnedLink2 as pinnedLink,
@@ -8,7 +8,7 @@ import {
8
8
  isFunction2,
9
9
  isUndefined2,
10
10
  isObjectOrArray
11
- } from "./chunk-79gx7ek9.js";
11
+ } from "./chunk-vtfwjhzh.js";
12
12
 
13
13
  // packages/core/src/runtime-type.ts
14
14
  var UnsafeJsonObjectKeys = new Set(["__proto__", "constructor", "prototype"]);
@@ -24,11 +24,11 @@ import {
24
24
  Record,
25
25
  Int,
26
26
  fromJsonString
27
- } from "./chunk-79gx7ek9.js";
27
+ } from "./chunk-vtfwjhzh.js";
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-zmcghp8w.js";
31
+ } from "./chunk-gspfm7qh.js";
32
32
  import {
33
33
  digestSha256,
34
34
  digestSha512,
@@ -38,7 +38,7 @@ import {
38
38
  get2,
39
39
  layer4,
40
40
  KitDigest
41
- } from "./chunk-r1z41qx6.js";
41
+ } from "./chunk-1t12wvv1.js";
42
42
 
43
43
  // packages/core/src/npm-registry.ts
44
44
  var KitManifest = Struct({
@@ -14,8 +14,8 @@ import {
14
14
  writeSrtSettings2,
15
15
  srtStepArgv2,
16
16
  srtArgv2
17
- } from "./chunk-zmcghp8w.js";
18
- import"./chunk-79gx7ek9.js";
17
+ } from "./chunk-gspfm7qh.js";
18
+ import"./chunk-vtfwjhzh.js";
19
19
  export {
20
20
  compiled2 as compiled,
21
21
  harnessesUnsupportedInSrt2 as harnessesUnsupportedInSrt,
@@ -604,7 +604,7 @@ export default defineKit({
604
604
 
605
605
  A Step launches the first choice the claiming Runner offers, and the Run page's Step view shows the choices it skipped and why. A fallback with no effort runs at the Agent's effort, and one with no model runs on the Harness's own model. An Agent that extends another inherits its fallbacks; naming \`fallbacks\` replaces them, and \`fallbacks: []\` clears them.
606
606
 
607
- Effort (\`low\`, \`medium\`, \`high\` or \`xhigh\`) is recorded on each StepAttempt. \`kitman agent list\` shows each Agent merged, with the layer each field came from.`
607
+ Effort (\`low\`, \`medium\`, \`high\` or \`xhigh\`) is recorded on each StepAttempt. \`kitman agent list --team <team>\` shows each Agent merged as that Team's Runs resolve it, with the layer each field came from, so a Team Kit's override reads \`claude (team)\`. Without \`--team\` it uses the active Team, or only the workspace layer when there is none, and its first line says which.`
608
608
  },
609
609
  {
610
610
  title: "Projects and Saved Views",
@@ -1444,7 +1444,7 @@ var pathOfLink = (link) => {
1444
1444
  return page === null ? link : page[1] || "index";
1445
1445
  };
1446
1446
  var UnpinnedSdkLink = "https://cdn.jsdelivr.net/npm/@kitman-sh/sdk/";
1447
- var pinnedLink2 = (link, version = "0.12.0-rc.4") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
1447
+ var pinnedLink2 = (link, version = "0.12.0-rc.6") => version === undefined || !link.startsWith(UnpinnedSdkLink) ? link : link.replace(UnpinnedSdkLink, `https://cdn.jsdelivr.net/npm/@kitman-sh/sdk@${version}/`);
1448
1448
  var pageOf = (path) => path.split("#")[0];
1449
1449
  var exportName = (section) => section.path.startsWith("sdk/") ? section.path.split("#")[1] ?? "" : "";
1450
1450
  function excerpt(text, queryTerms) {
@@ -201,7 +201,7 @@ import {
201
201
  String4,
202
202
  toCodecStringTree,
203
203
  encodeUnknownJsonStringSync
204
- } from "./chunk-79gx7ek9.js";
204
+ } from "./chunk-vtfwjhzh.js";
205
205
 
206
206
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Iterable.js
207
207
  var headUnsafe = (self) => {
@@ -1129,7 +1129,7 @@ var MutableRefProto = {
1129
1129
  };
1130
1130
  }
1131
1131
  };
1132
- var make7 = (value) => {
1132
+ var make8 = (value) => {
1133
1133
  const ref = Object.create(MutableRefProto);
1134
1134
  ref.current = value;
1135
1135
  return ref;
@@ -1290,7 +1290,7 @@ var remove = (self, value) => filter2(self, (v) => v !== value);
1290
1290
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/PubSub.js
1291
1291
  var TypeId3 = "~effect/PubSub";
1292
1292
  var SubscriptionTypeId = "~effect/PubSub/Subscription";
1293
- var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make7(false), options.strategy(), make7(none())));
1293
+ var make5 = (options) => sync2(() => makePubSubUnsafe(options.atomicPubSub(), new Map, makeUnsafe6(), makeUnsafe2(false), make8(false), options.strategy(), make8(none())));
1294
1294
  var unbounded = (options) => make5({
1295
1295
  atomicPubSub: () => makeAtomicUnbounded(options),
1296
1296
  strategy: () => new DroppingStrategy
@@ -1385,7 +1385,7 @@ var removeSubscribers = (subscribers, subscription, pollers) => {
1385
1385
  subscribers.delete(subscription);
1386
1386
  }
1387
1387
  };
1388
- var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe2(false), make7(false), strategy, pubsub.replayWindow(), ended);
1388
+ var makeSubscriptionUnsafe = (pubsub, subscribers, strategy, ended) => new SubscriptionImpl(pubsub, subscribers, pubsub.subscribe(), make4(), makeUnsafe2(false), make8(false), strategy, pubsub.replayWindow(), ended);
1389
1389
  class UnboundedPubSub {
1390
1390
  publisherHead = {
1391
1391
  value: AbsentValue,
@@ -1802,7 +1802,7 @@ var QueueProto = {
1802
1802
  };
1803
1803
  }
1804
1804
  };
1805
- var make8 = (options) => withFiber((fiber) => {
1805
+ var make9 = (options) => withFiber((fiber) => {
1806
1806
  const self = Object.create(QueueProto);
1807
1807
  self.dispatcher = fiber.currentDispatcher;
1808
1808
  self.capacity = options?.capacity ?? Number.POSITIVE_INFINITY;
@@ -1817,14 +1817,14 @@ var make8 = (options) => withFiber((fiber) => {
1817
1817
  };
1818
1818
  return succeed2(self);
1819
1819
  });
1820
- var bounded = (capacity) => make8({
1820
+ var bounded = (capacity) => make9({
1821
1821
  capacity
1822
1822
  });
1823
- var sliding = (capacity) => make8({
1823
+ var sliding = (capacity) => make9({
1824
1824
  capacity,
1825
1825
  strategy: "sliding"
1826
1826
  });
1827
- var unbounded2 = () => make8();
1827
+ var unbounded2 = () => make9();
1828
1828
  var offer = /* @__PURE__ */ dual(2, (self, message) => suspend2(() => offerUnsafe(self, message) ? exitTrue : self.state._tag === "Open" && self.strategy === "suspend" ? offerOrWait(self, message) : exitFalse));
1829
1829
  var offerUnsafe = (self, message) => {
1830
1830
  if (self.state._tag !== "Open") {
@@ -2250,7 +2250,7 @@ var fromTransformBracket = (f) => fromTransform(fnUntraced(function* (upstream,
2250
2250
  return onError(pull, onCause);
2251
2251
  }));
2252
2252
  var toTransform = (channel) => channel.transform;
2253
- var asyncQueue = (scope, f, options) => make8({
2253
+ var asyncQueue = (scope, f, options) => make9({
2254
2254
  capacity: options?.bufferSize,
2255
2255
  strategy: options?.strategy
2256
2256
  }).pipe(tap2((queue) => addFinalizer(scope, shutdown(queue))), tap2((queue) => provide(f(queue), scope).pipe(catchCause2((cause) => failCause(queue, cause)), forkIn(scope, {
@@ -2291,7 +2291,7 @@ var fromReadableStream2 = (options) => fromTransform((_, scope) => readableStrea
2291
2291
  }));
2292
2292
  var readableStreamToPullUnsafe = (options) => {
2293
2293
  const reader = options.readable.getReader();
2294
- const exit = options.exit ?? make7(undefined);
2294
+ const exit = options.exit ?? make8(undefined);
2295
2295
  const pull = suspend3(() => {
2296
2296
  if (exit.current)
2297
2297
  return exit.current;
@@ -2905,7 +2905,7 @@ var release = (self, state) => {
2905
2905
  };
2906
2906
 
2907
2907
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/RcRef.js
2908
- var make9 = make6;
2908
+ var make10 = make6;
2909
2909
  var get3 = get2;
2910
2910
 
2911
2911
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Stream.js
@@ -2917,7 +2917,7 @@ var transformPull2 = (self, f) => fromChannel2(fromTransform((_, scope) => flatM
2917
2917
  var toChannel2 = (stream) => stream.channel;
2918
2918
  var callback = (f, options) => fromChannel2(callbackArray(f, options));
2919
2919
  var empty2 = /* @__PURE__ */ fromChannel2(empty);
2920
- var make10 = (...values) => fromArray2(values);
2920
+ var make11 = (...values) => fromArray2(values);
2921
2921
  var suspend = (stream) => {
2922
2922
  const suspended = fromChannel2(suspend4(() => stream().channel));
2923
2923
  suspendedStreams.set(suspended, stream);
@@ -3082,7 +3082,7 @@ var toReadableStreamEffect = /* @__PURE__ */ dual((args) => isStream(args[0]), (
3082
3082
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/FileSystem.js
3083
3083
  var TypeId10 = "~effect/FileSystem";
3084
3084
  var FileSystem = /* @__PURE__ */ Service2("effect/FileSystem");
3085
- var make11 = (impl) => FileSystem.of({
3085
+ var make12 = (impl) => FileSystem.of({
3086
3086
  ...impl,
3087
3087
  [TypeId10]: TypeId10,
3088
3088
  glob: make2(impl),
@@ -3142,7 +3142,7 @@ class WatchBackend extends (/* @__PURE__ */ Service2()("effect/FileSystem/WatchB
3142
3142
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Path.js
3143
3143
  var TypeId11 = "~effect/Path";
3144
3144
  var Path = /* @__PURE__ */ Service2("effect/Path");
3145
- var make12 = (impl) => Path.of({
3145
+ var make13 = (impl) => Path.of({
3146
3146
  ...impl,
3147
3147
  [TypeId11]: TypeId11,
3148
3148
  resolveWithin(root, input) {
@@ -3217,7 +3217,7 @@ function makeProvider(load, mapInput) {
3217
3217
  function makeSource(get, transform) {
3218
3218
  return makeProvider((path) => get(transform(path)), (f) => makeSource(get, (path) => f(transform(path))));
3219
3219
  }
3220
- function make13(get) {
3220
+ function make7(get) {
3221
3221
  return makeSource(get, identityPath);
3222
3222
  }
3223
3223
  function emptyStringAsMissing(value, preserveEmptyStrings) {
@@ -3226,7 +3226,7 @@ function emptyStringAsMissing(value, preserveEmptyStrings) {
3226
3226
  function fromEnvRecord(env, options) {
3227
3227
  const preserveEmptyStrings = options?.preserveEmptyStrings === true;
3228
3228
  const trie = buildEnvTrie(env);
3229
- return make13((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
3229
+ return make7((path) => succeed6(nodeAtEnv(trie, env, path, preserveEmptyStrings)));
3230
3230
  }
3231
3231
  function fromEnv(options) {
3232
3232
  const env = options?.env ?? {
@@ -3557,4 +3557,4 @@ var srtArgv2 = (srtCommand, settingsFile, argv) => [
3557
3557
  ...argv
3558
3558
  ];
3559
3559
 
3560
- export { map, makeEquivalence, bytes, join, interrupt, getCurrent, BadArgument, systemError, badArgument, makeUnsafe2, make7, unbounded, publishUnsafe, make8, bounded, sliding, unbounded2, offer, offerUnsafe, offerAll, fail, failCause, failCauseUnsafe, end, endUnsafe, shutdownUnsafe, take, poll, makeUnsafe3, fromTransform, mapDone, isSink, fromChannel, drain, make9, get3, isStream, fromChannel2, callback, empty2, make10, suspend, fail2, fromQueue, fromPubSub, fromReadableStream, unwrap, map2, tap, drainFork, concat, merge2, filter, catchCause, tapError, mapError, 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, compiled2, pinnedSrtCommand2, pinnedSrtStepCommand2, runSrtCli2, kitmanCacheDirectory2, srtSettings2, srtCacheEnvironment2, srtInheritedEnv2, inheritedEnvironment2, withOnlyEnvironment2, writeSrtSettings2, srtStepArgv2, srtArgv2 };
3560
+ 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, 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, compiled2, pinnedSrtCommand2, pinnedSrtStepCommand2, runSrtCli2, kitmanCacheDirectory2, srtSettings2, srtCacheEnvironment2, srtInheritedEnv2, inheritedEnvironment2, withOnlyEnvironment2, writeSrtSettings2, srtStepArgv2, srtArgv2 };
@@ -6,10 +6,10 @@ import {
6
6
  gen,
7
7
  flatMap3,
8
8
  provideContext2
9
- } from "./chunk-79gx7ek9.js";
9
+ } from "./chunk-vtfwjhzh.js";
10
10
  import {
11
11
  runForEach
12
- } from "./chunk-zmcghp8w.js";
12
+ } from "./chunk-gspfm7qh.js";
13
13
  import {
14
14
  WebSocketConstructor,
15
15
  layerWebSocketConstructorGlobal,
@@ -19,13 +19,13 @@ import {
19
19
  RunnerReplicaRpcs,
20
20
  RunnerRunFileRpcs,
21
21
  ProgramRpcs
22
- } from "./chunk-r1z41qx6.js";
22
+ } from "./chunk-1t12wvv1.js";
23
23
  import {
24
24
  layerJson,
25
- make3,
25
+ make4,
26
26
  withHeaders,
27
27
  layerProtocolSocket
28
- } from "./chunk-7kjsvwzv.js";
28
+ } from "./chunk-4w4spvb1.js";
29
29
 
30
30
  // packages/live/src/rpc/runner-client.ts
31
31
  var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
@@ -46,7 +46,7 @@ var authorizer = (options) => (call) => flatMap3(options.bearer, (token) => with
46
46
  var RunnerProcessRpcs = RunnerReplicaRpcs.merge(RunnerRunFileRpcs);
47
47
  var makeRunnerRpcClient2 = (options) => gen(function* () {
48
48
  const protocol = yield* build(options.protocol);
49
- const client = yield* make3(RunnerProcessRpcs).pipe(provideContext2(protocol));
49
+ const client = yield* make4(RunnerProcessRpcs).pipe(provideContext2(protocol));
50
50
  const authorized = authorizer(options);
51
51
  return {
52
52
  claim: (input) => authorized(client.Claim(input)),
@@ -74,7 +74,7 @@ var makeRunnerRpcClient2 = (options) => gen(function* () {
74
74
  });
75
75
  var makeProgramRpcClient2 = (options) => gen(function* () {
76
76
  const protocol = yield* build(options.protocol);
77
- const client = yield* make3(ProgramRpcs).pipe(provideContext2(protocol));
77
+ const client = yield* make4(ProgramRpcs).pipe(provideContext2(protocol));
78
78
  const authorized = authorizer(options);
79
79
  return {
80
80
  recordActivity: (input) => authorized(client.RecordActivity(input)),
@@ -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,
@@ -96,7 +96,7 @@ import {
96
96
  decodeJsonString,
97
97
  encodeJsonStringSync,
98
98
  encodePrettyJsonString
99
- } from "./chunk-79gx7ek9.js";
99
+ } from "./chunk-vtfwjhzh.js";
100
100
  import {
101
101
  tap,
102
102
  mapError,
@@ -108,7 +108,7 @@ import {
108
108
  withDefault,
109
109
  option,
110
110
  String2
111
- } from "./chunk-zmcghp8w.js";
111
+ } from "./chunk-gspfm7qh.js";
112
112
  import {
113
113
  currentTimeMillis,
114
114
  SecureRandom,
@@ -156,7 +156,7 @@ import {
156
156
  digestSha256,
157
157
  sha256Hasher,
158
158
  raw,
159
- make4,
159
+ make5,
160
160
  get,
161
161
  put,
162
162
  HttpClient,
@@ -218,10 +218,10 @@ import {
218
218
  harnessNames,
219
219
  herdrRunnerCapabilities2,
220
220
  declaredChecks
221
- } from "./chunk-r1z41qx6.js";
221
+ } from "./chunk-1t12wvv1.js";
222
222
  import {
223
223
  Id
224
- } from "./chunk-6b0k02x4.js";
224
+ } from "./chunk-0qz10ek8.js";
225
225
  import {
226
226
  toJsonValue,
227
227
  isOneOf,
@@ -231,11 +231,11 @@ import {
231
231
  isObject,
232
232
  isJsonObject,
233
233
  isString
234
- } from "./chunk-c9007k48.js";
234
+ } from "./chunk-c6rbt85q.js";
235
235
  import {
236
236
  ChildProcessSpawner,
237
- make2
238
- } from "./chunk-jntxtx9j.js";
237
+ make3
238
+ } from "./chunk-xwya1er0.js";
239
239
 
240
240
  // apps/cli/src/cli-error.ts
241
241
  function cliErrorCode(error, status) {
@@ -452,7 +452,7 @@ var Usage = [
452
452
  " kitman loop show <loop>",
453
453
  " kitman loop starts [--limit <n>] (what Events started, or why they started nothing)",
454
454
  " kitman loop when <loop> <event> on|off (turn an automatic start on or off for the Team)",
455
- " kitman agent list",
455
+ " kitman agent list [--team <team>] (each Agent as the Team's Runs resolve it, or the Workspace's without a Team)",
456
456
  "",
457
457
  "Kits of your own, to deploy with kitman deploy:",
458
458
  " kitman init --kit [dir] (a new Kit with an example Loop and a GitLab pipeline)",
@@ -693,7 +693,7 @@ var examples = [
693
693
  "kitman loop fork build ./kits/my-build",
694
694
  "kitman loop catalog",
695
695
  `kitman loop validate build --input '{"task":"KIT-42"}'`,
696
- "kitman agent list",
696
+ "kitman agent list --team KIT",
697
697
  "kitman verify list",
698
698
  'kitman verify add unit-tests "bun run test" --cwd apps/cli',
699
699
  "kitman verify remove unit-tests",
@@ -987,10 +987,10 @@ var sandboxMissing = (sandbox, missing) => ({
987
987
  var personalCheckBackend = (agentSandbox, dockerAvailable) => agentSandbox === "srt" || agentSandbox === "docker" && dockerAvailable ? agentSandbox : undefined;
988
988
  var herdrCoreSession = (runnerId, personal) => personal ? undefined : `kitman-${sha2562(runnerId).slice(0, 16)}`;
989
989
  var OpenHerdrCore = Reference("kitman/cli/OpenHerdrCore", {
990
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-74txrt4s.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
990
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-znar1th3.js")), ({ HerdrCore, herdrCoreLayer }) => provide3(service(HerdrCore), herdrCoreLayer(options)))
991
991
  });
992
992
  var UpdateHerdrCore = Reference("kitman/cli/UpdateHerdrCore", {
993
- defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-74txrt4s.js")), (module) => module.updateHerdrCore(options))
993
+ defaultValue: () => (options) => flatMap3(promise(() => import("./chunk-znar1th3.js")), (module) => module.updateHerdrCore(options))
994
994
  });
995
995
  var herdrCoreMissing = (error) => {
996
996
  if (isTagged(error, "HerdrCoreMissing"))
@@ -1410,7 +1410,7 @@ var syncTargets = (harness) => gen(function* () {
1410
1410
  });
1411
1411
  var syncKits = (input) => gen(function* () {
1412
1412
  const fs = yield* FileSystem;
1413
- const { syncKitSetup } = yield* promise(() => import("./chunk-kybp1mkk.js"));
1413
+ const { syncKitSetup } = yield* promise(() => import("./chunk-r5sw3fe0.js"));
1414
1414
  const harnesses = yield* syncTargets(input.harness);
1415
1415
  const chain = yield* input.client.getKitChain(input.workspaceId);
1416
1416
  for (const { name, problem } of chain.skipped)
@@ -1926,7 +1926,7 @@ var ServiceManager = Reference("kitman/cli/ServiceManager", {
1926
1926
  run: (command, args) => runCommand2(command, args),
1927
1927
  attach: (command, args) => gen(function* () {
1928
1928
  const spawner = yield* ChildProcessSpawner;
1929
- const handle = yield* spawner.spawn(make2(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1929
+ const handle = yield* spawner.spawn(make3(command, args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" }));
1930
1930
  const exitCode = yield* handle.exitCode;
1931
1931
  if (exitCode !== 0)
1932
1932
  return yield* new CommandFailed2({ command, reason: `exit code ${exitCode}` });
@@ -2328,7 +2328,7 @@ var package_default = {
2328
2328
  };
2329
2329
 
2330
2330
  // apps/cli/src/scaffold.ts
2331
- var cliVersion = "0.12.0-rc.4";
2331
+ var cliVersion = "0.12.0-rc.6";
2332
2332
  var packageJson = (name, scaffold) => `${JSON.stringify({
2333
2333
  name,
2334
2334
  private: true,
@@ -2480,7 +2480,7 @@ var scaffoldKit = (directory, scaffold = {}) => gen(function* () {
2480
2480
 
2481
2481
  // apps/cli/src/commands.ts
2482
2482
  var ClientId = "kitman-cli";
2483
- var agentRuntime = promise(() => import("./chunk-nzsrse8d.js"));
2483
+ var agentRuntime = promise(() => import("./chunk-15geyg2d.js"));
2484
2484
  var TuiLauncher = Reference("kitman/cli/TuiLauncher", {
2485
2485
  defaultValue: () => gen(function* () {
2486
2486
  const tui = yield* tryPromise({
@@ -3482,7 +3482,7 @@ var SandboxHostProbe = Reference("kitman/cli/SandboxHostProbe", {
3482
3482
  });
3483
3483
  var OpenRunnerRpc = Reference("kitman/cli/OpenRunnerRpc", {
3484
3484
  defaultValue: () => (options) => gen(function* () {
3485
- const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-aafxvmj1.js"));
3485
+ const { makeRunnerRpcClient, runnerRpcUrl, runnerWebSocketProtocol } = yield* promise(() => import("./chunk-wc2kba4z.js"));
3486
3486
  return yield* makeRunnerRpcClient({
3487
3487
  runnerId: options.runnerId,
3488
3488
  bearer: options.bearer,
@@ -3762,7 +3762,7 @@ function startCanonicalHerdrRunnerCommand(input) {
3762
3762
  const checkouts = runCheckouts(path.join(runnerRootDir, ".kitman"), rpc.gitCredential);
3763
3763
  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);
3764
3764
  const platform = yield* context();
3765
- const updated = yield* make15();
3765
+ const updated = yield* make16();
3766
3766
  const scope = yield* scope2;
3767
3767
  const startUpdate = (update) => update.pipe(catch_((error) => andThen2(restartOntoUpdate(input.runnerId), fail5(updated, error))), provideContext2(platform), forkIn(scope), asVoid);
3768
3768
  const refusedForProtocol = container ? updater.stopWhenDrained(new RunnerStopped({ problem: updateRequired })).pipe(catch_((stopped) => fail5(updated, stopped)), forkIn(scope), asVoid) : startUpdate(updater.updateRequired);
@@ -4014,7 +4014,7 @@ function mcpCommand(args) {
4014
4014
  if (command.action === "run") {
4015
4015
  if (command.args.length > 0)
4016
4016
  return yield* new CliError({ message: `Unknown command: ${args.join(" ")}` });
4017
- const { runMcpServerCommand } = yield* promise(() => import("./chunk-t2mr6z38.js"));
4017
+ const { runMcpServerCommand } = yield* promise(() => import("./chunk-r7f8tjc8.js"));
4018
4018
  return yield* runMcpServerCommand({ flags: command.flags });
4019
4019
  }
4020
4020
  if (command.action !== "setup")
@@ -4502,7 +4502,7 @@ function programLoopCommand(command) {
4502
4502
  return yield* new CliError({ message: `Unknown loop command: ${command.action}` });
4503
4503
  });
4504
4504
  }
4505
- var docsModule = promise(() => import("./chunk-ydydx55z.js"));
4505
+ var docsModule = promise(() => import("./chunk-bvf6e6yg.js"));
4506
4506
  function docsCommand(args) {
4507
4507
  return gen(function* () {
4508
4508
  const command = parseCommand(args);
@@ -4536,11 +4536,11 @@ function docsCommand(args) {
4536
4536
  `));
4537
4537
  });
4538
4538
  }
4539
+ var agentListOptions = new Set(["--team", "--json", "--api-url", "--workspace"]);
4539
4540
  function agentCommand(args) {
4540
4541
  return gen(function* () {
4541
4542
  const command = parseCommand(args);
4542
4543
  const client = yield* loopClientFor(yield* resolveApiUrl(command.flags.apiUrl));
4543
- const print = (value, lines) => command.flags.json ? printJson(value) : forEach(lines(value), (line) => log(line), { discard: true });
4544
4544
  const resolvedField = (agent, field) => {
4545
4545
  const value = agent[field];
4546
4546
  const layer = agent.fieldLayers?.[field];
@@ -4573,9 +4573,22 @@ function agentCommand(args) {
4573
4573
  listField(agent, "skills")
4574
4574
  ].filter((field) => field !== "").join(" ");
4575
4575
  if (command.action === "list") {
4576
- const teamId = yield* optionalActiveTeamId(command.flags);
4577
- const listed = yield* client.listProgramAgents(yield* activeWorkspaceId(command.flags), teamId === undefined ? {} : { teamId });
4578
- return yield* print(listed, (value) => value.items.map(agentLine));
4576
+ const takes = "it takes --team <team> and --json";
4577
+ const refusedOption = args.slice(2).find((arg) => arg.startsWith("-") && !agentListOptions.has(arg));
4578
+ if (refusedOption !== undefined)
4579
+ return yield* new CliError({ message: `kitman agent list does not take ${refusedOption}; ${takes}` });
4580
+ if (command.args.length > 0)
4581
+ return yield* new CliError({ message: `kitman agent list takes no arguments; ${takes}` });
4582
+ const workspaceId = yield* activeWorkspaceId(command.flags);
4583
+ const teamRef = command.flags.team ?? (yield* optionalActiveTeamId(command.flags));
4584
+ const listed = yield* client.listProgramAgents(workspaceId, teamRef === undefined ? {} : { teamId: teamRef }).pipe(catchIf((error) => teamRef !== undefined && error.status === 404, () => fail7(new CliError({ message: `No Team ${teamRef} in the Workspace` }))));
4585
+ if (command.flags.json)
4586
+ return yield* printJson(listed);
4587
+ const team = teamRef === undefined ? undefined : yield* teamNamed(client, workspaceId, teamRef);
4588
+ const heading = team === undefined ? "Agents as the Workspace resolves them, the workspace layer only; --team <team> adds a Team's layer:" : `Agents as ${command.flags.team === undefined ? "the active " : ""}Team ${team.key}'s Runs resolve them, each field with the layer it came from:`;
4589
+ return yield* forEach([heading, ...listed.items.map(agentLine)], (line) => log(line), {
4590
+ discard: true
4591
+ });
4579
4592
  }
4580
4593
  return yield* new CliError({ message: `Unknown agent command: ${command.action}. Use kitman agent list.` });
4581
4594
  });
@@ -5322,9 +5335,9 @@ function changeRequestCommand(args) {
5322
5335
  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}`);
5323
5336
  });
5324
5337
  }
5325
- var KitWriter = map8(promise(() => import("./chunk-w6cm939j.js")), (build) => build.writeKit);
5338
+ var KitWriter = map8(promise(() => import("./chunk-x6vj1tf8.js")), (build) => build.writeKit);
5326
5339
  var KitBuilder = Reference("kitman/cli/KitBuilder", {
5327
- defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-w6cm939j.js")), (build) => build.buildKit(directory))
5340
+ defaultValue: () => (directory) => flatMap3(promise(() => import("./chunk-x6vj1tf8.js")), (build) => build.buildKit(directory))
5328
5341
  });
5329
5342
  var uploadKit = (client, workspaceId, built) => gen(function* () {
5330
5343
  yield* client.uploadKitBundle(workspaceId, built.digest, { bundle: encode2(built.bundle) });
@@ -6100,7 +6113,7 @@ function downloadPresignedAsset(download, outputPath) {
6100
6113
  return gen(function* () {
6101
6114
  const fs = yield* FileSystem;
6102
6115
  const failed = (cause) => new CliError({ message: `Asset download failed: ${String(cause)}` });
6103
- const response = yield* send(make4(download.method)(download.url), failed);
6116
+ const response = yield* send(make5(download.method)(download.url), failed);
6104
6117
  if (response.status < 200 || response.status >= 300)
6105
6118
  return yield* new CliError({ message: `Asset download failed with ${response.status}` });
6106
6119
  const body = yield* response.arrayBuffer.pipe(mapError2((error) => failed(error.message)));
@@ -3,7 +3,7 @@ import {
3
3
  Random,
4
4
  succeed6,
5
5
  withFiber2
6
- } from "./chunk-79gx7ek9.js";
6
+ } from "./chunk-vtfwjhzh.js";
7
7
 
8
8
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Random.js
9
9
  var Random2 = Random;
@@ -23,25 +23,25 @@ import {
23
23
  fnUntraced,
24
24
  encodePrettyJsonString,
25
25
  decodeJsonStringSync
26
- } from "./chunk-79gx7ek9.js";
26
+ } from "./chunk-vtfwjhzh.js";
27
27
  import {
28
28
  isJsonObject,
29
29
  isString
30
- } from "./chunk-c9007k48.js";
30
+ } from "./chunk-c6rbt85q.js";
31
31
  import {
32
32
  FileSystem,
33
33
  Path,
34
34
  optionalEnv,
35
35
  tempDirectoryScoped
36
- } from "./chunk-zmcghp8w.js";
36
+ } from "./chunk-gspfm7qh.js";
37
37
  import {
38
38
  AgentHarnessIds,
39
39
  sha2562,
40
40
  runCommand2
41
- } from "./chunk-r1z41qx6.js";
41
+ } from "./chunk-1t12wvv1.js";
42
42
  import {
43
43
  NpmRegistry
44
- } from "./chunk-ezf2myj0.js";
44
+ } from "./chunk-e4an66v2.js";
45
45
 
46
46
  // packages/agent-runtime/src/config-convergence.ts
47
47
  var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
@@ -75,10 +75,10 @@ import {
75
75
  toEquivalence,
76
76
  toCodecJson,
77
77
  Json
78
- } from "./chunk-79gx7ek9.js";
78
+ } from "./chunk-vtfwjhzh.js";
79
79
  import {
80
80
  guard
81
- } from "./chunk-6b0k02x4.js";
81
+ } from "./chunk-0qz10ek8.js";
82
82
  import {
83
83
  currentTimeMillis,
84
84
  WebCrypto,
@@ -105,11 +105,11 @@ import {
105
105
  KitDigest,
106
106
  KitSetup,
107
107
  RunnerRpcError
108
- } from "./chunk-r1z41qx6.js";
108
+ } from "./chunk-1t12wvv1.js";
109
109
  import {
110
110
  runForEach,
111
111
  FileSystem
112
- } from "./chunk-zmcghp8w.js";
112
+ } from "./chunk-gspfm7qh.js";
113
113
 
114
114
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/crypto/internal/webCrypto.js
115
115
  var subtleUnavailable = () => new Error("crypto.subtle is unavailable; browsers expose it only in secure contexts");