@pellux/goodvibes-agent 1.0.7 → 1.0.9

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/docs/README.md CHANGED
@@ -22,7 +22,7 @@ Important baseline constraints:
22
22
  - Agent depends on `@pellux/goodvibes-sdk@0.33.35`.
23
23
  - Agent connects to a GoodVibes host owned outside this product.
24
24
  - Agent does not start, stop, restart, install, uninstall, or own the connected GoodVibes host.
25
- - User-facing Agent workspace actions, built-in panels, modal/overlay/picker UI surfaces, top-level CLI mirrors, fixed shortcuts, configurable keybindings, slash commands, command policy metadata, model tools, settings, local registries, connected-host capability boundaries, and live connected-host readiness are model-visible through Agent-owned tools. Mutations and visible UI routing remain explicit and confirmation-gated.
25
+ - User-facing Agent workspace actions, built-in panels, modal/overlay/picker UI surfaces, named operator surfaces, top-level CLI mirrors, fixed shortcuts, configurable keybindings, slash commands, command policy metadata, model tools, settings, local registries, connected-host capability boundaries, and live connected-host readiness are model-visible through Agent-owned tools. Mutations and visible UI routing remain explicit and confirmation-gated.
26
26
  - Agent Knowledge uses only `/api/goodvibes-agent/knowledge/*`; there is no default knowledge or non-Agent product fallback.
27
27
  - Agent supports isolated Agent homes with `GOODVIBES_AGENT_HOME=<path>` and named profile homes with `goodvibes-agent profiles create <name> --template <starter> --yes` plus `--agent-profile <name>`.
28
28
  - Agent supports connected-host URL overrides with `--runtime-url http://host:port` or `GOODVIBES_AGENT_RUNTIME_URL=http://host:port`; these only change the Agent connection target.
@@ -44,7 +44,7 @@ After setup has been applied once, the TUI opens directly into the Agent operato
44
44
 
45
45
  Press `/` inside the Agent workspace to search every workspace action by name, category, command, or detail. Use that finder before reaching for shell commands; CLI subcommands are scriptable mirrors of these TUI workflows.
46
46
 
47
- The model can inspect and use the same harness surface through Agent-owned tools. `agent_harness` exposes workspace action discovery, built-in panel discovery/routing, modal/overlay/picker UI surface discovery/routing, top-level CLI mirror discovery, fixed shortcut and configurable keybinding discovery, keybinding mutation with confirmation, slash-command discovery, command policy metadata, command execution with confirmation, model tool discovery, settings inspection/mutation, connected-host capability inventory, and live connected-host readiness posture. CLI mirror modes are read-only catalog/parser inspection and point the model to the matching in-process tool, workspace action, setting mode, or slash-command mirror. Panel modes expose catalog/open state and route visible panel/workspace changes through the current Agent shell bridge with confirmation. UI surface modes expose help, shortcuts, context, bookmarks, model/provider pickers, session/profile pickers, settings, MCP workspace, onboarding, and Agent workspace entrypoints; `open_ui_surface` is confirmation-gated and only performs visible shell navigation. Shortcut modes expose the fixed runtime/editor shortcuts and the live keybindings table; confirmed keybinding edits write the same `keybindings.json` file the user edits and reload the runtime manager. Workspace action discovery can include editor field schemas with `includeParameters:true`, including starter-template defaults for profile creation and selected-routine defaults for routine schedule promotion when `recordId` is supplied. Selection-based local workspace actions accept a local `recordId`, so the model can use the same note promotion and local registry flows as the TUI. First-class model tools cover the main product workflows directly: Agent Knowledge, Agent Knowledge ingest, Agent-local memory/notes/personas/skills/routines, operator actions, notifications, channel sends, reminders, generated media, and work plans.
47
+ The model can inspect and use the same harness surface through Agent-owned tools. `agent_harness` exposes workspace action discovery, built-in panel discovery/routing, modal/overlay/picker UI surface discovery/routing, top-level CLI mirror discovery, fixed shortcut and configurable keybinding discovery, keybinding mutation with confirmation, slash-command discovery, command policy metadata, command execution with confirmation, model tool discovery, settings inspection/mutation, connected-host capability inventory, and live connected-host readiness posture. CLI mirror modes are read-only catalog/parser inspection and point the model to the matching in-process tool, workspace action, setting mode, or slash-command mirror. Panel modes expose catalog/open state and route visible panel/workspace changes through the current Agent shell bridge with confirmation. UI surface modes expose help, shortcuts, context, bookmarks, model/provider pickers, TTS provider/voice pickers, session/profile pickers, the panel-picker compatibility route, security/knowledge/subscription operator surfaces, settings, MCP workspace, onboarding, and Agent workspace entrypoints; `open_ui_surface` is confirmation-gated and only performs visible shell navigation. Shortcut modes expose the fixed runtime/editor shortcuts and the live keybindings table; confirmed keybinding edits write the same `keybindings.json` file the user edits and reload the runtime manager. Workspace action discovery can include editor field schemas with `includeParameters:true`, including starter-template defaults for profile creation and selected-routine defaults for routine schedule promotion when `recordId` is supplied. Selection-based local workspace actions accept a local `recordId`, so the model can use the same note promotion and local registry flows as the TUI. First-class model tools cover the main product workflows directly: Agent Knowledge, Agent Knowledge ingest, Agent-local memory/notes/personas/skills/routines, operator actions, notifications, channel sends, reminders, generated media, and work plans.
48
48
 
49
49
  Use the Artifacts area for concrete files and generated output: attach images to prompts, export conversations or saved sessions, ingest local source files and URL lists into Agent Knowledge, import bookmarks or browser history, inspect source records, and generate media artifacts from confirmed prompts.
50
50
 
@@ -43,7 +43,7 @@ Host-management and coding-first commands that would imply connected-host lifecy
43
43
 
44
44
  The main Agent model has an Agent-owned harness bridge rather than generic SDK settings/context control. Use these model tools as the supported parity layer:
45
45
 
46
- - `agent_harness`: inspect workspace categories/actions, inspect built-in panels, inspect modal/overlay/picker UI surfaces, inspect top-level CLI mirrors, inspect fixed shortcuts and configurable keybindings, inspect slash commands and command policy metadata, run concrete workspace or slash-command mirrors with confirmation, inspect model tools, inspect or change Agent settings/keybindings, inspect connected-host capability boundaries, and inspect live connected-host readiness.
46
+ - `agent_harness`: inspect workspace categories/actions, inspect built-in panels, inspect modal/overlay/picker UI surfaces and named operator surfaces, inspect top-level CLI mirrors, inspect fixed shortcuts and configurable keybindings, inspect slash commands and command policy metadata, run concrete workspace or slash-command mirrors with confirmation, inspect model tools, inspect or change Agent settings/keybindings, inspect connected-host capability boundaries, and inspect live connected-host readiness.
47
47
  - `agent_local_registry`: inspect and maintain Agent-local memory, notes, personas, skills, skill bundles, and routines. Deleting local records requires `confirm:true` and `explicitUserRequest`.
48
48
  - `agent_knowledge` and `agent_knowledge_ingest`: ask/search and ingest into the isolated Agent Knowledge segment.
49
49
  - `agent_operator_briefing` and `agent_operator_action`: inspect connected work/approval/automation posture, or run exact confirmed approval/automation actions.
@@ -52,7 +52,7 @@ The main Agent model has an Agent-owned harness bridge rather than generic SDK s
52
52
 
53
53
  `agent_harness` discovery modes are read-only. `summary` reports the model access map; `panels` and `panel` return the built-in panel catalog, current open/focused state, and each panel's matching Agent workspace route; `ui_surfaces` and `ui_surface` return modal, overlay, picker, and workspace entrypoints with shell-opener availability and preferred model routes; `cli_commands` and `cli_command` return top-level package CLI mirror metadata, parser output, blocked command tokens, and preferred in-process model routes; `shortcuts` returns fixed runtime/editor shortcuts plus configurable keybindings; `keybindings` and `keybinding` return the live resolved keybinding table, default bindings, custom state, and config path; `commands` and `command` return slash-command descriptions plus effect/confirmation/preferred-tool/boundary policy metadata; `workspace_actions` lists Agent workspace actions and can inline editor field schemas with `includeParameters:true`; `workspace_action` returns one action with its editor schema; `tools` can inline model tool JSON schemas with `includeParameters:true`; `settings` returns setting descriptors plus setting policy; `connected_host` returns the connected-host route families, allowed capabilities, blocked capabilities, and first-class tool availability; and `connected_host_status` performs a live read-only check of the connected-host status and Agent Knowledge status routes and reports endpoint bindings, token posture, SDK compatibility, route readiness, and findings without printing token values.
54
54
 
55
- `open_ui_surface` is a confirmation-gated visible navigation mode for the same shell surfaces the user can open: Agent workspace, settings, MCP workspace, model/provider pickers, session/profile pickers, bookmarks, context inspector, help, shortcuts, and onboarding. It does not perform hidden operations; use first-class model tools, settings modes, workspace actions, or confirmed slash-command mirrors for actual state changes.
55
+ `open_ui_surface` is a confirmation-gated visible navigation mode for the same shell surfaces the user can open: Agent workspace, settings, MCP workspace, model/provider pickers, TTS provider/voice pickers, session/profile pickers, the panel-picker compatibility route, security/knowledge/subscription operator surfaces, bookmarks, context inspector, help, shortcuts, and onboarding. It does not perform hidden operations; use first-class model tools, settings modes, workspace actions, or confirmed slash-command mirrors for actual state changes.
56
56
 
57
57
  `set_keybinding` and `reset_keybinding` are confirmation-gated control modes. They write the same Agent `keybindings.json` file exposed by `/keybindings`, reload the runtime keybinding manager, and leave fixed runtime/editor shortcuts read-only.
58
58
 
@@ -20,7 +20,7 @@ GoodVibes Agent supports spoken turns as an Agent TUI feature. Text output remai
20
20
 
21
21
  `/config tts` opens the fullscreen configuration workspace for streaming provider, voice, and spoken-turn model routing.
22
22
 
23
- The model can inspect the same settings through `agent_harness` settings modes and can change Agent-owned TTS settings with explicit confirmation. Connected-host listener or lifecycle settings remain outside Agent ownership.
23
+ The model can inspect the same settings through `agent_harness` settings modes, open the visible TTS provider or voice picker through `open_ui_surface`, and change Agent-owned TTS settings with explicit confirmation. Connected-host listener or lifecycle settings remain outside Agent ownership.
24
24
 
25
25
  ## Playback Requirements
26
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pellux/goodvibes-agent",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "private": false,
5
5
  "description": "GoodVibes personal operator assistant TUI with a proactive Agent product brain, isolated Agent Knowledge, local profiles, routines, skills, personas, and explicit build delegation.",
6
6
  "type": "module",
@@ -1,4 +1,4 @@
1
- import type { CommandRegistry } from '../command-registry.ts';
1
+ import type { CommandContext, CommandRegistry, SlashCommand } from '../command-registry.ts';
2
2
  import type { SelectionItem } from '../selection-modal.ts';
3
3
  import { EFFORT_DESCRIPTIONS } from '@pellux/goodvibes-sdk/platform/providers';
4
4
  import { REASONING_BUDGET_MAP } from '@pellux/goodvibes-sdk/platform/providers';
@@ -6,6 +6,134 @@ import { compactConversation, requireKeybindingsManager, requireProviderApi } fr
6
6
  import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
7
7
  import { logger } from '@pellux/goodvibes-sdk/platform/utils';
8
8
 
9
+ function commandCategory(commandName: string): string {
10
+ if ([
11
+ 'agent',
12
+ 'agent-profile',
13
+ 'brief',
14
+ 'health',
15
+ 'welcome',
16
+ 'setup',
17
+ 'tasks',
18
+ 'approval',
19
+ 'automation',
20
+ 'delegate',
21
+ 'schedule',
22
+ 'workplan',
23
+ 'plan',
24
+ ].includes(commandName)) return 'Agent Operator';
25
+ if ([
26
+ 'knowledge',
27
+ 'memory',
28
+ 'notes',
29
+ 'personas',
30
+ 'skills',
31
+ 'routines',
32
+ ].includes(commandName)) return 'Knowledge & Local Context';
33
+ if ([
34
+ 'channels',
35
+ 'notify',
36
+ 'qrcode',
37
+ 'pair',
38
+ ].includes(commandName)) return 'Channels';
39
+ if ([
40
+ 'model',
41
+ 'provider',
42
+ 'providers',
43
+ 'effort',
44
+ 'pin',
45
+ 'unpin',
46
+ 'refresh-models',
47
+ 'mode',
48
+ 'tts',
49
+ 'voice',
50
+ 'media',
51
+ 'image',
52
+ ].includes(commandName)) return 'Model, Voice & Media';
53
+ if ([
54
+ 'settings',
55
+ 'config',
56
+ 'keybindings',
57
+ 'shortcuts',
58
+ 'mcp',
59
+ 'secrets',
60
+ 'auth',
61
+ 'accounts',
62
+ 'subscription',
63
+ 'compat',
64
+ 'security',
65
+ 'trust',
66
+ 'bundle',
67
+ ].includes(commandName)) return 'Setup & Security';
68
+ if ([
69
+ 'save',
70
+ 'load',
71
+ 'sessions',
72
+ 'session',
73
+ 'conversation',
74
+ 'export',
75
+ 'title',
76
+ 'clear',
77
+ 'reset',
78
+ 'compact',
79
+ 'undo',
80
+ 'redo',
81
+ 'retry',
82
+ 'expand',
83
+ 'collapse',
84
+ 'context',
85
+ 'bookmarks',
86
+ 'paste',
87
+ 'next-error',
88
+ 'prev-error',
89
+ ].includes(commandName)) return 'Conversation';
90
+ return 'Tools & System';
91
+ }
92
+
93
+ function commandDetail(command: SlashCommand): string {
94
+ const parts = [command.description];
95
+ if (command.usage) parts.push(`usage: /${command.name} ${command.usage}`);
96
+ if (command.aliases?.length) parts.push(`aliases: ${command.aliases.map((alias) => `/${alias}`).join(', ')}`);
97
+ return parts.join(' | ');
98
+ }
99
+
100
+ function listRegisteredCommandItems(registry: CommandRegistry): SelectionItem[] {
101
+ return registry.list()
102
+ .slice()
103
+ .sort((a, b) => a.name.localeCompare(b.name))
104
+ .map((command) => ({
105
+ id: `/${command.name}`,
106
+ label: `/${command.name}`,
107
+ detail: commandDetail(command),
108
+ category: commandCategory(command.name),
109
+ primaryAction: 'select',
110
+ actions: '[Enter] run command',
111
+ }));
112
+ }
113
+
114
+ function registeredCommandListText(registry: CommandRegistry): string {
115
+ const commands = listRegisteredCommandItems(registry);
116
+ return [
117
+ 'Open the Agent workspace first, then press / inside it to search every product action.',
118
+ '',
119
+ 'Registered slash commands:',
120
+ ...commands.map((item) => ` ${item.label} - ${item.detail}`),
121
+ ].join('\n');
122
+ }
123
+
124
+ function openRegisteredCommandSelection(registry: CommandRegistry, ctx: CommandContext): void {
125
+ ctx.openSelection?.('Help - Commands', listRegisteredCommandItems(registry), { allowSearch: true }, (result) => {
126
+ if (!result) return;
127
+ const command = result.item.id;
128
+ if (command.startsWith('/')) {
129
+ const parts = command.slice(1).trim().split(/\s+/);
130
+ const name = parts[0];
131
+ const cmdArgs = parts.slice(1);
132
+ void (ctx.executeCommand?.(name, cmdArgs) ?? registry.execute(name, cmdArgs, ctx));
133
+ }
134
+ });
135
+ }
136
+
9
137
  export function registerShellCoreCommands(registry: CommandRegistry): void {
10
138
  registry.register({
11
139
  name: 'model',
@@ -53,6 +181,10 @@ export function registerShellCoreCommands(registry: CommandRegistry): void {
53
181
  aliases: ['cmds'],
54
182
  description: 'Browse all commands in a scrollable list',
55
183
  handler(_args, ctx) {
184
+ if (ctx.openSelection) {
185
+ openRegisteredCommandSelection(registry, ctx);
186
+ return;
187
+ }
56
188
  if (ctx.openHelpOverlay) {
57
189
  ctx.openHelpOverlay();
58
190
  return;
@@ -120,74 +252,10 @@ export function registerShellCoreCommands(registry: CommandRegistry): void {
120
252
  argsHint: '[command]',
121
253
  handler(_args, ctx) {
122
254
  if (ctx.openSelection) {
123
- const items: SelectionItem[] = [
124
- { id: '/agent', label: '/agent', detail: 'Open the Agent operator workspace; press / inside it to search every action', category: 'Agent Operator' },
125
- { id: '/agent setup', label: '/agent setup', detail: 'Open the Agent setup workspace; workspace search can find every setup action', category: 'Agent Operator' },
126
- { id: '/agent channels', label: '/agent channels', detail: 'Open channel readiness and delivery safety', category: 'Agent Operator' },
127
- { id: '/agent knowledge', label: '/agent knowledge', detail: 'Open isolated Agent Knowledge workflows', category: 'Agent Operator' },
128
- { id: '/agent voice-media', label: '/agent voice-media', detail: 'Open voice, TTS, image, browser, and media setup', category: 'Agent Operator' },
129
- { id: '/home', label: '/home', detail: 'Alias for the Agent operator workspace', category: 'Agent Operator' },
130
- { id: '/brief', label: '/brief', detail: 'Show a concise Agent operator briefing and next actions', category: 'Agent Operator' },
131
- { id: '/knowledge', label: '/knowledge', detail: 'Inspect isolated Agent Knowledge status, ask/search, and ingest flows', category: 'Agent Operator' },
132
- { id: '/memory', label: '/memory', detail: 'Review Agent-local memory records', category: 'Agent Operator' },
133
- { id: '/notes', label: '/notes', detail: 'Open Agent-local scratchpad notes for source triage and temporary context', category: 'Agent Operator' },
134
- { id: '/personas', label: '/personas', detail: 'Create, review, and activate Agent-local personas', category: 'Agent Operator' },
135
- { id: '/skills', label: '/skills', detail: 'Create, review, and enable reusable Agent skills', category: 'Agent Operator' },
136
- { id: '/routines', label: '/routines', detail: 'Create, review, start, and promote Agent routines explicitly', category: 'Agent Operator' },
137
- { id: '/automation', label: '/automation', detail: 'Run confirmed connected-host automation actions', category: 'Agent Operator' },
138
- { id: '/delegate', label: '/delegate [task]', detail: 'Explicit build/fix/review handoff to GoodVibes TUI', category: 'Agent Operator' },
139
- { id: '/channels', label: '/channels', detail: 'Inspect messaging-channel readiness without sending messages', category: 'Agent Operator' },
140
- { id: '/pair', label: '/pair', detail: 'Pair companion clients through connected GoodVibes host', category: 'Agent Operator' },
141
- { id: '/model', label: '/model [id]', detail: 'Select LLM model', category: 'Model & Provider' },
142
- { id: '/provider', label: '/provider [name]', detail: 'Switch provider', category: 'Model & Provider' },
143
- { id: '/effort', label: '/effort [level]', detail: 'Reasoning effort (instant/low/medium/high)', category: 'Model & Provider' },
144
- { id: '/config', label: '/config [category|key]', detail: 'Open fullscreen configuration workspace', category: 'Config & Display' },
145
- { id: '/expand', label: '/expand [type]', detail: 'Expand blocks (all|thinking|tool|code)', category: 'Config & Display' },
146
- { id: '/collapse', label: '/collapse [type]', detail: 'Collapse blocks', category: 'Config & Display' },
147
- { id: '/bookmarks', label: '/bookmarks', detail: 'List bookmarked blocks', category: 'Config & Display' },
148
- { id: '/clear', label: '/clear', detail: 'Clear display (keep context)', category: 'Conversation' },
149
- { id: '/reset', label: '/reset', detail: 'Clear display + context', category: 'Conversation' },
150
- { id: '/compact', label: '/compact', detail: 'Summarize to free context', category: 'Conversation' },
151
- { id: '/export', label: '/export [file] --yes', detail: 'Export as markdown', category: 'Conversation' },
152
- { id: '/title', label: '/title [text]', detail: 'Show or set title', category: 'Conversation' },
153
- { id: '/save', label: '/save [name]', detail: 'Save session', category: 'Conversation' },
154
- { id: '/load', label: '/load <name>', detail: 'Load session', category: 'Conversation' },
155
- { id: '/sessions', label: '/sessions', detail: 'List saved sessions', category: 'Conversation' },
156
- { id: '/session', label: '/session', detail: 'Current session info', category: 'Conversation' },
157
- { id: '/session list', label: '/session list', detail: 'List all sessions', category: 'Conversation' },
158
- { id: '/session rename', label: '/session rename <name>', detail: 'Rename current session', category: 'Conversation' },
159
- { id: '/session resume', label: '/session resume <id>', detail: 'Load and resume a session', category: 'Conversation' },
160
- { id: '/session fork', label: '/session fork [name]', detail: 'Fork current session to new ID', category: 'Conversation' },
161
- { id: '/session save', label: '/session save [name]', detail: 'Force-save current session', category: 'Conversation' },
162
- { id: '/session info', label: '/session info [id]', detail: 'Show session details', category: 'Conversation' },
163
- { id: '/session export', label: '/session export <id> [format]', detail: 'Export session as markdown/text', category: 'Conversation' },
164
- { id: '/session search', label: '/session search <query>', detail: 'Search across all sessions', category: 'Conversation' },
165
- { id: '/session delete', label: '/session delete <id> --yes', detail: 'Delete a session', category: 'Conversation' },
166
- { id: '/undo', label: '/undo', detail: 'Remove last turn', category: 'Conversation' },
167
- { id: '/redo', label: '/redo', detail: 'Restore undone turn', category: 'Conversation' },
168
- { id: '/retry', label: '/retry [text]', detail: 'Re-send last message', category: 'Conversation' },
169
- { id: '/paste', label: '/paste', detail: 'Insert clipboard text or image into the prompt', category: 'Tools & System' },
170
- { id: '/shortcuts', label: '/shortcuts', detail: 'View keyboard shortcuts reference', category: 'Tools & System' },
171
- { id: '/commands', label: '/commands', detail: 'Browse all commands in a scrollable list', category: 'Tools & System' },
172
- { id: '/compat', label: '/compat', detail: 'Inspect connected-host and Agent Knowledge compatibility', category: 'Tools & System' },
173
- { id: '/secrets', label: '/secrets set|link|get|test|list|delete', detail: 'Manage encrypted and provider-backed secrets', category: 'Tools & System' },
174
- { id: '/bundle', label: '/bundle export|inspect|import', detail: 'Manage redacted Agent support bundles', category: 'Tools & System' },
175
- { id: '/help', label: '/help', detail: 'This help', category: 'Tools & System' },
176
- { id: '/quit', label: '/quit', detail: 'Exit', category: 'Tools & System' },
177
- ];
178
- ctx.openSelection('Help — Commands', items, { allowSearch: true }, (result) => {
179
- if (!result) return;
180
- const command = result.item.id;
181
- if (command.startsWith('/')) {
182
- const parts = command.slice(1).trim().split(/\s+/);
183
- const name = parts[0];
184
- const cmdArgs = parts.slice(1);
185
- void (ctx.executeCommand?.(name, cmdArgs) ?? registry.execute(name, cmdArgs, ctx));
186
- }
187
- });
255
+ openRegisteredCommandSelection(registry, ctx);
188
256
  return;
189
257
  }
190
- ctx.print('Open the Agent workspace first, then press / inside it to search every product action. Slash commands remain available: /agent, /brief, /knowledge, /memory, /notes, /personas, /skills, /routines, /channels, /approval, /automation, /schedule, /delegate, /model, /provider, /config, /compat, /bundle, /paste, /sessions, /bookmarks, /save, /load, /undo, /redo, /retry, /clear, /reset, /compact, /export, /title, /effort, /expand, /collapse, /quit');
258
+ ctx.print(registeredCommandListText(registry));
191
259
  },
192
260
  });
193
261
 
@@ -592,7 +592,7 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
592
592
  if (args.mode === 'open_ui_surface') {
593
593
  const confirmationError = requireConfirmedAction(args, 'UI surface routing');
594
594
  if (confirmationError) return error(confirmationError);
595
- return output(openHarnessUiSurface(deps.commandContext, args));
595
+ return output(await openHarnessUiSurface(deps.commandContext, args));
596
596
  }
597
597
  if (args.mode === 'shortcuts') return output(listHarnessShortcuts(deps.commandContext, args));
598
598
  if (args.mode === 'keybindings') return output(listHarnessKeybindings(deps.commandContext, args));
@@ -1,4 +1,5 @@
1
1
  import type { CommandContext } from '../input/command-registry.ts';
2
+ import { openTtsProviderPicker, openTtsVoicePicker } from '../input/tts-settings-actions.ts';
2
3
 
3
4
  type UiSurfaceKind = 'overlay' | 'modal' | 'workspace' | 'picker';
4
5
 
@@ -11,6 +12,7 @@ export interface AgentHarnessUiSurfaceArgs {
11
12
  readonly key?: unknown;
12
13
  readonly prefix?: unknown;
13
14
  readonly limit?: unknown;
15
+ readonly pane?: unknown;
14
16
  }
15
17
 
16
18
  interface UiSurfaceDefinition {
@@ -22,7 +24,7 @@ interface UiSurfaceDefinition {
22
24
  readonly preferredModelRoute: string;
23
25
  readonly parameters?: readonly string[];
24
26
  readonly available: (context: CommandContext) => boolean;
25
- readonly open: (context: CommandContext, args: AgentHarnessUiSurfaceArgs) => Record<string, unknown>;
27
+ readonly open: (context: CommandContext, args: AgentHarnessUiSurfaceArgs) => Record<string, unknown> | Promise<Record<string, unknown>>;
26
28
  }
27
29
 
28
30
  function readString(value: unknown): string {
@@ -71,6 +73,57 @@ function settingsTarget(args: AgentHarnessUiSurfaceArgs): string | undefined {
71
73
  return readString(args.target || args.key || args.prefix) || undefined;
72
74
  }
73
75
 
76
+ function providerTarget(args: AgentHarnessUiSurfaceArgs): string | undefined {
77
+ return readString(args.target || args.key || args.prefix) || undefined;
78
+ }
79
+
80
+ function optionalPane(args: AgentHarnessUiSurfaceArgs): 'top' | 'bottom' | undefined {
81
+ const pane = readString(args.pane);
82
+ return pane === 'top' || pane === 'bottom' ? pane : undefined;
83
+ }
84
+
85
+ function openAgentWorkspaceCategory(
86
+ context: CommandContext,
87
+ surface: UiSurfaceDefinition,
88
+ categoryId: string,
89
+ extra: Record<string, unknown> = {},
90
+ ): Record<string, unknown> {
91
+ if (!context.openAgentWorkspace) return routeUnavailable(surface);
92
+ context.openAgentWorkspace(categoryId);
93
+ return opened(surface, { categoryId, ...extra });
94
+ }
95
+
96
+ function openPanelWorkspaceSurface(
97
+ context: CommandContext,
98
+ args: AgentHarnessUiSurfaceArgs,
99
+ surface: UiSurfaceDefinition,
100
+ options: {
101
+ readonly panelId: string;
102
+ readonly categoryId: string;
103
+ readonly opener?: (() => void) | undefined;
104
+ },
105
+ ): Record<string, unknown> {
106
+ if (context.openAgentWorkspace) {
107
+ context.openAgentWorkspace(options.categoryId);
108
+ return opened(surface, { categoryId: options.categoryId, panelId: options.panelId });
109
+ }
110
+ if (options.opener) {
111
+ options.opener();
112
+ return opened(surface, { categoryId: options.categoryId, panelId: options.panelId, route: 'named-opener' });
113
+ }
114
+ if (context.showPanel) {
115
+ const pane = optionalPane(args);
116
+ context.showPanel(options.panelId, pane);
117
+ return opened(surface, {
118
+ categoryId: options.categoryId,
119
+ panelId: options.panelId,
120
+ pane: pane ?? 'default',
121
+ route: 'panel-bridge',
122
+ });
123
+ }
124
+ return routeUnavailable(surface);
125
+ }
126
+
74
127
  const UI_SURFACES: readonly UiSurfaceDefinition[] = [
75
128
  {
76
129
  id: 'agent-workspace',
@@ -89,6 +142,89 @@ const UI_SURFACES: readonly UiSurfaceDefinition[] = [
89
142
  return opened(surface, { categoryId: categoryId ?? 'default' });
90
143
  },
91
144
  },
145
+ {
146
+ id: 'panel-picker',
147
+ label: 'Panel Picker',
148
+ kind: 'picker',
149
+ summary: 'Keyboard-accessible operator panel route that now opens the Agent Workspace home surface.',
150
+ command: 'Ctrl+P',
151
+ preferredModelRoute: 'Use panels/panel/open_panel for panel catalog and routing, or workspace_actions for concrete model operation.',
152
+ available: (context) => typeof context.openPanelPicker === 'function' || typeof context.openAgentWorkspace === 'function',
153
+ open: (context) => {
154
+ const surface = findSurfaceById('panel-picker')!;
155
+ if (context.openPanelPicker) {
156
+ context.openPanelPicker();
157
+ return opened(surface, { categoryId: 'home', route: 'panel-picker' });
158
+ }
159
+ return openAgentWorkspaceCategory(context, surface, 'home');
160
+ },
161
+ },
162
+ {
163
+ id: 'security-panel',
164
+ label: 'Security Panel',
165
+ kind: 'workspace',
166
+ summary: 'Security review operator surface for token posture, MCP attack paths, policy posture, and plugin risk.',
167
+ command: '/security',
168
+ preferredModelRoute: 'Use workspace_actions for security review actions or run_command /security review for compact read-only output.',
169
+ parameters: ['pane'],
170
+ available: (context) => (
171
+ typeof context.openAgentWorkspace === 'function'
172
+ || typeof context.openSecurityPanel === 'function'
173
+ || typeof context.showPanel === 'function'
174
+ ),
175
+ open: (context, args) => {
176
+ const surface = findSurfaceById('security-panel')!;
177
+ return openPanelWorkspaceSurface(context, args, surface, {
178
+ panelId: 'security',
179
+ categoryId: 'tools',
180
+ opener: context.openSecurityPanel,
181
+ });
182
+ },
183
+ },
184
+ {
185
+ id: 'knowledge-panel',
186
+ label: 'Knowledge Panel',
187
+ kind: 'workspace',
188
+ summary: 'Agent Knowledge operator surface for isolated status, source libraries, graph review, ask/search, and ingest forms.',
189
+ command: '/knowledge',
190
+ preferredModelRoute: 'Use agent_knowledge, agent_knowledge_ingest, workspace_actions, or run_command /knowledge for concrete model operation.',
191
+ parameters: ['pane'],
192
+ available: (context) => (
193
+ typeof context.openAgentWorkspace === 'function'
194
+ || typeof context.openKnowledgePanel === 'function'
195
+ || typeof context.showPanel === 'function'
196
+ ),
197
+ open: (context, args) => {
198
+ const surface = findSurfaceById('knowledge-panel')!;
199
+ return openPanelWorkspaceSurface(context, args, surface, {
200
+ panelId: 'knowledge',
201
+ categoryId: 'knowledge',
202
+ opener: context.openKnowledgePanel,
203
+ });
204
+ },
205
+ },
206
+ {
207
+ id: 'subscription-panel',
208
+ label: 'Subscription Panel',
209
+ kind: 'workspace',
210
+ summary: 'Provider subscription operator surface for subscription review, provider inspection, login, logout, and bundle flows.',
211
+ command: '/subscription',
212
+ preferredModelRoute: 'Use workspace_actions or confirmed run_command /subscription mirrors for concrete subscription operation.',
213
+ parameters: ['pane'],
214
+ available: (context) => (
215
+ typeof context.openAgentWorkspace === 'function'
216
+ || typeof context.openSubscriptionPanel === 'function'
217
+ || typeof context.showPanel === 'function'
218
+ ),
219
+ open: (context, args) => {
220
+ const surface = findSurfaceById('subscription-panel')!;
221
+ return openPanelWorkspaceSurface(context, args, surface, {
222
+ panelId: 'subscription',
223
+ categoryId: 'setup',
224
+ opener: context.openSubscriptionPanel,
225
+ });
226
+ },
227
+ },
92
228
  {
93
229
  id: 'settings',
94
230
  label: 'Settings',
@@ -163,6 +299,40 @@ const UI_SURFACES: readonly UiSurfaceDefinition[] = [
163
299
  return opened(surface, { target: 'main' });
164
300
  },
165
301
  },
302
+ {
303
+ id: 'tts-provider-picker',
304
+ label: 'TTS Provider Picker',
305
+ kind: 'picker',
306
+ summary: 'Interactive streaming TTS provider picker opened from the Agent settings flow.',
307
+ command: '/config tts.provider',
308
+ preferredModelRoute: 'Use settings/get_setting/set_setting for tts.provider when a concrete provider id is known; use open_ui_surface only to visibly navigate.',
309
+ available: (context) => typeof context.openSelection === 'function' && Boolean(context.platform.voiceProviderRegistry),
310
+ open: (context) => {
311
+ const surface = findSurfaceById('tts-provider-picker')!;
312
+ if (!context.openSelection || !context.platform.voiceProviderRegistry) return routeUnavailable(surface);
313
+ const handled = openTtsProviderPicker(context);
314
+ return handled ? opened(surface, { target: 'tts.provider' }) : routeUnavailable(surface);
315
+ },
316
+ },
317
+ {
318
+ id: 'tts-voice-picker',
319
+ label: 'TTS Voice Picker',
320
+ kind: 'picker',
321
+ summary: 'Interactive TTS voice picker opened from the Agent settings flow for the selected or supplied provider.',
322
+ command: '/config tts.voice',
323
+ preferredModelRoute: 'Use settings/get_setting/set_setting/reset_setting for tts.voice when a concrete voice id is known; use open_ui_surface only to visibly navigate.',
324
+ parameters: ['target'],
325
+ available: (context) => typeof context.openSelection === 'function' && Boolean(context.platform.voiceService),
326
+ open: async (context, args) => {
327
+ const surface = findSurfaceById('tts-voice-picker')!;
328
+ if (!context.openSelection || !context.platform.voiceService) return routeUnavailable(surface);
329
+ const providerId = providerTarget(args);
330
+ const handled = await openTtsVoicePicker(context, providerId);
331
+ return handled
332
+ ? opened(surface, { target: 'tts.voice', providerId: providerId ?? 'configured-default' })
333
+ : routeUnavailable(surface);
334
+ },
335
+ },
166
336
  {
167
337
  id: 'session-picker',
168
338
  label: 'Session Picker',
@@ -326,7 +496,7 @@ export function describeHarnessUiSurface(context: CommandContext, args: AgentHar
326
496
  return surface ? describeSurface(context, surface) : null;
327
497
  }
328
498
 
329
- export function openHarnessUiSurface(context: CommandContext, args: AgentHarnessUiSurfaceArgs): Record<string, unknown> {
499
+ export async function openHarnessUiSurface(context: CommandContext, args: AgentHarnessUiSurfaceArgs): Promise<Record<string, unknown>> {
330
500
  const surfaceId = readString(args.surfaceId || args.query);
331
501
  const surface = UI_SURFACES.find((entry) => entry.id === surfaceId || entry.label.toLowerCase() === surfaceId.toLowerCase());
332
502
  if (!surface) {
@@ -336,8 +506,9 @@ export function openHarnessUiSurface(context: CommandContext, args: AgentHarness
336
506
  availableSurfaces: UI_SURFACES.map((entry) => entry.id),
337
507
  };
338
508
  }
509
+ const routed = await surface.open(context, args);
339
510
  return {
340
- ...surface.open(context, args),
511
+ ...routed,
341
512
  descriptor: describeSurface(context, surface),
342
513
  };
343
514
  }
package/src/version.ts CHANGED
@@ -6,7 +6,7 @@ import { join } from 'node:path';
6
6
  // The prebuild script updates the fallback value before compilation.
7
7
  // Uses import.meta.dir (Bun) to locate package.json relative to this file,
8
8
  // which is correct regardless of the process working directory.
9
- let _version = '1.0.7';
9
+ let _version = '1.0.9';
10
10
  let _sdkVersion = '0.33.35';
11
11
  try {
12
12
  const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', 'package.json'), 'utf-8')) as {