@kitman-sh/cli 0.10.96 → 0.10.98

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 (26) hide show
  1. package/dist/{chunk-ampzxrqe.js → chunk-07p2dcq3.js} +333 -94
  2. package/dist/{chunk-2kr43ps6.js → chunk-3bjekzn7.js} +312 -395
  3. package/dist/{chunk-dh3108wk.js → chunk-6dc0x5cg.js} +8 -8
  4. package/dist/{chunk-q3nygncv.js → chunk-797w5qe6.js} +7 -7
  5. package/dist/{chunk-4psvc86s.js → chunk-7c3pgktm.js} +9 -8
  6. package/dist/{chunk-a244myqw.js → chunk-7ya2q09c.js} +1 -1
  7. package/dist/{chunk-qacvrg7j.js → chunk-95mkdtzk.js} +6 -6
  8. package/dist/{chunk-tpdcq44c.js → chunk-aba9zdpb.js} +32 -32
  9. package/dist/{chunk-mcpesyz2.js → chunk-bqg9gy2e.js} +7 -7
  10. package/dist/{chunk-8tq7n7wc.js → chunk-c6h3fhtb.js} +24 -24
  11. package/dist/{chunk-fv6kgtze.js → chunk-cgjyv52e.js} +2 -2
  12. package/dist/{chunk-bk3dpjxq.js → chunk-d1sqb8rt.js} +1 -1
  13. package/dist/{chunk-c9wzakrx.js → chunk-fd39ch4n.js} +8 -8
  14. package/dist/{chunk-6aa8y66v.js → chunk-g1xmj2nb.js} +4 -4
  15. package/dist/{chunk-abf4m4b2.js → chunk-gfqm22x7.js} +5 -5
  16. package/dist/{chunk-15w92pn6.js → chunk-j8vq6sk1.js} +19 -19
  17. package/dist/{chunk-t7ncjd6s.js → chunk-n8c1wh6t.js} +6 -6
  18. package/dist/{chunk-rdv42ygn.js → chunk-nym2zmz3.js} +4 -4
  19. package/dist/{chunk-3r7ahnwy.js → chunk-p83y21hp.js} +4 -4
  20. package/dist/{chunk-et6qa95h.js → chunk-qrxkpwzy.js} +1 -1
  21. package/dist/{chunk-vjcn82g3.js → chunk-s5p94z8x.js} +65 -214
  22. package/dist/{chunk-q2d37e4x.js → chunk-s90hj0mb.js} +53 -53
  23. package/dist/{chunk-s3qgchay.js → chunk-sy8d7bfa.js} +98 -98
  24. package/dist/{chunk-g3r5xp0t.js → chunk-xwhybbj2.js} +2 -2
  25. package/dist/index.js +4 -4
  26. package/package.json +1 -1
@@ -11,7 +11,7 @@ import {
11
11
  fail7,
12
12
  flatMap3,
13
13
  exit,
14
- map8,
14
+ map7,
15
15
  as,
16
16
  catch_,
17
17
  catchReason,
@@ -23,24 +23,24 @@ import {
23
23
  fnUntraced,
24
24
  encodePrettyJsonString,
25
25
  decodeJsonStringSync
26
- } from "./chunk-ampzxrqe.js";
26
+ } from "./chunk-07p2dcq3.js";
27
27
  import {
28
28
  isJsonObject,
29
29
  isString
30
- } from "./chunk-bk3dpjxq.js";
30
+ } from "./chunk-d1sqb8rt.js";
31
31
  import {
32
32
  FileSystem,
33
33
  Path,
34
34
  optionalEnv
35
- } from "./chunk-vjcn82g3.js";
35
+ } from "./chunk-s5p94z8x.js";
36
36
  import {
37
37
  AgentHarnessIds,
38
38
  sha2562,
39
39
  runCommand2
40
- } from "./chunk-2kr43ps6.js";
40
+ } from "./chunk-3bjekzn7.js";
41
41
  import {
42
42
  NpmRegistry
43
- } from "./chunk-mcpesyz2.js";
43
+ } from "./chunk-bqg9gy2e.js";
44
44
 
45
45
  // packages/agent-runtime/src/config-convergence.ts
46
46
  var writeAgentEnvironmentConfigFile2 = fnUntraced(function* (file, content, keep = {}) {
@@ -124,7 +124,7 @@ function manifestSkillPaths(manifest) {
124
124
  return isString(item.skillPath) ? [item.skillPath] : [];
125
125
  }));
126
126
  }
127
- var readManifestSkillPaths2 = (manifestPath) => map8(readExistingText(manifestPath), (text) => manifestSkillPaths(parseJsonObject(text)));
127
+ var readManifestSkillPaths2 = (manifestPath) => map7(readExistingText(manifestPath), (text) => manifestSkillPaths(parseJsonObject(text)));
128
128
  var managedManifestPathForConfig = (paths, file) => gen(function* () {
129
129
  const fs = yield* FileSystem;
130
130
  const manifestRoot = managedManifestRootPath(paths, file);
@@ -944,7 +944,7 @@ var resolveGitSource = (subject, source, input) => gen(function* () {
944
944
  const resolver = yield* SourceResolver;
945
945
  const latest = input.versions === "latest";
946
946
  const ref = latest ? undefined : source.ref;
947
- const resolved = (isCommitHash(ref) ? succeed6(ref) : resolver.gitCommit(source.url, ref)).pipe(map8((commit) => ({ commit })), catch_((error) => succeed6({
947
+ const resolved = (isCommitHash(ref) ? succeed6(ref) : resolver.gitCommit(source.url, ref)).pipe(map7((commit) => ({ commit })), catch_((error) => succeed6({
948
948
  problem: `Kitman could not resolve ${subject} from ${source.url}${ref === undefined ? "" : ` at ${ref}`}: ${error.message}`
949
949
  })));
950
950
  if (input.requireReviewedSources !== true)
@@ -4,13 +4,13 @@ import {
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2,
6
6
  makeProgramRpcClient2
7
- } from "./chunk-qacvrg7j.js";
8
- import"./chunk-8tq7n7wc.js";
9
- import"./chunk-2kr43ps6.js";
10
- import"./chunk-et6qa95h.js";
11
- import"./chunk-bk3dpjxq.js";
12
- import"./chunk-vjcn82g3.js";
13
- import"./chunk-ampzxrqe.js";
7
+ } from "./chunk-95mkdtzk.js";
8
+ import"./chunk-c6h3fhtb.js";
9
+ import"./chunk-3bjekzn7.js";
10
+ import"./chunk-qrxkpwzy.js";
11
+ import"./chunk-d1sqb8rt.js";
12
+ import"./chunk-s5p94z8x.js";
13
+ import"./chunk-07p2dcq3.js";
14
14
  export {
15
15
  makeProgramRpcClient2 as makeProgramRpcClient,
16
16
  makeRunnerRpcClient2 as makeRunnerRpcClient,
@@ -13,6 +13,7 @@ import {
13
13
  isSuccess2,
14
14
  addFinalizerExit,
15
15
  effectDiscard,
16
+ currentTimeMillis,
16
17
  forEach,
17
18
  promise,
18
19
  tryPromise,
@@ -24,7 +25,7 @@ import {
24
25
  flatMap3,
25
26
  andThen2,
26
27
  tap2,
27
- map8,
28
+ map7,
28
29
  orDie,
29
30
  context,
30
31
  contextWith,
@@ -75,12 +76,11 @@ import {
75
76
  toEquivalence,
76
77
  toCodecJson,
77
78
  Json
78
- } from "./chunk-ampzxrqe.js";
79
+ } from "./chunk-07p2dcq3.js";
79
80
  import {
80
81
  guard
81
- } from "./chunk-et6qa95h.js";
82
+ } from "./chunk-qrxkpwzy.js";
82
83
  import {
83
- currentTimeMillis,
84
84
  WebCrypto,
85
85
  SafeJson,
86
86
  AgentSandboxNetwork,
@@ -105,11 +105,11 @@ import {
105
105
  KitDigest,
106
106
  KitSetup,
107
107
  RunnerRpcError
108
- } from "./chunk-2kr43ps6.js";
108
+ } from "./chunk-3bjekzn7.js";
109
109
  import {
110
110
  runForEach,
111
111
  FileSystem
112
- } from "./chunk-vjcn82g3.js";
112
+ } from "./chunk-s5p94z8x.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");
@@ -347,7 +347,7 @@ class ManifestInvalid extends TaggedError2()("ManifestInvalid", {
347
347
  var JsonObjectSchema = Record(String4, Json);
348
348
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workflow/internal/crypto.js
349
349
  var encoder = /* @__PURE__ */ new TextEncoder;
350
- var makeHashDigest = (original) => WebCrypto.use((crypto) => map8(webCryptoDigest(crypto, sha256, encoder.encode(original)), (bytes) => encode(bytes).slice(0, 32)));
350
+ var makeHashDigest = (original) => WebCrypto.use((crypto) => map7(webCryptoDigest(crypto, sha256, encoder.encode(original)), (bytes) => encode(bytes).slice(0, 32)));
351
351
 
352
352
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/workflow/Workflow.js
353
353
  var TypeId = "~effect/workflow/Workflow";
@@ -758,6 +758,7 @@ var PipelineStatus = Struct({
758
758
  runnerChecks: optionalKey(ArraySchema(String4)),
759
759
  approved: optionalKey(String4),
760
760
  repository: optionalKey(String4),
761
+ sourceBranch: optionalKey(String4),
761
762
  targetBranch: optionalKey(String4),
762
763
  conflicts: optionalKey(Boolean2),
763
764
  needsRebase: optionalKey(Boolean2),
@@ -1100,7 +1101,7 @@ var programLease = (work) => ({
1100
1101
  });
1101
1102
  var rpcRunFiles = (rpc, lease) => ({
1102
1103
  createRunFile: (file) => rpc.createRunFile({ lease, ...file }),
1103
- runFileParts: (request) => map8(rpc.runFileParts({ lease, ...request, partNumbers: [...request.partNumbers] }), ({ parts }) => parts),
1104
+ runFileParts: (request) => map7(rpc.runFileParts({ lease, ...request, partNumbers: [...request.partNumbers] }), ({ parts }) => parts),
1104
1105
  completeRunFile: ({ parts, ...request }) => rpc.completeRunFile({ lease, ...request, ...parts === undefined ? undefined : { parts: [...parts] } })
1105
1106
  });
1106
1107
 
@@ -3,7 +3,7 @@ import {
3
3
  Random,
4
4
  succeed6,
5
5
  withFiber2
6
- } from "./chunk-ampzxrqe.js";
6
+ } from "./chunk-07p2dcq3.js";
7
7
 
8
8
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/Random.js
9
9
  var Random2 = Random;
@@ -6,10 +6,7 @@ import {
6
6
  gen,
7
7
  flatMap3,
8
8
  provideContext2
9
- } from "./chunk-ampzxrqe.js";
10
- import {
11
- runForEach
12
- } from "./chunk-vjcn82g3.js";
9
+ } from "./chunk-07p2dcq3.js";
13
10
  import {
14
11
  WebSocketConstructor,
15
12
  layerWebSocketConstructorGlobal,
@@ -19,13 +16,16 @@ import {
19
16
  RunnerReplicaRpcs,
20
17
  RunnerRunFileRpcs,
21
18
  ProgramRpcs
22
- } from "./chunk-2kr43ps6.js";
19
+ } from "./chunk-3bjekzn7.js";
20
+ import {
21
+ runForEach
22
+ } from "./chunk-s5p94z8x.js";
23
23
  import {
24
24
  layerJson,
25
25
  make4,
26
26
  withHeaders,
27
27
  layerProtocolSocket
28
- } from "./chunk-8tq7n7wc.js";
28
+ } from "./chunk-c6h3fhtb.js";
29
29
 
30
30
  // packages/live/src/rpc/runner-client.ts
31
31
  var proxiedWebSocket = (proxy) => succeed5(WebSocketConstructor)((target) => {
@@ -15,12 +15,12 @@ import {
15
15
  isSuccess,
16
16
  TaggedError,
17
17
  void_2,
18
- makeUnsafe5,
18
+ makeUnsafe4,
19
19
  _await,
20
20
  fail5,
21
21
  succeed4,
22
22
  doneUnsafe,
23
- makeUnsafe6,
23
+ makeUnsafe5,
24
24
  provide,
25
25
  close,
26
26
  buildWithScope,
@@ -28,6 +28,7 @@ import {
28
28
  provide2,
29
29
  provideMerge,
30
30
  squash,
31
+ currentTimeMillis,
31
32
  all3,
32
33
  forEach,
33
34
  promise,
@@ -46,7 +47,7 @@ import {
46
47
  tap2,
47
48
  result,
48
49
  option2,
49
- map8,
50
+ map7,
50
51
  as,
51
52
  asVoid,
52
53
  catch_,
@@ -75,6 +76,8 @@ import {
75
76
  runSync,
76
77
  fnUntraced,
77
78
  fn,
79
+ makeUnsafe6,
80
+ formatIso,
78
81
  optionalKey,
79
82
  optional,
80
83
  Literal,
@@ -102,12 +105,9 @@ import {
102
105
  decodeJsonStringOption,
103
106
  encodeJsonStringSync,
104
107
  encodePrettyJsonString
105
- } from "./chunk-ampzxrqe.js";
108
+ } from "./chunk-07p2dcq3.js";
106
109
  import {
107
- currentTimeMillis,
108
110
  SecureRandom,
109
- makeUnsafe,
110
- formatIso,
111
111
  error,
112
112
  parseDate,
113
113
  currentDate,
@@ -154,13 +154,13 @@ import {
154
154
  runMcpEffect,
155
155
  createAgentAuthSignedFetch,
156
156
  setupMcpAgentCredential
157
- } from "./chunk-2kr43ps6.js";
157
+ } from "./chunk-3bjekzn7.js";
158
158
  import {
159
159
  guard,
160
160
  Id,
161
161
  Timestamp,
162
162
  ActorType
163
- } from "./chunk-et6qa95h.js";
163
+ } from "./chunk-qrxkpwzy.js";
164
164
  import {
165
165
  toJsonValue,
166
166
  isOneOf,
@@ -173,7 +173,7 @@ import {
173
173
  isJsonObject,
174
174
  isString,
175
175
  kindOf
176
- } from "./chunk-bk3dpjxq.js";
176
+ } from "./chunk-d1sqb8rt.js";
177
177
  import {
178
178
  join,
179
179
  interrupt,
@@ -187,17 +187,17 @@ import {
187
187
  withDefault,
188
188
  option,
189
189
  String2
190
- } from "./chunk-vjcn82g3.js";
190
+ } from "./chunk-s5p94z8x.js";
191
191
  import {
192
192
  nextInt
193
- } from "./chunk-a244myqw.js";
193
+ } from "./chunk-7ya2q09c.js";
194
194
  import {
195
195
  layerJson,
196
196
  make4,
197
197
  withHeaders,
198
198
  layerProtocolSocket,
199
199
  ConnectionHooks
200
- } from "./chunk-8tq7n7wc.js";
200
+ } from "./chunk-c6h3fhtb.js";
201
201
 
202
202
  // apps/cli/src/mcp.ts
203
203
  import { tmpdir } from "os";
@@ -2036,7 +2036,7 @@ function connectKitmanLiveRoot(protocol) {
2036
2036
  const authenticate = async (input) => {
2037
2037
  close2();
2038
2038
  const brokenListeners = new Set;
2039
- const scope = makeUnsafe6();
2039
+ const scope = makeUnsafe5();
2040
2040
  let connected = false;
2041
2041
  const hooks = succeed5(ConnectionHooks)({
2042
2042
  onConnect: sync2(() => {
@@ -2078,7 +2078,7 @@ function call(connection, effect) {
2078
2078
  }
2079
2079
  function openStream(connection, stream, isOpened, deliver) {
2080
2080
  return new Promise((resolve, reject) => {
2081
- const opened = makeUnsafe5();
2081
+ const opened = makeUnsafe4();
2082
2082
  const fiber = runFork(withHeaders2(connection, runForEach(stream, (message) => isOpened(message) ? succeed4(opened, message) : promise(() => deliver(message)))).pipe(mapError2(toError), tapError2((error) => fail5(opened, error)), ensuring2(fail5(opened, toError({ message: "Live subscription ended before it opened" }))), provide(connection.scope)));
2083
2083
  runPromise(_await(opened)).then((message) => resolve({
2084
2084
  opened: message,
@@ -4426,7 +4426,7 @@ process.stdin.on('data', chunk => {
4426
4426
  var bootGuest = gen(function* () {
4427
4427
  const assets = yield* codeModeAssets;
4428
4428
  const nonce = yield* (yield* SecureRandom).uuidV4();
4429
- const result = makeUnsafe5();
4429
+ const result = makeUnsafe4();
4430
4430
  let call = () => Promise.reject(new Error("Code Mode guest has no execution"));
4431
4431
  const sidecar = assets.sidecar === undefined ? undefined : Sidecar.spawn({ command: assets.sidecar });
4432
4432
  const disposeSidecar = sidecar === undefined ? void_3 : ignore(tryPromise(() => sidecar.dispose()));
@@ -4506,12 +4506,12 @@ var takeGuest = suspend3(() => {
4506
4506
  expireWhenIdle(booting);
4507
4507
  return join(taken);
4508
4508
  });
4509
- var outcomeOf = (warm) => raceFirst(map8(_await(warm.result), (text) => ({ text })), tryPromise({
4509
+ var outcomeOf = (warm) => raceFirst(map7(_await(warm.result), (text) => ({ text })), tryPromise({
4510
4510
  try: () => warm.guest.wait(),
4511
4511
  catch: (error) => new CodeModeExecutionError({
4512
4512
  message: `Code Mode secure-exec failed: ${error instanceof Error ? error.message : "unknown error"}`
4513
4513
  })
4514
- }).pipe(flatMap3((exitCode) => exitCode === 0 ? _await(warm.result).pipe(timeoutOrElse({ duration: millis(100), orElse: () => succeed6("{}") }), map8((text) => ({ text }))) : succeed6({ exitCode }))));
4514
+ }).pipe(flatMap3((exitCode) => exitCode === 0 ? _await(warm.result).pipe(timeoutOrElse({ duration: millis(100), orElse: () => succeed6("{}") }), map7((text) => ({ text }))) : succeed6({ exitCode }))));
4515
4515
  var executeCodeMode = fnUntraced(function* (input, options) {
4516
4516
  const startedAt = yield* currentTimeMillis;
4517
4517
  const codeHash = digestSha256(input.code, "hex");
@@ -4529,7 +4529,7 @@ var executeCodeMode = fnUntraced(function* (input, options) {
4529
4529
  return yield* new CodeModeExecutionError({
4530
4530
  message: `Code Mode secure-exec failed with exit code ${outcome.exitCode}`
4531
4531
  });
4532
- const returned = yield* decodeJsonString(outcome.text).pipe(map8((json) => isJsonObject(json) ? json : {}), mapError2(() => new CodeModeExecutionError({ message: "Code Mode secure-exec returned an unreadable result" })));
4532
+ const returned = yield* decodeJsonString(outcome.text).pipe(map7((json) => isJsonObject(json) ? json : {}), mapError2(() => new CodeModeExecutionError({ message: "Code Mode secure-exec returned an unreadable result" })));
4533
4533
  if (isString(returned.thrown))
4534
4534
  return yield* new CodeModeExecutionError({ message: `Code Mode code threw ${returned.thrown}` });
4535
4535
  const finishedAt = yield* currentTimeMillis;
@@ -5023,7 +5023,7 @@ function createCodeModeHost(options) {
5023
5023
  const dispatchPrepared = fnUntraced(function* (operationName, preparedArgs, descriptor) {
5024
5024
  const startedAt = yield* currentTimeMillis;
5025
5025
  const backend = options.dispatchOperation ?? options.executeCapability ?? (() => fail7(new McpToolInputError({ message: "Kitman Code Mode dispatch is not configured." })));
5026
- return yield* backend(operationName, preparedArgs).pipe(tap2((output) => validateOperationOutput(descriptor, output)), tap2((output) => currentTimeMillis.pipe(map8((now) => calls.push({ operationName, status: "ok", durationMs: now - startedAt, resourceIds: resourceIds(output) })))), tapError2(() => currentTimeMillis.pipe(map8((now) => calls.push({ operationName, status: "error", durationMs: now - startedAt })))));
5026
+ return yield* backend(operationName, preparedArgs).pipe(tap2((output) => validateOperationOutput(descriptor, output)), tap2((output) => currentTimeMillis.pipe(map7((now) => calls.push({ operationName, status: "ok", durationMs: now - startedAt, resourceIds: resourceIds(output) })))), tapError2(() => currentTimeMillis.pipe(map7((now) => calls.push({ operationName, status: "error", durationMs: now - startedAt })))));
5027
5027
  });
5028
5028
  const dispatch = fnUntraced(function* (operationName, args) {
5029
5029
  const { descriptor, preparedArgs } = yield* prepareArgs(operationName, args);
@@ -5462,7 +5462,7 @@ function createCodeModeExecutionStore(options = {}) {
5462
5462
  ...input.content === undefined ? undefined : { content: input.content }
5463
5463
  });
5464
5464
  });
5465
- const listForActor = (actorDigest) => sweep.pipe(map8(() => [...entries.values()].flatMap((entry) => entry.approvalActorDigest === actorDigest && entry.status === "paused" ? [inspection(entry)] : [])));
5465
+ const listForActor = (actorDigest) => sweep.pipe(map7(() => [...entries.values()].flatMap((entry) => entry.approvalActorDigest === actorDigest && entry.status === "paused" ? [inspection(entry)] : [])));
5466
5466
  const markUnknown = (input) => {
5467
5467
  const entry = entries.get(input.executionId);
5468
5468
  if (entry === undefined || entry.ownerDigest !== ownerDigest(input.owner))
@@ -5472,7 +5472,7 @@ function createCodeModeExecutionStore(options = {}) {
5472
5472
  markUnknownEntry(entry, input.reason);
5473
5473
  return true;
5474
5474
  };
5475
- const inspect = (executionId) => sweep.pipe(map8(() => {
5475
+ const inspect = (executionId) => sweep.pipe(map7(() => {
5476
5476
  const entry = entries.get(executionId);
5477
5477
  return entry === undefined ? undefined : inspection(entry);
5478
5478
  }));
@@ -5495,7 +5495,7 @@ function createCodeModeExecutionStore(options = {}) {
5495
5495
  entry.onDecision = undefined;
5496
5496
  }
5497
5497
  function settle(entry, result) {
5498
- return currentTimeMillis.pipe(map8((now) => {
5498
+ return currentTimeMillis.pipe(map7((now) => {
5499
5499
  entry.status = "settled";
5500
5500
  entry.settledResult = result;
5501
5501
  entry.settledUntilMs = now + settledReplayTtlMs;
@@ -5505,7 +5505,7 @@ function createCodeModeExecutionStore(options = {}) {
5505
5505
  }));
5506
5506
  }
5507
5507
  function settledResume(entry, input) {
5508
- return currentTimeMillis.pipe(map8((now) => {
5508
+ return currentTimeMillis.pipe(map7((now) => {
5509
5509
  if (entry.settledResult === undefined || entry.settledUntilMs === undefined || now >= entry.settledUntilMs) {
5510
5510
  entry.status = "expired";
5511
5511
  entry.settledResult = undefined;
@@ -5520,7 +5520,7 @@ function createCodeModeExecutionStore(options = {}) {
5520
5520
  }
5521
5521
  }
5522
5522
  function isoString(epochMillis) {
5523
- return formatIso(makeUnsafe(epochMillis));
5523
+ return formatIso(makeUnsafe6(epochMillis));
5524
5524
  }
5525
5525
  function pauseValue(entry, ttlMs) {
5526
5526
  return {
@@ -5879,7 +5879,7 @@ function registerCodeModeTools(server, options = {}) {
5879
5879
  const resolveDecision = (id) => options.resolveExecutionDecision?.({ executionId: id, owner }) ?? undefined_;
5880
5880
  if (executionId === undefined) {
5881
5881
  const paused = yield* executionStore.listForActor(owner.approvalActorDigest ?? owner.actorDigest);
5882
- const decided = yield* forEach(paused, (execution) => resolveDecision(execution.executionId).pipe(map8((decision) => ({ execution, action: decision }))), { concurrency: "unbounded" });
5882
+ const decided = yield* forEach(paused, (execution) => resolveDecision(execution.executionId).pipe(map7((decision) => ({ execution, action: decision }))), { concurrency: "unbounded" });
5883
5883
  const resumable = decided.filter((candidate) => candidate.action !== undefined);
5884
5884
  if (resumable.length === 1) {
5885
5885
  executionId = resumable[0]?.execution.executionId;
@@ -7232,7 +7232,7 @@ function registerStepTools(server, adapt, input) {
7232
7232
  description: "Read the brief for the Step you are working on: its instructions, Context Pack and Output schema. A long brief comes in pages; each names the offset of the next.",
7233
7233
  inputSchema: adapt(StepBriefArguments),
7234
7234
  annotations: { readOnlyHint: true, idempotentHint: true }
7235
- }, (args) => run(map8(request("/brief"), (brief) => text(briefPage(brief.prompt, isNumber(args.offset) ? args.offset : 0)))));
7235
+ }, (args) => run(map7(request("/brief"), (brief) => text(briefPage(brief.prompt, isNumber(args.offset) ? args.offset : 0)))));
7236
7236
  const closed = (question) => gen(function* () {
7237
7237
  let current = question;
7238
7238
  const interval = fromInputUnsafe(input.answerPollInterval ?? "2 seconds");
@@ -7267,7 +7267,7 @@ function registerStepTools(server, adapt, input) {
7267
7267
  structuredContent: result
7268
7268
  });
7269
7269
  case "parked":
7270
- return map8(closed(result.question), (question) => ({
7270
+ return map7(closed(result.question), (question) => ({
7271
7271
  ...failure(question.answer === undefined ? `Output refused again: ${result.message}. The Question it put to a person was closed without an answer (${question.status}). Stop working.` : `Output refused again: ${result.message}. Your Step waited for a person, who answered: \u201C${question.answer.value}\u201D Correct the Output as they say and submit it again; you have one more submission and one repair.`),
7272
7272
  structuredContent: { ...result, question }
7273
7273
  }));
@@ -7280,11 +7280,11 @@ function registerStepTools(server, adapt, input) {
7280
7280
  inputSchema: adapt(SessionUpdateArguments),
7281
7281
  outputSchema: adapt(AnyResult),
7282
7282
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false }
7283
- }, (args) => run(map8(request("/session-updates", {
7283
+ }, (args) => run(map7(request("/session-updates", {
7284
7284
  kind: isString(args.kind) ? args.kind : "progress",
7285
7285
  content: isString(args.content) ? args.content : ""
7286
7286
  }), (result) => ({ content: [{ type: "text", text: "SessionUpdate recorded." }], structuredContent: result }))));
7287
- const answerOf = (question) => map8(closed(question), (current) => current.answer === undefined ? failure(`The Question was closed without an answer (${current.status}). Stop and submit what you have.`) : {
7287
+ const answerOf = (question) => map7(closed(question), (current) => current.answer === undefined ? failure(`The Question was closed without an answer (${current.status}). Stop and submit what you have.`) : {
7288
7288
  content: [
7289
7289
  { type: "text", text: encodeJsonStringSync({ answer: current.answer.value, questionId: current.id }) }
7290
7290
  ],
@@ -7309,13 +7309,13 @@ function registerStepTools(server, adapt, input) {
7309
7309
  const fitting = input.fittingSkills ?? [];
7310
7310
  const rank = (name) => fitting.includes(name) ? fitting.indexOf(name) : fitting.length;
7311
7311
  const names = (yield* fs.readDirectory(skillsDir).pipe(orElseSucceed(() => []))).toSorted((a, b) => rank(a) - rank(b) || a.localeCompare(b));
7312
- return yield* forEach(names, (name) => fs.readFileString(`${skillsDir}/${name}/SKILL.md`).pipe(map8((skill) => [{ name, skill }]), orElseSucceed(() => []))).pipe(map8((found) => found.flat()));
7312
+ return yield* forEach(names, (name) => fs.readFileString(`${skillsDir}/${name}/SKILL.md`).pipe(map7((skill) => [{ name, skill }]), orElseSucceed(() => []))).pipe(map7((found) => found.flat()));
7313
7313
  });
7314
7314
  server.registerTool("skills", {
7315
7315
  description: "List the Run's skills you can load with no name, or load one by name; a second load answers that it is already in your context unless you pass reload: true after compaction.",
7316
7316
  inputSchema: adapt(SkillsArguments),
7317
7317
  annotations: { readOnlyHint: true, idempotentHint: false }
7318
- }, (args) => runMcpEffect(map8(loadable, (skills) => {
7318
+ }, (args) => runMcpEffect(map7(loadable, (skills) => {
7319
7319
  const name = isString(args.name) ? args.name : undefined;
7320
7320
  if (name === undefined)
7321
7321
  return skills.length === 0 ? text("This Step has no skills to load.") : text(skills.map((found) => `- ${found.name}: ${skillDescription(found.skill)}`).join(`
@@ -12,7 +12,7 @@ import {
12
12
  gen,
13
13
  fail7,
14
14
  flatMap3,
15
- map8,
15
+ map7,
16
16
  mapError2,
17
17
  orDie,
18
18
  provide3,
@@ -24,11 +24,11 @@ import {
24
24
  Record,
25
25
  Int,
26
26
  fromJsonString
27
- } from "./chunk-ampzxrqe.js";
27
+ } from "./chunk-07p2dcq3.js";
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-vjcn82g3.js";
31
+ } from "./chunk-s5p94z8x.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-2kr43ps6.js";
41
+ } from "./chunk-3bjekzn7.js";
42
42
 
43
43
  // packages/core/src/npm-registry.ts
44
44
  var KitManifest = Struct({
@@ -72,7 +72,7 @@ var PackageJson = Struct({ kitman: optionalKey(Unknown) });
72
72
  var decodePackageJson = decodeUnknownOption(fromJsonString(PackageJson));
73
73
  var decodeManifest = decodeUnknownOption(KitManifest);
74
74
  var decodeJson = decodeUnknownOption(fromJsonString(Unknown));
75
- var gunzip = (bytes) => tryPromise(() => new Response(new Blob([new Uint8Array(bytes)]).stream().pipeThrough(new DecompressionStream("gzip"))).arrayBuffer()).pipe(map8((buffer) => new Uint8Array(buffer)));
75
+ var gunzip = (bytes) => tryPromise(() => new Response(new Blob([new Uint8Array(bytes)]).stream().pipeThrough(new DecompressionStream("gzip"))).arrayBuffer()).pipe(map7((buffer) => new Uint8Array(buffer)));
76
76
  var text = (bytes) => new TextDecoder().decode(bytes).replace(/\0.*$/su, "");
77
77
  var untar = (tar) => {
78
78
  const files = new Map;
@@ -101,7 +101,7 @@ var untar = (tar) => {
101
101
  };
102
102
  var registryUrl = String2("NPM_CONFIG_REGISTRY").pipe(withDefault("https://registry.npmjs.org"));
103
103
  var npmRegistryAt = (url = registryUrl) => {
104
- const base = (isString2(url) ? succeed6(url) : orDie(url)).pipe(map8((value) => value.replace(/\/+$/u, "")));
104
+ const base = (isString2(url) ? succeed6(url) : orDie(url)).pipe(map7((value) => value.replace(/\/+$/u, "")));
105
105
  const unreachable = (name, version) => (error) => new NpmRegistryError({
106
106
  kind: "unreachable",
107
107
  message: `npm did not answer for ${name}@${version}: ${error.message}; try again`
@@ -123,7 +123,7 @@ var npmRegistryAt = (url = registryUrl) => {
123
123
  const dist = found.versions[version]?.dist;
124
124
  if (dist === undefined)
125
125
  return yield* new NpmRegistryError({ kind: "not_found", message: `npm has no ${name}@${wanted}` });
126
- const tarball = yield* get2(dist.tarball).pipe(flatMap3(filterStatusOk), flatMap3((response) => response.arrayBuffer), map8((buffer) => new Uint8Array(buffer)), mapError2(unreachable(name, version)), provide3(layer4));
126
+ const tarball = yield* get2(dist.tarball).pipe(flatMap3(filterStatusOk), flatMap3((response) => response.arrayBuffer), map7((buffer) => new Uint8Array(buffer)), mapError2(unreachable(name, version)), provide3(layer4));
127
127
  if (!tarballMatches(tarball, dist))
128
128
  return yield* new NpmRegistryError({
129
129
  kind: "integrity",
@@ -12,7 +12,7 @@ import {
12
12
  add,
13
13
  getOrUndefinedUnsafe,
14
14
  getUnsafe,
15
- get4,
15
+ get3,
16
16
  Reference,
17
17
  toMillis,
18
18
  isSuccess,
@@ -22,7 +22,7 @@ import {
22
22
  interrupt2,
23
23
  void_2,
24
24
  isFailure2,
25
- makeUnsafe5,
25
+ makeUnsafe4,
26
26
  _await,
27
27
  isDoneUnsafe,
28
28
  succeed4,
@@ -36,6 +36,7 @@ import {
36
36
  findError,
37
37
  hasInterrupts2,
38
38
  interruptors,
39
+ Clock,
39
40
  min2,
40
41
  exponential,
41
42
  spaced,
@@ -51,7 +52,7 @@ import {
51
52
  withFiber2,
52
53
  flatMap3,
53
54
  andThen2,
54
- map8,
55
+ map7,
55
56
  catchCause2,
56
57
  catchCauseIf,
57
58
  orDie,
@@ -96,21 +97,8 @@ import {
96
97
  Defect,
97
98
  Exit,
98
99
  toCodecJson
99
- } from "./chunk-ampzxrqe.js";
100
- import {
101
- interrupt,
102
- getCurrent,
103
- makeUnsafe2,
104
- bounded,
105
- offerAll,
106
- failCause,
107
- end,
108
- shutdownUnsafe,
109
- fromQueue,
110
- unwrap
111
- } from "./chunk-vjcn82g3.js";
100
+ } from "./chunk-07p2dcq3.js";
112
101
  import {
113
- Clock,
114
102
  empty,
115
103
  fromInput,
116
104
  merge,
@@ -123,7 +111,19 @@ import {
123
111
  ParseOptions,
124
112
  RpcClientDefect,
125
113
  RpcClientError
126
- } from "./chunk-2kr43ps6.js";
114
+ } from "./chunk-3bjekzn7.js";
115
+ import {
116
+ interrupt,
117
+ getCurrent,
118
+ makeUnsafe,
119
+ bounded,
120
+ offerAll,
121
+ failCause,
122
+ end,
123
+ shutdownUnsafe,
124
+ fromQueue,
125
+ unwrap
126
+ } from "./chunk-s5p94z8x.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")) {
@@ -200,7 +200,7 @@ var withRunClient = (f) => suspend3(() => {
200
200
  buffer.push([data, context]);
201
201
  return void_3;
202
202
  });
203
- return map8(f((clientId, data) => {
203
+ return map7(f((clientId, data) => {
204
204
  const clientWrite = clientWrites.get(clientId);
205
205
  if (clientWrite) {
206
206
  return clientWrite(data);
@@ -237,7 +237,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
237
237
  const disableTracing = options?.disableTracing ?? false;
238
238
  const generateRequestId = options?.generateRequestId ?? (() => requestIdCounter++);
239
239
  const services = yield* context();
240
- const scope = get4(services, Scope);
240
+ const scope = get3(services, Scope);
241
241
  const entries = new Map;
242
242
  let isShutdown = false;
243
243
  yield* addFinalizer(scope, withFiber2((parent) => {
@@ -271,7 +271,7 @@ var makeNoSerialization = /* @__PURE__ */ fnUntraced(function* (group, options)
271
271
  const queue = onStreamRequest(rpc, middleware, rpc.payloadSchema.make(payload), headers, opts?.streamBufferSize ?? 16, context);
272
272
  if (opts?.asQueue)
273
273
  return queue;
274
- return unwrap(map8(queue, fromQueue));
274
+ return unwrap(map7(queue, fromQueue));
275
275
  };
276
276
  };
277
277
  const onEffectRequest = (rpc, middleware, span, payload, headers, context, discard) => withFiber2((parentFiber) => {
@@ -495,7 +495,7 @@ var make4 = /* @__PURE__ */ fnUntraced(function* (group, options) {
495
495
  const rpcSchemas = makeRpcSchemas(codecFor);
496
496
  const decodeDefect = decodeSync(codecFor(Defect()));
497
497
  const entries = new Map;
498
- const closing = makeUnsafe5();
498
+ const closing = makeUnsafe4();
499
499
  const interruptRequest = (requestId) => {
500
500
  if (!entries.has(requestId))
501
501
  return void_3;
@@ -643,7 +643,7 @@ var makeRpcSchemas = (codecFor) => {
643
643
  return entry;
644
644
  }
645
645
  const streamSchemas = getStreamSchemas(rpc.successSchema);
646
- const parseOptions = get4(rpc.annotations, ParseOptions);
646
+ const parseOptions = get3(rpc.annotations, ParseOptions);
647
647
  const exitSchema2 = exitSchema(rpc);
648
648
  let decodeDiscardExit;
649
649
  entry = {
@@ -804,7 +804,7 @@ var makePinger = /* @__PURE__ */ fnUntraced(function* (writePing, options) {
804
804
  const timeoutMillis = toMillis(options?.pingTimeout ?? interval);
805
805
  let lastSeen = clock.currentTimeMillisUnsafe();
806
806
  let awaitingResponse = false;
807
- const latch = makeUnsafe2();
807
+ const latch = makeUnsafe();
808
808
  const onFrame = () => {
809
809
  lastSeen = clock.currentTimeMillisUnsafe();
810
810
  awaitingResponse = false;
@@ -13,11 +13,11 @@ import {
13
13
  ArraySchema,
14
14
  decodeJsonStringOption,
15
15
  encodeUnknownJsonStringSync
16
- } from "./chunk-ampzxrqe.js";
16
+ } from "./chunk-07p2dcq3.js";
17
17
  import {
18
18
  replaceSecretReferences,
19
19
  secretReferencesIn
20
- } from "./chunk-et6qa95h.js";
20
+ } from "./chunk-qrxkpwzy.js";
21
21
 
22
22
  // packages/agent-runtime/src/srt-step.ts
23
23
  import { SandboxRuntimeConfigSchema } from "@anthropic-ai/sandbox-runtime";
@@ -8,7 +8,7 @@ import {
8
8
  isFunction2,
9
9
  isUndefined2,
10
10
  isObjectOrArray
11
- } from "./chunk-ampzxrqe.js";
11
+ } from "./chunk-07p2dcq3.js";
12
12
 
13
13
  // packages/core/src/runtime-type.ts
14
14
  var UnsafeJsonObjectKeys = new Set(["__proto__", "constructor", "prototype"]);