@pellux/goodvibes-agent 1.0.26 → 1.0.28
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 +279 -130
- package/docs/README.md +1 -1
- package/docs/getting-started.md +1 -1
- package/docs/tools-and-commands.md +2 -2
- package/package.json +1 -1
- package/src/tools/agent-harness-metadata.ts +181 -26
- package/src/tools/agent-harness-tool.ts +8 -15
- package/src/tools/agent-harness-workspace-editor-execution.ts +75 -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, single workspace-action lookup/execution, built-in panels and single-panel lookup, modal/overlay/picker UI surfaces and single-surface lookup, named operator surfaces, top-level CLI mirrors and single-mirror lookup, fixed shortcuts, configurable keybindings, single-keybinding lookup, shell-safe keybinding execution, slash commands, single-command lookup with policy metadata, model tools and individual model tool schemas, settings and single-setting lookup, 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.
|
|
25
|
+
- User-facing Agent workspace actions, single workspace-action lookup/execution, built-in panels and single-panel lookup, modal/overlay/picker UI surfaces and single-surface lookup, named operator surfaces, top-level CLI mirrors and single-mirror lookup, fixed shortcuts, configurable keybindings, single-keybinding lookup, shell-safe keybinding execution, slash commands, single-command lookup with policy metadata, model tools and individual model tool schemas, settings and single-setting lookup, 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. Every workspace editor descriptor reports model-execution route metadata, and local memory, note, persona, skill, and routine create editors can also run through confirmed workspace actions. Mutations, visible UI routing, and keybinding execution remain explicit and confirmation-gated; prompt-editor-only shortcuts stay direct user interaction; and ambiguous lookup matches are refused with candidates instead of guessed.
|
|
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/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, single workspace-action inspection and execution by action id, command, or lookup text, built-in panel discovery/routing by panel id or lookup text, modal/overlay/picker UI surface discovery/routing by surface id or lookup text, top-level CLI mirror discovery and single-mirror lookup by command string, command token, or lookup text, fixed shortcut and configurable keybinding discovery, keybinding inspection/mutation by action id or lookup text, confirmation-gated shell-safe keybinding execution, slash-command discovery, single slash-command inspection by typed command or lookup text, command policy metadata, single slash-command execution by typed command or lookup text with confirmation, model tool discovery and single-tool schema inspection, settings inspection/mutation by key or lookup text, 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; keybinding descriptors include a model operation route, `run_keybinding` executes supported shell-safe equivalents only with confirmation, prompt-editor-only or terminal-selection shortcuts remain direct user interaction, and 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; single-action lookup and execution use the same user-facing search fields, return lookup metadata where the action result carries descriptors, and refuse ambiguous run requests with candidates. Single-CLI-mirror, single-panel, single-surface, single-keybinding, single-slash-command, single-tool, single-setting, and single-connected-host-capability lookup use their catalog search fields, return lookup metadata where the result carries it, and refuse ambiguous route, schema, capability, or mutation requests with candidates; confirmed slash-command execution uses the same slash-command lookup and refuses ambiguous requests before any handler runs. 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.
|
|
47
|
+
The model can inspect and use the same harness surface through Agent-owned tools. `agent_harness` exposes workspace action discovery, single workspace-action inspection and execution by action id, command, or lookup text, built-in panel discovery/routing by panel id or lookup text, modal/overlay/picker UI surface discovery/routing by surface id or lookup text, top-level CLI mirror discovery and single-mirror lookup by command string, command token, or lookup text, fixed shortcut and configurable keybinding discovery, keybinding inspection/mutation by action id or lookup text, confirmation-gated shell-safe keybinding execution, slash-command discovery, single slash-command inspection by typed command or lookup text, concrete built-in command effect/boundary policy metadata, single slash-command execution by typed command or lookup text with confirmation, model tool discovery and single-tool schema inspection, settings inspection/mutation by key or lookup text, 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; keybinding descriptors include a model operation route, `run_keybinding` executes supported shell-safe equivalents only with confirmation, prompt-editor-only or terminal-selection shortcuts remain direct user interaction, and 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; every editor descriptor reports `modelExecution` route metadata, and single-action lookup and execution use the same user-facing search fields, return lookup metadata where the action result carries descriptors, and refuse ambiguous run requests with candidates. Single-CLI-mirror, single-panel, single-surface, single-keybinding, single-slash-command, single-tool, single-setting, and single-connected-host-capability lookup use their catalog search fields, return lookup metadata where the result carries it, and refuse ambiguous route, schema, capability, or mutation requests with candidates; confirmed slash-command execution uses the same slash-command lookup and refuses ambiguous requests before any handler runs. 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. Command-backed editor forms execute through the shared slash-command registry with confirmation, and web research/fetch forms return the main-conversation prompt for the model to use directly. 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
|
|
|
@@ -50,7 +50,7 @@ The main Agent model has an Agent-owned harness bridge rather than generic SDK s
|
|
|
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` lists the built-in panel catalog, and `panel` resolves one panel by `panelId`, `target`, or `query` with current open/focused state plus its matching Agent workspace route; `ui_surfaces` lists modal, overlay, picker, and workspace entrypoints, and `ui_surface` resolves one by `surfaceId`, `target`, or `query` with shell-opener availability and preferred model routes; `cli_commands` lists top-level package CLI mirror metadata, and `cli_command` resolves one mirror by `cliCommand`, `command`, `commandName`, `target`, or `query`, returning parser output for concrete invocations, blocked command tokens, lookup metadata, and preferred in-process model routes; `shortcuts` returns fixed runtime/editor shortcuts plus configurable keybindings; `keybindings` lists the live resolved keybinding table, and `keybinding`, `run_keybinding`, `set_keybinding`, and `reset_keybinding` resolve one action by `actionId`, `target`, `key`, or `query` with default bindings, custom state, config path, lookup metadata, and model-operation route metadata; `commands` lists slash-command descriptions; `command` returns one slash-command detail by `command`, `commandName`, `target`, or `query`, including parsed arguments plus effect/confirmation/preferred-tool/boundary policy metadata, and refuses ambiguous command lookup with candidate commands; `run_command` executes one confirmed slash command using the same `command`, `commandName`, `target`, or `query` resolver and refuses ambiguous command lookup before any handler runs; `workspace_actions` lists Agent workspace actions and can inline editor field schemas with `includeParameters:true`; `workspace_action` and `run_workspace_action` resolve one action by `actionId`, `command`, `target`, or `query`, using the same user-facing action-search fields; inspection returns lookup metadata plus editor schema, and execution refuses ambiguous requests with candidate actions before any effect; `tools` lists model tool definitions and can inline JSON schemas with `includeParameters:true`; `tool` returns one model tool schema by `toolName`, `target`, or `query` and refuses ambiguous schema lookup with candidate tools; `settings` returns setting descriptors plus setting policy; `get_setting`, `set_setting`, and `reset_setting` resolve one setting by `key`, `target`, or `query`, return lookup metadata on success, and refuse ambiguous matches with candidate settings; `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 refuses ambiguous capability lookup with candidates; 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` lists the built-in panel catalog, and `panel` resolves one panel by `panelId`, `target`, or `query` with current open/focused state plus its matching Agent workspace route; `ui_surfaces` lists modal, overlay, picker, and workspace entrypoints, and `ui_surface` resolves one by `surfaceId`, `target`, or `query` with shell-opener availability and preferred model routes; `cli_commands` lists top-level package CLI mirror metadata, and `cli_command` resolves one mirror by `cliCommand`, `command`, `commandName`, `target`, or `query`, returning parser output for concrete invocations, blocked command tokens, lookup metadata, and preferred in-process model routes; `shortcuts` returns fixed runtime/editor shortcuts plus configurable keybindings; `keybindings` lists the live resolved keybinding table, and `keybinding`, `run_keybinding`, `set_keybinding`, and `reset_keybinding` resolve one action by `actionId`, `target`, `key`, or `query` with default bindings, custom state, config path, lookup metadata, and model-operation route metadata; `commands` lists slash-command descriptions; `command` returns one slash-command detail by `command`, `commandName`, `target`, or `query`, including parsed arguments plus concrete built-in effect/confirmation/preferred-tool/boundary policy metadata, and refuses ambiguous command lookup with candidate commands; `run_command` executes one confirmed slash command using the same `command`, `commandName`, `target`, or `query` resolver and refuses ambiguous command lookup before any handler runs; `workspace_actions` lists Agent workspace actions and can inline editor field schemas with `includeParameters:true`; `workspace_action` and `run_workspace_action` resolve one action by `actionId`, `command`, `target`, or `query`, using the same user-facing action-search fields; inspection returns lookup metadata plus editor schema and `modelExecution` route metadata for every editor action, and execution refuses ambiguous requests with candidate actions before any effect; `tools` lists model tool definitions and can inline JSON schemas with `includeParameters:true`; `tool` returns one model tool schema by `toolName`, `target`, or `query` and refuses ambiguous schema lookup with candidate tools; `settings` returns setting descriptors plus setting policy; `get_setting`, `set_setting`, and `reset_setting` resolve one setting by `key`, `target`, or `query`, return lookup metadata on success, and refuse ambiguous matches with candidate settings; `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 refuses ambiguous capability lookup with candidates; 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
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. Ambiguous UI surface lookup text is refused with candidate surfaces instead of routed.
|
|
56
56
|
|
|
@@ -64,7 +64,7 @@ CLI mirror modes are catalog and parser inspection only. When the user asks the
|
|
|
64
64
|
|
|
65
65
|
Setting writes, setting resets, supported keybinding actions, 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.
|
|
66
66
|
|
|
67
|
-
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` plus an `actionId`, `command`, `target`, or `query` that resolves to one action. 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.
|
|
67
|
+
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` plus an `actionId`, `command`, `target`, or `query` that resolves to one action. 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`. Command-backed editor forms report their shared slash-command dispatch route, direct learned-behavior/profile forms report their local or command bridge, and web research/fetch forms report that execution returns a main-conversation prompt instead of starting hidden nested work. 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.
|
|
68
68
|
|
|
69
69
|
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.
|
|
70
70
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-agent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.28",
|
|
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",
|
|
@@ -16,11 +16,122 @@ export type ConnectedHostCapabilityResolution =
|
|
|
16
16
|
export function describeCommandPolicy(commandName: string): CommandExecutionPolicy {
|
|
17
17
|
const root = commandName.replace(/^\//, '').trim().toLowerCase();
|
|
18
18
|
const confirmation = 'agent_harness mode:"run_command" requires confirm:true and explicitUserRequest for every slash command invocation.';
|
|
19
|
+
if (root === 'agent' || root === 'agent-workspace' || root === 'workspace') {
|
|
20
|
+
return {
|
|
21
|
+
effect: 'ui-navigation',
|
|
22
|
+
confirmation,
|
|
23
|
+
preferredModelTool: 'agent_harness workspace/workspace_categories/workspace_actions/workspace_action/run_workspace_action',
|
|
24
|
+
boundary: 'Agent workspace navigation is visible shell routing. Use workspace action modes for concrete model-readable operation.',
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
if (root === 'setup' || root === 'welcome') {
|
|
28
|
+
return {
|
|
29
|
+
effect: 'ui-navigation',
|
|
30
|
+
confirmation,
|
|
31
|
+
preferredModelTool: 'agent_harness workspace_actions/workspace_action/open_ui_surface',
|
|
32
|
+
boundary: 'Setup opens the visible Agent onboarding or setup workspace. Model-side changes should use setting modes or workspace actions.',
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
if (root === 'commands' || root === 'help' || root === 'shortcuts') {
|
|
36
|
+
return {
|
|
37
|
+
effect: 'ui-navigation',
|
|
38
|
+
confirmation,
|
|
39
|
+
preferredModelTool: root === 'shortcuts' ? 'agent_harness shortcuts/keybindings/keybinding' : 'agent_harness commands/command',
|
|
40
|
+
boundary: 'Discovery commands open visible help surfaces. The model should inspect the matching harness catalog directly before invoking commands.',
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
if (root === 'keybindings') {
|
|
44
|
+
return {
|
|
45
|
+
effect: 'read-only',
|
|
46
|
+
confirmation,
|
|
47
|
+
preferredModelTool: 'agent_harness shortcuts/keybindings/keybinding/run_keybinding/set_keybinding/reset_keybinding',
|
|
48
|
+
boundary: 'Keybinding inspection is read-only. Keybinding execution or edits require explicit confirmation through agent_harness keybinding modes.',
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (root === 'settings' || root === 'config') {
|
|
52
|
+
return {
|
|
53
|
+
effect: 'mixed',
|
|
54
|
+
confirmation,
|
|
55
|
+
preferredModelTool: 'agent_harness settings/get_setting/set_setting/reset_setting',
|
|
56
|
+
boundary: 'Model-writable settings can be changed through agent_harness. Connected-host lifecycle/listener settings remain read-only.',
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
if (root === 'model' || root === 'effort') {
|
|
60
|
+
return {
|
|
61
|
+
effect: 'mixed',
|
|
62
|
+
confirmation,
|
|
63
|
+
preferredModelTool: 'agent_harness settings/get_setting/set_setting/open_ui_surface',
|
|
64
|
+
boundary: 'Model and reasoning-effort changes affect the current Agent chat route. Prefer settings modes for concrete values and UI surface routing for visible pickers.',
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
if (root === 'provider' || root === 'providers') {
|
|
68
|
+
return {
|
|
69
|
+
effect: 'mixed',
|
|
70
|
+
confirmation,
|
|
71
|
+
preferredModelTool: 'agent_harness settings/get_setting/set_setting/open_ui_surface',
|
|
72
|
+
boundary: 'Provider selection and custom provider files belong to Agent provider configuration. Adding, removing, or switching providers requires explicit user intent.',
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
if (root === 'refresh-models') {
|
|
76
|
+
return {
|
|
77
|
+
effect: 'external-network',
|
|
78
|
+
confirmation,
|
|
79
|
+
preferredModelTool: 'agent_harness settings/tools',
|
|
80
|
+
boundary: 'Model catalog refresh may call provider discovery routes and update local provider metadata. Do not run it without explicit user request.',
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
if (root === 'pin' || root === 'unpin') {
|
|
84
|
+
return {
|
|
85
|
+
effect: 'local-state',
|
|
86
|
+
confirmation,
|
|
87
|
+
preferredModelTool: 'agent_harness run_command',
|
|
88
|
+
boundary: 'Pinned model changes mutate local Agent provider preferences only and require an explicit model id.',
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
if (root === 'mode') {
|
|
92
|
+
return {
|
|
93
|
+
effect: 'local-state',
|
|
94
|
+
confirmation,
|
|
95
|
+
preferredModelTool: 'agent_harness settings/get_setting/set_setting',
|
|
96
|
+
boundary: 'Interaction-mode changes affect the current Agent operator notification posture and should be explicit.',
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
if (root === 'brief') {
|
|
100
|
+
return {
|
|
101
|
+
effect: 'read-only',
|
|
102
|
+
confirmation,
|
|
103
|
+
preferredModelTool: 'agent_operator_briefing',
|
|
104
|
+
boundary: 'Briefing reads current Agent operator posture and next actions without mutating connected-host state.',
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
if (root === 'health' || root === 'compat' || root === 'context' || root === 'accounts' || root === 'security') {
|
|
108
|
+
return {
|
|
109
|
+
effect: 'read-only',
|
|
110
|
+
confirmation,
|
|
111
|
+
preferredModelTool: root === 'compat' ? 'agent_harness connected_host_status' : 'agent_harness connected_host_status/settings/tools/open_ui_surface',
|
|
112
|
+
boundary: 'Diagnostics and review commands inspect Agent, provider, MCP, security, and connected-host readiness without taking lifecycle ownership.',
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
if (root === 'trust' || root === 'auth' || root === 'bundle') {
|
|
116
|
+
return {
|
|
117
|
+
effect: 'mixed',
|
|
118
|
+
confirmation,
|
|
119
|
+
preferredModelTool: 'agent_harness run_command',
|
|
120
|
+
boundary: 'Review subcommands are read-only; bundle export/import or auth/trust bundle export writes local files and requires explicit confirmation.',
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
if (root === 'mcp' || root === 'voice' || root === 'subscription' || root === 'secrets' || root === 'secret') {
|
|
124
|
+
return {
|
|
125
|
+
effect: 'mixed',
|
|
126
|
+
confirmation,
|
|
127
|
+
preferredModelTool: root === 'secrets' || root === 'secret' ? 'agent_harness settings/get_setting/set_setting/reset_setting' : 'agent_harness workspace_actions/settings/open_ui_surface',
|
|
128
|
+
boundary: 'Harness-owned configuration, secret, voice, subscription, and MCP commands can expose credentials or external account state. Mutations require explicit user intent and should prefer secret refs over raw values.',
|
|
129
|
+
};
|
|
130
|
+
}
|
|
19
131
|
if (
|
|
20
132
|
root === 'memory'
|
|
21
133
|
|| root === 'memories'
|
|
22
134
|
|| root === 'note'
|
|
23
|
-
|| root === 'notes'
|
|
24
135
|
|| root === 'persona'
|
|
25
136
|
|| root === 'personas'
|
|
26
137
|
|| root === 'skill'
|
|
@@ -35,20 +146,20 @@ export function describeCommandPolicy(commandName: string): CommandExecutionPoli
|
|
|
35
146
|
boundary: 'Agent-local library records only unless the invoked command explicitly promotes to a connected schedule or Agent Knowledge source.',
|
|
36
147
|
};
|
|
37
148
|
}
|
|
38
|
-
if (root === '
|
|
149
|
+
if (root === 'notes') {
|
|
39
150
|
return {
|
|
40
|
-
effect: '
|
|
151
|
+
effect: 'ui-navigation',
|
|
41
152
|
confirmation,
|
|
42
|
-
preferredModelTool: '
|
|
43
|
-
boundary: '
|
|
153
|
+
preferredModelTool: 'agent_harness workspace_actions/workspace_action/run_workspace_action or agent_local_registry',
|
|
154
|
+
boundary: 'Notes workspace routing is visible navigation; note record mutations should use Agent-local registry or workspace action modes.',
|
|
44
155
|
};
|
|
45
156
|
}
|
|
46
|
-
if (root === '
|
|
157
|
+
if (root === 'knowledge') {
|
|
47
158
|
return {
|
|
48
159
|
effect: 'mixed',
|
|
49
160
|
confirmation,
|
|
50
|
-
preferredModelTool: '
|
|
51
|
-
boundary: '
|
|
161
|
+
preferredModelTool: 'agent_knowledge or agent_knowledge_ingest',
|
|
162
|
+
boundary: 'Agent Knowledge only. Do not use default knowledge or non-Agent knowledge spaces.',
|
|
52
163
|
};
|
|
53
164
|
}
|
|
54
165
|
if (root === 'approval' || root === 'approvals' || root === 'automation') {
|
|
@@ -75,7 +186,7 @@ export function describeCommandPolicy(commandName: string): CommandExecutionPoli
|
|
|
75
186
|
boundary: 'External delivery requires an explicit target and direct user authorization.',
|
|
76
187
|
};
|
|
77
188
|
}
|
|
78
|
-
if (root === 'media'
|
|
189
|
+
if (root === 'media') {
|
|
79
190
|
return {
|
|
80
191
|
effect: 'external-network',
|
|
81
192
|
confirmation,
|
|
@@ -83,6 +194,22 @@ export function describeCommandPolicy(commandName: string): CommandExecutionPoli
|
|
|
83
194
|
boundary: 'Media generation uses configured Agent media providers and writes normal artifacts only.',
|
|
84
195
|
};
|
|
85
196
|
}
|
|
197
|
+
if (root === 'image') {
|
|
198
|
+
return {
|
|
199
|
+
effect: 'external-network',
|
|
200
|
+
confirmation,
|
|
201
|
+
preferredModelTool: 'agent_harness open_ui_surface',
|
|
202
|
+
boundary: 'Image attachment reads a local image and submits a model turn with image content. Use only for explicit user-supplied files.',
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
if (root === 'tts') {
|
|
206
|
+
return {
|
|
207
|
+
effect: 'external-network',
|
|
208
|
+
confirmation,
|
|
209
|
+
preferredModelTool: 'agent_harness settings/open_ui_surface',
|
|
210
|
+
boundary: 'Live TTS submits a normal prompt and may call model and speech providers; stopping playback is local runtime control.',
|
|
211
|
+
};
|
|
212
|
+
}
|
|
86
213
|
if (root === 'workplan' || root === 'plan' || root === 'task' || root === 'tasks') {
|
|
87
214
|
return {
|
|
88
215
|
effect: 'local-state',
|
|
@@ -98,37 +225,65 @@ export function describeCommandPolicy(commandName: string): CommandExecutionPoli
|
|
|
98
225
|
boundary: 'Delegation is explicit user-directed work only; no hidden background review or separate Agent job should be created implicitly.',
|
|
99
226
|
};
|
|
100
227
|
}
|
|
101
|
-
if (
|
|
228
|
+
if (
|
|
229
|
+
root === 'session'
|
|
230
|
+
|| root === 'conversation'
|
|
231
|
+
|| root === 'clear'
|
|
232
|
+
|| root === 'reset'
|
|
233
|
+
|| root === 'compact'
|
|
234
|
+
|| root === 'quit'
|
|
235
|
+
|| root === 'exit'
|
|
236
|
+
|| root === 'save'
|
|
237
|
+
|| root === 'load'
|
|
238
|
+
|| root === 'sessions'
|
|
239
|
+
|| root === 'title'
|
|
240
|
+
|| root === 'undo'
|
|
241
|
+
|| root === 'redo'
|
|
242
|
+
|| root === 'retry'
|
|
243
|
+
) {
|
|
102
244
|
return {
|
|
103
245
|
effect: 'session-lifecycle',
|
|
104
246
|
confirmation,
|
|
105
247
|
boundary: 'Session and conversation commands operate on the visible harness session lifecycle.',
|
|
106
248
|
};
|
|
107
249
|
}
|
|
108
|
-
if (root === '
|
|
250
|
+
if (root === 'export') {
|
|
251
|
+
return {
|
|
252
|
+
effect: 'local-state',
|
|
253
|
+
confirmation,
|
|
254
|
+
boundary: 'Conversation export writes a local workspace file and requires an explicit output intent.',
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
if (root === 'bookmarks' || root === 'expand' || root === 'collapse' || root === 'next-error' || root === 'prev-error') {
|
|
109
258
|
return {
|
|
110
259
|
effect: 'ui-navigation',
|
|
111
260
|
confirmation,
|
|
112
|
-
preferredModelTool: 'agent_harness
|
|
113
|
-
boundary: '
|
|
261
|
+
preferredModelTool: root === 'bookmarks' ? 'agent_harness open_ui_surface' : undefined,
|
|
262
|
+
boundary: 'Conversation display navigation mutates only the visible transcript view or scroll position.',
|
|
114
263
|
};
|
|
115
264
|
}
|
|
116
|
-
if (
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|| root === 'voice'
|
|
126
|
-
|| root === 'subscription'
|
|
127
|
-
) {
|
|
265
|
+
if (root === 'paste') {
|
|
266
|
+
return {
|
|
267
|
+
effect: 'local-state',
|
|
268
|
+
confirmation,
|
|
269
|
+
preferredModelTool: 'agent_harness run_keybinding',
|
|
270
|
+
boundary: 'Paste reads the local clipboard and mutates the visible prompt or image attachment state.',
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
if (root === 'profile' || root === 'agent-profile') {
|
|
128
274
|
return {
|
|
129
275
|
effect: 'mixed',
|
|
130
276
|
confirmation,
|
|
131
|
-
|
|
277
|
+
preferredModelTool: 'agent_harness workspace_actions/workspace_action/run_workspace_action',
|
|
278
|
+
boundary: 'Agent profile commands manage isolated Agent runtime profiles and starter templates. Mutations require explicit confirmation.',
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
if (root === 'qrcode') {
|
|
282
|
+
return {
|
|
283
|
+
effect: 'read-only',
|
|
284
|
+
confirmation,
|
|
285
|
+
preferredModelTool: 'agent_harness run_command',
|
|
286
|
+
boundary: 'Pairing details are displayed for explicit operator use; the Agent does not manage connected-host listener lifecycle.',
|
|
132
287
|
};
|
|
133
288
|
}
|
|
134
289
|
return {
|
|
@@ -25,6 +25,7 @@ import { describeLocalWorkspaceModelExecution, runLocalWorkspaceAction, runLocal
|
|
|
25
25
|
import { describeHarnessModelTool, 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
|
+
import { describeWorkspaceEditorModelExecution } from './agent-harness-workspace-editor-execution.ts';
|
|
28
29
|
import {
|
|
29
30
|
connectedHostSummary,
|
|
30
31
|
describeConnectedHostCapability,
|
|
@@ -235,23 +236,12 @@ function describeWorkspaceAction(
|
|
|
235
236
|
...(action.kind === 'local-selection' || action.kind === 'local-operation' ? {
|
|
236
237
|
modelExecution: describeLocalWorkspaceModelExecution(action),
|
|
237
238
|
} : {}),
|
|
238
|
-
...(action.kind === 'editor' && action.editorKind
|
|
239
|
-
modelExecution:
|
|
239
|
+
...(action.kind === 'editor' && action.editorKind ? {
|
|
240
|
+
modelExecution: describeWorkspaceEditorModelExecution(action.editorKind),
|
|
240
241
|
} : {}),
|
|
241
242
|
};
|
|
242
243
|
}
|
|
243
244
|
|
|
244
|
-
function localEditorModelExecution(editorKind: AgentWorkspaceEditorKind): string {
|
|
245
|
-
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.';
|
|
246
|
-
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.';
|
|
247
|
-
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.';
|
|
248
|
-
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.';
|
|
249
|
-
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.';
|
|
250
|
-
if (editorKind === 'learned-behavior') return 'run_workspace_action can create the learned behavior from fields.';
|
|
251
|
-
if (editorKind === 'profile') return 'run_workspace_action dispatches the matching /agent-profile create command.';
|
|
252
|
-
return 'Use the command field, editor schema, or a first-class Agent model tool when available.';
|
|
253
|
-
}
|
|
254
|
-
|
|
255
245
|
function listWorkspaceActions(deps: AgentHarnessToolDeps, args: AgentHarnessToolArgs): readonly Record<string, unknown>[] {
|
|
256
246
|
const query = readString(args.query);
|
|
257
247
|
const categoryId = readString(args.categoryId || args.category);
|
|
@@ -387,6 +377,7 @@ async function runWorkspaceEditorAction(
|
|
|
387
377
|
missing,
|
|
388
378
|
action: action.id,
|
|
389
379
|
editor: describeWorkspaceEditor(editor),
|
|
380
|
+
modelExecution: describeWorkspaceEditorModelExecution(editor.kind),
|
|
390
381
|
});
|
|
391
382
|
}
|
|
392
383
|
|
|
@@ -445,7 +436,7 @@ async function runWorkspaceEditorAction(
|
|
|
445
436
|
status: 'model_tool_required',
|
|
446
437
|
action: action.id,
|
|
447
438
|
editor: describeWorkspaceEditor(editor),
|
|
448
|
-
modelExecution:
|
|
439
|
+
modelExecution: describeWorkspaceEditorModelExecution(editor.kind),
|
|
449
440
|
});
|
|
450
441
|
}
|
|
451
442
|
|
|
@@ -460,6 +451,7 @@ async function runWorkspaceEditorAction(
|
|
|
460
451
|
status: submission.status,
|
|
461
452
|
action: action.id,
|
|
462
453
|
editor: describeWorkspaceEditor(submission.editor),
|
|
454
|
+
modelExecution: describeWorkspaceEditorModelExecution(editor.kind),
|
|
463
455
|
actionResult: submission.actionResult ?? null,
|
|
464
456
|
});
|
|
465
457
|
}
|
|
@@ -469,6 +461,7 @@ async function runWorkspaceEditorAction(
|
|
|
469
461
|
action: action.id,
|
|
470
462
|
prompt: submission.prompt,
|
|
471
463
|
actionResult: submission.actionResult,
|
|
464
|
+
modelExecution: describeWorkspaceEditorModelExecution(editor.kind),
|
|
472
465
|
note: 'This workspace action submits a normal main-conversation prompt in the TUI. In model-tool context, use the returned prompt as the conversation task instead of creating a hidden nested turn.',
|
|
473
466
|
});
|
|
474
467
|
}
|
|
@@ -573,7 +566,7 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
|
|
|
573
566
|
uiSurfaces: 'Use mode:"ui_surfaces" to list and mode:"ui_surface" with surfaceId, target, or query to inspect modal/overlay/picker/workspace surfaces; use mode:"open_ui_surface" with confirm:true plus explicitUserRequest to route visible UI navigation.',
|
|
574
567
|
shortcuts: 'Use mode:"shortcuts" to inspect fixed shortcuts plus configurable keybindings. Use mode:"keybinding" with actionId, target, key, or query; use mode:"run_keybinding" for confirmation-gated shell-safe shortcut equivalents; use mode:"set_keybinding" and mode:"reset_keybinding" with confirm:true plus explicitUserRequest to edit the same config file the user edits.',
|
|
575
568
|
slashCommands: 'Use mode:"commands" to list slash commands and mode:"command" with command, commandName, target, or query to inspect one command; use mode:"run_command" with the same lookup fields plus confirm:true and explicitUserRequest to execute one uniquely resolved command.',
|
|
576
|
-
workspace: 'Use mode:"workspace_actions" to list, mode:"workspace_action" with actionId, command, target, or query for one action
|
|
569
|
+
workspace: 'Use mode:"workspace_actions" to list, mode:"workspace_action" with actionId, command, target, or query for one action, editor schema, and modelExecution route metadata, and mode:"run_workspace_action" with the same lookup fields plus confirmation for executable actions; set includeParameters:true on workspace_actions to inline editor schemas.',
|
|
577
570
|
settings: 'Use mode:"settings" to list and mode:"get_setting" with key, target, or query for one setting. Use mode:"set_setting" or mode:"reset_setting" with key, target, or query plus confirm:true and explicitUserRequest.',
|
|
578
571
|
tools: 'Use mode:"tools" to list first-class model tools, or mode:"tool" with toolName, target, or query to inspect one schema.',
|
|
579
572
|
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.',
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { isAgentWorkspaceCommandEditorKind } from '../input/agent-workspace-command-editor.ts';
|
|
2
|
+
import type { AgentWorkspaceEditorKind } from '../input/agent-workspace-types.ts';
|
|
3
|
+
|
|
4
|
+
type LocalEditorDomain = 'memory' | 'note' | 'persona' | 'skill' | 'routine';
|
|
5
|
+
|
|
6
|
+
function localEditorDomain(editorKind: AgentWorkspaceEditorKind): LocalEditorDomain | null {
|
|
7
|
+
if (
|
|
8
|
+
editorKind === 'memory'
|
|
9
|
+
|| editorKind === 'note'
|
|
10
|
+
|| editorKind === 'persona'
|
|
11
|
+
|| editorKind === 'skill'
|
|
12
|
+
|| editorKind === 'routine'
|
|
13
|
+
) return editorKind;
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function localEditorSupportedActions(editorKind: LocalEditorDomain): readonly string[] {
|
|
18
|
+
if (editorKind === 'memory') return ['list', 'search', 'get', 'review', 'stale', 'delete'];
|
|
19
|
+
if (editorKind === 'note') return ['list', 'search', 'get', 'review', 'stale', 'delete'];
|
|
20
|
+
if (editorKind === 'persona') return ['list', 'search', 'get', 'use', 'clear_active', 'review', 'stale', 'delete'];
|
|
21
|
+
if (editorKind === 'skill') return ['list', 'search', 'get', 'enable', 'disable', 'review', 'stale', 'delete'];
|
|
22
|
+
return ['list', 'search', 'get', 'enable', 'disable', 'start', 'review', 'stale', 'delete'];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function describeWorkspaceEditorModelExecution(editorKind: AgentWorkspaceEditorKind): Record<string, unknown> {
|
|
26
|
+
const localDomain = localEditorDomain(editorKind);
|
|
27
|
+
if (localDomain) {
|
|
28
|
+
return {
|
|
29
|
+
route: 'agent_local_registry',
|
|
30
|
+
tool: 'agent_local_registry',
|
|
31
|
+
domain: localDomain,
|
|
32
|
+
action: 'create_or_update_from_fields',
|
|
33
|
+
confirmation: 'required',
|
|
34
|
+
supportedActions: localEditorSupportedActions(localDomain),
|
|
35
|
+
note: 'run_workspace_action validates the editor fields and dispatches through the Agent-local registry without writing default knowledge or non-Agent segments.',
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
if (editorKind === 'learned-behavior') {
|
|
39
|
+
return {
|
|
40
|
+
route: 'direct-agent-local-create',
|
|
41
|
+
action: 'create_learned_behavior',
|
|
42
|
+
confirmation: 'required',
|
|
43
|
+
note: 'run_workspace_action creates a local skill, routine, or persona from the submitted learned-behavior fields.',
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
if (editorKind === 'profile') {
|
|
47
|
+
return {
|
|
48
|
+
route: 'slash-command-dispatch',
|
|
49
|
+
command: '/agent-profile create <name> [--template <template>] --yes',
|
|
50
|
+
dispatcher: 'run_command',
|
|
51
|
+
confirmation: 'required',
|
|
52
|
+
note: 'run_workspace_action builds the matching profile creation slash command from the submitted fields.',
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (editorKind === 'web-research' || editorKind === 'web-fetch') {
|
|
56
|
+
return {
|
|
57
|
+
route: 'main-conversation-prompt',
|
|
58
|
+
result: 'prompt',
|
|
59
|
+
confirmation: 'not-required',
|
|
60
|
+
note: 'run_workspace_action returns the main-conversation prompt produced by this editor; use that prompt as the conversation task instead of creating a hidden nested turn.',
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
if (isAgentWorkspaceCommandEditorKind(editorKind)) {
|
|
64
|
+
return {
|
|
65
|
+
route: 'slash-command-dispatch',
|
|
66
|
+
dispatcher: 'run_command',
|
|
67
|
+
confirmation: 'required',
|
|
68
|
+
note: 'run_workspace_action builds the same slash-command submission as the TUI form from submitted fields, then executes it through the shared command registry.',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
route: 'model-tool-or-editor-schema',
|
|
73
|
+
note: 'Use the returned editor schema, command field, or first-class Agent model tool when available.',
|
|
74
|
+
};
|
|
75
|
+
}
|
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.28';
|
|
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 {
|