@osovv/vv-opencode 2.0.0 → 2.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.
Files changed (296) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +87 -85
  3. package/dist/commands/completion.js +0 -1
  4. package/dist/commands/completion.js.map +1 -1
  5. package/dist/commands/doctor.js +6 -9
  6. package/dist/commands/doctor.js.map +1 -1
  7. package/dist/commands/init.d.ts +2 -1
  8. package/dist/commands/init.js +7 -12
  9. package/dist/commands/init.js.map +1 -1
  10. package/dist/commands/install.d.ts +4 -0
  11. package/dist/commands/install.js +40 -37
  12. package/dist/commands/install.js.map +1 -1
  13. package/dist/commands/launch.d.ts +2 -1
  14. package/dist/commands/launch.js +18 -14
  15. package/dist/commands/launch.js.map +1 -1
  16. package/dist/commands/patch-provider.d.ts +225 -307
  17. package/dist/commands/patch-provider.js +92 -296
  18. package/dist/commands/patch-provider.js.map +1 -1
  19. package/dist/commands/status.js +7 -10
  20. package/dist/commands/status.js.map +1 -1
  21. package/dist/commands/sync.d.ts +4 -0
  22. package/dist/commands/sync.js +38 -35
  23. package/dist/commands/sync.js.map +1 -1
  24. package/dist/index.d.ts +25 -5
  25. package/dist/index.js +73 -34
  26. package/dist/index.js.map +1 -1
  27. package/dist/lib/agent-tool-catalog.d.ts +1 -1
  28. package/dist/lib/agent-tool-catalog.js +3 -6
  29. package/dist/lib/agent-tool-catalog.js.map +1 -1
  30. package/dist/lib/agent-tool-contract.d.ts +22 -13
  31. package/dist/lib/agent-tool-contract.js +20 -20
  32. package/dist/lib/agent-tool-contract.js.map +1 -1
  33. package/dist/lib/analytics/types.d.ts +7 -1
  34. package/dist/lib/analytics/types.js +2 -2
  35. package/dist/lib/analytics/types.js.map +1 -1
  36. package/dist/lib/config-layers.d.ts +28 -6
  37. package/dist/lib/config-layers.js +268 -73
  38. package/dist/lib/config-layers.js.map +1 -1
  39. package/dist/lib/managed-agents.d.ts +24 -2
  40. package/dist/lib/managed-agents.js +45 -15
  41. package/dist/lib/managed-agents.js.map +1 -1
  42. package/dist/lib/model-roles.d.ts +5 -0
  43. package/dist/lib/model-roles.js +22 -1
  44. package/dist/lib/model-roles.js.map +1 -1
  45. package/dist/lib/opencode/agent-registrations.d.ts +4 -4
  46. package/dist/lib/opencode/agent-registrations.js +386 -197
  47. package/dist/lib/opencode/agent-registrations.js.map +1 -1
  48. package/dist/lib/opencode/inspection.d.ts +13 -13
  49. package/dist/lib/opencode/inspection.js +69 -106
  50. package/dist/lib/opencode/inspection.js.map +1 -1
  51. package/dist/lib/opencode/model-overrides.d.ts +2 -2
  52. package/dist/lib/opencode/model-overrides.js +192 -47
  53. package/dist/lib/opencode/model-overrides.js.map +1 -1
  54. package/dist/lib/opencode/paths.d.ts +6 -2
  55. package/dist/lib/opencode/paths.js +12 -11
  56. package/dist/lib/opencode/paths.js.map +1 -1
  57. package/dist/lib/opencode/plugin-registration.d.ts +10 -11
  58. package/dist/lib/opencode/plugin-registration.js +76 -138
  59. package/dist/lib/opencode/plugin-registration.js.map +1 -1
  60. package/dist/lib/opencode/shared-utils.d.ts +47 -3
  61. package/dist/lib/opencode/shared-utils.js +346 -15
  62. package/dist/lib/opencode/shared-utils.js.map +1 -1
  63. package/dist/lib/opencode.d.ts +5 -6
  64. package/dist/lib/opencode.js +10 -10
  65. package/dist/lib/opencode.js.map +1 -1
  66. package/dist/lib/vvoc-config.js +4 -4
  67. package/dist/lib/vvoc-config.js.map +1 -1
  68. package/dist/lib/vvoc-paths.d.ts +7 -0
  69. package/dist/lib/vvoc-paths.js +15 -1
  70. package/dist/lib/vvoc-paths.js.map +1 -1
  71. package/dist/lib/vvoc-preset-registry.d.ts +38 -50
  72. package/dist/lib/vvoc-preset-registry.js +38 -48
  73. package/dist/lib/vvoc-preset-registry.js.map +1 -1
  74. package/dist/plugins/analytics/index.d.ts +20 -14
  75. package/dist/plugins/analytics/index.js +281 -133
  76. package/dist/plugins/analytics/index.js.map +1 -1
  77. package/dist/plugins/guardian/index.d.ts +63 -42
  78. package/dist/plugins/guardian/index.js +217 -759
  79. package/dist/plugins/guardian/index.js.map +1 -1
  80. package/dist/plugins/hashline-edit/index.d.ts +145 -31
  81. package/dist/plugins/hashline-edit/index.js +679 -244
  82. package/dist/plugins/hashline-edit/index.js.map +1 -1
  83. package/dist/plugins/hashline-edit/schemas.d.ts +1 -1
  84. package/dist/plugins/hashline-edit/schemas.js +3 -3
  85. package/dist/plugins/hashline-edit/schemas.js.map +1 -1
  86. package/dist/plugins/model-roles/index.d.ts +18 -4
  87. package/dist/plugins/model-roles/index.js +44 -181
  88. package/dist/plugins/model-roles/index.js.map +1 -1
  89. package/dist/plugins/peak-hours/index.d.ts +23 -22
  90. package/dist/plugins/peak-hours/index.js +210 -178
  91. package/dist/plugins/peak-hours/index.js.map +1 -1
  92. package/dist/plugins/secrets-redaction/deep.js +35 -51
  93. package/dist/plugins/secrets-redaction/deep.js.map +1 -1
  94. package/dist/plugins/secrets-redaction/index.d.ts +96 -8
  95. package/dist/plugins/secrets-redaction/index.js +290 -102
  96. package/dist/plugins/secrets-redaction/index.js.map +1 -1
  97. package/dist/plugins/secrets-redaction/session.d.ts +9 -0
  98. package/dist/plugins/secrets-redaction/session.js +21 -4
  99. package/dist/plugins/secrets-redaction/session.js.map +1 -1
  100. package/dist/plugins/secrets-redaction/stream.d.ts +92 -0
  101. package/dist/plugins/secrets-redaction/stream.js +772 -0
  102. package/dist/plugins/secrets-redaction/stream.js.map +1 -0
  103. package/dist/plugins/spec-guard/index.d.ts +49 -18
  104. package/dist/plugins/spec-guard/index.js +231 -129
  105. package/dist/plugins/spec-guard/index.js.map +1 -1
  106. package/dist/plugins/system-context-injection/index.d.ts +10 -4
  107. package/dist/plugins/system-context-injection/index.js +271 -78
  108. package/dist/plugins/system-context-injection/index.js.map +1 -1
  109. package/dist/plugins/tool-history-compaction/index.d.ts +26 -4
  110. package/dist/plugins/tool-history-compaction/index.js +170 -32
  111. package/dist/plugins/tool-history-compaction/index.js.map +1 -1
  112. package/dist/plugins/tool-history-compaction/transform.d.ts +47 -16
  113. package/dist/plugins/tool-history-compaction/transform.js +173 -55
  114. package/dist/plugins/tool-history-compaction/transform.js.map +1 -1
  115. package/dist/plugins/web-tools/fetch-service.d.ts +51 -13
  116. package/dist/plugins/web-tools/fetch-service.js +106 -75
  117. package/dist/plugins/web-tools/fetch-service.js.map +1 -1
  118. package/dist/plugins/web-tools/index.d.ts +58 -16
  119. package/dist/plugins/web-tools/index.js +202 -91
  120. package/dist/plugins/web-tools/index.js.map +1 -1
  121. package/dist/plugins/web-tools/media-loader.d.ts +3 -3
  122. package/dist/plugins/web-tools/media-loader.js +3 -3
  123. package/dist/plugins/web-tools/media-loader.js.map +1 -1
  124. package/dist/plugins/web-tools/providers/native-fetch.d.ts +2 -2
  125. package/dist/plugins/web-tools/providers/native-fetch.js +1 -1
  126. package/dist/plugins/web-tools/providers/native-fetch.js.map +1 -1
  127. package/dist/plugins/web-tools/providers/spider.d.ts +2 -2
  128. package/dist/plugins/web-tools/providers/spider.js +1 -1
  129. package/dist/plugins/web-tools/providers/spider.js.map +1 -1
  130. package/dist/plugins/web-tools/providers/zai.d.ts +2 -2
  131. package/dist/plugins/web-tools/providers/zai.js +1 -1
  132. package/dist/plugins/web-tools/providers/zai.js.map +1 -1
  133. package/dist/plugins/web-tools/schemas.d.ts +1 -1
  134. package/dist/plugins/web-tools/schemas.js +3 -3
  135. package/dist/plugins/web-tools/schemas.js.map +1 -1
  136. package/dist/plugins/web-tools/search-service.d.ts +81 -12
  137. package/dist/plugins/web-tools/search-service.js +104 -57
  138. package/dist/plugins/web-tools/search-service.js.map +1 -1
  139. package/dist/plugins/workflow/authorization.d.ts +44 -10
  140. package/dist/plugins/workflow/authorization.js +113 -73
  141. package/dist/plugins/workflow/authorization.js.map +1 -1
  142. package/dist/plugins/workflow/cancellation.d.ts +86 -0
  143. package/dist/plugins/workflow/cancellation.js +202 -0
  144. package/dist/plugins/workflow/cancellation.js.map +1 -0
  145. package/dist/plugins/workflow/checkpoints.d.ts +7 -1
  146. package/dist/plugins/workflow/checkpoints.js +141 -21
  147. package/dist/plugins/workflow/checkpoints.js.map +1 -1
  148. package/dist/plugins/workflow/delegated.d.ts +14 -0
  149. package/dist/plugins/workflow/delegated.js +6 -5
  150. package/dist/plugins/workflow/delegated.js.map +1 -1
  151. package/dist/plugins/workflow/host.d.ts +81 -0
  152. package/dist/plugins/workflow/host.js +189 -0
  153. package/dist/plugins/workflow/host.js.map +1 -0
  154. package/dist/plugins/workflow/index.d.ts +69 -4
  155. package/dist/plugins/workflow/index.js +1391 -1026
  156. package/dist/plugins/workflow/index.js.map +1 -1
  157. package/dist/plugins/workflow/recovery.d.ts +3 -5
  158. package/dist/plugins/workflow/recovery.js +18 -33
  159. package/dist/plugins/workflow/recovery.js.map +1 -1
  160. package/dist/plugins/workflow/repair.d.ts +31 -5
  161. package/dist/plugins/workflow/repair.js +116 -48
  162. package/dist/plugins/workflow/repair.js.map +1 -1
  163. package/dist/plugins/workflow/results.d.ts +31 -31
  164. package/dist/plugins/workflow/results.js +4 -4
  165. package/dist/plugins/workflow/results.js.map +1 -1
  166. package/dist/plugins/workflow/schemas.d.ts +3 -3
  167. package/dist/plugins/workflow/schemas.js +5 -5
  168. package/dist/plugins/workflow/schemas.js.map +1 -1
  169. package/dist/plugins/workflow/system-instruction.md +4 -0
  170. package/dist/plugins/workflow/tooling.d.ts +6 -0
  171. package/dist/plugins/workflow/tooling.js +3 -1
  172. package/dist/plugins/workflow/tooling.js.map +1 -1
  173. package/dist/runtime/auxiliary.d.ts +13 -0
  174. package/dist/runtime/auxiliary.js +108 -0
  175. package/dist/runtime/auxiliary.js.map +1 -0
  176. package/dist/runtime/client.d.ts +88 -0
  177. package/dist/runtime/client.js +174 -0
  178. package/dist/runtime/client.js.map +1 -0
  179. package/dist/runtime/context-inspection-contract.d.ts +397 -0
  180. package/dist/runtime/context-inspection-contract.js +622 -0
  181. package/dist/runtime/context-inspection-contract.js.map +1 -0
  182. package/dist/runtime/context-inspection.d.ts +52 -0
  183. package/dist/runtime/context-inspection.js +324 -0
  184. package/dist/runtime/context-inspection.js.map +1 -0
  185. package/dist/runtime/context.d.ts +192 -0
  186. package/dist/runtime/context.js +1246 -0
  187. package/dist/runtime/context.js.map +1 -0
  188. package/dist/runtime/coordination.d.ts +40 -0
  189. package/dist/runtime/coordination.js +87 -0
  190. package/dist/runtime/coordination.js.map +1 -0
  191. package/dist/runtime/model-registry.d.ts +34 -0
  192. package/dist/runtime/model-registry.js +227 -0
  193. package/dist/runtime/model-registry.js.map +1 -0
  194. package/dist/runtime/permissions.d.ts +20 -0
  195. package/dist/runtime/permissions.js +250 -0
  196. package/dist/runtime/permissions.js.map +1 -0
  197. package/dist/runtime/snapshot-config.d.ts +80 -0
  198. package/dist/runtime/snapshot-config.js +268 -0
  199. package/dist/runtime/snapshot-config.js.map +1 -0
  200. package/dist/runtime/snapshot-store.d.ts +25 -0
  201. package/dist/runtime/snapshot-store.js +519 -0
  202. package/dist/runtime/snapshot-store.js.map +1 -0
  203. package/dist/runtime/snapshots.d.ts +59 -0
  204. package/dist/runtime/snapshots.js +721 -0
  205. package/dist/runtime/snapshots.js.map +1 -0
  206. package/dist/runtime/types.d.ts +713 -0
  207. package/dist/runtime/types.js +190 -0
  208. package/dist/runtime/types.js.map +1 -0
  209. package/dist/tui/analytics/indicator.d.ts +25 -26
  210. package/dist/tui/analytics/indicator.js +66 -74
  211. package/dist/tui/analytics/indicator.js.map +1 -1
  212. package/dist/tui/branding/footer.d.ts +7 -12
  213. package/dist/tui/branding/footer.js +16 -24
  214. package/dist/tui/branding/footer.js.map +1 -1
  215. package/dist/tui/context/analyze.d.ts +20 -9
  216. package/dist/tui/context/analyze.js +295 -257
  217. package/dist/tui/context/analyze.js.map +1 -1
  218. package/dist/tui/context/collect.d.ts +29 -3
  219. package/dist/tui/context/collect.js +450 -66
  220. package/dist/tui/context/collect.js.map +1 -1
  221. package/dist/tui/context/plugin.d.ts +21 -7
  222. package/dist/tui/context/plugin.js +65 -70
  223. package/dist/tui/context/plugin.js.map +1 -1
  224. package/dist/tui/context/types.d.ts +174 -43
  225. package/dist/tui/context/types.js +25 -19
  226. package/dist/tui/context/types.js.map +1 -1
  227. package/dist/tui/context/view.d.ts +33 -7
  228. package/dist/tui/context/view.js +136 -81
  229. package/dist/tui/context/view.js.map +1 -1
  230. package/dist/tui/peak-hours/banner.d.ts +13 -11
  231. package/dist/tui/peak-hours/banner.js +48 -80
  232. package/dist/tui/peak-hours/banner.js.map +1 -1
  233. package/dist/tui/policy.d.ts +69 -0
  234. package/dist/tui/policy.js +169 -0
  235. package/dist/tui/policy.js.map +1 -0
  236. package/dist/tui.d.ts +3 -8
  237. package/dist/tui.js +72 -68
  238. package/dist/tui.js.map +1 -1
  239. package/package.json +19 -15
  240. package/schemas/vvoc/v3.json +1 -1
  241. package/server.js +3 -5
  242. package/templates/agents/enhancer.md +10 -5
  243. package/templates/agents/guardian.md +10 -4
  244. package/templates/agents/investigator.md +4 -2
  245. package/templates/agents/vv-code-reviewer.md +4 -2
  246. package/templates/agents/vv-spec-reviewer.md +4 -2
  247. package/templates/skills/vv-execute/references/tool-contracts.md +1 -1
  248. package/tui.js +3 -5
  249. package/dist/plugins/analytics/v2.d.ts +0 -21
  250. package/dist/plugins/analytics/v2.js +0 -133
  251. package/dist/plugins/analytics/v2.js.map +0 -1
  252. package/dist/plugins/guardian/v2.d.ts +0 -13
  253. package/dist/plugins/guardian/v2.js +0 -161
  254. package/dist/plugins/guardian/v2.js.map +0 -1
  255. package/dist/plugins/hashline-edit/v2.d.ts +0 -12
  256. package/dist/plugins/hashline-edit/v2.js +0 -145
  257. package/dist/plugins/hashline-edit/v2.js.map +0 -1
  258. package/dist/plugins/model-roles/v2.d.ts +0 -24
  259. package/dist/plugins/model-roles/v2.js +0 -274
  260. package/dist/plugins/model-roles/v2.js.map +0 -1
  261. package/dist/plugins/peak-hours/v2.d.ts +0 -12
  262. package/dist/plugins/peak-hours/v2.js +0 -95
  263. package/dist/plugins/peak-hours/v2.js.map +0 -1
  264. package/dist/plugins/secrets-redaction/v2.d.ts +0 -14
  265. package/dist/plugins/secrets-redaction/v2.js +0 -100
  266. package/dist/plugins/secrets-redaction/v2.js.map +0 -1
  267. package/dist/plugins/spec-guard/v2.d.ts +0 -12
  268. package/dist/plugins/spec-guard/v2.js +0 -139
  269. package/dist/plugins/spec-guard/v2.js.map +0 -1
  270. package/dist/plugins/system-context-injection/agent-contexts.d.ts +0 -5
  271. package/dist/plugins/system-context-injection/agent-contexts.js +0 -164
  272. package/dist/plugins/system-context-injection/agent-contexts.js.map +0 -1
  273. package/dist/plugins/system-context-injection/v2.d.ts +0 -13
  274. package/dist/plugins/system-context-injection/v2.js +0 -60
  275. package/dist/plugins/system-context-injection/v2.js.map +0 -1
  276. package/dist/plugins/tool-history-compaction/v2.d.ts +0 -11
  277. package/dist/plugins/tool-history-compaction/v2.js +0 -56
  278. package/dist/plugins/tool-history-compaction/v2.js.map +0 -1
  279. package/dist/plugins/v2-runtime/config-watcher.d.ts +0 -26
  280. package/dist/plugins/v2-runtime/config-watcher.js +0 -111
  281. package/dist/plugins/v2-runtime/config-watcher.js.map +0 -1
  282. package/dist/plugins/v2-runtime/index.d.ts +0 -50
  283. package/dist/plugins/v2-runtime/index.js +0 -114
  284. package/dist/plugins/v2-runtime/index.js.map +0 -1
  285. package/dist/plugins/v2-runtime/location-config.d.ts +0 -51
  286. package/dist/plugins/v2-runtime/location-config.js +0 -91
  287. package/dist/plugins/v2-runtime/location-config.js.map +0 -1
  288. package/dist/plugins/v2-runtime/setup.d.ts +0 -48
  289. package/dist/plugins/v2-runtime/setup.js +0 -174
  290. package/dist/plugins/v2-runtime/setup.js.map +0 -1
  291. package/dist/plugins/web-tools/v2.d.ts +0 -11
  292. package/dist/plugins/web-tools/v2.js +0 -99
  293. package/dist/plugins/web-tools/v2.js.map +0 -1
  294. package/dist/plugins/workflow/v2.d.ts +0 -58
  295. package/dist/plugins/workflow/v2.js +0 -181
  296. package/dist/plugins/workflow/v2.js.map +0 -1
@@ -1,23 +1,49 @@
1
- import type { TuiPluginApi } from "@opencode-ai/plugin/tui";
1
+ import type { Plugin } from "@opencode/plugin/tui";
2
2
  import type { RGBA } from "@opentui/core";
3
3
  import type { ContextAnalysis } from "./types.js";
4
4
  type Color = RGBA | string;
5
- type ContextTheme = {
5
+ /** Theme colors the dialog needs, mapped from the native resolved theme. */
6
+ export type ContextThemeColors = {
6
7
  text: Color;
7
- textMuted: Color;
8
+ muted: Color;
8
9
  primary: Color;
9
10
  warning: Color;
11
+ error: Color;
12
+ success: Color;
13
+ };
14
+ /** Structural native keymap layer registrar accepted by the dialog. */
15
+ export type ContextKeymapLike = {
16
+ layer(input: () => {
17
+ mode?: string;
18
+ commands?: readonly {
19
+ title?: string;
20
+ bind?: string | false;
21
+ run?: (input?: string) => void | false | Promise<void>;
22
+ }[];
23
+ }): void;
10
24
  };
11
25
  declare const CONTEXT_TABS: readonly ["overview", "tools", "mcp"];
12
26
  export type ContextTab = (typeof CONTEXT_TABS)[number];
13
- export declare function openContextDialog(api: TuiPluginApi, analysis: ContextAnalysis): void;
27
+ /**
28
+ * Claim the always-present native `app` slot and register the /context keymap
29
+ * command from inside a mounted render. Native `keymap.layer` requires the
30
+ * host Keymap provider context, which only exists inside the mounted component
31
+ * tree; registering during plugin `setup` fails with "Keymap.Provider is
32
+ * missing". Returns the slot disposer.
33
+ */
34
+ export declare function claimContextCommand(ctx: Plugin.Context, command: {
35
+ readonly id: string;
36
+ readonly isEnabled: () => boolean;
37
+ readonly run: () => Promise<void>;
38
+ }): () => void;
39
+ /** Show the responsive context report through the native host dialog. */
40
+ export declare function openContextDialog(ctx: Plugin.Context, analysis: ContextAnalysis): void;
14
41
  export declare function ContextDialogContent(props: {
15
42
  analysis: ContextAnalysis;
16
- keymap?: TuiPluginApi["keymap"];
17
- theme: ContextTheme;
43
+ keymap?: ContextKeymapLike;
44
+ theme: ContextThemeColors;
18
45
  }): any;
19
46
  export declare function selectContextTabForKey(current: ContextTab, keyName: string): ContextTab | undefined;
20
- export declare function registerContextDialogKeymap(keymap: TuiPluginApi["keymap"], select: (keyName: string) => void): () => void;
21
47
  export declare function calculateContextBodyHeight(terminalHeight: number): number;
22
48
  export declare function renderMetricBar(percent: number | undefined, width?: number): string;
23
49
  export {};
@@ -1,19 +1,48 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@opentui/solid/jsx-runtime";
2
- import { useKeyboard, useTerminalDimensions } from "@opentui/solid";
3
- import { createMemo, createSignal, onCleanup } from "solid-js";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "@opentui/solid/jsx-runtime";
2
+ import { useTerminalDimensions } from "@opentui/solid";
3
+ import { createMemo, createSignal } from "solid-js";
4
4
  const CONTEXT_TABS = ["overview", "tools", "mcp"];
5
5
  const CONTEXT_DIALOG_MAX_BODY_HEIGHT = 16;
6
6
  const CONTEXT_DIALOG_RESERVED_ROWS = 13;
7
+ // START_BLOCK_CONTEXT_COMMAND_SLOT
8
+ /**
9
+ * Claim the always-present native `app` slot and register the /context keymap
10
+ * command from inside a mounted render. Native `keymap.layer` requires the
11
+ * host Keymap provider context, which only exists inside the mounted component
12
+ * tree; registering during plugin `setup` fails with "Keymap.Provider is
13
+ * missing". Returns the slot disposer.
14
+ */
15
+ export function claimContextCommand(ctx, command) {
16
+ return ctx.ui.slot({
17
+ append: "app",
18
+ render() {
19
+ ctx.keymap.layer(() => ({
20
+ // Global so the command is reachable from the prompt input mode, like
21
+ // the built-in /btw command; the default base layer is not.
22
+ mode: "global",
23
+ commands: [
24
+ {
25
+ id: command.id,
26
+ title: "Context usage",
27
+ description: "Show measured context usage and an approximate source breakdown",
28
+ group: "VVOC",
29
+ palette: true,
30
+ slash: { name: "context" },
31
+ enabled: command.isEnabled,
32
+ run: command.run,
33
+ },
34
+ ],
35
+ }));
36
+ return _jsx(_Fragment, {});
37
+ },
38
+ });
39
+ }
40
+ // END_BLOCK_CONTEXT_COMMAND_SLOT
7
41
  // START_BLOCK_CONTEXT_DIALOG
8
- export function openContextDialog(api, analysis) {
9
- const theme = api.theme.current;
10
- api.ui.dialog.replace(() => (_jsx(ContextDialogContent, { analysis: analysis, keymap: api.keymap, theme: {
11
- text: theme.text,
12
- textMuted: theme.textMuted,
13
- primary: theme.primary,
14
- warning: theme.warning,
15
- } })));
16
- api.ui.dialog.setSize("xlarge");
42
+ /** Show the responsive context report through the native host dialog. */
43
+ export function openContextDialog(ctx, analysis) {
44
+ ctx.ui.dialog.show(() => (_jsx(ContextDialogContent, { analysis: analysis, keymap: ctx.keymap, theme: themeFrom(ctx.theme) })));
45
+ ctx.ui.dialog.set({ size: "xlarge" });
17
46
  }
18
47
  export function ContextDialogContent(props) {
19
48
  const [tab, setTab] = createSignal("overview");
@@ -21,24 +50,55 @@ export function ContextDialogContent(props) {
21
50
  const narrow = createMemo(() => dimensions().width < 72);
22
51
  const bodyHeight = createMemo(() => calculateContextBodyHeight(dimensions().height));
23
52
  const barWidth = createMemo(() => calculateMetricBarWidth(dimensions().width));
53
+ // The dialog owns its scroll region: the host dialog does not route arrow/page
54
+ // keys into a plugin scrollbox, so bind them explicitly.
55
+ let scrollRegion;
24
56
  if (props.keymap) {
25
- onCleanup(registerContextDialogKeymap(props.keymap, (keyName) => {
26
- const selected = selectContextTabForKey(tab(), keyName);
27
- if (selected !== undefined)
28
- setTab(selected);
57
+ props.keymap.layer(() => ({
58
+ mode: "modal",
59
+ commands: [
60
+ { title: "Previous context tab", bind: "left", run: () => selectAndSet("left") },
61
+ { title: "Next context tab", bind: "right", run: () => selectAndSet("right") },
62
+ { title: "Show context Overview", bind: "1", run: () => selectAndSet("1") },
63
+ { title: "Show context Tools", bind: "2", run: () => selectAndSet("2") },
64
+ { title: "Show context MCP", bind: "3", run: () => selectAndSet("3") },
65
+ { title: "Scroll context up", bind: "up", run: () => scrollRegion?.scrollBy(-1, "step") },
66
+ {
67
+ title: "Scroll context down",
68
+ bind: "down",
69
+ run: () => scrollRegion?.scrollBy(1, "step"),
70
+ },
71
+ {
72
+ title: "Page context up",
73
+ bind: "pageup",
74
+ run: () => scrollRegion?.scrollBy(-1, "viewport"),
75
+ },
76
+ {
77
+ title: "Page context down",
78
+ bind: "pagedown",
79
+ run: () => scrollRegion?.scrollBy(1, "viewport"),
80
+ },
81
+ {
82
+ title: "Scroll context down",
83
+ bind: "ctrl+d",
84
+ run: () => scrollRegion?.scrollBy(1, "viewport"),
85
+ },
86
+ {
87
+ title: "Scroll context up",
88
+ bind: "ctrl+u",
89
+ run: () => scrollRegion?.scrollBy(-1, "viewport"),
90
+ },
91
+ ],
29
92
  }));
30
93
  }
31
- else {
32
- useKeyboard((event) => {
33
- const selected = selectContextTabForKey(tab(), event.name);
34
- if (selected === undefined)
35
- return;
36
- event.preventDefault();
37
- event.stopPropagation();
94
+ function selectAndSet(keyName) {
95
+ const selected = selectContextTabForKey(tab(), keyName);
96
+ if (selected !== undefined)
38
97
  setTab(selected);
39
- });
40
98
  }
41
- return (_jsxs("box", { flexDirection: "column", gap: 1, paddingLeft: 1, paddingRight: 1, children: [_jsx("text", { fg: props.theme.text, wrapMode: "word", children: `Context usage\n${formatModel(props.analysis)}` }), _jsx(UsageSummary, { analysis: props.analysis, primary: props.theme.primary, muted: props.theme.textMuted, barWidth: barWidth() }), _jsx(TabBar, { tab: tab, theme: props.theme }), _jsx("scrollbox", { focused: true, height: bodyHeight(), scrollX: false, scrollY: true, viewportCulling: true, children: _jsx("box", { flexDirection: "column", gap: 1, width: "100%", children: () => tab() === "overview" ? (_jsx(OverviewTab, { analysis: props.analysis, theme: props.theme, narrow: narrow(), barWidth: barWidth() })) : tab() === "tools" ? (_jsx(ToolsTab, { analysis: props.analysis, theme: props.theme, narrow: narrow() })) : (_jsx(McpTab, { analysis: props.analysis, theme: props.theme, narrow: narrow() })) }) }), _jsx("text", { fg: props.theme.textMuted, wrapMode: "word", children: "Measured = latest provider usage. ~ = provider-neutral estimate. Percentages use only the current model context limit." })] }));
99
+ return (_jsxs("box", { flexDirection: "column", gap: 1, paddingLeft: 1, paddingRight: 1, children: [_jsx("text", { fg: props.theme.text, wrapMode: "word", children: `Context usage\n${formatModels(props.analysis)}` }), _jsx(UsageSummary, { analysis: props.analysis, primary: props.theme.primary, muted: props.theme.muted, warning: props.theme.warning, barWidth: barWidth() }), _jsx(TabBar, { tab: tab, theme: props.theme }), _jsx("scrollbox", { ref: (value) => {
100
+ scrollRegion = value;
101
+ }, focused: true, height: bodyHeight(), scrollX: false, scrollY: true, viewportCulling: true, children: _jsx("box", { flexDirection: "column", gap: 1, width: "100%", children: () => tab() === "overview" ? (_jsx(OverviewTab, { analysis: props.analysis, theme: props.theme, narrow: narrow(), barWidth: barWidth() })) : tab() === "tools" ? (_jsx(ToolsTab, { analysis: props.analysis, theme: props.theme, narrow: narrow() })) : (_jsx(McpTab, { analysis: props.analysis, theme: props.theme, narrow: narrow() })) }) }), _jsx("text", { fg: props.theme.muted, wrapMode: "word", children: "Measured = latest provider usage. ~ = provider-neutral estimate. Percentages use only the current model context limit. Registered catalog != the session's final request." })] }));
42
102
  }
43
103
  // END_BLOCK_CONTEXT_DIALOG
44
104
  // START_BLOCK_TAB_NAVIGATION
@@ -55,30 +115,6 @@ export function selectContextTabForKey(current, keyName) {
55
115
  const delta = keyName === "left" ? -1 : 1;
56
116
  return CONTEXT_TABS[(index + delta + CONTEXT_TABS.length) % CONTEXT_TABS.length];
57
117
  }
58
- export function registerContextDialogKeymap(keymap, select) {
59
- const commands = [
60
- { name: "vvoc.context.tab.left", key: "left", title: "Previous context tab" },
61
- { name: "vvoc.context.tab.right", key: "right", title: "Next context tab" },
62
- { name: "vvoc.context.tab.overview", key: "1", title: "Show context Overview" },
63
- { name: "vvoc.context.tab.tools", key: "2", title: "Show context Tools" },
64
- { name: "vvoc.context.tab.mcp", key: "3", title: "Show context MCP" },
65
- ];
66
- return keymap.registerLayer({
67
- mode: "modal",
68
- commands: commands.map((command) => ({
69
- name: command.name,
70
- title: command.title,
71
- run() {
72
- select(command.key);
73
- },
74
- })),
75
- bindings: commands.map((command) => ({
76
- key: command.key,
77
- cmd: command.name,
78
- desc: command.title,
79
- })),
80
- });
81
- }
82
118
  export function calculateContextBodyHeight(terminalHeight) {
83
119
  const normalized = Number.isFinite(terminalHeight) ? Math.floor(terminalHeight) : 34;
84
120
  const hostTopOffset = Math.floor(normalized / 4);
@@ -93,7 +129,7 @@ function calculateMetricBarWidth(terminalWidth) {
93
129
  // END_BLOCK_TAB_NAVIGATION
94
130
  // START_BLOCK_OVERVIEW_TAB
95
131
  function OverviewTab(props) {
96
- return (_jsxs("box", { flexDirection: "column", gap: 1, children: [_jsx("text", { fg: props.theme.text, children: "Approximate breakdown" }), props.analysis.categories.map((category) => (_jsx(MetricRow, { label: category.source === "estimated" ? `~ ${category.label}` : category.label, metric: category, color: category.source === "provider-residual" ? props.theme.warning : props.theme.textMuted, valueColor: props.theme.text, barColor: category.source === "provider-residual" ? props.theme.warning : props.theme.primary, narrow: props.narrow, barWidth: props.barWidth }))), _jsxs("box", { flexDirection: props.narrow ? "column" : "row", justifyContent: props.narrow ? "flex-start" : "space-between", children: [_jsx("text", { fg: props.theme.textMuted, children: "Active messages" }), _jsxs("text", { fg: props.theme.text, children: [props.analysis.activeMessageCount, props.analysis.compacted ? " (after compaction)" : ""] })] }), props.analysis.estimationDriftTokens > 0 ? (_jsxs("text", { fg: props.theme.warning, wrapMode: "word", children: ["Estimate drift: +", formatTokens(props.analysis.estimationDriftTokens), " above provider usage"] })) : null, props.analysis.warnings.slice(0, 3).map((warning) => (_jsxs("text", { fg: props.theme.warning, wrapMode: "word", children: ["Warning: ", warning] })))] }));
132
+ return (_jsxs("box", { flexDirection: "column", gap: 1, children: [_jsx("text", { fg: props.theme.text, children: "Approximate breakdown" }), props.analysis.categories.map((category) => (_jsx(MetricRow, { label: category.source === "estimated" ? `~ ${category.label}` : category.label, metric: category, color: category.source === "provider-residual" ? props.theme.warning : props.theme.muted, valueColor: props.theme.text, barColor: category.source === "provider-residual" ? props.theme.warning : props.theme.primary, narrow: props.narrow, barWidth: props.barWidth }))), props.analysis.catalogSchemaBudget !== undefined ? (_jsx(MetricRow, { label: "Registered tool catalog (budget, not current context)", metric: props.analysis.catalogSchemaBudget, color: props.theme.muted, valueColor: props.theme.text, barColor: props.theme.muted, narrow: props.narrow, barWidth: props.barWidth })) : null, _jsxs("box", { flexDirection: props.narrow ? "column" : "row", justifyContent: props.narrow ? "flex-start" : "space-between", children: [_jsx("text", { fg: props.theme.muted, children: "Active messages" }), _jsxs("text", { fg: props.theme.text, children: [props.analysis.activeMessageCount, props.analysis.compacted ? " (after compaction)" : ""] })] }), props.analysis.estimationDriftTokens > 0 ? (_jsxs("text", { fg: props.theme.warning, wrapMode: "word", children: ["Estimate drift: +", formatTokens(props.analysis.estimationDriftTokens), " above provider usage"] })) : null, props.analysis.warnings.slice(0, 3).map((warning) => (_jsxs("text", { fg: props.theme.warning, wrapMode: "word", children: ["Warning: ", warning] })))] }));
97
133
  }
98
134
  function MetricRow(props) {
99
135
  return (_jsxs("box", { flexDirection: "column", children: [_jsxs("box", { flexDirection: props.narrow ? "column" : "row", justifyContent: props.narrow ? "flex-start" : "space-between", children: [_jsx("text", { fg: props.color, wrapMode: "word", children: props.label }), _jsx("text", { fg: props.valueColor, children: formatMetric(props.metric) })] }), _jsx("text", { fg: props.barColor, children: renderMetricBar(props.metric.percent, props.barWidth) })] }));
@@ -102,30 +138,16 @@ function MetricRow(props) {
102
138
  // START_BLOCK_TOOLS_TAB
103
139
  function ToolsTab(props) {
104
140
  const tools = props.analysis.toolAttribution?.tools ?? [];
105
- if (!props.analysis.toolAttribution) {
106
- return _jsx("text", { fg: props.theme.warning, children: "Detailed tool attribution is unavailable." });
107
- }
108
- if (tools.length === 0) {
109
- return _jsx("text", { fg: props.theme.textMuted, children: "No current tool schemas or active tool history." });
110
- }
111
- return (_jsxs("box", { flexDirection: "column", gap: 1, children: [_jsx("text", { fg: props.theme.text, children: "Tools \u00B7 schema + active post-compaction history" }), tools.map((tool) => (_jsx(ToolCard, { tool: tool, theme: props.theme, narrow: props.narrow })))] }));
141
+ return (_jsxs("box", { flexDirection: "column", gap: 1, children: [_jsx("text", { fg: props.theme.text, children: "Registered tool catalog \u2014 current location; not the session's final request" }), _jsxs("text", { fg: props.theme.muted, wrapMode: "word", children: ["Catalog status: ", props.analysis.toolCatalogStatus] }), props.analysis.toolCatalogStatus === "unavailable" ? (_jsx("text", { fg: props.theme.warning, wrapMode: "word", children: "The registered tool catalog is unavailable; schemas and code-mode intent are unknown." })) : null, tools.length === 0 ? (_jsx("text", { fg: props.theme.muted, children: "No current tool schemas or active tool history." })) : (tools.map((tool) => _jsx(ToolCard, { tool: tool, theme: props.theme, narrow: props.narrow })))] }));
112
142
  }
113
143
  function ToolCard(props) {
114
- return (_jsxs("box", { flexDirection: "column", paddingLeft: props.nested ? 2 : 0, children: [_jsxs("box", { flexDirection: props.narrow ? "column" : "row", justifyContent: props.narrow ? "flex-start" : "space-between", children: [_jsx("text", { fg: props.theme.text, wrapMode: "char", children: props.tool.id }), _jsx("text", { fg: props.theme.textMuted, children: formatToolSource(props.tool.source) })] }), _jsxs("text", { fg: props.theme.textMuted, children: ["active calls ", props.tool.calls] }), _jsxs("text", { fg: props.theme.textMuted, wrapMode: "word", children: ["schema ", formatKnownMetric(props.tool.schema, props.tool.schemaKnown), " \u00B7 history", " ", formatMetric(props.tool.history)] }), _jsxs("text", { fg: props.theme.primary, children: [props.tool.schemaKnown ? "total" : "known total", " ", formatMetric(props.tool.total)] })] }));
144
+ return (_jsxs("box", { flexDirection: "column", paddingLeft: props.nested ? 2 : 0, children: [_jsxs("box", { flexDirection: props.narrow ? "column" : "row", justifyContent: props.narrow ? "flex-start" : "space-between", children: [_jsx("text", { fg: props.theme.text, wrapMode: "char", children: props.tool.id }), _jsx("text", { fg: props.theme.muted, children: formatToolSource(props.tool.source) })] }), _jsxs("text", { fg: props.theme.muted, children: ["active calls ", props.tool.calls, " \u00B7 code mode ", props.tool.codeMode ? "on" : "off"] }), _jsxs("text", { fg: props.theme.muted, wrapMode: "word", children: ["schema ", formatKnownMetric(props.tool.schema, props.tool.schemaKnown), " \u00B7 history", " ", formatMetric(props.tool.history)] }), _jsxs("text", { fg: props.theme.primary, children: [props.tool.schemaKnown ? "total" : "known total", " ", formatMetric(props.tool.total)] })] }));
115
145
  }
116
146
  // END_BLOCK_TOOLS_TAB
117
147
  // START_BLOCK_MCP_TAB
118
148
  function McpTab(props) {
119
149
  const attribution = props.analysis.toolAttribution;
120
- if (!attribution) {
121
- return (_jsxs("box", { flexDirection: "column", gap: 1, children: [_jsx("text", { fg: props.theme.warning, children: "Detailed MCP attribution is unavailable." }), props.analysis.mcpServers.map((server) => (_jsxs("text", { fg: props.theme.textMuted, wrapMode: "word", children: [server.name, " \u00B7 ", server.status] })))] }));
122
- }
123
- return (_jsxs("box", { flexDirection: "column", gap: 1, children: [_jsx("text", { fg: props.theme.text, children: "MCP servers \u00B7 observable schemas + retained active history" }), attribution.mcpServers.length === 0 ? (_jsx("text", { fg: props.theme.textMuted, children: "No MCP servers reported." })) : (attribution.mcpServers.map((server) => (_jsx(McpServerCard, { server: server, theme: props.theme, narrow: props.narrow })))), _jsx("text", { fg: props.theme.text, children: "Other external/plugin" }), attribution.otherTools.length === 0 ? (_jsx("text", { fg: props.theme.textMuted, children: "No unattributed external or plugin tools." })) : (attribution.otherTools.map((tool) => (_jsx(ToolCard, { tool: tool, theme: props.theme, narrow: props.narrow, nested: true }))))] }));
124
- }
125
- function McpServerCard(props) {
126
- return (_jsxs("box", { flexDirection: "column", children: [_jsxs("box", { flexDirection: props.narrow ? "column" : "row", justifyContent: props.narrow ? "flex-start" : "space-between", children: [_jsx("text", { fg: props.theme.text, wrapMode: "word", children: props.server.name }), _jsx("text", { fg: props.server.status === "connected" ? props.theme.primary : props.theme.warning, children: props.server.status })] }), _jsxs("text", { fg: props.theme.textMuted, children: ["current tools ", props.server.toolCount ?? "unavailable"] }), _jsxs("text", { fg: props.theme.textMuted, wrapMode: "word", children: ["schema ", formatKnownMetric(props.server.schema, props.server.schemaKnown), " \u00B7 history", " ", formatMetric(props.server.history)] }), _jsxs("text", { fg: props.theme.primary, children: [props.server.schemaKnown ? "total" : "known total", " ", formatMetric(props.server.total)] }), !props.server.schemaKnown && props.server.status === "connected" ? (_jsx("text", { fg: props.theme.textMuted, wrapMode: "word", children: "OpenCode API does not expose this MCP schema catalog." })) : null, props.server.error ? (_jsx("text", { fg: props.theme.warning, wrapMode: "word", children: props.server.error })) : null, props.server.tools.length === 0 ? (_jsx("text", { fg: props.theme.textMuted, wrapMode: "word", children: props.server.schemaKnown
127
- ? "No attributed current schemas or active history."
128
- : "No attributed active history; current schemas are unavailable." })) : (props.server.tools.map((tool) => (_jsx(ToolCard, { tool: tool, theme: props.theme, narrow: props.narrow, nested: true }))))] }));
150
+ return (_jsxs("box", { flexDirection: "column", gap: 1, children: [_jsx("text", { fg: props.theme.text, children: "MCP servers \u00B7 native status" }), props.analysis.mcpServers.length === 0 ? (_jsx("text", { fg: props.theme.muted, children: "No MCP servers reported." })) : (props.analysis.mcpServers.map((server) => (_jsxs("box", { flexDirection: "column", children: [_jsxs("box", { flexDirection: props.narrow ? "column" : "row", justifyContent: props.narrow ? "flex-start" : "space-between", children: [_jsx("text", { fg: props.theme.text, wrapMode: "word", children: server.name }), _jsx("text", { fg: server.status === "connected" ? props.theme.success : props.theme.warning, children: server.status })] }), server.error ? (_jsx("text", { fg: props.theme.warning, wrapMode: "word", children: server.error })) : null] })))), _jsx("text", { fg: props.theme.muted, wrapMode: "word", children: "Tool namespace is a registration hint, not authoritative MCP server provenance; tools without a known owner are grouped below." }), _jsx("text", { fg: props.theme.text, children: "Other external/plugin tools" }), (attribution?.otherTools.length ?? 0) === 0 ? (_jsx("text", { fg: props.theme.muted, children: "No unattributed external or plugin tools." })) : (attribution?.otherTools.map((tool) => (_jsx(ToolCard, { tool: tool, theme: props.theme, narrow: props.narrow, nested: true }))))] }));
129
151
  }
130
152
  // END_BLOCK_MCP_TAB
131
153
  function TabBar(props) {
@@ -134,14 +156,36 @@ function TabBar(props) {
134
156
  function UsageSummary(props) {
135
157
  const measured = props.analysis.measured;
136
158
  if (!measured) {
137
- return (_jsx("text", { fg: props.muted, wrapMode: "word", children: "Provider usage is not available until the session has an assistant turn." }));
159
+ return (_jsx("text", { fg: props.muted, wrapMode: "word", children: "Provider usage is not available for the active context yet." }));
138
160
  }
139
161
  const percent = measured.percentUsed;
140
- const usageLine = `${renderMetricBar(percent, props.barWidth)} ${formatTokens(measured.usedTokens)}${measured.contextLimit ? ` / ${formatTokens(measured.contextLimit)}` : ""}${percent === undefined ? "" : ` (${percent.toFixed(1)}%)`}`;
141
- const tokenLine = `input ${formatTokens(measured.inputTokens)} · cache read ${formatTokens(measured.cacheReadTokens)} · output ${formatTokens(measured.outputTokens)}${measured.remainingTokens === undefined
142
- ? ""
143
- : ` · remaining ${formatTokens(measured.remainingTokens)}`}`;
144
- return (_jsx("text", { fg: props.primary, wrapMode: "word", children: `${usageLine}\n${tokenLine}` }));
162
+ const usageLine = `${renderMetricBar(percent, props.barWidth)} ${formatKnownTokens(measured.usedTokens)}${measured.contextLimit === undefined ? "" : ` / ${formatTokens(measured.contextLimit)}`}${percent === undefined ? "" : ` (${percent.toFixed(1)}%)`}`;
163
+ const tokenLine = [
164
+ `input ${formatKnownTokens(measured.inputTokens)}`,
165
+ `cache read ${formatKnownTokens(measured.cacheReadTokens)}`,
166
+ `cache write ${formatKnownTokens(measured.cacheWriteTokens)}`,
167
+ `output ${formatKnownTokens(measured.outputTokens)}`,
168
+ `reasoning ${formatKnownTokens(measured.reasoningTokens)}`,
169
+ measured.remainingTokens === undefined
170
+ ? undefined
171
+ : `remaining ${formatTokens(measured.remainingTokens)}`,
172
+ ]
173
+ .filter((part) => part !== undefined)
174
+ .join(" · ");
175
+ const color = measured.matchesSelectedModel && measured.compactionRelation !== "before"
176
+ ? props.primary
177
+ : props.warning;
178
+ return (_jsx("box", { flexDirection: "column", children: _jsx("text", { fg: color, wrapMode: "word", children: `${usageLine}\n${tokenLine}\n${measured.label}` }) }));
179
+ }
180
+ function themeFrom(theme) {
181
+ return {
182
+ text: theme.text.base,
183
+ muted: theme.text.muted,
184
+ primary: theme.hue.accent[200] ?? theme.text.base,
185
+ warning: theme.text.feedback.warning.base,
186
+ error: theme.text.feedback.error.base,
187
+ success: theme.text.feedback.success.base,
188
+ };
145
189
  }
146
190
  function formatTabBar(active) {
147
191
  return CONTEXT_TABS.map((tab, index) => active === tab ? `[${index + 1} ${formatTabName(tab)}]` : `${index + 1} ${formatTabName(tab)}`).join(" ");
@@ -154,9 +198,9 @@ function formatToolSource(source) {
154
198
  return "Built-in";
155
199
  if (source.kind === "vvoc")
156
200
  return "vvoc";
157
- if (source.kind === "mcp")
158
- return `MCP · ${source.server}`;
159
- return "Other external/plugin";
201
+ return source.namespace === undefined
202
+ ? "Other external/plugin"
203
+ : `Other external/plugin · ${source.namespace}`;
160
204
  }
161
205
  function formatMetric(metric) {
162
206
  return `${formatTokens(metric.estimatedTokens)} · ${formatPercent(metric.percent)}`;
@@ -167,11 +211,22 @@ function formatKnownMetric(metric, known) {
167
211
  function formatPercent(percent) {
168
212
  return percent === undefined ? "—" : `${percent.toFixed(1)}%`;
169
213
  }
170
- function formatModel(analysis) {
171
- if (!analysis.model)
172
- return analysis.agent ?? "unknown model";
173
- const model = `${analysis.model.providerID}/${analysis.model.modelID}`;
174
- return analysis.agent ? `${analysis.agent} · ${model}` : model;
214
+ function formatModels(analysis) {
215
+ const selected = analysis.selectedModel === undefined
216
+ ? "unknown model"
217
+ : `${analysis.selectedModel.providerID}/${analysis.selectedModel.modelID}${analysis.selectedModel.variant === undefined ? "" : `#${analysis.selectedModel.variant}`}`;
218
+ const history = analysis.historyModel === undefined
219
+ ? undefined
220
+ : `${analysis.historyModel.providerID}/${analysis.historyModel.modelID}`;
221
+ const parts = [
222
+ analysis.agent === undefined ? undefined : analysis.agent,
223
+ `selected ${selected}`,
224
+ history === undefined || history === selected ? undefined : `history ${history}`,
225
+ ].filter((part) => part !== undefined);
226
+ return parts.join(" · ");
227
+ }
228
+ function formatKnownTokens(tokens) {
229
+ return tokens === undefined ? "unknown" : formatTokens(tokens);
175
230
  }
176
231
  function formatTokens(tokens) {
177
232
  if (tokens >= 1_000_000)
@@ -1 +1 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../../../src/tui/context/view.tsx"],"names":[],"mappings":";AA2BA,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAiB/D,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAU,CAAC;AAC3D,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAC1C,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAGxC,6BAA6B;AAC7B,MAAM,UAAU,iBAAiB,CAAC,GAAiB,EAAE,QAAyB;IAC5E,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC;IAChC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAC1B,KAAC,oBAAoB,IACnB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,GAAG,CAAC,MAAM,EAClB,KAAK,EAAE;YACL,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,GACD,CACH,CAAC,CAAC;IACH,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAIpC;IACC,MAAM,CAA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CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IACtE,IAAI,MAAM,IAAI,KAAK;QAAE,OAAO,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACtF,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,OAA2B,EAAE,KAAK,GAAG,EAAE;IACrE,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/E,MAAM,UAAU,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IACnF,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC;IAC1D,OAAO,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC;AACpE,CAAC"}
@@ -1,26 +1,28 @@
1
1
  import type { JSX } from "@opentui/solid";
2
2
  import type { RGBA } from "@opentui/core";
3
- import type { TuiPluginApi } from "@opencode-ai/plugin/tui";
3
+ import type { Plugin } from "@opencode/plugin/tui";
4
4
  import { type ActivePeak, type PeakHoursClock, type PeakHoursEntryConfig } from "../../lib/peak-hours.js";
5
+ import type { ContextPolicySnapshot } from "../policy.js";
5
6
  export type PeakBannerModelRef = {
6
7
  providerID: string;
7
8
  };
8
9
  export type PeakHoursBannerDependencies = {
9
- enabled: (api: TuiPluginApi) => Promise<boolean>;
10
+ isEnabled: () => boolean;
10
11
  now: PeakHoursClock;
11
12
  entry: () => PeakHoursEntryConfig;
12
- currentModel: (api: TuiPluginApi) => PeakBannerModelRef | undefined;
13
- connectedProviders: (api: TuiPluginApi) => string[];
13
+ currentModel: (ctx: Plugin.Context) => PeakBannerModelRef | undefined;
14
+ connectedProviders: (ctx: Plugin.Context) => string[];
14
15
  renderBanner: (text: string, color: RGBA) => JSX.Element;
15
16
  };
16
17
  export declare function buildPeakBannerText(providerID: string, peak: ActivePeak, suggestions: readonly string[]): string;
17
- export declare function resolveBannerModelRef(api: TuiPluginApi): PeakBannerModelRef | undefined;
18
+ export declare function resolveBannerModelRef(ctx: Plugin.Context): PeakBannerModelRef | undefined;
18
19
  /**
19
- * Registers the persistent peak-hours banner for the app_bottom host slot.
20
+ * Claim the native `session.composer.top` slot and render the peak-hours banner.
20
21
  *
21
- * The banner renders in warning colors only while the current model's provider
22
- * is inside an active peak window, naming the provider, the window end, and
23
- * connected providers that are currently outside peak. Disabled toggle or
24
- * entry, missing slot API, or registration failure leave the TUI untouched.
22
+ * Placement note: the V1 banner lived in `app_bottom`; the native slot tree
23
+ * publishes no global bottom slot, so the visible warning now renders at the
24
+ * top of the session composer while the current model's provider is in peak.
25
+ * Disabled policy, missing slot API, or registration failure leave the TUI
26
+ * untouched.
25
27
  */
26
- export declare function registerPeakHoursBanner(api: TuiPluginApi, dependencies?: Partial<PeakHoursBannerDependencies>): Promise<void>;
28
+ export declare function registerPeakHoursBanner(ctx: Plugin.Context, policy: () => ContextPolicySnapshot | undefined, dependencies?: Partial<PeakHoursBannerDependencies>): () => void;