@llm4ts/runner 2.21.1 → 2.22.1
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/dist/AgentTree.d.ts +32 -0
- package/dist/AgentTree.d.ts.map +1 -1
- package/dist/AgentTree.js +94 -10
- package/dist/AgentTree.js.map +1 -1
- package/dist/AgentTreeSurface.d.ts +1 -1
- package/dist/AgentTreeSurface.d.ts.map +1 -1
- package/dist/AgentTreeSurface.js +5 -2
- package/dist/AgentTreeSurface.js.map +1 -1
- package/dist/FlowRunner.d.ts.map +1 -1
- package/dist/FlowRunner.js +10 -7
- package/dist/FlowRunner.js.map +1 -1
- package/dist/Profile.d.ts +166 -0
- package/dist/Profile.d.ts.map +1 -0
- package/dist/Profile.js +497 -0
- package/dist/Profile.js.map +1 -0
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +2 -0
- package/dist/Terminal.js.map +1 -1
- package/dist/Watch.d.ts +15 -0
- package/dist/Watch.d.ts.map +1 -1
- package/dist/Watch.js +19 -6
- package/dist/Watch.js.map +1 -1
- package/package.json +4 -3
- package/src/AgentTree.ts +136 -10
- package/src/AgentTreeSurface.ts +6 -2
- package/src/FlowRunner.ts +19 -11
- package/src/Profile.ts +645 -0
- package/src/Terminal.ts +2 -0
- package/src/Watch.ts +36 -10
package/src/FlowRunner.ts
CHANGED
|
@@ -58,6 +58,8 @@ import {
|
|
|
58
58
|
} from "@llm4ts/flow/FlowEvents"
|
|
59
59
|
import { FlowContext, type ContextOptions, type FlowContextShape } from "@llm4ts/flow/FlowContext"
|
|
60
60
|
import { makeFlowRecorder, type RunOutcome } from "@llm4ts/flow/FlowRecorder"
|
|
61
|
+
import { timedSeat } from "@llm4ts/flow/Timing"
|
|
62
|
+
import { idleAfterFrom } from "./AgentTree.ts"
|
|
61
63
|
import { makeAgentTreeHost, nodeTreeKeys } from "./AgentTreeSurface.ts"
|
|
62
64
|
import { makeJudgmentLog, type JudgmentLogShape } from "@llm4ts/flow/JudgmentLog"
|
|
63
65
|
import { makeGitHubTool } from "@llm4ts/flow/GitHubTool"
|
|
@@ -454,13 +456,14 @@ export const makeFlowRunnerContext = Effect.fn("@llm4ts/runner/FlowRunner.makeCo
|
|
|
454
456
|
laneEvents: FlowEventsShape = events
|
|
455
457
|
): FlowContextShape =>
|
|
456
458
|
FlowContext.of({
|
|
457
|
-
|
|
458
|
-
|
|
459
|
+
// Every call is timed on the lane's events, under its role.
|
|
460
|
+
reasoning: timedSeat(seats.reasoning, laneEvents, "reasoning"),
|
|
461
|
+
coder: { ...seats.coder, ...timedSeat(seats.coder, laneEvents, "coder") },
|
|
459
462
|
judgment: seats.judgment,
|
|
460
463
|
git: makeGitTool(dependencies.process, workDir, laneEvents),
|
|
461
464
|
hosting: makeGitHubTool(dependencies.process, workDir, laneEvents),
|
|
462
465
|
events: laneEvents,
|
|
463
|
-
reviewers: seats.reviewers,
|
|
466
|
+
reviewers: seats.reviewers.map((reviewer) => timedSeat(reviewer, laneEvents, "reviewer")),
|
|
464
467
|
coderCapabilities: seats.coder.capabilities,
|
|
465
468
|
userPrompt: options.userPrompt,
|
|
466
469
|
workDir,
|
|
@@ -618,12 +621,16 @@ export const makeFlowRunnerContext = Effect.fn("@llm4ts/runner/FlowRunner.makeCo
|
|
|
618
621
|
laneEvents: FlowEventsShape
|
|
619
622
|
): RosterView => ({
|
|
620
623
|
forRole: (role) =>
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
624
|
+
timedSeat(
|
|
625
|
+
rosterSeat(roster, source, role, workDir, {
|
|
626
|
+
events: laneEvents,
|
|
627
|
+
avoid: Effect.map(held.executor, (id) => (id === undefined ? [] : [id])),
|
|
628
|
+
borrow: held.lease,
|
|
629
|
+
label
|
|
630
|
+
}),
|
|
631
|
+
laneEvents,
|
|
632
|
+
role
|
|
633
|
+
),
|
|
627
634
|
available: roster.available,
|
|
628
635
|
slots: roster.slots,
|
|
629
636
|
executor: held.executor,
|
|
@@ -647,7 +654,7 @@ export const makeFlowRunnerContext = Effect.fn("@llm4ts/runner/FlowRunner.makeCo
|
|
|
647
654
|
const judgment = yield* judgmentFor(judgmentSeat, judgmentConfig, runEnvironment)
|
|
648
655
|
return FlowContext.of({
|
|
649
656
|
reasoning: view.forRole(rebind ? "planner" : "reviewer"),
|
|
650
|
-
coder: held.service,
|
|
657
|
+
coder: timedSeat(held.service, laneEvents, "coder"),
|
|
651
658
|
judgment,
|
|
652
659
|
git: makeGitTool(dependencies.process, workDir, laneEvents),
|
|
653
660
|
hosting: makeGitHubTool(dependencies.process, workDir, laneEvents),
|
|
@@ -765,7 +772,8 @@ export const runWithBundle = Effect.fn("@llm4ts/runner/FlowRunner.runWithBundle"
|
|
|
765
772
|
rows: () => process.stdout.rows,
|
|
766
773
|
colour: true
|
|
767
774
|
},
|
|
768
|
-
nodeTreeKeys("interrupt")
|
|
775
|
+
nodeTreeKeys("interrupt"),
|
|
776
|
+
idleAfterFrom(environment)
|
|
769
777
|
)
|
|
770
778
|
: undefined
|
|
771
779
|
const surface = tree?.surface ?? classic
|