@janvitos/pi-plan-build 0.1.26 → 0.1.27
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/README.md +4 -4
- package/index.ts +5 -2
- package/package.json +2 -2
- package/utils.ts +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ A global [Pi coding agent](https://github.com/badlogic/pi-mono) extension that a
|
|
|
25
25
|
|
|
26
26
|
## Requirements
|
|
27
27
|
|
|
28
|
-
- Pi `0.84.
|
|
28
|
+
- Pi `0.84.2` or newer
|
|
29
29
|
- Node.js `22.6` or newer for the test command
|
|
30
30
|
- TUI or RPC UI support for interactive questions and approval dialogs
|
|
31
31
|
|
|
@@ -62,7 +62,7 @@ Do not install more than one npm, Git, or local copy at the same time; duplicate
|
|
|
62
62
|
| `/plan` | Select Plan mode |
|
|
63
63
|
| `/build` | Select Build mode |
|
|
64
64
|
| `pi --plan` | Start a new session in Plan mode |
|
|
65
|
-
| `/build-fresh` |
|
|
65
|
+
| `/build-fresh` | Start a pending clean-session implementation manually |
|
|
66
66
|
|
|
67
67
|
The agent may also enter Plan mode with `plan_enter` when planning or investigation is safer than immediate execution.
|
|
68
68
|
|
|
@@ -71,10 +71,10 @@ The agent may also enter Plan mode with `plan_enter` when planning or investigat
|
|
|
71
71
|
When planning is complete, `plan_exit` displays the entire persisted plan and asks whether to:
|
|
72
72
|
|
|
73
73
|
1. implement in the current session;
|
|
74
|
-
2.
|
|
74
|
+
2. start a clean linked implementation session; or
|
|
75
75
|
3. stay in Plan mode.
|
|
76
76
|
|
|
77
|
-
Selecting **Start fresh and implement** stops the current run and
|
|
77
|
+
Selecting **Start fresh and implement** stops the current run and automatically dispatches `/build-fresh`. Pi 0.84.2 or newer is required for extension command dispatch from an injected user message. The command creates a linked child session, copies the approved plan to its canonical plan file, switches it to Build, and starts implementation without transferring the planning conversation.
|
|
78
78
|
|
|
79
79
|
Selecting **Stay in Plan mode**, or pressing Escape while the approval dialog is open, displays:
|
|
80
80
|
|
package/index.ts
CHANGED
|
@@ -302,7 +302,10 @@ export default function planBuildModes(pi: ExtensionAPI): void {
|
|
|
302
302
|
}
|
|
303
303
|
if (decision === "implement-fresh") {
|
|
304
304
|
freshImplementationPlan = plan;
|
|
305
|
-
|
|
305
|
+
pi.sendUserMessage("/build-fresh", {
|
|
306
|
+
deliverAs: "followUp",
|
|
307
|
+
expandPromptTemplates: true,
|
|
308
|
+
});
|
|
306
309
|
return buildPlanExitFreshResult(planPath);
|
|
307
310
|
}
|
|
308
311
|
freshImplementationPlan = undefined;
|
|
@@ -324,7 +327,7 @@ export default function planBuildModes(pi: ExtensionAPI): void {
|
|
|
324
327
|
const details = result.details as { approved?: boolean; action?: string } | undefined;
|
|
325
328
|
if (details?.action === "implement-fresh" && !context.isError) {
|
|
326
329
|
return new Text(
|
|
327
|
-
theme.fg("success", "Clean-session implementation selected —
|
|
330
|
+
theme.fg("success", "Clean-session implementation selected — starting automatically."),
|
|
328
331
|
0,
|
|
329
332
|
0,
|
|
330
333
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@janvitos/pi-plan-build",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"description": "Plan safely, approve explicitly, then implement here or in a clean session.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"prepublishOnly": "npm test"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@earendil-works/pi-coding-agent": "
|
|
36
|
+
"@earendil-works/pi-coding-agent": ">=0.84.2",
|
|
37
37
|
"@earendil-works/pi-tui": "*",
|
|
38
38
|
"typebox": "*"
|
|
39
39
|
},
|
package/utils.ts
CHANGED
|
@@ -166,7 +166,7 @@ export function buildPlanExitFreshResult(planPath: string) {
|
|
|
166
166
|
content: [
|
|
167
167
|
{
|
|
168
168
|
type: "text" as const,
|
|
169
|
-
text: "The user selected clean-session implementation. Stop now;
|
|
169
|
+
text: "The user selected clean-session implementation. Stop now; /build-fresh is starting automatically.",
|
|
170
170
|
},
|
|
171
171
|
],
|
|
172
172
|
details: { approved: true, action: "implement-fresh" as const, mode: "plan" as const, planPath },
|