@signalridge/pi-goal 1.4.8 → 1.5.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 +5 -0
- package/README.md +6 -2
- package/package.json +1 -1
- package/src/lifecycle.ts +1 -1
- package/src/settings-ui.ts +29 -1
- package/src/settings.ts +18 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# @signalridge/pi-goal
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
### Minor Changes
|
|
5
|
+
|
|
6
|
+
- 4697441: Add `experimental.notices`, a setting beside `experimental.goals` that silences the session-start notice announcing the experimental ordered-goal queue. It defaults to `true`, so existing sessions report exactly as before, and it suppresses only that announcement: validation failures, settings-load warnings, and recovery notices still report because they describe a problem rather than restate a choice the user already made. The queue, its subcommands, and `queue off` freezing are unaffected, and the Settings menu exposes the new control directly under **Ordered goal queue**.
|
|
7
|
+
|
|
3
8
|
## 1.4.8
|
|
4
9
|
### Patch Changes
|
|
5
10
|
|
package/README.md
CHANGED
|
@@ -61,7 +61,8 @@ built-in defaults without creating the file:
|
|
|
61
61
|
{
|
|
62
62
|
"toolVisibility": "after-first-goal",
|
|
63
63
|
"experimental": {
|
|
64
|
-
"goals": false
|
|
64
|
+
"goals": false,
|
|
65
|
+
"notices": true
|
|
65
66
|
},
|
|
66
67
|
"rpc": {
|
|
67
68
|
"enabled": false
|
|
@@ -74,13 +75,14 @@ built-in defaults without creating the file:
|
|
|
74
75
|
```
|
|
75
76
|
|
|
76
77
|
Use `/goal` → **Settings…** in the TUI to create or update the file interactively, or create
|
|
77
|
-
and edit it directly. The standard Settings screen keeps all
|
|
78
|
+
and edit it directly. The standard Settings screen keeps all six controls on one level in task
|
|
78
79
|
order; the two safety limits open standard choice screens:
|
|
79
80
|
|
|
80
81
|
- **Automatic-work limit** shows the exact response limit or **Unlimited**. Choose **Set response limit…** to edit the current finite value (or the built-in default of 25 when switching from Unlimited), or choose **Unlimited…**. Unlimited requires confirmation that tool loops may continue consuming tokens and provider cost without a response-count cap.
|
|
81
82
|
- **No-progress guard** shows **_N_ runs** or **Off**. Choose the default threshold, **Off**, or **Set threshold…** and enter a safe whole number greater than zero.
|
|
82
83
|
- **Goal tools** controls whether terminal Goal tools are always visible or appear after the first goal.
|
|
83
84
|
- **Ordered goal queue** controls the experimental ordered-goal workflows.
|
|
85
|
+
- **Experimental notice** controls whether a session reports once that experimental behavior and persisted state may change. It defaults to **On** and suppresses only that announcement; the queue itself is unaffected.
|
|
84
86
|
- **Managed run RPC** controls whether trusted installed extensions may start and cancel managed Goal runs. It defaults to **Off** and is a cooperation setting, not an extension security sandbox.
|
|
85
87
|
|
|
86
88
|
Custom number inputs reject zero, negative numbers, decimals, text, and unsafe integers without saving; use the explicit **Unlimited** or **Off** choice instead. Interactive changes are serialized, written atomically, preserve unknown fields, and apply to the current runtime. A successful change updates the visible state immediately. A failed save restores the prior value and reports the settings path so it can be retried. Tool-visibility changes that would alter the active tool schema are rejected while Pi is busy; retry after Pi settles. Escape returns to the previous screen without reverting changes that were already saved.
|
|
@@ -92,6 +94,8 @@ Custom number inputs reject zero, negative numbers, decimals, text, and unsafe i
|
|
|
92
94
|
|
|
93
95
|
`experimental.goals` accepts a boolean and defaults to `false`. Set it to `true` to enable the ordered-goal subcommands and automatic queue advancement described below. Enabled sessions show one warning because command behavior and persisted queue state remain experimental.
|
|
94
96
|
|
|
97
|
+
`experimental.notices` accepts a boolean and defaults to `true`. It controls that single experimental-goals announcement: with `notices: false` a session starts without it, while the queue, its subcommands, and queue freezing behave exactly as they do with `notices: true`. Nothing else routes through this setting — validation failures, settings-load warnings, and recovery notices always report, because those describe a problem rather than restate a choice the user has already made. Use it when the experiment is a standing configuration rather than a trial, so the warning level keeps meaning something.
|
|
98
|
+
|
|
95
99
|
`rpc.enabled` accepts a boolean and defaults to `false`. When disabled, a valid managed-run start receives `RPC_DISABLED`; manual and restored Goals remain unchanged. A Settings-menu change applies immediately after its atomic save. Disabling rejects new starts but lets an already accepted run continue publishing its exact state and accept its exact cancellation until terminal, avoiding stranded work. Reload, replacement, and shutdown clear that in-memory ownership.
|
|
96
100
|
|
|
97
101
|
`continuationLimits` controls the runaway guards:
|
package/package.json
CHANGED
package/src/lifecycle.ts
CHANGED
|
@@ -106,7 +106,7 @@ export function registerGoalLifecycle(
|
|
|
106
106
|
if (settingsResult.kind === "invalid") {
|
|
107
107
|
notifyTerminal(ctx.ui, `pi-goal settings ignored: ${settingsResult.reason}. Using default settings.`, "warning");
|
|
108
108
|
}
|
|
109
|
-
if (runtime.settings.experimental.goals) {
|
|
109
|
+
if (runtime.settings.experimental.goals && runtime.settings.experimental.notices) {
|
|
110
110
|
notifyTerminal(ctx.ui, EXPERIMENTAL_GOALS_WARNING, "warning");
|
|
111
111
|
}
|
|
112
112
|
try {
|
package/src/settings-ui.ts
CHANGED
|
@@ -43,6 +43,7 @@ export async function showGoalSettings(
|
|
|
43
43
|
| "choose-no-progress"
|
|
44
44
|
| "set-visibility"
|
|
45
45
|
| "set-queue"
|
|
46
|
+
| "set-notices"
|
|
46
47
|
| "set-rpc";
|
|
47
48
|
const menu = defineMenu<undefined, Screen, Action, ExtensionCommandContext>({
|
|
48
49
|
start: invalid ? "invalid" : (options.initialScreen ?? "settings"),
|
|
@@ -82,6 +83,14 @@ export async function showGoalSettings(
|
|
|
82
83
|
values: ["Off", "Experimental"],
|
|
83
84
|
action: "set-queue",
|
|
84
85
|
},
|
|
86
|
+
{
|
|
87
|
+
id: "experimentalNotices",
|
|
88
|
+
label: "Experimental notice",
|
|
89
|
+
description: "Say once per session that experimental behavior and persisted state may change.",
|
|
90
|
+
currentValue: runtime.settings.experimental.notices ? "On" : "Off",
|
|
91
|
+
values: ["On", "Off"],
|
|
92
|
+
action: "set-notices",
|
|
93
|
+
},
|
|
85
94
|
{
|
|
86
95
|
id: "rpcEnabled",
|
|
87
96
|
label: "Managed run RPC",
|
|
@@ -104,6 +113,7 @@ export async function showGoalSettings(
|
|
|
104
113
|
`No-progress guard: ${formatNoProgressProtection(runtime.settings.continuationLimits.noProgressTurns)}`,
|
|
105
114
|
`Goal tools: ${visibilityLabel(runtime.settings.toolVisibility)}`,
|
|
106
115
|
`Ordered goal queue: ${runtime.settings.experimental.goals ? "Experimental" : "Off"}`,
|
|
116
|
+
`Experimental notice: ${runtime.settings.experimental.notices ? "On" : "Off"}`,
|
|
107
117
|
`Managed run RPC: ${runtime.settings.rpc.enabled ? "On" : "Off"}`,
|
|
108
118
|
],
|
|
109
119
|
hint: "back",
|
|
@@ -186,6 +196,24 @@ export async function showGoalSettings(
|
|
|
186
196
|
return { kind: "rejected" };
|
|
187
197
|
}
|
|
188
198
|
},
|
|
199
|
+
"set-notices": async ({ value }) => {
|
|
200
|
+
const enabled = value === "On";
|
|
201
|
+
if (enabled === runtime.settings.experimental.notices) return { kind: "stay" };
|
|
202
|
+
try {
|
|
203
|
+
const next = {
|
|
204
|
+
...structuredClone(runtime.settings),
|
|
205
|
+
experimental: { ...runtime.settings.experimental, notices: enabled },
|
|
206
|
+
} satisfies GoalSettings;
|
|
207
|
+
applyGoalSettings(runtime, next, ctx, {
|
|
208
|
+
save: (settings) => (options.save ?? saveGoalSettings)(settings, settingsPath),
|
|
209
|
+
});
|
|
210
|
+
notifyTerminal(ctx.ui, `Experimental notice: ${enabled ? "On" : "Off"}.`, "info");
|
|
211
|
+
return { kind: "stay" };
|
|
212
|
+
} catch (error) {
|
|
213
|
+
notifySettingsFailure(ctx, settingsPath, error);
|
|
214
|
+
return { kind: "rejected" };
|
|
215
|
+
}
|
|
216
|
+
},
|
|
189
217
|
"set-rpc": async ({ value }) => {
|
|
190
218
|
const enabled = value === "On";
|
|
191
219
|
if (enabled === runtime.settings.rpc.enabled) return { kind: "stay" };
|
|
@@ -459,7 +487,7 @@ async function nextQueueSettings(runtime: GoalRuntime, ctx: ExtensionCommandCont
|
|
|
459
487
|
}
|
|
460
488
|
return {
|
|
461
489
|
...structuredClone(runtime.settings),
|
|
462
|
-
experimental: { goals: enabled },
|
|
490
|
+
experimental: { ...runtime.settings.experimental, goals: enabled },
|
|
463
491
|
} satisfies GoalSettings;
|
|
464
492
|
}
|
|
465
493
|
|
package/src/settings.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface GoalSettings {
|
|
|
13
13
|
toolVisibility: GoalToolVisibility;
|
|
14
14
|
experimental: {
|
|
15
15
|
goals: boolean;
|
|
16
|
+
notices: boolean;
|
|
16
17
|
};
|
|
17
18
|
rpc: {
|
|
18
19
|
enabled: boolean;
|
|
@@ -32,7 +33,12 @@ export const DEFAULT_GOAL_SETTINGS: GoalSettings = {
|
|
|
32
33
|
// unfinished goal reveals them at startup. Set `"always"` to keep them
|
|
33
34
|
// resident.
|
|
34
35
|
toolVisibility: "after-first-goal",
|
|
35
|
-
|
|
36
|
+
// `notices` is on by default: a user who enabled an experiment should be told
|
|
37
|
+
// once per session that its persisted state may change. It exists so that
|
|
38
|
+
// acknowledgement is a setting rather than a repeated prompt — a warning the
|
|
39
|
+
// reader cannot accept stops carrying information, and the same notification
|
|
40
|
+
// level carries failures worth reading.
|
|
41
|
+
experimental: { goals: false, notices: true },
|
|
36
42
|
rpc: { enabled: false },
|
|
37
43
|
continuationLimits: { automaticTurns: 25, noProgressTurns: 3 },
|
|
38
44
|
};
|
|
@@ -70,6 +76,11 @@ export function normalizeGoalSettings(value: unknown): GoalSettings | undefined
|
|
|
70
76
|
? Reflect.get(experimentalValue, "goals")
|
|
71
77
|
: DEFAULT_GOAL_SETTINGS.experimental.goals;
|
|
72
78
|
if (typeof goals !== "boolean") return undefined;
|
|
79
|
+
const notices =
|
|
80
|
+
experimentalValue && Object.hasOwn(experimentalValue, "notices")
|
|
81
|
+
? Reflect.get(experimentalValue, "notices")
|
|
82
|
+
: DEFAULT_GOAL_SETTINGS.experimental.notices;
|
|
83
|
+
if (typeof notices !== "boolean") return undefined;
|
|
73
84
|
|
|
74
85
|
const rpcValue = Object.hasOwn(value, "rpc") ? Reflect.get(value, "rpc") : undefined;
|
|
75
86
|
if (rpcValue !== undefined && (typeof rpcValue !== "object" || rpcValue === null || Array.isArray(rpcValue))) {
|
|
@@ -108,7 +119,7 @@ export function normalizeGoalSettings(value: unknown): GoalSettings | undefined
|
|
|
108
119
|
|
|
109
120
|
return {
|
|
110
121
|
toolVisibility: toolVisibility as GoalToolVisibility,
|
|
111
|
-
experimental: { goals },
|
|
122
|
+
experimental: { goals, notices },
|
|
112
123
|
rpc: { enabled: rpcEnabled },
|
|
113
124
|
continuationLimits: { automaticTurns, noProgressTurns },
|
|
114
125
|
};
|
|
@@ -149,7 +160,11 @@ export function saveGoalSettings(
|
|
|
149
160
|
{
|
|
150
161
|
...raw,
|
|
151
162
|
toolVisibility: normalized.toolVisibility,
|
|
152
|
-
experimental: {
|
|
163
|
+
experimental: {
|
|
164
|
+
...experimental,
|
|
165
|
+
goals: normalized.experimental.goals,
|
|
166
|
+
notices: normalized.experimental.notices,
|
|
167
|
+
},
|
|
153
168
|
rpc: { ...rpc, enabled: normalized.rpc.enabled },
|
|
154
169
|
continuationLimits: {
|
|
155
170
|
...continuationLimits,
|