@henryqw/pi-subagent 29.0.0 → 29.1.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/README.md CHANGED
@@ -25,6 +25,8 @@ Configure the profiles that your Roles use in `/task-models`. Direct writer term
25
25
 
26
26
  ## Use
27
27
 
28
+ Type `/subagent ` to see described choices for `roles`, `recover`, and `prune`. After `prune`, completion offers `cancel`. Completion keeps the full subcommand prefix.
29
+
28
30
  Ask Main: “Have a scout trace sign-in without editing files.” Main calls `delegate_task` and stays available until progress and results arrive.
29
31
 
30
32
  If Pi Goal is installed, it waits for live subagent results instead of adding empty continuation turns; see the [pending-result contract](./CONTEXT.md#pending-result-event-contract).
@@ -532,6 +532,19 @@ export function registerSubagentCommand(pi: ExtensionAPI, adapter: SubagentComma
532
532
  pi.on("session_shutdown", invalidatePrune);
533
533
  pi.on("session_tree", invalidatePrune);
534
534
  pi.registerCommand("subagent", {
535
+ getArgumentCompletions: (prefix) => {
536
+ const nested = /^(\s*prune )(\S*)$/.exec(prefix);
537
+ const items = nested ? [
538
+ { value: "cancel", description: "Stop the prune scan or cleanup; completed removals stay removed" },
539
+ ] : [
540
+ { value: "prune", description: "Scan leftover worktrees, or review a ready plan" },
541
+ { value: "recover", description: "Report interrupted isolated work to Main" },
542
+ { value: "roles", description: "List Roles, resources, and model routes" },
543
+ ];
544
+ const partial = nested?.[2] ?? prefix.trimStart();
545
+ return items.filter(({ value }) => value.startsWith(partial))
546
+ .map((item) => ({ ...item, label: item.value, value: prefix.slice(0, prefix.length - partial.length) + item.value }));
547
+ },
535
548
  description: "Inspect direct and isolated work, list Roles with /subagent roles, recover with /subagent recover, or scan/review leftovers with /subagent prune (stop with /subagent prune cancel)",
536
549
  handler: async (args, ctx) => {
537
550
  const command = args.trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-subagent",
3
- "version": "29.0.0",
3
+ "version": "29.1.0",
4
4
  "description": "Delegate bounded direct work or durable checked isolated task graphs to Pi roles.",
5
5
  "keywords": [
6
6
  "pi-package",