@llm4ts/shell 2.9.6 → 2.10.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/dist/Cli.d.ts +1 -1
- package/dist/Cli.d.ts.map +1 -1
- package/flows/epic-stories.js +16 -0
- package/flows/lib/epic-stories.js +12 -1
- package/package.json +4 -4
package/dist/Cli.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface CostsFlags {
|
|
|
41
41
|
}
|
|
42
42
|
/** Turns the `costs` flags into program options; every rejection is a usage error. */
|
|
43
43
|
export declare const costsOptionsFrom: (flags: CostsFlags, cwd?: string) => Effect.Effect<CostsOptions, ShellUsageError>;
|
|
44
|
-
export declare const shellCommand: Command.Command<"llm4ts", {} | {}, {}, import("./FlowLaunch.ts").FlowLaunchError | import("@llm4ts/flow/FlowError.ts").DecisionsInvalid | ShellUsageError | ShellActionError | import("@llm4ts/flow/FlowError.ts").PersistenceError | import("@llm4ts/flow/FlowError.ts").PlanParseError | import("@llm4ts/flow/FlowError.ts").UnsupportedSchemaVersion | import("@llm4ts/flow/FlowError.ts").WorkspacePathError | import("@llm4ts/flow/FlowError.ts").WorkspaceLimitError | import("@llm4ts/flow/FlowError.ts").WorkspaceIoError | import("@llm4ts/flow/FlowError.ts").FlowAborted | import("@llm4ts/flow/FlowError.ts").ProcessError | import("@llm4ts/flow/FlowError.ts").FlowLlmError | import("@llm4ts/flow/FlowError.ts").FlowCapabilityDenied | import("@llm4ts/flow/FlowError.ts").ColumnNotFound | import("@llm4ts/flow/FlowError.ts").BudgetExceeded | import("@llm4ts/flow/FlowError.ts").StoryPlanInvalid | import("@llm4ts/flow/FlowError.ts").PerimeterViolation | import("@llm4ts/flow/FlowError.ts").MissingDependency | import("@llm4ts/flow/FlowError.ts").MergeConflict | import("@llm4ts/flow/FlowError.ts").EpicCheckoutDirty | import("@llm4ts/flow/FlowError.ts").RosterExhausted | import("@llm4ts/flow/FlowError.ts").RosterInvalid | import("@llm4ts/flow/FlowError.ts").StoryFailed | import("@llm4ts/flow/FlowError.ts").OpenPointsPending | import("@llm4ts/flow/FlowError.ts").ContractConflict, import("effect/unstable/cli/Prompt").Environment>;
|
|
44
|
+
export declare const shellCommand: Command.Command<"llm4ts", {} | {}, {}, import("./FlowLaunch.ts").FlowLaunchError | import("@llm4ts/flow/FlowError.ts").DecisionsInvalid | ShellUsageError | ShellActionError | import("@llm4ts/flow/FlowError.ts").PersistenceError | import("@llm4ts/flow/FlowError.ts").PlanParseError | import("@llm4ts/flow/FlowError.ts").UnsupportedSchemaVersion | import("@llm4ts/flow/FlowError.ts").WorkspacePathError | import("@llm4ts/flow/FlowError.ts").WorkspaceLimitError | import("@llm4ts/flow/FlowError.ts").WorkspaceIoError | import("@llm4ts/flow/FlowError.ts").FlowAborted | import("@llm4ts/flow/FlowError.ts").ProcessError | import("@llm4ts/flow/FlowError.ts").FlowLlmError | import("@llm4ts/flow/FlowError.ts").FlowCapabilityDenied | import("@llm4ts/flow/FlowError.ts").ColumnNotFound | import("@llm4ts/flow/FlowError.ts").BudgetExceeded | import("@llm4ts/flow/FlowError.ts").StoryPlanInvalid | import("@llm4ts/flow/FlowError.ts").PerimeterViolation | import("@llm4ts/flow/FlowError.ts").MissingDependency | import("@llm4ts/flow/FlowError.ts").MergeConflict | import("@llm4ts/flow/FlowError.ts").EpicCheckoutDirty | import("@llm4ts/flow/FlowError.ts").RosterExhausted | import("@llm4ts/flow/FlowError.ts").RosterInvalid | import("@llm4ts/flow/FlowError.ts").EpicIncomplete | import("@llm4ts/flow/FlowError.ts").LandingFailed | import("@llm4ts/flow/FlowError.ts").StoryFailed | import("@llm4ts/flow/FlowError.ts").OpenPointsPending | import("@llm4ts/flow/FlowError.ts").ContractConflict, import("effect/unstable/cli/Prompt").Environment>;
|
|
45
45
|
export declare const runShellCommand: (argv: ReadonlyArray<string>) => Effect.Effect<void, unknown, Command.Environment>;
|
|
46
46
|
export {};
|
|
47
47
|
//# sourceMappingURL=Cli.d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
|
|
4
4
|
// llm4ts run epic-stories --repo ~/demo/portal -- --plan-only "…" # write the plan and stop
|
|
5
|
+
// llm4ts run epic-stories --repo ~/demo/portal -- --land # land the finished epic on main
|
|
5
6
|
//
|
|
6
7
|
// The reasoning seat (LLM4TS_REASONER, default claude) splits the epic,
|
|
7
8
|
// reviews every task and judges every story; the coder seat (LLM4TS_CODER,
|
|
@@ -22,6 +23,7 @@ import { budget, cap } from "@llm4ts/flow/Context";
|
|
|
22
23
|
import { makeLocalBoardSync } from "@llm4ts/flow/BoardSync";
|
|
23
24
|
import { estimatedUsageOptionsFromEnv, makeEstimatedUsageMeter } from "@llm4ts/flow/EstimatedUsage";
|
|
24
25
|
import { FlowAborted, Info, asReadOnly, nodePlainFileStore, nodeProcessExecutor, resolveFlowInput, runFlowMain, runNode, stage, withModel } from "@llm4ts/runner";
|
|
26
|
+
import { landEpic } from "@llm4ts/flow/Landing";
|
|
25
27
|
import { implementStoriesFlow } from "@llm4ts/flow/Stories";
|
|
26
28
|
import { makeStoryPlanStore, validateStoryPlan } from "@llm4ts/flow/StoryPlan";
|
|
27
29
|
import { awaitServer, combineTotals, epicIdFor, flagsFromEnvironment, gateCommands, gatesIn, generateStoryPlan, httpProbe, judgeStory, localCoderServer, parseEpicArgs, reasonerFromEnvironment, serverHealthUrl, setupIn, storyCoderFromEnvironment, verifyBlockedOn, worktreeRootFor, worktreeSetupCommand } from "./lib/epic-stories.js";
|
|
@@ -71,6 +73,20 @@ const program = Effect.gen(function* () {
|
|
|
71
73
|
if (flags.planOnly) {
|
|
72
74
|
return;
|
|
73
75
|
}
|
|
76
|
+
if (flags.land !== undefined) {
|
|
77
|
+
const landed = yield* landEpic(context, {
|
|
78
|
+
plan,
|
|
79
|
+
files,
|
|
80
|
+
stateDir,
|
|
81
|
+
target: flags.land,
|
|
82
|
+
gates: gatesIn(nodeProcessExecutor, events, gateCommands(process.env)),
|
|
83
|
+
system: ["House rules of the target repository (CONTRIBUTING.md):", guidance].join("\n")
|
|
84
|
+
});
|
|
85
|
+
yield* events.publish(Info.make({
|
|
86
|
+
message: `epic ${plan.epicId}: landed on ${landed.target}${landed.conflicts.length === 0 ? "" : ` (${landed.conflicts.length} conflicted file(s) resolved in ${landed.rounds} round(s))`}`
|
|
87
|
+
}));
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
74
90
|
// With a roster, the default is every coder slot it has; the flag caps it.
|
|
75
91
|
const concurrency = flags.concurrency ?? context.roster?.slots("coder") ?? 3;
|
|
76
92
|
if (context.roster === undefined && localServer !== undefined && concurrency > 1) {
|
|
@@ -19,6 +19,8 @@ import { FlowAborted, FlowLlmError, ReviewResult, ScriptUsage, coderFor, lintCom
|
|
|
19
19
|
export const epicUsage = [
|
|
20
20
|
"epic-stories flags:",
|
|
21
21
|
" --plan-only write (or re-validate) the story plan and stop",
|
|
22
|
+
" --land[=<branch>] land the finished epic on <branch> (default main): merge the branch in,",
|
|
23
|
+
" let the coder fix conflicts and red gates (3 rounds), then merge",
|
|
22
24
|
" --concurrency <n> stories implemented at once (default 3)",
|
|
23
25
|
" --fail-fast stop the epic at the first failed story",
|
|
24
26
|
"Seats: LLM4TS_REASONER (claude|gemini|…, default claude) splits, reviews, judges;",
|
|
@@ -34,6 +36,7 @@ export const parseEpicArgs = (argv) => Effect.gen(function* () {
|
|
|
34
36
|
let planOnly = false;
|
|
35
37
|
let failFast = false;
|
|
36
38
|
let concurrency;
|
|
39
|
+
let land;
|
|
37
40
|
const rest = [];
|
|
38
41
|
for (let index = 0; index < argv.length; index += 1) {
|
|
39
42
|
const argument = argv[index] ?? "";
|
|
@@ -43,6 +46,14 @@ export const parseEpicArgs = (argv) => Effect.gen(function* () {
|
|
|
43
46
|
else if (argument === "--fail-fast") {
|
|
44
47
|
failFast = true;
|
|
45
48
|
}
|
|
49
|
+
else if (argument === "--land" || argument.startsWith("--land=")) {
|
|
50
|
+
// `--land=<branch>`, never a separate word: the epic text may follow.
|
|
51
|
+
const branch = argument.includes("=") ? argument.slice("--land=".length).trim() : "main";
|
|
52
|
+
if (branch.length === 0) {
|
|
53
|
+
return yield* ScriptUsage.make({ message: `--land= needs a branch name\n${epicUsage}` });
|
|
54
|
+
}
|
|
55
|
+
land = branch;
|
|
56
|
+
}
|
|
46
57
|
else if (argument === "--concurrency" || argument.startsWith("--concurrency=")) {
|
|
47
58
|
const raw = argument.includes("=")
|
|
48
59
|
? argument.slice("--concurrency=".length)
|
|
@@ -62,7 +73,7 @@ export const parseEpicArgs = (argv) => Effect.gen(function* () {
|
|
|
62
73
|
rest.push(argument);
|
|
63
74
|
}
|
|
64
75
|
}
|
|
65
|
-
return { planOnly, failFast, concurrency, rest };
|
|
76
|
+
return { planOnly, failFast, concurrency, land, rest };
|
|
66
77
|
});
|
|
67
78
|
// ---- Seats --------------------------------------------------------------------
|
|
68
79
|
/** The reasoning seat: `LLM4TS_REASONER`, any coder id, default claude. Unknown names fail typed. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llm4ts/shell",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.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-rc.115",
|
|
54
54
|
"@effect/platform-node-shared": "4.0.0-rc.115",
|
|
55
|
-
"@llm4ts/core": "2.
|
|
56
|
-
"@llm4ts/flow": "2.
|
|
57
|
-
"@llm4ts/runner": "2.
|
|
55
|
+
"@llm4ts/core": "2.10.0",
|
|
56
|
+
"@llm4ts/flow": "2.10.0",
|
|
57
|
+
"@llm4ts/runner": "2.10.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"effect": "4.0.0-rc.115"
|