@pellux/goodvibes-agent 0.1.107 → 0.1.108
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 +38 -13
- package/README.md +27 -11
- package/docs/README.md +5 -5
- package/docs/{runtime-connection.md → connected-services.md} +8 -8
- package/docs/getting-started.md +28 -12
- package/docs/release-and-publishing.md +4 -4
- package/package.json +2 -12
- package/src/agent/reminder-schedule-format.ts +75 -0
- package/src/agent/reminder-schedule.ts +494 -0
- package/src/agent/routine-schedule-format.ts +7 -7
- package/src/agent/routine-schedule-promotion.ts +1 -1
- package/src/agent/routine-schedule-receipts.ts +1 -1
- package/src/agent/skill-discovery.ts +2 -0
- package/src/cli/agent-knowledge-args.ts +93 -0
- package/src/cli/agent-knowledge-command.ts +200 -369
- package/src/cli/agent-knowledge-format.ts +58 -7
- package/src/cli/agent-knowledge-methods.ts +84 -0
- package/src/cli/agent-knowledge-runtime.ts +240 -0
- package/src/cli/completion.ts +0 -2
- package/src/cli/config-overrides.ts +2 -2
- package/src/cli/help.ts +34 -15
- package/src/cli/management-commands.ts +2 -2
- package/src/cli/management.ts +8 -8
- package/src/cli/package-verification.ts +7 -3
- package/src/cli/parser.ts +10 -4
- package/src/cli/service-posture.ts +6 -6
- package/src/cli/status.ts +32 -32
- package/src/input/agent-workspace-activation.ts +24 -13
- package/src/input/agent-workspace-basic-command-editors.ts +448 -0
- package/src/input/agent-workspace-categories.ts +42 -34
- package/src/input/agent-workspace-channels.ts +3 -3
- package/src/input/agent-workspace-command-editor.ts +65 -0
- package/src/input/agent-workspace-editors.ts +17 -2
- package/src/input/agent-workspace-knowledge-query-editor.ts +74 -0
- package/src/input/agent-workspace-knowledge-url-editor.ts +95 -0
- package/src/input/agent-workspace-reminder-schedule-editor.ts +125 -0
- package/src/input/agent-workspace-routine-schedule-editor.ts +127 -0
- package/src/input/agent-workspace-setup.ts +2 -2
- package/src/input/agent-workspace-types.ts +20 -2
- package/src/input/agent-workspace-voice-media.ts +5 -5
- package/src/input/agent-workspace.ts +39 -2
- package/src/input/commands/agent-runtime-profile-runtime.ts +1 -1
- package/src/input/commands/agent-skills-runtime.ts +94 -2
- package/src/input/commands/brief-runtime.ts +126 -0
- package/src/input/commands/channels-runtime.ts +47 -0
- package/src/input/commands/health-runtime.ts +10 -10
- package/src/input/commands/knowledge.ts +176 -1
- package/src/input/commands/planning-runtime.ts +1 -1
- package/src/input/commands/platform-access-runtime.ts +10 -10
- package/src/input/commands/policy-dispatch.ts +1 -1
- package/src/input/commands/schedule-runtime.ts +42 -5
- package/src/input/commands/security-runtime.ts +1 -1
- package/src/input/commands/session-content.ts +1 -1
- package/src/input/commands/session-workflow.ts +1 -1
- package/src/input/commands/shell-core.ts +4 -2
- package/src/input/commands/tasks-runtime.ts +3 -3
- package/src/input/commands.ts +4 -0
- package/src/input/handler-onboarding.ts +4 -4
- package/src/input/handler.ts +3 -2
- package/src/input/onboarding/onboarding-wizard-helpers.ts +1 -1
- package/src/input/onboarding/onboarding-wizard-operator-steps.ts +13 -13
- package/src/input/onboarding/onboarding-wizard-steps.ts +8 -8
- package/src/input/settings-modal-agent-policy.ts +1 -1
- package/src/input/slash-command-parser.ts +60 -0
- package/src/panels/builtin/agent.ts +1 -1
- package/src/panels/builtin/operations.ts +2 -2
- package/src/panels/provider-account-snapshot.ts +1 -1
- package/src/panels/provider-health-domains.ts +6 -6
- package/src/panels/subscription-panel.ts +1 -1
- package/src/panels/tasks-panel.ts +3 -3
- package/src/renderer/agent-workspace.ts +43 -30
- package/src/renderer/help-overlay.ts +1 -1
- package/src/renderer/settings-modal.ts +13 -13
- package/src/runtime/bootstrap-hook-bridge.ts +1 -1
- package/src/runtime/bootstrap.ts +8 -8
- package/src/runtime/index.ts +2 -2
- package/src/runtime/onboarding/derivation.ts +6 -6
- package/src/shell/service-settings-sync.ts +1 -1
- package/src/version.ts +1 -1
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import type { AgentWorkspaceActionResult, AgentWorkspaceEditorKind, AgentWorkspaceLocalEditor } from './agent-workspace-types.ts';
|
|
2
|
+
import { quoteSlashCommandArg } from './slash-command-parser.ts';
|
|
3
|
+
|
|
4
|
+
type AgentWorkspaceFieldReader = (fieldId: string) => string;
|
|
5
|
+
|
|
6
|
+
export type AgentWorkspaceBasicCommandEditorKind = Extract<
|
|
7
|
+
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'
|
|
9
|
+
>;
|
|
10
|
+
|
|
11
|
+
export type AgentWorkspaceBasicCommandEditorSubmission =
|
|
12
|
+
| {
|
|
13
|
+
readonly kind: 'editor';
|
|
14
|
+
readonly editor: AgentWorkspaceLocalEditor;
|
|
15
|
+
readonly status: string;
|
|
16
|
+
readonly actionResult?: AgentWorkspaceActionResult;
|
|
17
|
+
}
|
|
18
|
+
| {
|
|
19
|
+
readonly kind: 'dispatch';
|
|
20
|
+
readonly command: string;
|
|
21
|
+
readonly status: string;
|
|
22
|
+
readonly actionResult: AgentWorkspaceActionResult;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
function isAffirmative(value: string): boolean {
|
|
26
|
+
return /^(y|yes|true)$/i.test(value.trim());
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function isAgentWorkspaceBasicCommandEditorKind(kind: AgentWorkspaceEditorKind): kind is AgentWorkspaceBasicCommandEditorKind {
|
|
30
|
+
return kind === 'knowledge-bookmarks'
|
|
31
|
+
|| kind === 'knowledge-file'
|
|
32
|
+
|| kind === 'knowledge-browser-history'
|
|
33
|
+
|| kind === 'knowledge-connector-ingest'
|
|
34
|
+
|| kind === 'tts-prompt'
|
|
35
|
+
|| kind === 'image-input'
|
|
36
|
+
|| kind === 'skill-bundle'
|
|
37
|
+
|| kind === 'skill-discovery-import'
|
|
38
|
+
|| kind === 'profile-template-export'
|
|
39
|
+
|| kind === 'profile-template-import';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function createAgentWorkspaceBasicCommandEditor(kind: AgentWorkspaceBasicCommandEditorKind): AgentWorkspaceLocalEditor {
|
|
43
|
+
if (kind === 'knowledge-bookmarks') {
|
|
44
|
+
return {
|
|
45
|
+
kind,
|
|
46
|
+
mode: 'create',
|
|
47
|
+
title: 'Import Bookmarks into Agent Knowledge',
|
|
48
|
+
selectedFieldIndex: 0,
|
|
49
|
+
message: 'Import a browser bookmark export into the isolated Agent Knowledge segment. Type yes on the final field to confirm.',
|
|
50
|
+
fields: [
|
|
51
|
+
{ id: 'path', label: 'Bookmark export path', value: '', required: true, multiline: false, hint: 'Path to an HTML or JSON browser bookmark export.' },
|
|
52
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /knowledge import-bookmarks with --yes.' },
|
|
53
|
+
],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (kind === 'knowledge-file') {
|
|
57
|
+
return {
|
|
58
|
+
kind,
|
|
59
|
+
mode: 'create',
|
|
60
|
+
title: 'Ingest File into Agent Knowledge',
|
|
61
|
+
selectedFieldIndex: 0,
|
|
62
|
+
message: 'Import a local source-backed file into the isolated Agent Knowledge segment. Type yes on the final field to confirm.',
|
|
63
|
+
fields: [
|
|
64
|
+
{ id: 'path', label: 'File path', value: '', required: true, multiline: false, hint: 'Path to a local document or text file to ingest.' },
|
|
65
|
+
{ id: 'title', label: 'Title', value: '', required: false, multiline: false, hint: 'Optional source title.' },
|
|
66
|
+
{ id: 'tags', label: 'Tags', value: '', required: false, multiline: false, hint: 'Comma-separated optional tags.' },
|
|
67
|
+
{ id: 'folder', label: 'Folder', value: '', required: false, multiline: false, hint: 'Optional Agent Knowledge folder path.' },
|
|
68
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /knowledge ingest-file with --yes.' },
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
if (kind === 'knowledge-browser-history') {
|
|
73
|
+
return {
|
|
74
|
+
kind,
|
|
75
|
+
mode: 'create',
|
|
76
|
+
title: 'Import Browser History into Agent Knowledge',
|
|
77
|
+
selectedFieldIndex: 0,
|
|
78
|
+
message: 'Import local browser history/bookmarks into the isolated Agent Knowledge segment. Type yes on the final field to confirm.',
|
|
79
|
+
fields: [
|
|
80
|
+
{ id: 'browsers', label: 'Browsers', value: '', required: false, multiline: false, hint: 'Optional comma list: chrome, brave, edge, firefox, safari, etc.' },
|
|
81
|
+
{ id: 'sources', label: 'Sources', value: 'history,bookmark', required: false, multiline: false, hint: 'history, bookmark, or both.' },
|
|
82
|
+
{ id: 'limit', label: 'Limit', value: '250', required: false, multiline: false, hint: 'Maximum browser entries to import.' },
|
|
83
|
+
{ id: 'sinceDays', label: 'Since days', value: '', required: false, multiline: false, hint: 'Optional age window, such as 30.' },
|
|
84
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /knowledge import-browser-history with --yes.' },
|
|
85
|
+
],
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (kind === 'knowledge-connector-ingest') {
|
|
89
|
+
return {
|
|
90
|
+
kind,
|
|
91
|
+
mode: 'create',
|
|
92
|
+
title: 'Ingest Connector Input',
|
|
93
|
+
selectedFieldIndex: 0,
|
|
94
|
+
message: 'Send explicit connector input into the isolated Agent Knowledge segment. Type yes on the final field to confirm.',
|
|
95
|
+
fields: [
|
|
96
|
+
{ id: 'connectorId', label: 'Connector id', value: '', required: true, multiline: false, hint: 'Connector id from /knowledge connectors.' },
|
|
97
|
+
{ id: 'input', label: 'Input', value: '', required: false, multiline: true, hint: 'Optional JSON or text input. Ctrl-J inserts a new line.' },
|
|
98
|
+
{ id: 'path', label: 'Path', value: '', required: false, multiline: false, hint: 'Optional local path for connectors that read files.' },
|
|
99
|
+
{ id: 'content', label: 'Content', value: '', required: false, multiline: true, hint: 'Optional raw content for connectors that accept text.' },
|
|
100
|
+
{ id: 'allowPrivateHosts', label: 'Allow private hosts', value: 'no', required: false, multiline: false, hint: 'yes/no. Defaults to no.' },
|
|
101
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /knowledge ingest-connector with --yes.' },
|
|
102
|
+
],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
if (kind === 'tts-prompt') {
|
|
106
|
+
return {
|
|
107
|
+
kind,
|
|
108
|
+
mode: 'create',
|
|
109
|
+
title: 'Speak Assistant Reply',
|
|
110
|
+
selectedFieldIndex: 0,
|
|
111
|
+
message: 'Submit a normal assistant prompt and play the reply through configured live TTS.',
|
|
112
|
+
fields: [
|
|
113
|
+
{ id: 'prompt', label: 'Prompt', value: '', required: true, multiline: true, hint: 'Assistant prompt to speak. Ctrl-J inserts a new line.' },
|
|
114
|
+
],
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
if (kind === 'image-input') {
|
|
118
|
+
return {
|
|
119
|
+
kind,
|
|
120
|
+
mode: 'create',
|
|
121
|
+
title: 'Attach Image Input',
|
|
122
|
+
selectedFieldIndex: 0,
|
|
123
|
+
message: 'Attach an image to the next assistant turn. The existing image command validates file type and model support.',
|
|
124
|
+
fields: [
|
|
125
|
+
{ id: 'path', label: 'Image path', value: '', required: true, multiline: false, hint: 'PNG, JPEG, WebP, or GIF path under the current workspace.' },
|
|
126
|
+
{ id: 'prompt', label: 'Prompt', value: '', required: false, multiline: true, hint: 'Optional prompt. Ctrl-J inserts a new line.' },
|
|
127
|
+
],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
if (kind === 'profile-template-export') {
|
|
131
|
+
return {
|
|
132
|
+
kind,
|
|
133
|
+
mode: 'create',
|
|
134
|
+
title: 'Export Agent Starter Template',
|
|
135
|
+
selectedFieldIndex: 0,
|
|
136
|
+
message: 'Export a starter template JSON file for review and customization. Type yes on the final field to confirm.',
|
|
137
|
+
fields: [
|
|
138
|
+
{ id: 'templateId', label: 'Starter id', value: '', required: true, multiline: false, hint: 'Existing starter id from /agent-profile templates.' },
|
|
139
|
+
{ id: 'path', label: 'Output path', value: '', required: true, multiline: false, hint: 'Workspace-relative JSON path to write.' },
|
|
140
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /agent-profile template export with --yes.' },
|
|
141
|
+
],
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
if (kind === 'profile-template-import') {
|
|
145
|
+
return {
|
|
146
|
+
kind,
|
|
147
|
+
mode: 'create',
|
|
148
|
+
title: 'Import Agent Starter Template',
|
|
149
|
+
selectedFieldIndex: 0,
|
|
150
|
+
message: 'Import a reviewed starter template JSON file into this Agent home. Type yes on the final field to confirm.',
|
|
151
|
+
fields: [
|
|
152
|
+
{ id: 'path', label: 'Template path', value: '', required: true, multiline: false, hint: 'Workspace-relative JSON path to import.' },
|
|
153
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /agent-profile template import with --yes.' },
|
|
154
|
+
],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
if (kind === 'skill-discovery-import') {
|
|
158
|
+
return {
|
|
159
|
+
kind,
|
|
160
|
+
mode: 'create',
|
|
161
|
+
title: 'Import Discovered Skill',
|
|
162
|
+
selectedFieldIndex: 0,
|
|
163
|
+
message: 'Import one discovered SKILL.md or .md skill file into the Agent-local skill registry. Type yes on the final field to confirm.',
|
|
164
|
+
fields: [
|
|
165
|
+
{ id: 'name', label: 'Discovered skill', value: '', required: true, multiline: false, hint: 'Name shown by /agent-skills discover.' },
|
|
166
|
+
{ id: 'enabled', label: 'Enable now', value: 'yes', required: false, multiline: false, hint: 'yes/no.' },
|
|
167
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /agent-skills import-discovered with --yes.' },
|
|
168
|
+
],
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
kind,
|
|
173
|
+
mode: 'create',
|
|
174
|
+
title: 'Create Skill Bundle',
|
|
175
|
+
selectedFieldIndex: 0,
|
|
176
|
+
message: 'Group existing local skills into a reviewable bundle that can be enabled together.',
|
|
177
|
+
fields: [
|
|
178
|
+
{ id: 'name', label: 'Bundle name', value: '', required: true, multiline: false, hint: 'Short bundle name.' },
|
|
179
|
+
{ id: 'description', label: 'Description', value: '', required: true, multiline: false, hint: 'One-line bundle summary.' },
|
|
180
|
+
{ id: 'skills', label: 'Skill ids', value: '', required: true, multiline: false, hint: 'Comma-separated existing local skill ids.' },
|
|
181
|
+
{ id: 'enabled', label: 'Enable now', value: 'yes', required: false, multiline: false, hint: 'yes/no.' },
|
|
182
|
+
],
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function buildAgentWorkspaceBasicCommandEditorSubmission(
|
|
187
|
+
editor: AgentWorkspaceLocalEditor,
|
|
188
|
+
readField: AgentWorkspaceFieldReader,
|
|
189
|
+
commandDispatchAvailable: boolean,
|
|
190
|
+
): AgentWorkspaceBasicCommandEditorSubmission {
|
|
191
|
+
if (!commandDispatchAvailable) {
|
|
192
|
+
return {
|
|
193
|
+
kind: 'editor',
|
|
194
|
+
editor: { ...editor, message: 'Command dispatch is unavailable; this action cannot run from this workspace.' },
|
|
195
|
+
status: 'Command dispatch unavailable.',
|
|
196
|
+
actionResult: {
|
|
197
|
+
kind: 'error',
|
|
198
|
+
title: 'Command dispatch unavailable',
|
|
199
|
+
detail: 'The Agent workspace cannot hand this action to the shell-owned command router.',
|
|
200
|
+
},
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
if (editor.kind === 'knowledge-bookmarks') {
|
|
204
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
205
|
+
return {
|
|
206
|
+
kind: 'editor',
|
|
207
|
+
editor: { ...editor, message: 'Bookmark import not confirmed. Type yes, then press Enter.' },
|
|
208
|
+
status: 'Agent Knowledge bookmark import not confirmed.',
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
const command = `/knowledge import-bookmarks ${quoteSlashCommandArg(readField('path'))} --yes`;
|
|
212
|
+
return {
|
|
213
|
+
kind: 'dispatch',
|
|
214
|
+
command,
|
|
215
|
+
status: 'Opening Agent Knowledge bookmark import.',
|
|
216
|
+
actionResult: {
|
|
217
|
+
kind: 'dispatched',
|
|
218
|
+
title: 'Opening Agent Knowledge bookmark import',
|
|
219
|
+
detail: 'The workspace handed a confirmed bookmark import command to the shell-owned command router.',
|
|
220
|
+
command,
|
|
221
|
+
safety: 'safe',
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
if (editor.kind === 'knowledge-file') {
|
|
226
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
227
|
+
return {
|
|
228
|
+
kind: 'editor',
|
|
229
|
+
editor: { ...editor, message: 'File ingest not confirmed. Type yes, then press Enter.' },
|
|
230
|
+
status: 'Agent Knowledge file ingest not confirmed.',
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
const parts = ['/knowledge', 'ingest-file', quoteSlashCommandArg(readField('path'))];
|
|
234
|
+
const title = readField('title');
|
|
235
|
+
const tags = readField('tags');
|
|
236
|
+
const folder = readField('folder');
|
|
237
|
+
if (title.length > 0) parts.push('--title', quoteSlashCommandArg(title));
|
|
238
|
+
if (tags.length > 0) parts.push('--tags', quoteSlashCommandArg(tags));
|
|
239
|
+
if (folder.length > 0) parts.push('--folder', quoteSlashCommandArg(folder));
|
|
240
|
+
parts.push('--yes');
|
|
241
|
+
const command = parts.join(' ');
|
|
242
|
+
return {
|
|
243
|
+
kind: 'dispatch',
|
|
244
|
+
command,
|
|
245
|
+
status: 'Opening Agent Knowledge file ingest.',
|
|
246
|
+
actionResult: {
|
|
247
|
+
kind: 'dispatched',
|
|
248
|
+
title: 'Opening Agent Knowledge file ingest',
|
|
249
|
+
detail: 'The workspace handed a confirmed file ingest command to the shell-owned command router.',
|
|
250
|
+
command,
|
|
251
|
+
safety: 'safe',
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
if (editor.kind === 'knowledge-browser-history') {
|
|
256
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
257
|
+
return {
|
|
258
|
+
kind: 'editor',
|
|
259
|
+
editor: { ...editor, message: 'Browser history import not confirmed. Type yes, then press Enter.' },
|
|
260
|
+
status: 'Agent Knowledge browser history import not confirmed.',
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
const parts = ['/knowledge', 'import-browser-history'];
|
|
264
|
+
const browsers = readField('browsers');
|
|
265
|
+
const sources = readField('sources');
|
|
266
|
+
const limit = readField('limit');
|
|
267
|
+
const sinceDays = readField('sinceDays');
|
|
268
|
+
if (browsers.length > 0) parts.push('--browsers', quoteSlashCommandArg(browsers));
|
|
269
|
+
if (sources.length > 0) parts.push('--sources', quoteSlashCommandArg(sources));
|
|
270
|
+
if (limit.length > 0) parts.push('--limit', quoteSlashCommandArg(limit));
|
|
271
|
+
if (sinceDays.length > 0) parts.push('--since-days', quoteSlashCommandArg(sinceDays));
|
|
272
|
+
parts.push('--yes');
|
|
273
|
+
const command = parts.join(' ');
|
|
274
|
+
return {
|
|
275
|
+
kind: 'dispatch',
|
|
276
|
+
command,
|
|
277
|
+
status: 'Opening Agent Knowledge browser history import.',
|
|
278
|
+
actionResult: {
|
|
279
|
+
kind: 'dispatched',
|
|
280
|
+
title: 'Opening Agent Knowledge browser history import',
|
|
281
|
+
detail: 'The workspace handed a confirmed browser-history import command to the shell-owned command router.',
|
|
282
|
+
command,
|
|
283
|
+
safety: 'safe',
|
|
284
|
+
},
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
if (editor.kind === 'knowledge-connector-ingest') {
|
|
288
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
289
|
+
return {
|
|
290
|
+
kind: 'editor',
|
|
291
|
+
editor: { ...editor, message: 'Connector ingest not confirmed. Type yes, then press Enter.' },
|
|
292
|
+
status: 'Agent Knowledge connector ingest not confirmed.',
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
const connectorId = readField('connectorId');
|
|
296
|
+
const input = readField('input');
|
|
297
|
+
const path = readField('path');
|
|
298
|
+
const content = readField('content');
|
|
299
|
+
const parts = ['/knowledge', 'ingest-connector', quoteSlashCommandArg(connectorId)];
|
|
300
|
+
if (input.length > 0) parts.push('--input', quoteSlashCommandArg(input));
|
|
301
|
+
if (path.length > 0) parts.push('--path', quoteSlashCommandArg(path));
|
|
302
|
+
if (content.length > 0) parts.push('--content', quoteSlashCommandArg(content));
|
|
303
|
+
if (isAffirmative(readField('allowPrivateHosts'))) parts.push('--allow-private-hosts');
|
|
304
|
+
parts.push('--yes');
|
|
305
|
+
const command = parts.join(' ');
|
|
306
|
+
return {
|
|
307
|
+
kind: 'dispatch',
|
|
308
|
+
command,
|
|
309
|
+
status: 'Opening Agent Knowledge connector ingest.',
|
|
310
|
+
actionResult: {
|
|
311
|
+
kind: 'dispatched',
|
|
312
|
+
title: 'Opening Agent Knowledge connector ingest',
|
|
313
|
+
detail: 'The workspace handed a confirmed connector ingest command to the shell-owned command router.',
|
|
314
|
+
command,
|
|
315
|
+
safety: 'safe',
|
|
316
|
+
},
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
if (editor.kind === 'tts-prompt') {
|
|
320
|
+
const command = `/tts ${quoteSlashCommandArg(readField('prompt'))}`;
|
|
321
|
+
return {
|
|
322
|
+
kind: 'dispatch',
|
|
323
|
+
command,
|
|
324
|
+
status: 'Opening spoken assistant prompt.',
|
|
325
|
+
actionResult: {
|
|
326
|
+
kind: 'dispatched',
|
|
327
|
+
title: 'Opening spoken assistant prompt',
|
|
328
|
+
detail: 'The workspace handed a spoken prompt to the shell-owned command router.',
|
|
329
|
+
command,
|
|
330
|
+
safety: 'safe',
|
|
331
|
+
},
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
if (editor.kind === 'image-input') {
|
|
335
|
+
const prompt = readField('prompt');
|
|
336
|
+
const command = prompt.length > 0
|
|
337
|
+
? `/image ${quoteSlashCommandArg(readField('path'))} ${quoteSlashCommandArg(prompt)}`
|
|
338
|
+
: `/image ${quoteSlashCommandArg(readField('path'))}`;
|
|
339
|
+
return {
|
|
340
|
+
kind: 'dispatch',
|
|
341
|
+
command,
|
|
342
|
+
status: 'Opening image input.',
|
|
343
|
+
actionResult: {
|
|
344
|
+
kind: 'dispatched',
|
|
345
|
+
title: 'Opening image input',
|
|
346
|
+
detail: 'The workspace handed an image attachment command to the shell-owned command router.',
|
|
347
|
+
command,
|
|
348
|
+
safety: 'safe',
|
|
349
|
+
},
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
if (editor.kind === 'profile-template-export') {
|
|
353
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
354
|
+
return {
|
|
355
|
+
kind: 'editor',
|
|
356
|
+
editor: { ...editor, message: 'Starter template export not confirmed. Type yes, then press Enter.' },
|
|
357
|
+
status: 'Agent starter template export not confirmed.',
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
const command = `/agent-profile template export ${quoteSlashCommandArg(readField('templateId'))} ${quoteSlashCommandArg(readField('path'))} --yes`;
|
|
361
|
+
return {
|
|
362
|
+
kind: 'dispatch',
|
|
363
|
+
command,
|
|
364
|
+
status: 'Opening Agent starter template export.',
|
|
365
|
+
actionResult: {
|
|
366
|
+
kind: 'dispatched',
|
|
367
|
+
title: 'Opening Agent starter template export',
|
|
368
|
+
detail: 'The workspace handed a confirmed starter template export command to the shell-owned command router.',
|
|
369
|
+
command,
|
|
370
|
+
safety: 'safe',
|
|
371
|
+
},
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
if (editor.kind === 'profile-template-import') {
|
|
375
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
376
|
+
return {
|
|
377
|
+
kind: 'editor',
|
|
378
|
+
editor: { ...editor, message: 'Starter template import not confirmed. Type yes, then press Enter.' },
|
|
379
|
+
status: 'Agent starter template import not confirmed.',
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
const command = `/agent-profile template import ${quoteSlashCommandArg(readField('path'))} --yes`;
|
|
383
|
+
return {
|
|
384
|
+
kind: 'dispatch',
|
|
385
|
+
command,
|
|
386
|
+
status: 'Opening Agent starter template import.',
|
|
387
|
+
actionResult: {
|
|
388
|
+
kind: 'dispatched',
|
|
389
|
+
title: 'Opening Agent starter template import',
|
|
390
|
+
detail: 'The workspace handed a confirmed starter template import command to the shell-owned command router.',
|
|
391
|
+
command,
|
|
392
|
+
safety: 'safe',
|
|
393
|
+
},
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
if (editor.kind === 'skill-discovery-import') {
|
|
397
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
398
|
+
return {
|
|
399
|
+
kind: 'editor',
|
|
400
|
+
editor: { ...editor, message: 'Discovered skill import not confirmed. Type yes, then press Enter.' },
|
|
401
|
+
status: 'Agent skill import not confirmed.',
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
const parts = [
|
|
405
|
+
'/agent-skills',
|
|
406
|
+
'import-discovered',
|
|
407
|
+
quoteSlashCommandArg(readField('name')),
|
|
408
|
+
];
|
|
409
|
+
if (isAffirmative(readField('enabled'))) parts.push('--enabled');
|
|
410
|
+
parts.push('--yes');
|
|
411
|
+
const command = parts.join(' ');
|
|
412
|
+
return {
|
|
413
|
+
kind: 'dispatch',
|
|
414
|
+
command,
|
|
415
|
+
status: 'Opening discovered skill import.',
|
|
416
|
+
actionResult: {
|
|
417
|
+
kind: 'dispatched',
|
|
418
|
+
title: 'Opening discovered skill import',
|
|
419
|
+
detail: 'The workspace handed a confirmed local skill import command to the shell-owned command router.',
|
|
420
|
+
command,
|
|
421
|
+
safety: 'safe',
|
|
422
|
+
},
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
const commandParts = [
|
|
426
|
+
'/agent-skills bundle create',
|
|
427
|
+
'--name',
|
|
428
|
+
quoteSlashCommandArg(readField('name')),
|
|
429
|
+
'--description',
|
|
430
|
+
quoteSlashCommandArg(readField('description')),
|
|
431
|
+
'--skills',
|
|
432
|
+
quoteSlashCommandArg(readField('skills')),
|
|
433
|
+
];
|
|
434
|
+
if (isAffirmative(readField('enabled'))) commandParts.push('--enabled');
|
|
435
|
+
const command = commandParts.join(' ');
|
|
436
|
+
return {
|
|
437
|
+
kind: 'dispatch',
|
|
438
|
+
command,
|
|
439
|
+
status: 'Opening skill bundle creation.',
|
|
440
|
+
actionResult: {
|
|
441
|
+
kind: 'dispatched',
|
|
442
|
+
title: 'Opening skill bundle creation',
|
|
443
|
+
detail: 'The workspace handed a concrete local skill bundle command to the shell-owned command router.',
|
|
444
|
+
command,
|
|
445
|
+
safety: 'safe',
|
|
446
|
+
},
|
|
447
|
+
};
|
|
448
|
+
}
|