@pellux/goodvibes-agent 1.0.11 → 1.0.13
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/package/main.js +310 -44
- package/docs/README.md +1 -1
- package/docs/connected-host.md +1 -1
- package/docs/getting-started.md +2 -2
- package/docs/tools-and-commands.md +4 -4
- package/package.json +1 -1
- package/src/input/command-registry.ts +12 -0
- package/src/shell/ui-openers.ts +66 -0
- package/src/tools/agent-harness-local-operations.ts +36 -1
- package/src/tools/agent-harness-metadata.ts +62 -0
- package/src/tools/agent-harness-tool-schema.ts +5 -0
- package/src/tools/agent-harness-tool.ts +26 -8
- package/src/tools/agent-harness-ui-surface-metadata.ts +82 -0
- package/src/version.ts +1 -1
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, 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.
|
|
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, single connected-host capability inspection, and live connected-host readiness are model-visible through Agent-owned tools. Visible UI routing includes the command browser, reasoning-effort picker, live process output, runtime activity, settings, workspaces, and pickers the user can open. Local memory, note, persona, skill, and routine create editors can also run through confirmed workspace actions. 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.
|
package/docs/connected-host.md
CHANGED
|
@@ -54,7 +54,7 @@ Agent owns the operator assistant TUI, local profiles, local memory/notes/routin
|
|
|
54
54
|
|
|
55
55
|
Agent does not own connected-host lifecycle. It does not provide commands to install, expose, start, stop, restart, or mutate the connected GoodVibes host.
|
|
56
56
|
|
|
57
|
-
The model can inspect this boundary with `agent_harness` mode `connected_host`. That report includes the configured base URL, token presence, token path, allowed route families, first-class Agent tool capabilities, tool availability, and blocked capabilities. Allowed capabilities are limited to read-only operator briefing, explicit allowlisted approval/automation/schedule actions, isolated Agent Knowledge read/ingest, confirmed channel or notification delivery, confirmed reminder schedules, and configured media generation. Blocked capabilities include connected-host lifecycle, listener mutation, default or non-Agent knowledge fallback, hidden background Agent jobs, implicit delegated review, route/account creation, and arbitrary connected-host mutations.
|
|
57
|
+
The model can inspect this boundary with `agent_harness` mode `connected_host`. That report includes the configured base URL, token presence, token path, allowed route families, first-class Agent tool capabilities, tool availability, and blocked capabilities. Allowed capabilities are limited to read-only operator briefing, explicit allowlisted approval/automation/schedule actions, isolated Agent Knowledge read/ingest, confirmed channel or notification delivery, confirmed reminder schedules, and configured media generation. Blocked capabilities include connected-host lifecycle, listener mutation, default or non-Agent knowledge fallback, hidden background Agent jobs, implicit delegated review, route/account creation, and arbitrary connected-host mutations. To inspect one surface without parsing the full report, use `connected_host_capability` with `capabilityId`, `target`, or `query`; it returns either the allowed capability with related route families or the blocked capability with the boundary reason.
|
|
58
58
|
|
|
59
59
|
The model can inspect live connected-host readiness with `agent_harness` mode `connected_host_status`. That report uses the same read-only status probe as the CLI: it checks the connected-host status route, verifies the SDK version pin, checks the isolated Agent Knowledge status route when token and version posture allow it, reports endpoint bindings and token posture without printing token values, and returns actionable findings. It is diagnostic only and does not expose host start, stop, restart, install, listener, or account-management operations.
|
|
60
60
|
|
package/docs/getting-started.md
CHANGED
|
@@ -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, conversation search, prompt-history search, slash-command mode, file picker, block actions, context, runtime activity, 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.
|
|
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, single connected-host capability inspection, 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, command browser, conversation search, prompt-history search, slash-command mode, file picker, block actions, context, runtime activity, live process output, bookmarks, model/provider/reasoning-effort 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. Direct local create editors for memory, notes, personas, skills, and routines can execute from submitted fields through `run_workspace_action` and `agent_local_registry` with confirmation. 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
|
|
|
@@ -138,7 +138,7 @@ If the GoodVibes API is not on `http://127.0.0.1:3421`, pass `--runtime-url http
|
|
|
138
138
|
|
|
139
139
|
Agent Knowledge is an Agent-owned product segment. Agent commands must not fall back to default knowledge or other product-specific knowledge spaces.
|
|
140
140
|
|
|
141
|
-
Host lifecycle commands are not part of GoodVibes Agent. Use Agent Workspace -> Home -> Host compatibility, Doctor diagnostics, and Review health for diagnostics. CLI status/doctor/compat commands are scriptable mirrors for install checks. The model-visible `connected_host` harness report lists usable Agent route families, first-class tool capabilities, and blocked lifecycle/non-Agent surfaces. The model-visible `connected_host_status` report performs the live read-only connected-host status and isolated Agent Knowledge readiness checks, reports SDK compatibility, token posture, endpoint bindings, route readiness, and actionable findings, and still does not expose host start/stop/restart/install operations.
|
|
141
|
+
Host lifecycle commands are not part of GoodVibes Agent. Use Agent Workspace -> Home -> Host compatibility, Doctor diagnostics, and Review health for diagnostics. CLI status/doctor/compat commands are scriptable mirrors for install checks. The model-visible `connected_host` harness report lists usable Agent route families, first-class tool capabilities, and blocked lifecycle/non-Agent surfaces. `connected_host_capability` inspects one allowed or blocked connected-host capability and returns the matching route families, first-class tools, and boundary reason. The model-visible `connected_host_status` report performs the live read-only connected-host status and isolated Agent Knowledge readiness checks, reports SDK compatibility, token posture, endpoint bindings, route readiness, and actionable findings, and still does not expose host start/stop/restart/install operations.
|
|
142
142
|
|
|
143
143
|
## Current Product Notes
|
|
144
144
|
|
|
@@ -43,16 +43,16 @@ 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 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.
|
|
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 or one connected-host capability, 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.
|
|
50
50
|
- `agent_work_plan`: keep the visible Agent-local work plan current from the conversation.
|
|
51
51
|
- `agent_channel_send`, `agent_notify`, `agent_reminder_schedule`, and `agent_media_generate`: perform confirmed external delivery, notification, reminder, or media actions when the user explicitly asks.
|
|
52
52
|
|
|
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.
|
|
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; `connected_host_capability` returns one allowed or blocked connected-host capability by `capabilityId`, `target`, or `query` with related route families and boundary text; 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, TTS provider/voice pickers, session/profile pickers, the panel-picker compatibility route, security/knowledge/subscription operator surfaces, conversation search, prompt-history search, slash-command mode, file picker, block actions, bookmarks, context inspector, runtime activity monitor, 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/reasoning-effort pickers, TTS provider/voice pickers, session/profile pickers, the panel-picker compatibility route, security/knowledge/subscription operator surfaces, conversation search, prompt-history search, slash-command mode, command browser, file picker, block actions, bookmarks, context inspector, runtime activity monitor, live process output, 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
|
|
|
@@ -62,7 +62,7 @@ CLI mirror modes are catalog and parser inspection only. When the user asks the
|
|
|
62
62
|
|
|
63
63
|
Setting writes, setting resets, keybinding writes/resets, UI surface routing, slash-command invocation, workspace-action invocation, local record deletion, channel sends, notifications, reminders, media generation, and connected-host operator mutations require explicit user request and confirmation. Secret-backed settings are stored through the secret manager, and connected-host lifecycle/listener settings remain read-only in Agent.
|
|
64
64
|
|
|
65
|
-
Selection-based local workspace actions use the same bridge. `agent_harness` reports the required model tool for each local action; for actions that depend on the TUI selection, call `run_workspace_action` with the selected local `recordId`. Note promotion actions can prefill and create memory, personas, skills, routines, or isolated Agent Knowledge URL ingests through the matching first-class model tool. Profile creation schemas include the current runtime starter-template inventory, and routine schedule schemas prefill the selected routine when `recordId` or a `routineId` field matches a local routine.
|
|
65
|
+
Selection-based local workspace actions use the same bridge. `agent_harness` reports the required model tool for each local action; for actions that depend on the TUI selection, call `run_workspace_action` with the selected local `recordId`. Direct local create editors for memory, notes, personas, skills, and routines can execute from submitted `fields` through `run_workspace_action`; the harness validates required fields, requires `confirm:true` and `explicitUserRequest`, and dispatches through `agent_local_registry`. Note promotion actions can prefill and create memory, personas, skills, routines, or isolated Agent Knowledge URL ingests through the matching first-class model tool. Profile creation schemas include the current runtime starter-template inventory, and routine schedule schemas prefill the selected routine when `recordId` or a `routineId` field matches a local routine.
|
|
66
66
|
|
|
67
67
|
Use first-class Agent tools before falling back to slash-command mirrors. Slash-command execution is for harness parity and scriptable mirrors, not for bypassing Agent product boundaries.
|
|
68
68
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-agent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
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",
|
|
@@ -90,6 +90,12 @@ export interface CommandShellUiOpeners {
|
|
|
90
90
|
openModelPickerWithTarget?: (target: import('./model-picker.ts').ModelPickerTarget) => boolean;
|
|
91
91
|
openProviderModelPickerWithTarget?: (target: import('./model-picker.ts').ModelPickerTarget) => boolean;
|
|
92
92
|
openProviderPicker?: () => void;
|
|
93
|
+
openReasoningEffortPicker?: () => {
|
|
94
|
+
opened: boolean;
|
|
95
|
+
model?: string;
|
|
96
|
+
levels?: readonly string[];
|
|
97
|
+
reason?: 'unsupported';
|
|
98
|
+
};
|
|
93
99
|
openContextInspector?: () => void;
|
|
94
100
|
openBookmarkModal?: () => void;
|
|
95
101
|
openProcessModal?: () => void;
|
|
@@ -98,6 +104,12 @@ export interface CommandShellUiOpeners {
|
|
|
98
104
|
openSlashCommandMode?: (query?: string) => boolean;
|
|
99
105
|
openFilePicker?: (options?: { injectMode?: boolean; query?: string }) => boolean;
|
|
100
106
|
openBlockActions?: () => boolean;
|
|
107
|
+
openLiveTail?: (target?: string) => {
|
|
108
|
+
opened: boolean;
|
|
109
|
+
processId?: string;
|
|
110
|
+
label?: string;
|
|
111
|
+
reason?: 'no_processes' | 'not_found';
|
|
112
|
+
};
|
|
101
113
|
jumpToBookmark?: (key: string) => void;
|
|
102
114
|
scrollToLine?: (line: number) => void;
|
|
103
115
|
openHelpOverlay?: () => void;
|
package/src/shell/ui-openers.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { ConversationManager } from '../core/conversation';
|
|
|
4
4
|
import type { CommandContext } from '../input/command-registry.ts';
|
|
5
5
|
import type { InputHandler } from '../input/handler.ts';
|
|
6
6
|
import type { PanelManager } from '../panels/panel-manager.ts';
|
|
7
|
+
import { EFFORT_DESCRIPTIONS } from '@pellux/goodvibes-sdk/platform/providers';
|
|
7
8
|
import type { ProviderRegistry } from '@pellux/goodvibes-sdk/platform/providers';
|
|
8
9
|
import type { MutableRuntimeState } from '@/runtime/index.ts';
|
|
9
10
|
import type { FeatureFlagManager } from '@/runtime/index.ts';
|
|
@@ -229,6 +230,45 @@ export function wireShellUiOpeners(options: WireShellUiOpenersOptions): void {
|
|
|
229
230
|
});
|
|
230
231
|
};
|
|
231
232
|
|
|
233
|
+
commandContext.openReasoningEffortPicker = () => {
|
|
234
|
+
const currentModel = providerRegistry.getCurrentModel();
|
|
235
|
+
const validLevels = currentModel.reasoningEffort ?? [];
|
|
236
|
+
if (validLevels.length === 0) {
|
|
237
|
+
return { opened: false, model: currentModel.displayName, levels: [], reason: 'unsupported' };
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const current = String(runtime.reasoningEffort || configManager.get('provider.reasoningEffort') || 'medium');
|
|
241
|
+
const descriptions: Record<string, string> = {
|
|
242
|
+
...EFFORT_DESCRIPTIONS,
|
|
243
|
+
medium: 'Balanced speed and quality (default)',
|
|
244
|
+
};
|
|
245
|
+
input.openSelection(
|
|
246
|
+
'Reasoning Effort',
|
|
247
|
+
validLevels.map((level) => ({
|
|
248
|
+
id: level,
|
|
249
|
+
label: level,
|
|
250
|
+
detail: level === current ? `current - ${descriptions[level] ?? level}` : (descriptions[level] ?? level),
|
|
251
|
+
})),
|
|
252
|
+
{ preSelectId: current, allowSearch: false },
|
|
253
|
+
(result) => {
|
|
254
|
+
if (!result) return;
|
|
255
|
+
const level = result.item.id as 'instant' | 'low' | 'medium' | 'high';
|
|
256
|
+
runtime.reasoningEffort = level;
|
|
257
|
+
configManager.set('provider.reasoningEffort', level);
|
|
258
|
+
commandContext.print([
|
|
259
|
+
'Reasoning effort set',
|
|
260
|
+
` level ${level}`,
|
|
261
|
+
].join('\n'));
|
|
262
|
+
render();
|
|
263
|
+
},
|
|
264
|
+
);
|
|
265
|
+
return {
|
|
266
|
+
opened: true,
|
|
267
|
+
model: currentModel.displayName,
|
|
268
|
+
levels: validLevels,
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
|
|
232
272
|
commandContext.openSelection = (title, items, opts, callback) => {
|
|
233
273
|
input.openSelection(title, items, opts, callback);
|
|
234
274
|
};
|
|
@@ -255,6 +295,32 @@ export function wireShellUiOpeners(options: WireShellUiOpenersOptions): void {
|
|
|
255
295
|
render();
|
|
256
296
|
};
|
|
257
297
|
|
|
298
|
+
commandContext.openLiveTail = (target?: string) => {
|
|
299
|
+
input.processModal.refresh();
|
|
300
|
+
const entries = input.processModal.entries;
|
|
301
|
+
if (entries.length === 0) {
|
|
302
|
+
return { opened: false, reason: 'no_processes' };
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const normalizedTarget = target?.trim().toLowerCase() ?? '';
|
|
306
|
+
const entry = normalizedTarget.length > 0
|
|
307
|
+
? entries.find((candidate) => (
|
|
308
|
+
candidate.id.toLowerCase() === normalizedTarget
|
|
309
|
+
|| candidate.label.toLowerCase().includes(normalizedTarget)
|
|
310
|
+
))
|
|
311
|
+
: input.processModal.getSelected() ?? entries[0];
|
|
312
|
+
|
|
313
|
+
if (!entry) {
|
|
314
|
+
return { opened: false, reason: 'not_found' };
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
input.modalOpened('liveTail');
|
|
318
|
+
input.processModal.close();
|
|
319
|
+
input.liveTailModal.open(entry);
|
|
320
|
+
render();
|
|
321
|
+
return { opened: true, processId: entry.id, label: entry.label };
|
|
322
|
+
};
|
|
323
|
+
|
|
258
324
|
commandContext.openConversationSearch = (query?: string) => {
|
|
259
325
|
input.searchManager.open();
|
|
260
326
|
const searchQuery = query?.trim() ?? '';
|
|
@@ -172,7 +172,7 @@ function editorForOperation(context: CommandContext, operation: AgentWorkspaceLo
|
|
|
172
172
|
function localRegistryArgsFromEditor(editor: AgentWorkspaceLocalEditor, fields: Readonly<Record<string, string>>, id?: string): Record<string, unknown> {
|
|
173
173
|
const read = fieldReader(editor, fields);
|
|
174
174
|
if (editor.kind === 'memory') return { domain: 'memory', action: editor.mode === 'update' ? 'update' : 'create', id, cls: read('cls'), scope: read('scope'), summary: read('summary'), detail: read('detail'), tags: splitList(read('tags')), confidence: read('confidence'), provenance: editor.recordId ? 'agent-harness-local-operation' : 'agent-harness-note-promotion' };
|
|
175
|
-
if (editor.kind === 'note') return { domain: 'note', action: 'update', id, title: read('title'), body: read('body'), sourceUrl: read('sourceUrl'), tags: splitList(read('tags')), provenance: 'agent-harness-local-operation' };
|
|
175
|
+
if (editor.kind === 'note') return { domain: 'note', action: editor.mode === 'update' ? 'update' : 'create', id, title: read('title'), body: read('body'), sourceUrl: read('sourceUrl'), tags: splitList(read('tags')), provenance: editor.recordId ? 'agent-harness-local-operation' : 'agent-harness-note-promotion' };
|
|
176
176
|
if (editor.kind === 'persona') return { domain: 'persona', action: editor.mode === 'update' ? 'update' : 'create', id, name: read('name'), description: read('description'), body: read('body'), tags: splitList(read('tags')), triggers: splitList(read('triggers')), activate: read('activate'), provenance: editor.recordId ? 'agent-harness-local-operation' : 'agent-harness-note-promotion' };
|
|
177
177
|
if (editor.kind === 'skill') return { domain: 'skill', action: editor.mode === 'update' ? 'update' : 'create', id, name: read('name'), description: read('description'), procedure: read('procedure'), tags: splitList(read('tags')), triggers: splitList(read('triggers')), requiresEnv: splitList(read('requiresEnv')), requiresCommands: splitList(read('requiresCommands')), enabled: isAffirmative(read('enabled')), provenance: editor.recordId ? 'agent-harness-local-operation' : 'agent-harness-note-promotion' };
|
|
178
178
|
return { domain: 'routine', action: editor.mode === 'update' ? 'update' : 'create', id, name: read('name'), description: read('description'), steps: read('steps'), tags: splitList(read('tags')), triggers: splitList(read('triggers')), requiresEnv: splitList(read('requiresEnv')), requiresCommands: splitList(read('requiresCommands')), enabled: isAffirmative(read('enabled')), provenance: editor.recordId ? 'agent-harness-local-operation' : 'agent-harness-note-promotion' };
|
|
@@ -206,6 +206,41 @@ export function describeLocalWorkspaceModelExecution(action: AgentWorkspaceActio
|
|
|
206
206
|
return { tool: 'agent_local_registry', selectedRecordDomain: 'note', action: 'create', requiresRecordId: true };
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
export async function runLocalWorkspaceEditorAction(
|
|
210
|
+
deps: AgentHarnessLocalOperationDeps,
|
|
211
|
+
editor: AgentWorkspaceLocalEditor,
|
|
212
|
+
args: AgentHarnessLocalOperationArgs,
|
|
213
|
+
): Promise<HarnessResult> {
|
|
214
|
+
const fields = readFieldMap(args.fields);
|
|
215
|
+
const missing = missingRequiredFields(editor, fields);
|
|
216
|
+
if (missing.length > 0) {
|
|
217
|
+
return output({
|
|
218
|
+
status: 'missing_required_fields',
|
|
219
|
+
missing,
|
|
220
|
+
editor: describeEditor(editor),
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
const confirmationError = requireConfirmed(args, 'Workspace local registry editor action');
|
|
224
|
+
if (confirmationError) return error(confirmationError);
|
|
225
|
+
if (
|
|
226
|
+
editor.kind !== 'memory'
|
|
227
|
+
&& editor.kind !== 'note'
|
|
228
|
+
&& editor.kind !== 'persona'
|
|
229
|
+
&& editor.kind !== 'skill'
|
|
230
|
+
&& editor.kind !== 'routine'
|
|
231
|
+
) {
|
|
232
|
+
return output({
|
|
233
|
+
status: 'model_tool_required',
|
|
234
|
+
editor: describeEditor(editor),
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
return executeTool(
|
|
238
|
+
deps.toolRegistry,
|
|
239
|
+
'agent_local_registry',
|
|
240
|
+
localRegistryArgsFromEditor(editor, fields, editor.recordId),
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
209
244
|
export async function runLocalWorkspaceAction(
|
|
210
245
|
deps: AgentHarnessLocalOperationDeps,
|
|
211
246
|
action: AgentWorkspaceAction,
|
|
@@ -356,6 +356,68 @@ export function connectedHostRouteFamilies(): readonly Record<string, unknown>[]
|
|
|
356
356
|
];
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
+
function normalizeCapabilityQuery(value: string): string {
|
|
360
|
+
return value.trim().toLowerCase();
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function recordTextMatches(record: Record<string, unknown>, query: string): boolean {
|
|
364
|
+
if (!query) return false;
|
|
365
|
+
const values = Object.values(record).flatMap((value) => Array.isArray(value) ? value : [value]);
|
|
366
|
+
return values
|
|
367
|
+
.filter((value): value is string | number | boolean => (
|
|
368
|
+
typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean'
|
|
369
|
+
))
|
|
370
|
+
.map((value) => String(value).toLowerCase())
|
|
371
|
+
.some((value) => value === query || value.includes(query));
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
function relatedConnectedHostRouteFamilies(capability: Record<string, unknown>): readonly Record<string, unknown>[] {
|
|
375
|
+
const modelTools = Array.isArray(capability.modelTools)
|
|
376
|
+
? capability.modelTools.filter((tool): tool is string => typeof tool === 'string')
|
|
377
|
+
: [];
|
|
378
|
+
const capabilityId = typeof capability.id === 'string' ? capability.id : '';
|
|
379
|
+
return connectedHostRouteFamilies().filter((family) => {
|
|
380
|
+
const familyTools = Array.isArray(family.modelTools)
|
|
381
|
+
? family.modelTools.filter((tool): tool is string => typeof tool === 'string')
|
|
382
|
+
: [];
|
|
383
|
+
if (familyTools.some((tool) => modelTools.includes(tool))) return true;
|
|
384
|
+
return capabilityId.length > 0 && recordTextMatches(family, capabilityId);
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export function describeConnectedHostCapability(
|
|
389
|
+
toolRegistry: ToolRegistry,
|
|
390
|
+
rawQuery: string,
|
|
391
|
+
): Record<string, unknown> | null {
|
|
392
|
+
const query = normalizeCapabilityQuery(rawQuery);
|
|
393
|
+
if (!query) return null;
|
|
394
|
+
|
|
395
|
+
const allowedCapability = connectedHostCapabilityMap(toolRegistry).find((capability) => recordTextMatches(capability, query));
|
|
396
|
+
if (allowedCapability) {
|
|
397
|
+
return {
|
|
398
|
+
status: 'allowed',
|
|
399
|
+
capability: allowedCapability,
|
|
400
|
+
relatedRouteFamilies: relatedConnectedHostRouteFamilies(allowedCapability),
|
|
401
|
+
statusMode: 'Use agent_harness mode:"connected_host_status" for live read-only reachability, SDK compatibility, token posture, and Agent Knowledge route readiness.',
|
|
402
|
+
boundary: 'Use only the listed first-class model tools, slash-command families, and workspace categories. Mutations still require explicit confirmation through those tools or command bridges.',
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
const blockedCapability = blockedConnectedHostCapabilities().find((capability) => recordTextMatches(capability, query));
|
|
407
|
+
if (blockedCapability) {
|
|
408
|
+
return {
|
|
409
|
+
status: 'blocked',
|
|
410
|
+
capability: blockedCapability,
|
|
411
|
+
allowed: false,
|
|
412
|
+
available: false,
|
|
413
|
+
boundary: 'This connected-host surface is intentionally not exposed to the model as an Agent operation.',
|
|
414
|
+
statusMode: 'Use agent_harness mode:"connected_host_status" only for read-only readiness diagnostics.',
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
return null;
|
|
419
|
+
}
|
|
420
|
+
|
|
359
421
|
export function connectedHostSummary(context: CommandContext, toolRegistry: ToolRegistry): Record<string, unknown> {
|
|
360
422
|
const shellPaths = context.workspace.shellPaths;
|
|
361
423
|
const homeDirectory = shellPaths?.homeDirectory ?? context.platform.configManager.getHomeDirectory() ?? '';
|
|
@@ -5,6 +5,7 @@ export const AGENT_HARNESS_MODES = [
|
|
|
5
5
|
'commands', 'command', 'run_command', 'settings', 'get_setting', 'set_setting',
|
|
6
6
|
'reset_setting', 'workspace', 'workspace_categories', 'workspace_actions',
|
|
7
7
|
'workspace_action', 'run_workspace_action', 'tools', 'connected_host', 'connected_host_status',
|
|
8
|
+
'connected_host_capability',
|
|
8
9
|
] as const;
|
|
9
10
|
|
|
10
11
|
const KEY_COMBO_PARAMETER_SCHEMA = {
|
|
@@ -91,6 +92,10 @@ export const AGENT_HARNESS_PARAMETER_PROPERTIES = {
|
|
|
91
92
|
type: 'string',
|
|
92
93
|
description: 'Optional UI target, such as a model-picker target or settings target key.',
|
|
93
94
|
},
|
|
95
|
+
capabilityId: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
description: 'Connected-host allowed or blocked capability id for mode connected_host_capability, such as agent-knowledge-read or connected-host-lifecycle.',
|
|
98
|
+
},
|
|
94
99
|
category: {
|
|
95
100
|
type: 'string',
|
|
96
101
|
description: 'Setting category filter such as provider, behavior, tools, ui, tts, permissions, automation, or surfaces.',
|
|
@@ -21,12 +21,13 @@ import { blockedHarnessCliCommandTokens, describeHarnessCliCommand, listHarnessC
|
|
|
21
21
|
import { describeHarnessKeybinding, listHarnessKeybindings, listHarnessShortcuts, resetHarnessKeybinding, setHarnessKeybinding, totalHarnessKeybindings, totalHarnessShortcuts } from './agent-harness-keybinding-metadata.ts';
|
|
22
22
|
import { describeHarnessPanel, listHarnessPanels, openHarnessPanel, totalHarnessPanels } from './agent-harness-panel-metadata.ts';
|
|
23
23
|
import { connectedHostStatusSummary } from './agent-harness-connected-host-status.ts';
|
|
24
|
-
import { describeLocalWorkspaceModelExecution, runLocalWorkspaceAction } from './agent-harness-local-operations.ts';
|
|
24
|
+
import { describeLocalWorkspaceModelExecution, runLocalWorkspaceAction, runLocalWorkspaceEditorAction } from './agent-harness-local-operations.ts';
|
|
25
25
|
import { listHarnessModelTools } from './agent-harness-model-tool-catalog.ts';
|
|
26
26
|
import { AGENT_HARNESS_MODES, AGENT_HARNESS_PARAMETER_PROPERTIES } from './agent-harness-tool-schema.ts';
|
|
27
27
|
import { describeHarnessUiSurface, listHarnessUiSurfaces, openHarnessUiSurface, totalHarnessUiSurfaces } from './agent-harness-ui-surface-metadata.ts';
|
|
28
28
|
import {
|
|
29
29
|
connectedHostSummary,
|
|
30
|
+
describeConnectedHostCapability,
|
|
30
31
|
describeCommandPolicy,
|
|
31
32
|
settingsPolicySummary,
|
|
32
33
|
} from './agent-harness-metadata.ts';
|
|
@@ -58,6 +59,7 @@ interface AgentHarnessToolArgs {
|
|
|
58
59
|
readonly key?: unknown;
|
|
59
60
|
readonly value?: unknown;
|
|
60
61
|
readonly target?: unknown;
|
|
62
|
+
readonly capabilityId?: unknown;
|
|
61
63
|
readonly category?: unknown;
|
|
62
64
|
readonly prefix?: unknown;
|
|
63
65
|
readonly includeHidden?: unknown;
|
|
@@ -238,11 +240,11 @@ function describeWorkspaceAction(
|
|
|
238
240
|
}
|
|
239
241
|
|
|
240
242
|
function localEditorModelExecution(editorKind: AgentWorkspaceEditorKind): string {
|
|
241
|
-
if (editorKind === 'memory') return '
|
|
242
|
-
if (editorKind === 'note') return '
|
|
243
|
-
if (editorKind === 'persona') return '
|
|
244
|
-
if (editorKind === 'skill') return '
|
|
245
|
-
if (editorKind === 'routine') return '
|
|
243
|
+
if (editorKind === 'memory') return 'run_workspace_action can execute this editor from fields through agent_local_registry domain:"memory"; agent_local_registry also supports list/search/get/review/stale/delete.';
|
|
244
|
+
if (editorKind === 'note') return 'run_workspace_action can execute this editor from fields through agent_local_registry domain:"note"; agent_local_registry also supports list/search/get/review/stale/delete.';
|
|
245
|
+
if (editorKind === 'persona') return 'run_workspace_action can execute this editor from fields through agent_local_registry domain:"persona"; agent_local_registry also supports list/search/get/use/clear_active/review/stale/delete.';
|
|
246
|
+
if (editorKind === 'skill') return 'run_workspace_action can execute this editor from fields through agent_local_registry domain:"skill"; agent_local_registry also supports list/search/get/enable/disable/review/stale/delete.';
|
|
247
|
+
if (editorKind === 'routine') return 'run_workspace_action can execute this editor from fields through agent_local_registry domain:"routine"; agent_local_registry also supports list/search/get/enable/disable/start/review/stale/delete.';
|
|
246
248
|
if (editorKind === 'learned-behavior') return 'run_workspace_action can create the learned behavior from fields.';
|
|
247
249
|
if (editorKind === 'profile') return 'run_workspace_action dispatches the matching /agent-profile create command.';
|
|
248
250
|
return 'Use the command field, editor schema, or a first-class Agent model tool when available.';
|
|
@@ -409,6 +411,15 @@ async function runWorkspaceEditorAction(
|
|
|
409
411
|
}
|
|
410
412
|
|
|
411
413
|
if (!isAgentWorkspaceCommandEditorKind(editor.kind)) {
|
|
414
|
+
if (
|
|
415
|
+
editor.kind === 'memory'
|
|
416
|
+
|| editor.kind === 'note'
|
|
417
|
+
|| editor.kind === 'persona'
|
|
418
|
+
|| editor.kind === 'skill'
|
|
419
|
+
|| editor.kind === 'routine'
|
|
420
|
+
) {
|
|
421
|
+
return runLocalWorkspaceEditorAction(deps, editor, args);
|
|
422
|
+
}
|
|
412
423
|
return output({
|
|
413
424
|
status: 'model_tool_required',
|
|
414
425
|
action: action.id,
|
|
@@ -504,7 +515,7 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
|
|
|
504
515
|
name: 'agent_harness',
|
|
505
516
|
description: [
|
|
506
517
|
'Discover and operate the GoodVibes Agent harness from the main conversation.',
|
|
507
|
-
'Use this tool to inspect Agent workspace actions, built-in panels, top-level CLI mirrors, UI surfaces, keybindings, slash commands with policy metadata, model tools, connected-host capabilities, and Agent settings, or to invoke a workspace action/command through the same in-process command registry the user uses in the TUI.',
|
|
518
|
+
'Use this tool to inspect Agent workspace actions, built-in panels, top-level CLI mirrors, UI surfaces, keybindings, slash commands with policy metadata, model tools, connected-host capabilities or one connected-host capability detail, and Agent settings, or to invoke a workspace action/command through the same in-process command registry the user uses in the TUI.',
|
|
508
519
|
'Discovery modes are read-only. Setting/keybinding writes, resets, UI routing, slash command invocation, and workspace action invocation require confirm:true plus explicitUserRequest.',
|
|
509
520
|
'This tool preserves Agent product boundaries: connected-host lifecycle and listener posture stay externally owned, connected-host mode reports allowed and blocked route families, and secret-backed settings store raw values through the secret manager while config receives only a secret reference.',
|
|
510
521
|
].join(' '),
|
|
@@ -543,7 +554,7 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
|
|
|
543
554
|
workspace: 'Use mode:"workspace_actions" to list and mode:"workspace_action" for editor schemas; set includeParameters:true on workspace_actions to inline editor schemas.',
|
|
544
555
|
settings: 'Use mode:"settings", mode:"get_setting", mode:"set_setting", and mode:"reset_setting".',
|
|
545
556
|
tools: 'Use mode:"tools" with includeParameters:true to inspect first-class model tool schemas.',
|
|
546
|
-
connectedHost: 'Use mode:"connected_host" for the connected-host capability map and blocked boundaries.',
|
|
557
|
+
connectedHost: 'Use mode:"connected_host" for the connected-host capability map and blocked boundaries. Use mode:"connected_host_capability" with capabilityId, target, or query for one allowed or blocked capability.',
|
|
547
558
|
connectedHostStatus: 'Use mode:"connected_host_status" for live read-only host reachability, SDK compatibility, token posture, and Agent Knowledge route readiness.',
|
|
548
559
|
},
|
|
549
560
|
settingsPolicy: settingsPolicySummary(),
|
|
@@ -682,6 +693,13 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
|
|
|
682
693
|
return output({ tools, returned: tools.length, total: deps.toolRegistry.getToolDefinitions().length });
|
|
683
694
|
}
|
|
684
695
|
if (args.mode === 'connected_host') return output(connectedHostSummary(deps.commandContext, deps.toolRegistry));
|
|
696
|
+
if (args.mode === 'connected_host_capability') {
|
|
697
|
+
const query = readString(args.capabilityId || args.target || args.query);
|
|
698
|
+
const capability = describeConnectedHostCapability(deps.toolRegistry, query);
|
|
699
|
+
return capability
|
|
700
|
+
? output(capability)
|
|
701
|
+
: error(`Unknown connected-host capability ${query || '<missing>'}. Use mode:"connected_host" to inspect allowed and blocked capability ids.`);
|
|
702
|
+
}
|
|
685
703
|
if (args.mode === 'connected_host_status') return output(await connectedHostStatusSummary(deps.commandContext, deps.toolRegistry));
|
|
686
704
|
return error(`Unhandled agent_harness mode: ${args.mode}`);
|
|
687
705
|
} catch (err) {
|
|
@@ -312,6 +312,34 @@ const UI_SURFACES: readonly UiSurfaceDefinition[] = [
|
|
|
312
312
|
return opened(surface, { target: 'main' });
|
|
313
313
|
},
|
|
314
314
|
},
|
|
315
|
+
{
|
|
316
|
+
id: 'reasoning-effort-picker',
|
|
317
|
+
label: 'Reasoning Effort Picker',
|
|
318
|
+
kind: 'picker',
|
|
319
|
+
summary: 'Interactive reasoning-effort selector for the current main chat model when that model exposes effort levels.',
|
|
320
|
+
command: '/effort',
|
|
321
|
+
preferredModelRoute: 'Use settings/get_setting/set_setting for provider.reasoningEffort when a concrete level is known, or run_workspace_action setup-effort with confirmation.',
|
|
322
|
+
available: (context) => typeof context.openReasoningEffortPicker === 'function',
|
|
323
|
+
open: (context) => {
|
|
324
|
+
const surface = findSurfaceById('reasoning-effort-picker')!;
|
|
325
|
+
if (!context.openReasoningEffortPicker) return routeUnavailable(surface);
|
|
326
|
+
const result = context.openReasoningEffortPicker();
|
|
327
|
+
return result.opened
|
|
328
|
+
? opened(surface, {
|
|
329
|
+
model: result.model,
|
|
330
|
+
levels: result.levels ?? [],
|
|
331
|
+
})
|
|
332
|
+
: {
|
|
333
|
+
status: 'not_opened',
|
|
334
|
+
surface: surface.id,
|
|
335
|
+
kind: surface.kind,
|
|
336
|
+
model: result.model,
|
|
337
|
+
levels: result.levels ?? [],
|
|
338
|
+
reason: result.reason ?? 'unsupported',
|
|
339
|
+
note: 'The current model does not expose configurable reasoning effort levels.',
|
|
340
|
+
};
|
|
341
|
+
},
|
|
342
|
+
},
|
|
315
343
|
{
|
|
316
344
|
id: 'tts-provider-picker',
|
|
317
345
|
label: 'TTS Provider Picker',
|
|
@@ -421,6 +449,38 @@ const UI_SURFACES: readonly UiSurfaceDefinition[] = [
|
|
|
421
449
|
return opened(surface);
|
|
422
450
|
},
|
|
423
451
|
},
|
|
452
|
+
{
|
|
453
|
+
id: 'live-tail',
|
|
454
|
+
label: 'Live Process Output',
|
|
455
|
+
kind: 'modal',
|
|
456
|
+
summary: 'Visible live-output tail for a running process, opened by the same shell route as Enter from the runtime activity monitor.',
|
|
457
|
+
command: 'F2, Enter',
|
|
458
|
+
preferredModelRoute: 'Use this only for visible supervision of a running process output stream; use first-class model tools or confirmed commands for actual operations.',
|
|
459
|
+
parameters: ['target', 'query', 'prefix', 'key'],
|
|
460
|
+
available: (context) => typeof context.openLiveTail === 'function',
|
|
461
|
+
open: (context, args) => {
|
|
462
|
+
const surface = findSurfaceById('live-tail')!;
|
|
463
|
+
if (!context.openLiveTail) return routeUnavailable(surface);
|
|
464
|
+
const target = surfaceInputText(args);
|
|
465
|
+
const result = context.openLiveTail(target);
|
|
466
|
+
return result.opened
|
|
467
|
+
? opened(surface, {
|
|
468
|
+
target: target ?? 'selected',
|
|
469
|
+
processId: result.processId,
|
|
470
|
+
label: result.label,
|
|
471
|
+
})
|
|
472
|
+
: {
|
|
473
|
+
status: 'not_opened',
|
|
474
|
+
surface: surface.id,
|
|
475
|
+
kind: surface.kind,
|
|
476
|
+
target: target ?? 'selected',
|
|
477
|
+
reason: result.reason ?? 'not_found',
|
|
478
|
+
note: result.reason === 'no_processes'
|
|
479
|
+
? 'There are no running shell processes to tail.'
|
|
480
|
+
: 'No running shell process matched the requested target.',
|
|
481
|
+
};
|
|
482
|
+
},
|
|
483
|
+
},
|
|
424
484
|
{
|
|
425
485
|
id: 'conversation-search',
|
|
426
486
|
label: 'Conversation Search',
|
|
@@ -480,6 +540,28 @@ const UI_SURFACES: readonly UiSurfaceDefinition[] = [
|
|
|
480
540
|
};
|
|
481
541
|
},
|
|
482
542
|
},
|
|
543
|
+
{
|
|
544
|
+
id: 'command-browser',
|
|
545
|
+
label: 'Command Browser',
|
|
546
|
+
kind: 'picker',
|
|
547
|
+
summary: 'Registry-driven searchable slash-command browser opened by /commands and /help.',
|
|
548
|
+
command: '/commands',
|
|
549
|
+
preferredModelRoute: 'Use commands/command for model-readable slash-command discovery and run_command for confirmed command execution.',
|
|
550
|
+
available: (context) => typeof context.executeCommand === 'function',
|
|
551
|
+
open: async (context) => {
|
|
552
|
+
const surface = findSurfaceById('command-browser')!;
|
|
553
|
+
if (!context.executeCommand) return routeUnavailable(surface);
|
|
554
|
+
const handled = await context.executeCommand('commands', []);
|
|
555
|
+
return handled
|
|
556
|
+
? opened(surface, { command: '/commands' })
|
|
557
|
+
: {
|
|
558
|
+
status: 'not_opened',
|
|
559
|
+
surface: surface.id,
|
|
560
|
+
kind: surface.kind,
|
|
561
|
+
note: 'The slash-command registry did not handle /commands in the current runtime.',
|
|
562
|
+
};
|
|
563
|
+
},
|
|
564
|
+
},
|
|
483
565
|
{
|
|
484
566
|
id: 'file-picker',
|
|
485
567
|
label: 'File Picker',
|
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.
|
|
9
|
+
let _version = '1.0.13';
|
|
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 {
|