@pellux/goodvibes-agent 0.1.116 → 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 -663
- package/README.md +38 -52
- package/dist/package/main.js +37826 -35924
- package/docs/README.md +5 -4
- package/docs/{connected-services.md → connected-host.md} +18 -10
- package/docs/getting-started.md +41 -44
- package/docs/release-and-publishing.md +6 -4
- package/package.json +3 -3
- package/src/agent/behavior-discovery-summary.ts +1 -3
- 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 +3 -3
- package/src/agent/runtime-profile.ts +78 -0
- 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 +119 -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 +345 -92
- package/src/input/agent-workspace-basic-command-editors.ts +480 -7
- package/src/input/agent-workspace-categories.ts +175 -15
- 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 +23 -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 +24 -14
- 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 +50 -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 +120 -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 +89 -4
- 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 +81 -3
- package/src/input/onboarding/onboarding-wizard-steps.ts +14 -7
- 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 +26 -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 +5 -5
- package/src/runtime/onboarding/snapshot.ts +2 -2
- package/src/runtime/onboarding/types.ts +26 -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
|
@@ -81,11 +81,6 @@ export function registerSubscriptionRuntimeCommands(registry: CommandRegistry):
|
|
|
81
81
|
async handler(args, ctx) {
|
|
82
82
|
const parsed = stripYesFlag(args);
|
|
83
83
|
const commandArgs = [...parsed.rest];
|
|
84
|
-
const shellPaths = requireShellPaths(ctx);
|
|
85
|
-
if (args.length === 0 && ctx.openSubscriptionPanel) {
|
|
86
|
-
ctx.openSubscriptionPanel();
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
84
|
const sub = (commandArgs[0] ?? 'review').toLowerCase();
|
|
90
85
|
const manager = requireSubscriptionManager(ctx);
|
|
91
86
|
const services = requireServiceRegistry(ctx);
|
|
@@ -419,7 +414,7 @@ export function registerSubscriptionRuntimeCommands(registry: CommandRegistry):
|
|
|
419
414
|
ctx.print('Usage: /subscription bundle <export|inspect> <path>');
|
|
420
415
|
return;
|
|
421
416
|
}
|
|
422
|
-
const targetPath =
|
|
417
|
+
const targetPath = requireShellPaths(ctx).resolveWorkspacePath(pathArg);
|
|
423
418
|
if (mode === 'export') {
|
|
424
419
|
if (!parsed.yes) {
|
|
425
420
|
requireYesFlag(ctx, `export subscription bundle to ${pathArg}`, '/subscription bundle export <path> --yes');
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { CommandRegistry } from '../command-registry.ts';
|
|
2
|
+
import type { CliCommandRuntime } from '../../cli/management.ts';
|
|
3
|
+
import { handleBundleCommand } from '../../cli/bundle-command.ts';
|
|
4
|
+
import { parseGoodVibesCli } from '../../cli/parser.ts';
|
|
5
|
+
import { requireShellPaths } from './runtime-services.ts';
|
|
6
|
+
import { requireYesFlag, stripYesFlag } from './confirmation.ts';
|
|
7
|
+
|
|
8
|
+
function bundleUsageFor(subcommand: string | undefined): string {
|
|
9
|
+
if (subcommand === 'export') return '/bundle export [path] --yes';
|
|
10
|
+
if (subcommand === 'import') return '/bundle import <path> --yes';
|
|
11
|
+
if (subcommand === 'inspect') return '/bundle inspect <path>';
|
|
12
|
+
return '/bundle [export [path] --yes|inspect <path>|import <path> --yes]';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function bundleActionFor(subcommand: string): string | null {
|
|
16
|
+
if (subcommand === 'export') return 'export Agent support bundle';
|
|
17
|
+
if (subcommand === 'import') return 'import Agent support bundle';
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function registerSupportBundleRuntimeCommands(registry: CommandRegistry): void {
|
|
22
|
+
registry.register({
|
|
23
|
+
name: 'bundle',
|
|
24
|
+
description: 'Export, inspect, or import redacted Agent support bundles from the TUI',
|
|
25
|
+
usage: '[export [path] --yes|inspect <path>|import <path> --yes]',
|
|
26
|
+
argsHint: 'export|inspect|import',
|
|
27
|
+
async handler(args, ctx) {
|
|
28
|
+
const confirmation = stripYesFlag(args);
|
|
29
|
+
const cli = parseGoodVibesCli(['bundle', ...confirmation.rest], 'goodvibes-agent');
|
|
30
|
+
if (cli.errors.length > 0) {
|
|
31
|
+
ctx.print(cli.errors.join('\n'));
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const subcommand = cli.commandArgs[0] ?? 'inspect';
|
|
36
|
+
const guardedAction = bundleActionFor(subcommand);
|
|
37
|
+
if (guardedAction !== null && !confirmation.yes) {
|
|
38
|
+
requireYesFlag(ctx, guardedAction, bundleUsageFor(subcommand));
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const shellPaths = requireShellPaths(ctx);
|
|
43
|
+
const runtime: CliCommandRuntime = {
|
|
44
|
+
cli,
|
|
45
|
+
configManager: ctx.platform.configManager,
|
|
46
|
+
workingDirectory: shellPaths.workingDirectory,
|
|
47
|
+
homeDirectory: shellPaths.homeDirectory,
|
|
48
|
+
};
|
|
49
|
+
const result = await handleBundleCommand(runtime);
|
|
50
|
+
ctx.print(result.output);
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
@@ -16,7 +16,7 @@ const BLOCKED_TASK_MUTATIONS: ReadonlySet<string> = new Set([
|
|
|
16
16
|
function printTaskMutationBlocked(print: (text: string) => void, subcommand: string): void {
|
|
17
17
|
print([
|
|
18
18
|
`Task mutation "${subcommand}" is blocked in GoodVibes Agent.`,
|
|
19
|
-
' policy: connected-
|
|
19
|
+
' policy: connected-host tasks are read-only from the Agent TUI; normal work stays in the main conversation.',
|
|
20
20
|
' durable tasks: use /workplan for visible planning and task tracking.',
|
|
21
21
|
' build/fix/review: use /delegate <task> to hand explicit implementation work to GoodVibes TUI.',
|
|
22
22
|
' result: no local task state was changed.',
|
|
@@ -51,7 +51,7 @@ export function registerTasksRuntimeCommands(registry: CommandRegistry): void {
|
|
|
51
51
|
registry.register({
|
|
52
52
|
name: 'tasks',
|
|
53
53
|
aliases: ['task'],
|
|
54
|
-
description: 'Inspect connected-
|
|
54
|
+
description: 'Inspect connected-host tasks without starting or mutating local background work',
|
|
55
55
|
usage: '[list [status|kind] | show <taskId> | output <taskId>]',
|
|
56
56
|
handler(args, ctx) {
|
|
57
57
|
const subcommand = args[0]?.toLowerCase() ?? 'list';
|
package/src/input/commands.ts
CHANGED
|
@@ -36,6 +36,8 @@ import { registerAgentSkillsRuntimeCommands } from './commands/agent-skills-runt
|
|
|
36
36
|
import { registerRoutinesRuntimeCommands } from './commands/routines-runtime.ts';
|
|
37
37
|
import { registerChannelsRuntimeCommands } from './commands/channels-runtime.ts';
|
|
38
38
|
import { registerBriefRuntimeCommands } from './commands/brief-runtime.ts';
|
|
39
|
+
import { registerSupportBundleRuntimeCommands } from './commands/support-bundle-runtime.ts';
|
|
40
|
+
import { registerCompatRuntimeCommands } from './commands/compat-runtime.ts';
|
|
39
41
|
|
|
40
42
|
function registerAgentMemoryCommand(registry: CommandRegistry): void {
|
|
41
43
|
registry.register({
|
|
@@ -58,6 +60,8 @@ export function registerBuiltinCommands(registry: CommandRegistry): void {
|
|
|
58
60
|
registerShellCoreCommands(registry);
|
|
59
61
|
registerAgentWorkspaceRuntimeCommands(registry);
|
|
60
62
|
registerBriefRuntimeCommands(registry);
|
|
63
|
+
registerSupportBundleRuntimeCommands(registry);
|
|
64
|
+
registerCompatRuntimeCommands(registry);
|
|
61
65
|
registerAgentRuntimeProfileRuntimeCommands(registry);
|
|
62
66
|
registerPersonasRuntimeCommands(registry);
|
|
63
67
|
registerAgentSkillsRuntimeCommands(registry);
|
|
@@ -140,7 +140,6 @@ export interface FeedContextClosures {
|
|
|
140
140
|
handleBlockCopy: () => void;
|
|
141
141
|
handleBookmark: () => void;
|
|
142
142
|
handleBlockSave: () => void;
|
|
143
|
-
handleDiffApply: () => boolean;
|
|
144
143
|
handleUndo: () => void;
|
|
145
144
|
handleRedo: () => void;
|
|
146
145
|
handlePaste: () => void;
|
|
@@ -2,9 +2,7 @@ import { readFileSync, existsSync } from 'node:fs';
|
|
|
2
2
|
import { copyToClipboard, pasteFromClipboard, pasteImageFromClipboard } from '../utils/clipboard.ts';
|
|
3
3
|
import type { InfiniteBuffer } from '../core/history.ts';
|
|
4
4
|
import type { ConversationManager } from '../core/conversation';
|
|
5
|
-
import type { PermissionCategory } from '@pellux/goodvibes-sdk/platform/permissions';
|
|
6
5
|
import type { ContentPart } from '@pellux/goodvibes-sdk/platform/providers';
|
|
7
|
-
import type { CommandContext } from './command-registry.ts';
|
|
8
6
|
import type { BookmarkManager } from '@pellux/goodvibes-sdk/platform/bookmarks';
|
|
9
7
|
import { resolveAndValidatePath } from '@pellux/goodvibes-sdk/platform/utils';
|
|
10
8
|
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
@@ -337,29 +335,6 @@ export function handleBlockToggle(
|
|
|
337
335
|
}
|
|
338
336
|
}
|
|
339
337
|
|
|
340
|
-
export function handleDiffApply(
|
|
341
|
-
conversationManager: ConversationManager | null,
|
|
342
|
-
getScrollTop: () => number,
|
|
343
|
-
commandContext: CommandContext | undefined,
|
|
344
|
-
requestRender: () => void,
|
|
345
|
-
getCallId: () => string,
|
|
346
|
-
category: PermissionCategory,
|
|
347
|
-
): boolean {
|
|
348
|
-
void commandContext;
|
|
349
|
-
void getCallId;
|
|
350
|
-
void category;
|
|
351
|
-
if (!conversationManager) return false;
|
|
352
|
-
const lineIndex = getScrollTop();
|
|
353
|
-
const diff = conversationManager.getDiffAtLine(lineIndex);
|
|
354
|
-
if (!diff || !diff.filePath) return false;
|
|
355
|
-
conversationManager.log(
|
|
356
|
-
`[Diff apply blocked in GoodVibes Agent: ${diff.filePath}. Delegate build/fix work to GoodVibes TUI with /delegate <task>.]`,
|
|
357
|
-
{ fg: '#f59e0b' },
|
|
358
|
-
);
|
|
359
|
-
requestRender();
|
|
360
|
-
return true;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
338
|
export function handleCtrlC(
|
|
364
339
|
prompt: string,
|
|
365
340
|
saveUndoState: () => void,
|
|
@@ -141,7 +141,6 @@ export interface InputFeedContext {
|
|
|
141
141
|
readonly handleBlockCopy: () => void;
|
|
142
142
|
readonly handleBookmark: () => void;
|
|
143
143
|
readonly handleBlockSave: () => void;
|
|
144
|
-
readonly handleDiffApply: () => boolean;
|
|
145
144
|
readonly handleUndo: () => void;
|
|
146
145
|
readonly handleRedo: () => void;
|
|
147
146
|
readonly handlePaste: () => void;
|
|
@@ -272,7 +271,6 @@ export function feedInputTokens(context: InputFeedContext, tokens: readonly Inpu
|
|
|
272
271
|
handleBlockCopy: context.handleBlockCopy,
|
|
273
272
|
handleBookmark: context.handleBookmark,
|
|
274
273
|
handleBlockSave: context.handleBlockSave,
|
|
275
|
-
handleDiffApply: context.handleDiffApply,
|
|
276
274
|
handleUndo: context.handleUndo,
|
|
277
275
|
handleRedo: context.handleRedo,
|
|
278
276
|
handlePaste: context.handlePaste,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { buildProviderAccountSnapshot } from '@/runtime/index.ts';
|
|
2
2
|
import type { OnboardingWizardMode } from './onboarding/onboarding-wizard.ts';
|
|
3
|
-
import { collectOnboardingSnapshot
|
|
4
|
-
import { cleanupMarkerRegistry, expandPrompt, findMarkerAtPos, handleBlockCopy, handleBlockRerun, handleBlockSave, handleBlockToggle, handleBookmark, handleClipboardPaste, handleCopy, handleCtrlC,
|
|
3
|
+
import { collectOnboardingSnapshot } from '../runtime/onboarding/index.ts';
|
|
4
|
+
import { cleanupMarkerRegistry, expandPrompt, findMarkerAtPos, handleBlockCopy, handleBlockRerun, handleBlockSave, handleBlockToggle, handleBookmark, handleClipboardPaste, handleCopy, handleCtrlC, registerPaste } from './handler-content-actions.ts';
|
|
5
5
|
import { clearModalStack, handleEscape, modalOpened } from './handler-modal-stack.ts';
|
|
6
6
|
import { openOnboardingWizardState, type OpenOnboardingWizardOptions } from './handler-ui-state.ts';
|
|
7
7
|
import type { InputHandler } from './handler.ts';
|
|
@@ -11,19 +11,6 @@ export function openOnboardingWizardForHandler(
|
|
|
11
11
|
modeOrOptions: OnboardingWizardMode | OpenOnboardingWizardOptions = 'new',
|
|
12
12
|
): void {
|
|
13
13
|
const options = typeof modeOrOptions === 'string' ? { mode: modeOrOptions } : modeOrOptions;
|
|
14
|
-
const userMarker = readOnboardingCheckMarker(handler.uiServices.environment.shellPaths, 'user');
|
|
15
|
-
if (!userMarker.payload) {
|
|
16
|
-
try {
|
|
17
|
-
writeOnboardingCheckMarker(handler.uiServices.environment.shellPaths, {
|
|
18
|
-
scope: 'user',
|
|
19
|
-
source: 'wizard',
|
|
20
|
-
mode: options.mode ?? 'new',
|
|
21
|
-
});
|
|
22
|
-
} catch (error) {
|
|
23
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
24
|
-
handler.commandContext?.print?.(`Onboarding check marker could not be written: ${message}`);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
14
|
if (!handler.modalStack.includes('onboarding')) handler.modalOpened('onboarding');
|
|
28
15
|
handler.clearOnboardingModelPickerCancelState();
|
|
29
16
|
openOnboardingWizardState(handler.onboardingWizard, options);
|
|
@@ -152,7 +139,6 @@ export function executeBlockActionForHandler(handler: InputHandler, actionId: st
|
|
|
152
139
|
case 'copy': handler.handleBlockCopy(); break;
|
|
153
140
|
case 'bookmark': handler.handleBookmark(); break;
|
|
154
141
|
case 'toggle': handler.handleBlockToggle(); break;
|
|
155
|
-
case 'apply': handler.handleDiffApply(); break;
|
|
156
142
|
case 'rerun': handler.handleBlockRerun(); break;
|
|
157
143
|
}
|
|
158
144
|
}
|
|
@@ -172,21 +158,6 @@ export function handleBlockToggleForHandler(handler: InputHandler): void {
|
|
|
172
158
|
handleBlockToggle(handler.conversationManager, handler.getScrollTop, handler.requestRender);
|
|
173
159
|
}
|
|
174
160
|
|
|
175
|
-
/**
|
|
176
|
-
* handleDiffApply - Ctrl+A when a diff block is nearest: request approval and apply the diff.
|
|
177
|
-
* Returns true if a diff was found and applied (so caller can skip default Ctrl+A).
|
|
178
|
-
*/
|
|
179
|
-
export function handleDiffApplyForHandler(handler: InputHandler): boolean {
|
|
180
|
-
return handleDiffApply(
|
|
181
|
-
handler.conversationManager,
|
|
182
|
-
handler.getScrollTop,
|
|
183
|
-
handler.commandContext,
|
|
184
|
-
handler.requestRender,
|
|
185
|
-
() => `diff-apply-${Date.now()}`,
|
|
186
|
-
'write',
|
|
187
|
-
);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
161
|
/**
|
|
191
162
|
* Handle Ctrl+C:
|
|
192
163
|
* - If prompt has text: clear it
|
|
@@ -4,7 +4,7 @@ import { openExternalUrl } from '@pellux/goodvibes-sdk/platform/utils';
|
|
|
4
4
|
import { getProviderIdFromModel } from '../config/provider-model.ts';
|
|
5
5
|
import { buildProviderAccountSnapshot } from '@/runtime/index.ts';
|
|
6
6
|
import { OnboardingWizardController, type OnboardingWizardAction, type OnboardingWizardApplyFeedback } from './onboarding/onboarding-wizard.ts';
|
|
7
|
-
import { applyOnboardingRequest, collectOnboardingSnapshot, verifyOnboardingRequest } from '../runtime/onboarding/index.ts';
|
|
7
|
+
import { applyOnboardingRequest, collectOnboardingSnapshot, verifyOnboardingRequest, writeOnboardingCheckMarker } from '../runtime/onboarding/index.ts';
|
|
8
8
|
import type { OnboardingApplyRequest, OnboardingVerificationItem } from '../runtime/onboarding/index.ts';
|
|
9
9
|
import type { ModelPickerTarget } from './model-picker.ts';
|
|
10
10
|
import { captureOnboardingWizardSnapshot, restoreOnboardingWizardSnapshot } from './handler-ui-state.ts';
|
|
@@ -219,7 +219,7 @@ export async function handleOnboardingActionForHandler(handler: InputHandler, ac
|
|
|
219
219
|
showOnboardingApplyFeedbackForHandler(handler, {
|
|
220
220
|
severity: 'error',
|
|
221
221
|
title: 'Apply failed',
|
|
222
|
-
summary: 'The wizard could not persist these settings. No
|
|
222
|
+
summary: 'The wizard could not persist these settings. No connected-host restart was attempted.',
|
|
223
223
|
messages: [error instanceof Error ? error.message : String(error)],
|
|
224
224
|
});
|
|
225
225
|
return;
|
|
@@ -240,6 +240,16 @@ export async function handleOnboardingActionForHandler(handler: InputHandler, ac
|
|
|
240
240
|
|
|
241
241
|
handler.syncRuntimeFromOnboardingRequest(request);
|
|
242
242
|
handler.onboardingWizard.markApplied();
|
|
243
|
+
let markerWarning: string | null = null;
|
|
244
|
+
try {
|
|
245
|
+
writeOnboardingCheckMarker(handler.uiServices.environment.shellPaths, {
|
|
246
|
+
scope: 'user',
|
|
247
|
+
source: 'wizard',
|
|
248
|
+
mode: request.mode,
|
|
249
|
+
});
|
|
250
|
+
} catch (error) {
|
|
251
|
+
markerWarning = error instanceof Error ? error.message : String(error);
|
|
252
|
+
}
|
|
243
253
|
handler.onboardingWizard.close();
|
|
244
254
|
for (let index = handler.modalStack.length - 1; index >= 0; index -= 1) {
|
|
245
255
|
if (handler.modalStack[index] === 'onboarding') handler.modalStack.splice(index, 1);
|
|
@@ -250,7 +260,14 @@ export async function handleOnboardingActionForHandler(handler: InputHandler, ac
|
|
|
250
260
|
handler.indicatorFocused = returnFocus === 'indicator';
|
|
251
261
|
handler.modalReturnFocus = 'prompt';
|
|
252
262
|
}
|
|
253
|
-
|
|
263
|
+
const completionMessage = formatOnboardingApplyCompletionMessage(verificationItems);
|
|
264
|
+
handler.commandContext?.print?.(markerWarning
|
|
265
|
+
? `${completionMessage}\nSetup check marker could not be written: ${markerWarning}`
|
|
266
|
+
: completionMessage);
|
|
267
|
+
if (handler.commandContext) {
|
|
268
|
+
handler.openAgentWorkspace(handler.commandContext, 'setup');
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
254
271
|
handler.requestRender();
|
|
255
272
|
}
|
|
256
273
|
|
|
@@ -455,7 +472,7 @@ export async function handleOpenAiSubscriptionFinishForHandler(handler: InputHan
|
|
|
455
472
|
}
|
|
456
473
|
|
|
457
474
|
export function syncRuntimeFromOnboardingRequestForHandler(handler: InputHandler, request: ReturnType<OnboardingWizardController['buildApplyRequest']>): void {
|
|
458
|
-
const runtime = handler.commandContext?.session
|
|
475
|
+
const runtime = handler.commandContext?.session?.runtime;
|
|
459
476
|
if (!runtime) return;
|
|
460
477
|
|
|
461
478
|
for (const operation of request.operations) {
|
|
@@ -487,12 +504,12 @@ export function getOnboardingRuntimePostureForHandler(handler: InputHandler, req
|
|
|
487
504
|
export async function restartOnboardingExternalServicesIfNeededForHandler(handler: InputHandler, request: OnboardingApplyRequest): Promise<OnboardingVerificationItem[]> {
|
|
488
505
|
const externalServices = handler.uiServices.platform.externalServices;
|
|
489
506
|
const state = externalServices?.inspect();
|
|
490
|
-
const
|
|
507
|
+
const hostStatus = state?.daemonStatus?.reason ?? (state?.daemonRunning ? 'connected GoodVibes host appears active' : 'connected GoodVibes host is not verified from this shell');
|
|
491
508
|
return [{
|
|
492
|
-
id: 'runtime:external-
|
|
509
|
+
id: 'runtime:external-host-owned',
|
|
493
510
|
status: 'pass',
|
|
494
|
-
message: `GoodVibes Agent did not start, stop, restart, or reconfigure connected
|
|
495
|
-
target: '
|
|
511
|
+
message: `GoodVibes Agent did not start, stop, restart, or reconfigure the connected host. ${hostStatus}`,
|
|
512
|
+
target: 'host',
|
|
496
513
|
}];
|
|
497
514
|
}
|
|
498
515
|
|
|
@@ -500,11 +517,11 @@ export function verifyOnboardingRuntimePostureForHandler(handler: InputHandler,
|
|
|
500
517
|
const externalServices = handler.uiServices.platform.externalServices;
|
|
501
518
|
const externalState = externalServices?.inspect();
|
|
502
519
|
return [{
|
|
503
|
-
id: 'runtime:external-
|
|
520
|
+
id: 'runtime:external-host-owned',
|
|
504
521
|
status: 'pass',
|
|
505
522
|
message: externalState
|
|
506
|
-
? '
|
|
507
|
-
: '
|
|
508
|
-
target: '
|
|
523
|
+
? 'The connected GoodVibes host is managed outside Agent; Agent onboarding did not request shutdown, startup, restart, bind, or surface changes.'
|
|
524
|
+
: 'The connected GoodVibes host is managed outside Agent; no local host controller is required for Agent onboarding.',
|
|
525
|
+
target: 'host',
|
|
509
526
|
}];
|
|
510
527
|
}
|
|
@@ -37,7 +37,6 @@ export type GlobalShortcutRouteState = {
|
|
|
37
37
|
handleBlockCopy: () => void;
|
|
38
38
|
handleBookmark: () => void;
|
|
39
39
|
handleBlockSave: () => void;
|
|
40
|
-
handleDiffApply: () => boolean;
|
|
41
40
|
handleUndo: () => void;
|
|
42
41
|
handleRedo: () => void;
|
|
43
42
|
handlePaste: () => void;
|
|
@@ -154,8 +153,7 @@ export function handleGlobalShortcutToken(
|
|
|
154
153
|
return true;
|
|
155
154
|
}
|
|
156
155
|
|
|
157
|
-
case '
|
|
158
|
-
if (!state.commandMode && state.handleDiffApply()) return true;
|
|
156
|
+
case 'line-start': {
|
|
159
157
|
const info = state.getWrappedPromptInfo(state.contentWidth);
|
|
160
158
|
state.cursorPos = info.wrappedLines.length > 1 ? info.segments[info.cursorWrappedLine].rawStart : 0;
|
|
161
159
|
state.ensureInputCursorVisible();
|
package/src/input/handler.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node
|
|
|
2
2
|
import { dirname } from 'node:path';
|
|
3
3
|
import { InputTokenizer } from '@pellux/goodvibes-sdk/platform/core';
|
|
4
4
|
import { createOAuthLocalListener } from '@pellux/goodvibes-sdk/platform/config';
|
|
5
|
-
import { clearModalStackForHandler, cleanupMarkerRegistryForHandler, executeBlockActionForHandler, expandPromptForHandler, findMarkerAtPosForHandler, getImageAttachmentsForHandler, handleBlockCopyForHandler, handleBlockRerunForHandler, handleBlockSaveForHandler, handleBlockToggleForHandler, handleBookmarkForHandler, handleCopyForHandler, handleCtrlCForHandler,
|
|
5
|
+
import { clearModalStackForHandler, cleanupMarkerRegistryForHandler, executeBlockActionForHandler, expandPromptForHandler, findMarkerAtPosForHandler, getImageAttachmentsForHandler, handleBlockCopyForHandler, handleBlockRerunForHandler, handleBlockSaveForHandler, handleBlockToggleForHandler, handleBookmarkForHandler, handleCopyForHandler, handleCtrlCForHandler, handleEscapeForHandler, hydrateOnboardingWizardFromRuntimeForHandler, modalOpenedForHandler, openOnboardingWizardForHandler, registerPasteForHandler } from './handler-interactions.ts';
|
|
6
6
|
import { clearOnboardingModelPickerCancelStateForHandler, clearOnboardingPendingModelPickerTargetForHandler, completeOpenAiSubscriptionFromListenerForHandler, getOnboardingConfigValueForHandler, getOnboardingRuntimePostureForHandler, handleModelPickerCommitForHandler, handleOnboardingActionForHandler, handleOpenAiSubscriptionFinishForHandler, handleOpenAiSubscriptionStartForHandler, openModelPickerWithTargetForHandler, openProviderModelPickerWithTargetForHandler, refreshOnboardingHydrationForHandler, restartOnboardingExternalServicesIfNeededForHandler, restoreOnboardingModelPickerCancelStateForHandler, syncRuntimeFromOnboardingRequestForHandler, verifyOnboardingRuntimePostureForHandler, type OnboardingRuntimePosture } from './handler-onboarding.ts';
|
|
7
7
|
import { beginOpenAICodexLogin, exchangeOpenAICodexCode } from '@pellux/goodvibes-sdk/platform/config';
|
|
8
8
|
import { openExternalUrl } from '@pellux/goodvibes-sdk/platform/utils';
|
|
@@ -56,7 +56,6 @@ import {
|
|
|
56
56
|
handleClipboardPaste,
|
|
57
57
|
handleCopy,
|
|
58
58
|
handleCtrlC,
|
|
59
|
-
handleDiffApply,
|
|
60
59
|
mediaTypeFromExt,
|
|
61
60
|
registerPaste,
|
|
62
61
|
} from './handler-content-actions.ts';
|
|
@@ -302,7 +301,6 @@ export class InputHandler {
|
|
|
302
301
|
handleBlockCopy: () => this.handleBlockCopy(),
|
|
303
302
|
handleBookmark: () => this.handleBookmark(),
|
|
304
303
|
handleBlockSave: () => this.handleBlockSave(),
|
|
305
|
-
handleDiffApply: () => this.handleDiffApply(),
|
|
306
304
|
handleUndo: () => { this.handleUndo(); this.syncFeedContextMutableFields(); },
|
|
307
305
|
handleRedo: () => { this.handleRedo(); this.syncFeedContextMutableFields(); },
|
|
308
306
|
handlePaste: () => { this.handlePaste(); this.syncFeedContextMutableFields(); },
|
|
@@ -351,7 +349,7 @@ export class InputHandler {
|
|
|
351
349
|
this.autocomplete = new AutocompleteEngine(registry);
|
|
352
350
|
}
|
|
353
351
|
|
|
354
|
-
/** Wire in the conversation manager for block copy/
|
|
352
|
+
/** Wire in the conversation manager for block copy/collapse. */
|
|
355
353
|
public setConversationManager(cm: ConversationManager): void { this.conversationManager = cm; }
|
|
356
354
|
|
|
357
355
|
/**
|
|
@@ -393,7 +391,6 @@ export class InputHandler {
|
|
|
393
391
|
public executeBlockAction(actionId: string): void { executeBlockActionForHandler(this, actionId); }
|
|
394
392
|
public handleBlockRerun(): void { handleBlockRerunForHandler(this); }
|
|
395
393
|
public handleBlockToggle(): void { handleBlockToggleForHandler(this); }
|
|
396
|
-
public handleDiffApply(): boolean { return handleDiffApplyForHandler(this); }
|
|
397
394
|
public handleCtrlC(): void { handleCtrlCForHandler(this); }
|
|
398
395
|
public modalOpened(name: string): void { modalOpenedForHandler(this, name); }
|
|
399
396
|
public clearModalStack(): void { clearModalStackForHandler(this); }
|
|
@@ -411,11 +408,11 @@ export class InputHandler {
|
|
|
411
408
|
this.mcpWorkspace.open(context);
|
|
412
409
|
this.requestRender();
|
|
413
410
|
}
|
|
414
|
-
public openAgentWorkspace(context: CommandContext): void {
|
|
411
|
+
public openAgentWorkspace(context: CommandContext, categoryId?: string): void {
|
|
415
412
|
this.panelFocused = false;
|
|
416
413
|
this.indicatorFocused = false;
|
|
417
414
|
this.modalOpened('agentWorkspace');
|
|
418
|
-
this.agentWorkspace.open(context, (command) => this.dispatchAgentWorkspaceCommand(command, context));
|
|
415
|
+
this.agentWorkspace.open(context, (command) => this.dispatchAgentWorkspaceCommand(command, context), categoryId);
|
|
419
416
|
this.requestRender();
|
|
420
417
|
}
|
|
421
418
|
|
package/src/input/keybindings.ts
CHANGED
|
@@ -45,7 +45,7 @@ export type KeyAction =
|
|
|
45
45
|
| 'bookmark'
|
|
46
46
|
| 'block-save'
|
|
47
47
|
| 'delete-word'
|
|
48
|
-
| '
|
|
48
|
+
| 'line-start'
|
|
49
49
|
| 'next-error-line-end'
|
|
50
50
|
| 'kill-line'
|
|
51
51
|
| 'clear-prompt'
|
|
@@ -59,25 +59,25 @@ export const ACTION_DESCRIPTIONS: Record<KeyAction, string> = {
|
|
|
59
59
|
'copy-selection': 'Copy selected text to clipboard',
|
|
60
60
|
'clear-cancel': 'Clear input / cancel generation / exit (double)',
|
|
61
61
|
'screen-clear': 'Repaint the screen',
|
|
62
|
-
'panel-picker': 'Open
|
|
63
|
-
'panel-close': '
|
|
64
|
-
'panel-close-all': '
|
|
65
|
-
'panel-tab-next': '
|
|
66
|
-
'panel-tab-prev': '
|
|
62
|
+
'panel-picker': 'Open the Agent operator workspace',
|
|
63
|
+
'panel-close': 'Dismiss deferred panel focus',
|
|
64
|
+
'panel-close-all': 'Dismiss deferred workspace focus',
|
|
65
|
+
'panel-tab-next': 'Reserved for future Agent workspace tabs',
|
|
66
|
+
'panel-tab-prev': 'Reserved for future Agent workspace tabs',
|
|
67
67
|
'history-search': 'Reverse input history search',
|
|
68
68
|
'search': 'Toggle conversation search',
|
|
69
69
|
'block-copy': 'Copy nearest block to clipboard',
|
|
70
70
|
'bookmark': 'Bookmark / unbookmark nearest block',
|
|
71
71
|
'block-save': 'Block file save disabled; copy block or export conversation',
|
|
72
72
|
'delete-word': 'Delete word backward',
|
|
73
|
-
'
|
|
73
|
+
'line-start': 'Move to start of line',
|
|
74
74
|
'next-error-line-end': 'Navigate to next error / move to line end',
|
|
75
75
|
'kill-line': 'Kill to end of line',
|
|
76
76
|
'clear-prompt': 'Clear the prompt',
|
|
77
77
|
'undo': 'Undo last prompt edit',
|
|
78
78
|
'redo': 'Redo last undone edit',
|
|
79
79
|
'paste': 'Paste from clipboard (image priority)',
|
|
80
|
-
'replay-panel': '
|
|
80
|
+
'replay-panel': 'Reserved replay workspace shortcut',
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
/** Default key bindings for all actions. */
|
|
@@ -96,7 +96,7 @@ export const DEFAULT_KEYBINDINGS: Record<KeyAction, KeyCombo[]> = {
|
|
|
96
96
|
'bookmark': [{ key: 'b', ctrl: true }],
|
|
97
97
|
'block-save': [{ key: 's', ctrl: true }],
|
|
98
98
|
'delete-word': [{ key: 'w', ctrl: true }],
|
|
99
|
-
'
|
|
99
|
+
'line-start': [{ key: 'a', ctrl: true }],
|
|
100
100
|
'next-error-line-end': [{ key: 'e', ctrl: true }],
|
|
101
101
|
'kill-line': [{ key: 'k', ctrl: true }],
|
|
102
102
|
'clear-prompt': [{ key: 'u', ctrl: true }],
|