@llm4ts/runner 2.40.1 → 2.42.0

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.
package/src/FlowRunner.ts CHANGED
@@ -314,14 +314,16 @@ export const makeFlowRunnerContext = Effect.fn("@llm4ts/runner/FlowRunner.makeCo
314
314
  service: LlmServiceShape,
315
315
  lane: string | undefined,
316
316
  role: string,
317
- executor?: Effect.Effect<string | undefined>
317
+ executor?: Effect.Effect<string | undefined>,
318
+ clone?: Effect.Effect<number | undefined>
318
319
  ): LlmServiceShape =>
319
320
  transcripts === undefined
320
321
  ? service
321
322
  : transcriptSeat(service, transcripts, {
322
323
  role,
323
324
  ...(lane === undefined ? {} : { lane }),
324
- ...(executor === undefined ? {} : { executor })
325
+ ...(executor === undefined ? {} : { executor }),
326
+ ...(clone === undefined ? {} : { clone })
325
327
  })
326
328
  const judgmentLog =
327
329
  options.judgmentLog === true
@@ -747,6 +749,7 @@ export const makeFlowRunnerContext = Effect.fn("@llm4ts/runner/FlowRunner.makeCo
747
749
  capacity: roster.capacity,
748
750
  capacityChanged: roster.capacityChanged,
749
751
  executor: held.executor,
752
+ clone: held.clone,
750
753
  contractOf: (id) => roster.executors.find((spec) => spec.id === id)?.contract,
751
754
  history: held.history
752
755
  })
@@ -781,7 +784,8 @@ export const makeFlowRunnerContext = Effect.fn("@llm4ts/runner/FlowRunner.makeCo
781
784
  timedSeat(held.service, laneEvents, "coder", seatOptions(held.executor)),
782
785
  lane,
783
786
  "coder",
784
- held.executor
787
+ held.executor,
788
+ held.clone
785
789
  ),
786
790
  judgment,
787
791
  judge: judgmentSeat,
@@ -804,20 +808,26 @@ export const makeFlowRunnerContext = Effect.fn("@llm4ts/runner/FlowRunner.makeCo
804
808
  const executorRef = yield* Ref.make<Effect.Effect<string | undefined>>(
805
809
  Effect.succeed(undefined)
806
810
  )
811
+ const cloneRef = yield* Ref.make<Effect.Effect<number | undefined>>(
812
+ Effect.succeed(undefined)
813
+ )
807
814
  const laneEvents = withLane(events, {
808
815
  lane: label,
809
816
  executor: Effect.flatten(Ref.get(executorRef)),
817
+ clone: Effect.flatten(Ref.get(cloneRef)),
810
818
  workDir: directory
811
819
  })
812
820
  const storyCoder = yield* makeHeldCoder(roster, source, directory, {
813
821
  events: laneEvents,
814
822
  eager: true,
815
823
  label,
824
+ ...(contextOptions?.ifFree === true ? { ifFree: true } : {}),
816
825
  ...(contextOptions?.prefer === undefined
817
826
  ? {}
818
827
  : { prefer: contextOptions.prefer })
819
828
  })
820
829
  yield* Ref.set(executorRef, storyCoder.executor)
830
+ yield* Ref.set(cloneRef, storyCoder.clone)
821
831
  return yield* contextIn(directory, storyCoder, label, false, laneEvents)
822
832
  })
823
833
  }
package/src/Terminal.ts CHANGED
@@ -43,6 +43,10 @@ export const rendersEvent = (verbosity: Verbosity, event: FlowEvent): boolean =>
43
43
  case "ExecutorReleased":
44
44
  case "StoryJudged":
45
45
  case "Timed":
46
+ case "TasksPlanned":
47
+ case "TaskStarted":
48
+ case "TaskCompleted":
49
+ case "StoryStatusChanged":
46
50
  return false
47
51
  // A gate or a setup may run for many minutes: its start is a line, so a
48
52
  // long one reads as running, not stuck. Other work starts too often.
@@ -250,6 +254,12 @@ export const terminalLine = (
250
254
  case "UsageProgress":
251
255
  case "StoryJudged":
252
256
  case "Timed":
257
+ case "TasksPlanned":
258
+ case "TaskStarted":
259
+ case "TaskCompleted":
260
+ case "StoryStatusChanged":
261
+ // Tasks are stages and board moves are outcome lines already; the typed
262
+ // events feed the tree and the trace.
253
263
  return ""
254
264
  case "Began":
255
265
  return event.kind === "gate" ? palette.info(`running ${safe(event.label)}`) : ""
@@ -553,6 +563,9 @@ export const laneOfEvent = (
553
563
  case "TokensUsed":
554
564
  case "UsageProgress":
555
565
  case "ReviewFindings":
566
+ case "TasksPlanned":
567
+ case "TaskStarted":
568
+ case "TaskCompleted":
556
569
  return event.lane === undefined
557
570
  ? undefined
558
571
  : {