@llm4ts/shell 2.22.1 → 2.23.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.
@@ -1002,8 +1002,22 @@ export const gatesIn = (process, events, commands) => (workDir, laneEvents) => E
1002
1002
  }
1003
1003
  return mergeReviewResults(results);
1004
1004
  });
1005
+ /**
1006
+ * LLM4TS_STORY_CONTEXT_CHARS: how much of the code a story starts from its
1007
+ * coder sees up front (0 leaves it out); the executor's default otherwise.
1008
+ */
1009
+ export const storyContextChars = (environment) => {
1010
+ const value = Number(environment.LLM4TS_STORY_CONTEXT_CHARS?.trim() ?? "");
1011
+ return environment.LLM4TS_STORY_CONTEXT_CHARS === undefined ||
1012
+ !Number.isInteger(value) ||
1013
+ value < 0
1014
+ ? {}
1015
+ : { contextChars: value };
1016
+ };
1005
1017
  /** Today's story judge: the rubric judge over the four dimensions. */
1006
- export const rubricStoryJudge = (context) => (story, diff, seats, subject) => judgeStory(seats.context.roster?.forRole("judge") ?? context.reasoning, story, diff, context.budget, context.plan, subject);
1018
+ export const rubricStoryJudge = (context) => (story, diff, seats, subject) => judgeStory(
1019
+ // The story's own seat, not the run's: its time counts for the story.
1020
+ seats.context.roster?.forRole("judge") ?? seats.context.reasoning, story, diff, context.budget, context.plan, subject);
1007
1021
  /** The runner options the two flags above add; empty when neither is set. */
1008
1022
  export const epicRunnerOptions = Effect.fn("epic-stories.runnerOptions")(function* (options, environment) {
1009
1023
  const judgment = options.judgmentFromEnvironment === true
@@ -1285,6 +1299,7 @@ export const runEpicStories = (options) => Effect.gen(function* () {
1285
1299
  gates,
1286
1300
  // With a roster, the judge and the verifier are leased per story,
1287
1301
  // away from the executor coding it (ADR 0019).
1302
+ ...storyContextChars(process.env),
1288
1303
  judge: options.storyJudge({
1289
1304
  plan: unit.plan,
1290
1305
  budget: contextBudget,
@@ -1293,7 +1308,7 @@ export const runEpicStories = (options) => Effect.gen(function* () {
1293
1308
  files,
1294
1309
  houseRules: guidance
1295
1310
  }),
1296
- verifyBlocked: (story, need, workDir, seats) => verifyBlockedOn(seats.context.roster?.forRole("verifier") ?? reasoningMeter.service, events, files, unit.plan)(story, need, workDir),
1311
+ verifyBlocked: (story, need, workDir, seats) => verifyBlockedOn(seats.context.roster?.forRole("verifier") ?? seats.context.reasoning, events, files, unit.plan)(story, need, workDir),
1297
1312
  // A roster waits for its own executors (the story's next lease
1298
1313
  // does); without one, poll the single coder's engine.
1299
1314
  awaitRecovery: context.roster === undefined
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llm4ts/shell",
3
- "version": "2.22.1",
3
+ "version": "2.23.0",
4
4
  "description": "Interactive shell and CLI for llm4ts: flow discovery, run-a-flow, and view",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -52,9 +52,9 @@
52
52
  "dependencies": {
53
53
  "@effect/platform-node": "4.0.0",
54
54
  "@effect/platform-node-shared": "4.0.0",
55
- "@llm4ts/core": "2.22.1",
56
- "@llm4ts/runner": "2.22.1",
57
- "@llm4ts/flow": "2.22.1"
55
+ "@llm4ts/core": "2.23.0",
56
+ "@llm4ts/flow": "2.23.0",
57
+ "@llm4ts/runner": "2.23.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "effect": "4.0.0"