@zephyrdeng/pi-review 0.14.0 → 0.15.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.
Files changed (85) hide show
  1. package/README.md +77 -5
  2. package/README.zh-CN.md +72 -3
  3. package/dist/args.d.ts.map +1 -1
  4. package/dist/args.js +22 -0
  5. package/dist/args.js.map +1 -1
  6. package/dist/child-isolation.test.js +25 -7
  7. package/dist/child-isolation.test.js.map +1 -1
  8. package/dist/classify.d.ts +36 -0
  9. package/dist/classify.d.ts.map +1 -0
  10. package/dist/classify.js +171 -0
  11. package/dist/classify.js.map +1 -0
  12. package/dist/classify.test.d.ts +2 -0
  13. package/dist/classify.test.d.ts.map +1 -0
  14. package/dist/classify.test.js +76 -0
  15. package/dist/classify.test.js.map +1 -0
  16. package/dist/cli.js +41 -1
  17. package/dist/cli.js.map +1 -1
  18. package/dist/index.d.ts +9 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +5 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/jev.d.ts +100 -0
  23. package/dist/jev.d.ts.map +1 -0
  24. package/dist/jev.js +250 -0
  25. package/dist/jev.js.map +1 -0
  26. package/dist/jev.test.d.ts +2 -0
  27. package/dist/jev.test.d.ts.map +1 -0
  28. package/dist/jev.test.js +154 -0
  29. package/dist/jev.test.js.map +1 -0
  30. package/dist/loop.d.ts +18 -1
  31. package/dist/loop.d.ts.map +1 -1
  32. package/dist/loop.js +39 -0
  33. package/dist/loop.js.map +1 -1
  34. package/dist/loop.test.js +36 -0
  35. package/dist/loop.test.js.map +1 -1
  36. package/dist/matcher.d.ts +16 -3
  37. package/dist/matcher.d.ts.map +1 -1
  38. package/dist/matcher.js +31 -12
  39. package/dist/matcher.js.map +1 -1
  40. package/dist/matcher.test.js +30 -6
  41. package/dist/matcher.test.js.map +1 -1
  42. package/dist/meta-footer.d.ts.map +1 -1
  43. package/dist/meta-footer.js +6 -2
  44. package/dist/meta-footer.js.map +1 -1
  45. package/dist/panel-cli.test.js +145 -3
  46. package/dist/panel-cli.test.js.map +1 -1
  47. package/dist/panel.d.ts.map +1 -1
  48. package/dist/panel.js +41 -4
  49. package/dist/panel.js.map +1 -1
  50. package/dist/pi-config.d.ts +61 -0
  51. package/dist/pi-config.d.ts.map +1 -0
  52. package/dist/pi-config.js +95 -0
  53. package/dist/pi-config.js.map +1 -0
  54. package/dist/pi-config.test.d.ts +2 -0
  55. package/dist/pi-config.test.d.ts.map +1 -0
  56. package/dist/pi-config.test.js +78 -0
  57. package/dist/pi-config.test.js.map +1 -0
  58. package/dist/review.d.ts +14 -3
  59. package/dist/review.d.ts.map +1 -1
  60. package/dist/review.js +22 -11
  61. package/dist/review.js.map +1 -1
  62. package/dist/round-compare.d.ts +23 -0
  63. package/dist/round-compare.d.ts.map +1 -0
  64. package/dist/round-compare.js +45 -0
  65. package/dist/round-compare.js.map +1 -0
  66. package/dist/round-compare.test.d.ts +2 -0
  67. package/dist/round-compare.test.d.ts.map +1 -0
  68. package/dist/round-compare.test.js +63 -0
  69. package/dist/round-compare.test.js.map +1 -0
  70. package/dist/skill-protocol.test.js +13 -0
  71. package/dist/skill-protocol.test.js.map +1 -1
  72. package/dist/types.d.ts +17 -1
  73. package/dist/types.d.ts.map +1 -1
  74. package/dist/types.js.map +1 -1
  75. package/extensions/review.test.ts +8 -0
  76. package/extensions/review.ts +11 -0
  77. package/extensions/rv-config.test.ts +90 -0
  78. package/extensions/rv-config.ts +166 -0
  79. package/extensions/rv-prompts.ts +1 -1
  80. package/package.json +1 -1
  81. package/resources/providers/orcarouter.json +28 -0
  82. package/resources/providers/orcarouter.toml +11 -0
  83. package/skills/pi-review/SKILL.md +28 -2
  84. package/skills/pi-review/references/codex-tools.md +2 -0
  85. package/skills/pi-review/references/model-selection.md +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,2EA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
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,SAAS,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,SAAS,CAAU,CAAC;AAGlG,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,CAAU,CAAC;AAmI5F;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAU,CAAC;AA8C9C,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAU,CAAC;AActF,mEAAmE;AACnE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAE/B,yDAAyD;AACzD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAU,CAAC;AAE7E,mEAAmE;AACnE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC,iFAAiF;AACjF,MAAM,CAAC,MAAM,mCAAmC,GAAG,GAAG,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,SAAS,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,SAAS,CAAU,CAAC;AAGlG,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,CAAU,CAAC;AAuI5F;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAU,CAAC;AA8C9C,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAU,CAAC;AActF,mEAAmE;AACnE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC;AAE/B,yDAAyD;AACzD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAU,CAAC;AAE7E,mEAAmE;AACnE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAEzC,iFAAiF;AACjF,MAAM,CAAC,MAAM,mCAAmC,GAAG,GAAG,CAAC"}
@@ -3,6 +3,7 @@ import { test } from "vitest";
3
3
  import piReviewExtension from "./review.js";
4
4
 
5
5
  type CommandConfig = {
6
+ description?: string;
6
7
  getArgumentCompletions?: (prefix: string) => Array<{ value: string; label: string }> | null;
7
8
  };
8
9
 
@@ -50,6 +51,13 @@ test("extension completion fallback never replaces an entered target when the ca
50
51
  assert.equal(complete!("review auth behavior"), null);
51
52
  });
52
53
 
54
+ test("extension registers the read-only /rv-config command", () => {
55
+ const { commands } = registeredExtension();
56
+ const config = commands.get("rv-config");
57
+ assert.ok(config);
58
+ assert.match(config!.description ?? "", /effective pi-review configuration/);
59
+ });
60
+
53
61
  test("a new session with an empty catalog does not reuse models captured by a previous session", () => {
54
62
  const { commands, sessionStart } = registeredExtension();
55
63
  const complete = commands.get("rv")?.getArgumentCompletions;
@@ -19,6 +19,7 @@ import {
19
19
  } from "./rv-interactive.js";
20
20
  import { RvModelPickerComponent, type ModelPickerResult } from "./rv-model-picker.js";
21
21
  import { registerPanelReviewTool } from "./panel-tool.js";
22
+ import { buildRvConfigLines } from "./rv-config.js";
22
23
 
23
24
  /**
24
25
  * Captured at `session_start` so the synchronous-ish `getArgumentCompletions`
@@ -276,4 +277,14 @@ export default function piReviewExtension(pi: ExtensionAPI) {
276
277
  getArgumentCompletions: (prefix) => argumentCompletions(prefix, "models"),
277
278
  handler: async (_rawArgs, ctx) => handleRvCommand("models", "", ctx),
278
279
  });
280
+
281
+ pi.registerCommand("rv-config", {
282
+ description:
283
+ "Show effective pi-review configuration (config file ~/.pi/pi-review/config.json, env overrides, resolved paths). Usage: /rv-config",
284
+ handler: async (_rawArgs, ctx) => {
285
+ // Direct UI notification, not a user message: no LLM turn, no local
286
+ // paths entering the model context (F3).
287
+ ctx.ui.notify(buildRvConfigLines({ locale: localeForHandler(ctx) }).join("\n"), "info");
288
+ },
289
+ });
279
290
  }
@@ -0,0 +1,90 @@
1
+ import assert from "node:assert/strict";
2
+ import { test } from "vitest";
3
+ import { buildRvConfigLines } from "./rv-config.js";
4
+
5
+ const resolved = {
6
+ piBin: "pi",
7
+ reviewHome: "/pkg/resources",
8
+ presetsFile: "/pkg/resources/review-presets.json",
9
+ panelPresetsFile: "/pkg/resources/panel-presets.json",
10
+ systemPromptFile: "/pkg/resources/system-prompt.md",
11
+ sessionsRoot: "/home/u/.pi/pi-review/sessions",
12
+ };
13
+
14
+ test("rv-config shows the default decision when no config and no env", () => {
15
+ const lines = buildRvConfigLines({
16
+ locale: "en",
17
+ env: {},
18
+ configPath: "/home/u/.pi/pi-review/config.json",
19
+ readConfig: () => null,
20
+ resolved,
21
+ });
22
+ const text = lines.join("\n");
23
+ assert.match(text, /childExtensions: false \(default\)/);
24
+ assert.match(text, /config file: \/home\/u\/\.pi\/pi-review\/config\.json/);
25
+ assert.match(text, /\(missing — using defaults\)/);
26
+ assert.match(text, /piBin: pi/);
27
+ assert.match(text, /sessionsRoot: \/home\/u\/\.pi\/pi-review\/sessions/);
28
+ });
29
+
30
+ test("rv-config shows the config file as the source when childExtensions is set", () => {
31
+ const lines = buildRvConfigLines({
32
+ locale: "en",
33
+ env: {},
34
+ configPath: "/home/u/.pi/pi-review/config.json",
35
+ readConfig: () => '{"childExtensions": true}',
36
+ resolved,
37
+ });
38
+ assert.match(lines.join("\n"), /childExtensions: true \(config file\)/);
39
+ });
40
+
41
+ test("rv-config shows env as the source and wins over the config file", () => {
42
+ const lines = buildRvConfigLines({
43
+ locale: "en",
44
+ env: { PI_REVIEW_CHILD_EXTENSIONS: "0" },
45
+ configPath: "/home/u/.pi/pi-review/config.json",
46
+ readConfig: () => '{"childExtensions": true}',
47
+ resolved,
48
+ });
49
+ assert.match(lines.join("\n"), /childExtensions: false \(env override\)/);
50
+ });
51
+
52
+ test("rv-config warns about a leniently ignored value and falls back", () => {
53
+ const lines = buildRvConfigLines({
54
+ locale: "en",
55
+ env: {},
56
+ configPath: "/home/u/.pi/pi-review/config.json",
57
+ readConfig: () => '{"childExtensions": "yes"}',
58
+ resolved,
59
+ });
60
+ const text = lines.join("\n");
61
+ assert.match(text, /config warning: .*childExtensions/);
62
+ assert.match(text, /childExtensions: false \(default\)/);
63
+ });
64
+
65
+ test("rv-config warns about invalid JSON without failing", () => {
66
+ const lines = buildRvConfigLines({
67
+ locale: "en",
68
+ env: {},
69
+ configPath: "/home/u/.pi/pi-review/config.json",
70
+ readConfig: () => "not json",
71
+ resolved,
72
+ });
73
+ const text = lines.join("\n");
74
+ assert.match(text, /config warning: .*not valid JSON/);
75
+ assert.match(text, /childExtensions: false \(default\)/);
76
+ });
77
+
78
+ test("rv-config renders Chinese labels for zh locale", () => {
79
+ const lines = buildRvConfigLines({
80
+ locale: "zh",
81
+ env: {},
82
+ configPath: "/home/u/.pi/pi-review/config.json",
83
+ readConfig: () => '{"childExtensions": true}',
84
+ resolved,
85
+ });
86
+ const text = lines.join("\n");
87
+ assert.match(text, /Pi Review 配置/);
88
+ assert.match(text, /childExtensions: true \(配置文件\)/);
89
+ assert.match(text, /生效环境/);
90
+ });
@@ -0,0 +1,166 @@
1
+ /**
2
+ * /rv-config: show the effective pi-review configuration — the persistent
3
+ * config file (~/.pi/pi-review/config.json), per-process env overrides, and
4
+ * the resolved paths the CLI will use. Read-only, plain text (no markdown),
5
+ * locale-aware like the other /rv* commands.
6
+ */
7
+
8
+ import {
9
+ configFilePath,
10
+ loadReviewConfigFile,
11
+ parseReviewConfig,
12
+ resolveChildExtensions,
13
+ resolveConfig,
14
+ resolveJev,
15
+ hasJevApiKey,
16
+ } from "@zephyrdeng/pi-review";
17
+ import type { PiReviewConfig } from "@zephyrdeng/pi-review";
18
+ import type { RvLocale } from "./rv-locale.js";
19
+
20
+ export interface RvConfigViewInput {
21
+ locale: RvLocale;
22
+ env?: NodeJS.ProcessEnv;
23
+ /** Override the config file path (tests). */
24
+ configPath?: string;
25
+ /** Override config file content (tests); null means the file is missing. */
26
+ readConfig?: (file: string) => string | null;
27
+ /** Override the resolved environment keys (tests). */
28
+ resolved?: ReturnType<typeof resolveConfig>;
29
+ }
30
+
31
+ type Strings = {
32
+ header: string;
33
+ childExtensions: string;
34
+ jev: string;
35
+ jevKeyPresent: string;
36
+ jevKeyMissing: string;
37
+ configFileLabel: string;
38
+ configFileMissing: string;
39
+ envSection: string;
40
+ sourceDefault: string;
41
+ sourceConfig: string;
42
+ sourceEnv: string;
43
+ warnFile: (reason: string) => string;
44
+ piBin: string;
45
+ reviewHome: string;
46
+ presetsFile: string;
47
+ panelPresetsFile: string;
48
+ systemPromptFile: string;
49
+ sessionsRoot: string;
50
+ };
51
+
52
+ const STRINGS: Record<RvLocale, Strings> = {
53
+ en: {
54
+ header: "Pi Review config",
55
+ childExtensions:
56
+ "Load host Pi extensions in review children so providers registered only by extensions (e.g. px:anthropic, zenmux) are usable; false keeps children isolated with --no-extensions (issue #8). Override one run: PI_REVIEW_CHILD_EXTENSIONS=1 or =0.",
57
+ jev: "Enhancement mode: route typed decision actions (panel consensus adjudication) to TypeSafe Jev instead of a review-only Pi child. An explicit --consensus-model keeps the Pi adjudicator. Override one run: PI_REVIEW_JEV=1 or =0.",
58
+ jevKeyPresent: "TYPESAFE_API_KEY: present",
59
+ jevKeyMissing: "TYPESAFE_API_KEY: missing — Jev stays off until a key is set",
60
+ configFileLabel: "config file",
61
+ configFileMissing: "(missing — using defaults)",
62
+ envSection: "Resolved environment",
63
+ sourceDefault: "default",
64
+ sourceConfig: "config file",
65
+ sourceEnv: "env override",
66
+ warnFile: (reason) => `config warning: ${reason} — using defaults for that key`,
67
+ piBin: "Pi executable used to spawn review children.",
68
+ reviewHome: "Directory holding the default presets and system prompt.",
69
+ presetsFile: "Review mode presets (code / plan / challenge).",
70
+ panelPresetsFile: "Named panel presets (e.g. code-experts).",
71
+ systemPromptFile: "Extra system prompt appended to every review child.",
72
+ sessionsRoot: "Persisted --keep-session review sessions.",
73
+ },
74
+ zh: {
75
+ header: "Pi Review 配置",
76
+ childExtensions:
77
+ "是否让评审子进程加载宿主 Pi 扩展,以使用仅由扩展注册的 provider(如 px:anthropic、zenmux);false 表示隔离运行(--no-extensions,issue #8)。单次覆盖:PI_REVIEW_CHILD_EXTENSIONS=1 或 =0。",
78
+ jev: "增强模式:把 typed 决策动作(面板共识裁决)交给 TypeSafe Jev,而不是一个 review-only 的 Pi 子进程。显式 --consensus-model 时仍走 Pi 裁决器。单次覆盖:PI_REVIEW_JEV=1 或 =0。",
79
+ jevKeyPresent: "TYPESAFE_API_KEY:已设置",
80
+ jevKeyMissing: "TYPESAFE_API_KEY:未设置——设置 key 前 Jev 保持关闭",
81
+ configFileLabel: "配置文件",
82
+ configFileMissing: "(不存在——使用默认值)",
83
+ envSection: "生效环境",
84
+ sourceDefault: "默认",
85
+ sourceConfig: "配置文件",
86
+ sourceEnv: "env 覆盖",
87
+ warnFile: (reason) => `配置警告:${reason}——该键按未设置处理`,
88
+ piBin: "用于启动评审子进程的 Pi 可执行文件。",
89
+ reviewHome: "存放默认 presets 与系统提示词的目录。",
90
+ presetsFile: "评审模式预设(code / plan / challenge)。",
91
+ panelPresetsFile: "命名评审面板预设(如 code-experts)。",
92
+ systemPromptFile: "附加到每个评审子进程的系统提示词。",
93
+ sessionsRoot: "持久化 --keep-session 评审会话的目录。",
94
+ },
95
+ };
96
+
97
+ function warnNotes(s: Strings, warnings: string[]): string[] {
98
+ return warnings.map((w) => s.warnFile(w));
99
+ }
100
+
101
+ /**
102
+ * Build the /rv-config display lines. Pure apart from reading the config file
103
+ * (inject readConfig for tests; null means the file is missing).
104
+ *
105
+ * The config is advisory and lenient: nothing here can fail the CLI, so the
106
+ * view and the CLI always agree — warnings are displayed, values fall back.
107
+ */
108
+ export function buildRvConfigLines(input: RvConfigViewInput): string[] {
109
+ const s = STRINGS[input.locale];
110
+ const env = input.env ?? process.env;
111
+ const file = input.configPath ?? configFilePath(env);
112
+
113
+ let cfg: PiReviewConfig = {};
114
+ const configNotes: string[] = [];
115
+ if (input.readConfig) {
116
+ let text: string | null;
117
+ try {
118
+ text = input.readConfig(file);
119
+ } catch (error) {
120
+ configNotes.push(s.warnFile(String((error as Error).message)));
121
+ text = null;
122
+ }
123
+ if (text !== null) {
124
+ const load = parseReviewConfig(text);
125
+ cfg = load.config;
126
+ configNotes.push(...warnNotes(s, load.warnings));
127
+ } else if (configNotes.length === 0) {
128
+ configNotes.push(s.configFileMissing);
129
+ }
130
+ } else {
131
+ const load = loadReviewConfigFile(file);
132
+ cfg = load.config;
133
+ configNotes.push(...warnNotes(s, load.warnings));
134
+ }
135
+
136
+ const decision = resolveChildExtensions(env, cfg);
137
+ const sourceLabel =
138
+ decision.source === "env" ? s.sourceEnv : decision.source === "config" ? s.sourceConfig : s.sourceDefault;
139
+ const jevDecision = resolveJev(env, cfg);
140
+ const jevSourceLabel =
141
+ jevDecision.source === "env" ? s.sourceEnv : jevDecision.source === "config" ? s.sourceConfig : s.sourceDefault;
142
+
143
+ const resolved = input.resolved ?? resolveConfig();
144
+ const line = (key: string, value: string, description: string): string => {
145
+ const head = `${key}: ${value}`;
146
+ return [head, ` ${description}`].join("\n");
147
+ };
148
+
149
+ const lines: string[] = [];
150
+ lines.push(s.header);
151
+ lines.push(`childExtensions: ${decision.enabled} (${sourceLabel})`);
152
+ lines.push(` ${s.childExtensions}`);
153
+ lines.push(`jev: ${jevDecision.enabled} (${jevSourceLabel}) — ${hasJevApiKey(env) ? s.jevKeyPresent : s.jevKeyMissing}`);
154
+ lines.push(` ${s.jev}`);
155
+ lines.push(`${s.configFileLabel}: ${file}`);
156
+ for (const note of configNotes) lines.push(` ${note}`);
157
+ lines.push("");
158
+ lines.push(s.envSection);
159
+ lines.push(line("piBin", resolved.piBin, s.piBin));
160
+ lines.push(line("reviewHome", resolved.reviewHome, s.reviewHome));
161
+ lines.push(line("presetsFile", resolved.presetsFile, s.presetsFile));
162
+ lines.push(line("panelPresetsFile", resolved.panelPresetsFile, s.panelPresetsFile));
163
+ lines.push(line("systemPromptFile", resolved.systemPromptFile, s.systemPromptFile));
164
+ lines.push(line("sessionsRoot", resolved.sessionsRoot, s.sessionsRoot));
165
+ return lines;
166
+ }
@@ -532,7 +532,7 @@ function piHostRules(strategy: RvStrategy): string {
532
532
  return [
533
533
  "Follow the pi-review skill.",
534
534
  "Host: Pi interactive session (/rv*).",
535
- "Slash commands select strategy only: /rv = panel review, /rv-loop = loop closeout, /rv-models = model catalog.",
535
+ "Slash commands select strategy only: /rv = panel review, /rv-loop = loop closeout, /rv-models = model catalog, /rv-config = effective configuration.",
536
536
  "Everything after the command is a natural-language review request. Path mentions like @src are fine as text.",
537
537
  "Do not expand directory targets into multi-file lists. Strategy matching beyond the slash command (mode defaults, model choice, panel preset, path-vs-file handling) lives in the pi-review skill and CLI.",
538
538
  strategy === "panel"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zephyrdeng/pi-review",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "Isolated AI-powered code and plan reviews from the command line",
5
5
  "type": "module",
6
6
  "author": "ZephyrDeng <zephyrTang@aliyun.com>",
@@ -0,0 +1,28 @@
1
+ {
2
+ "providers": {
3
+ "orcarouter": {
4
+ "baseUrl": "https://api.orcarouter.ai/v1",
5
+ "api": "openai-completions",
6
+ "apiKey": "ORCA_KEY",
7
+ "signupUrl": "https://www.orcarouter.ai/ref/ref_07ca74b3e41670e5ff36",
8
+ "models": [
9
+ {
10
+ "id": "orcarouter/auto",
11
+ "name": "OrcaRouter Auto",
12
+ "reasoning": false,
13
+ "input": ["text"],
14
+ "contextWindow": 200000,
15
+ "maxTokens": 8192
16
+ },
17
+ {
18
+ "id": "anthropic/claude-sonnet-4.6",
19
+ "name": "Claude Sonnet 4.6",
20
+ "reasoning": true,
21
+ "input": ["text"],
22
+ "contextWindow": 200000,
23
+ "maxTokens": 8192
24
+ }
25
+ ]
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,11 @@
1
+ # OrcaRouter provider configuration (Codex CLI / opencode-style TOML).
2
+ # Sign up & get a key: https://www.orcarouter.ai/ref/ref_07ca74b3e41670e5ff36
3
+
4
+ model = "orcarouter/auto"
5
+ model_provider = "orcarouter"
6
+
7
+ [model_providers.orcarouter]
8
+ name = "OrcaRouter"
9
+ base_url = "https://api.orcarouter.ai/v1"
10
+ wire_api = "responses"
11
+ env_key = "ORCA_KEY"
@@ -21,6 +21,28 @@ If `pi-review` is not on PATH but this skill came from the Pi package, use the p
21
21
  node ../../bin/pi-review.js --help
22
22
  ```
23
23
 
24
+ ## Registered providers (explicit opt-in)
25
+
26
+ Review children stay isolated (`--no-extensions`) unless the persistent review config enables host extensions. Enable them only when the review needs an extension-registered provider (e.g. `px:anthropic`, `zenmux`) — and only with explicit user acceptance:
27
+
28
+ ```json
29
+ // ~/.pi/pi-review/config.json
30
+ { "childExtensions": true }
31
+ ```
32
+
33
+ Before writing, tell the user the config is machine-level: every later pi-review on this machine (including bare CLI) inherits it. Write it only on acceptance; when editing an existing file, keep every unknown key and never overwrite a value the user set (invalid JSON — stop, do not overwrite). Verify on Pi with `/rv-config`, elsewhere with `cat ~/.pi/pi-review/config.json`. Isolate one run with `PI_REVIEW_CHILD_EXTENSIONS=0` (env overrides config). If a child exits with stale extension ctx after dispose/reload (issue #8), retry that one run with `PI_REVIEW_CHILD_EXTENSIONS=0`.
34
+
35
+ ### Setting config via the agent (preferred path)
36
+
37
+ There is no `/rv-config set` command — the agent is the config editor. When the user asks to change a pi-review setting, edit `~/.pi/pi-review/config.json` directly, with these rules:
38
+
39
+ - **Keys** — known schema today: `childExtensions` (bool), `jev` (bool). Keep every unknown key untouched (forward compat). Set only what the user asked for.
40
+ - **Desensitization (脱敏)** — the config file holds *flags only, never secrets*:
41
+ - `TYPESAFE_API_KEY` and any other API keys are **environment variables by design**; never write them into `config.json`, and never echo a key's value back to the user or into logs/docs. Show key state as set/unset only.
42
+ - Never commit `~/.pi/pi-review/config.json` (machine-level, may reflect personal setup) into any repo.
43
+ - After editing, confirm with `/rv-config` (Pi) or `cat` + `jq` (elsewhere) — display values, not file dumps, when the conversation is logged.
44
+ - **Sequence** — read the file (it may not exist), validate JSON, apply the one change, write back pretty-printed, verify with `/rv-config`, and state the machine-level consequence in one sentence.
45
+
24
46
  ## Default workflow by host
25
47
 
26
48
  | Host | How to run `pi-review` |
@@ -51,6 +73,7 @@ Slash commands select **strategy only**. Everything after the command is a **nat
51
73
  | `/rv <natural-language target>` | Panel review via native **Pi Review Panel** (`pi_review` API tool); preset `code-experts` unless `--reviewers`/`--panel` say otherwise |
52
74
  | `/rv-loop <natural-language target>` | Loop closeout via shell `pi-review loop`; host fix point `--max-rounds 1` by default |
53
75
  | `/rv-models` | Model catalog only |
76
+ | `/rv-config` | Show the effective configuration (config file, env overrides, resolved paths) |
54
77
  | `/rv --continue <handle> [text]` | Continue a kept single-review session |
55
78
 
56
79
  - Pass the user target **as given**. Path mentions like `@src` or `@src/foo.ts` are fine as text. Do **not** expand directories into multi-file lists in the parent agent.
@@ -106,14 +129,16 @@ Use this protocol when the host is closing out implementation work and may edit
106
129
  - **stop-and-escalate** — ambiguous intent, architectural expansion, unsafe migration, blocked tooling, or anything requiring a human decision; stop rather than guess.
107
130
  - A rejected finding must be intentional and recorded with its rationale in the final report. Never silently ignore it.
108
131
  - Check sibling instances of the same bug class only inside the frozen task/PR scope. Do not turn the check into a repository-wide refactor.
132
+ - When `TYPESAFE_API_KEY` is available, `pi-review classify --baseline <text|@file> [--meta <path>]` turns this step into a typed Jev decision per finding (advisory; the host still owns the final call).
109
133
  6. **Fix only in-scope blockers in the host.** Never ask the child review session to implement fixes. After each host patch, rerun the narrowest relevant proof (focused test, typecheck, lint, or reproduction) before re-reviewing.
110
134
  7. **Re-review until a stop condition:**
111
135
  - `clean` → clean goal met; proceed to final proof and closeout.
112
136
  - `has_findings` → classify, fix accepted in-scope blockers, and re-invoke within the agreed host-cycle budget.
113
137
  - `needs_human` or `blocked` → stop early and escalate with the review history.
114
138
  - budget exhausted → report remaining findings and ask for a decision; do not loop indefinitely.
139
+ - `non_converging` → two consecutive rounds produced an identical actionable set; the tree is frozen between rounds, so more rounds are dice rolls. Fix in the host and re-invoke; do not re-roll.
115
140
  - With `--until clean`, the host owns the fix→re-review cycle until clean or hard budget. Advisories alone do not block clean; confirmed actionable findings do.
116
- 8. **Detect non-convergence.** After two non-converging patch cycles (the same finding persists, findings oscillate, or scope grows), pause and reclassify all remaining findings before any further edit.
141
+ 8. **Detect non-convergence.** After two non-converging patch cycles (the same finding persists, findings oscillate, or scope grows), pause and reclassify all remaining findings before any further edit. The loop's per-round `vs prev` comparison (persisting / new / resolved) is the machine signal for this; `--until clean` also stops early as `non_converging` when the actionable set is stable across two rounds.
117
142
  9. **Gate completion claims.** Never claim done, ship, commit-ready, or clean without a fresh `clean` result, unless the user gives explicit human acceptance of named remaining findings. Report accepted fixes, rejected findings with rationale, follow-ups, stop reason, and proof evidence.
118
143
 
119
144
  The shell exit policy is: `0` clean, `1` status is `has_findings`, `2` usage error, `3` needs human, `4` blocked/runtime failure. A non-zero loop result is a gate signal, not permission for the child reviewer to edit.
@@ -184,6 +209,7 @@ pi-review --reviewers 3 --ui web --ui-url-file /tmp/pi-review-ui-url.txt -- @src
184
209
  pi-review models [search]
185
210
  ```
186
211
  Rules:
212
+ - Extension-registered providers appear in the catalog only when the config enables them (`childExtensions: true`, see **Registered providers** — explicit opt-in).
187
213
  - Run this before building the review command. **Never invent a `provider/model` id** — only ids from the catalog output.
188
214
  - **Cross-model review**: identify the model this host session itself runs on (its id is in your session context), then prefer reviewer models from a different model family — same-family reviewers share the author model's blind spots. On a panel, keep the host's family to a minority of reviewers.
189
215
  - Follow **[references/model-selection.md](./references/model-selection.md)** for everything else: profile inference (code / frontend / plan), priority lists, cross-model resolution, user-named-model resolution, and thinking aliases (`max`/`最高` → `xhigh`, with fallback to the nearest supported level).
@@ -204,7 +230,7 @@ pi-review --reviewers 3 --ui web --ui-url-file /tmp/pi-review-ui-url.txt -- @src
204
230
  pi-review [--mode <name>] [--model <provider/model[:thinking]>] [--keep-session|--continue <handle>] [--progress-log <path>] -- <natural-language target...>
205
231
  ```
206
232
  Rules:
207
- - Use the model decision from step 1 and the execution path from **Default workflow by host**.
233
+ - Use the model decision from step 1 and the execution path from **Default workflow by host**. **Registered providers** enable host extensions only after explicit user acceptance (see **Registered providers**); override a single run with `PI_REVIEW_CHILD_EXTENSIONS=0`.
208
234
  - Omit `--mode` for normal code review; the command defaults to `code`.
209
235
  - Use `--keep-session` only when the user wants follow-up questions on this review; use `--continue <handle>` only with a **Session** path from a prior ASCII footer or `sessionHandle` in `PI_REVIEW_META_JSON`.
210
236
  - Pass the review request as natural language after `--`. Path mentions (`@src`, `@src/foo.ts`) are allowed as text. Do **not** expand directories into multi-file attachment lists — the CLI keeps directory `@refs` as tool path targets and only attaches real files.
@@ -10,6 +10,8 @@ Skills may use Claude Code tool names. On **Codex**, **Claude Code**, **Cursor**
10
10
 
11
11
  This file is **pi-review–specific** and ships with the pi-review package.
12
12
 
13
+ Skill-invoked runs inherit **Registered providers** from the parent skill: the persistent config enables extension-registered providers only after explicit user acceptance (`childExtensions: true` in `~/.pi/pi-review/config.json`). Verify with `cat ~/.pi/pi-review/config.json`; isolate one run with `PI_REVIEW_CHILD_EXTENSIONS=0`.
14
+
13
15
  ## Long-running `pi-review` (default on Codex / Claude Code / Cursor / agy)
14
16
 
15
17
  Native shell tools on these hosts **buffer stdout/stderr until the command exits**. A multi-minute foreground `pi-review` run looks like a silent wait, then one large dump — never promise live foreground streaming. Which side channel to use depends on the run type: panel review gets the browser dashboard; single review and `loop` get the tailed progress log.
@@ -4,7 +4,7 @@ Use this after `pi-review models` (or `pi-review models <search>`). **Never inve
4
4
 
5
5
  ## Workflow (Claude Code, Codex, Cursor, agy, Pi parent agent)
6
6
 
7
- 1. Run `pi-review models` (narrow with search if the user named a vendor or model family).
7
+ 1. Run `pi-review models` (narrow with search if the user named a vendor or model family). Extension-registered providers appear in the catalog only when the config enables them (`childExtensions: true`); if a needed provider is missing, follow the parent skill's **Registered providers** section (explicit opt-in).
8
8
  2. Infer **review profile** from the target (see table below).
9
9
  3. **Cross-model review**: identify the host session's own model — the model that wrote or will fix the code under review; its id is in your own session context. Walk the **priority list** for that profile skipping rows in the host's model family, and pick the **first** remaining row whose `idContains` matches some listed model id (case-insensitive substring). Same-family reviewers share the author model's blind spots; return to the host's own family only when no other family matches the catalog. On a panel, spread reviewer models so the host's family stays a minority. If several ids match one row, prefer the **newest** id (higher version suffix, e.g. `2.7` over `2.5`, `4-8` over `4-6`).
10
10
  4. Set `--model <exact-listed-provider/model>` from the catalog. Add `:thinking` only if that model supports it in Pi and the preset suggests it (see thinking column).