pi-goal-list-loop-audit 0.22.4 → 0.22.5
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/extensions/loops/goal.ts +47 -2
- package/package.json +1 -1
package/extensions/loops/goal.ts
CHANGED
|
@@ -578,6 +578,13 @@ async function cmdResume(ctx: ExtensionContext): Promise<void> {
|
|
|
578
578
|
? { tokensUsed: state.goal.usage.tokensUsed, tokensLimit: freshLimit }
|
|
579
579
|
: undefined;
|
|
580
580
|
updateGoal({ status: "active", pauseReason: undefined, pauseSuggestedAction: undefined, ...(usage ? { usage } : {}) }, ctx);
|
|
581
|
+
// v0.22.5: say what was resumed — with a non-empty list this also resumes
|
|
582
|
+
// the queue (the active goal IS the list's head item).
|
|
583
|
+
const queued = listQueue().length;
|
|
584
|
+
ctx.ui.notify(
|
|
585
|
+
`Resumed goal [${state.goal.id}]: ${state.goal.objective.replace(/\s+/g, " ").slice(0, 70)}${queued > 0 ? ` (+${queued} queued in the list — resuming the list's head)` : ""}`,
|
|
586
|
+
"info",
|
|
587
|
+
);
|
|
581
588
|
scheduleContinuation(ctx, true);
|
|
582
589
|
}
|
|
583
590
|
|
|
@@ -2225,21 +2232,55 @@ export default function (pi: ExtensionAPI): void {
|
|
|
2225
2232
|
// /list — the list (add|show|next|remove|clear)
|
|
2226
2233
|
// /loop — the metric loop (draft|start|status|stop)
|
|
2227
2234
|
// /glla — the settings UI (+ scriptable key=value)
|
|
2235
|
+
// v0.22.5: subcommand autocomplete for the /-menu.
|
|
2236
|
+
const completions = (items: Array<[string, string]>) => (prefix: string) =>
|
|
2237
|
+
items
|
|
2238
|
+
.filter(([value]) => value.startsWith(prefix))
|
|
2239
|
+
.map(([value, description]) => ({ value, label: value, description }));
|
|
2240
|
+
|
|
2228
2241
|
pi.registerCommand("goal", {
|
|
2229
2242
|
description: "Set/draft a goal, or /goal status|pause|resume|cancel|tweak <text>|archive|start <objective>. Objectives without a 'Done when:' clause are grilled into a contract first; include the clause or use /goal start to skip the interview and activate instantly.",
|
|
2243
|
+
getArgumentCompletions: completions([
|
|
2244
|
+
["start", "skip drafting — /goal start <objective> activates immediately"],
|
|
2245
|
+
["status", "show the active goal and its task list"],
|
|
2246
|
+
["pause", "pause the active goal"],
|
|
2247
|
+
["resume", "resume a paused goal (and the list, when items are queued)"],
|
|
2248
|
+
["cancel", "abort the active goal"],
|
|
2249
|
+
["tweak", "change the objective: /goal tweak <text>"],
|
|
2250
|
+
["archive", "list archived goals"],
|
|
2251
|
+
]),
|
|
2230
2252
|
handler: (args: string, ctx: ExtensionContext) => { rememberCtx(ctx); return cmdGoal(args, ctx); },
|
|
2231
2253
|
});
|
|
2232
2254
|
const settingsHandler = (args: string, ctx: ExtensionContext) => { rememberCtx(ctx); return cmdSettings(args, ctx); };
|
|
2233
2255
|
pi.registerCommand("glla", {
|
|
2234
2256
|
description: "Open the settings UI for goals, loops, lists, and the auditor. Scriptable form: /glla key=value · /glla project key=value",
|
|
2257
|
+
getArgumentCompletions: completions([
|
|
2258
|
+
["model=", "auditor model override: /glla model=provider/id"],
|
|
2259
|
+
["thinking=", "auditor thinking level: /glla thinking=high"],
|
|
2260
|
+
["notify=", "desktop push command: /glla notify='notify-send pi \"$1\"'"],
|
|
2261
|
+
["tokenlimit=", "per-goal token budget (0 = off): /glla tokenlimit=2000000"],
|
|
2262
|
+
["autoresume=", "on: auto-resume held goals/loops in fresh sessions"],
|
|
2263
|
+
["project", "write a project override: /glla project key=value"],
|
|
2264
|
+
]),
|
|
2235
2265
|
handler: settingsHandler,
|
|
2236
2266
|
});
|
|
2237
2267
|
pi.registerCommand("list", {
|
|
2238
2268
|
description: "Loop 2: the list of audited goals — order is the default, not the law. /list <describe tasks or name a plan file> (dumps get shaped into items, files import, 'Done when:' adds directly) | /list show | /list next [n] | /list remove <n> | /list clear",
|
|
2269
|
+
getArgumentCompletions: completions([
|
|
2270
|
+
["show", "display the queued items"],
|
|
2271
|
+
["next", "activate the next item (or /list next <n> for position n)"],
|
|
2272
|
+
["remove", "remove an item: /list remove <n>"],
|
|
2273
|
+
["clear", "empty the list"],
|
|
2274
|
+
]),
|
|
2239
2275
|
handler: (args: string, ctx: ExtensionContext) => { rememberCtx(ctx); return cmdList(args, ctx); },
|
|
2240
2276
|
});
|
|
2241
2277
|
pi.registerCommand("loop", {
|
|
2242
2278
|
description: "Loop 3: metric-driven process — it never completes. /loop <target> drafts the metric with you · /loop start \"<target>\" measure=\"<cmd>\" direction=min|max [window=5] [max=50] [time=<hours>] [tokens=<budget>] [branch=1] skips drafting · /loop status · /loop stop. 'Improve until X' is a /goal, not a loop.",
|
|
2279
|
+
getArgumentCompletions: completions([
|
|
2280
|
+
["start", "skip drafting: /loop start \"<target>\" measure=\"<cmd>\" direction=min|max [window=5] [max=50]"],
|
|
2281
|
+
["status", "show metric, iteration, best/last values, stall count"],
|
|
2282
|
+
["stop", "end the loop (keeps the best state)"],
|
|
2283
|
+
]),
|
|
2243
2284
|
handler: (args: string, ctx: ExtensionContext) => { rememberCtx(ctx); return cmdLoop(args, ctx); },
|
|
2244
2285
|
});
|
|
2245
2286
|
|
|
@@ -2309,13 +2350,17 @@ export default function (pi: ExtensionAPI): void {
|
|
|
2309
2350
|
);
|
|
2310
2351
|
scheduleContinuation(ctx, true);
|
|
2311
2352
|
} else {
|
|
2353
|
+
const queued = listQueue().length;
|
|
2354
|
+
const resumeHint = queued > 0
|
|
2355
|
+
? `/goal resume to continue (+${queued} queued in the list) · /glla autoresume=on to auto-resume in this project`
|
|
2356
|
+
: "/goal resume to continue · /glla autoresume=on to auto-resume in this project";
|
|
2312
2357
|
updateGoal({
|
|
2313
2358
|
status: "paused",
|
|
2314
2359
|
pauseReason: "restored in a fresh session — no work started",
|
|
2315
|
-
pauseSuggestedAction:
|
|
2360
|
+
pauseSuggestedAction: resumeHint,
|
|
2316
2361
|
}, ctx);
|
|
2317
2362
|
ctx.ui.notify(
|
|
2318
|
-
`Goal held on restore [${state.goal.id}]: ${state.goal.objective.slice(0, 70)} — /goal resume to continue.`,
|
|
2363
|
+
`Goal held on restore [${state.goal.id}]: ${state.goal.objective.slice(0, 70)}${queued > 0 ? ` (+${queued} queued in the list)` : ""} — /goal resume to continue.`,
|
|
2319
2364
|
"info",
|
|
2320
2365
|
);
|
|
2321
2366
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-goal-list-loop-audit",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.5",
|
|
4
4
|
"description": "Goal. Loop. Audit. Done. — a pi-coding-agent extension that supervises long-running work, with isolated auditor on each completion. Beat bamboozling by design: the auditor runs in a fresh session with no extensions, no skills, no editor — only the read tools needed to verify your goal.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "dracon",
|