@pellux/goodvibes-agent 0.1.114 → 0.1.117

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/CHANGELOG.md +41 -650
  2. package/README.md +40 -50
  3. package/dist/package/main.js +38224 -35673
  4. package/docs/README.md +5 -4
  5. package/docs/{connected-services.md → connected-host.md} +18 -10
  6. package/docs/getting-started.md +43 -42
  7. package/docs/release-and-publishing.md +6 -4
  8. package/package.json +3 -3
  9. package/src/agent/behavior-discovery-summary.ts +165 -0
  10. package/src/agent/persona-discovery.ts +1 -3
  11. package/src/agent/persona-registry.ts +5 -3
  12. package/src/agent/reminder-schedule-format.ts +6 -6
  13. package/src/agent/reminder-schedule.ts +1 -1
  14. package/src/agent/routine-registry.ts +43 -4
  15. package/src/agent/routine-schedule-format.ts +6 -6
  16. package/src/agent/routine-schedule-promotion.ts +1 -1
  17. package/src/agent/routine-schedule-receipts.ts +1 -1
  18. package/src/agent/runtime-profile-starters.ts +331 -0
  19. package/src/agent/runtime-profile.ts +228 -330
  20. package/src/agent/skill-registry.ts +190 -13
  21. package/src/cli/agent-knowledge-command.ts +2 -2
  22. package/src/cli/agent-knowledge-format.ts +2 -2
  23. package/src/cli/agent-knowledge-runtime.ts +1 -1
  24. package/src/cli/bundle-command.ts +1 -1
  25. package/src/cli/entrypoint.ts +16 -7
  26. package/src/cli/help.ts +26 -19
  27. package/src/cli/local-library-command.ts +75 -21
  28. package/src/cli/management-commands.ts +7 -6
  29. package/src/cli/management.ts +6 -51
  30. package/src/cli/parser.ts +23 -2
  31. package/src/cli/profiles-command.ts +247 -1
  32. package/src/cli/routines-command.ts +139 -11
  33. package/src/cli/service-posture.ts +11 -11
  34. package/src/cli/status.ts +21 -25
  35. package/src/input/agent-workspace-access-command-editor-submission.ts +149 -0
  36. package/src/input/agent-workspace-access-command-editors.ts +170 -0
  37. package/src/input/agent-workspace-activation.ts +2 -1
  38. package/src/input/agent-workspace-basic-command-editor-submission.ts +787 -0
  39. package/src/input/agent-workspace-basic-command-editors.ts +524 -459
  40. package/src/input/agent-workspace-categories.ts +177 -14
  41. package/src/input/agent-workspace-channel-command-editor-submission.ts +49 -0
  42. package/src/input/agent-workspace-channel-command-editors.ts +47 -0
  43. package/src/input/agent-workspace-command-editor.ts +25 -1
  44. package/src/input/agent-workspace-delegation-editor-submission.ts +55 -0
  45. package/src/input/agent-workspace-editors.ts +27 -0
  46. package/src/input/agent-workspace-knowledge-command-editor-submission.ts +132 -0
  47. package/src/input/agent-workspace-knowledge-command-editors.ts +110 -0
  48. package/src/input/agent-workspace-learned-behavior.ts +67 -0
  49. package/src/input/agent-workspace-library-command-editor-submission.ts +50 -0
  50. package/src/input/agent-workspace-library-command-editors.ts +35 -0
  51. package/src/input/agent-workspace-mcp-command-editor-submission.ts +95 -0
  52. package/src/input/agent-workspace-memory-command-editor-submission.ts +232 -0
  53. package/src/input/agent-workspace-memory-command-editors.ts +180 -0
  54. package/src/input/agent-workspace-navigation.ts +45 -0
  55. package/src/input/agent-workspace-notify-editor-submission.ts +107 -0
  56. package/src/input/agent-workspace-operations-command-editor-submission.ts +146 -0
  57. package/src/input/agent-workspace-operations-command-editors.ts +119 -0
  58. package/src/input/agent-workspace-provider-command-editor-submission.ts +155 -0
  59. package/src/input/agent-workspace-provider-command-editors.ts +93 -0
  60. package/src/input/agent-workspace-requirements.ts +11 -0
  61. package/src/input/agent-workspace-secret-editor-submission.ts +153 -0
  62. package/src/input/agent-workspace-session-command-editor-submission.ts +199 -0
  63. package/src/input/agent-workspace-session-command-editors.ts +249 -0
  64. package/src/input/agent-workspace-setup.ts +49 -19
  65. package/src/input/agent-workspace-skill-bundle-command-editor-submission.ts +101 -0
  66. package/src/input/agent-workspace-skill-bundle-command-editors.ts +110 -0
  67. package/src/input/agent-workspace-snapshot.ts +56 -8
  68. package/src/input/agent-workspace-task-command-editor-submission.ts +61 -0
  69. package/src/input/agent-workspace-task-command-editors.ts +47 -0
  70. package/src/input/agent-workspace-types.ts +124 -0
  71. package/src/input/agent-workspace-voice-media.ts +1 -1
  72. package/src/input/agent-workspace-workplan-editor-submission.ts +153 -0
  73. package/src/input/agent-workspace.ts +47 -37
  74. package/src/input/command-registry.ts +1 -1
  75. package/src/input/commands/agent-runtime-profile-runtime.ts +160 -6
  76. package/src/input/commands/agent-skills-runtime.ts +76 -12
  77. package/src/input/commands/agent-workspace-runtime.ts +4 -3
  78. package/src/input/commands/brief-runtime.ts +38 -9
  79. package/src/input/commands/channels-runtime.ts +3 -3
  80. package/src/input/commands/compat-runtime.ts +32 -0
  81. package/src/input/commands/health-runtime.ts +22 -24
  82. package/src/input/commands/knowledge.ts +26 -5
  83. package/src/input/commands/local-provider-runtime.ts +7 -3
  84. package/src/input/commands/local-setup-review.ts +4 -14
  85. package/src/input/commands/mcp-runtime.ts +8 -12
  86. package/src/input/commands/operator-runtime.ts +8 -67
  87. package/src/input/commands/personas-runtime.ts +1 -1
  88. package/src/input/commands/platform-access-runtime.ts +7 -70
  89. package/src/input/commands/policy-dispatch.ts +1 -1
  90. package/src/input/commands/policy.ts +1 -5
  91. package/src/input/commands/product-runtime.ts +2 -2
  92. package/src/input/commands/qrcode-runtime.ts +6 -4
  93. package/src/input/commands/routines-runtime.ts +44 -6
  94. package/src/input/commands/runtime-services.ts +1 -14
  95. package/src/input/commands/security-runtime.ts +3 -8
  96. package/src/input/commands/session-content.ts +1 -1
  97. package/src/input/commands/session-workflow.ts +5 -14
  98. package/src/input/commands/shell-core.ts +8 -2
  99. package/src/input/commands/subscription-runtime.ts +1 -6
  100. package/src/input/commands/support-bundle-runtime.ts +53 -0
  101. package/src/input/commands/tasks-runtime.ts +2 -2
  102. package/src/input/commands.ts +4 -0
  103. package/src/input/feed-context-factory.ts +0 -1
  104. package/src/input/handler-content-actions.ts +0 -25
  105. package/src/input/handler-feed.ts +0 -2
  106. package/src/input/handler-interactions.ts +2 -31
  107. package/src/input/handler-onboarding.ts +29 -12
  108. package/src/input/handler-shortcuts.ts +1 -3
  109. package/src/input/handler.ts +4 -7
  110. package/src/input/keybindings.ts +9 -9
  111. package/src/input/mcp-workspace.ts +90 -26
  112. package/src/input/onboarding/handler-onboarding-routes.ts +3 -1
  113. package/src/input/onboarding/onboarding-wizard-apply.ts +49 -0
  114. package/src/input/onboarding/onboarding-wizard-helpers.ts +1 -1
  115. package/src/input/onboarding/onboarding-wizard-operator-steps.ts +126 -11
  116. package/src/input/onboarding/onboarding-wizard-steps.ts +15 -8
  117. package/src/input/onboarding/onboarding-wizard-types.ts +1 -0
  118. package/src/input/onboarding/onboarding-wizard.ts +19 -2
  119. package/src/input/profile-picker-modal.ts +2 -2
  120. package/src/input/settings-modal-agent-policy.ts +6 -6
  121. package/src/input/settings-modal-subscriptions.ts +3 -3
  122. package/src/input/settings-modal.ts +14 -14
  123. package/src/main.ts +0 -2
  124. package/src/panels/automation-control-panel.ts +3 -3
  125. package/src/panels/builtin/agent.ts +1 -1
  126. package/src/panels/builtin/operations.ts +2 -2
  127. package/src/panels/builtin/session.ts +26 -18
  128. package/src/panels/builtin/shared.ts +6 -6
  129. package/src/panels/project-planning-panel.ts +1 -1
  130. package/src/panels/provider-health-domains.ts +3 -3
  131. package/src/panels/qr-panel.ts +44 -20
  132. package/src/panels/subscription-panel.ts +3 -3
  133. package/src/panels/system-messages-panel.ts +2 -2
  134. package/src/panels/tasks-panel.ts +4 -4
  135. package/src/planning/project-planning-coordinator.ts +2 -2
  136. package/src/renderer/agent-workspace.ts +52 -5
  137. package/src/renderer/block-actions.ts +1 -3
  138. package/src/renderer/help-overlay.ts +13 -8
  139. package/src/renderer/mcp-workspace.ts +32 -13
  140. package/src/renderer/model-picker-overlay.ts +0 -1
  141. package/src/renderer/model-workspace.ts +0 -2
  142. package/src/renderer/onboarding/onboarding-wizard.ts +20 -4
  143. package/src/renderer/panel-picker-overlay.ts +1 -1
  144. package/src/renderer/profile-picker-modal.ts +2 -2
  145. package/src/renderer/settings-modal-helpers.ts +23 -23
  146. package/src/renderer/settings-modal.ts +18 -18
  147. package/src/renderer/system-message.ts +1 -1
  148. package/src/runtime/agent-runtime-events.ts +129 -0
  149. package/src/runtime/bootstrap-command-parts.ts +3 -2
  150. package/src/runtime/bootstrap-core.ts +4 -64
  151. package/src/runtime/bootstrap-shell.ts +42 -4
  152. package/src/runtime/bootstrap.ts +8 -27
  153. package/src/runtime/connected-host-auth.ts +42 -0
  154. package/src/runtime/diagnostics/panels/panel-resources.ts +1 -1
  155. package/src/runtime/index.ts +1 -5
  156. package/src/runtime/onboarding/apply.ts +213 -0
  157. package/src/runtime/onboarding/derivation.ts +25 -6
  158. package/src/runtime/onboarding/snapshot.ts +4 -2
  159. package/src/runtime/onboarding/types.ts +28 -1
  160. package/src/runtime/onboarding/verify.ts +81 -2
  161. package/src/runtime/operator-token-cleanup.ts +2 -2
  162. package/src/runtime/services.ts +27 -12
  163. package/src/shell/service-settings-sync.ts +7 -7
  164. package/src/shell/ui-openers.ts +27 -38
  165. package/src/tools/agent-local-registry-tool.ts +10 -4
  166. package/src/tools/agent-tool-policy-guard.ts +5 -7
  167. package/src/version.ts +1 -1
  168. package/src/cli/package-verification.ts +0 -274
@@ -1,43 +1,60 @@
1
- import type { AgentWorkspaceActionResult, AgentWorkspaceEditorKind, AgentWorkspaceLocalEditor } from './agent-workspace-types.ts';
2
- import { quoteSlashCommandArg, tokenizeSlashCommand } from './slash-command-parser.ts';
1
+ import type { AgentWorkspaceEditorKind, AgentWorkspaceLocalEditor } from './agent-workspace-types.ts';
2
+ import type { AgentWorkspaceAccessCommandEditorKind } from './agent-workspace-access-command-editors.ts';
3
+ import { createAgentWorkspaceAccessCommandEditor, isAgentWorkspaceAccessCommandEditorKind } from './agent-workspace-access-command-editors.ts';
4
+ import type { AgentWorkspaceChannelCommandEditorKind } from './agent-workspace-channel-command-editors.ts';
5
+ import { createAgentWorkspaceChannelCommandEditor, isAgentWorkspaceChannelCommandEditorKind } from './agent-workspace-channel-command-editors.ts';
6
+ import type { AgentWorkspaceKnowledgeCommandEditorKind } from './agent-workspace-knowledge-command-editors.ts';
7
+ import { createAgentWorkspaceKnowledgeCommandEditor, isAgentWorkspaceKnowledgeCommandEditorKind } from './agent-workspace-knowledge-command-editors.ts';
8
+ import type { AgentWorkspaceLibraryCommandEditorKind } from './agent-workspace-library-command-editors.ts';
9
+ import { createAgentWorkspaceLibraryCommandEditor, isAgentWorkspaceLibraryCommandEditorKind } from './agent-workspace-library-command-editors.ts';
10
+ import type { AgentWorkspaceMemoryCommandEditorKind } from './agent-workspace-memory-command-editors.ts';
11
+ import { createAgentWorkspaceMemoryCommandEditor, isAgentWorkspaceMemoryCommandEditorKind } from './agent-workspace-memory-command-editors.ts';
12
+ import type { AgentWorkspaceOperationsCommandEditorKind } from './agent-workspace-operations-command-editors.ts';
13
+ import { createAgentWorkspaceOperationsCommandEditor, isAgentWorkspaceOperationsCommandEditorKind } from './agent-workspace-operations-command-editors.ts';
14
+ import type { AgentWorkspaceProviderCommandEditorKind } from './agent-workspace-provider-command-editors.ts';
15
+ import { createAgentWorkspaceProviderCommandEditor, isAgentWorkspaceProviderCommandEditorKind } from './agent-workspace-provider-command-editors.ts';
16
+ import type { AgentWorkspaceSessionCommandEditorKind } from './agent-workspace-session-command-editors.ts';
17
+ import { createAgentWorkspaceSessionCommandEditor, isAgentWorkspaceSessionCommandEditorKind } from './agent-workspace-session-command-editors.ts';
18
+ import type { AgentWorkspaceSkillBundleCommandEditorKind } from './agent-workspace-skill-bundle-command-editors.ts';
19
+ import { createAgentWorkspaceSkillBundleCommandEditor, isAgentWorkspaceSkillBundleCommandEditorKind } from './agent-workspace-skill-bundle-command-editors.ts';
20
+ import type { AgentWorkspaceTaskCommandEditorKind } from './agent-workspace-task-command-editors.ts';
21
+ import { createAgentWorkspaceTaskCommandEditor, isAgentWorkspaceTaskCommandEditorKind } from './agent-workspace-task-command-editors.ts';
22
+ export type { AgentWorkspaceBasicCommandEditorSubmission } from './agent-workspace-basic-command-editor-submission.ts';
23
+ export { buildAgentWorkspaceBasicCommandEditorSubmission } from './agent-workspace-basic-command-editor-submission.ts';
3
24
 
4
- type AgentWorkspaceFieldReader = (fieldId: string) => string;
5
-
6
- export type AgentWorkspaceBasicCommandEditorKind = Extract<
25
+ export type AgentWorkspaceBasicCommandEditorKind = AgentWorkspaceAccessCommandEditorKind | AgentWorkspaceChannelCommandEditorKind | AgentWorkspaceKnowledgeCommandEditorKind | AgentWorkspaceLibraryCommandEditorKind | AgentWorkspaceMemoryCommandEditorKind | AgentWorkspaceOperationsCommandEditorKind | AgentWorkspaceProviderCommandEditorKind | AgentWorkspaceSessionCommandEditorKind | AgentWorkspaceSkillBundleCommandEditorKind | AgentWorkspaceTaskCommandEditorKind | Extract<
7
26
  AgentWorkspaceEditorKind,
8
- 'knowledge-file' | 'knowledge-bookmarks' | 'knowledge-browser-history' | 'knowledge-connector-ingest' | 'tts-prompt' | 'image-input' | 'skill-bundle' | 'skill-discovery-import' | 'profile-template-export' | 'profile-template-import'
27
+ 'knowledge-file' | 'knowledge-urls' | 'knowledge-bookmarks' | 'knowledge-browser-history' | 'knowledge-connector-ingest' | 'knowledge-reindex' | 'tts-prompt' | 'image-input' | 'skill-bundle' | 'skill-discovery-import' | 'profile-template-export' | 'profile-template-import'
28
+ | 'profile-template-from-discovered' | 'profile-from-discovered' | 'profile-default' | 'profile-default-clear'
29
+ | 'profile-template-show' | 'profile-show' | 'profile-delete'
30
+ | 'support-bundle-export' | 'support-bundle-inspect' | 'support-bundle-import'
31
+ | 'subscription-inspect' | 'subscription-login-start' | 'subscription-login-finish' | 'subscription-logout'
32
+ | 'model-pin' | 'model-unpin'
33
+ | 'delegate-task'
34
+ | 'workplan-add' | 'workplan-show' | 'workplan-status' | 'workplan-delete' | 'workplan-clear-completed'
9
35
  | 'persona-discovery-import'
10
36
  | 'routine-discovery-import'
11
- | 'mcp-server' | 'notify-webhook' | 'notify-webhook-remove' | 'notify-webhook-test'
37
+ | 'mcp-server' | 'mcp-tools-server' | 'mcp-repair' | 'notify-webhook' | 'notify-webhook-remove' | 'notify-webhook-clear' | 'notify-webhook-test'
38
+ | 'secret-set' | 'secret-link' | 'secret-test' | 'secret-delete'
12
39
  >;
13
40
 
14
- export type AgentWorkspaceBasicCommandEditorSubmission =
15
- | {
16
- readonly kind: 'editor';
17
- readonly editor: AgentWorkspaceLocalEditor;
18
- readonly status: string;
19
- readonly actionResult?: AgentWorkspaceActionResult;
20
- }
21
- | {
22
- readonly kind: 'dispatch';
23
- readonly command: string;
24
- readonly status: string;
25
- readonly actionResult: AgentWorkspaceActionResult;
26
- };
27
-
28
- function isAffirmative(value: string): boolean {
29
- return /^(y|yes|true)$/i.test(value.trim());
30
- }
31
-
32
- function splitCommaList(value: string): readonly string[] {
33
- return value.split(',').map((entry) => entry.trim()).filter(Boolean);
34
- }
35
-
36
41
  export function isAgentWorkspaceBasicCommandEditorKind(kind: AgentWorkspaceEditorKind): kind is AgentWorkspaceBasicCommandEditorKind {
37
- return kind === 'knowledge-bookmarks'
42
+ return isAgentWorkspaceAccessCommandEditorKind(kind)
43
+ || isAgentWorkspaceChannelCommandEditorKind(kind)
44
+ || isAgentWorkspaceKnowledgeCommandEditorKind(kind)
45
+ || isAgentWorkspaceLibraryCommandEditorKind(kind)
46
+ || isAgentWorkspaceMemoryCommandEditorKind(kind)
47
+ || isAgentWorkspaceOperationsCommandEditorKind(kind)
48
+ || isAgentWorkspaceProviderCommandEditorKind(kind)
49
+ || isAgentWorkspaceSessionCommandEditorKind(kind)
50
+ || isAgentWorkspaceSkillBundleCommandEditorKind(kind)
51
+ || isAgentWorkspaceTaskCommandEditorKind(kind)
52
+ || kind === 'knowledge-bookmarks'
38
53
  || kind === 'knowledge-file'
54
+ || kind === 'knowledge-urls'
39
55
  || kind === 'knowledge-browser-history'
40
56
  || kind === 'knowledge-connector-ingest'
57
+ || kind === 'knowledge-reindex'
41
58
  || kind === 'tts-prompt'
42
59
  || kind === 'image-input'
43
60
  || kind === 'skill-bundle'
@@ -46,13 +63,72 @@ export function isAgentWorkspaceBasicCommandEditorKind(kind: AgentWorkspaceEdito
46
63
  || kind === 'skill-discovery-import'
47
64
  || kind === 'profile-template-export'
48
65
  || kind === 'profile-template-import'
66
+ || kind === 'profile-template-from-discovered'
67
+ || kind === 'profile-from-discovered'
68
+ || kind === 'profile-default'
69
+ || kind === 'profile-default-clear'
70
+ || kind === 'profile-template-show'
71
+ || kind === 'profile-show'
72
+ || kind === 'profile-delete'
73
+ || kind === 'support-bundle-export'
74
+ || kind === 'support-bundle-inspect'
75
+ || kind === 'support-bundle-import'
76
+ || kind === 'subscription-inspect'
77
+ || kind === 'subscription-login-start'
78
+ || kind === 'subscription-login-finish'
79
+ || kind === 'subscription-logout'
80
+ || kind === 'model-pin'
81
+ || kind === 'model-unpin'
82
+ || kind === 'delegate-task'
83
+ || kind === 'workplan-add'
84
+ || kind === 'workplan-show'
85
+ || kind === 'workplan-status'
86
+ || kind === 'workplan-delete'
87
+ || kind === 'workplan-clear-completed'
49
88
  || kind === 'mcp-server'
89
+ || kind === 'mcp-tools-server'
90
+ || kind === 'mcp-repair'
50
91
  || kind === 'notify-webhook'
51
92
  || kind === 'notify-webhook-remove'
52
- || kind === 'notify-webhook-test';
93
+ || kind === 'notify-webhook-clear'
94
+ || kind === 'notify-webhook-test'
95
+ || kind === 'secret-set'
96
+ || kind === 'secret-link'
97
+ || kind === 'secret-test'
98
+ || kind === 'secret-delete';
53
99
  }
54
100
 
55
101
  export function createAgentWorkspaceBasicCommandEditor(kind: AgentWorkspaceBasicCommandEditorKind): AgentWorkspaceLocalEditor {
102
+ if (isAgentWorkspaceAccessCommandEditorKind(kind)) {
103
+ return createAgentWorkspaceAccessCommandEditor(kind);
104
+ }
105
+ if (isAgentWorkspaceChannelCommandEditorKind(kind)) {
106
+ return createAgentWorkspaceChannelCommandEditor(kind);
107
+ }
108
+ if (isAgentWorkspaceKnowledgeCommandEditorKind(kind)) {
109
+ return createAgentWorkspaceKnowledgeCommandEditor(kind);
110
+ }
111
+ if (isAgentWorkspaceLibraryCommandEditorKind(kind)) {
112
+ return createAgentWorkspaceLibraryCommandEditor(kind);
113
+ }
114
+ if (isAgentWorkspaceMemoryCommandEditorKind(kind)) {
115
+ return createAgentWorkspaceMemoryCommandEditor(kind);
116
+ }
117
+ if (isAgentWorkspaceOperationsCommandEditorKind(kind)) {
118
+ return createAgentWorkspaceOperationsCommandEditor(kind);
119
+ }
120
+ if (isAgentWorkspaceProviderCommandEditorKind(kind)) {
121
+ return createAgentWorkspaceProviderCommandEditor(kind);
122
+ }
123
+ if (isAgentWorkspaceSessionCommandEditorKind(kind)) {
124
+ return createAgentWorkspaceSessionCommandEditor(kind);
125
+ }
126
+ if (isAgentWorkspaceSkillBundleCommandEditorKind(kind)) {
127
+ return createAgentWorkspaceSkillBundleCommandEditor(kind);
128
+ }
129
+ if (isAgentWorkspaceTaskCommandEditorKind(kind)) {
130
+ return createAgentWorkspaceTaskCommandEditor(kind);
131
+ }
56
132
  if (kind === 'knowledge-bookmarks') {
57
133
  return {
58
134
  kind,
@@ -82,6 +158,20 @@ export function createAgentWorkspaceBasicCommandEditor(kind: AgentWorkspaceBasic
82
158
  ],
83
159
  };
84
160
  }
161
+ if (kind === 'knowledge-urls') {
162
+ return {
163
+ kind,
164
+ mode: 'create',
165
+ title: 'Import URL List into Agent Knowledge',
166
+ selectedFieldIndex: 0,
167
+ message: 'Import a local newline-delimited URL list into the isolated Agent Knowledge segment. Type yes on the final field to confirm.',
168
+ fields: [
169
+ { id: 'path', label: 'URL list path', value: '', required: true, multiline: false, hint: 'Path to a local file containing one URL per line.' },
170
+ { id: 'allowPrivateHosts', label: 'Allow private hosts', value: '', required: false, multiline: false, hint: 'yes/no. Blank defaults to no.' },
171
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /knowledge import-urls with --yes.' },
172
+ ],
173
+ };
174
+ }
85
175
  if (kind === 'knowledge-browser-history') {
86
176
  return {
87
177
  kind,
@@ -115,6 +205,18 @@ export function createAgentWorkspaceBasicCommandEditor(kind: AgentWorkspaceBasic
115
205
  ],
116
206
  };
117
207
  }
208
+ if (kind === 'knowledge-reindex') {
209
+ return {
210
+ kind,
211
+ mode: 'update',
212
+ title: 'Reindex Agent Knowledge',
213
+ selectedFieldIndex: 0,
214
+ message: 'Rebuild the isolated Agent Knowledge index. Type yes on the final field to confirm.',
215
+ fields: [
216
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /knowledge reindex with --yes.' },
217
+ ],
218
+ };
219
+ }
118
220
  if (kind === 'mcp-server') {
119
221
  return {
120
222
  kind,
@@ -132,7 +234,31 @@ export function createAgentWorkspaceBasicCommandEditor(kind: AgentWorkspaceBasic
132
234
  { id: 'env', label: 'Env refs', value: '', required: false, multiline: false, hint: 'Comma-separated KEY=VALUE entries. Prefer secret refs, not raw secrets.' },
133
235
  { id: 'paths', label: 'Allowed paths', value: '', required: false, multiline: false, hint: 'Comma-separated path allowlist entries.' },
134
236
  { id: 'hosts', label: 'Allowed hosts', value: '', required: false, multiline: false, hint: 'Comma-separated host allowlist entries.' },
135
- { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /mcp add with --yes.' },
237
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to save the MCP server through the TUI command router.' },
238
+ ],
239
+ };
240
+ }
241
+ if (kind === 'mcp-tools-server') {
242
+ return {
243
+ kind,
244
+ mode: 'create',
245
+ title: 'Show MCP Server Tools',
246
+ selectedFieldIndex: 0,
247
+ message: 'List tools exposed by one MCP server without changing server trust, role, or config.',
248
+ fields: [
249
+ { id: 'server', label: 'Server name', value: '', required: true, multiline: false, hint: 'MCP server name from MCP Review or the fullscreen MCP workspace.' },
250
+ ],
251
+ };
252
+ }
253
+ if (kind === 'mcp-repair') {
254
+ return {
255
+ kind,
256
+ mode: 'create',
257
+ title: 'Show MCP Repair Guidance',
258
+ selectedFieldIndex: 0,
259
+ message: 'Show read-only repair guidance for one MCP server. This does not approve quarantine, change trust, or reload the runtime.',
260
+ fields: [
261
+ { id: 'server', label: 'Server name', value: '', required: true, multiline: false, hint: 'MCP server name from MCP Review or Auth review.' },
136
262
  ],
137
263
  };
138
264
  }
@@ -162,6 +288,18 @@ export function createAgentWorkspaceBasicCommandEditor(kind: AgentWorkspaceBasic
162
288
  ],
163
289
  };
164
290
  }
291
+ if (kind === 'notify-webhook-clear') {
292
+ return {
293
+ kind,
294
+ mode: 'delete',
295
+ title: 'Clear Notification Webhooks',
296
+ selectedFieldIndex: 0,
297
+ message: 'Remove every configured webhook notification target. Type yes on the final field to confirm.',
298
+ fields: [
299
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /notify clear with --yes.' },
300
+ ],
301
+ };
302
+ }
165
303
  if (kind === 'notify-webhook-test') {
166
304
  return {
167
305
  kind,
@@ -174,6 +312,66 @@ export function createAgentWorkspaceBasicCommandEditor(kind: AgentWorkspaceBasic
174
312
  ],
175
313
  };
176
314
  }
315
+ if (kind === 'secret-set') {
316
+ return {
317
+ kind,
318
+ mode: 'create',
319
+ title: 'Store Secret Value',
320
+ selectedFieldIndex: 0,
321
+ message: 'Store one secret value through the Agent secret manager. The value is masked in this workspace. Type yes on the final field to confirm.',
322
+ fields: [
323
+ { id: 'key', label: 'Secret key', value: '', required: true, multiline: false, hint: 'Environment-style key, such as OPENAI_API_KEY.' },
324
+ { id: 'value', label: 'Secret value', value: '', required: true, multiline: false, hint: 'Raw value to store. It is masked here and never rendered in action results.', redact: true },
325
+ { id: 'scope', label: 'Scope', value: '', required: false, multiline: false, hint: 'project or user. Blank defaults to project.' },
326
+ { id: 'storage', label: 'Storage', value: '', required: false, multiline: false, hint: 'secure or plaintext. Blank defaults to secure.' },
327
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to store the secret value.' },
328
+ ],
329
+ };
330
+ }
331
+ if (kind === 'secret-link') {
332
+ return {
333
+ kind,
334
+ mode: 'create',
335
+ title: 'Link Secret Reference',
336
+ selectedFieldIndex: 0,
337
+ message: 'Link one key to an external goodvibes://secrets/... reference. Type yes on the final field to confirm.',
338
+ fields: [
339
+ { id: 'key', label: 'Secret key', value: '', required: true, multiline: false, hint: 'Environment-style key, such as SLACK_BOT_TOKEN.' },
340
+ { id: 'ref', label: 'Secret ref', value: '', required: true, multiline: false, hint: 'goodvibes://secrets/... reference from a supported provider.' },
341
+ { id: 'scope', label: 'Scope', value: '', required: false, multiline: false, hint: 'project or user. Blank defaults to project.' },
342
+ { id: 'storage', label: 'Storage', value: '', required: false, multiline: false, hint: 'secure or plaintext. Blank defaults to secure.' },
343
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to link the secret reference.' },
344
+ ],
345
+ };
346
+ }
347
+ if (kind === 'secret-test') {
348
+ return {
349
+ kind,
350
+ mode: 'create',
351
+ title: 'Test Secret Reference',
352
+ selectedFieldIndex: 0,
353
+ message: 'Resolve one goodvibes://secrets/... reference and show only resolved/missing status. Type yes on the final field to confirm.',
354
+ fields: [
355
+ { id: 'ref', label: 'Secret ref', value: '', required: true, multiline: false, hint: 'goodvibes://secrets/... reference to test without printing its value.' },
356
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to test the secret reference.' },
357
+ ],
358
+ };
359
+ }
360
+ if (kind === 'secret-delete') {
361
+ return {
362
+ kind,
363
+ mode: 'delete',
364
+ title: 'Delete Stored Secret',
365
+ selectedFieldIndex: 0,
366
+ message: 'Delete one stored secret key from the selected scope/storage. Type yes on the final field to confirm.',
367
+ fields: [
368
+ { id: 'key', label: 'Secret key', value: '', required: true, multiline: false, hint: 'Stored key to delete.' },
369
+ { id: 'scope', label: 'Scope', value: '', required: false, multiline: false, hint: 'Optional project or user. Blank lets the command choose the matching stored key.' },
370
+ { id: 'storage', label: 'Storage', value: '', required: false, multiline: false, hint: 'Optional secure or plaintext.' },
371
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to delete the stored secret key.' },
372
+ ],
373
+ };
374
+ }
177
375
  if (kind === 'tts-prompt') {
178
376
  return {
179
377
  kind,
@@ -199,6 +397,28 @@ export function createAgentWorkspaceBasicCommandEditor(kind: AgentWorkspaceBasic
199
397
  ],
200
398
  };
201
399
  }
400
+ if (kind === 'model-pin' || kind === 'model-unpin') {
401
+ const pinning = kind === 'model-pin';
402
+ return {
403
+ kind,
404
+ mode: 'create',
405
+ title: pinning ? 'Pin Model' : 'Unpin Model',
406
+ selectedFieldIndex: 0,
407
+ message: pinning
408
+ ? 'Pin one model registry key so it is easy to reuse from the Agent TUI.'
409
+ : 'Remove one pinned model registry key from the Agent model favorites.',
410
+ fields: [
411
+ {
412
+ id: 'model',
413
+ label: 'Model registry key',
414
+ value: '',
415
+ required: true,
416
+ multiline: false,
417
+ hint: 'Use a registry key shown by the model picker, such as openai:gpt-5.5.',
418
+ },
419
+ ],
420
+ };
421
+ }
202
422
  if (kind === 'profile-template-export') {
203
423
  return {
204
424
  kind,
@@ -226,6 +446,278 @@ export function createAgentWorkspaceBasicCommandEditor(kind: AgentWorkspaceBasic
226
446
  ],
227
447
  };
228
448
  }
449
+ if (kind === 'profile-template-show') {
450
+ return {
451
+ kind,
452
+ mode: 'create',
453
+ title: 'Preview Agent Starter Template',
454
+ selectedFieldIndex: 0,
455
+ message: 'Preview one built-in or local starter template before creating or exporting a profile.',
456
+ fields: [
457
+ { id: 'id', label: 'Starter id', value: '', required: true, multiline: false, hint: 'Starter template id from /agent-profile templates.' },
458
+ ],
459
+ };
460
+ }
461
+ if (kind === 'profile-show') {
462
+ return {
463
+ kind,
464
+ mode: 'create',
465
+ title: 'Show Agent Profile',
466
+ selectedFieldIndex: 0,
467
+ message: 'Show one isolated Agent profile home, starter metadata, and launch command.',
468
+ fields: [
469
+ { id: 'profile', label: 'Profile name', value: '', required: true, multiline: false, hint: 'Existing isolated Agent profile name from /agent-profile list.' },
470
+ ],
471
+ };
472
+ }
473
+ if (kind === 'profile-template-from-discovered') {
474
+ return {
475
+ kind,
476
+ mode: 'create',
477
+ title: 'Create Starter from Discovered Behavior',
478
+ selectedFieldIndex: 0,
479
+ message: 'Create an Agent-local starter template from reviewed discovered persona, skill, and routine markdown. Type yes on the final field to confirm.',
480
+ fields: [
481
+ { id: 'id', label: 'Starter id', value: '', required: true, multiline: false, hint: 'New local starter id, for example research-desk.' },
482
+ { id: 'name', label: 'Starter name', value: '', required: false, multiline: false, hint: 'Optional display name. Defaults to the selected persona name.' },
483
+ { id: 'description', label: 'Description', value: '', required: false, multiline: false, hint: 'Optional one-line summary.' },
484
+ { id: 'persona', label: 'Persona', value: '', required: false, multiline: false, hint: 'Optional discovered persona name/path. Blank uses the first discovered persona.' },
485
+ { id: 'skills', label: 'Skills', value: '', required: false, multiline: false, hint: 'all or comma-separated discovered skill names. Blank includes all.' },
486
+ { id: 'routines', label: 'Routines', value: '', required: false, multiline: false, hint: 'all or comma-separated discovered routine names. Blank includes all.' },
487
+ { id: 'replace', label: 'Replace existing', value: 'no', required: false, multiline: false, hint: 'yes/no. Existing starter ids are protected unless this is yes.' },
488
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /agent-profile template from-discovered with --yes.' },
489
+ ],
490
+ };
491
+ }
492
+ if (kind === 'profile-from-discovered') {
493
+ return {
494
+ kind,
495
+ mode: 'create',
496
+ title: 'Create Profile from Discovered Behavior',
497
+ selectedFieldIndex: 0,
498
+ message: 'Create a local starter template and isolated Agent profile from reviewed discovered behavior markdown. Type yes on the final field to confirm.',
499
+ fields: [
500
+ { id: 'profile', label: 'Profile name', value: '', required: true, multiline: false, hint: 'New isolated Agent profile name, for example research-desk.' },
501
+ { id: 'templateId', label: 'Starter id', value: '', required: false, multiline: false, hint: 'Optional local starter id. Blank uses the profile name.' },
502
+ { id: 'name', label: 'Starter name', value: '', required: false, multiline: false, hint: 'Optional display name for the generated starter.' },
503
+ { id: 'description', label: 'Description', value: '', required: false, multiline: false, hint: 'Optional one-line summary.' },
504
+ { id: 'persona', label: 'Persona', value: '', required: false, multiline: false, hint: 'Optional discovered persona name/path. Blank uses the first discovered persona.' },
505
+ { id: 'skills', label: 'Skills', value: '', required: false, multiline: false, hint: 'all or comma-separated discovered skill names. Blank includes all.' },
506
+ { id: 'routines', label: 'Routines', value: '', required: false, multiline: false, hint: 'all or comma-separated discovered routine names. Blank includes all.' },
507
+ { id: 'replace', label: 'Replace starter', value: 'no', required: false, multiline: false, hint: 'yes/no. Existing starter ids are protected unless this is yes.' },
508
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /agent-profile create-from-discovered with --yes.' },
509
+ ],
510
+ };
511
+ }
512
+ if (kind === 'profile-default') {
513
+ return {
514
+ kind,
515
+ mode: 'update',
516
+ title: 'Use Default Agent Profile',
517
+ selectedFieldIndex: 0,
518
+ message: 'Select which isolated Agent profile the next normal goodvibes-agent launch should use. Type yes on the final field to confirm.',
519
+ fields: [
520
+ { id: 'profile', label: 'Profile name', value: '', required: true, multiline: false, hint: 'Existing isolated Agent profile name from /agent-profile list.' },
521
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /agent-profile use with --yes.' },
522
+ ],
523
+ };
524
+ }
525
+ if (kind === 'profile-default-clear') {
526
+ return {
527
+ kind,
528
+ mode: 'update',
529
+ title: 'Clear Default Agent Profile',
530
+ selectedFieldIndex: 0,
531
+ message: 'Return the next normal goodvibes-agent launch to the base Agent home. Type yes to confirm.',
532
+ fields: [
533
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /agent-profile default clear with --yes.' },
534
+ ],
535
+ };
536
+ }
537
+ if (kind === 'profile-delete') {
538
+ return {
539
+ kind,
540
+ mode: 'delete',
541
+ title: 'Delete Agent Profile',
542
+ selectedFieldIndex: 0,
543
+ message: 'Delete one isolated Agent profile home. Type yes on the final field to confirm.',
544
+ fields: [
545
+ { id: 'profile', label: 'Profile name', value: '', required: true, multiline: false, hint: 'Existing isolated Agent profile name from /agent-profile list.' },
546
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /agent-profile delete with --yes.' },
547
+ ],
548
+ };
549
+ }
550
+ if (kind === 'support-bundle-export') {
551
+ return {
552
+ kind,
553
+ mode: 'create',
554
+ title: 'Export Agent Support Bundle',
555
+ selectedFieldIndex: 0,
556
+ message: 'Export a redacted Agent support bundle from this workspace. Type yes on the final field to confirm.',
557
+ fields: [
558
+ { id: 'path', label: 'Output path', value: 'goodvibes-agent-bundle.json', required: true, multiline: false, hint: 'Workspace-relative JSON path to write.' },
559
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /bundle export with --yes.' },
560
+ ],
561
+ };
562
+ }
563
+ if (kind === 'support-bundle-inspect') {
564
+ return {
565
+ kind,
566
+ mode: 'create',
567
+ title: 'Inspect Agent Support Bundle',
568
+ selectedFieldIndex: 0,
569
+ message: 'Inspect a redacted Agent support bundle before import or sharing.',
570
+ fields: [
571
+ { id: 'path', label: 'Bundle path', value: 'goodvibes-agent-bundle.json', required: true, multiline: false, hint: 'Workspace-relative bundle JSON path.' },
572
+ ],
573
+ };
574
+ }
575
+ if (kind === 'support-bundle-import') {
576
+ return {
577
+ kind,
578
+ mode: 'update',
579
+ title: 'Import Agent Support Bundle',
580
+ selectedFieldIndex: 0,
581
+ message: 'Import non-redacted config values from a reviewed Agent support bundle. Type yes on the final field to confirm.',
582
+ fields: [
583
+ { id: 'path', label: 'Bundle path', value: 'goodvibes-agent-bundle.json', required: true, multiline: false, hint: 'Workspace-relative bundle JSON path to import.' },
584
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /bundle import with --yes.' },
585
+ ],
586
+ };
587
+ }
588
+ if (kind === 'subscription-inspect') {
589
+ return {
590
+ kind,
591
+ mode: 'create',
592
+ title: 'Inspect Provider Subscription',
593
+ selectedFieldIndex: 0,
594
+ message: 'Inspect one provider subscription route without starting login or printing token values.',
595
+ fields: [
596
+ { id: 'provider', label: 'Provider', value: 'openai', required: true, multiline: false, hint: 'Subscription provider id from /subscription providers.' },
597
+ ],
598
+ };
599
+ }
600
+ if (kind === 'subscription-login-start') {
601
+ return {
602
+ kind,
603
+ mode: 'create',
604
+ title: 'Start Provider Subscription Login',
605
+ selectedFieldIndex: 0,
606
+ message: 'Start one provider subscription OAuth login. Type yes on the final field to confirm browser/pending-login side effects.',
607
+ fields: [
608
+ { id: 'provider', label: 'Provider', value: 'openai', required: true, multiline: false, hint: 'Subscription provider id from /subscription providers.' },
609
+ { id: 'openBrowser', label: 'Open browser', value: 'yes', required: false, multiline: false, hint: 'yes/no. Use no to print the authorization URL only.' },
610
+ { id: 'manual', label: 'Manual callback', value: 'no', required: false, multiline: false, hint: 'yes/no. Use yes to avoid the local callback listener and finish manually.' },
611
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /subscription login <provider> start with --yes.' },
612
+ ],
613
+ };
614
+ }
615
+ if (kind === 'subscription-login-finish') {
616
+ return {
617
+ kind,
618
+ mode: 'update',
619
+ title: 'Finish Provider Subscription Login',
620
+ selectedFieldIndex: 0,
621
+ message: 'Finish a pending provider subscription OAuth login from a code or redirected URL. Type yes on the final field to confirm token storage.',
622
+ fields: [
623
+ { id: 'provider', label: 'Provider', value: 'openai', required: true, multiline: false, hint: 'Provider id used when starting login.' },
624
+ { id: 'code', label: 'Code or redirect URL', value: '', required: true, multiline: false, hint: 'OAuth code or full redirect URL containing code=...' },
625
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /subscription login <provider> finish with --yes.' },
626
+ ],
627
+ };
628
+ }
629
+ if (kind === 'subscription-logout') {
630
+ return {
631
+ kind,
632
+ mode: 'delete',
633
+ title: 'Logout Provider Subscription',
634
+ selectedFieldIndex: 0,
635
+ message: 'Remove one stored provider subscription session. Ambient API key resolution applies again if configured. Type yes to confirm.',
636
+ fields: [
637
+ { id: 'provider', label: 'Provider', value: 'openai', required: true, multiline: false, hint: 'Stored subscription provider id.' },
638
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /subscription logout with --yes.' },
639
+ ],
640
+ };
641
+ }
642
+ if (kind === 'delegate-task') {
643
+ return {
644
+ kind,
645
+ mode: 'create',
646
+ title: 'Delegate Build Work to GoodVibes TUI',
647
+ selectedFieldIndex: 0,
648
+ message: 'Send one explicit build/fix/review task to GoodVibes TUI/shared-session routes. Type yes on the final field to confirm.',
649
+ fields: [
650
+ { id: 'task', label: 'Original task', value: '', required: true, multiline: true, hint: 'Paste the full original user ask. Ctrl-J inserts a new line.' },
651
+ { id: 'wrfc', label: 'Request WRFC', value: '', required: false, multiline: false, hint: 'yes/no. Blank means no WRFC request.' },
652
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /delegate for this task.' },
653
+ ],
654
+ };
655
+ }
656
+ if (kind === 'workplan-add') {
657
+ return {
658
+ kind,
659
+ mode: 'create',
660
+ title: 'Add Work Plan Item',
661
+ selectedFieldIndex: 0,
662
+ message: 'Create one visible work plan item from the Agent workspace.',
663
+ fields: [
664
+ { id: 'title', label: 'Title', value: '', required: true, multiline: true, hint: 'Task title. Ctrl-J inserts a new line.' },
665
+ { id: 'owner', label: 'Owner', value: '', required: false, multiline: false, hint: 'Optional owner label.' },
666
+ { id: 'source', label: 'Source', value: '', required: false, multiline: false, hint: 'Optional source label. Blank defaults to manual.' },
667
+ { id: 'notes', label: 'Notes', value: '', required: false, multiline: true, hint: 'Optional notes. Ctrl-J inserts a new line.' },
668
+ ],
669
+ };
670
+ }
671
+ if (kind === 'workplan-show') {
672
+ return {
673
+ kind,
674
+ mode: 'create',
675
+ title: 'Show Work Plan Detail',
676
+ selectedFieldIndex: 0,
677
+ message: 'Print the detailed work plan from the Agent workspace without mutating work state.',
678
+ fields: [
679
+ { id: 'format', label: 'Format', value: '', required: false, multiline: false, hint: 'Optional. Blank uses the default detail view; markdown also works.' },
680
+ ],
681
+ };
682
+ }
683
+ if (kind === 'workplan-status') {
684
+ return {
685
+ kind,
686
+ mode: 'update',
687
+ title: 'Update Work Plan Status',
688
+ selectedFieldIndex: 0,
689
+ message: 'Update one visible work plan item status from the Agent workspace.',
690
+ fields: [
691
+ { id: 'id', label: 'Work item id', value: '', required: true, multiline: false, hint: 'Existing work plan item id.' },
692
+ { id: 'status', label: 'Status', value: '', required: true, multiline: false, hint: 'pending, start, blocked, done, failed, or cancelled.' },
693
+ ],
694
+ };
695
+ }
696
+ if (kind === 'workplan-delete') {
697
+ return {
698
+ kind,
699
+ mode: 'delete',
700
+ title: 'Remove Work Plan Item',
701
+ selectedFieldIndex: 0,
702
+ message: 'Remove one work plan item. Type yes on the final field to confirm.',
703
+ fields: [
704
+ { id: 'id', label: 'Work item id', value: '', required: true, multiline: false, hint: 'Existing work plan item id.' },
705
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /workplan remove with --yes.' },
706
+ ],
707
+ };
708
+ }
709
+ if (kind === 'workplan-clear-completed') {
710
+ return {
711
+ kind,
712
+ mode: 'delete',
713
+ title: 'Clear Completed Work Plan Items',
714
+ selectedFieldIndex: 0,
715
+ message: 'Clear completed and cancelled work plan items. Type yes to confirm.',
716
+ fields: [
717
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /workplan clear-completed with --yes.' },
718
+ ],
719
+ };
720
+ }
229
721
  if (kind === 'skill-discovery-import') {
230
722
  return {
231
723
  kind,
@@ -282,430 +774,3 @@ export function createAgentWorkspaceBasicCommandEditor(kind: AgentWorkspaceBasic
282
774
  ],
283
775
  };
284
776
  }
285
-
286
- export function buildAgentWorkspaceBasicCommandEditorSubmission(
287
- editor: AgentWorkspaceLocalEditor,
288
- readField: AgentWorkspaceFieldReader,
289
- commandDispatchAvailable: boolean,
290
- ): AgentWorkspaceBasicCommandEditorSubmission {
291
- if (!commandDispatchAvailable) {
292
- return {
293
- kind: 'editor',
294
- editor: { ...editor, message: 'Command dispatch is unavailable; this action cannot run from this workspace.' },
295
- status: 'Command dispatch unavailable.',
296
- actionResult: {
297
- kind: 'error',
298
- title: 'Command dispatch unavailable',
299
- detail: 'The Agent workspace cannot hand this action to the shell-owned command router.',
300
- },
301
- };
302
- }
303
- if (editor.kind === 'knowledge-bookmarks') {
304
- if (!isAffirmative(readField('confirm'))) {
305
- return {
306
- kind: 'editor',
307
- editor: { ...editor, message: 'Bookmark import not confirmed. Type yes, then press Enter.' },
308
- status: 'Agent Knowledge bookmark import not confirmed.',
309
- };
310
- }
311
- const command = `/knowledge import-bookmarks ${quoteSlashCommandArg(readField('path'))} --yes`;
312
- return {
313
- kind: 'dispatch',
314
- command,
315
- status: 'Opening Agent Knowledge bookmark import.',
316
- actionResult: {
317
- kind: 'dispatched',
318
- title: 'Opening Agent Knowledge bookmark import',
319
- detail: 'The workspace handed a confirmed bookmark import command to the shell-owned command router.',
320
- command,
321
- safety: 'safe',
322
- },
323
- };
324
- }
325
- if (editor.kind === 'knowledge-file') {
326
- if (!isAffirmative(readField('confirm'))) {
327
- return {
328
- kind: 'editor',
329
- editor: { ...editor, message: 'File ingest not confirmed. Type yes, then press Enter.' },
330
- status: 'Agent Knowledge file ingest not confirmed.',
331
- };
332
- }
333
- const parts = ['/knowledge', 'ingest-file', quoteSlashCommandArg(readField('path'))];
334
- const title = readField('title');
335
- const tags = readField('tags');
336
- const folder = readField('folder');
337
- if (title.length > 0) parts.push('--title', quoteSlashCommandArg(title));
338
- if (tags.length > 0) parts.push('--tags', quoteSlashCommandArg(tags));
339
- if (folder.length > 0) parts.push('--folder', quoteSlashCommandArg(folder));
340
- parts.push('--yes');
341
- const command = parts.join(' ');
342
- return {
343
- kind: 'dispatch',
344
- command,
345
- status: 'Opening Agent Knowledge file ingest.',
346
- actionResult: {
347
- kind: 'dispatched',
348
- title: 'Opening Agent Knowledge file ingest',
349
- detail: 'The workspace handed a confirmed file ingest command to the shell-owned command router.',
350
- command,
351
- safety: 'safe',
352
- },
353
- };
354
- }
355
- if (editor.kind === 'knowledge-browser-history') {
356
- if (!isAffirmative(readField('confirm'))) {
357
- return {
358
- kind: 'editor',
359
- editor: { ...editor, message: 'Browser history import not confirmed. Type yes, then press Enter.' },
360
- status: 'Agent Knowledge browser history import not confirmed.',
361
- };
362
- }
363
- const parts = ['/knowledge', 'import-browser-history'];
364
- const browsers = readField('browsers');
365
- const sources = readField('sources');
366
- const limit = readField('limit');
367
- const sinceDays = readField('sinceDays');
368
- if (browsers.length > 0) parts.push('--browsers', quoteSlashCommandArg(browsers));
369
- if (sources.length > 0) parts.push('--sources', quoteSlashCommandArg(sources));
370
- if (limit.length > 0) parts.push('--limit', quoteSlashCommandArg(limit));
371
- if (sinceDays.length > 0) parts.push('--since-days', quoteSlashCommandArg(sinceDays));
372
- parts.push('--yes');
373
- const command = parts.join(' ');
374
- return {
375
- kind: 'dispatch',
376
- command,
377
- status: 'Opening Agent Knowledge browser history import.',
378
- actionResult: {
379
- kind: 'dispatched',
380
- title: 'Opening Agent Knowledge browser history import',
381
- detail: 'The workspace handed a confirmed browser-history import command to the shell-owned command router.',
382
- command,
383
- safety: 'safe',
384
- },
385
- };
386
- }
387
- if (editor.kind === 'knowledge-connector-ingest') {
388
- if (!isAffirmative(readField('confirm'))) {
389
- return {
390
- kind: 'editor',
391
- editor: { ...editor, message: 'Connector ingest not confirmed. Type yes, then press Enter.' },
392
- status: 'Agent Knowledge connector ingest not confirmed.',
393
- };
394
- }
395
- const connectorId = readField('connectorId');
396
- const input = readField('input');
397
- const path = readField('path');
398
- const content = readField('content');
399
- const parts = ['/knowledge', 'ingest-connector', quoteSlashCommandArg(connectorId)];
400
- if (input.length > 0) parts.push('--input', quoteSlashCommandArg(input));
401
- if (path.length > 0) parts.push('--path', quoteSlashCommandArg(path));
402
- if (content.length > 0) parts.push('--content', quoteSlashCommandArg(content));
403
- if (isAffirmative(readField('allowPrivateHosts'))) parts.push('--allow-private-hosts');
404
- parts.push('--yes');
405
- const command = parts.join(' ');
406
- return {
407
- kind: 'dispatch',
408
- command,
409
- status: 'Opening Agent Knowledge connector ingest.',
410
- actionResult: {
411
- kind: 'dispatched',
412
- title: 'Opening Agent Knowledge connector ingest',
413
- detail: 'The workspace handed a confirmed connector ingest command to the shell-owned command router.',
414
- command,
415
- safety: 'safe',
416
- },
417
- };
418
- }
419
- if (editor.kind === 'mcp-server') {
420
- if (!isAffirmative(readField('confirm'))) {
421
- return {
422
- kind: 'editor',
423
- editor: { ...editor, message: 'MCP server add/update not confirmed. Type yes, then press Enter.' },
424
- status: 'MCP server add/update not confirmed.',
425
- };
426
- }
427
- const parts = [
428
- '/mcp',
429
- 'add',
430
- quoteSlashCommandArg(readField('name')),
431
- quoteSlashCommandArg(readField('command')),
432
- ...tokenizeSlashCommand(readField('args')).map(quoteSlashCommandArg),
433
- ];
434
- const scope = readField('scope');
435
- const role = readField('role');
436
- const trust = readField('trust');
437
- if (scope.length > 0) parts.push('--scope', quoteSlashCommandArg(scope));
438
- if (role.length > 0) parts.push('--role', quoteSlashCommandArg(role));
439
- if (trust.length > 0) parts.push('--trust', quoteSlashCommandArg(trust));
440
- for (const env of splitCommaList(readField('env'))) parts.push('--env', quoteSlashCommandArg(env));
441
- for (const path of splitCommaList(readField('paths'))) parts.push('--path', quoteSlashCommandArg(path));
442
- for (const host of splitCommaList(readField('hosts'))) parts.push('--host', quoteSlashCommandArg(host));
443
- parts.push('--yes');
444
- const command = parts.join(' ');
445
- return {
446
- kind: 'dispatch',
447
- command,
448
- status: 'Opening MCP server add/update.',
449
- actionResult: {
450
- kind: 'dispatched',
451
- title: 'Opening MCP server add/update',
452
- detail: 'The workspace handed a confirmed MCP server add/update command to the shell-owned command router.',
453
- command,
454
- safety: 'safe',
455
- },
456
- };
457
- }
458
- if (editor.kind === 'notify-webhook') {
459
- if (!isAffirmative(readField('confirm'))) {
460
- return {
461
- kind: 'editor',
462
- editor: { ...editor, message: 'Notification webhook add not confirmed. Type yes, then press Enter.' },
463
- status: 'Notification webhook add not confirmed.',
464
- };
465
- }
466
- const command = `/notify add ${quoteSlashCommandArg(readField('url'))} --yes`;
467
- return {
468
- kind: 'dispatch',
469
- command,
470
- status: 'Opening notification webhook add.',
471
- actionResult: {
472
- kind: 'dispatched',
473
- title: 'Opening notification webhook add',
474
- detail: 'The workspace handed a confirmed notification target command to the shell-owned command router.',
475
- command,
476
- safety: 'safe',
477
- },
478
- };
479
- }
480
- if (editor.kind === 'notify-webhook-remove') {
481
- if (!isAffirmative(readField('confirm'))) {
482
- return {
483
- kind: 'editor',
484
- editor: { ...editor, message: 'Notification webhook remove not confirmed. Type yes, then press Enter.' },
485
- status: 'Notification webhook remove not confirmed.',
486
- };
487
- }
488
- const command = `/notify remove ${quoteSlashCommandArg(readField('url'))} --yes`;
489
- return {
490
- kind: 'dispatch',
491
- command,
492
- status: 'Opening notification webhook remove.',
493
- actionResult: {
494
- kind: 'dispatched',
495
- title: 'Opening notification webhook remove',
496
- detail: 'The workspace handed a confirmed notification target remove command to the shell-owned command router.',
497
- command,
498
- safety: 'safe',
499
- },
500
- };
501
- }
502
- if (editor.kind === 'notify-webhook-test') {
503
- if (!isAffirmative(readField('confirm'))) {
504
- return {
505
- kind: 'editor',
506
- editor: { ...editor, message: 'Notification webhook test not confirmed. Type yes, then press Enter.' },
507
- status: 'Notification webhook test not confirmed.',
508
- };
509
- }
510
- const command = '/notify test --yes';
511
- return {
512
- kind: 'dispatch',
513
- command,
514
- status: 'Opening notification webhook test.',
515
- actionResult: {
516
- kind: 'dispatched',
517
- title: 'Opening notification webhook test',
518
- detail: 'The workspace handed a confirmed notification test command to the shell-owned command router.',
519
- command,
520
- safety: 'safe',
521
- },
522
- };
523
- }
524
- if (editor.kind === 'tts-prompt') {
525
- const command = `/tts ${quoteSlashCommandArg(readField('prompt'))}`;
526
- return {
527
- kind: 'dispatch',
528
- command,
529
- status: 'Opening spoken assistant prompt.',
530
- actionResult: {
531
- kind: 'dispatched',
532
- title: 'Opening spoken assistant prompt',
533
- detail: 'The workspace handed a spoken prompt to the shell-owned command router.',
534
- command,
535
- safety: 'safe',
536
- },
537
- };
538
- }
539
- if (editor.kind === 'image-input') {
540
- const prompt = readField('prompt');
541
- const command = prompt.length > 0
542
- ? `/image ${quoteSlashCommandArg(readField('path'))} ${quoteSlashCommandArg(prompt)}`
543
- : `/image ${quoteSlashCommandArg(readField('path'))}`;
544
- return {
545
- kind: 'dispatch',
546
- command,
547
- status: 'Opening image input.',
548
- actionResult: {
549
- kind: 'dispatched',
550
- title: 'Opening image input',
551
- detail: 'The workspace handed an image attachment command to the shell-owned command router.',
552
- command,
553
- safety: 'safe',
554
- },
555
- };
556
- }
557
- if (editor.kind === 'profile-template-export') {
558
- if (!isAffirmative(readField('confirm'))) {
559
- return {
560
- kind: 'editor',
561
- editor: { ...editor, message: 'Starter template export not confirmed. Type yes, then press Enter.' },
562
- status: 'Agent starter template export not confirmed.',
563
- };
564
- }
565
- const command = `/agent-profile template export ${quoteSlashCommandArg(readField('templateId'))} ${quoteSlashCommandArg(readField('path'))} --yes`;
566
- return {
567
- kind: 'dispatch',
568
- command,
569
- status: 'Opening Agent starter template export.',
570
- actionResult: {
571
- kind: 'dispatched',
572
- title: 'Opening Agent starter template export',
573
- detail: 'The workspace handed a confirmed starter template export command to the shell-owned command router.',
574
- command,
575
- safety: 'safe',
576
- },
577
- };
578
- }
579
- if (editor.kind === 'profile-template-import') {
580
- if (!isAffirmative(readField('confirm'))) {
581
- return {
582
- kind: 'editor',
583
- editor: { ...editor, message: 'Starter template import not confirmed. Type yes, then press Enter.' },
584
- status: 'Agent starter template import not confirmed.',
585
- };
586
- }
587
- const command = `/agent-profile template import ${quoteSlashCommandArg(readField('path'))} --yes`;
588
- return {
589
- kind: 'dispatch',
590
- command,
591
- status: 'Opening Agent starter template import.',
592
- actionResult: {
593
- kind: 'dispatched',
594
- title: 'Opening Agent starter template import',
595
- detail: 'The workspace handed a confirmed starter template import command to the shell-owned command router.',
596
- command,
597
- safety: 'safe',
598
- },
599
- };
600
- }
601
- if (editor.kind === 'skill-discovery-import') {
602
- if (!isAffirmative(readField('confirm'))) {
603
- return {
604
- kind: 'editor',
605
- editor: { ...editor, message: 'Discovered skill import not confirmed. Type yes, then press Enter.' },
606
- status: 'Agent skill import not confirmed.',
607
- };
608
- }
609
- const parts = [
610
- '/agent-skills',
611
- 'import-discovered',
612
- quoteSlashCommandArg(readField('name')),
613
- ];
614
- if (isAffirmative(readField('enabled'))) parts.push('--enabled');
615
- parts.push('--yes');
616
- const command = parts.join(' ');
617
- return {
618
- kind: 'dispatch',
619
- command,
620
- status: 'Opening discovered skill import.',
621
- actionResult: {
622
- kind: 'dispatched',
623
- title: 'Opening discovered skill import',
624
- detail: 'The workspace handed a confirmed local skill import command to the shell-owned command router.',
625
- command,
626
- safety: 'safe',
627
- },
628
- };
629
- }
630
- if (editor.kind === 'persona-discovery-import') {
631
- if (!isAffirmative(readField('confirm'))) {
632
- return {
633
- kind: 'editor',
634
- editor: { ...editor, message: 'Discovered persona import not confirmed. Type yes, then press Enter.' },
635
- status: 'Agent persona import not confirmed.',
636
- };
637
- }
638
- const parts = [
639
- '/personas',
640
- 'import-discovered',
641
- quoteSlashCommandArg(readField('name')),
642
- ];
643
- if (isAffirmative(readField('use'))) parts.push('--use');
644
- parts.push('--yes');
645
- const command = parts.join(' ');
646
- return {
647
- kind: 'dispatch',
648
- command,
649
- status: 'Opening discovered persona import.',
650
- actionResult: {
651
- kind: 'dispatched',
652
- title: 'Opening discovered persona import',
653
- detail: 'The workspace handed a confirmed local persona import command to the shell-owned command router.',
654
- command,
655
- safety: 'safe',
656
- },
657
- };
658
- }
659
- if (editor.kind === 'routine-discovery-import') {
660
- if (!isAffirmative(readField('confirm'))) {
661
- return {
662
- kind: 'editor',
663
- editor: { ...editor, message: 'Discovered routine import not confirmed. Type yes, then press Enter.' },
664
- status: 'Agent routine import not confirmed.',
665
- };
666
- }
667
- const parts = [
668
- '/routines',
669
- 'import-discovered',
670
- quoteSlashCommandArg(readField('name')),
671
- ];
672
- if (isAffirmative(readField('enabled'))) parts.push('--enabled');
673
- parts.push('--yes');
674
- const command = parts.join(' ');
675
- return {
676
- kind: 'dispatch',
677
- command,
678
- status: 'Opening discovered routine import.',
679
- actionResult: {
680
- kind: 'dispatched',
681
- title: 'Opening discovered routine import',
682
- detail: 'The workspace handed a confirmed local routine import command to the shell-owned command router.',
683
- command,
684
- safety: 'safe',
685
- },
686
- };
687
- }
688
- const commandParts = [
689
- '/agent-skills bundle create',
690
- '--name',
691
- quoteSlashCommandArg(readField('name')),
692
- '--description',
693
- quoteSlashCommandArg(readField('description')),
694
- '--skills',
695
- quoteSlashCommandArg(readField('skills')),
696
- ];
697
- if (isAffirmative(readField('enabled'))) commandParts.push('--enabled');
698
- const command = commandParts.join(' ');
699
- return {
700
- kind: 'dispatch',
701
- command,
702
- status: 'Opening skill bundle creation.',
703
- actionResult: {
704
- kind: 'dispatched',
705
- title: 'Opening skill bundle creation',
706
- detail: 'The workspace handed a concrete local skill bundle command to the shell-owned command router.',
707
- command,
708
- safety: 'safe',
709
- },
710
- };
711
- }