pi-better-goal 0.1.2 → 0.1.4
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/LICENSE +21 -0
- package/README.md +32 -83
- package/package.json +4 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 1aboveio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,105 +1,54 @@
|
|
|
1
1
|
# pi-better-goal
|
|
2
2
|
|
|
3
|
-
`pi-better-goal` is a Pi
|
|
4
|
-
|
|
5
|
-
It ships one extension that:
|
|
6
|
-
|
|
7
|
-
- reads `pi-better-subagents` durable run metadata from the temp registry
|
|
8
|
-
- treats current-parent `running` and `orphaned` subagents as active background work
|
|
9
|
-
- owns `/goal` plus the `get_goal` and `update_goal` tools; only `/goal <objective>` can create a goal
|
|
10
|
-
- shows the current goal with active and elapsed clocks in a right-aligned widget above custom footers such as `pi-observability`
|
|
11
|
-
- publishes a typed activity snapshot on `pi.events`
|
|
12
|
-
- adds goal-aware prompt context while background work is active, so foreground idleness is not confused with goal completion
|
|
13
|
-
- sends a hidden follow-up when active background work drains to zero, including `callback:false` subagent runs
|
|
14
|
-
- provides a `/better-activity` command and `get_background_activity` tool for inspection
|
|
15
|
-
|
|
16
|
-
Goal state is stored as `pi-better-goal` custom entries in the Pi session. Existing `pi-codex-goal` entries are read for compatibility, but new state is written by this package.
|
|
17
|
-
|
|
18
|
-
## Commands And Tools
|
|
19
|
-
|
|
20
|
-
```text
|
|
21
|
-
/goal
|
|
22
|
-
/goal <objective>
|
|
23
|
-
/goal pause
|
|
24
|
-
/goal resume
|
|
25
|
-
/goal clear
|
|
26
|
-
/goal complete
|
|
27
|
-
/better-activity
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Model-callable tools:
|
|
31
|
-
|
|
32
|
-
- `get_goal`
|
|
33
|
-
- `update_goal`
|
|
34
|
-
- `get_background_activity`
|
|
3
|
+
`pi-better-goal` is a Pi extension for goal tracking with background-aware continuation.
|
|
35
4
|
|
|
36
|
-
##
|
|
5
|
+
## Quick Answer
|
|
37
6
|
|
|
38
|
-
|
|
39
|
-
goal creation tool. The right-aligned widget below the editor shows the objective,
|
|
40
|
-
status, active time, and total elapsed time. Active time stops while paused. Both
|
|
41
|
-
clocks freeze when the goal is completed and remain visible until the goal is
|
|
42
|
-
cleared or replaced.
|
|
7
|
+
Use `pi-better-goal` when a Pi session should keep an explicit objective visible until the foreground work and registered background activity are both done. It tracks active versus elapsed time and wakes the foreground when background work drains.
|
|
43
8
|
|
|
44
|
-
|
|
45
|
-
`pi-observability` retain ownership of their layout and lifecycle.
|
|
9
|
+
## Core Features
|
|
46
10
|
|
|
47
|
-
|
|
11
|
+
- `/goal` runtime for starting, pausing, resuming, completing, and clearing the current objective.
|
|
12
|
+
- A compact goal widget that does not replace Pi's footer.
|
|
13
|
+
- Background activity tracking for subagents and other registered providers.
|
|
14
|
+
- A follow-up wake when active background work drains to zero.
|
|
48
15
|
|
|
49
|
-
## Install
|
|
50
|
-
|
|
51
|
-
From this directory:
|
|
16
|
+
## Install
|
|
52
17
|
|
|
53
18
|
```sh
|
|
54
|
-
|
|
55
|
-
pi install .
|
|
19
|
+
pi install npm:pi-better-goal
|
|
56
20
|
```
|
|
57
21
|
|
|
58
|
-
|
|
22
|
+
Try it for one run:
|
|
59
23
|
|
|
60
24
|
```sh
|
|
61
|
-
pi -e
|
|
25
|
+
pi -e npm:pi-better-goal
|
|
62
26
|
```
|
|
63
27
|
|
|
64
|
-
##
|
|
65
|
-
|
|
66
|
-
The extension emits these events on `pi.events`:
|
|
67
|
-
|
|
68
|
-
- `pi-better-goal:ready` with `{ version }`
|
|
69
|
-
- `pi-better-goal:activity` with an `ActivitySnapshot`
|
|
70
|
-
- `pi-better-goal:terminal-attention` when terminal or unhealthy background work needs attention
|
|
71
|
-
|
|
72
|
-
Other extensions can register providers by emitting `pi-better-goal:register-provider` with:
|
|
73
|
-
|
|
74
|
-
```ts
|
|
75
|
-
{
|
|
76
|
-
id: "provider-id",
|
|
77
|
-
label: "Provider label",
|
|
78
|
-
getActivity(ctx) {
|
|
79
|
-
return {
|
|
80
|
-
providerId: "provider-id",
|
|
81
|
-
label: "Provider label",
|
|
82
|
-
items: [
|
|
83
|
-
{ id: "work-1", status: "running", active: true }
|
|
84
|
-
]
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
```
|
|
28
|
+
## When To Use
|
|
89
29
|
|
|
90
|
-
|
|
30
|
+
Use this package for longer Pi sessions where subagents, background tasks, or other providers may still be active after the foreground message is idle.
|
|
91
31
|
|
|
92
|
-
|
|
32
|
+
Do not use it when you only need a note or checklist outside Pi's runtime state.
|
|
93
33
|
|
|
94
|
-
|
|
34
|
+
## Compatibility
|
|
95
35
|
|
|
96
|
-
|
|
97
|
-
|
|
36
|
+
| Requirement | Support |
|
|
37
|
+
|-------------|---------|
|
|
38
|
+
| Pi | Required |
|
|
39
|
+
| Install method | `pi install npm:pi-better-goal` |
|
|
40
|
+
| Background providers | Works with registered providers |
|
|
41
|
+
| Development runtime | Node.js 22+ |
|
|
98
42
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
## Validation
|
|
43
|
+
## Update Or Remove
|
|
102
44
|
|
|
103
45
|
```sh
|
|
104
|
-
|
|
105
|
-
|
|
46
|
+
pi update npm:pi-better-goal
|
|
47
|
+
pi remove npm:pi-better-goal
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## More Detail
|
|
51
|
+
|
|
52
|
+
- Repository: https://github.com/1aboveio/pi-better-harness
|
|
53
|
+
- Detailed notes: https://github.com/1aboveio/pi-better-harness/blob/main/packages/pi-better-goal/docs/usage.md
|
|
54
|
+
- License: https://github.com/1aboveio/pi-better-harness/blob/main/LICENSE
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-better-goal",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Pi extension for goal tracking with background-aware continuation.",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "src/index.ts",
|
|
7
8
|
"files": [
|
|
@@ -65,4 +66,4 @@
|
|
|
65
66
|
"engines": {
|
|
66
67
|
"node": ">=22.0.0"
|
|
67
68
|
}
|
|
68
|
-
}
|
|
69
|
+
}
|