@pellux/goodvibes-agent 0.1.117 → 1.0.0
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 +13 -4
- package/README.md +35 -14
- package/bin/goodvibes-agent.ts +16 -2
- package/dist/package/main.js +176073 -170980
- package/docs/README.md +11 -5
- package/docs/channels-remote-and-api.md +50 -0
- package/docs/connected-host.md +3 -3
- package/docs/getting-started.md +29 -15
- package/docs/knowledge-artifacts-and-multimodal.md +91 -0
- package/docs/project-planning.md +79 -0
- package/docs/providers-and-routing.md +46 -0
- package/docs/release-and-publishing.md +44 -9
- package/docs/tools-and-commands.md +123 -0
- package/docs/voice-and-live-tts.md +51 -0
- package/package.json +2 -5
- package/src/agent/channel-delivery.ts +201 -0
- package/src/agent/media-generation.ts +159 -0
- package/src/agent/memory-prompt.ts +0 -1
- package/src/agent/note-registry.ts +329 -0
- package/src/agent/operator-actions.ts +343 -0
- package/src/agent/persona-registry.ts +15 -14
- package/src/agent/record-labels.ts +107 -0
- package/src/agent/reminder-schedule-format.ts +33 -24
- package/src/agent/reminder-schedule.ts +26 -25
- package/src/agent/routine-registry.ts +13 -12
- package/src/agent/routine-schedule-args.ts +2 -1
- package/src/agent/routine-schedule-format.ts +77 -53
- package/src/agent/routine-schedule-promotion.ts +34 -32
- package/src/agent/routine-schedule-receipts.ts +28 -26
- package/src/agent/runtime-profile-starters.ts +2 -2
- package/src/agent/runtime-profile.ts +18 -17
- package/src/agent/skill-registry.ts +25 -24
- package/src/cli/agent-knowledge-args.ts +5 -1
- package/src/cli/agent-knowledge-command.ts +39 -33
- package/src/cli/agent-knowledge-format.ts +80 -67
- package/src/cli/agent-knowledge-methods.ts +1 -1
- package/src/cli/agent-knowledge-runtime.ts +32 -26
- package/src/cli/bundle-command.ts +13 -8
- package/src/cli/config-overrides.ts +37 -36
- package/src/cli/external-runtime.ts +10 -4
- package/src/cli/help.ts +29 -11
- package/src/cli/local-library-command.ts +134 -68
- package/src/cli/management-commands.ts +98 -62
- package/src/cli/management.ts +52 -26
- package/src/cli/memory-command.ts +66 -32
- package/src/cli/parser.ts +37 -24
- package/src/cli/profiles-command.ts +52 -35
- package/src/cli/provider-auth-routes.ts +2 -1
- package/src/cli/routines-command.ts +44 -36
- package/src/cli/service-posture.ts +6 -6
- package/src/cli/status.ts +46 -121
- package/src/core/conversation-message-snapshot.ts +131 -0
- package/src/input/agent-workspace-activation.ts +33 -7
- package/src/input/agent-workspace-basic-command-editor-submission.ts +7 -3
- package/src/input/agent-workspace-basic-command-editors.ts +30 -10
- package/src/input/agent-workspace-categories.ts +276 -64
- package/src/input/agent-workspace-channel-command-editor-submission.ts +34 -0
- package/src/input/agent-workspace-channel-command-editors.ts +23 -5
- package/src/input/agent-workspace-channels.ts +35 -2
- package/src/input/agent-workspace-command-editor.ts +18 -2
- package/src/input/agent-workspace-config-reader.ts +16 -0
- package/src/input/agent-workspace-delegation-editor-submission.ts +1 -1
- package/src/input/agent-workspace-editors.ts +140 -2
- package/src/input/agent-workspace-knowledge-query-editor.ts +1 -1
- package/src/input/agent-workspace-learned-behavior.ts +2 -2
- package/src/input/agent-workspace-library-command-editor-submission.ts +1 -1
- package/src/input/agent-workspace-library-command-editors.ts +2 -2
- package/src/input/agent-workspace-local-operations.ts +218 -0
- package/src/input/agent-workspace-local-selection.ts +75 -0
- package/src/input/agent-workspace-media-command-editor-submission.ts +62 -0
- package/src/input/agent-workspace-media-command-editors.ts +27 -0
- package/src/input/agent-workspace-memory-command-editors.ts +1 -1
- package/src/input/agent-workspace-memory-editor.ts +2 -2
- package/src/input/agent-workspace-navigation.ts +38 -2
- package/src/input/agent-workspace-notify-editor-submission.ts +16 -2
- package/src/input/agent-workspace-operations-command-editor-submission.ts +63 -1
- package/src/input/agent-workspace-operations-command-editors.ts +80 -3
- package/src/input/agent-workspace-panel-route.ts +43 -0
- package/src/input/agent-workspace-reminder-schedule-editor.ts +1 -1
- package/src/input/agent-workspace-routine-schedule-editor.ts +2 -2
- package/src/input/agent-workspace-search.ts +169 -0
- package/src/input/agent-workspace-setup.ts +22 -11
- package/src/input/agent-workspace-skill-bundle-command-editor-submission.ts +6 -6
- package/src/input/agent-workspace-skill-bundle-command-editors.ts +10 -10
- package/src/input/agent-workspace-snapshot.ts +112 -13
- package/src/input/agent-workspace-task-command-editors.ts +4 -4
- package/src/input/agent-workspace-token.ts +18 -2
- package/src/input/agent-workspace-types.ts +92 -4
- package/src/input/agent-workspace-voice-media.ts +3 -6
- package/src/input/agent-workspace-web-research-editor.ts +104 -0
- package/src/input/agent-workspace.ts +136 -208
- package/src/input/command-registry.ts +4 -1
- package/src/input/commands/agent-runtime-profile-runtime.ts +45 -41
- package/src/input/commands/agent-skills-runtime.ts +83 -70
- package/src/input/commands/agent-workspace-runtime.ts +23 -7
- package/src/input/commands/brief-runtime.ts +25 -24
- package/src/input/commands/channels-runtime.ts +145 -31
- package/src/input/commands/delegation-runtime.ts +29 -23
- package/src/input/commands/experience-runtime.ts +6 -4
- package/src/input/commands/guidance-runtime.ts +4 -4
- package/src/input/commands/health-runtime.ts +140 -115
- package/src/input/commands/knowledge.ts +57 -56
- package/src/input/commands/local-provider-runtime.ts +36 -18
- package/src/input/commands/local-runtime.ts +138 -16
- package/src/input/commands/local-setup-review.ts +7 -7
- package/src/input/commands/mcp-runtime.ts +56 -35
- package/src/input/commands/notify-runtime.ts +38 -9
- package/src/input/commands/operator-actions-runtime.ts +138 -0
- package/src/input/commands/operator-runtime.ts +6 -17
- package/src/input/commands/personas-runtime.ts +45 -30
- package/src/input/commands/planning-runtime.ts +1 -1
- package/src/input/commands/platform-access-runtime.ts +29 -29
- package/src/input/commands/provider-accounts-runtime.ts +60 -39
- package/src/input/commands/qrcode-runtime.ts +45 -6
- package/src/input/commands/recall-bundle.ts +11 -11
- package/src/input/commands/recall-capture.ts +13 -11
- package/src/input/commands/recall-query.ts +29 -21
- package/src/input/commands/recall-review.ts +2 -1
- package/src/input/commands/routines-runtime.ts +59 -43
- package/src/input/commands/schedule-runtime.ts +33 -20
- package/src/input/commands/security-runtime.ts +4 -4
- package/src/input/commands/session-content.ts +80 -78
- package/src/input/commands/session-workflow.ts +132 -93
- package/src/input/commands/session.ts +3 -174
- package/src/input/commands/shell-core.ts +32 -17
- package/src/input/commands/subscription-runtime.ts +53 -179
- package/src/input/commands/tasks-runtime.ts +20 -20
- package/src/input/commands/work-plan-runtime.ts +33 -8
- package/src/input/commands.ts +2 -2
- package/src/input/feed-context-factory.ts +2 -1
- package/src/input/file-picker.ts +3 -2
- package/src/input/handler-command-route.ts +4 -7
- package/src/input/handler-content-actions.ts +89 -1
- package/src/input/handler-feed-routes.ts +19 -12
- package/src/input/handler-feed.ts +6 -3
- package/src/input/handler-interactions.ts +7 -5
- package/src/input/handler-modal-stack.ts +3 -3
- package/src/input/handler-onboarding.ts +24 -80
- package/src/input/handler-shortcuts.ts +15 -4
- package/src/input/handler.ts +47 -17
- package/src/input/input-history.ts +5 -6
- package/src/input/keybindings.ts +22 -11
- package/src/input/onboarding/onboarding-wizard-apply.ts +13 -0
- package/src/input/onboarding/onboarding-wizard-constants.ts +1 -0
- package/src/input/onboarding/onboarding-wizard-operator-steps.ts +147 -57
- package/src/input/onboarding/onboarding-wizard-steps.ts +46 -29
- package/src/input/onboarding/onboarding-wizard-types.ts +3 -1
- package/src/input/onboarding/onboarding-wizard.ts +68 -0
- package/src/input/profile-picker-modal.ts +31 -12
- package/src/input/session-picker-modal.ts +21 -4
- package/src/input/settings-modal-behavior.ts +0 -3
- package/src/input/settings-modal-subscriptions.ts +3 -3
- package/src/input/settings-modal-types.ts +2 -13
- package/src/input/settings-modal.ts +6 -52
- package/src/input/submission-intent.ts +0 -1
- package/src/input/submission-router.ts +3 -3
- package/src/main.ts +18 -8
- package/src/panels/approval-panel.ts +8 -8
- package/src/panels/automation-control-panel.ts +2 -2
- package/src/panels/base-panel.ts +1 -1
- package/src/panels/builtin/agent.ts +1 -1
- package/src/panels/builtin/operations.ts +1 -10
- package/src/panels/builtin/session.ts +9 -9
- package/src/panels/builtin/shared.ts +2 -2
- package/src/panels/cost-tracker-panel.ts +1 -1
- package/src/panels/docs-panel.ts +5 -3
- package/src/panels/index.ts +0 -1
- package/src/panels/knowledge-panel.ts +6 -5
- package/src/panels/memory-panel.ts +7 -6
- package/src/panels/panel-list-panel.ts +36 -80
- package/src/panels/project-planning-panel.ts +18 -11
- package/src/panels/provider-account-snapshot.ts +51 -25
- package/src/panels/provider-accounts-panel.ts +33 -18
- package/src/panels/provider-health-domains.ts +45 -4
- package/src/panels/provider-health-panel.ts +5 -4
- package/src/panels/qr-panel.ts +1 -1
- package/src/panels/schedule-panel.ts +9 -17
- package/src/panels/security-panel.ts +8 -8
- package/src/panels/session-browser-panel.ts +10 -10
- package/src/panels/subscription-panel.ts +3 -3
- package/src/panels/system-messages-panel.ts +1 -1
- package/src/panels/tasks-panel.ts +20 -13
- package/src/panels/tool-inspector-panel.ts +19 -12
- package/src/panels/work-plan-panel.ts +5 -5
- package/src/planning/project-planning-coordinator.ts +1 -1
- package/src/provider-auth-route-display.ts +9 -0
- package/src/renderer/agent-workspace-style.ts +34 -0
- package/src/renderer/agent-workspace.ts +228 -52
- package/src/renderer/autocomplete-overlay.ts +25 -6
- package/src/renderer/bookmark-modal.ts +19 -4
- package/src/renderer/buffer.ts +4 -2
- package/src/renderer/context-inspector.ts +50 -13
- package/src/renderer/diff.ts +1 -1
- package/src/renderer/file-picker-overlay.ts +19 -6
- package/src/renderer/help-overlay.ts +106 -33
- package/src/renderer/history-search-overlay.ts +19 -4
- package/src/renderer/live-tail-modal.ts +27 -5
- package/src/renderer/mcp-workspace.ts +164 -50
- package/src/renderer/model-picker-overlay.ts +58 -2
- package/src/renderer/model-workspace.ts +104 -20
- package/src/renderer/process-modal.ts +27 -6
- package/src/renderer/profile-picker-modal.ts +20 -4
- package/src/renderer/search-overlay.ts +25 -5
- package/src/renderer/selection-modal-overlay.ts +46 -14
- package/src/renderer/session-picker-modal.ts +18 -1
- package/src/renderer/settings-modal-helpers.ts +2 -40
- package/src/renderer/settings-modal.ts +83 -50
- package/src/renderer/tool-call.ts +20 -11
- package/src/runtime/agent-runtime-events.ts +6 -6
- package/src/runtime/bootstrap-command-context.ts +7 -1
- package/src/runtime/bootstrap-command-parts.ts +9 -7
- package/src/runtime/bootstrap-core.ts +19 -1
- package/src/runtime/bootstrap-hook-bridge.ts +7 -18
- package/src/runtime/bootstrap-shell.ts +4 -4
- package/src/runtime/bootstrap.ts +31 -22
- package/src/runtime/connected-host-auth.ts +7 -2
- package/src/runtime/diagnostics/panels/index.ts +2 -2
- package/src/runtime/diagnostics/panels/policy.ts +7 -7
- package/src/runtime/index.ts +2 -1
- package/src/runtime/onboarding/apply-file-helpers.ts +66 -0
- package/src/runtime/onboarding/apply.ts +80 -79
- package/src/runtime/onboarding/derivation.ts +5 -8
- package/src/runtime/onboarding/snapshot.ts +0 -15
- package/src/runtime/onboarding/types.ts +8 -19
- package/src/runtime/onboarding/verify.ts +32 -10
- package/src/runtime/operator-token-cleanup.ts +1 -1
- package/src/runtime/services.ts +91 -22
- package/src/runtime/store/selectors/index.ts +3 -3
- package/src/runtime/store/state.ts +1 -4
- package/src/runtime/surface-feature-flags.ts +41 -6
- package/src/runtime/ui-read-models.ts +3 -4
- package/src/runtime/ui-services.ts +6 -6
- package/src/shell/blocking-input.ts +2 -1
- package/src/shell/ui-openers.ts +3 -13
- package/src/tools/agent-analysis-registry-policy.ts +0 -1
- package/src/tools/agent-channel-send-tool.ts +133 -0
- package/src/tools/agent-context-policy.ts +1 -1
- package/src/tools/agent-knowledge-ingest-tool.ts +405 -0
- package/src/tools/agent-knowledge-tool.ts +170 -0
- package/src/tools/agent-local-registry-tool.ts +269 -69
- package/src/tools/agent-media-generate-tool.ts +133 -0
- package/src/tools/agent-notify-tool.ts +143 -0
- package/src/tools/agent-operator-action-tool.ts +137 -0
- package/src/tools/agent-operator-briefing-tool.ts +217 -0
- package/src/tools/agent-reminder-schedule-tool.ts +237 -0
- package/src/tools/agent-tool-policy-guard.ts +8 -8
- package/src/tools/agent-work-plan-tool.ts +256 -0
- package/src/version.ts +1 -1
- package/src/input/commands/policy-dispatch.ts +0 -339
- package/src/input/commands/policy.ts +0 -13
- package/src/panels/panel-picker.ts +0 -105
- package/src/panels/policy-panel.ts +0 -308
- package/src/renderer/panel-picker-overlay.ts +0 -202
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
type AgentRuntimeProfileInfo,
|
|
18
18
|
type AgentRuntimeProfileTemplateSummary,
|
|
19
19
|
} from '../../agent/runtime-profile.ts';
|
|
20
|
+
import { formatAgentRecordSource } from '../../agent/record-labels.ts';
|
|
20
21
|
import type { CommandContext, CommandRegistry } from '../command-registry.ts';
|
|
21
22
|
import { requireYesFlag, stripYesFlag } from './confirmation.ts';
|
|
22
23
|
import { requireShellPaths } from './runtime-services.ts';
|
|
@@ -35,19 +36,19 @@ function parseCsvFlag(args: readonly string[], name: string): readonly string[]
|
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
function profileLine(profile: AgentRuntimeProfileInfo): string {
|
|
38
|
-
const created = profile.createdAt ? `
|
|
39
|
-
const starter = profile.starterTemplateId ? `
|
|
40
|
-
return ` ${profile.id} home
|
|
39
|
+
const created = profile.createdAt ? ` created ${profile.createdAt}` : '';
|
|
40
|
+
const starter = profile.starterTemplateId ? ` starter=${profile.starterTemplateId}` : '';
|
|
41
|
+
return ` ${profile.id} home ${profile.homeDirectory}${created}${starter}`;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
function templateLine(template: AgentRuntimeProfileTemplateSummary): string {
|
|
44
|
-
const
|
|
45
|
+
const origin = template.source === 'local' ? `local ${template.path ?? ''}`.trim() : formatAgentRecordSource(template.source).toLowerCase();
|
|
45
46
|
return [
|
|
46
|
-
` ${template.id} [${
|
|
47
|
-
` ${template.name}
|
|
48
|
-
` persona
|
|
49
|
-
` skills
|
|
50
|
-
` routines
|
|
47
|
+
` ${template.id} [${origin}]`,
|
|
48
|
+
` ${template.name} - ${template.description}`,
|
|
49
|
+
` persona ${template.personaName}`,
|
|
50
|
+
` skills ${template.skillNames.join(', ')}`,
|
|
51
|
+
` routines ${template.routineNames.join(', ')}`,
|
|
51
52
|
].join('\n');
|
|
52
53
|
}
|
|
53
54
|
|
|
@@ -72,9 +73,9 @@ function renderProfileDetail(homeDirectory: string, name: string): string {
|
|
|
72
73
|
const starter = info.starterTemplateId ? [` starter: ${info.starterTemplateId} (${info.starterTemplateName ?? info.starterTemplateId})`] : [];
|
|
73
74
|
return [
|
|
74
75
|
`Agent profile: ${profile.id}`,
|
|
75
|
-
` home
|
|
76
|
+
` home ${profile.homeDirectory}`,
|
|
76
77
|
...starter,
|
|
77
|
-
` use
|
|
78
|
+
` use goodvibes-agent --agent-profile ${profile.id}`,
|
|
78
79
|
].join('\n');
|
|
79
80
|
}
|
|
80
81
|
|
|
@@ -98,8 +99,8 @@ function renderGuide(homeDirectory: string): string {
|
|
|
98
99
|
const localCount = templates.filter((template) => template.source === 'local').length;
|
|
99
100
|
return [
|
|
100
101
|
'Agent Starter Authoring Guide',
|
|
101
|
-
` built-in starters
|
|
102
|
-
` local starters
|
|
102
|
+
` built-in starters ${templates.length - localCount}`,
|
|
103
|
+
` local starters ${localCount}`,
|
|
103
104
|
'',
|
|
104
105
|
'1. Pick a base starter:',
|
|
105
106
|
' /agent-profile templates',
|
|
@@ -111,20 +112,20 @@ function renderGuide(homeDirectory: string): string {
|
|
|
111
112
|
'5. Create an Agent profile from the imported starter:',
|
|
112
113
|
' /agent-profile create <name> --template <imported-id> --yes',
|
|
113
114
|
'',
|
|
114
|
-
'This writes only Agent-local starter/profile state. It does not mutate connected GoodVibes host, default
|
|
115
|
+
'This writes only Agent-local starter/profile state. It does not mutate connected GoodVibes host, default knowledge, or non-Agent knowledge segments.',
|
|
115
116
|
].join('\n');
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
function renderTemplatePreview(homeDirectory: string, templateId: string): string {
|
|
119
120
|
const file = getAgentRuntimeProfileTemplateFile(templateId, homeDirectory);
|
|
120
121
|
return [
|
|
121
|
-
`Agent Starter Template
|
|
122
|
-
` name
|
|
123
|
-
`
|
|
124
|
-
` description
|
|
125
|
-
` persona
|
|
126
|
-
` skills
|
|
127
|
-
` routines
|
|
122
|
+
`Agent Starter Template ${file.template.id}`,
|
|
123
|
+
` name ${file.template.name}`,
|
|
124
|
+
` origin ${formatAgentRecordSource(file.template.source)}`,
|
|
125
|
+
` description ${file.template.description}`,
|
|
126
|
+
` persona ${file.template.persona.name}`,
|
|
127
|
+
` skills ${file.template.skills.map((skill) => skill.name).join(', ')}`,
|
|
128
|
+
` routines ${file.template.routines.map((routine) => routine.name).join(', ')}`,
|
|
128
129
|
'',
|
|
129
130
|
'Export/edit/import to customize this starter:',
|
|
130
131
|
` /agent-profile template export ${file.template.id} ./agent-starter.json --yes`,
|
|
@@ -184,9 +185,9 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
184
185
|
const selected = setAgentRuntimeProfileSelection(homeDirectory, target);
|
|
185
186
|
ctx.print([
|
|
186
187
|
`Default Agent profile selected: ${selected.id}`,
|
|
187
|
-
` home
|
|
188
|
+
` home ${selected.homeDirectory}`,
|
|
188
189
|
' next launch: goodvibes-agent',
|
|
189
|
-
' explicit override
|
|
190
|
+
' explicit override goodvibes-agent --agent-profile <name>',
|
|
190
191
|
].join('\n'));
|
|
191
192
|
return;
|
|
192
193
|
}
|
|
@@ -194,7 +195,7 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
194
195
|
ctx.print(selected
|
|
195
196
|
? [
|
|
196
197
|
`Default Agent profile: ${selected.id}${selected.exists ? '' : ' (missing)'}`,
|
|
197
|
-
` home
|
|
198
|
+
` home ${selected.homeDirectory}`,
|
|
198
199
|
' next launch: goodvibes-agent',
|
|
199
200
|
].join('\n')
|
|
200
201
|
: 'No default Agent profile selected. Next launch uses the base Agent home.');
|
|
@@ -214,9 +215,9 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
214
215
|
const selected = setAgentRuntimeProfileSelection(homeDirectory, name);
|
|
215
216
|
ctx.print([
|
|
216
217
|
`Default Agent profile selected: ${selected.id}`,
|
|
217
|
-
` home
|
|
218
|
+
` home ${selected.homeDirectory}`,
|
|
218
219
|
' next launch: goodvibes-agent',
|
|
219
|
-
' explicit override
|
|
220
|
+
' explicit override goodvibes-agent --agent-profile <name>',
|
|
220
221
|
].join('\n'));
|
|
221
222
|
return;
|
|
222
223
|
}
|
|
@@ -251,7 +252,7 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
251
252
|
const targetPath = shellPaths.resolveWorkspacePath(pathArg);
|
|
252
253
|
mkdirSync(dirname(targetPath), { recursive: true });
|
|
253
254
|
const template = exportAgentRuntimeProfileTemplate(homeDirectory, templateId, targetPath);
|
|
254
|
-
ctx.print(`Agent starter template exported: ${template.id}\n path
|
|
255
|
+
ctx.print(`Agent starter template exported: ${template.id}\n path ${template.path ?? targetPath}\n edit it, then import it with /agent-profile template import <path> --yes`);
|
|
255
256
|
return;
|
|
256
257
|
}
|
|
257
258
|
if (mode === 'import') {
|
|
@@ -266,7 +267,7 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
266
267
|
}
|
|
267
268
|
const sourcePath = shellPaths.resolveWorkspacePath(pathArg);
|
|
268
269
|
const template = importAgentRuntimeProfileTemplate(homeDirectory, sourcePath);
|
|
269
|
-
ctx.print(`Agent starter template imported: ${template.id}\n
|
|
270
|
+
ctx.print(`Agent starter template imported: ${template.id}\n origin ${formatAgentRecordSource(template.source).toLowerCase()}\n use /agent-profile create <name> --template ${template.id} --yes`);
|
|
270
271
|
return;
|
|
271
272
|
}
|
|
272
273
|
if (mode === 'from-discovered' || mode === 'import-discovered') {
|
|
@@ -290,10 +291,10 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
290
291
|
});
|
|
291
292
|
ctx.print([
|
|
292
293
|
`Agent starter template created from discovered behavior: ${template.id}`,
|
|
293
|
-
` persona
|
|
294
|
-
` skills
|
|
295
|
-
` routines
|
|
296
|
-
` use
|
|
294
|
+
` persona ${template.personaName}`,
|
|
295
|
+
` skills ${template.skillNames.join(', ')}`,
|
|
296
|
+
` routines ${template.routineNames.join(', ')}`,
|
|
297
|
+
` use /agent-profile create <name> --template ${template.id} --yes`,
|
|
297
298
|
].join('\n'));
|
|
298
299
|
return;
|
|
299
300
|
}
|
|
@@ -315,9 +316,9 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
315
316
|
const profile = createAgentRuntimeProfile(homeDirectory, name, { templateId });
|
|
316
317
|
ctx.print([
|
|
317
318
|
`Agent profile created: ${profile.id}`,
|
|
318
|
-
` home
|
|
319
|
+
` home ${profile.homeDirectory}`,
|
|
319
320
|
profile.starterTemplateId ? ` starter: ${profile.starterTemplateId}` : '',
|
|
320
|
-
` launch
|
|
321
|
+
` launch goodvibes-agent --agent-profile ${profile.id}`,
|
|
321
322
|
].filter(Boolean).join('\n'));
|
|
322
323
|
return;
|
|
323
324
|
}
|
|
@@ -344,12 +345,12 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
344
345
|
});
|
|
345
346
|
ctx.print([
|
|
346
347
|
`Agent profile created from discovered behavior: ${created.profile.id}`,
|
|
347
|
-
` home
|
|
348
|
+
` home ${created.profile.homeDirectory}`,
|
|
348
349
|
` starter: ${created.template.id}`,
|
|
349
|
-
` persona
|
|
350
|
-
` skills
|
|
351
|
-
` routines
|
|
352
|
-
` launch
|
|
350
|
+
` persona ${created.template.personaName}`,
|
|
351
|
+
` skills ${created.template.skillNames.join(', ')}`,
|
|
352
|
+
` routines ${created.template.routineNames.join(', ')}`,
|
|
353
|
+
` launch goodvibes-agent --agent-profile ${created.profile.id}`,
|
|
353
354
|
].join('\n'));
|
|
354
355
|
return;
|
|
355
356
|
}
|
|
@@ -364,13 +365,16 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
364
365
|
requireYesFlag(ctx, `delete Agent profile ${name}`, '/agent-profile delete <name> --yes');
|
|
365
366
|
return;
|
|
366
367
|
}
|
|
367
|
-
ctx.print(deleteAgentRuntimeProfile(homeDirectory, name) ? `Agent profile deleted: ${name}` : `Agent profile not found
|
|
368
|
+
ctx.print(deleteAgentRuntimeProfile(homeDirectory, name) ? `Agent profile deleted: ${name}` : `Agent profile not found ${name}`);
|
|
368
369
|
return;
|
|
369
370
|
}
|
|
370
371
|
|
|
371
372
|
ctx.print('Usage: /agent-profile [list|show <name>|default [<name>|clear] --yes|use <name> --yes|templates|guide|template show <id>|template export <id> <path> --yes|template import <path> --yes|create <name> [--template <id>] --yes|create-from-discovered <name> --yes|delete <name> --yes]');
|
|
372
373
|
} catch (error) {
|
|
373
|
-
ctx.print(
|
|
374
|
+
ctx.print([
|
|
375
|
+
'Error',
|
|
376
|
+
` message ${error instanceof Error ? error.message : String(error)}`,
|
|
377
|
+
].join('\n'));
|
|
374
378
|
}
|
|
375
379
|
},
|
|
376
380
|
});
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
type AgentSkillRecord,
|
|
9
9
|
} from '../../agent/skill-registry.ts';
|
|
10
10
|
import { discoverSkills, type SkillRecord } from '../../agent/skill-discovery.ts';
|
|
11
|
+
import { formatAgentRecordOrigin, formatAgentRecordReviewState } from '../../agent/record-labels.ts';
|
|
11
12
|
import type { CommandContext, CommandRegistry } from '../command-registry.ts';
|
|
12
13
|
import { requireShellPaths } from './runtime-services.ts';
|
|
13
14
|
|
|
@@ -58,23 +59,34 @@ function requiredFlag(flags: ReadonlyMap<string, string>, key: string): string {
|
|
|
58
59
|
return value;
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
function formatSkillReceipt(title: string, record: { readonly id: string; readonly name: string }, extra: readonly string[] = []): string {
|
|
63
|
+
return [
|
|
64
|
+
`${title} ${record.id}`,
|
|
65
|
+
` id ${record.id}`,
|
|
66
|
+
` name ${record.name}`,
|
|
67
|
+
...extra,
|
|
68
|
+
].join('\n');
|
|
69
|
+
}
|
|
70
|
+
|
|
61
71
|
function summarizeSkill(skill: AgentSkillRecord): string {
|
|
62
72
|
const enabled = skill.enabled ? 'enabled' : 'disabled';
|
|
63
|
-
const tags = skill.tags.length > 0 ? ` tags
|
|
73
|
+
const tags = skill.tags.length > 0 ? ` tags ${skill.tags.join(', ')}` : '';
|
|
64
74
|
const readiness = evaluateAgentSkillReadiness(skill);
|
|
75
|
+
const review = formatAgentRecordReviewState(skill.reviewState);
|
|
65
76
|
const ready = readiness.ready ? 'ready' : `needs ${readiness.missing.map(formatAgentSkillRequirement).join(',')}`;
|
|
66
|
-
return ` ${skill.id} ${enabled} ${
|
|
77
|
+
return ` ${skill.id} ${enabled} ${review} ${ready} ${skill.name} - ${skill.description}${tags}`;
|
|
67
78
|
}
|
|
68
79
|
|
|
69
80
|
function summarizeBundle(bundle: AgentSkillBundleRecord, skills: readonly AgentSkillRecord[]): string {
|
|
70
81
|
const enabled = bundle.enabled ? 'enabled' : 'disabled';
|
|
71
82
|
const readiness = evaluateAgentSkillBundleReadiness(bundle, skills);
|
|
83
|
+
const review = formatAgentRecordReviewState(bundle.reviewState);
|
|
72
84
|
const missing = [
|
|
73
85
|
...readiness.missingRequirements.map(formatAgentSkillRequirement),
|
|
74
|
-
...readiness.missingSkillIds.map((skillId) => `skill
|
|
86
|
+
...readiness.missingSkillIds.map((skillId) => `skill ${skillId}`),
|
|
75
87
|
];
|
|
76
88
|
const ready = readiness.ready ? 'ready' : `needs ${missing.join(',')}`;
|
|
77
|
-
return ` ${bundle.id} ${enabled} ${
|
|
89
|
+
return ` ${bundle.id} ${enabled} ${review} ${ready} ${bundle.name} - ${bundle.description} skills ${bundle.skillIds.join(', ')}`;
|
|
78
90
|
}
|
|
79
91
|
|
|
80
92
|
function renderList(title: string, registry: AgentSkillRegistry, skills: readonly AgentSkillRecord[], emptyMessage?: string): string {
|
|
@@ -82,21 +94,21 @@ function renderList(title: string, registry: AgentSkillRegistry, skills: readonl
|
|
|
82
94
|
if (skills.length === 0) {
|
|
83
95
|
return emptyMessage
|
|
84
96
|
? `${title}\n ${emptyMessage}`
|
|
85
|
-
: `${title}\n No local
|
|
97
|
+
: `${title}\n No Agent-local skills yet. Create one with /skills create --name <name> --description <summary> --procedure <steps>.`;
|
|
86
98
|
}
|
|
87
99
|
return [
|
|
88
100
|
`${title} (${skills.length})`,
|
|
89
|
-
` store
|
|
90
|
-
` enabled
|
|
101
|
+
` store ${snapshot.path}`,
|
|
102
|
+
` enabled ${snapshot.enabledSkills.length}`,
|
|
91
103
|
...skills.map(summarizeSkill),
|
|
92
104
|
].join('\n');
|
|
93
105
|
}
|
|
94
106
|
|
|
95
107
|
function summarizeDiscoveredSkill(skill: SkillRecord): string {
|
|
96
108
|
const description = skill.description ? ` - ${skill.description}` : '';
|
|
97
|
-
const dependencies = skill.dependencies.length > 0 ? ` deps
|
|
98
|
-
const includes = skill.includes.length > 0 ? ` includes
|
|
99
|
-
return ` ${skill.name} ${skill.origin}${description}${dependencies}${includes}\n path
|
|
109
|
+
const dependencies = skill.dependencies.length > 0 ? ` deps ${skill.dependencies.join(', ')}` : '';
|
|
110
|
+
const includes = skill.includes.length > 0 ? ` includes ${skill.includes.join(', ')}` : '';
|
|
111
|
+
return ` ${skill.name} ${skill.origin}${description}${dependencies}${includes}\n path ${skill.path}`;
|
|
100
112
|
}
|
|
101
113
|
|
|
102
114
|
function renderDiscoveredSkills(skills: readonly SkillRecord[]): string {
|
|
@@ -111,7 +123,7 @@ function renderDiscoveredSkills(skills: readonly SkillRecord[]): string {
|
|
|
111
123
|
`Discovered Agent skill files (${skills.length})`,
|
|
112
124
|
...skills.map(summarizeDiscoveredSkill),
|
|
113
125
|
'',
|
|
114
|
-
'Import one with: /
|
|
126
|
+
'Import one with: /skills import-discovered <name> --yes',
|
|
115
127
|
].join('\n');
|
|
116
128
|
}
|
|
117
129
|
|
|
@@ -150,23 +162,23 @@ async function importDiscoveredSkill(args: readonly string[], ctx: CommandContex
|
|
|
150
162
|
const parsed = parseSkillArgs(args);
|
|
151
163
|
const name = parsed.rest.join(' ').trim();
|
|
152
164
|
if (!name) {
|
|
153
|
-
ctx.print('Usage: /
|
|
165
|
+
ctx.print('Usage: /skills import-discovered <name> [--enabled] --yes');
|
|
154
166
|
return;
|
|
155
167
|
}
|
|
156
168
|
const discovered = findDiscoveredSkill(await discoverSkills(requireShellPaths(ctx)), name);
|
|
157
169
|
if (!discovered) {
|
|
158
|
-
ctx.print(`Unknown discovered Agent skill
|
|
170
|
+
ctx.print(`Unknown discovered Agent skill ${name}\nRun /skills discover to inspect available skill files.`);
|
|
159
171
|
return;
|
|
160
172
|
}
|
|
161
173
|
if (!parsed.yes) {
|
|
162
174
|
ctx.print([
|
|
163
175
|
'Agent skill import preview',
|
|
164
|
-
` name
|
|
165
|
-
` origin
|
|
166
|
-
` path
|
|
167
|
-
` description
|
|
168
|
-
` procedure characters
|
|
169
|
-
' next
|
|
176
|
+
` name ${discovered.name}`,
|
|
177
|
+
` origin ${discovered.origin}`,
|
|
178
|
+
` path ${discovered.path}`,
|
|
179
|
+
` description ${discovered.description || '(none)'}`,
|
|
180
|
+
` procedure characters ${discovered.body.length}`,
|
|
181
|
+
' next rerun with --yes to import into the Agent-local skill registry',
|
|
170
182
|
].join('\n'));
|
|
171
183
|
return;
|
|
172
184
|
}
|
|
@@ -182,9 +194,9 @@ async function importDiscoveredSkill(args: readonly string[], ctx: CommandContex
|
|
|
182
194
|
}),
|
|
183
195
|
enabled: parsed.flags.get('enabled') === 'true',
|
|
184
196
|
source: 'imported',
|
|
185
|
-
provenance: `
|
|
197
|
+
provenance: `Imported file (${discovered.origin}): ${discovered.path}`,
|
|
186
198
|
});
|
|
187
|
-
ctx.print(
|
|
199
|
+
ctx.print(formatSkillReceipt('Imported Agent skill', skill, [` enabled ${skill.enabled ? 'yes' : 'no'}`]));
|
|
188
200
|
}
|
|
189
201
|
|
|
190
202
|
function renderBundleList(title: string, registry: AgentSkillRegistry, bundles: readonly AgentSkillBundleRecord[], emptyMessage?: string): string {
|
|
@@ -192,11 +204,11 @@ function renderBundleList(title: string, registry: AgentSkillRegistry, bundles:
|
|
|
192
204
|
if (bundles.length === 0) {
|
|
193
205
|
return emptyMessage
|
|
194
206
|
? `${title}\n ${emptyMessage}`
|
|
195
|
-
: `${title}\n No local
|
|
207
|
+
: `${title}\n No Agent-local skill bundles yet. Create one with /skills bundle create --name <name> --description <summary> --skills <id,id>.`;
|
|
196
208
|
}
|
|
197
209
|
return [
|
|
198
210
|
`${title} (${bundles.length})`,
|
|
199
|
-
` store
|
|
211
|
+
` store ${snapshot.path}`,
|
|
200
212
|
` enabled bundles: ${snapshot.enabledBundles.length}`,
|
|
201
213
|
` active skills: ${snapshot.activeSkills.length}`,
|
|
202
214
|
...bundles.map((bundle) => summarizeBundle(bundle, snapshot.skills)),
|
|
@@ -207,14 +219,13 @@ function renderSkill(skill: AgentSkillRecord): string {
|
|
|
207
219
|
const readiness = evaluateAgentSkillReadiness(skill);
|
|
208
220
|
return [
|
|
209
221
|
`Skill ${skill.name}`,
|
|
210
|
-
` id
|
|
222
|
+
` id ${skill.id}`,
|
|
211
223
|
` enabled: ${skill.enabled ? 'yes' : 'no'}`,
|
|
212
224
|
` readiness: ${readiness.ready ? 'ready' : 'needs setup'}`,
|
|
213
225
|
` requirements: ${skill.requirements.map(formatAgentSkillRequirement).join(', ') || '(none)'}`,
|
|
214
226
|
readiness.missing.length > 0 ? ` missing: ${readiness.missing.map(formatAgentSkillRequirement).join(', ')}` : '',
|
|
215
|
-
` review: ${skill.reviewState}`,
|
|
216
|
-
`
|
|
217
|
-
` provenance: ${skill.provenance}`,
|
|
227
|
+
` review: ${formatAgentRecordReviewState(skill.reviewState)}`,
|
|
228
|
+
` origin: ${formatAgentRecordOrigin(skill.source, skill.provenance)}`,
|
|
218
229
|
` tags: ${skill.tags.join(', ') || '(none)'}`,
|
|
219
230
|
` triggers: ${skill.triggers.join(', ') || '(manual)'}`,
|
|
220
231
|
` created: ${skill.createdAt}`,
|
|
@@ -234,17 +245,16 @@ function renderBundle(bundle: AgentSkillBundleRecord, registry: AgentSkillRegist
|
|
|
234
245
|
const readiness = evaluateAgentSkillBundleReadiness(bundle, registry.snapshot().skills);
|
|
235
246
|
const missing = [
|
|
236
247
|
...readiness.missingRequirements.map(formatAgentSkillRequirement),
|
|
237
|
-
...readiness.missingSkillIds.map((skillId) => `skill
|
|
248
|
+
...readiness.missingSkillIds.map((skillId) => `skill ${skillId}`),
|
|
238
249
|
];
|
|
239
250
|
return [
|
|
240
251
|
`Skill Bundle ${bundle.name}`,
|
|
241
|
-
` id
|
|
252
|
+
` id ${bundle.id}`,
|
|
242
253
|
` enabled: ${bundle.enabled ? 'yes' : 'no'}`,
|
|
243
254
|
` readiness: ${readiness.ready ? 'ready' : 'needs setup'}`,
|
|
244
255
|
missing.length > 0 ? ` missing: ${missing.join(', ')}` : '',
|
|
245
|
-
` review: ${bundle.reviewState}`,
|
|
246
|
-
`
|
|
247
|
-
` provenance: ${bundle.provenance}`,
|
|
256
|
+
` review: ${formatAgentRecordReviewState(bundle.reviewState)}`,
|
|
257
|
+
` origin: ${formatAgentRecordOrigin(bundle.source, bundle.provenance)}`,
|
|
248
258
|
` skills: ${bundle.skillIds.join(', ')}`,
|
|
249
259
|
` created: ${bundle.createdAt}`,
|
|
250
260
|
` updated: ${bundle.updatedAt}`,
|
|
@@ -257,7 +267,10 @@ function renderBundle(bundle: AgentSkillBundleRecord, registry: AgentSkillRegist
|
|
|
257
267
|
}
|
|
258
268
|
|
|
259
269
|
function printError(ctx: CommandContext, error: unknown): void {
|
|
260
|
-
ctx.print(
|
|
270
|
+
ctx.print([
|
|
271
|
+
'Error',
|
|
272
|
+
` message ${error instanceof Error ? error.message : String(error)}`,
|
|
273
|
+
].join('\n'));
|
|
261
274
|
}
|
|
262
275
|
|
|
263
276
|
function runBundleCommand(args: readonly string[], ctx: CommandContext, skillRegistry: AgentSkillRegistry): void {
|
|
@@ -274,7 +287,7 @@ function runBundleCommand(args: readonly string[], ctx: CommandContext, skillReg
|
|
|
274
287
|
if (sub === 'attention' || sub === 'needs-setup') {
|
|
275
288
|
const snapshot = skillRegistry.snapshot();
|
|
276
289
|
const bundles = snapshot.bundles.filter((bundle) => !evaluateAgentSkillBundleReadiness(bundle, snapshot.skills).ready);
|
|
277
|
-
ctx.print(renderBundleList('Agent Skill Bundles needing setup', skillRegistry, bundles, 'No local
|
|
290
|
+
ctx.print(renderBundleList('Agent Skill Bundles needing setup', skillRegistry, bundles, 'No Agent-local skill bundles need setup.'));
|
|
278
291
|
return;
|
|
279
292
|
}
|
|
280
293
|
if (sub === 'search') {
|
|
@@ -285,11 +298,11 @@ function runBundleCommand(args: readonly string[], ctx: CommandContext, skillReg
|
|
|
285
298
|
if (sub === 'show') {
|
|
286
299
|
const id = args[1];
|
|
287
300
|
if (!id) {
|
|
288
|
-
ctx.print('Usage: /
|
|
301
|
+
ctx.print('Usage: /skills bundle show <id>');
|
|
289
302
|
return;
|
|
290
303
|
}
|
|
291
304
|
const bundle = skillRegistry.getBundle(id);
|
|
292
|
-
ctx.print(bundle ? renderBundle(bundle, skillRegistry) : `Unknown Agent skill bundle
|
|
305
|
+
ctx.print(bundle ? renderBundle(bundle, skillRegistry) : `Unknown Agent skill bundle ${id}`);
|
|
293
306
|
return;
|
|
294
307
|
}
|
|
295
308
|
if (sub === 'create') {
|
|
@@ -300,15 +313,15 @@ function runBundleCommand(args: readonly string[], ctx: CommandContext, skillReg
|
|
|
300
313
|
skillIds: splitList(requiredFlag(parsed.flags, 'skills')),
|
|
301
314
|
enabled: parsed.flags.get('enabled') === 'true',
|
|
302
315
|
source: 'user',
|
|
303
|
-
provenance: '
|
|
316
|
+
provenance: 'Command',
|
|
304
317
|
});
|
|
305
|
-
ctx.print(
|
|
318
|
+
ctx.print(formatSkillReceipt('Created Agent skill bundle', bundle));
|
|
306
319
|
return;
|
|
307
320
|
}
|
|
308
321
|
if (sub === 'update') {
|
|
309
322
|
const id = args[1];
|
|
310
323
|
if (!id) {
|
|
311
|
-
ctx.print('Usage: /
|
|
324
|
+
ctx.print('Usage: /skills bundle update <id> [--name ...] [--description ...] [--skills id,id]');
|
|
312
325
|
return;
|
|
313
326
|
}
|
|
314
327
|
const parsed = parseSkillArgs(args.slice(2));
|
|
@@ -316,46 +329,46 @@ function runBundleCommand(args: readonly string[], ctx: CommandContext, skillReg
|
|
|
316
329
|
name: parsed.flags.get('name'),
|
|
317
330
|
description: parsed.flags.get('description'),
|
|
318
331
|
skillIds: parsed.flags.has('skills') ? splitList(parsed.flags.get('skills')) : undefined,
|
|
319
|
-
provenance: '
|
|
332
|
+
provenance: 'Command',
|
|
320
333
|
});
|
|
321
|
-
ctx.print(
|
|
334
|
+
ctx.print(formatSkillReceipt('Updated Agent skill bundle', updated));
|
|
322
335
|
return;
|
|
323
336
|
}
|
|
324
337
|
if (sub === 'enable' || sub === 'disable') {
|
|
325
338
|
const id = args[1];
|
|
326
339
|
if (!id) {
|
|
327
|
-
ctx.print(`Usage: /
|
|
340
|
+
ctx.print(`Usage: /skills bundle ${sub} <id>`);
|
|
328
341
|
return;
|
|
329
342
|
}
|
|
330
343
|
const bundle = skillRegistry.setBundleEnabled(id, sub === 'enable');
|
|
331
|
-
ctx.print(`${sub === 'enable' ? 'Enabled' : 'Disabled'} Agent skill bundle
|
|
344
|
+
ctx.print(formatSkillReceipt(`${sub === 'enable' ? 'Enabled' : 'Disabled'} Agent skill bundle`, bundle));
|
|
332
345
|
return;
|
|
333
346
|
}
|
|
334
347
|
if (sub === 'review') {
|
|
335
348
|
const id = args[1];
|
|
336
349
|
if (!id) {
|
|
337
|
-
ctx.print('Usage: /
|
|
350
|
+
ctx.print('Usage: /skills bundle review <id>');
|
|
338
351
|
return;
|
|
339
352
|
}
|
|
340
353
|
const bundle = skillRegistry.markBundleReviewed(id);
|
|
341
|
-
ctx.print(
|
|
354
|
+
ctx.print(formatSkillReceipt('Reviewed Agent skill bundle', bundle));
|
|
342
355
|
return;
|
|
343
356
|
}
|
|
344
357
|
if (sub === 'stale') {
|
|
345
358
|
const id = args[1];
|
|
346
359
|
if (!id) {
|
|
347
|
-
ctx.print('Usage: /
|
|
360
|
+
ctx.print('Usage: /skills bundle stale <id> <reason...>');
|
|
348
361
|
return;
|
|
349
362
|
}
|
|
350
363
|
const bundle = skillRegistry.markBundleStale(id, args.slice(2).join(' '));
|
|
351
|
-
ctx.print(
|
|
364
|
+
ctx.print(formatSkillReceipt('Marked Agent skill bundle stale', bundle));
|
|
352
365
|
return;
|
|
353
366
|
}
|
|
354
367
|
if (sub === 'delete' || sub === 'remove') {
|
|
355
368
|
const parsed = parseSkillArgs(args.slice(1));
|
|
356
369
|
const id = parsed.rest[0];
|
|
357
370
|
if (!id) {
|
|
358
|
-
ctx.print('Usage: /
|
|
371
|
+
ctx.print('Usage: /skills bundle delete <id> --yes');
|
|
359
372
|
return;
|
|
360
373
|
}
|
|
361
374
|
if (!parsed.yes) {
|
|
@@ -363,10 +376,10 @@ function runBundleCommand(args: readonly string[], ctx: CommandContext, skillReg
|
|
|
363
376
|
return;
|
|
364
377
|
}
|
|
365
378
|
const removed = skillRegistry.deleteBundle(id);
|
|
366
|
-
ctx.print(
|
|
379
|
+
ctx.print(formatSkillReceipt('Deleted Agent skill bundle', removed));
|
|
367
380
|
return;
|
|
368
381
|
}
|
|
369
|
-
ctx.print('Usage: /
|
|
382
|
+
ctx.print('Usage: /skills bundle [list|enabled|attention|search|show|create|update|enable|disable|review|stale|delete]');
|
|
370
383
|
}
|
|
371
384
|
|
|
372
385
|
export async function runAgentSkillsRuntimeCommand(args: readonly string[], ctx: CommandContext): Promise<void> {
|
|
@@ -400,7 +413,7 @@ export async function runAgentSkillsRuntimeCommand(args: readonly string[], ctx:
|
|
|
400
413
|
}
|
|
401
414
|
if (sub === 'attention' || sub === 'needs-setup') {
|
|
402
415
|
const skills = skillRegistry.list().filter((skill) => !evaluateAgentSkillReadiness(skill).ready);
|
|
403
|
-
ctx.print(renderList('Agent Skills needing setup', skillRegistry, skills, 'No local
|
|
416
|
+
ctx.print(renderList('Agent Skills needing setup', skillRegistry, skills, 'No Agent-local skills need setup.'));
|
|
404
417
|
return;
|
|
405
418
|
}
|
|
406
419
|
if (sub === 'search') {
|
|
@@ -411,11 +424,11 @@ export async function runAgentSkillsRuntimeCommand(args: readonly string[], ctx:
|
|
|
411
424
|
if (sub === 'show') {
|
|
412
425
|
const id = args[1];
|
|
413
426
|
if (!id) {
|
|
414
|
-
ctx.print('Usage: /
|
|
427
|
+
ctx.print('Usage: /skills show <id>');
|
|
415
428
|
return;
|
|
416
429
|
}
|
|
417
430
|
const skill = skillRegistry.get(id);
|
|
418
|
-
ctx.print(skill ? renderSkill(skill) : `Unknown Agent skill
|
|
431
|
+
ctx.print(skill ? renderSkill(skill) : `Unknown Agent skill ${id}`);
|
|
419
432
|
return;
|
|
420
433
|
}
|
|
421
434
|
if (sub === 'create') {
|
|
@@ -433,15 +446,15 @@ export async function runAgentSkillsRuntimeCommand(args: readonly string[], ctx:
|
|
|
433
446
|
}),
|
|
434
447
|
enabled: parsed.flags.get('enabled') === 'true',
|
|
435
448
|
source: 'user',
|
|
436
|
-
provenance: '
|
|
449
|
+
provenance: 'Command',
|
|
437
450
|
});
|
|
438
|
-
ctx.print(
|
|
451
|
+
ctx.print(formatSkillReceipt('Created Agent skill', skill));
|
|
439
452
|
return;
|
|
440
453
|
}
|
|
441
454
|
if (sub === 'update') {
|
|
442
455
|
const id = args[1];
|
|
443
456
|
if (!id) {
|
|
444
|
-
ctx.print('Usage: /
|
|
457
|
+
ctx.print('Usage: /skills update <id> [--name ...] [--description ...] [--procedure ...]');
|
|
445
458
|
return;
|
|
446
459
|
}
|
|
447
460
|
const parsed = parseSkillArgs(args.slice(2));
|
|
@@ -457,46 +470,46 @@ export async function runAgentSkillsRuntimeCommand(args: readonly string[], ctx:
|
|
|
457
470
|
commands: splitList(parsed.flags.get('requires-command') ?? parsed.flags.get('requires-commands')),
|
|
458
471
|
})
|
|
459
472
|
: undefined,
|
|
460
|
-
provenance: '
|
|
473
|
+
provenance: 'Command',
|
|
461
474
|
});
|
|
462
|
-
ctx.print(
|
|
475
|
+
ctx.print(formatSkillReceipt('Updated Agent skill', updated));
|
|
463
476
|
return;
|
|
464
477
|
}
|
|
465
478
|
if (sub === 'enable' || sub === 'disable') {
|
|
466
479
|
const id = args[1];
|
|
467
480
|
if (!id) {
|
|
468
|
-
ctx.print(`Usage: /
|
|
481
|
+
ctx.print(`Usage: /skills ${sub} <id>`);
|
|
469
482
|
return;
|
|
470
483
|
}
|
|
471
484
|
const skill = skillRegistry.setEnabled(id, sub === 'enable');
|
|
472
|
-
ctx.print(`${sub === 'enable' ? 'Enabled' : 'Disabled'} Agent skill
|
|
485
|
+
ctx.print(formatSkillReceipt(`${sub === 'enable' ? 'Enabled' : 'Disabled'} Agent skill`, skill));
|
|
473
486
|
return;
|
|
474
487
|
}
|
|
475
488
|
if (sub === 'review') {
|
|
476
489
|
const id = args[1];
|
|
477
490
|
if (!id) {
|
|
478
|
-
ctx.print('Usage: /
|
|
491
|
+
ctx.print('Usage: /skills review <id>');
|
|
479
492
|
return;
|
|
480
493
|
}
|
|
481
494
|
const skill = skillRegistry.markReviewed(id);
|
|
482
|
-
ctx.print(
|
|
495
|
+
ctx.print(formatSkillReceipt('Reviewed Agent skill', skill));
|
|
483
496
|
return;
|
|
484
497
|
}
|
|
485
498
|
if (sub === 'stale') {
|
|
486
499
|
const id = args[1];
|
|
487
500
|
if (!id) {
|
|
488
|
-
ctx.print('Usage: /
|
|
501
|
+
ctx.print('Usage: /skills stale <id> <reason...>');
|
|
489
502
|
return;
|
|
490
503
|
}
|
|
491
504
|
const skill = skillRegistry.markStale(id, args.slice(2).join(' '));
|
|
492
|
-
ctx.print(
|
|
505
|
+
ctx.print(formatSkillReceipt('Marked Agent skill stale', skill));
|
|
493
506
|
return;
|
|
494
507
|
}
|
|
495
508
|
if (sub === 'delete' || sub === 'remove') {
|
|
496
509
|
const parsed = parseSkillArgs(args.slice(1));
|
|
497
510
|
const id = parsed.rest[0];
|
|
498
511
|
if (!id) {
|
|
499
|
-
ctx.print('Usage: /
|
|
512
|
+
ctx.print('Usage: /skills delete <id> --yes');
|
|
500
513
|
return;
|
|
501
514
|
}
|
|
502
515
|
if (!parsed.yes) {
|
|
@@ -504,10 +517,10 @@ export async function runAgentSkillsRuntimeCommand(args: readonly string[], ctx:
|
|
|
504
517
|
return;
|
|
505
518
|
}
|
|
506
519
|
const removed = skillRegistry.deleteSkill(id);
|
|
507
|
-
ctx.print(
|
|
520
|
+
ctx.print(formatSkillReceipt('Deleted Agent skill', removed));
|
|
508
521
|
return;
|
|
509
522
|
}
|
|
510
|
-
ctx.print('Usage: /
|
|
523
|
+
ctx.print('Usage: /skills [list|enabled|attention|discover|import-discovered|search|show|create|update|enable|disable|review|stale|delete|bundle]');
|
|
511
524
|
} catch (error) {
|
|
512
525
|
printError(ctx, error);
|
|
513
526
|
}
|
|
@@ -515,9 +528,9 @@ export async function runAgentSkillsRuntimeCommand(args: readonly string[], ctx:
|
|
|
515
528
|
|
|
516
529
|
export function registerAgentSkillsRuntimeCommands(registry: CommandRegistry): void {
|
|
517
530
|
registry.register({
|
|
518
|
-
name: '
|
|
519
|
-
aliases: ['
|
|
520
|
-
description: 'Manage local
|
|
531
|
+
name: 'skills',
|
|
532
|
+
aliases: ['skill', 'agent-skills', 'askills', 'local-skills'],
|
|
533
|
+
description: 'Manage Agent-local skills',
|
|
521
534
|
usage: '[list|enabled|attention|discover|import-discovered <name> --yes|search <query>|show <id>|create --name <name> --description <summary> --procedure <steps> [--requires-env A,B] [--requires-command gh,jq]|update <id> [--name ...] [--description ...] [--procedure ...]|enable <id>|disable <id>|review <id>|stale <id> <reason...>|delete <id> --yes|bundle ...]',
|
|
522
535
|
handler: runAgentSkillsRuntimeCommand,
|
|
523
536
|
});
|