@howaboua/pi-subagent-review 0.2.21 → 0.2.24

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 CHANGED
@@ -1,5 +1,31 @@
1
1
  # @howaboua/pi-subagent-review
2
2
 
3
+ ## 0.2.24
4
+
5
+ - GPT-6 Sol and Luna now share Astra's Codex support.
6
+
7
+ - Removed `/terra`; use `/luna` instead.
8
+ - Added Responses Lite, non-destructive reasoning changes and terse context guidance for GPT-6 Sol and Luna.
9
+ - Image descriptions now use GPT-6 Luna directly instead of preferring older mini models.
10
+ - Cost estimates now use published GPT-6 Sol and Luna rates, including cache writes and long-context pricing.
11
+ - Agent, review, exploration, web search, voice summary and image-description defaults now use GPT-6; Luna replaces Terra defaults. GPT Switcher retains Luna's 472K context limit, while Codex Conversion defaults all three GPT-6 models to 272K.
12
+
13
+ ## 0.2.23
14
+
15
+ - Adapt Codex, Imagegen, review, and GipPity to Pi 0.87.
16
+
17
+ Codex Conversion, Imagegen, and Subagent Review require Pi 0.87.0 or newer.
18
+
19
+ - Fixed Codex prompt and tool updates rewriting the cached conversation prefix.
20
+ - Context reminders no longer start an extra checkpoint turn if the current run already saved a note in the current window.
21
+ - Fixed Imagegen recent-image selection ignoring context removals and replacements.
22
+ - Fixed review summaries and preface tracking ignoring context removals and replacements.
23
+ - Kept GipPity browser turn notifications from including full context previews and losing their fields to truncation.
24
+
25
+ ## 0.2.22
26
+
27
+ - Removed redundant developer-message wording while preserving review approval rules and nested AGENTS.md guidance.
28
+
3
29
  ## 0.2.21
4
30
 
5
31
  - Restore full extension prompt preparation when continuing into a new context window or starting review triage.
package/README.md CHANGED
@@ -4,6 +4,8 @@ Adds `/review`, which sends the current repository state to an isolated review s
4
4
 
5
5
  ## Install
6
6
 
7
+ Requires Pi 0.87.0 or newer.
8
+
7
9
  ```bash
8
10
  pi install npm:@howaboua/pi-subagent-review
9
11
  ```
@@ -22,9 +24,11 @@ Run `/reload` after installation if Pi is already open.
22
24
 
23
25
  Anything after `/review` becomes additional reviewer guidance. A leading `loop` starts review-loop mode and is removed from that guidance. In a JJ workspace, `stack=<ancestor revset>` selects a cumulative review base and is removed from that guidance; quote a revset containing spaces. Only one `stack=` argument is accepted.
24
26
 
25
- Findings are advisory. The command tells the main agent to verify and categorize them against the current implementation and session context rather than treating them as a TODO list.
27
+ Findings are advisory. The command tells the main agent to verify and categorize them against the current implementation and session context, then get your disposition before making changes.
28
+
29
+ `/review` waits for current agent work to finish, runs the reviewer, then sends its findings back to the main agent.
26
30
 
27
- With a compatible optional Pi Codex Responses adapter, the review preface and triage follow-up use developer-role policy. The preface keeps its existing display and deduplication; the follow-up appears as an extension developer message rather than user input. Raw reviewer findings remain lower-authority custom-message content. Without the API or active adapter, ordinary Pi delivery is unchanged.
31
+ With a compatible optional Pi Codex Responses adapter, the review preface uses developer-role policy. Raw findings and triage instructions remain lower-authority messages. Idle delivery starts a normal user-message turn.
28
32
 
29
33
  ## Review scope
30
34
 
@@ -44,11 +48,11 @@ On first load, the extension creates `~/.pi/agent/pi-subagent-review.json`, or t
44
48
 
45
49
  ```json
46
50
  {
47
- "model": "openai-codex/gpt-5.6-sol",
51
+ "model": "openai-codex/gpt-6-sol",
48
52
  "thinking": "medium",
49
53
  "summary": {
50
54
  "enabled": true,
51
- "model": "openai-codex/gpt-5.6-luna",
55
+ "model": "openai-codex/gpt-6-luna",
52
56
  "thinking": "low"
53
57
  }
54
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@howaboua/pi-subagent-review",
3
- "version": "0.2.21",
3
+ "version": "0.2.24",
4
4
  "description": "Pi extension that adds /review via an isolated review subagent.",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -40,9 +40,9 @@
40
40
  ]
41
41
  },
42
42
  "peerDependencies": {
43
- "@howaboua/pi-codex-conversion": ">=3.0.31",
43
+ "@howaboua/pi-codex-conversion": ">=3.0.37",
44
44
  "@earendil-works/pi-ai": ">=0.84.3",
45
- "@earendil-works/pi-coding-agent": ">=0.84.3",
45
+ "@earendil-works/pi-coding-agent": ">=0.87.0",
46
46
  "@earendil-works/pi-tui": ">=0.84.3"
47
47
  },
48
48
  "peerDependenciesMeta": {
@@ -59,9 +59,9 @@
59
59
  "format": "biome check --write ."
60
60
  },
61
61
  "devDependencies": {
62
- "@howaboua/pi-codex-conversion": "3.0.31",
63
- "@earendil-works/pi-ai": "0.85.1",
64
- "@earendil-works/pi-coding-agent": "0.85.1",
62
+ "@howaboua/pi-codex-conversion": "3.0.37",
63
+ "@earendil-works/pi-ai": "0.87.0",
64
+ "@earendil-works/pi-coding-agent": "0.87.0",
65
65
  "@types/node": "^26.2.0",
66
66
  "typescript": "^7.0.2",
67
67
  "@biomejs/biome": "^2.5.10"
package/src/constants.ts CHANGED
@@ -16,11 +16,11 @@ export const REVIEW_PROMPT_PATH = path.join(
16
16
  );
17
17
 
18
18
  export const DEFAULT_CONFIG = {
19
- model: "openai-codex/gpt-5.6-sol",
19
+ model: "openai-codex/gpt-6-sol",
20
20
  thinking: "medium",
21
21
  summary: {
22
22
  enabled: true,
23
- model: "openai-codex/gpt-5.6-luna",
23
+ model: "openai-codex/gpt-6-luna",
24
24
  thinking: "low",
25
25
  },
26
26
  } as const;
@@ -1,6 +1,6 @@
1
1
  import type {
2
2
  ExtensionCommandContext,
3
- SessionEntry,
3
+ ProjectedSessionEntry,
4
4
  } from "@earendil-works/pi-coding-agent";
5
5
  import { completeSummary } from "./summary-session.js";
6
6
  import type { ResolvedReviewConfig } from "./types.js";
@@ -23,20 +23,27 @@ function textFromContent(content: unknown): string {
23
23
  .join("\n");
24
24
  }
25
25
 
26
- function serializeEntry(entry: SessionEntry): string | undefined {
26
+ function serializeEntry({
27
+ sourceEntry: entry,
28
+ messages,
29
+ }: ProjectedSessionEntry): string | undefined {
27
30
  switch (entry.type) {
28
31
  case "message": {
29
- const message = entry.message as { role?: string; content?: unknown };
32
+ const message = messages[0];
33
+ if (!message || !("content" in message)) return undefined;
30
34
  const text = textFromContent(message.content).trim();
31
35
  if (!text) return undefined;
32
- return `## ${message.role || "message"} (${entry.timestamp})\n${text}`;
36
+ return `## ${message.role} (${entry.timestamp})\n${text}`;
33
37
  }
34
38
  case "branch_summary":
35
39
  return `## branch summary (${entry.timestamp})\n${entry.summary}`;
36
40
  case "compaction":
41
+ if (messages.length === 0) return undefined;
37
42
  return `## compaction summary (${entry.timestamp})\n${entry.summary}`;
38
43
  case "custom_message": {
39
- const text = textFromContent(entry.content).trim();
44
+ const message = messages[0];
45
+ if (message?.role !== "custom") return undefined;
46
+ const text = textFromContent(message.content).trim();
40
47
  if (!text) return undefined;
41
48
  return `## custom message: ${entry.customType} (${entry.timestamp})\n${text}`;
42
49
  }
@@ -49,7 +56,7 @@ function serializeEntry(entry: SessionEntry): string | undefined {
49
56
  }
50
57
  }
51
58
 
52
- function buildSummaryInput(entries: SessionEntry[]): string {
59
+ function buildSummaryInput(entries: ProjectedSessionEntry[]): string {
53
60
  return entries
54
61
  .map(serializeEntry)
55
62
  .filter((value): value is string => Boolean(value))
@@ -107,7 +114,7 @@ export async function buildReviewConversationSummary(
107
114
  if (!config.summary.enabled) return undefined;
108
115
 
109
116
  const conversation = buildSummaryInput(
110
- ctx.sessionManager.buildContextEntries(),
117
+ ctx.sessionManager.buildSessionProjection().entries,
111
118
  );
112
119
  if (!conversation.trim()) return undefined;
113
120
 
package/src/messages.ts CHANGED
@@ -19,21 +19,9 @@ export type ReviewDeveloperMessages = Partial<
19
19
  const REALTIME_VOICE_PROMPT_CHANNEL =
20
20
  "@howaboua/pi-codex-conversion/realtime-voice-prompt/v1";
21
21
  const REVIEW_LOOP_PREFACE_MESSAGE = [
22
- "A review subagent is about to inspect the repository in isolation. Its findings are advisory only and may be wrong, overbroad, or missing session context.",
23
- "",
24
- "Do not treat review findings as a TODO list. Do not implement review findings automatically.",
25
- "",
26
- "When findings return, compare each one against the user’s actual request, prior conversation, accepted decisions, intentional tradeoffs from this session, and the current implementation.",
27
- "",
28
- "Default response: verify and triage, not code.",
29
- "",
30
- "For each verified finding, recommend one of:",
31
- "",
32
- "- address: concrete, in-scope, necessary for the current implementation",
33
- "- defer: plausible but outside the current work",
34
- "- skip: stylistic, speculative, preference-based, overengineered, or not useful",
35
- "",
36
- "After triage, obtain the user’s disposition. If a finding is not obviously required for the current implementation, recommend deferring or skipping it.",
22
+ "Review findings are advisory and may be wrong or lack session context. Verify each against the user's request, prior decisions, tradeoffs and current state.",
23
+ "Recommend address (necessary and in scope), defer (outside current work), or skip (stylistic, speculative or not useful).",
24
+ "Obtain the user's disposition before making changes.",
37
25
  ].join("\n");
38
26
 
39
27
  const REVIEW_SUMMARY_STARTED_PROMPT =
@@ -41,9 +29,9 @@ const REVIEW_SUMMARY_STARTED_PROMPT =
41
29
  const REVIEW_FINDINGS_READY_PROMPT =
42
30
  "The isolated code review has finished, and its findings have been sent to the main agent for triage. Announce this briefly in your natural voice. When the main agent responds, continue with its substantive triage without repeating this status.";
43
31
  const REVIEW_FINDINGS_FOLLOW_UP = [
44
- "Treat the findings above as advisory and unverified. Read the cited files and trace the relevant paths before deciding whether each finding is true, necessary, and in scope. Compare them against the user’s request, prior decisions, and current implementation. Do not merely summarize the reviewer output.",
32
+ "Treat the findings above as advisory and unverified. Read the cited files and trace the relevant paths before deciding whether each finding is true, necessary, and in scope. Compare them against the user’s request, prior decisions, and current state. Do not merely summarize the reviewer output.",
45
33
  "",
46
- "Before changing code, get the user’s disposition on the verified findings using an available ask/questions tool, or a normal message if none is available. After dispositions are agreed, do not summarize them again: start the agreed work. If any remain ambiguous, complete the clear, simple, non-blocking agreed fixes first, then return to the ambiguous findings.",
34
+ "Before making changes, get the user’s disposition on the verified findings using an available ask/questions tool, or a normal message if none is available. After dispositions are agreed, do not summarize them again: start the agreed work. If any remain ambiguous, complete the clear, simple, non-blocking agreed fixes first, then return to the ambiguous findings.",
47
35
  ].join("\n");
48
36
 
49
37
  function announceReviewStatus(
@@ -75,12 +63,16 @@ function getReviewPrefaceMessageId(
75
63
  ctx: ExtensionCommandContext,
76
64
  ): string | undefined {
77
65
  let messageId: string | undefined;
78
- for (const entry of ctx.sessionManager.buildContextEntries()) {
66
+ for (const {
67
+ sourceEntry,
68
+ messages,
69
+ } of ctx.sessionManager.buildSessionProjection().entries) {
79
70
  if (
80
- entry.type === "custom_message" &&
81
- entry.customType === REVIEW_PREFACE_MESSAGE_TYPE
71
+ sourceEntry.type === "custom_message" &&
72
+ sourceEntry.customType === REVIEW_PREFACE_MESSAGE_TYPE &&
73
+ messages.length > 0
82
74
  ) {
83
- messageId = entry.id;
75
+ messageId = sourceEntry.id;
84
76
  }
85
77
  }
86
78
  return messageId;