@noppu-labs/opencode-permission-reviewer 3.2.3 → 3.3.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/dist/rpc.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/modules/status/models/rpc.d.ts
2
1
  /** Portable, read-only protocol. No UI message can approve a permission. */
3
2
  export declare const ReviewerRpc: {
4
3
  readonly id: "opencode-permission-reviewer";
@@ -38,5 +37,4 @@ export declare const ReviewerRpc: {
38
37
  };
39
38
  };
40
39
  };
41
- };
42
- //#endregion
40
+ };
package/dist/rpc.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/modules/status/models/rpc.ts
1
+ // src/modules/status/models/rpc.ts
2
2
  /** Portable, read-only protocol. No UI message can approve a permission. */
3
3
  const ReviewerRpc = {
4
4
  id: "opencode-permission-reviewer",
@@ -27,5 +27,4 @@ const ReviewerRpc = {
27
27
  },
28
28
  events: { "review.updated": { schema: { type: "object" } } }
29
29
  };
30
- //#endregion
31
30
  export { ReviewerRpc };
@@ -0,0 +1,44 @@
1
+ // Generated by scripts/openrouter-decision-models.ts. Edit only `benchmarked` and `incompatible` by hand.
2
+ export interface OpenRouterDecisionModels {
3
+ readonly models: Readonly<Record<string, { readonly benchmarked: boolean }>>;
4
+ readonly incompatible: Readonly<Record<string, string>>;
5
+ }
6
+
7
+ // biome-ignore lint/nursery/useExplicitType: `as const satisfies` keeps the literal ids; an annotation would widen them
8
+ export const OPENROUTER_DECISION_MODELS = {
9
+ models: {
10
+ "cloudflare/clef": { benchmarked: false },
11
+ "cloudflare/clef-flash": { benchmarked: false },
12
+ "cloudflare/clef-omni": { benchmarked: false },
13
+ "inception/mercury-decide": { benchmarked: false },
14
+ "jaredpalmer/kev-4b": { benchmarked: false },
15
+ "liquid/d1": { benchmarked: true },
16
+ "liquid/d1-ultra": { benchmarked: true },
17
+ "liquid/d1.1": { benchmarked: false },
18
+ "microsoft/microsoft-decision-1": { benchmarked: false },
19
+ "nace-ai/drex-max": { benchmarked: false },
20
+ "nace-ai/drex-v1.5": { benchmarked: false },
21
+ "nace-ai/drex-v2.0": { benchmarked: false },
22
+ "openai/gpt-6-luna-decisions": { benchmarked: false },
23
+ "perplexity/pplx-decider-flash-v1.2": { benchmarked: false },
24
+ "perplexity/pplx-decider-v1.2": { benchmarked: false },
25
+ "respan/span-02": { benchmarked: false },
26
+ "togethercomputer/tev1-4b-experimental": { benchmarked: false },
27
+ "typesafe/jev-1.13": { benchmarked: true },
28
+ "typesafe/jev-1.14": { benchmarked: true },
29
+ "upstage/solar-decide": { benchmarked: false },
30
+ "upstage/solar-decide-flash": { benchmarked: false },
31
+ "~liquid/d1-latest": { benchmarked: false },
32
+ "~liquid/d1-ultra-latest": { benchmarked: false },
33
+ "~perplexity/pplx-decider-flash-latest": { benchmarked: false },
34
+ "~perplexity/pplx-decider-latest": { benchmarked: false },
35
+ "~typesafe/jev-latest": { benchmarked: false },
36
+ },
37
+ incompatible: {
38
+ "respan/span-01": "requires a different state shape",
39
+ "respan/span-01-lite": "requires a different state shape",
40
+ "respan/span-01-lite:free": "requires a different state shape",
41
+ "scaledown/classify-1":
42
+ "accepts only plain-string instructions and criteria",
43
+ },
44
+ } as const satisfies OpenRouterDecisionModels;
@@ -0,0 +1,154 @@
1
+ // The providers that serve System One decision models: which model IDs each
2
+ // accepts, where its endpoint lives and which key it reads.
3
+ import {
4
+ OPENROUTER_DECISION_MODELS,
5
+ type OpenRouterDecisionModels,
6
+ } from "./openrouter-decision-models.ts";
7
+
8
+ export interface SystemOneProvider {
9
+ readonly keyEnv: string;
10
+ readonly baseURL?: string;
11
+ /** The key is never sent unless it matches; `message` is the thrown error, never the key. */
12
+ readonly keyShape?: { readonly pattern: RegExp; readonly message: string };
13
+ accepts(modelID: string): boolean;
14
+ acceptsResponse(modelID: string, returned: string): boolean;
15
+ /** Thrown by the invoker before any request. */
16
+ incompatibleReason?(modelID: string): string | undefined;
17
+ /** A non-blocking config warning. */
18
+ configWarning?(modelID: string): string | undefined;
19
+ }
20
+
21
+ const JEV_MODEL = /^jev(?:-|$)/;
22
+ const COMMANDCODE_JEV = "typesafe/jev";
23
+ const LIQUID_DECISION_MODELS: ReadonlySet<string> = new Set(["d1", "d1-ultra"]);
24
+
25
+ export const BASETEN_DECISION_MODELS: ReadonlySet<string> = new Set([
26
+ "decision-models/baseten-elephant-9b-latest",
27
+ "decision-models/baseten-mammoth-27b-latest",
28
+ ]);
29
+
30
+ const isJev = (modelID: string): boolean => JEV_MODEL.test(modelID);
31
+ const returnsJev = (_modelID: string, returned: string): boolean =>
32
+ isJev(returned);
33
+ const sameModel = (modelID: string, returned: string): boolean =>
34
+ returned === modelID;
35
+
36
+ // New Jev and d1 releases count before the weekly list picks them up. A `~`
37
+ // goes only with a `-latest` alias, the only form acceptsResponse can answer.
38
+ const OPENROUTER_FAMILIES: readonly RegExp[] = [
39
+ /^(?:typesafe\/jev-\d[a-z0-9.-]*(?<!-latest)|~typesafe\/jev-latest)$/,
40
+ /^(?:liquid\/d1(?:[-.][a-z0-9.-]*)?(?<!-latest)|~liquid\/d1(?:[-.][a-z0-9.-]*)?-latest)$/,
41
+ ];
42
+ const OPENROUTER_ROUTING_SUFFIX = /:[a-z0-9-]+$/;
43
+ const OPENROUTER_ALIAS = /^~(.+)-latest$/;
44
+
45
+ const escapeRegExp = (value: string): string =>
46
+ value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
47
+
48
+ const OPENROUTER_MODELS: OpenRouterDecisionModels["models"] =
49
+ OPENROUTER_DECISION_MODELS.models;
50
+ const OPENROUTER_INCOMPATIBLE: OpenRouterDecisionModels["incompatible"] =
51
+ OPENROUTER_DECISION_MODELS.incompatible;
52
+
53
+ // The exact id first, so an id listed with its own tag keeps its entry.
54
+ const withoutRoutingSuffix = (modelID: string): readonly string[] => {
55
+ const stripped = modelID.replace(OPENROUTER_ROUTING_SUFFIX, "");
56
+ return stripped === modelID ? [modelID] : [modelID, stripped];
57
+ };
58
+
59
+ const openRouterIncompatibleReason = (modelID: string): string | undefined => {
60
+ for (const id of withoutRoutingSuffix(modelID))
61
+ if (Object.hasOwn(OPENROUTER_INCOMPATIBLE, id))
62
+ return OPENROUTER_INCOMPATIBLE[id];
63
+ return;
64
+ };
65
+
66
+ const openRouterConfigWarning = (modelID: string): string | undefined => {
67
+ const reason = openRouterIncompatibleReason(modelID);
68
+ if (reason !== undefined)
69
+ return `openrouter/${modelID} is known to reject the reviewer's request (${reason}); every review will fail`;
70
+ const listed = withoutRoutingSuffix(modelID).find((id) =>
71
+ Object.hasOwn(OPENROUTER_MODELS, id),
72
+ );
73
+ if (listed !== undefined && OPENROUTER_MODELS[listed]?.benchmarked === true)
74
+ return;
75
+ return `openrouter/${modelID} has not been benchmarked as a reviewer; see REVIEWER-MODELS.md`;
76
+ };
77
+
78
+ const openRouterAccepts = (modelID: string): boolean =>
79
+ openRouterIncompatibleReason(modelID) !== undefined ||
80
+ withoutRoutingSuffix(modelID).some(
81
+ (id) =>
82
+ Object.hasOwn(OPENROUTER_DECISION_MODELS.models, id) ||
83
+ OPENROUTER_FAMILIES.some((family) => family.test(id)),
84
+ );
85
+
86
+ // OpenRouter answers with the dated canonical slug, and an alias with the
87
+ // slug of whichever release it points at.
88
+ const openRouterAcceptsResponse = (
89
+ modelID: string,
90
+ returned: string,
91
+ ): boolean => {
92
+ const base = modelID.replace(OPENROUTER_ROUTING_SUFFIX, "");
93
+ const alias = OPENROUTER_ALIAS.exec(base)?.[1];
94
+ if (alias !== undefined)
95
+ return new RegExp(`^${escapeRegExp(alias)}(?:$|[-.])`).test(returned);
96
+ return (
97
+ returned === base ||
98
+ new RegExp(`^${escapeRegExp(base)}-\\d{8}$`).test(returned)
99
+ );
100
+ };
101
+
102
+ export const SYSTEM_ONE_PROVIDERS: Readonly<Record<string, SystemOneProvider>> =
103
+ {
104
+ opencode: {
105
+ keyEnv: "OPENCODE_API_KEY",
106
+ baseURL: "https://opencode.ai/zen",
107
+ accepts: isJev,
108
+ acceptsResponse: returnsJev,
109
+ },
110
+ "typesafe-ai": {
111
+ keyEnv: "TYPESAFE_API_KEY",
112
+ accepts: isJev,
113
+ acceptsResponse: returnsJev,
114
+ },
115
+ commandcode: {
116
+ keyEnv: "CMD_API_KEY",
117
+ baseURL: "https://api.commandcode.ai/provider",
118
+ accepts: (modelID: string): boolean => modelID === COMMANDCODE_JEV,
119
+ acceptsResponse: (_modelID: string, returned: string): boolean =>
120
+ returned === COMMANDCODE_JEV,
121
+ },
122
+ "liquid-ai": {
123
+ keyEnv: "LIQUID_API_KEY",
124
+ baseURL: "https://api.liquid.ai/decisions",
125
+ keyShape: {
126
+ pattern: /^liquid_[A-Za-z0-9]{32,}$/,
127
+ message:
128
+ 'LIQUID_API_KEY is not a Liquid AI key (expected the "liquid_" prefix)',
129
+ },
130
+ accepts: (modelID: string): boolean =>
131
+ LIQUID_DECISION_MODELS.has(modelID),
132
+ acceptsResponse: sameModel,
133
+ },
134
+ baseten: {
135
+ keyEnv: "BASETEN_API_KEY",
136
+ baseURL: "https://inference.baseten.co",
137
+ accepts: (modelID: string): boolean =>
138
+ BASETEN_DECISION_MODELS.has(modelID),
139
+ acceptsResponse: sameModel,
140
+ },
141
+ openrouter: {
142
+ keyEnv: "OPENROUTER_API_KEY",
143
+ baseURL: "https://openrouter.ai/api",
144
+ keyShape: {
145
+ pattern: /^sk-or-v1-[0-9a-f]{64}$/,
146
+ message:
147
+ 'OPENROUTER_API_KEY is not an OpenRouter key (expected the "sk-or-v1-" prefix)',
148
+ },
149
+ accepts: openRouterAccepts,
150
+ acceptsResponse: openRouterAcceptsResponse,
151
+ incompatibleReason: openRouterIncompatibleReason,
152
+ configWarning: openRouterConfigWarning,
153
+ },
154
+ };
@@ -4,11 +4,17 @@ import type {
4
4
  } from "../../../kernel/reviewer-config.ts";
5
5
  import { nonEmptyStringOr } from "../models/config-fields.ts";
6
6
  import { boundedInteger } from "../models/config-knobs.ts";
7
+ import {
8
+ SYSTEM_ONE_PROVIDERS,
9
+ type SystemOneProvider,
10
+ } from "../models/system-one-providers.ts";
7
11
 
8
- export function splitModel(model: string): {
9
- providerID: string;
10
- modelID: string;
11
- } {
12
+ export interface ModelRef {
13
+ readonly providerID: string;
14
+ readonly modelID: string;
15
+ }
16
+
17
+ export function splitModel(model: string): ModelRef {
12
18
  const slash = model.indexOf("/");
13
19
  if (slash <= 0 || slash === model.length - 1) {
14
20
  throw new Error(
@@ -21,20 +27,24 @@ export function splitModel(model: string): {
21
27
  };
22
28
  }
23
29
 
24
- export function isSystemOneReviewerModel(model: string): boolean {
25
- let parsed: { providerID: string; modelID: string };
30
+ export function systemOneProviderFor(
31
+ model: string,
32
+ ): (ModelRef & { readonly provider: SystemOneProvider }) | undefined {
33
+ let parsed: ModelRef;
26
34
  try {
27
35
  parsed = splitModel(model);
28
36
  } catch {
29
- return false;
37
+ return;
30
38
  }
31
- // Jev uses the typed System One API rather than a chat-session transport.
32
- return (
33
- ((parsed.providerID === "opencode" ||
34
- parsed.providerID === "typesafe-ai") &&
35
- /^jev(?:-|$)/.test(parsed.modelID)) ||
36
- (parsed.providerID === "commandcode" && parsed.modelID === "typesafe/jev")
37
- );
39
+ if (!Object.hasOwn(SYSTEM_ONE_PROVIDERS, parsed.providerID)) return;
40
+ const provider = SYSTEM_ONE_PROVIDERS[parsed.providerID];
41
+ if (!provider?.accepts(parsed.modelID)) return;
42
+ return { provider, ...parsed };
43
+ }
44
+
45
+ export function isSystemOneReviewerModel(model: string): boolean {
46
+ // System One models use the typed System One API rather than a chat-session transport.
47
+ return systemOneProviderFor(model) !== undefined;
38
48
  }
39
49
 
40
50
  export function isProviderModelId(value: unknown): value is string {
@@ -1,5 +1,8 @@
1
1
  import type { ReviewerConfig } from "../../../kernel/reviewer-config.ts";
2
- import { isSystemOneReviewerModel } from "./reviewer-model.ts";
2
+ import {
3
+ isSystemOneReviewerModel,
4
+ systemOneProviderFor,
5
+ } from "./reviewer-model.ts";
3
6
 
4
7
  /** The least review time a hand-off needs; with less the request escalates. */
5
8
  export const HANDOFF_BUDGET_FLOOR_MS = 15_000;
@@ -38,15 +41,15 @@ export function systemOneRoutingWarnings(config: ReviewerConfig): string[] {
38
41
  if (config.systemOneEscalation === "reasoning-first") {
39
42
  warnings.push(
40
43
  cause === "not-jev"
41
- ? 'systemOneEscalation "reasoning-first" is inactive: the reviewer model is not Jev'
42
- : 'systemOneEscalation "reasoning-first" is inactive: no escalationReviewer is configured; Jev escalations still go to you',
44
+ ? 'systemOneEscalation "reasoning-first" is inactive: the reviewer model is not a System One model'
45
+ : 'systemOneEscalation "reasoning-first" is inactive: no escalationReviewer is configured; System One escalations still go to you',
43
46
  );
44
47
  }
45
48
  if (config.systemOneDenialReview) {
46
49
  warnings.push(
47
50
  cause === "not-jev"
48
- ? "systemOneDenialReview is inactive: the reviewer model is not Jev"
49
- : "systemOneDenialReview is inactive: no escalationReviewer is configured; Jev denials stay final",
51
+ ? "systemOneDenialReview is inactive: the reviewer model is not a System One model"
52
+ : "systemOneDenialReview is inactive: no escalationReviewer is configured; System One denials stay final",
50
53
  );
51
54
  }
52
55
  return warnings;
@@ -63,6 +66,13 @@ function budgetFloorWarnings(config: ReviewerConfig): string[] {
63
66
  ];
64
67
  }
65
68
 
69
+ /** System One is never the escalation reviewer, so only `model` is checked. */
70
+ export function systemOneModelWarnings(config: ReviewerConfig): string[] {
71
+ const target = systemOneProviderFor(config.model);
72
+ const warning = target?.provider.configWarning?.(target.modelID);
73
+ return warning === undefined ? [] : [warning];
74
+ }
75
+
66
76
  const PREVIEW_CHARS = 80;
67
77
 
68
78
  /** A warning names the value; it does not reproduce it. */
@@ -102,6 +112,7 @@ export function withSystemOneRoutingWarnings(
102
112
  const warnings = [
103
113
  ...invalidValueWarnings(config, source),
104
114
  ...systemOneRoutingWarnings(config),
115
+ ...systemOneModelWarnings(config),
105
116
  ...budgetFloorWarnings(config),
106
117
  ];
107
118
  return warnings.length === 0
@@ -13,18 +13,18 @@ const AFTER: Record<
13
13
  Exclude<HandoffTrigger, "jev-failure" | "jev-uncertain-deny">,
14
14
  string
15
15
  > = {
16
- "jev-escalate": "after Jev's escalation",
17
- "jev-uncertain-allow": "after Jev's uncertain approval",
18
- "jev-gate": "after a safety gate stopped Jev's approval",
19
- "jev-invalid": "after Jev's invalid response",
16
+ "jev-escalate": "after System One's escalation",
17
+ "jev-uncertain-allow": "after System One's uncertain approval",
18
+ "jev-gate": "after a safety gate stopped System One's approval",
19
+ "jev-invalid": "after System One's invalid response",
20
20
  };
21
21
 
22
22
  const CAUSE: Record<Exclude<HandoffTrigger, "jev-failure">, string> = {
23
- "jev-escalate": "Jev escalated",
24
- "jev-uncertain-allow": "Jev's approval was uncertain",
25
- "jev-gate": "a safety gate stopped Jev's approval",
26
- "jev-invalid": "Jev's response was invalid",
27
- "jev-uncertain-deny": "Jev's denial was uncertain",
23
+ "jev-escalate": "System One escalated",
24
+ "jev-uncertain-allow": "System One's approval was uncertain",
25
+ "jev-gate": "a safety gate stopped System One's approval",
26
+ "jev-invalid": "System One's response was invalid",
27
+ "jev-uncertain-deny": "System One's denial was uncertain",
28
28
  };
29
29
 
30
30
  /** Last path segment of a provider model id: "omniroute/auto/gpt-6-luna" -> "gpt-6-luna". */
@@ -42,16 +42,16 @@ export function modelLabel(model: string): string {
42
42
  }
43
43
 
44
44
  const jevFailed = (kind: string | undefined): string =>
45
- kind === undefined ? "Jev failed" : `Jev failed (${kind})`;
45
+ kind === undefined ? "System One failed" : `System One failed (${kind})`;
46
46
 
47
47
  /** A "denied" phase with `escalationDisposition: "deny"` is a fail-closed
48
48
  * escalation, not the reasoning reviewer's own block, so it does not confirm
49
49
  * Jev's denial. */
50
50
  function denialVerdict(status: PhraseSource): string {
51
- if (status.phase === "approved") return "overturned Jev's denial";
51
+ if (status.phase === "approved") return "overturned System One's denial";
52
52
  if (status.phase === "denied" && status.escalationDisposition !== "deny")
53
- return "confirmed Jev's denial";
54
- return "after Jev's uncertain denial";
53
+ return "confirmed System One's denial";
54
+ return "after System One's uncertain denial";
55
55
  }
56
56
 
57
57
  /** Undefined on `budget-exhausted` (the reasoning reviewer never ran) and on
@@ -87,11 +87,11 @@ export function attributionText(status: ReviewUiStatus): string | undefined {
87
87
  return model === "" ? undefined : model;
88
88
  }
89
89
 
90
- /** Why Jev handed off, for the budget toast ("Jev timed out"). */
90
+ /** Why System One handed off, for the budget toast ("System One timed out"). */
91
91
  export function handoffCause(handoff: HandoffInfo): string {
92
92
  if (handoff.trigger !== "jev-failure") return CAUSE[handoff.trigger];
93
93
  return handoff.failureKind === "timeout"
94
- ? "Jev timed out"
94
+ ? "System One timed out"
95
95
  : jevFailed(handoff.failureKind);
96
96
  }
97
97
 
@@ -2,6 +2,7 @@
2
2
  // TUI session, and a one-line sidebar summary while any remain. The same
3
3
  // `status` read also names the server's reasoning reviewer.
4
4
  import { asObjectLike } from "../utils/is-record.ts";
5
+ import { modelLabel } from "./attribution.ts";
5
6
 
6
7
  interface NoticeLists {
7
8
  configWarnings?: readonly string[] | undefined;
@@ -22,14 +23,29 @@ export interface SidebarLine {
22
23
  /** Keyed by the exact text `systemOneRoutingWarnings` emits; a reworded
23
24
  * warning falls back to its full text. */
24
25
  const SHORT_WARNINGS: Readonly<Record<string, string>> = {
25
- 'systemOneEscalation "reasoning-first" is inactive: no escalationReviewer is configured; Jev escalations still go to you':
26
+ 'systemOneEscalation "reasoning-first" is inactive: no escalationReviewer is configured; System One escalations still go to you':
26
27
  "reasoning-first inactive (no escalationReviewer)",
27
- 'systemOneEscalation "reasoning-first" is inactive: the reviewer model is not Jev':
28
- "reasoning-first inactive (model is not Jev)",
29
- "systemOneDenialReview is inactive: no escalationReviewer is configured; Jev denials stay final":
28
+ 'systemOneEscalation "reasoning-first" is inactive: the reviewer model is not a System One model':
29
+ "reasoning-first inactive (model is not System One)",
30
+ "systemOneDenialReview is inactive: no escalationReviewer is configured; System One denials stay final":
30
31
  "denial review inactive (no escalationReviewer)",
31
- "systemOneDenialReview is inactive: the reviewer model is not Jev":
32
- "denial review inactive (model is not Jev)",
32
+ "systemOneDenialReview is inactive: the reviewer model is not a System One model":
33
+ "denial review inactive (model is not System One)",
34
+ };
35
+
36
+ const UNBENCHMARKED = /^(\S+) has not been benchmarked as a reviewer/;
37
+ const INCOMPATIBLE = /^(\S+) is known to reject the reviewer's request/;
38
+
39
+ const shortWarning = (warning: string): string => {
40
+ const known = SHORT_WARNINGS[warning];
41
+ if (known !== undefined) return known;
42
+ const unbenchmarked = UNBENCHMARKED.exec(warning)?.[1];
43
+ if (unbenchmarked !== undefined)
44
+ return `${modelLabel(unbenchmarked)} not benchmarked`;
45
+ const incompatible = INCOMPATIBLE.exec(warning)?.[1];
46
+ if (incompatible !== undefined)
47
+ return `${modelLabel(incompatible)} is incompatible`;
48
+ return warning;
33
49
  };
34
50
 
35
51
  const strings = (value: unknown): string[] =>
@@ -65,7 +81,7 @@ export function sidebarLine(
65
81
  ): SidebarLine | undefined {
66
82
  const items = [
67
83
  ...degraded.map((reason) => `auto-approval disabled (${reason})`),
68
- ...warnings.map((warning) => SHORT_WARNINGS[warning] ?? warning),
84
+ ...warnings.map(shortWarning),
69
85
  ];
70
86
  const first = items[0];
71
87
  if (first === undefined) return;
@@ -54,14 +54,14 @@ function noTimeLeft(
54
54
  const parts = reason === undefined ? null : BUDGET_REASON.exec(reason);
55
55
  if (handoff !== undefined)
56
56
  return withReason(
57
- `${NO_TIME_LEAD} ${shortModelName(handoff.to) || GENERIC_REVIEWER} after Jev (${handoffCause(handoff)}).`,
57
+ `${NO_TIME_LEAD} ${shortModelName(handoff.to) || GENERIC_REVIEWER} after System One (${handoffCause(handoff)}).`,
58
58
  parts === null ? reason : parts[2],
59
59
  );
60
60
  if (reason === undefined)
61
- return `${NO_TIME_LEAD} ${GENERIC_REVIEWER} after Jev.`;
61
+ return `${NO_TIME_LEAD} ${GENERIC_REVIEWER} after System One.`;
62
62
  if (parts === null) return reason;
63
63
  const name = shortModelName(reviewer ?? "") || GENERIC_REVIEWER;
64
- return `${NO_TIME_LEAD} ${name} after Jev (${parts[1]}). ${parts[2]}`;
64
+ return `${NO_TIME_LEAD} ${name} after System One (${parts[1]}). ${parts[2]}`;
65
65
  }
66
66
 
67
67
  /** `fallback` stands in for a missing reason on a `reasoning-escalated` or
@@ -75,7 +75,7 @@ export function manualToast(
75
75
  switch (status.resolution) {
76
76
  case "reasoning-escalated":
77
77
  return warning(
78
- `${reasoningModel(status)} reviewed this after Jev; it needs your approval: ${status.reason ?? fallback}`,
78
+ `${reasoningModel(status)} reviewed this after System One; it needs your approval: ${status.reason ?? fallback}`,
79
79
  );
80
80
  case "reasoning-unavailable":
81
81
  return unavailable(status);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noppu-labs/opencode-permission-reviewer",
3
- "version": "3.2.3",
3
+ "version": "3.3.0",
4
4
  "description": "Policy-aware AI permission reviewer for OpenCode V1 and V2: auto-approves routine agent tool calls, denies risky ones with feedback, and escalates the rest to you",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -85,7 +85,7 @@
85
85
  "bun"
86
86
  ],
87
87
  "engines": {
88
- "bun": ">=1.3.0",
88
+ "bun": ">=1.3.14",
89
89
  "opencode": ">=1.18.29 <2 || >=2.0.22 <3"
90
90
  },
91
91
  "peerDependencies": {
@@ -101,21 +101,22 @@
101
101
  }
102
102
  },
103
103
  "devDependencies": {
104
- "@biomejs/biome": "2.5.15",
104
+ "@biomejs/biome": "2.6.3",
105
105
  "@opencode-ai/plugin": "1.19.4",
106
106
  "@opencode-ai/sdk": "1.19.4",
107
- "@opencode/plugin": "2.1.2",
107
+ "@opencode/plugin": "2.2.0",
108
108
  "@types/bun": "^1.3.0",
109
109
  "@types/semver": "7.8.0",
110
110
  "fta-cli": "3.1.0",
111
- "knip": "6.41.0",
112
- "tsdown": "0.23.1",
111
+ "knip": "6.43.0",
112
+ "tsdown": "0.23.3",
113
113
  "typescript": "7.0.2"
114
114
  },
115
115
  "overrides": {
116
116
  "@babel/core": "7.29.7",
117
117
  "ip-address": "10.7.4",
118
- "toml": "5.0.1"
118
+ "toml": "5.0.1",
119
+ "zod": "4.6.7"
119
120
  },
120
121
  "scripts": {
121
122
  "lint": "biome check --error-on-warnings .",
@@ -135,11 +136,11 @@
135
136
  },
136
137
  "dependencies": {
137
138
  "@typesafe-ai/sdk": "0.6.0",
138
- "@opencode/client": "2.1.2",
139
+ "@opencode/client": "2.2.0",
139
140
  "jsonc-parser": "3.3.1",
140
141
  "semver": "7.8.5",
141
- "@opentui/core": "0.5.11",
142
- "@opentui/solid": "0.5.11",
142
+ "@opentui/core": "0.7.0",
143
+ "@opentui/solid": "0.7.0",
143
144
  "solid-js": "1.9.12",
144
145
  "zod": "4.6.7"
145
146
  }