@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
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ServiceRegistry } from '@pellux/goodvibes-sdk/platform/config';
|
|
2
2
|
import { evaluateSessionMaintenance, formatSessionMaintenanceLines } from '@/runtime/index.ts';
|
|
3
3
|
import { estimateConversationTokens } from '@pellux/goodvibes-sdk/platform/core';
|
|
4
|
-
import type { CommandRegistry } from '../command-registry.ts';
|
|
4
|
+
import type { CommandContext, CommandRegistry } from '../command-registry.ts';
|
|
5
5
|
import { buildSetupReviewSnapshot } from './local-setup-review.ts';
|
|
6
|
-
import { buildProviderAccountSnapshot } from '
|
|
6
|
+
import { buildProviderAccountSnapshot } from '../../panels/provider-account-snapshot.ts';
|
|
7
7
|
import { getSettingsControlPlaneSnapshot } from '@/runtime/index.ts';
|
|
8
8
|
import { checkRecoveryFile, readLastSessionPointer } from '@/runtime/index.ts';
|
|
9
9
|
import {
|
|
10
|
-
|
|
10
|
+
requireProvider,
|
|
11
11
|
requireProviderApi,
|
|
12
12
|
requireReadModels,
|
|
13
13
|
requireSecretsManager,
|
|
@@ -16,6 +16,33 @@ import {
|
|
|
16
16
|
requireSessionMemoryStore,
|
|
17
17
|
} from './runtime-services.ts';
|
|
18
18
|
|
|
19
|
+
async function loadProviderAccountSnapshot(ctx: CommandContext) {
|
|
20
|
+
return await buildProviderAccountSnapshot({
|
|
21
|
+
providerModels: requireProvider(ctx).providerRegistry,
|
|
22
|
+
services: requireServiceRegistry(ctx),
|
|
23
|
+
subscriptions: requireSubscriptionManager(ctx),
|
|
24
|
+
environment: {
|
|
25
|
+
hasEnvironmentVariable: (name: string) => Boolean(process.env[name]),
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
type HealthReadModels = ReturnType<typeof requireReadModels>;
|
|
31
|
+
type HealthRemoteSnapshot = ReturnType<HealthReadModels['remote']['getSnapshot']>;
|
|
32
|
+
type HealthRemoteSession = HealthRemoteSnapshot['supervisor']['sessions'][number];
|
|
33
|
+
type HealthMcpSnapshot = ReturnType<HealthReadModels['mcp']['getSnapshot']>;
|
|
34
|
+
type HealthMcpServer = HealthMcpSnapshot['servers'][number];
|
|
35
|
+
type HealthStatusValue =
|
|
36
|
+
| HealthRemoteSession['transportState']
|
|
37
|
+
| HealthRemoteSession['heartbeat']['status']
|
|
38
|
+
| HealthMcpServer['status']
|
|
39
|
+
| HealthMcpServer['schemaFreshness'];
|
|
40
|
+
|
|
41
|
+
function formatHealthStatusValue(value: HealthStatusValue): string {
|
|
42
|
+
if (value === 'quarantined') return 'needs review';
|
|
43
|
+
return value.replace(/[_-]+/g, ' ');
|
|
44
|
+
}
|
|
45
|
+
|
|
19
46
|
export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
20
47
|
registry.register({
|
|
21
48
|
name: 'health',
|
|
@@ -26,26 +53,26 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
26
53
|
const sub = (args[0] ?? 'review').toLowerCase();
|
|
27
54
|
|
|
28
55
|
if (sub === 'open' || sub === 'panel') {
|
|
29
|
-
ctx.print('
|
|
56
|
+
ctx.print('Open Agent Workspace -> Home -> Review health for the workspace view, or run /health review for the compact command output.');
|
|
30
57
|
return;
|
|
31
58
|
}
|
|
32
59
|
|
|
33
60
|
if (sub === 'provider') {
|
|
34
61
|
const providerApi = requireProviderApi(ctx);
|
|
35
62
|
const currentModel = await providerApi.getCurrentModel().catch(() => null);
|
|
36
|
-
const accounts = await
|
|
63
|
+
const accounts = await loadProviderAccountSnapshot(ctx);
|
|
37
64
|
ctx.print([
|
|
38
|
-
'Health Review
|
|
39
|
-
` selected model
|
|
40
|
-
` providers
|
|
41
|
-
` configured accounts
|
|
42
|
-
` account issues
|
|
65
|
+
'Health Review Provider',
|
|
66
|
+
` selected model ${currentModel?.registryKey ?? 'unknown'}`,
|
|
67
|
+
` providers ${providerApi.listProviderIds().length}`,
|
|
68
|
+
` configured accounts ${accounts.configuredCount}`,
|
|
69
|
+
` account issues ${accounts.issueCount}`,
|
|
43
70
|
...(accounts.issueCount > 0
|
|
44
|
-
? accounts.providers.flatMap((provider) => provider.issues.map((issue) => ` ${provider.providerId}
|
|
71
|
+
? accounts.providers.flatMap((provider) => provider.issues.map((issue) => ` ${provider.providerId} ${issue}`))
|
|
45
72
|
: [' no provider account issues detected']),
|
|
46
|
-
' next
|
|
47
|
-
' next
|
|
48
|
-
' next
|
|
73
|
+
' next /model',
|
|
74
|
+
' next /provider',
|
|
75
|
+
' next /accounts review',
|
|
49
76
|
].join('\n'));
|
|
50
77
|
return;
|
|
51
78
|
}
|
|
@@ -61,32 +88,31 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
61
88
|
.filter((inspection): inspection is NonNullable<typeof inspection> => inspection !== null)
|
|
62
89
|
.flatMap((inspection) => {
|
|
63
90
|
const findings: string[] = [];
|
|
64
|
-
if (!inspection.hasPrimaryCredential) findings.push(`${inspection.config.name}
|
|
65
|
-
if (inspection.config.authType === 'basic' && !inspection.hasPasswordCredential) findings.push(`${inspection.config.name}
|
|
66
|
-
if (!inspection.config.baseUrl) findings.push(`${inspection.config.name}
|
|
91
|
+
if (!inspection.hasPrimaryCredential) findings.push(`${inspection.config.name} missing primary credential`);
|
|
92
|
+
if (inspection.config.authType === 'basic' && !inspection.hasPasswordCredential) findings.push(`${inspection.config.name} missing password credential`);
|
|
93
|
+
if (!inspection.config.baseUrl) findings.push(`${inspection.config.name} no baseUrl configured`);
|
|
67
94
|
return findings;
|
|
68
95
|
});
|
|
69
96
|
ctx.print([
|
|
70
|
-
'Health Review
|
|
71
|
-
` configured integrations
|
|
72
|
-
` issues
|
|
97
|
+
'Health Review Connected Host Integrations',
|
|
98
|
+
` configured integrations ${keys.length}`,
|
|
99
|
+
` issues ${issues.length}`,
|
|
73
100
|
...(issues.length > 0 ? issues.map((issue) => ` ${issue}`) : [' all configured host integrations passed readiness checks']),
|
|
74
101
|
].join('\n'));
|
|
75
102
|
return;
|
|
76
103
|
}
|
|
77
104
|
|
|
78
105
|
if (sub === 'accounts') {
|
|
79
|
-
const
|
|
80
|
-
const accounts = await operatorClient.providers.accountSnapshot();
|
|
106
|
+
const accounts = await loadProviderAccountSnapshot(ctx);
|
|
81
107
|
ctx.print([
|
|
82
|
-
'Health Review
|
|
83
|
-
` providers
|
|
84
|
-
` configured
|
|
85
|
-
` issues
|
|
108
|
+
'Health Review Accounts',
|
|
109
|
+
` providers ${accounts.providers.length}`,
|
|
110
|
+
` configured ${accounts.configuredCount}`,
|
|
111
|
+
` issues ${accounts.issueCount}`,
|
|
86
112
|
...accounts.providers.flatMap((provider) => {
|
|
87
113
|
const findings = [
|
|
88
|
-
...provider.issues.map((issue) => ` ${provider.providerId}
|
|
89
|
-
...(provider.fallbackRisk ? [` ${provider.providerId}
|
|
114
|
+
...provider.issues.map((issue) => ` ${provider.providerId} ${issue}`),
|
|
115
|
+
...(provider.fallbackRisk ? [` ${provider.providerId} ${provider.fallbackRisk}`] : []),
|
|
90
116
|
];
|
|
91
117
|
return findings;
|
|
92
118
|
}),
|
|
@@ -97,13 +123,13 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
97
123
|
if (sub === 'auth') {
|
|
98
124
|
const auth = readModels.localAuth.getSnapshot();
|
|
99
125
|
ctx.print([
|
|
100
|
-
'Health Review
|
|
101
|
-
' owner
|
|
102
|
-
` compatibility users visible
|
|
103
|
-
` compatibility sessions visible
|
|
104
|
-
` bootstrap file signal
|
|
105
|
-
' Agent action
|
|
106
|
-
...(auth.bootstrapCredentialPresent ? [' issue
|
|
126
|
+
'Health Review Connected Host Auth',
|
|
127
|
+
' owner connected GoodVibes host',
|
|
128
|
+
` compatibility users visible ${auth.userCount}`,
|
|
129
|
+
` compatibility sessions visible ${auth.sessionCount}`,
|
|
130
|
+
` bootstrap file signal ${auth.bootstrapCredentialPresent ? 'present' : 'cleared'}`,
|
|
131
|
+
' Agent action review provider/subscription auth only; do not mutate connected-host auth users or bootstrap credentials.',
|
|
132
|
+
...(auth.bootstrapCredentialPresent ? [' issue bootstrap cleanup belongs outside Agent'] : []),
|
|
107
133
|
].join('\n'));
|
|
108
134
|
return;
|
|
109
135
|
}
|
|
@@ -113,19 +139,19 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
113
139
|
const issues: string[] = [];
|
|
114
140
|
if (settings.conflictCount > 0) issues.push(`${settings.conflictCount} conflicting setting import(s) need review`);
|
|
115
141
|
if (settings.recentFailureCount > 0) issues.push(`${settings.recentFailureCount} recent sync/managed failure(s) recorded`);
|
|
116
|
-
if (settings.hasStagedManagedBundle) issues.push('
|
|
142
|
+
if (settings.hasStagedManagedBundle) issues.push('pending managed settings bundle is awaiting apply or rollback');
|
|
117
143
|
if (settings.managedLockCount > 0) issues.push(`${settings.managedLockCount} managed lock(s) currently enforced`);
|
|
118
144
|
ctx.print([
|
|
119
|
-
'Health Review
|
|
120
|
-
` available
|
|
121
|
-
` managed locks
|
|
122
|
-
` conflicts
|
|
123
|
-
` recent failures
|
|
124
|
-
`
|
|
125
|
-
...(issues.length > 0 ? issues.map((issue) => ` issue
|
|
126
|
-
' next
|
|
127
|
-
' next
|
|
128
|
-
' next
|
|
145
|
+
'Health Review Settings',
|
|
146
|
+
` available ${settings.available ? 'yes' : 'no'}`,
|
|
147
|
+
` managed locks ${settings.managedLockCount}`,
|
|
148
|
+
` conflicts ${settings.conflictCount}`,
|
|
149
|
+
` recent failures ${settings.recentFailureCount}`,
|
|
150
|
+
` pending managed bundle ${settings.hasStagedManagedBundle ? 'present' : 'none'}`,
|
|
151
|
+
...(issues.length > 0 ? issues.map((issue) => ` issue ${issue}`) : [' no active settings-control issues detected']),
|
|
152
|
+
' next /settings',
|
|
153
|
+
' next /config <key>',
|
|
154
|
+
' next /health repair settings',
|
|
129
155
|
].join('\n'));
|
|
130
156
|
return;
|
|
131
157
|
}
|
|
@@ -135,24 +161,24 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
135
161
|
const issues = snapshot.sessions.flatMap((session) => {
|
|
136
162
|
const lines: string[] = [];
|
|
137
163
|
if (session.transportState === 'degraded' || session.transportState === 'reconnecting' || session.transportState === 'terminal_failure') {
|
|
138
|
-
lines.push(`${session.runnerId}
|
|
164
|
+
lines.push(`${session.runnerId} transport ${formatHealthStatusValue(session.transportState)}`);
|
|
139
165
|
}
|
|
140
166
|
if (session.heartbeat.status !== 'fresh') {
|
|
141
|
-
lines.push(`${session.runnerId}
|
|
167
|
+
lines.push(`${session.runnerId} heartbeat ${formatHealthStatusValue(session.heartbeat.status)}`);
|
|
142
168
|
}
|
|
143
169
|
if (session.lastError) {
|
|
144
|
-
lines.push(`${session.runnerId}
|
|
170
|
+
lines.push(`${session.runnerId} ${session.lastError}`);
|
|
145
171
|
}
|
|
146
172
|
return lines;
|
|
147
173
|
});
|
|
148
174
|
ctx.print([
|
|
149
|
-
'Health Review
|
|
150
|
-
` sessions
|
|
151
|
-
` active connections
|
|
152
|
-
` degraded
|
|
153
|
-
...(issues.length > 0 ? issues.map((issue) => ` issue
|
|
154
|
-
' next
|
|
155
|
-
' next
|
|
175
|
+
'Health Review Remote',
|
|
176
|
+
` sessions ${snapshot.sessions.length}`,
|
|
177
|
+
` active connections ${snapshot.activeConnections}`,
|
|
178
|
+
` degraded ${snapshot.degradedConnections}`,
|
|
179
|
+
...(issues.length > 0 ? issues.map((issue) => ` issue ${issue}`) : [' no active remote recovery issues detected']),
|
|
180
|
+
' next /delegate <build/fix/review task> for explicit TUI build work',
|
|
181
|
+
' next repair remote build-host state outside Agent',
|
|
156
182
|
].join('\n'));
|
|
157
183
|
return;
|
|
158
184
|
}
|
|
@@ -162,27 +188,27 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
162
188
|
const issues = mcp.servers.flatMap((server) => {
|
|
163
189
|
const lines: string[] = [];
|
|
164
190
|
if (server.status !== 'connected' && server.status !== 'configured') {
|
|
165
|
-
lines.push(`${server.name}
|
|
191
|
+
lines.push(`${server.name} status ${formatHealthStatusValue(server.status)}`);
|
|
166
192
|
}
|
|
167
193
|
if (server.schemaFreshness !== 'fresh') {
|
|
168
|
-
lines.push(`${server.name}
|
|
194
|
+
lines.push(`${server.name} tool-definition review ${formatHealthStatusValue(server.schemaFreshness)}`);
|
|
169
195
|
}
|
|
170
196
|
if (server.lastError) {
|
|
171
|
-
lines.push(`${server.name}
|
|
197
|
+
lines.push(`${server.name} ${server.lastError}`);
|
|
172
198
|
}
|
|
173
199
|
return lines;
|
|
174
200
|
});
|
|
175
201
|
ctx.print([
|
|
176
|
-
'Health Review
|
|
177
|
-
` servers
|
|
178
|
-
` connected
|
|
179
|
-
` tools
|
|
180
|
-
` total calls
|
|
181
|
-
` total errors
|
|
182
|
-
...(issues.length > 0 ? issues.map((issue) => ` issue
|
|
183
|
-
' next
|
|
184
|
-
' next
|
|
185
|
-
' next
|
|
202
|
+
'Health Review MCP',
|
|
203
|
+
` servers ${mcp.servers.length}`,
|
|
204
|
+
` connected ${mcp.connectedServerNames.length}`,
|
|
205
|
+
` tools ${mcp.availableToolCount}`,
|
|
206
|
+
` total calls ${mcp.totalCalls}`,
|
|
207
|
+
` total errors ${mcp.totalErrors}`,
|
|
208
|
+
...(issues.length > 0 ? issues.map((issue) => ` issue ${issue}`) : [' no active MCP lifecycle issues detected']),
|
|
209
|
+
' next /mcp review',
|
|
210
|
+
' next /mcp auth-review',
|
|
211
|
+
' next /mcp repair',
|
|
186
212
|
].join('\n'));
|
|
187
213
|
return;
|
|
188
214
|
}
|
|
@@ -195,14 +221,14 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
195
221
|
if (continuity.recoveryFilePresent) issues.push(`recovery file present for ${continuity.sessionId || '(unknown session)'}`);
|
|
196
222
|
if (returnMode === 'off') issues.push('return-context summaries are disabled');
|
|
197
223
|
ctx.print([
|
|
198
|
-
'Health Review
|
|
199
|
-
` return context mode
|
|
200
|
-
` last session pointer
|
|
201
|
-
` recovery file
|
|
202
|
-
...(continuity.returnContext ? [` recovery activity
|
|
203
|
-
...(issues.length > 0 ? issues.map((issue) => ` issue
|
|
204
|
-
' next
|
|
205
|
-
' next
|
|
224
|
+
'Health Review Continuity',
|
|
225
|
+
` return context mode ${returnMode}`,
|
|
226
|
+
` last session pointer ${continuity.lastSessionPointer ?? 'none'}`,
|
|
227
|
+
` recovery file ${continuity.recoveryFilePresent ? 'present' : 'clear'}`,
|
|
228
|
+
...(continuity.returnContext ? [` recovery activity ${continuity.returnContext.activityLabel}`, ` recovery status ${continuity.returnContext.statusLabel}`] : []),
|
|
229
|
+
...(issues.length > 0 ? issues.map((issue) => ` issue ${issue}`) : [' no active session continuity issues detected']),
|
|
230
|
+
' next /session list',
|
|
231
|
+
' next /session hotspots',
|
|
206
232
|
].join('\n'));
|
|
207
233
|
return;
|
|
208
234
|
}
|
|
@@ -223,7 +249,7 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
223
249
|
session: session.session,
|
|
224
250
|
});
|
|
225
251
|
ctx.print([
|
|
226
|
-
'Health Review
|
|
252
|
+
'Health Review Maintenance',
|
|
227
253
|
...formatSessionMaintenanceLines(maintenance, 'guided'),
|
|
228
254
|
].join('\n'));
|
|
229
255
|
return;
|
|
@@ -234,58 +260,58 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
234
260
|
const lines = ['Health Repair'];
|
|
235
261
|
if (domain === 'settings') {
|
|
236
262
|
const settings = getSettingsControlPlaneSnapshot(ctx.platform.configManager);
|
|
237
|
-
lines.push(' domain
|
|
263
|
+
lines.push(' domain settings');
|
|
238
264
|
lines.push(...(
|
|
239
265
|
settings.conflicts.length > 0
|
|
240
266
|
? [' /settings', ' /config <key>', ' host-owned managed setting repair stays external']
|
|
241
267
|
: [' no active settings repair actions suggested']
|
|
242
268
|
));
|
|
243
|
-
lines.push(' verify
|
|
269
|
+
lines.push(' verify /health settings');
|
|
244
270
|
} else if (domain === 'auth') {
|
|
245
|
-
lines.push(' domain
|
|
271
|
+
lines.push(' domain auth');
|
|
246
272
|
lines.push(' /auth review');
|
|
247
273
|
lines.push(' /provider');
|
|
248
274
|
lines.push(' /subscription providers');
|
|
249
|
-
lines.push(' connected
|
|
250
|
-
lines.push(' verify
|
|
275
|
+
lines.push(' connected host auth users/bootstrap cleanup manage outside Agent');
|
|
276
|
+
lines.push(' verify /health auth');
|
|
251
277
|
} else if (domain === 'accounts') {
|
|
252
|
-
lines.push(' domain
|
|
278
|
+
lines.push(' domain accounts');
|
|
253
279
|
lines.push(' /accounts review');
|
|
254
280
|
lines.push(' /accounts routes <provider>');
|
|
255
281
|
lines.push(' /accounts repair <provider>');
|
|
256
282
|
lines.push(' /auth show <provider>');
|
|
257
|
-
lines.push(' verify
|
|
283
|
+
lines.push(' verify /health accounts');
|
|
258
284
|
} else if (domain === 'host' || domain === 'services') {
|
|
259
|
-
lines.push(' domain
|
|
285
|
+
lines.push(' domain host');
|
|
260
286
|
lines.push(' /health host');
|
|
261
287
|
lines.push(' connected host repair belongs outside Agent');
|
|
262
|
-
lines.push(' verify
|
|
288
|
+
lines.push(' verify /health host');
|
|
263
289
|
} else if (domain === 'remote') {
|
|
264
|
-
lines.push(' domain
|
|
290
|
+
lines.push(' domain remote');
|
|
265
291
|
lines.push(' /delegate <build/fix/review task> for explicit TUI build work');
|
|
266
|
-
lines.push(' remote
|
|
267
|
-
lines.push(' verify
|
|
292
|
+
lines.push(' remote build-host setup and recovery belong outside Agent');
|
|
293
|
+
lines.push(' verify /health remote');
|
|
268
294
|
} else if (domain === 'mcp') {
|
|
269
|
-
lines.push(' domain
|
|
295
|
+
lines.push(' domain mcp');
|
|
270
296
|
lines.push(' /mcp review');
|
|
271
297
|
lines.push(' /mcp auth-review');
|
|
272
298
|
lines.push(' /mcp repair [server]');
|
|
273
|
-
lines.push(' verify
|
|
299
|
+
lines.push(' verify /health mcp');
|
|
274
300
|
} else if (domain === 'continuity') {
|
|
275
|
-
lines.push(' domain
|
|
301
|
+
lines.push(' domain continuity');
|
|
276
302
|
lines.push(' /session list');
|
|
277
303
|
lines.push(' /session resume <id>');
|
|
278
304
|
lines.push(' /session hotspots');
|
|
279
|
-
lines.push(' verify
|
|
305
|
+
lines.push(' verify /health continuity');
|
|
280
306
|
} else if (domain === 'maintenance') {
|
|
281
|
-
lines.push(' domain
|
|
307
|
+
lines.push(' domain maintenance');
|
|
282
308
|
lines.push(' /health maintenance');
|
|
283
309
|
lines.push(' /mode');
|
|
284
310
|
lines.push(' /compact');
|
|
285
|
-
lines.push(' verify
|
|
311
|
+
lines.push(' verify /health maintenance');
|
|
286
312
|
} else {
|
|
287
|
-
lines.push(' domains
|
|
288
|
-
lines.push(' use
|
|
313
|
+
lines.push(' domains settings, auth, accounts, host, remote, mcp, continuity, maintenance');
|
|
314
|
+
lines.push(' use /health repair <domain>');
|
|
289
315
|
}
|
|
290
316
|
ctx.print(lines.join('\n'));
|
|
291
317
|
return;
|
|
@@ -308,15 +334,14 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
308
334
|
});
|
|
309
335
|
|
|
310
336
|
const snapshot = await buildSetupReviewSnapshot(ctx);
|
|
311
|
-
const
|
|
312
|
-
const accountSnapshot = await operatorClient.providers.accountSnapshot();
|
|
337
|
+
const accountSnapshot = await loadProviderAccountSnapshot(ctx);
|
|
313
338
|
const settingsSnapshot = getSettingsControlPlaneSnapshot(ctx.platform.configManager);
|
|
314
339
|
if (sub === 'setup') {
|
|
315
340
|
ctx.print([
|
|
316
|
-
'Health Review
|
|
317
|
-
...snapshot.issues.map((issue) => ` [${issue.severity.toUpperCase()}] ${issue.area}
|
|
318
|
-
...(snapshot.
|
|
319
|
-
? ['', ' Connected host integration issues
|
|
341
|
+
'Health Review Setup',
|
|
342
|
+
...snapshot.issues.map((issue) => ` [${issue.severity.toUpperCase()}] ${issue.area} ${issue.message}`),
|
|
343
|
+
...(snapshot.hostIntegrationIssues.length > 0
|
|
344
|
+
? ['', ' Connected host integration issues', ...snapshot.hostIntegrationIssues.map((issue) => ` - ${issue}`)]
|
|
320
345
|
: []),
|
|
321
346
|
].join('\n'));
|
|
322
347
|
return;
|
|
@@ -324,19 +349,19 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
324
349
|
|
|
325
350
|
ctx.print([
|
|
326
351
|
'Health Review',
|
|
327
|
-
` session
|
|
328
|
-
` setup issues
|
|
329
|
-
` host integration issues
|
|
330
|
-
` active subscriptions
|
|
331
|
-
` account issues
|
|
332
|
-
` settings conflicts
|
|
333
|
-
` managed locks
|
|
334
|
-
` connected
|
|
352
|
+
` session ${snapshot.sessionId}`,
|
|
353
|
+
` setup issues ${snapshot.issues.length}`,
|
|
354
|
+
` host integration issues ${snapshot.hostIntegrationIssues.length}`,
|
|
355
|
+
` active subscriptions ${snapshot.activeSubscriptionCount}`,
|
|
356
|
+
` account issues ${accountSnapshot.issueCount}`,
|
|
357
|
+
` settings conflicts ${settingsSnapshot.conflicts.length}`,
|
|
358
|
+
` managed locks ${settingsSnapshot.managedLockCount}`,
|
|
359
|
+
` connected host auth owner outside Agent`,
|
|
335
360
|
...formatSessionMaintenanceLines(maintenance, 'guided').map((line) => ` ${line}`),
|
|
336
|
-
...(snapshot.issues.length > 0 ? ['', ...snapshot.issues.map((issue) => ` [${issue.severity.toUpperCase()}] ${issue.area}
|
|
337
|
-
...(snapshot.
|
|
361
|
+
...(snapshot.issues.length > 0 ? ['', ...snapshot.issues.map((issue) => ` [${issue.severity.toUpperCase()}] ${issue.area} ${issue.message}`)] : []),
|
|
362
|
+
...(snapshot.hostIntegrationIssues.length > 0 ? ['', ...snapshot.hostIntegrationIssues.map((issue) => ` host integration ${issue}`)] : []),
|
|
338
363
|
'',
|
|
339
|
-
'Next steps
|
|
364
|
+
'Next steps',
|
|
340
365
|
' /health review',
|
|
341
366
|
' /health host',
|
|
342
367
|
' /health accounts',
|