@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.
- package/CHANGELOG.md +41 -650
- package/README.md +40 -50
- package/dist/package/main.js +38224 -35673
- package/docs/README.md +5 -4
- package/docs/{connected-services.md → connected-host.md} +18 -10
- package/docs/getting-started.md +43 -42
- package/docs/release-and-publishing.md +6 -4
- package/package.json +3 -3
- package/src/agent/behavior-discovery-summary.ts +165 -0
- package/src/agent/persona-discovery.ts +1 -3
- package/src/agent/persona-registry.ts +5 -3
- package/src/agent/reminder-schedule-format.ts +6 -6
- package/src/agent/reminder-schedule.ts +1 -1
- package/src/agent/routine-registry.ts +43 -4
- package/src/agent/routine-schedule-format.ts +6 -6
- package/src/agent/routine-schedule-promotion.ts +1 -1
- package/src/agent/routine-schedule-receipts.ts +1 -1
- package/src/agent/runtime-profile-starters.ts +331 -0
- package/src/agent/runtime-profile.ts +228 -330
- package/src/agent/skill-registry.ts +190 -13
- package/src/cli/agent-knowledge-command.ts +2 -2
- package/src/cli/agent-knowledge-format.ts +2 -2
- package/src/cli/agent-knowledge-runtime.ts +1 -1
- package/src/cli/bundle-command.ts +1 -1
- package/src/cli/entrypoint.ts +16 -7
- package/src/cli/help.ts +26 -19
- package/src/cli/local-library-command.ts +75 -21
- package/src/cli/management-commands.ts +7 -6
- package/src/cli/management.ts +6 -51
- package/src/cli/parser.ts +23 -2
- package/src/cli/profiles-command.ts +247 -1
- package/src/cli/routines-command.ts +139 -11
- package/src/cli/service-posture.ts +11 -11
- package/src/cli/status.ts +21 -25
- package/src/input/agent-workspace-access-command-editor-submission.ts +149 -0
- package/src/input/agent-workspace-access-command-editors.ts +170 -0
- package/src/input/agent-workspace-activation.ts +2 -1
- package/src/input/agent-workspace-basic-command-editor-submission.ts +787 -0
- package/src/input/agent-workspace-basic-command-editors.ts +524 -459
- package/src/input/agent-workspace-categories.ts +177 -14
- package/src/input/agent-workspace-channel-command-editor-submission.ts +49 -0
- package/src/input/agent-workspace-channel-command-editors.ts +47 -0
- package/src/input/agent-workspace-command-editor.ts +25 -1
- package/src/input/agent-workspace-delegation-editor-submission.ts +55 -0
- package/src/input/agent-workspace-editors.ts +27 -0
- package/src/input/agent-workspace-knowledge-command-editor-submission.ts +132 -0
- package/src/input/agent-workspace-knowledge-command-editors.ts +110 -0
- package/src/input/agent-workspace-learned-behavior.ts +67 -0
- package/src/input/agent-workspace-library-command-editor-submission.ts +50 -0
- package/src/input/agent-workspace-library-command-editors.ts +35 -0
- package/src/input/agent-workspace-mcp-command-editor-submission.ts +95 -0
- package/src/input/agent-workspace-memory-command-editor-submission.ts +232 -0
- package/src/input/agent-workspace-memory-command-editors.ts +180 -0
- package/src/input/agent-workspace-navigation.ts +45 -0
- package/src/input/agent-workspace-notify-editor-submission.ts +107 -0
- package/src/input/agent-workspace-operations-command-editor-submission.ts +146 -0
- package/src/input/agent-workspace-operations-command-editors.ts +119 -0
- package/src/input/agent-workspace-provider-command-editor-submission.ts +155 -0
- package/src/input/agent-workspace-provider-command-editors.ts +93 -0
- package/src/input/agent-workspace-requirements.ts +11 -0
- package/src/input/agent-workspace-secret-editor-submission.ts +153 -0
- package/src/input/agent-workspace-session-command-editor-submission.ts +199 -0
- package/src/input/agent-workspace-session-command-editors.ts +249 -0
- package/src/input/agent-workspace-setup.ts +49 -19
- package/src/input/agent-workspace-skill-bundle-command-editor-submission.ts +101 -0
- package/src/input/agent-workspace-skill-bundle-command-editors.ts +110 -0
- package/src/input/agent-workspace-snapshot.ts +56 -8
- package/src/input/agent-workspace-task-command-editor-submission.ts +61 -0
- package/src/input/agent-workspace-task-command-editors.ts +47 -0
- package/src/input/agent-workspace-types.ts +124 -0
- package/src/input/agent-workspace-voice-media.ts +1 -1
- package/src/input/agent-workspace-workplan-editor-submission.ts +153 -0
- package/src/input/agent-workspace.ts +47 -37
- package/src/input/command-registry.ts +1 -1
- package/src/input/commands/agent-runtime-profile-runtime.ts +160 -6
- package/src/input/commands/agent-skills-runtime.ts +76 -12
- package/src/input/commands/agent-workspace-runtime.ts +4 -3
- package/src/input/commands/brief-runtime.ts +38 -9
- package/src/input/commands/channels-runtime.ts +3 -3
- package/src/input/commands/compat-runtime.ts +32 -0
- package/src/input/commands/health-runtime.ts +22 -24
- package/src/input/commands/knowledge.ts +26 -5
- package/src/input/commands/local-provider-runtime.ts +7 -3
- package/src/input/commands/local-setup-review.ts +4 -14
- package/src/input/commands/mcp-runtime.ts +8 -12
- package/src/input/commands/operator-runtime.ts +8 -67
- package/src/input/commands/personas-runtime.ts +1 -1
- package/src/input/commands/platform-access-runtime.ts +7 -70
- package/src/input/commands/policy-dispatch.ts +1 -1
- package/src/input/commands/policy.ts +1 -5
- package/src/input/commands/product-runtime.ts +2 -2
- package/src/input/commands/qrcode-runtime.ts +6 -4
- package/src/input/commands/routines-runtime.ts +44 -6
- package/src/input/commands/runtime-services.ts +1 -14
- package/src/input/commands/security-runtime.ts +3 -8
- package/src/input/commands/session-content.ts +1 -1
- package/src/input/commands/session-workflow.ts +5 -14
- package/src/input/commands/shell-core.ts +8 -2
- package/src/input/commands/subscription-runtime.ts +1 -6
- package/src/input/commands/support-bundle-runtime.ts +53 -0
- package/src/input/commands/tasks-runtime.ts +2 -2
- package/src/input/commands.ts +4 -0
- package/src/input/feed-context-factory.ts +0 -1
- package/src/input/handler-content-actions.ts +0 -25
- package/src/input/handler-feed.ts +0 -2
- package/src/input/handler-interactions.ts +2 -31
- package/src/input/handler-onboarding.ts +29 -12
- package/src/input/handler-shortcuts.ts +1 -3
- package/src/input/handler.ts +4 -7
- package/src/input/keybindings.ts +9 -9
- package/src/input/mcp-workspace.ts +90 -26
- package/src/input/onboarding/handler-onboarding-routes.ts +3 -1
- package/src/input/onboarding/onboarding-wizard-apply.ts +49 -0
- package/src/input/onboarding/onboarding-wizard-helpers.ts +1 -1
- package/src/input/onboarding/onboarding-wizard-operator-steps.ts +126 -11
- package/src/input/onboarding/onboarding-wizard-steps.ts +15 -8
- package/src/input/onboarding/onboarding-wizard-types.ts +1 -0
- package/src/input/onboarding/onboarding-wizard.ts +19 -2
- package/src/input/profile-picker-modal.ts +2 -2
- package/src/input/settings-modal-agent-policy.ts +6 -6
- package/src/input/settings-modal-subscriptions.ts +3 -3
- package/src/input/settings-modal.ts +14 -14
- package/src/main.ts +0 -2
- package/src/panels/automation-control-panel.ts +3 -3
- package/src/panels/builtin/agent.ts +1 -1
- package/src/panels/builtin/operations.ts +2 -2
- package/src/panels/builtin/session.ts +26 -18
- package/src/panels/builtin/shared.ts +6 -6
- package/src/panels/project-planning-panel.ts +1 -1
- package/src/panels/provider-health-domains.ts +3 -3
- package/src/panels/qr-panel.ts +44 -20
- package/src/panels/subscription-panel.ts +3 -3
- package/src/panels/system-messages-panel.ts +2 -2
- package/src/panels/tasks-panel.ts +4 -4
- package/src/planning/project-planning-coordinator.ts +2 -2
- package/src/renderer/agent-workspace.ts +52 -5
- package/src/renderer/block-actions.ts +1 -3
- package/src/renderer/help-overlay.ts +13 -8
- package/src/renderer/mcp-workspace.ts +32 -13
- package/src/renderer/model-picker-overlay.ts +0 -1
- package/src/renderer/model-workspace.ts +0 -2
- package/src/renderer/onboarding/onboarding-wizard.ts +20 -4
- package/src/renderer/panel-picker-overlay.ts +1 -1
- package/src/renderer/profile-picker-modal.ts +2 -2
- package/src/renderer/settings-modal-helpers.ts +23 -23
- package/src/renderer/settings-modal.ts +18 -18
- package/src/renderer/system-message.ts +1 -1
- package/src/runtime/agent-runtime-events.ts +129 -0
- package/src/runtime/bootstrap-command-parts.ts +3 -2
- package/src/runtime/bootstrap-core.ts +4 -64
- package/src/runtime/bootstrap-shell.ts +42 -4
- package/src/runtime/bootstrap.ts +8 -27
- package/src/runtime/connected-host-auth.ts +42 -0
- package/src/runtime/diagnostics/panels/panel-resources.ts +1 -1
- package/src/runtime/index.ts +1 -5
- package/src/runtime/onboarding/apply.ts +213 -0
- package/src/runtime/onboarding/derivation.ts +25 -6
- package/src/runtime/onboarding/snapshot.ts +4 -2
- package/src/runtime/onboarding/types.ts +28 -1
- package/src/runtime/onboarding/verify.ts +81 -2
- package/src/runtime/operator-token-cleanup.ts +2 -2
- package/src/runtime/services.ts +27 -12
- package/src/shell/service-settings-sync.ts +7 -7
- package/src/shell/ui-openers.ts +27 -38
- package/src/tools/agent-local-registry-tool.ts +10 -4
- package/src/tools/agent-tool-policy-guard.ts +5 -7
- package/src/version.ts +1 -1
- package/src/cli/package-verification.ts +0 -274
|
@@ -0,0 +1,787 @@
|
|
|
1
|
+
import type { AgentWorkspaceActionResult, AgentWorkspaceLocalEditor } from './agent-workspace-types.ts';
|
|
2
|
+
import { buildAgentWorkspaceAccessCommandEditorSubmission, isAgentWorkspaceAccessCommandSubmissionKind } from './agent-workspace-access-command-editor-submission.ts';
|
|
3
|
+
import { buildAgentWorkspaceChannelCommandEditorSubmission, isAgentWorkspaceChannelCommandSubmissionKind } from './agent-workspace-channel-command-editor-submission.ts';
|
|
4
|
+
import { buildAgentWorkspaceDelegationEditorSubmission, isAgentWorkspaceDelegationEditorKind } from './agent-workspace-delegation-editor-submission.ts';
|
|
5
|
+
import { buildAgentWorkspaceKnowledgeCommandEditorSubmission, isAgentWorkspaceKnowledgeCommandSubmissionKind } from './agent-workspace-knowledge-command-editor-submission.ts';
|
|
6
|
+
import { buildAgentWorkspaceLibraryCommandEditorSubmission, isAgentWorkspaceLibraryCommandSubmissionKind } from './agent-workspace-library-command-editor-submission.ts';
|
|
7
|
+
import { buildAgentWorkspaceMemoryCommandEditorSubmission, isAgentWorkspaceMemoryCommandSubmissionKind } from './agent-workspace-memory-command-editor-submission.ts';
|
|
8
|
+
import { buildAgentWorkspaceMcpCommandEditorSubmission, isAgentWorkspaceMcpCommandSubmissionKind } from './agent-workspace-mcp-command-editor-submission.ts';
|
|
9
|
+
import { buildAgentWorkspaceNotifyEditorSubmission, isAgentWorkspaceNotifyEditorKind } from './agent-workspace-notify-editor-submission.ts';
|
|
10
|
+
import { buildAgentWorkspaceOperationsCommandEditorSubmission, isAgentWorkspaceOperationsCommandSubmissionKind } from './agent-workspace-operations-command-editor-submission.ts';
|
|
11
|
+
import { buildAgentWorkspaceProviderCommandEditorSubmission, isAgentWorkspaceProviderCommandSubmissionKind } from './agent-workspace-provider-command-editor-submission.ts';
|
|
12
|
+
import { buildAgentWorkspaceSecretEditorSubmission, isAgentWorkspaceSecretEditorKind } from './agent-workspace-secret-editor-submission.ts';
|
|
13
|
+
import { buildAgentWorkspaceSessionCommandEditorSubmission, isAgentWorkspaceSessionCommandSubmissionKind } from './agent-workspace-session-command-editor-submission.ts';
|
|
14
|
+
import { buildAgentWorkspaceSkillBundleCommandEditorSubmission, isAgentWorkspaceSkillBundleCommandSubmissionKind } from './agent-workspace-skill-bundle-command-editor-submission.ts';
|
|
15
|
+
import { buildAgentWorkspaceTaskCommandEditorSubmission, isAgentWorkspaceTaskCommandSubmissionKind } from './agent-workspace-task-command-editor-submission.ts';
|
|
16
|
+
import { buildAgentWorkspaceWorkPlanEditorSubmission, isAgentWorkspaceWorkPlanEditorKind } from './agent-workspace-workplan-editor-submission.ts';
|
|
17
|
+
import { quoteSlashCommandArg } from './slash-command-parser.ts';
|
|
18
|
+
|
|
19
|
+
type AgentWorkspaceFieldReader = (fieldId: string) => string;
|
|
20
|
+
|
|
21
|
+
export type AgentWorkspaceBasicCommandEditorSubmission =
|
|
22
|
+
| {
|
|
23
|
+
readonly kind: 'editor';
|
|
24
|
+
readonly editor: AgentWorkspaceLocalEditor;
|
|
25
|
+
readonly status: string;
|
|
26
|
+
readonly actionResult?: AgentWorkspaceActionResult;
|
|
27
|
+
}
|
|
28
|
+
| {
|
|
29
|
+
readonly kind: 'dispatch';
|
|
30
|
+
readonly command: string;
|
|
31
|
+
readonly status: string;
|
|
32
|
+
readonly actionResult: AgentWorkspaceActionResult;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
function isAffirmative(value: string): boolean {
|
|
36
|
+
return /^(y|yes|true)$/i.test(value.trim());
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function buildAgentWorkspaceBasicCommandEditorSubmission(
|
|
40
|
+
editor: AgentWorkspaceLocalEditor,
|
|
41
|
+
readField: AgentWorkspaceFieldReader,
|
|
42
|
+
commandDispatchAvailable: boolean,
|
|
43
|
+
): AgentWorkspaceBasicCommandEditorSubmission {
|
|
44
|
+
if (!commandDispatchAvailable) {
|
|
45
|
+
return {
|
|
46
|
+
kind: 'editor',
|
|
47
|
+
editor: { ...editor, message: 'Command dispatch is unavailable; this action cannot run from this workspace.' },
|
|
48
|
+
status: 'Command dispatch unavailable.',
|
|
49
|
+
actionResult: {
|
|
50
|
+
kind: 'error',
|
|
51
|
+
title: 'Command dispatch unavailable',
|
|
52
|
+
detail: 'The Agent workspace cannot hand this action to the shell-owned command router.',
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (editor.kind === 'knowledge-bookmarks') {
|
|
57
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
58
|
+
return {
|
|
59
|
+
kind: 'editor',
|
|
60
|
+
editor: { ...editor, message: 'Bookmark import not confirmed. Type yes, then press Enter.' },
|
|
61
|
+
status: 'Agent Knowledge bookmark import not confirmed.',
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const command = `/knowledge import-bookmarks ${quoteSlashCommandArg(readField('path'))} --yes`;
|
|
65
|
+
return {
|
|
66
|
+
kind: 'dispatch',
|
|
67
|
+
command,
|
|
68
|
+
status: 'Opening Agent Knowledge bookmark import.',
|
|
69
|
+
actionResult: {
|
|
70
|
+
kind: 'dispatched',
|
|
71
|
+
title: 'Opening Agent Knowledge bookmark import',
|
|
72
|
+
detail: 'The workspace handed a confirmed bookmark import command to the shell-owned command router.',
|
|
73
|
+
command,
|
|
74
|
+
safety: 'safe',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
if (editor.kind === 'knowledge-file') {
|
|
79
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
80
|
+
return {
|
|
81
|
+
kind: 'editor',
|
|
82
|
+
editor: { ...editor, message: 'File ingest not confirmed. Type yes, then press Enter.' },
|
|
83
|
+
status: 'Agent Knowledge file ingest not confirmed.',
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
const parts = ['/knowledge', 'ingest-file', quoteSlashCommandArg(readField('path'))];
|
|
87
|
+
const title = readField('title');
|
|
88
|
+
const tags = readField('tags');
|
|
89
|
+
const folder = readField('folder');
|
|
90
|
+
if (title.length > 0) parts.push('--title', quoteSlashCommandArg(title));
|
|
91
|
+
if (tags.length > 0) parts.push('--tags', quoteSlashCommandArg(tags));
|
|
92
|
+
if (folder.length > 0) parts.push('--folder', quoteSlashCommandArg(folder));
|
|
93
|
+
parts.push('--yes');
|
|
94
|
+
const command = parts.join(' ');
|
|
95
|
+
return {
|
|
96
|
+
kind: 'dispatch',
|
|
97
|
+
command,
|
|
98
|
+
status: 'Opening Agent Knowledge file ingest.',
|
|
99
|
+
actionResult: {
|
|
100
|
+
kind: 'dispatched',
|
|
101
|
+
title: 'Opening Agent Knowledge file ingest',
|
|
102
|
+
detail: 'The workspace handed a confirmed file ingest command to the shell-owned command router.',
|
|
103
|
+
command,
|
|
104
|
+
safety: 'safe',
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
if (editor.kind === 'knowledge-urls') {
|
|
109
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
110
|
+
return {
|
|
111
|
+
kind: 'editor',
|
|
112
|
+
editor: { ...editor, message: 'URL list import not confirmed. Type yes, then press Enter.' },
|
|
113
|
+
status: 'Agent Knowledge URL list import not confirmed.',
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
const parts = ['/knowledge', 'import-urls', quoteSlashCommandArg(readField('path'))];
|
|
117
|
+
if (isAffirmative(readField('allowPrivateHosts'))) parts.push('--allow-private-hosts');
|
|
118
|
+
parts.push('--yes');
|
|
119
|
+
const command = parts.join(' ');
|
|
120
|
+
return {
|
|
121
|
+
kind: 'dispatch',
|
|
122
|
+
command,
|
|
123
|
+
status: 'Opening Agent Knowledge URL list import.',
|
|
124
|
+
actionResult: {
|
|
125
|
+
kind: 'dispatched',
|
|
126
|
+
title: 'Opening Agent Knowledge URL list import',
|
|
127
|
+
detail: 'The workspace handed a confirmed URL list import command to the shell-owned command router.',
|
|
128
|
+
command,
|
|
129
|
+
safety: 'safe',
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
if (editor.kind === 'knowledge-browser-history') {
|
|
134
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
135
|
+
return {
|
|
136
|
+
kind: 'editor',
|
|
137
|
+
editor: { ...editor, message: 'Browser history import not confirmed. Type yes, then press Enter.' },
|
|
138
|
+
status: 'Agent Knowledge browser history import not confirmed.',
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
const parts = ['/knowledge', 'import-browser-history'];
|
|
142
|
+
const browsers = readField('browsers');
|
|
143
|
+
const sources = readField('sources');
|
|
144
|
+
const limit = readField('limit');
|
|
145
|
+
const sinceDays = readField('sinceDays');
|
|
146
|
+
if (browsers.length > 0) parts.push('--browsers', quoteSlashCommandArg(browsers));
|
|
147
|
+
if (sources.length > 0) parts.push('--sources', quoteSlashCommandArg(sources));
|
|
148
|
+
if (limit.length > 0) parts.push('--limit', quoteSlashCommandArg(limit));
|
|
149
|
+
if (sinceDays.length > 0) parts.push('--since-days', quoteSlashCommandArg(sinceDays));
|
|
150
|
+
parts.push('--yes');
|
|
151
|
+
const command = parts.join(' ');
|
|
152
|
+
return {
|
|
153
|
+
kind: 'dispatch',
|
|
154
|
+
command,
|
|
155
|
+
status: 'Opening Agent Knowledge browser history import.',
|
|
156
|
+
actionResult: {
|
|
157
|
+
kind: 'dispatched',
|
|
158
|
+
title: 'Opening Agent Knowledge browser history import',
|
|
159
|
+
detail: 'The workspace handed a confirmed browser-history import command to the shell-owned command router.',
|
|
160
|
+
command,
|
|
161
|
+
safety: 'safe',
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
if (editor.kind === 'knowledge-connector-ingest') {
|
|
166
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
167
|
+
return {
|
|
168
|
+
kind: 'editor',
|
|
169
|
+
editor: { ...editor, message: 'Connector ingest not confirmed. Type yes, then press Enter.' },
|
|
170
|
+
status: 'Agent Knowledge connector ingest not confirmed.',
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
const connectorId = readField('connectorId');
|
|
174
|
+
const input = readField('input');
|
|
175
|
+
const path = readField('path');
|
|
176
|
+
const content = readField('content');
|
|
177
|
+
const parts = ['/knowledge', 'ingest-connector', quoteSlashCommandArg(connectorId)];
|
|
178
|
+
if (input.length > 0) parts.push('--input', quoteSlashCommandArg(input));
|
|
179
|
+
if (path.length > 0) parts.push('--path', quoteSlashCommandArg(path));
|
|
180
|
+
if (content.length > 0) parts.push('--content', quoteSlashCommandArg(content));
|
|
181
|
+
if (isAffirmative(readField('allowPrivateHosts'))) parts.push('--allow-private-hosts');
|
|
182
|
+
parts.push('--yes');
|
|
183
|
+
const command = parts.join(' ');
|
|
184
|
+
return {
|
|
185
|
+
kind: 'dispatch',
|
|
186
|
+
command,
|
|
187
|
+
status: 'Opening Agent Knowledge connector ingest.',
|
|
188
|
+
actionResult: {
|
|
189
|
+
kind: 'dispatched',
|
|
190
|
+
title: 'Opening Agent Knowledge connector ingest',
|
|
191
|
+
detail: 'The workspace handed a confirmed connector ingest command to the shell-owned command router.',
|
|
192
|
+
command,
|
|
193
|
+
safety: 'safe',
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
if (editor.kind === 'knowledge-reindex') {
|
|
198
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
199
|
+
return {
|
|
200
|
+
kind: 'editor',
|
|
201
|
+
editor: { ...editor, message: 'Agent Knowledge reindex not confirmed. Type yes, then press Enter.' },
|
|
202
|
+
status: 'Agent Knowledge reindex not confirmed.',
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
const command = '/knowledge reindex --yes';
|
|
206
|
+
return {
|
|
207
|
+
kind: 'dispatch',
|
|
208
|
+
command,
|
|
209
|
+
status: 'Opening Agent Knowledge reindex.',
|
|
210
|
+
actionResult: {
|
|
211
|
+
kind: 'dispatched',
|
|
212
|
+
title: 'Opening Agent Knowledge reindex',
|
|
213
|
+
detail: 'The workspace handed a confirmed reindex command to the shell-owned command router.',
|
|
214
|
+
command,
|
|
215
|
+
safety: 'safe',
|
|
216
|
+
},
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
if (isAgentWorkspaceAccessCommandSubmissionKind(editor.kind)) {
|
|
220
|
+
return buildAgentWorkspaceAccessCommandEditorSubmission(editor, readField);
|
|
221
|
+
}
|
|
222
|
+
if (isAgentWorkspaceChannelCommandSubmissionKind(editor.kind)) {
|
|
223
|
+
return buildAgentWorkspaceChannelCommandEditorSubmission(editor, readField);
|
|
224
|
+
}
|
|
225
|
+
if (isAgentWorkspaceKnowledgeCommandSubmissionKind(editor.kind)) {
|
|
226
|
+
return buildAgentWorkspaceKnowledgeCommandEditorSubmission(editor, readField);
|
|
227
|
+
}
|
|
228
|
+
if (isAgentWorkspaceLibraryCommandSubmissionKind(editor.kind)) {
|
|
229
|
+
return buildAgentWorkspaceLibraryCommandEditorSubmission(editor, readField);
|
|
230
|
+
}
|
|
231
|
+
if (isAgentWorkspaceMemoryCommandSubmissionKind(editor.kind)) {
|
|
232
|
+
return buildAgentWorkspaceMemoryCommandEditorSubmission(editor, readField);
|
|
233
|
+
}
|
|
234
|
+
if (isAgentWorkspaceProviderCommandSubmissionKind(editor.kind)) {
|
|
235
|
+
return buildAgentWorkspaceProviderCommandEditorSubmission(editor, readField);
|
|
236
|
+
}
|
|
237
|
+
if (isAgentWorkspaceSessionCommandSubmissionKind(editor.kind)) {
|
|
238
|
+
return buildAgentWorkspaceSessionCommandEditorSubmission(editor, readField);
|
|
239
|
+
}
|
|
240
|
+
if (isAgentWorkspaceSkillBundleCommandSubmissionKind(editor.kind)) {
|
|
241
|
+
return buildAgentWorkspaceSkillBundleCommandEditorSubmission(editor, readField);
|
|
242
|
+
}
|
|
243
|
+
if (isAgentWorkspaceTaskCommandSubmissionKind(editor.kind)) {
|
|
244
|
+
return buildAgentWorkspaceTaskCommandEditorSubmission(editor, readField);
|
|
245
|
+
}
|
|
246
|
+
if (isAgentWorkspaceMcpCommandSubmissionKind(editor.kind)) {
|
|
247
|
+
return buildAgentWorkspaceMcpCommandEditorSubmission(editor, readField);
|
|
248
|
+
}
|
|
249
|
+
if (isAgentWorkspaceOperationsCommandSubmissionKind(editor.kind)) {
|
|
250
|
+
return buildAgentWorkspaceOperationsCommandEditorSubmission(editor, readField);
|
|
251
|
+
}
|
|
252
|
+
if (isAgentWorkspaceNotifyEditorKind(editor.kind)) return buildAgentWorkspaceNotifyEditorSubmission(editor, readField);
|
|
253
|
+
if (isAgentWorkspaceSecretEditorKind(editor.kind)) {
|
|
254
|
+
return buildAgentWorkspaceSecretEditorSubmission(editor, readField);
|
|
255
|
+
}
|
|
256
|
+
if (editor.kind === 'tts-prompt') {
|
|
257
|
+
const command = `/tts ${quoteSlashCommandArg(readField('prompt'))}`;
|
|
258
|
+
return {
|
|
259
|
+
kind: 'dispatch',
|
|
260
|
+
command,
|
|
261
|
+
status: 'Opening spoken assistant prompt.',
|
|
262
|
+
actionResult: {
|
|
263
|
+
kind: 'dispatched',
|
|
264
|
+
title: 'Opening spoken assistant prompt',
|
|
265
|
+
detail: 'The workspace handed a spoken prompt to the shell-owned command router.',
|
|
266
|
+
command,
|
|
267
|
+
safety: 'safe',
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
if (editor.kind === 'image-input') {
|
|
272
|
+
const prompt = readField('prompt');
|
|
273
|
+
const command = prompt.length > 0
|
|
274
|
+
? `/image ${quoteSlashCommandArg(readField('path'))} ${quoteSlashCommandArg(prompt)}`
|
|
275
|
+
: `/image ${quoteSlashCommandArg(readField('path'))}`;
|
|
276
|
+
return {
|
|
277
|
+
kind: 'dispatch',
|
|
278
|
+
command,
|
|
279
|
+
status: 'Opening image input.',
|
|
280
|
+
actionResult: {
|
|
281
|
+
kind: 'dispatched',
|
|
282
|
+
title: 'Opening image input',
|
|
283
|
+
detail: 'The workspace handed an image attachment command to the shell-owned command router.',
|
|
284
|
+
command,
|
|
285
|
+
safety: 'safe',
|
|
286
|
+
},
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
if (editor.kind === 'model-pin' || editor.kind === 'model-unpin') {
|
|
290
|
+
const pinning = editor.kind === 'model-pin';
|
|
291
|
+
const command = `/${pinning ? 'pin' : 'unpin'} ${quoteSlashCommandArg(readField('model'))}`;
|
|
292
|
+
return {
|
|
293
|
+
kind: 'dispatch',
|
|
294
|
+
command,
|
|
295
|
+
status: pinning ? 'Opening model pin action.' : 'Opening model unpin action.',
|
|
296
|
+
actionResult: {
|
|
297
|
+
kind: 'dispatched',
|
|
298
|
+
title: pinning ? 'Opening model pin action' : 'Opening model unpin action',
|
|
299
|
+
detail: 'The workspace handed model favorites maintenance to the shell-owned command router.',
|
|
300
|
+
command,
|
|
301
|
+
safety: 'safe',
|
|
302
|
+
},
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
if (editor.kind === 'profile-template-export') {
|
|
306
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
307
|
+
return {
|
|
308
|
+
kind: 'editor',
|
|
309
|
+
editor: { ...editor, message: 'Starter template export not confirmed. Type yes, then press Enter.' },
|
|
310
|
+
status: 'Agent starter template export not confirmed.',
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
const command = `/agent-profile template export ${quoteSlashCommandArg(readField('templateId'))} ${quoteSlashCommandArg(readField('path'))} --yes`;
|
|
314
|
+
return {
|
|
315
|
+
kind: 'dispatch',
|
|
316
|
+
command,
|
|
317
|
+
status: 'Opening Agent starter template export.',
|
|
318
|
+
actionResult: {
|
|
319
|
+
kind: 'dispatched',
|
|
320
|
+
title: 'Opening Agent starter template export',
|
|
321
|
+
detail: 'The workspace handed a confirmed starter template export command to the shell-owned command router.',
|
|
322
|
+
command,
|
|
323
|
+
safety: 'safe',
|
|
324
|
+
},
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
if (editor.kind === 'profile-template-import') {
|
|
328
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
329
|
+
return {
|
|
330
|
+
kind: 'editor',
|
|
331
|
+
editor: { ...editor, message: 'Starter template import not confirmed. Type yes, then press Enter.' },
|
|
332
|
+
status: 'Agent starter template import not confirmed.',
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
const command = `/agent-profile template import ${quoteSlashCommandArg(readField('path'))} --yes`;
|
|
336
|
+
return {
|
|
337
|
+
kind: 'dispatch',
|
|
338
|
+
command,
|
|
339
|
+
status: 'Opening Agent starter template import.',
|
|
340
|
+
actionResult: {
|
|
341
|
+
kind: 'dispatched',
|
|
342
|
+
title: 'Opening Agent starter template import',
|
|
343
|
+
detail: 'The workspace handed a confirmed starter template import command to the shell-owned command router.',
|
|
344
|
+
command,
|
|
345
|
+
safety: 'safe',
|
|
346
|
+
},
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
if (editor.kind === 'profile-template-show') {
|
|
350
|
+
const command = `/agent-profile template show ${quoteSlashCommandArg(readField('id'))}`;
|
|
351
|
+
return {
|
|
352
|
+
kind: 'dispatch',
|
|
353
|
+
command,
|
|
354
|
+
status: 'Opening Agent starter template preview.',
|
|
355
|
+
actionResult: {
|
|
356
|
+
kind: 'dispatched',
|
|
357
|
+
title: 'Opening Agent starter template preview',
|
|
358
|
+
detail: 'The workspace handed a read-only starter template preview command to the shell-owned command router.',
|
|
359
|
+
command,
|
|
360
|
+
safety: 'read-only',
|
|
361
|
+
},
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
if (editor.kind === 'profile-show') {
|
|
365
|
+
const command = `/agent-profile show ${quoteSlashCommandArg(readField('profile'))}`;
|
|
366
|
+
return {
|
|
367
|
+
kind: 'dispatch',
|
|
368
|
+
command,
|
|
369
|
+
status: 'Opening Agent profile detail.',
|
|
370
|
+
actionResult: {
|
|
371
|
+
kind: 'dispatched',
|
|
372
|
+
title: 'Opening Agent profile detail',
|
|
373
|
+
detail: 'The workspace handed a read-only Agent profile inspection command to the shell-owned command router.',
|
|
374
|
+
command,
|
|
375
|
+
safety: 'read-only',
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
if (editor.kind === 'profile-template-from-discovered') {
|
|
380
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
381
|
+
return {
|
|
382
|
+
kind: 'editor',
|
|
383
|
+
editor: { ...editor, message: 'Starter-from-discovered creation not confirmed. Type yes, then press Enter.' },
|
|
384
|
+
status: 'Agent starter-from-discovered creation not confirmed.',
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
const parts = [
|
|
388
|
+
'/agent-profile',
|
|
389
|
+
'template',
|
|
390
|
+
'from-discovered',
|
|
391
|
+
quoteSlashCommandArg(readField('id')),
|
|
392
|
+
];
|
|
393
|
+
const name = readField('name');
|
|
394
|
+
const description = readField('description');
|
|
395
|
+
const persona = readField('persona');
|
|
396
|
+
const skills = readField('skills');
|
|
397
|
+
const routines = readField('routines');
|
|
398
|
+
if (name.length > 0) parts.push('--name', quoteSlashCommandArg(name));
|
|
399
|
+
if (description.length > 0) parts.push('--description', quoteSlashCommandArg(description));
|
|
400
|
+
if (persona.length > 0) parts.push('--persona', quoteSlashCommandArg(persona));
|
|
401
|
+
if (skills.length > 0) parts.push('--skills', quoteSlashCommandArg(skills));
|
|
402
|
+
if (routines.length > 0) parts.push('--routines', quoteSlashCommandArg(routines));
|
|
403
|
+
if (isAffirmative(readField('replace'))) parts.push('--replace');
|
|
404
|
+
parts.push('--yes');
|
|
405
|
+
const command = parts.join(' ');
|
|
406
|
+
return {
|
|
407
|
+
kind: 'dispatch',
|
|
408
|
+
command,
|
|
409
|
+
status: 'Opening Agent starter-from-discovered creation.',
|
|
410
|
+
actionResult: {
|
|
411
|
+
kind: 'dispatched',
|
|
412
|
+
title: 'Opening Agent starter-from-discovered creation',
|
|
413
|
+
detail: 'The workspace handed a confirmed starter creation command to the shell-owned command router.',
|
|
414
|
+
command,
|
|
415
|
+
safety: 'safe',
|
|
416
|
+
},
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
if (editor.kind === 'profile-from-discovered') {
|
|
420
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
421
|
+
return {
|
|
422
|
+
kind: 'editor',
|
|
423
|
+
editor: { ...editor, message: 'Profile-from-discovered creation not confirmed. Type yes, then press Enter.' },
|
|
424
|
+
status: 'Agent profile-from-discovered creation not confirmed.',
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
const parts = [
|
|
428
|
+
'/agent-profile',
|
|
429
|
+
'create-from-discovered',
|
|
430
|
+
quoteSlashCommandArg(readField('profile')),
|
|
431
|
+
];
|
|
432
|
+
const templateId = readField('templateId');
|
|
433
|
+
const name = readField('name');
|
|
434
|
+
const description = readField('description');
|
|
435
|
+
const persona = readField('persona');
|
|
436
|
+
const skills = readField('skills');
|
|
437
|
+
const routines = readField('routines');
|
|
438
|
+
if (templateId.length > 0) parts.push('--template-id', quoteSlashCommandArg(templateId));
|
|
439
|
+
if (name.length > 0) parts.push('--name', quoteSlashCommandArg(name));
|
|
440
|
+
if (description.length > 0) parts.push('--description', quoteSlashCommandArg(description));
|
|
441
|
+
if (persona.length > 0) parts.push('--persona', quoteSlashCommandArg(persona));
|
|
442
|
+
if (skills.length > 0) parts.push('--skills', quoteSlashCommandArg(skills));
|
|
443
|
+
if (routines.length > 0) parts.push('--routines', quoteSlashCommandArg(routines));
|
|
444
|
+
if (isAffirmative(readField('replace'))) parts.push('--replace');
|
|
445
|
+
parts.push('--yes');
|
|
446
|
+
const command = parts.join(' ');
|
|
447
|
+
return {
|
|
448
|
+
kind: 'dispatch',
|
|
449
|
+
command,
|
|
450
|
+
status: 'Opening Agent profile-from-discovered creation.',
|
|
451
|
+
actionResult: {
|
|
452
|
+
kind: 'dispatched',
|
|
453
|
+
title: 'Opening Agent profile-from-discovered creation',
|
|
454
|
+
detail: 'The workspace handed a confirmed discovered-behavior profile creation command to the shell-owned command router.',
|
|
455
|
+
command,
|
|
456
|
+
safety: 'safe',
|
|
457
|
+
},
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
if (editor.kind === 'profile-default') {
|
|
461
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
462
|
+
return {
|
|
463
|
+
kind: 'editor',
|
|
464
|
+
editor: { ...editor, message: 'Default Agent profile selection not confirmed. Type yes, then press Enter.' },
|
|
465
|
+
status: 'Default Agent profile selection not confirmed.',
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
const command = `/agent-profile use ${quoteSlashCommandArg(readField('profile'))} --yes`;
|
|
469
|
+
return {
|
|
470
|
+
kind: 'dispatch',
|
|
471
|
+
command,
|
|
472
|
+
status: 'Opening default Agent profile selection.',
|
|
473
|
+
actionResult: {
|
|
474
|
+
kind: 'dispatched',
|
|
475
|
+
title: 'Opening default Agent profile selection',
|
|
476
|
+
detail: 'The workspace handed a confirmed default profile selection command to the shell-owned command router.',
|
|
477
|
+
command,
|
|
478
|
+
safety: 'safe',
|
|
479
|
+
},
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
if (editor.kind === 'profile-default-clear') {
|
|
483
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
484
|
+
return {
|
|
485
|
+
kind: 'editor',
|
|
486
|
+
editor: { ...editor, message: 'Default Agent profile clear not confirmed. Type yes, then press Enter.' },
|
|
487
|
+
status: 'Default Agent profile clear not confirmed.',
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
const command = '/agent-profile default clear --yes';
|
|
491
|
+
return {
|
|
492
|
+
kind: 'dispatch',
|
|
493
|
+
command,
|
|
494
|
+
status: 'Opening default Agent profile clear.',
|
|
495
|
+
actionResult: {
|
|
496
|
+
kind: 'dispatched',
|
|
497
|
+
title: 'Opening default Agent profile clear',
|
|
498
|
+
detail: 'The workspace handed a confirmed default profile clear command to the shell-owned command router.',
|
|
499
|
+
command,
|
|
500
|
+
safety: 'safe',
|
|
501
|
+
},
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
if (editor.kind === 'profile-delete') {
|
|
505
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
506
|
+
return {
|
|
507
|
+
kind: 'editor',
|
|
508
|
+
editor: { ...editor, message: 'Agent profile delete not confirmed. Type yes, then press Enter.' },
|
|
509
|
+
status: 'Agent profile delete not confirmed.',
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
const command = `/agent-profile delete ${quoteSlashCommandArg(readField('profile'))} --yes`;
|
|
513
|
+
return {
|
|
514
|
+
kind: 'dispatch',
|
|
515
|
+
command,
|
|
516
|
+
status: 'Opening Agent profile deletion.',
|
|
517
|
+
actionResult: {
|
|
518
|
+
kind: 'dispatched',
|
|
519
|
+
title: 'Opening Agent profile deletion',
|
|
520
|
+
detail: 'The workspace handed a confirmed profile deletion command to the shell-owned command router.',
|
|
521
|
+
command,
|
|
522
|
+
safety: 'safe',
|
|
523
|
+
},
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
if (editor.kind === 'support-bundle-export') {
|
|
527
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
528
|
+
return {
|
|
529
|
+
kind: 'editor',
|
|
530
|
+
editor: { ...editor, message: 'Agent support bundle export not confirmed. Type yes, then press Enter.' },
|
|
531
|
+
status: 'Agent support bundle export not confirmed.',
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
const command = `/bundle export ${quoteSlashCommandArg(readField('path'))} --yes`;
|
|
535
|
+
return {
|
|
536
|
+
kind: 'dispatch',
|
|
537
|
+
command,
|
|
538
|
+
status: 'Opening Agent support bundle export.',
|
|
539
|
+
actionResult: {
|
|
540
|
+
kind: 'dispatched',
|
|
541
|
+
title: 'Opening Agent support bundle export',
|
|
542
|
+
detail: 'The workspace handed a confirmed support bundle export command to the shell-owned command router.',
|
|
543
|
+
command,
|
|
544
|
+
safety: 'safe',
|
|
545
|
+
},
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
if (editor.kind === 'support-bundle-inspect') {
|
|
549
|
+
const command = `/bundle inspect ${quoteSlashCommandArg(readField('path'))}`;
|
|
550
|
+
return {
|
|
551
|
+
kind: 'dispatch',
|
|
552
|
+
command,
|
|
553
|
+
status: 'Opening Agent support bundle inspection.',
|
|
554
|
+
actionResult: {
|
|
555
|
+
kind: 'dispatched',
|
|
556
|
+
title: 'Opening Agent support bundle inspection',
|
|
557
|
+
detail: 'The workspace handed a support bundle inspect command to the shell-owned command router.',
|
|
558
|
+
command,
|
|
559
|
+
safety: 'read-only',
|
|
560
|
+
},
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
if (editor.kind === 'support-bundle-import') {
|
|
564
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
565
|
+
return {
|
|
566
|
+
kind: 'editor',
|
|
567
|
+
editor: { ...editor, message: 'Agent support bundle import not confirmed. Type yes, then press Enter.' },
|
|
568
|
+
status: 'Agent support bundle import not confirmed.',
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
const command = `/bundle import ${quoteSlashCommandArg(readField('path'))} --yes`;
|
|
572
|
+
return {
|
|
573
|
+
kind: 'dispatch',
|
|
574
|
+
command,
|
|
575
|
+
status: 'Opening Agent support bundle import.',
|
|
576
|
+
actionResult: {
|
|
577
|
+
kind: 'dispatched',
|
|
578
|
+
title: 'Opening Agent support bundle import',
|
|
579
|
+
detail: 'The workspace handed a confirmed support bundle import command to the shell-owned command router.',
|
|
580
|
+
command,
|
|
581
|
+
safety: 'safe',
|
|
582
|
+
},
|
|
583
|
+
};
|
|
584
|
+
}
|
|
585
|
+
if (editor.kind === 'subscription-inspect') {
|
|
586
|
+
const command = `/subscription inspect ${quoteSlashCommandArg(readField('provider'))}`;
|
|
587
|
+
return {
|
|
588
|
+
kind: 'dispatch',
|
|
589
|
+
command,
|
|
590
|
+
status: 'Opening provider subscription inspection.',
|
|
591
|
+
actionResult: {
|
|
592
|
+
kind: 'dispatched',
|
|
593
|
+
title: 'Opening provider subscription inspection',
|
|
594
|
+
detail: 'The workspace handed a read-only provider subscription inspection command to the shell-owned command router.',
|
|
595
|
+
command,
|
|
596
|
+
safety: 'read-only',
|
|
597
|
+
},
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
if (editor.kind === 'subscription-login-start') {
|
|
601
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
602
|
+
return {
|
|
603
|
+
kind: 'editor',
|
|
604
|
+
editor: { ...editor, message: 'Provider subscription login start not confirmed. Type yes, then press Enter.' },
|
|
605
|
+
status: 'Provider subscription login start not confirmed.',
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
const parts = [
|
|
609
|
+
'/subscription',
|
|
610
|
+
'login',
|
|
611
|
+
quoteSlashCommandArg(readField('provider')),
|
|
612
|
+
'start',
|
|
613
|
+
];
|
|
614
|
+
if (!isAffirmative(readField('openBrowser'))) parts.push('--no-browser');
|
|
615
|
+
if (isAffirmative(readField('manual'))) parts.push('--manual');
|
|
616
|
+
parts.push('--yes');
|
|
617
|
+
const command = parts.join(' ');
|
|
618
|
+
return {
|
|
619
|
+
kind: 'dispatch',
|
|
620
|
+
command,
|
|
621
|
+
status: 'Opening provider subscription login start.',
|
|
622
|
+
actionResult: {
|
|
623
|
+
kind: 'dispatched',
|
|
624
|
+
title: 'Opening provider subscription login start',
|
|
625
|
+
detail: 'The workspace handed a confirmed subscription-login start command to the shell-owned command router.',
|
|
626
|
+
command,
|
|
627
|
+
safety: 'safe',
|
|
628
|
+
},
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
if (editor.kind === 'subscription-login-finish') {
|
|
632
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
633
|
+
return {
|
|
634
|
+
kind: 'editor',
|
|
635
|
+
editor: { ...editor, message: 'Provider subscription login finish not confirmed. Type yes, then press Enter.' },
|
|
636
|
+
status: 'Provider subscription login finish not confirmed.',
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
const command = `/subscription login ${quoteSlashCommandArg(readField('provider'))} finish ${quoteSlashCommandArg(readField('code'))} --yes`;
|
|
640
|
+
return {
|
|
641
|
+
kind: 'dispatch',
|
|
642
|
+
command,
|
|
643
|
+
status: 'Opening provider subscription login finish.',
|
|
644
|
+
actionResult: {
|
|
645
|
+
kind: 'dispatched',
|
|
646
|
+
title: 'Opening provider subscription login finish',
|
|
647
|
+
detail: 'The workspace handed a confirmed subscription-login finish command to the shell-owned command router.',
|
|
648
|
+
command,
|
|
649
|
+
safety: 'safe',
|
|
650
|
+
},
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
if (editor.kind === 'subscription-logout') {
|
|
654
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
655
|
+
return {
|
|
656
|
+
kind: 'editor',
|
|
657
|
+
editor: { ...editor, message: 'Provider subscription logout not confirmed. Type yes, then press Enter.' },
|
|
658
|
+
status: 'Provider subscription logout not confirmed.',
|
|
659
|
+
};
|
|
660
|
+
}
|
|
661
|
+
const command = `/subscription logout ${quoteSlashCommandArg(readField('provider'))} --yes`;
|
|
662
|
+
return {
|
|
663
|
+
kind: 'dispatch',
|
|
664
|
+
command,
|
|
665
|
+
status: 'Opening provider subscription logout.',
|
|
666
|
+
actionResult: {
|
|
667
|
+
kind: 'dispatched',
|
|
668
|
+
title: 'Opening provider subscription logout',
|
|
669
|
+
detail: 'The workspace handed a confirmed provider subscription logout command to the shell-owned command router.',
|
|
670
|
+
command,
|
|
671
|
+
safety: 'safe',
|
|
672
|
+
},
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
if (isAgentWorkspaceDelegationEditorKind(editor.kind)) return buildAgentWorkspaceDelegationEditorSubmission(editor, readField);
|
|
676
|
+
if (isAgentWorkspaceWorkPlanEditorKind(editor.kind)) return buildAgentWorkspaceWorkPlanEditorSubmission(editor, readField);
|
|
677
|
+
if (editor.kind === 'skill-discovery-import') {
|
|
678
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
679
|
+
return {
|
|
680
|
+
kind: 'editor',
|
|
681
|
+
editor: { ...editor, message: 'Discovered skill import not confirmed. Type yes, then press Enter.' },
|
|
682
|
+
status: 'Agent skill import not confirmed.',
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
const parts = [
|
|
686
|
+
'/agent-skills',
|
|
687
|
+
'import-discovered',
|
|
688
|
+
quoteSlashCommandArg(readField('name')),
|
|
689
|
+
];
|
|
690
|
+
if (isAffirmative(readField('enabled'))) parts.push('--enabled');
|
|
691
|
+
parts.push('--yes');
|
|
692
|
+
const command = parts.join(' ');
|
|
693
|
+
return {
|
|
694
|
+
kind: 'dispatch',
|
|
695
|
+
command,
|
|
696
|
+
status: 'Opening discovered skill import.',
|
|
697
|
+
actionResult: {
|
|
698
|
+
kind: 'dispatched',
|
|
699
|
+
title: 'Opening discovered skill import',
|
|
700
|
+
detail: 'The workspace handed a confirmed local skill import command to the shell-owned command router.',
|
|
701
|
+
command,
|
|
702
|
+
safety: 'safe',
|
|
703
|
+
},
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
if (editor.kind === 'persona-discovery-import') {
|
|
707
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
708
|
+
return {
|
|
709
|
+
kind: 'editor',
|
|
710
|
+
editor: { ...editor, message: 'Discovered persona import not confirmed. Type yes, then press Enter.' },
|
|
711
|
+
status: 'Agent persona import not confirmed.',
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
const parts = [
|
|
715
|
+
'/personas',
|
|
716
|
+
'import-discovered',
|
|
717
|
+
quoteSlashCommandArg(readField('name')),
|
|
718
|
+
];
|
|
719
|
+
if (isAffirmative(readField('use'))) parts.push('--use');
|
|
720
|
+
parts.push('--yes');
|
|
721
|
+
const command = parts.join(' ');
|
|
722
|
+
return {
|
|
723
|
+
kind: 'dispatch',
|
|
724
|
+
command,
|
|
725
|
+
status: 'Opening discovered persona import.',
|
|
726
|
+
actionResult: {
|
|
727
|
+
kind: 'dispatched',
|
|
728
|
+
title: 'Opening discovered persona import',
|
|
729
|
+
detail: 'The workspace handed a confirmed local persona import command to the shell-owned command router.',
|
|
730
|
+
command,
|
|
731
|
+
safety: 'safe',
|
|
732
|
+
},
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
if (editor.kind === 'routine-discovery-import') {
|
|
736
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
737
|
+
return {
|
|
738
|
+
kind: 'editor',
|
|
739
|
+
editor: { ...editor, message: 'Discovered routine import not confirmed. Type yes, then press Enter.' },
|
|
740
|
+
status: 'Agent routine import not confirmed.',
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
const parts = [
|
|
744
|
+
'/routines',
|
|
745
|
+
'import-discovered',
|
|
746
|
+
quoteSlashCommandArg(readField('name')),
|
|
747
|
+
];
|
|
748
|
+
if (isAffirmative(readField('enabled'))) parts.push('--enabled');
|
|
749
|
+
parts.push('--yes');
|
|
750
|
+
const command = parts.join(' ');
|
|
751
|
+
return {
|
|
752
|
+
kind: 'dispatch',
|
|
753
|
+
command,
|
|
754
|
+
status: 'Opening discovered routine import.',
|
|
755
|
+
actionResult: {
|
|
756
|
+
kind: 'dispatched',
|
|
757
|
+
title: 'Opening discovered routine import',
|
|
758
|
+
detail: 'The workspace handed a confirmed local routine import command to the shell-owned command router.',
|
|
759
|
+
command,
|
|
760
|
+
safety: 'safe',
|
|
761
|
+
},
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
const commandParts = [
|
|
765
|
+
'/agent-skills bundle create',
|
|
766
|
+
'--name',
|
|
767
|
+
quoteSlashCommandArg(readField('name')),
|
|
768
|
+
'--description',
|
|
769
|
+
quoteSlashCommandArg(readField('description')),
|
|
770
|
+
'--skills',
|
|
771
|
+
quoteSlashCommandArg(readField('skills')),
|
|
772
|
+
];
|
|
773
|
+
if (isAffirmative(readField('enabled'))) commandParts.push('--enabled');
|
|
774
|
+
const command = commandParts.join(' ');
|
|
775
|
+
return {
|
|
776
|
+
kind: 'dispatch',
|
|
777
|
+
command,
|
|
778
|
+
status: 'Opening skill bundle creation.',
|
|
779
|
+
actionResult: {
|
|
780
|
+
kind: 'dispatched',
|
|
781
|
+
title: 'Opening skill bundle creation',
|
|
782
|
+
detail: 'The workspace handed a concrete local skill bundle command to the shell-owned command router.',
|
|
783
|
+
command,
|
|
784
|
+
safety: 'safe',
|
|
785
|
+
},
|
|
786
|
+
};
|
|
787
|
+
}
|