@kitman-sh/cli 0.13.9 → 0.13.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/{chunk-ksgt1tdc.js → chunk-0nh3w4vn.js} +7 -7
  2. package/dist/{chunk-cw61zyh5.js → chunk-24h0y27w.js} +1 -1
  3. package/dist/{chunk-0wj65j5e.js → chunk-2dwqak36.js} +7 -7
  4. package/dist/{chunk-53qp6kcp.js → chunk-4crf5vhd.js} +2 -2
  5. package/dist/{chunk-wzr1n3zy.js → chunk-6n3m0t02.js} +25 -5
  6. package/dist/{chunk-hezxa6q5.js → chunk-6x4wkf0x.js} +7 -7
  7. package/dist/{chunk-s63fjc69.js → chunk-813vn8sn.js} +20 -20
  8. package/dist/{chunk-rz18qefg.js → chunk-bkecckjn.js} +7 -7
  9. package/dist/{chunk-6jtjcvnc.js → chunk-c60xk73g.js} +46 -46
  10. package/dist/{chunk-qkjfx2ts.js → chunk-d4pxty7x.js} +16 -16
  11. package/dist/{chunk-z5f7g1w1.js → chunk-ggmwpwhf.js} +2 -2
  12. package/dist/{chunk-1ht6jwzm.js → chunk-hkg8s472.js} +8 -8
  13. package/dist/{chunk-v190zzc5.js → chunk-j34gensq.js} +1 -1
  14. package/dist/{chunk-69fcvx7d.js → chunk-jkddgvev.js} +74 -54
  15. package/dist/{chunk-a44ebqzx.js → chunk-kj1zjrs9.js} +6 -6
  16. package/dist/{chunk-ezv4p0zr.js → chunk-kk32jckf.js} +4 -4
  17. package/dist/{chunk-fh58za51.js → chunk-mmd7mjv0.js} +3 -3
  18. package/dist/{chunk-tspf987k.js → chunk-mtdz4k32.js} +5 -5
  19. package/dist/{chunk-0tjg9eya.js → chunk-pxvd8w2v.js} +1 -1
  20. package/dist/{chunk-x8sewxzm.js → chunk-r5v7df8h.js} +106 -106
  21. package/dist/{chunk-9gg1w4aa.js → chunk-rz01craf.js} +434 -350
  22. package/dist/{chunk-pj3mer60.js → chunk-s00cj5sw.js} +4 -4
  23. package/dist/{chunk-aezq3fyy.js → chunk-t82w7459.js} +218 -69
  24. package/dist/{chunk-kq88aaa3.js → chunk-vxfajzpz.js} +16 -62
  25. package/dist/{chunk-qjqa338f.js → chunk-zgraq2y3.js} +111 -308
  26. package/dist/index.js +4 -4
  27. package/package.json +1 -1
@@ -17,12 +17,12 @@ import {
17
17
  isSuccess,
18
18
  TaggedError,
19
19
  void_2,
20
- makeUnsafe4,
20
+ makeUnsafe5,
21
21
  _await,
22
22
  fail5,
23
23
  succeed4,
24
24
  doneUnsafe,
25
- makeUnsafe5,
25
+ makeUnsafe6,
26
26
  provide,
27
27
  close,
28
28
  buildWithScope,
@@ -30,7 +30,6 @@ import {
30
30
  provide2,
31
31
  provideMerge,
32
32
  squash,
33
- currentTimeMillis,
34
33
  spaced,
35
34
  all3,
36
35
  forEach,
@@ -50,7 +49,7 @@ import {
50
49
  tap2,
51
50
  result,
52
51
  option2,
53
- map7,
52
+ map8,
54
53
  as,
55
54
  asVoid,
56
55
  catch_,
@@ -80,8 +79,6 @@ import {
80
79
  runSync,
81
80
  fnUntraced,
82
81
  fn,
83
- makeUnsafe6,
84
- formatIso,
85
82
  decodeUnknownEffect2,
86
83
  optionalKey,
87
84
  optional,
@@ -121,9 +118,12 @@ import {
121
118
  decodeJsonStringOption,
122
119
  encodeJsonStringSync,
123
120
  encodePrettyJsonString
124
- } from "./chunk-qjqa338f.js";
121
+ } from "./chunk-zgraq2y3.js";
125
122
  import {
123
+ currentTimeMillis,
126
124
  SecureRandom,
125
+ makeUnsafe,
126
+ formatIso,
127
127
  error,
128
128
  parseDate,
129
129
  currentDate,
@@ -158,8 +158,8 @@ import {
158
158
  sessionForApi,
159
159
  readAuthStore,
160
160
  agentCredentialForApi,
161
+ make5,
161
162
  make6,
162
- make7,
163
163
  Service,
164
164
  shouldRefresh,
165
165
  refreshSession,
@@ -170,7 +170,7 @@ import {
170
170
  runMcpEffect,
171
171
  createAgentAuthSignedFetch,
172
172
  setupMcpAgentCredential
173
- } from "./chunk-9gg1w4aa.js";
173
+ } from "./chunk-rz01craf.js";
174
174
  import {
175
175
  join,
176
176
  interrupt,
@@ -184,27 +184,27 @@ import {
184
184
  withDefault,
185
185
  option,
186
186
  String2
187
- } from "./chunk-aezq3fyy.js";
187
+ } from "./chunk-t82w7459.js";
188
188
  import {
189
189
  guard,
190
190
  Id,
191
191
  Timestamp,
192
192
  ActorType
193
- } from "./chunk-0tjg9eya.js";
193
+ } from "./chunk-pxvd8w2v.js";
194
194
  import {
195
195
  searchDocs2,
196
196
  readDoc2
197
- } from "./chunk-wzr1n3zy.js";
197
+ } from "./chunk-6n3m0t02.js";
198
198
  import {
199
199
  nextInt
200
- } from "./chunk-cw61zyh5.js";
200
+ } from "./chunk-24h0y27w.js";
201
201
  import {
202
202
  layerJson,
203
- make4,
203
+ make3,
204
204
  withHeaders,
205
205
  layerProtocolSocket,
206
206
  ConnectionHooks
207
- } from "./chunk-qkjfx2ts.js";
207
+ } from "./chunk-d4pxty7x.js";
208
208
 
209
209
  // apps/cli/src/mcp.ts
210
210
  import { tmpdir as tmpdir2 } from "os";
@@ -1956,56 +1956,56 @@ var LivePresenceSubscriptionMessage = Union([
1956
1956
  LivePresenceSubscriptionUpdate
1957
1957
  ]);
1958
1958
 
1959
- class LiveRpcs extends make7(make6("Session", {
1959
+ class LiveRpcs extends make6(make5("Session", {
1960
1960
  success: Struct({ workspaceId: String4, clientKind: String4 }),
1961
1961
  error: LiveRpcError
1962
- }), make6("Subscribe", {
1962
+ }), make5("Subscribe", {
1963
1963
  payload: LiveSubscribeInput,
1964
1964
  success: LiveSubscriptionMessage,
1965
1965
  error: LiveRpcError,
1966
1966
  stream: true
1967
- }), make6("Replay", {
1967
+ }), make5("Replay", {
1968
1968
  payload: LiveReplayInput,
1969
1969
  success: ArraySchema(LiveEvent),
1970
1970
  error: LiveRpcError
1971
- }), make6("Ack", {
1971
+ }), make5("Ack", {
1972
1972
  payload: LiveAckInput,
1973
1973
  success: LiveAckResult,
1974
1974
  error: LiveRpcError
1975
- }), make6("SubscribeWeb", {
1975
+ }), make5("SubscribeWeb", {
1976
1976
  payload: LiveWebSubscribeInput,
1977
1977
  success: LiveWebSubscriptionMessage,
1978
1978
  error: LiveRpcError,
1979
1979
  stream: true
1980
- }), make6("SubscriptionStatus", {
1980
+ }), make5("SubscriptionStatus", {
1981
1981
  payload: { subscriptionId: String4 },
1982
1982
  success: LiveSubscriptionStatus,
1983
1983
  error: LiveRpcError
1984
- }), make6("ReplayWeb", {
1984
+ }), make5("ReplayWeb", {
1985
1985
  payload: LiveWebReplayInput,
1986
1986
  success: LiveWebReplayResult,
1987
1987
  error: LiveRpcError
1988
- }), make6("AckWeb", {
1988
+ }), make5("AckWeb", {
1989
1989
  payload: LiveWebAckInput,
1990
1990
  success: LiveWebAckResult,
1991
1991
  error: LiveRpcError
1992
- }), make6("PublishPresence", {
1992
+ }), make5("PublishPresence", {
1993
1993
  payload: LivePresencePublishInput,
1994
1994
  success: LivePresenceEntry,
1995
1995
  error: LiveRpcError
1996
- }), make6("SubscribePresence", {
1996
+ }), make5("SubscribePresence", {
1997
1997
  payload: LivePresenceSubscribeInput,
1998
1998
  success: LivePresenceSubscriptionMessage,
1999
1999
  error: LiveRpcError,
2000
2000
  stream: true
2001
- }), make6("ClearPresence", {
2001
+ }), make5("ClearPresence", {
2002
2002
  payload: { scope: optional(LiveScope) },
2003
2003
  error: LiveRpcError
2004
- }), make6("RecordSessionUpdate", {
2004
+ }), make5("RecordSessionUpdate", {
2005
2005
  payload: { sessionId: String4, input: SessionUpdateCreate },
2006
2006
  success: SessionUpdate,
2007
2007
  error: LiveRpcError
2008
- }), make6("EndSession", {
2008
+ }), make5("EndSession", {
2009
2009
  payload: { sessionId: String4, input: SessionEnd },
2010
2010
  success: Session,
2011
2011
  error: LiveRpcError
@@ -2043,7 +2043,7 @@ function connectKitmanLiveRoot(protocol) {
2043
2043
  const authenticate = async (input) => {
2044
2044
  close2();
2045
2045
  const brokenListeners = new Set;
2046
- const scope = makeUnsafe5();
2046
+ const scope = makeUnsafe6();
2047
2047
  let connected = false;
2048
2048
  const hooks = succeed5(ConnectionHooks)({
2049
2049
  onConnect: sync2(() => {
@@ -2057,7 +2057,7 @@ function connectKitmanLiveRoot(protocol) {
2057
2057
  })
2058
2058
  });
2059
2059
  const layer = (isString2(protocol) ? liveWebSocketProtocol(protocol) : protocol()).pipe(provideMerge(hooks));
2060
- const client = await runPromise(buildWithScope(layer, scope).pipe(flatMap3((context) => make4(LiveRpcs).pipe(provideContext2(context))), provide(scope)));
2060
+ const client = await runPromise(buildWithScope(layer, scope).pipe(flatMap3((context) => make3(LiveRpcs).pipe(provideContext2(context))), provide(scope)));
2061
2061
  let abandon = () => {};
2062
2062
  const abandoned = new Promise((_resolve, reject) => {
2063
2063
  abandon = reject;
@@ -2085,7 +2085,7 @@ function call(connection, effect) {
2085
2085
  }
2086
2086
  function openStream(connection, stream, isOpened, deliver) {
2087
2087
  return new Promise((resolve, reject) => {
2088
- const opened = makeUnsafe4();
2088
+ const opened = makeUnsafe5();
2089
2089
  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)));
2090
2090
  runPromise(_await(opened)).then((message) => resolve({
2091
2091
  opened: message,
@@ -5365,7 +5365,7 @@ process.stdin.on('data', chunk => {
5365
5365
  var bootGuest = gen(function* () {
5366
5366
  const assets = yield* codeModeAssets;
5367
5367
  const nonce = yield* (yield* SecureRandom).uuidV4();
5368
- const result = makeUnsafe4();
5368
+ const result = makeUnsafe5();
5369
5369
  let call = () => Promise.reject(new Error("Code Mode guest has no execution"));
5370
5370
  yield* sweepStaleSidecarTemp;
5371
5371
  const fs = yield* FileSystem;
@@ -5456,12 +5456,12 @@ var takeGuest = suspend3(() => {
5456
5456
  expireWhenIdle(booting);
5457
5457
  return join(taken);
5458
5458
  });
5459
- var outcomeOf = (warm) => raceFirst(map7(_await(warm.result), (text) => ({ text })), tryPromise({
5459
+ var outcomeOf = (warm) => raceFirst(map8(_await(warm.result), (text) => ({ text })), tryPromise({
5460
5460
  try: () => warm.guest.wait(),
5461
5461
  catch: (error) => new CodeModeExecutionError({
5462
5462
  message: `Code Mode secure-exec failed: ${error instanceof Error ? error.message : "unknown error"}`
5463
5463
  })
5464
- }).pipe(flatMap3((exitCode) => exitCode === 0 ? _await(warm.result).pipe(timeoutOrElse({ duration: millis(100), orElse: () => succeed6("{}") }), map7((text) => ({ text }))) : succeed6({ exitCode }))));
5464
+ }).pipe(flatMap3((exitCode) => exitCode === 0 ? _await(warm.result).pipe(timeoutOrElse({ duration: millis(100), orElse: () => succeed6("{}") }), map8((text) => ({ text }))) : succeed6({ exitCode }))));
5465
5465
  var executeCodeMode = fnUntraced(function* (input, options) {
5466
5466
  const startedAt = yield* currentTimeMillis;
5467
5467
  const codeHash = digestSha256(input.code, "hex");
@@ -5479,7 +5479,7 @@ var executeCodeMode = fnUntraced(function* (input, options) {
5479
5479
  return yield* new CodeModeExecutionError({
5480
5480
  message: `Code Mode secure-exec failed with exit code ${outcome.exitCode}`
5481
5481
  });
5482
- const returned = yield* decodeJsonString(outcome.text).pipe(map7((json) => isJsonObject(json) ? json : {}), mapError2(() => new CodeModeExecutionError({ message: "Code Mode secure-exec returned an unreadable result" })));
5482
+ const returned = yield* decodeJsonString(outcome.text).pipe(map8((json) => isJsonObject(json) ? json : {}), mapError2(() => new CodeModeExecutionError({ message: "Code Mode secure-exec returned an unreadable result" })));
5483
5483
  if (isString2(returned.thrown))
5484
5484
  return yield* new CodeModeExecutionError({ message: `Code Mode code threw ${returned.thrown}` });
5485
5485
  const finishedAt = yield* currentTimeMillis;
@@ -5774,7 +5774,7 @@ Write no code and no line numbers: both are out of date before the Task is built
5774
5774
 
5775
5775
  ## Two or more related Tasks
5776
5776
 
5777
- Start the **File Tasks** Loop instead of creating related Tasks one by one. It makes a Task of each ticket and relates their blockers, so none is picked up before the Tasks it needs. In Code Mode:
5777
+ Start the **File Tasks** Loop instead of creating related Tasks one by one. It checks the tickets with a plan review, then makes a Task of each ticket and relates their blockers, so none is picked up before the Tasks it needs. In Code Mode:
5778
5778
 
5779
5779
  \`\`\`js
5780
5780
  await kitman.runs.start({
@@ -5783,14 +5783,34 @@ await kitman.runs.start({
5783
5783
  loop: 'file-tasks',
5784
5784
  input: {
5785
5785
  tickets: [
5786
- { key: 'first', title: '\u2026', body: '\u2026', acceptanceCriteria: ['\u2026'], blockedBy: [] },
5787
- { key: 'wider', title: '\u2026', body: '\u2026', acceptanceCriteria: ['\u2026'], blockedBy: ['first'] }
5786
+ {
5787
+ key: 'first',
5788
+ title: '\u2026',
5789
+ body: '\u2026',
5790
+ promise: '\u2026',
5791
+ outOfScope: ['\u2026'],
5792
+ acceptanceCriteria: ['\u2026'],
5793
+ blockedBy: []
5794
+ },
5795
+ {
5796
+ key: 'wider',
5797
+ title: '\u2026',
5798
+ body: '\u2026',
5799
+ promise: '\u2026',
5800
+ outOfScope: ['\u2026'],
5801
+ acceptanceCriteria: ['\u2026'],
5802
+ blockedBy: ['first']
5803
+ }
5788
5804
  ]
5789
5805
  }
5790
5806
  })
5791
5807
  \`\`\`
5792
5808
 
5793
- From a terminal, pass the same Input to \`kitman run start file-tasks --input '<json>'\`. Add \`projectId\` to the Input to file them in a Project. In a Plan Run, write the tickets in the plan: Plan files them.
5809
+ From a terminal, pass the same Input to \`kitman run start file-tasks --input '<json>'\`. Add \`projectId\` to the Input to file them in a Project, and \`repoBindingId\` when they change another repository than the Team's default: the review reads it, and each Task is filed for it. A ticket that changes another repository than that names its own \`repoBindingId\`. Each ticket needs a \`promise\` and an \`outOfScope\` list, which may be empty.
5810
+
5811
+ When the plan review has concerns, File Tasks files none of the tickets. The Run completes with an Output whose \`concerns\` each name a \`ticket\` and what is wrong with it. Revise the tickets and start File Tasks again with all of them. With no concerns, \`concerns\` is empty and \`tasks\` gives each ticket's Task.
5812
+
5813
+ In a Plan Run, write the tickets in the plan: Plan files them.
5794
5814
  `;
5795
5815
 
5796
5816
  // apps/mcp/src/result.ts
@@ -6058,7 +6078,7 @@ function createCodeModeHost(options) {
6058
6078
  const dispatchPrepared = fnUntraced(function* (operationName, preparedArgs, descriptor) {
6059
6079
  const startedAt = yield* currentTimeMillis;
6060
6080
  const backend = options.dispatchOperation ?? options.executeCapability ?? (() => fail7(new McpToolInputError({ message: "Kitman Code Mode dispatch is not configured." })));
6061
- 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 })))));
6081
+ 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 })))));
6062
6082
  });
6063
6083
  const dispatch = fnUntraced(function* (operationName, args) {
6064
6084
  const { descriptor, preparedArgs } = yield* prepareArgs(operationName, args);
@@ -6523,7 +6543,7 @@ function createCodeModeExecutionStore(options = {}) {
6523
6543
  ...input.content === undefined ? undefined : { content: input.content }
6524
6544
  });
6525
6545
  });
6526
- const listForActor = (actorDigest) => sweep.pipe(map7(() => [...entries.values()].flatMap((entry) => entry.approvalActorDigest === actorDigest && entry.status === "paused" ? [inspection(entry)] : [])));
6546
+ const listForActor = (actorDigest) => sweep.pipe(map8(() => [...entries.values()].flatMap((entry) => entry.approvalActorDigest === actorDigest && entry.status === "paused" ? [inspection(entry)] : [])));
6527
6547
  const markUnknown = (input) => {
6528
6548
  const entry = entries.get(input.executionId);
6529
6549
  if (entry === undefined || entry.ownerDigest !== ownerDigest(input.owner))
@@ -6533,7 +6553,7 @@ function createCodeModeExecutionStore(options = {}) {
6533
6553
  markUnknownEntry(entry, input.reason);
6534
6554
  return true;
6535
6555
  };
6536
- const inspect = (executionId) => sweep.pipe(map7(() => {
6556
+ const inspect = (executionId) => sweep.pipe(map8(() => {
6537
6557
  const entry = entries.get(executionId);
6538
6558
  return entry === undefined ? undefined : inspection(entry);
6539
6559
  }));
@@ -6556,7 +6576,7 @@ function createCodeModeExecutionStore(options = {}) {
6556
6576
  entry.onDecision = undefined;
6557
6577
  }
6558
6578
  function settle(entry, result) {
6559
- return currentTimeMillis.pipe(map7((now) => {
6579
+ return currentTimeMillis.pipe(map8((now) => {
6560
6580
  entry.status = "settled";
6561
6581
  entry.settledResult = result;
6562
6582
  entry.settledUntilMs = now + settledReplayTtlMs;
@@ -6566,7 +6586,7 @@ function createCodeModeExecutionStore(options = {}) {
6566
6586
  }));
6567
6587
  }
6568
6588
  function settledResume(entry, input) {
6569
- return currentTimeMillis.pipe(map7((now) => {
6589
+ return currentTimeMillis.pipe(map8((now) => {
6570
6590
  if (entry.settledResult === undefined || entry.settledUntilMs === undefined || now >= entry.settledUntilMs) {
6571
6591
  entry.status = "expired";
6572
6592
  entry.settledResult = undefined;
@@ -6581,7 +6601,7 @@ function createCodeModeExecutionStore(options = {}) {
6581
6601
  }
6582
6602
  }
6583
6603
  function isoString(epochMillis) {
6584
- return formatIso(makeUnsafe6(epochMillis));
6604
+ return formatIso(makeUnsafe(epochMillis));
6585
6605
  }
6586
6606
  function pauseValue(entry, ttlMs) {
6587
6607
  return {
@@ -6943,7 +6963,7 @@ function registerCodeModeTools(server, options = {}) {
6943
6963
  const resolveDecision = (id) => options.resolveExecutionDecision?.({ executionId: id, owner }) ?? undefined_;
6944
6964
  if (executionId === undefined) {
6945
6965
  const paused = yield* executionStore.listForActor(owner.approvalActorDigest ?? owner.actorDigest);
6946
- const decided = yield* forEach(paused, (execution) => resolveDecision(execution.executionId).pipe(map7((decision) => ({ execution, action: decision }))), { concurrency: "unbounded" });
6966
+ const decided = yield* forEach(paused, (execution) => resolveDecision(execution.executionId).pipe(map8((decision) => ({ execution, action: decision }))), { concurrency: "unbounded" });
6947
6967
  const resumable = decided.filter((candidate) => candidate.action !== undefined);
6948
6968
  if (resumable.length === 1) {
6949
6969
  executionId = resumable[0]?.execution.executionId;
@@ -8401,7 +8421,7 @@ function registerStepTools(server, adapt, input) {
8401
8421
  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.",
8402
8422
  inputSchema: adapt(StepBriefArguments),
8403
8423
  annotations: { readOnlyHint: true, idempotentHint: true }
8404
- }, (args) => run(map7(request("/brief"), (brief) => text(briefPage(brief.prompt, isNumber2(args.offset) ? args.offset : 0)))));
8424
+ }, (args) => run(map8(request("/brief"), (brief) => text(briefPage(brief.prompt, isNumber2(args.offset) ? args.offset : 0)))));
8405
8425
  const closed = (question) => gen(function* () {
8406
8426
  let current = question;
8407
8427
  const interval = fromInputUnsafe(input.answerPollInterval ?? "2 seconds");
@@ -8436,7 +8456,7 @@ function registerStepTools(server, adapt, input) {
8436
8456
  structuredContent: result
8437
8457
  });
8438
8458
  case "parked":
8439
- return map7(closed(result.question), (question) => ({
8459
+ return map8(closed(result.question), (question) => ({
8440
8460
  ...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.`),
8441
8461
  structuredContent: { ...result, question }
8442
8462
  }));
@@ -8449,11 +8469,11 @@ function registerStepTools(server, adapt, input) {
8449
8469
  inputSchema: adapt(SessionUpdateArguments),
8450
8470
  outputSchema: adapt(AnyResult),
8451
8471
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false }
8452
- }, (args) => run(map7(request("/session-updates", {
8472
+ }, (args) => run(map8(request("/session-updates", {
8453
8473
  kind: isString2(args.kind) ? args.kind : "progress",
8454
8474
  content: isString2(args.content) ? args.content : ""
8455
8475
  }), (result) => ({ content: [{ type: "text", text: "SessionUpdate recorded." }], structuredContent: result }))));
8456
- 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.`) : {
8476
+ 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.`) : {
8457
8477
  content: [
8458
8478
  { type: "text", text: encodeJsonStringSync({ answer: current.answer.value, questionId: current.id }) }
8459
8479
  ],
@@ -8478,7 +8498,7 @@ function registerStepTools(server, adapt, input) {
8478
8498
  const fitting = input.fittingSkills ?? [];
8479
8499
  const rank = (name) => fitting.includes(name) ? fitting.indexOf(name) : fitting.length;
8480
8500
  const names = (yield* fs.readDirectory(skillsDir).pipe(orElseSucceed(() => []))).toSorted((a, b) => rank(a) - rank(b) || a.localeCompare(b));
8481
- return yield* forEach(names, (name) => fs.readFileString(`${skillsDir}/${name}/SKILL.md`).pipe(map7((skill) => [
8501
+ return yield* forEach(names, (name) => fs.readFileString(`${skillsDir}/${name}/SKILL.md`).pipe(map8((skill) => [
8482
8502
  {
8483
8503
  name,
8484
8504
  description: skillDescription(skill),
@@ -8486,9 +8506,9 @@ function registerStepTools(server, adapt, input) {
8486
8506
 
8487
8507
  The skill's directory, for the files it points to: ${skillsDir}/${name}`
8488
8508
  }
8489
- ]), orElseSucceed(() => []))).pipe(map7((found) => found.flat()));
8509
+ ]), orElseSucceed(() => []))).pipe(map8((found) => found.flat()));
8490
8510
  });
8491
- const loadable = map7(kitSkills, (skills) => skills.some(({ name }) => name === scopeTasksSkill.name) ? skills : [
8511
+ const loadable = map8(kitSkills, (skills) => skills.some(({ name }) => name === scopeTasksSkill.name) ? skills : [
8492
8512
  ...skills,
8493
8513
  { name: scopeTasksSkill.name, description: scopeTasksSkill.summary, body: scopeTasksSkill.body.trim() }
8494
8514
  ]);
@@ -8496,7 +8516,7 @@ The skill's directory, for the files it points to: ${skillsDir}/${name}`
8496
8516
  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.",
8497
8517
  inputSchema: adapt(SkillsArguments),
8498
8518
  annotations: { readOnlyHint: true, idempotentHint: false }
8499
- }, (args) => runMcpEffect(map7(loadable, (skills) => {
8519
+ }, (args) => runMcpEffect(map8(loadable, (skills) => {
8500
8520
  const name = isString2(args.name) ? args.name : undefined;
8501
8521
  if (name === undefined)
8502
8522
  return text(skills.map((found) => `- ${found.name}: ${found.description}`).join(`
@@ -4,12 +4,12 @@ import {
4
4
  runnerRpcUrl2,
5
5
  makeRunnerRpcClient2,
6
6
  makeProgramRpcClient2
7
- } from "./chunk-ksgt1tdc.js";
8
- import"./chunk-qkjfx2ts.js";
9
- import"./chunk-9gg1w4aa.js";
10
- import"./chunk-0tjg9eya.js";
11
- import"./chunk-aezq3fyy.js";
12
- import"./chunk-qjqa338f.js";
7
+ } from "./chunk-0nh3w4vn.js";
8
+ import"./chunk-d4pxty7x.js";
9
+ import"./chunk-rz01craf.js";
10
+ import"./chunk-pxvd8w2v.js";
11
+ import"./chunk-t82w7459.js";
12
+ import"./chunk-zgraq2y3.js";
13
13
  export {
14
14
  makeProgramRpcClient2 as makeProgramRpcClient,
15
15
  makeRunnerRpcClient2 as makeRunnerRpcClient,
@@ -7,10 +7,10 @@ import {
7
7
  decoded2,
8
8
  readOpencode2,
9
9
  runOpencodeReader2
10
- } from "./chunk-tspf987k.js";
11
- import"./chunk-kq88aaa3.js";
12
- import"./chunk-aezq3fyy.js";
13
- import"./chunk-qjqa338f.js";
10
+ } from "./chunk-mtdz4k32.js";
11
+ import"./chunk-vxfajzpz.js";
12
+ import"./chunk-t82w7459.js";
13
+ import"./chunk-zgraq2y3.js";
14
14
  export {
15
15
  decoded2 as decoded,
16
16
  decodedOption2 as decodedOption,
@@ -4,9 +4,9 @@ import {
4
4
  opaqueTunnelRefusal2,
5
5
  isOpaqueConnectReason2,
6
6
  runSrtStep2
7
- } from "./chunk-z5f7g1w1.js";
8
- import"./chunk-0tjg9eya.js";
9
- import"./chunk-qjqa338f.js";
7
+ } from "./chunk-ggmwpwhf.js";
8
+ import"./chunk-pxvd8w2v.js";
9
+ import"./chunk-zgraq2y3.js";
10
10
  export {
11
11
  isOpaqueConnectReason2 as isOpaqueConnectReason,
12
12
  opaqueTunnelRefusal2 as opaqueTunnelRefusal,
@@ -3,7 +3,7 @@ import {
3
3
  make10,
4
4
  runForEach,
5
5
  compiled2
6
- } from "./chunk-aezq3fyy.js";
6
+ } from "./chunk-t82w7459.js";
7
7
  import {
8
8
  getOrUndefined,
9
9
  liftThrowable,
@@ -30,11 +30,11 @@ import {
30
30
  isJsonObject,
31
31
  isString2,
32
32
  encodeUnknownJsonStringSync
33
- } from "./chunk-qjqa338f.js";
33
+ } from "./chunk-zgraq2y3.js";
34
34
  import {
35
35
  ChildProcessSpawner,
36
- make3
37
- } from "./chunk-kq88aaa3.js";
36
+ make2
37
+ } from "./chunk-vxfajzpz.js";
38
38
 
39
39
  // packages/agent-runtime/src/opencode-store.ts
40
40
  import { lstatSync, readFileSync, realpathSync } from "fs";
@@ -167,7 +167,7 @@ var opencodeReaderCommand = () => compiled2 ? [process.execPath, "opencode-read"
167
167
  var isolatedRead = (store, name, input) => gen(function* () {
168
168
  const spawner = yield* ChildProcessSpawner;
169
169
  const [command, ...args] = opencodeReaderCommand();
170
- const handle = yield* spawner.spawn(make3(command, args, {
170
+ const handle = yield* spawner.spawn(make2(command, args, {
171
171
  stdin: make10(new TextEncoder().encode(encodeUnknownJsonStringSync({ store, name, input }))),
172
172
  stderr: "ignore",
173
173
  extendEnv: false,
@@ -18,7 +18,7 @@ import {
18
18
  isMinLength,
19
19
  isMaxLength,
20
20
  FiniteFromString
21
- } from "./chunk-qjqa338f.js";
21
+ } from "./chunk-zgraq2y3.js";
22
22
 
23
23
  // node_modules/.bun/effect@4.1.2/node_modules/effect/dist/JsonSchema.js
24
24
  var PRE_2020_TO_2020_COLLISIONS = ["$anchor", "$defs", "$dynamicAnchor", "$dynamicRef", "$vocabulary", "contentSchema", "dependentRequired", "dependentSchemas", "maxContains", "minContains", "prefixItems", "unevaluatedItems", "unevaluatedProperties"];