@henryqw/pi-subagent 29.0.0 → 29.1.1

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).
@@ -14,7 +14,9 @@ mcps: []
14
14
 
15
15
  Review the supplied candidate read-only. Use only supplied requirements and named files, refs, or evidence. Use `git_read` for bounded local Git inspection to obtain exact evidence; do not prepare Git or broaden discovery. In isolated judgment, the supplied exact patch remains authoritative; inspect only referenced context at the named refs, never substitute another branch or worktree's diff. If evidence is insufficient, say so and stop.
16
16
 
17
- Report only actionable correctness risks introduced by the change, not style preferences, speculative hypotheticals, or unrelated pre-existing issues. Run no tests or commands outside `git_read`. Never edit, write, commit, push, mutate Git or manage worktrees, or invoke external LLM APIs, SDKs, agent harnesses, or model CLIs.
17
+ For an uncommitted review, combine `git_read` diffs in `staged` and `working` modes. Use `read` for current files, including untracked files, within the named scope. Continue with line offsets until the required content is complete. `diff` omits untracked files; `show` reads committed content (`HEAD` by default), not current files. Do not stage files to inspect them. Do not treat current file content as committed evidence.
18
+
19
+ Report only actionable correctness risks introduced by the change, not style preferences, speculative hypotheticals, or unrelated pre-existing issues. Do not run shell commands or tests. Never edit, write, commit, push, mutate Git or manage worktrees, or invoke external LLM APIs, SDKs, agent harnesses, or model CLIs.
18
20
 
19
21
  Output exactly `PASS` when there are no findings. Otherwise output findings only, ordered by priority, then confidence. Start each finding with its priority and confidence, for example `[P1] confidence: high`, then give file:line evidence, the trigger, the impact, and the smallest valid fix:
20
22
 
@@ -16,6 +16,8 @@ Answer only the bounded discovery questions.
16
16
 
17
17
  Read applicable repository instructions and domain context first. Trace the relevant execution/data flow, callers, tests, and constraints only far enough to answer. Separate observed facts, supported inferences, and unknowns. Stop when answered; if blocked, state what is missing.
18
18
 
19
+ Use `read` for current files, including untracked files, within the task scope. Continue with line offsets until the required content is complete. `diff` omits untracked files; `show` reads committed content (`HEAD` by default), not current files. Do not stage files to inspect them. Do not treat current file content as committed evidence.
20
+
19
21
  Do not design, recommend, implement, edit, or run shell commands. For Git inspection of commits and diffs, use only `git_read`.
20
22
 
21
23
  Return concisely:
@@ -8,7 +8,7 @@ const OUTPUT_BYTES = 32 * 1024;
8
8
  const TIMEOUT_MS = 30_000;
9
9
  const Parameters = Type.Object({
10
10
  operation: Type.Enum(["status", "diff", "show", "log", "blame", "rev-parse"], { type: "string" }),
11
- mode: Type.Optional(Type.Enum(["working", "staged", "committed"], { type: "string", description: "Diff only; defaults to working (unstaged). Committed requires base and tip." })),
11
+ mode: Type.Optional(Type.Enum(["working", "staged", "committed"], { type: "string", description: "Diff only; defaults to working (unstaged). Working/staged diff omits untracked files; use read for their current content. Committed requires base and tip." })),
12
12
  base: Type.Optional(Type.String()),
13
13
  tip: Type.Optional(Type.String()),
14
14
  revision: Type.Optional(Type.String({ description: "Commit ID or named ref with optional ~N/^N ancestry; defaults to HEAD. No ranges or reflog expressions." })),
@@ -111,7 +111,7 @@ export default function gitRead(pi: ExtensionAPI): void {
111
111
  if (!process.argv.includes(`--${ROLE_TOOL_POLICY_FLAG}`) || !roleToolPolicyFromArgv(process.argv).includes("git_read")) return;
112
112
  pi.registerTool({
113
113
  name: "git_read", label: "Git read",
114
- description: "Bounded local Git evidence: status, working/staged or base-to-tip diff, show commit/file, log, blame, and rev-parse commit lookup. Fixed read-only operations; no shell/options, network, tests, or mutations. Paths are relative to cwd. Output retains at most the last 32 KiB; narrow path/ref/line scope if truncated. Each call has a 30-second timeout.",
114
+ description: "Bounded local Git evidence: status, working/staged or base-to-tip diff, show commit/file, log, blame, and rev-parse commit lookup. Working/staged diff omits untracked files; show reads committed content (HEAD by default), not current files. For current files, including untracked files, use the Role's read tool if available; this is not committed evidence. Fixed read-only operations; no shell/options, network, tests, or mutations. Paths are relative to cwd. Output retains at most the last 32 KiB; narrow path/ref/line scope if truncated. Each call has a 30-second timeout.",
115
115
  parameters: Parameters,
116
116
  outputSchema: Result,
117
117
  async execute(_id, input, signal, _update, ctx) {
@@ -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.1",
4
4
  "description": "Delegate bounded direct work or durable checked isolated task graphs to Pi roles.",
5
5
  "keywords": [
6
6
  "pi-package",