@oisin-ee/oisinpi 0.11.1 → 0.12.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/CHANGELOG.md +10 -0
- package/node_modules/@oisin-ee/pi-guardrails/README.md +1 -1
- package/node_modules/@oisin-ee/pi-guardrails/package.json +1 -1
- package/node_modules/@oisin-ee/pi-prewalk/package.json +1 -1
- package/node_modules/@oisin-ee/pi-tiers/package.json +1 -1
- package/node_modules/@oisin-ee/pi-todo/README.md +3 -13
- package/node_modules/@oisin-ee/pi-todo/package.json +1 -1
- package/node_modules/@oisin-ee/pi-todo/src/index.ts +2 -2
- package/node_modules/@oisin-ee/pi-todo/src/{plannotator.ts → plan-approved.ts} +22 -25
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @oisin-ee/oisinpi
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`7fcdc45`](https://github.com/oisin-ee/oisinpi/commit/7fcdc45f08c065faf38c3841c0b2d2133ad9322f)]:
|
|
8
|
+
- @oisin-ee/pi-todo@0.12.0
|
|
9
|
+
- @oisin-ee/pi-guardrails@0.12.0
|
|
10
|
+
- @oisin-ee/pi-prewalk@0.12.0
|
|
11
|
+
- @oisin-ee/pi-tiers@0.12.0
|
|
12
|
+
|
|
3
13
|
## 0.11.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -19,7 +19,7 @@ The guardrails do not restrict a model by its identity. The planning selections
|
|
|
19
19
|
`tier/plan-gpt` keep the full policy set: a planning model may run Git commands, write and edit files,
|
|
20
20
|
and use the workflow tools.
|
|
21
21
|
|
|
22
|
-
Planning restrictions belong to
|
|
22
|
+
Planning restrictions belong to Dogsled plan mode, which blocks writes outside markdown files while planning.
|
|
23
23
|
|
|
24
24
|
## pi
|
|
25
25
|
|
|
@@ -105,24 +105,14 @@ Version 3 adds `display.sections` to the snapshot: four typed status groups (`in
|
|
|
105
105
|
Pi-todo does not answer version 2 requests.
|
|
106
106
|
Incompatible versions leave the standalone widget available. Rendering failures restore it without changing saved tasks.
|
|
107
107
|
|
|
108
|
-
##
|
|
108
|
+
## Dogsled plans
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
```json
|
|
114
|
-
{
|
|
115
|
-
"executionMode": "external"
|
|
116
|
-
}
|
|
117
|
-
```
|
|
110
|
+
Dogsled plan mode (`/plan` and `submit_plan`) emits `dogsled:plan-approved` when the user approves a plan.
|
|
111
|
+
Pi-todo continues the approved plan in the same session. No setting is needed.
|
|
118
112
|
|
|
119
113
|
After approval, the agent reads the current todo list and adds the remaining approved work before implementation.
|
|
120
114
|
It preserves unrelated tasks and completed progress. Free-form plans do not need a special checklist format.
|
|
121
115
|
The todo tool owns progress, persistence, reminders, and the shared work display.
|
|
122
|
-
Plannotator returns to idle and does not maintain a second checklist or require `[DONE:n]` markers.
|
|
123
|
-
|
|
124
|
-
This integration uses the supported `plannotator:plan-approved` event, verified with Plannotator `0.28.19`.
|
|
125
|
-
It does not import Plannotator internals or change its code.
|
|
126
116
|
Malformed events, a different working directory, or another owner of the `todo` tool stop the handoff with an error.
|
|
127
117
|
|
|
128
118
|
## Reminder
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ownsTodo, settle } from "./lifecycle.ts";
|
|
2
2
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
3
|
-
import {
|
|
3
|
+
import { PlanApprovedHandoff } from "./plan-approved.ts";
|
|
4
4
|
import { TaskProvider } from "./provider.ts";
|
|
5
5
|
import { TodoPresentation } from "./presentation.ts";
|
|
6
6
|
import { TodoWork } from "./work.ts";
|
|
@@ -30,7 +30,7 @@ type TodoAPI = WorkHost &
|
|
|
30
30
|
* @param {TodoAPI} pi The extension API methods used here.
|
|
31
31
|
*/
|
|
32
32
|
export default function piTodo(pi: TodoAPI): void {
|
|
33
|
-
const handoff = new
|
|
33
|
+
const handoff = new PlanApprovedHandoff(pi),
|
|
34
34
|
presentation = new TodoPresentation(),
|
|
35
35
|
work = new TodoWork(pi, presentation),
|
|
36
36
|
provider = new TaskProvider(pi),
|
|
@@ -4,7 +4,7 @@ import type { WorkHost } from "./work.ts";
|
|
|
4
4
|
import { ownsTodo } from "./lifecycle.ts";
|
|
5
5
|
import { workUnitGuidance } from "./guidance.ts";
|
|
6
6
|
|
|
7
|
-
/** The supported
|
|
7
|
+
/** The supported Dogsled plan approval event. */
|
|
8
8
|
interface ApprovedPlan {
|
|
9
9
|
readonly cwd: string;
|
|
10
10
|
readonly planFilePath: string;
|
|
@@ -39,8 +39,8 @@ const isApprovedPlan = (value: unknown): value is ApprovedPlan =>
|
|
|
39
39
|
*/
|
|
40
40
|
continuation = (plan: ApprovedPlan): string =>
|
|
41
41
|
[
|
|
42
|
-
"The user approved this plan in
|
|
43
|
-
"Use the todo tool as the only task tracker.
|
|
42
|
+
"The user approved this plan in Dogsled plan mode. Continue execution in this session.",
|
|
43
|
+
"Use the todo tool as the only task tracker.",
|
|
44
44
|
"First call todo with op=view to inspect the current branch list.",
|
|
45
45
|
"Before implementation, represent remaining outcomes with optional bounded subtasks in that list. Use parent plus exact task for child operations.",
|
|
46
46
|
workUnitGuidance,
|
|
@@ -58,7 +58,7 @@ const isApprovedPlan = (value: unknown): value is ApprovedPlan =>
|
|
|
58
58
|
].join("\n");
|
|
59
59
|
|
|
60
60
|
/** Owns the approval subscription, never the todo list or execution progress. */
|
|
61
|
-
class
|
|
61
|
+
class PlanApprovedHandoff {
|
|
62
62
|
readonly #host: PlanHost;
|
|
63
63
|
#unsubscribe: (() => void) | undefined;
|
|
64
64
|
|
|
@@ -76,26 +76,23 @@ class PlannotatorHandoff {
|
|
|
76
76
|
*/
|
|
77
77
|
public start(ctx: PlanContext): void {
|
|
78
78
|
this.stop();
|
|
79
|
-
this.#unsubscribe = this.#host.events.on(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
);
|
|
79
|
+
this.#unsubscribe = this.#host.events.on("dogsled:plan-approved", (value: unknown): void => {
|
|
80
|
+
if (!isApprovedPlan(value)) {
|
|
81
|
+
ctx.ui.notify("pi-todo: Invalid Dogsled plan approval. No execution started.", "error");
|
|
82
|
+
} else if (value.cwd !== ctx.cwd) {
|
|
83
|
+
ctx.ui.notify(
|
|
84
|
+
"pi-todo: The approved plan belongs to another working directory. No execution started.",
|
|
85
|
+
"error",
|
|
86
|
+
);
|
|
87
|
+
} else if (ownsTodo(this.#host)) {
|
|
88
|
+
this.#host.sendMessage(
|
|
89
|
+
{ content: continuation(value), customType: "todo-plan-approved", display: true },
|
|
90
|
+
{ deliverAs: "followUp", triggerTurn: true },
|
|
91
|
+
);
|
|
92
|
+
} else {
|
|
93
|
+
ctx.ui.notify("pi-todo: Another extension owns todo. No execution started.", "error");
|
|
94
|
+
}
|
|
95
|
+
});
|
|
99
96
|
}
|
|
100
97
|
|
|
101
98
|
/** Removes the previous session's listener before replacement or shutdown. */
|
|
@@ -105,5 +102,5 @@ class PlannotatorHandoff {
|
|
|
105
102
|
}
|
|
106
103
|
}
|
|
107
104
|
|
|
108
|
-
export {
|
|
105
|
+
export { PlanApprovedHandoff };
|
|
109
106
|
export type { PlanContext, PlanHost };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oisin-ee/oisinpi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Oisin's pi packages in one install: prewalk, todo, tiers, and guardrails.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"guardrails",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
},
|
|
18
18
|
"type": "module",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@oisin-ee/pi-guardrails": "0.
|
|
21
|
-
"@oisin-ee/pi-prewalk": "0.
|
|
22
|
-
"@oisin-ee/pi-tiers": "0.
|
|
23
|
-
"@oisin-ee/pi-todo": "0.
|
|
20
|
+
"@oisin-ee/pi-guardrails": "0.12.0",
|
|
21
|
+
"@oisin-ee/pi-prewalk": "0.12.0",
|
|
22
|
+
"@oisin-ee/pi-tiers": "0.12.0",
|
|
23
|
+
"@oisin-ee/pi-todo": "0.12.0"
|
|
24
24
|
},
|
|
25
25
|
"bundleDependencies": [
|
|
26
26
|
"@oisin-ee/pi-guardrails",
|