@opencode-ai/plugin 0.0.0-dev-202605130054 → 0.0.0-dev-202605130151

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/tui.d.ts CHANGED
@@ -164,6 +164,54 @@ export type TuiToast = {
164
164
  message: string;
165
165
  duration?: number;
166
166
  };
167
+ export type TuiAttentionWhen = "always" | "focused" | "blurred";
168
+ export declare const TuiAttentionSoundNames: readonly ["default", "question", "permission", "error", "done", "subagent_done"];
169
+ export type TuiAttentionSoundName = (typeof TuiAttentionSoundNames)[number];
170
+ export type TuiAttentionSound = boolean | {
171
+ name?: TuiAttentionSoundName;
172
+ volume?: number;
173
+ when?: TuiAttentionWhen;
174
+ };
175
+ export type TuiAttentionNotification = boolean | {
176
+ when?: TuiAttentionWhen;
177
+ };
178
+ export type TuiAttentionSoundPack = {
179
+ id: string;
180
+ name?: string;
181
+ sounds: Partial<Record<TuiAttentionSoundName, string>>;
182
+ };
183
+ export type TuiAttentionSoundPackInfo = {
184
+ id: string;
185
+ name?: string;
186
+ active: boolean;
187
+ builtin: boolean;
188
+ };
189
+ export type TuiAttentionSoundboardActivateOptions = {
190
+ persist?: boolean;
191
+ };
192
+ export type TuiAttentionSoundboard = {
193
+ registerPack(pack: TuiAttentionSoundPack): () => void;
194
+ activate(id: string, options?: TuiAttentionSoundboardActivateOptions): boolean;
195
+ current(): string;
196
+ list(): ReadonlyArray<TuiAttentionSoundPackInfo>;
197
+ };
198
+ export type TuiAttentionNotifyInput = {
199
+ title?: string;
200
+ message: string;
201
+ notification?: TuiAttentionNotification;
202
+ sound?: TuiAttentionSound;
203
+ };
204
+ export type TuiAttentionNotifySkipReason = "attention_disabled" | "empty_message" | "blurred" | "focused" | "focus_unknown" | "renderer_destroyed";
205
+ export type TuiAttentionNotifyResult = {
206
+ ok: boolean;
207
+ notification: boolean;
208
+ sound: boolean;
209
+ skipped?: TuiAttentionNotifySkipReason;
210
+ };
211
+ export type TuiAttention = {
212
+ notify(input: TuiAttentionNotifyInput): Promise<TuiAttentionNotifyResult>;
213
+ soundboard: TuiAttentionSoundboard;
214
+ };
167
215
  export type TuiThemeCurrent = {
168
216
  readonly primary: RGBA;
169
217
  readonly secondary: RGBA;
@@ -268,8 +316,17 @@ type TuiBindingLookupView = {
268
316
  pick: (name: string, commands: readonly string[]) => Binding<Renderable, KeyEvent>[];
269
317
  omit: (name: string, commands: readonly string[]) => Binding<Renderable, KeyEvent>[];
270
318
  };
319
+ type TuiAttentionConfigView = {
320
+ enabled: boolean;
321
+ notifications: boolean;
322
+ sound: boolean;
323
+ volume: number;
324
+ sound_pack: string;
325
+ sounds: Partial<Record<TuiAttentionSoundName, string>>;
326
+ };
271
327
  type TuiConfigView = Pick<PluginConfig, "$schema" | "theme" | "plugin"> & NonNullable<PluginConfig["tui"]> & {
272
328
  leader_timeout: number;
329
+ attention: TuiAttentionConfigView;
273
330
  plugin_enabled?: Record<string, boolean>;
274
331
  keybinds: TuiBindingLookupView;
275
332
  };
@@ -400,6 +457,7 @@ export type TuiWorkspace = {
400
457
  };
401
458
  export type TuiPluginApi = {
402
459
  app: TuiApp;
460
+ attention: TuiAttention;
403
461
  /**
404
462
  * Legacy `api.command` API kept so v1 plugins can initialize. Remove in v2.
405
463
  *
package/dist/tui.js CHANGED
@@ -4,3 +4,4 @@ export { formatCommandBindings, formatKeySequence } from "@opentui/keymap/extras
4
4
  export function createBindingLookup(config, options) {
5
5
  return createKeymapBindingLookup(config ?? {}, options);
6
6
  }
7
+ export const TuiAttentionSoundNames = ["default", "question", "permission", "error", "done", "subagent_done"];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/plugin",
4
- "version": "0.0.0-dev-202605130054",
4
+ "version": "0.0.0-dev-202605130151",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -26,14 +26,14 @@
26
26
  "dist"
27
27
  ],
28
28
  "dependencies": {
29
- "@opencode-ai/sdk": "0.0.0-dev-202605130054",
29
+ "@opencode-ai/sdk": "0.0.0-dev-202605130151",
30
30
  "effect": "4.0.0-beta.65",
31
31
  "zod": "4.1.8"
32
32
  },
33
33
  "peerDependencies": {
34
- "@opentui/core": ">=0.2.6",
35
- "@opentui/keymap": ">=0.2.6",
36
- "@opentui/solid": ">=0.2.6"
34
+ "@opentui/core": ">=0.2.8",
35
+ "@opentui/keymap": ">=0.2.8",
36
+ "@opentui/solid": ">=0.2.8"
37
37
  },
38
38
  "peerDependenciesMeta": {
39
39
  "@opentui/core": {
@@ -47,9 +47,9 @@
47
47
  }
48
48
  },
49
49
  "devDependencies": {
50
- "@opentui/core": "0.2.6",
51
- "@opentui/keymap": "0.2.6",
52
- "@opentui/solid": "0.2.6",
50
+ "@opentui/core": "0.2.8",
51
+ "@opentui/keymap": "0.2.8",
52
+ "@opentui/solid": "0.2.8",
53
53
  "@tsconfig/node22": "22.0.2",
54
54
  "@types/node": "24.12.2",
55
55
  "typescript": "5.8.2",