@amaster.ai/pi-goal 0.1.9 → 0.1.11
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 +5 -13
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -20,8 +20,7 @@ Goal state is session-scoped and held in memory (no cross-session persistence),
|
|
|
20
20
|
|
|
21
21
|
## Pi lifecycle (how the engine hooks in)
|
|
22
22
|
|
|
23
|
-
The goal engine is driven by Pi's lifecycle events. For one `pi -p '<prompt>'`
|
|
24
|
-
run (non-interactive), events fire in this order:
|
|
23
|
+
The goal engine is driven by Pi's lifecycle events. For one `pi -p '<prompt>'` run (non-interactive), events fire in this order:
|
|
25
24
|
|
|
26
25
|
```
|
|
27
26
|
session_start ← session-level, once
|
|
@@ -62,13 +61,9 @@ Events pi-goal uses:
|
|
|
62
61
|
| `agent_end` | If a goal is active, run the engine on `event.messages`: evaluate → mark achieved/impossible or `sendUserMessage` to continue | Engine core. `event.messages` is the full conversation, so no separate buffering is needed |
|
|
63
62
|
| `session_shutdown` | Clear the goal | Cleanup |
|
|
64
63
|
|
|
65
|
-
The interactive `/goal` command (no argument) derives from the session's own
|
|
66
|
-
history, read via `ctx.sessionManager` — not a buffer this extension maintains.
|
|
64
|
+
The interactive `/goal` command (no argument) derives from the session's own history, read via `ctx.sessionManager` — not a buffer this extension maintains.
|
|
67
65
|
|
|
68
|
-
Note on derivation timing: a condition can only be derived once there is
|
|
69
|
-
conversation to derive from. `session_start` is too early (no transcript
|
|
70
|
-
yet); `before_agent_start` is the first point that carries the user's prompt
|
|
71
|
-
for the turn, so auto-derivation keys off it rather than firing at startup.
|
|
66
|
+
Note on derivation timing: a condition can only be derived once there is conversation to derive from. `session_start` is too early (no transcript yet); `before_agent_start` is the first point that carries the user's prompt for the turn, so auto-derivation keys off it rather than firing at startup.
|
|
72
67
|
|
|
73
68
|
## Usage
|
|
74
69
|
|
|
@@ -79,8 +74,7 @@ for the turn, so auto-derivation keys off it rather than firing at startup.
|
|
|
79
74
|
/goal clear Clear the active goal (also: stop, off, reset, none, cancel).
|
|
80
75
|
```
|
|
81
76
|
|
|
82
|
-
The slash command is for interactive (TUI) use; print mode can't dispatch it.
|
|
83
|
-
For the CLI / non-interactive runs, use the `--goal` flag instead:
|
|
77
|
+
The slash command is for interactive (TUI) use; print mode can't dispatch it. For the CLI / non-interactive runs, use the `--goal` flag instead:
|
|
84
78
|
|
|
85
79
|
```
|
|
86
80
|
pi --goal '<condition>' -p '<prompt>' Set an explicit goal, then run the prompt.
|
|
@@ -89,9 +83,7 @@ pi --goal '' -p '<prompt>' Derive the goal from the prompt (at befo
|
|
|
89
83
|
|
|
90
84
|
## Configuration
|
|
91
85
|
|
|
92
|
-
Settings key: `pi-goal` (in `~/.pi/agent/settings.json`, agent dir, or project `.pi/settings.json`).
|
|
93
|
-
Project settings are loaded only after project trust is accepted. Environment-variable
|
|
94
|
-
interpolation is available in user and agent settings, but not in project settings.
|
|
86
|
+
Settings key: `pi-goal` (in `~/.pi/agent/settings.json`, agent dir, or project `.pi/settings.json`). Project settings are loaded only after project trust is accepted. Environment-variable interpolation is available in user and agent settings, but not in project settings.
|
|
95
87
|
|
|
96
88
|
```json
|
|
97
89
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amaster.ai/pi-goal",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Pi extension that derives a goal from the conversation and keeps the agent working until the condition is met",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"directory": "packages/pi-goal"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@amaster.ai/pi-shared": "0.1.
|
|
51
|
+
"@amaster.ai/pi-shared": "0.1.11"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@earendil-works/pi-agent-core": ">=0.74.0",
|