@kitman-sh/cli 0.10.97 → 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-dstm8aen.js → chunk-07p2dcq3.js} +308 -111
  2. package/dist/{chunk-y8dzp1t8.js → chunk-3bjekzn7.js} +376 -459
  3. package/dist/{chunk-gfe4kk5k.js → chunk-6dc0x5cg.js} +8 -8
  4. package/dist/{chunk-q4q69zgm.js → chunk-797w5qe6.js} +7 -7
  5. package/dist/{chunk-nwqcmdtz.js → chunk-7c3pgktm.js} +9 -8
  6. package/dist/{chunk-c3k32vw4.js → chunk-7ya2q09c.js} +1 -1
  7. package/dist/{chunk-t8ny8exc.js → chunk-95mkdtzk.js} +9 -9
  8. package/dist/{chunk-k6ndhjcd.js → chunk-aba9zdpb.js} +48 -48
  9. package/dist/{chunk-mkr1nwdy.js → chunk-bqg9gy2e.js} +7 -7
  10. package/dist/{chunk-mxqrv47k.js → chunk-c6h3fhtb.js} +26 -26
  11. package/dist/{chunk-hsf2sj69.js → chunk-cgjyv52e.js} +2 -2
  12. package/dist/{chunk-k4fvnphp.js → chunk-d1sqb8rt.js} +1 -1
  13. package/dist/{chunk-3tjssyvf.js → chunk-fd39ch4n.js} +8 -8
  14. package/dist/{chunk-mrzmq4jq.js → chunk-g1xmj2nb.js} +4 -4
  15. package/dist/{chunk-yzmyy4vs.js → chunk-gfqm22x7.js} +5 -5
  16. package/dist/{chunk-qr0n7rde.js → chunk-j8vq6sk1.js} +21 -21
  17. package/dist/{chunk-2ndnvcp3.js → chunk-n8c1wh6t.js} +6 -6
  18. package/dist/{chunk-rmsm8vnc.js → chunk-nym2zmz3.js} +4 -4
  19. package/dist/{chunk-w0sehmpd.js → chunk-p83y21hp.js} +62 -16
  20. package/dist/{chunk-mbqeakm1.js → chunk-qrxkpwzy.js} +1 -1
  21. package/dist/{chunk-25q7mg6g.js → chunk-s5p94z8x.js} +69 -218
  22. package/dist/{chunk-3snbxcct.js → chunk-s90hj0mb.js} +55 -55
  23. package/dist/{chunk-jtyxjjvs.js → chunk-sy8d7bfa.js} +97 -97
  24. package/dist/{chunk-9m9cv82t.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-dstm8aen.js";
26
+ } from "./chunk-07p2dcq3.js";
27
27
  import {
28
28
  isJsonObject,
29
29
  isString
30
- } from "./chunk-k4fvnphp.js";
30
+ } from "./chunk-d1sqb8rt.js";
31
31
  import {
32
32
  FileSystem,
33
33
  Path,
34
34
  optionalEnv
35
- } from "./chunk-25q7mg6g.js";
35
+ } from "./chunk-s5p94z8x.js";
36
36
  import {
37
37
  AgentHarnessIds,
38
38
  sha2562,
39
39
  runCommand2
40
- } from "./chunk-y8dzp1t8.js";
40
+ } from "./chunk-3bjekzn7.js";
41
41
  import {
42
42
  NpmRegistry
43
- } from "./chunk-mkr1nwdy.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-t8ny8exc.js";
8
- import"./chunk-mxqrv47k.js";
9
- import"./chunk-y8dzp1t8.js";
10
- import"./chunk-mbqeakm1.js";
11
- import"./chunk-k4fvnphp.js";
12
- import"./chunk-25q7mg6g.js";
13
- import"./chunk-dstm8aen.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-dstm8aen.js";
79
+ } from "./chunk-07p2dcq3.js";
79
80
  import {
80
81
  guard
81
- } from "./chunk-mbqeakm1.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-y8dzp1t8.js";
108
+ } from "./chunk-3bjekzn7.js";
109
109
  import {
110
110
  runForEach,
111
111
  FileSystem
112
- } from "./chunk-25q7mg6g.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-dstm8aen.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-dstm8aen.js";
10
- import {
11
- runForEach
12
- } from "./chunk-25q7mg6g.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-y8dzp1t8.js";
19
+ } from "./chunk-3bjekzn7.js";
20
+ import {
21
+ runForEach
22
+ } from "./chunk-s5p94z8x.js";
23
23
  import {
24
24
  layerJson,
25
- make3,
25
+ make4,
26
26
  withHeaders,
27
27
  layerProtocolSocket
28
- } from "./chunk-mxqrv47k.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) => {
@@ -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)),
@@ -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-dstm8aen.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,
@@ -142,8 +142,8 @@ import {
142
142
  sessionForApi,
143
143
  readAuthStore,
144
144
  agentCredentialForApi,
145
- make5,
146
145
  make6,
146
+ make7,
147
147
  Service,
148
148
  shouldRefresh,
149
149
  refreshSession,
@@ -154,13 +154,13 @@ import {
154
154
  runMcpEffect,
155
155
  createAgentAuthSignedFetch,
156
156
  setupMcpAgentCredential
157
- } from "./chunk-y8dzp1t8.js";
157
+ } from "./chunk-3bjekzn7.js";
158
158
  import {
159
159
  guard,
160
160
  Id,
161
161
  Timestamp,
162
162
  ActorType
163
- } from "./chunk-mbqeakm1.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-k4fvnphp.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-25q7mg6g.js";
190
+ } from "./chunk-s5p94z8x.js";
191
191
  import {
192
192
  nextInt
193
- } from "./chunk-c3k32vw4.js";
193
+ } from "./chunk-7ya2q09c.js";
194
194
  import {
195
195
  layerJson,
196
- make3,
196
+ make4,
197
197
  withHeaders,
198
198
  layerProtocolSocket,
199
199
  ConnectionHooks
200
- } from "./chunk-mxqrv47k.js";
200
+ } from "./chunk-c6h3fhtb.js";
201
201
 
202
202
  // apps/cli/src/mcp.ts
203
203
  import { tmpdir } from "os";
@@ -1949,56 +1949,56 @@ var LivePresenceSubscriptionMessage = Union([
1949
1949
  LivePresenceSubscriptionUpdate
1950
1950
  ]);
1951
1951
 
1952
- class LiveRpcs extends make6(make5("Session", {
1952
+ class LiveRpcs extends make7(make6("Session", {
1953
1953
  success: Struct({ workspaceId: String4, clientKind: String4 }),
1954
1954
  error: LiveRpcError
1955
- }), make5("Subscribe", {
1955
+ }), make6("Subscribe", {
1956
1956
  payload: LiveSubscribeInput,
1957
1957
  success: LiveSubscriptionMessage,
1958
1958
  error: LiveRpcError,
1959
1959
  stream: true
1960
- }), make5("Replay", {
1960
+ }), make6("Replay", {
1961
1961
  payload: LiveReplayInput,
1962
1962
  success: ArraySchema(LiveEvent),
1963
1963
  error: LiveRpcError
1964
- }), make5("Ack", {
1964
+ }), make6("Ack", {
1965
1965
  payload: LiveAckInput,
1966
1966
  success: LiveAckResult,
1967
1967
  error: LiveRpcError
1968
- }), make5("SubscribeWeb", {
1968
+ }), make6("SubscribeWeb", {
1969
1969
  payload: LiveWebSubscribeInput,
1970
1970
  success: LiveWebSubscriptionMessage,
1971
1971
  error: LiveRpcError,
1972
1972
  stream: true
1973
- }), make5("SubscriptionStatus", {
1973
+ }), make6("SubscriptionStatus", {
1974
1974
  payload: { subscriptionId: String4 },
1975
1975
  success: LiveSubscriptionStatus,
1976
1976
  error: LiveRpcError
1977
- }), make5("ReplayWeb", {
1977
+ }), make6("ReplayWeb", {
1978
1978
  payload: LiveWebReplayInput,
1979
1979
  success: LiveWebReplayResult,
1980
1980
  error: LiveRpcError
1981
- }), make5("AckWeb", {
1981
+ }), make6("AckWeb", {
1982
1982
  payload: LiveWebAckInput,
1983
1983
  success: LiveWebAckResult,
1984
1984
  error: LiveRpcError
1985
- }), make5("PublishPresence", {
1985
+ }), make6("PublishPresence", {
1986
1986
  payload: LivePresencePublishInput,
1987
1987
  success: LivePresenceEntry,
1988
1988
  error: LiveRpcError
1989
- }), make5("SubscribePresence", {
1989
+ }), make6("SubscribePresence", {
1990
1990
  payload: LivePresenceSubscribeInput,
1991
1991
  success: LivePresenceSubscriptionMessage,
1992
1992
  error: LiveRpcError,
1993
1993
  stream: true
1994
- }), make5("ClearPresence", {
1994
+ }), make6("ClearPresence", {
1995
1995
  payload: { scope: optional(LiveScope) },
1996
1996
  error: LiveRpcError
1997
- }), make5("RecordSessionUpdate", {
1997
+ }), make6("RecordSessionUpdate", {
1998
1998
  payload: { sessionId: String4, input: SessionUpdateCreate },
1999
1999
  success: SessionUpdate,
2000
2000
  error: LiveRpcError
2001
- }), make5("EndSession", {
2001
+ }), make6("EndSession", {
2002
2002
  payload: { sessionId: String4, input: SessionEnd },
2003
2003
  success: Session,
2004
2004
  error: LiveRpcError
@@ -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(() => {
@@ -2050,7 +2050,7 @@ function connectKitmanLiveRoot(protocol) {
2050
2050
  })
2051
2051
  });
2052
2052
  const layer = (isString(protocol) ? liveWebSocketProtocol(protocol) : protocol()).pipe(provideMerge(hooks));
2053
- const client = await runPromise(buildWithScope(layer, scope).pipe(flatMap3((context) => make3(LiveRpcs).pipe(provideContext2(context))), provide(scope)));
2053
+ const client = await runPromise(buildWithScope(layer, scope).pipe(flatMap3((context) => make4(LiveRpcs).pipe(provideContext2(context))), provide(scope)));
2054
2054
  let abandon = () => {};
2055
2055
  const abandoned = new Promise((_resolve, reject) => {
2056
2056
  abandon = reject;
@@ -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-dstm8aen.js";
27
+ } from "./chunk-07p2dcq3.js";
28
28
  import {
29
29
  withDefault,
30
30
  String2
31
- } from "./chunk-25q7mg6g.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-y8dzp1t8.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",