@pellux/goodvibes-tui 0.19.60 → 0.19.61
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 +45 -0
- package/README.md +1 -1
- package/docs/foundation-artifacts/operator-contract.json +2398 -2086
- package/package.json +2 -2
- package/src/audio/player.ts +1 -1
- package/src/audio/spoken-turn-controller.ts +5 -5
- package/src/audio/spoken-turn-model-routing.ts +3 -3
- package/src/audio/spoken-turn-wiring.ts +3 -3
- package/src/cli/bundle-command.ts +3 -3
- package/src/cli/entrypoint.ts +9 -8
- package/src/cli/management-commands.ts +6 -6
- package/src/cli/management.ts +17 -16
- package/src/cli/provider-auth-routes.ts +1 -1
- package/src/cli/service-posture.ts +2 -2
- package/src/cli/status.ts +4 -3
- package/src/cli/surface-command.ts +1 -1
- package/src/config/index.ts +12 -11
- package/src/config/provider-model.ts +23 -0
- package/src/config/secret-config.ts +1 -1
- package/src/config/secrets.ts +3 -3
- package/src/core/composer-state.ts +1 -1
- package/src/core/conversation-rendering.ts +3 -3
- package/src/core/conversation.ts +10 -10
- package/src/core/orchestrator.ts +1 -1
- package/src/core/system-message-router.ts +3 -3
- package/src/daemon/cli.ts +19 -19
- package/src/daemon/safe-serve.ts +2 -2
- package/src/input/bookmark-modal.ts +1 -1
- package/src/input/command-registry.ts +31 -31
- package/src/input/commands/control-room-runtime.ts +3 -3
- package/src/input/commands/conversation-runtime.ts +1 -1
- package/src/input/commands/diff-runtime.ts +1 -1
- package/src/input/commands/discovery-runtime.ts +2 -2
- package/src/input/commands/eval.ts +6 -6
- package/src/input/commands/git-runtime.ts +2 -2
- package/src/input/commands/guidance-runtime.ts +3 -3
- package/src/input/commands/health-runtime.ts +10 -10
- package/src/input/commands/incident-runtime.ts +1 -1
- package/src/input/commands/integration-runtime.ts +2 -2
- package/src/input/commands/intelligence-runtime.ts +3 -3
- package/src/input/commands/knowledge.ts +1 -1
- package/src/input/commands/local-auth-runtime.ts +1 -1
- package/src/input/commands/local-provider-runtime.ts +3 -4
- package/src/input/commands/local-runtime.ts +6 -6
- package/src/input/commands/local-setup-review.ts +3 -3
- package/src/input/commands/local-setup.ts +3 -3
- package/src/input/commands/managed-runtime.ts +9 -8
- package/src/input/commands/marketplace-runtime.ts +1 -1
- package/src/input/commands/mcp-runtime.ts +1 -1
- package/src/input/commands/operator-panel-runtime.ts +1 -1
- package/src/input/commands/operator-runtime.ts +5 -5
- package/src/input/commands/platform-access-runtime.ts +2 -2
- package/src/input/commands/platform-sandbox-qemu.ts +2 -2
- package/src/input/commands/platform-sandbox-runtime.ts +6 -6
- package/src/input/commands/platform-sandbox-session.ts +2 -2
- package/src/input/commands/policy-dispatch.ts +6 -6
- package/src/input/commands/product-runtime.ts +2 -2
- package/src/input/commands/profile-sync-runtime.ts +2 -2
- package/src/input/commands/provider-accounts-runtime.ts +1 -1
- package/src/input/commands/provider.ts +3 -3
- package/src/input/commands/quit-shared.ts +2 -2
- package/src/input/commands/recall-bundle.ts +2 -2
- package/src/input/commands/recall-capture.ts +2 -2
- package/src/input/commands/recall-query.ts +2 -2
- package/src/input/commands/recall-shared.ts +2 -2
- package/src/input/commands/remote-runtime-setup.ts +2 -2
- package/src/input/commands/remote-runtime.ts +1 -1
- package/src/input/commands/replay-runtime.ts +1 -1
- package/src/input/commands/runtime-services.ts +11 -11
- package/src/input/commands/schedule-runtime.ts +6 -6
- package/src/input/commands/services-runtime.ts +1 -1
- package/src/input/commands/session-content.ts +5 -5
- package/src/input/commands/session-workflow.ts +5 -5
- package/src/input/commands/session.ts +2 -2
- package/src/input/commands/settings-sync-runtime.ts +5 -4
- package/src/input/commands/share-runtime.ts +3 -3
- package/src/input/commands/shell-core.ts +4 -5
- package/src/input/commands/skills-runtime.ts +1 -1
- package/src/input/commands/subscription-runtime.ts +7 -7
- package/src/input/commands/tasks-runtime.ts +5 -5
- package/src/input/commands/teamwork-runtime.ts +3 -3
- package/src/input/commands/teleport-runtime.ts +1 -1
- package/src/input/commands/worktree-runtime.ts +3 -3
- package/src/input/feed-context-factory.ts +1 -1
- package/src/input/file-picker.ts +1 -1
- package/src/input/handler-command-route.ts +2 -2
- package/src/input/handler-content-actions.ts +7 -7
- package/src/input/handler-feed-routes.ts +3 -3
- package/src/input/handler-feed.ts +2 -2
- package/src/input/handler-interactions.ts +1 -1
- package/src/input/handler-modal-routes.ts +1 -2
- package/src/input/handler-modal-token-routes.ts +1 -1
- package/src/input/handler-onboarding.ts +9 -6
- package/src/input/handler-picker-routes.ts +3 -3
- package/src/input/handler-shortcuts.ts +1 -1
- package/src/input/handler-ui-state.ts +1 -1
- package/src/input/handler.ts +5 -5
- package/src/input/input-history.ts +2 -2
- package/src/input/keybindings.ts +3 -3
- package/src/input/model-picker-types.ts +1 -1
- package/src/input/model-picker.ts +6 -6
- package/src/input/onboarding/handler-onboarding-routes.ts +1 -1
- package/src/input/onboarding/onboarding-runtime-status.ts +1 -1
- package/src/input/onboarding/onboarding-wizard-apply.ts +2 -2
- package/src/input/onboarding/onboarding-wizard-external-surfaces.ts +1 -1
- package/src/input/panel-integration-actions.ts +1 -1
- package/src/input/profile-picker-modal.ts +5 -5
- package/src/input/session-picker-modal.ts +2 -2
- package/src/input/settings-modal-behavior.ts +3 -5
- package/src/input/settings-modal-secrets.ts +4 -4
- package/src/input/settings-modal-subscriptions.ts +3 -3
- package/src/input/settings-modal-types.ts +4 -4
- package/src/input/settings-modal.ts +9 -9
- package/src/input/tts-settings-actions.ts +1 -1
- package/src/main.ts +16 -17
- package/src/panels/agent-inspector-panel.ts +4 -4
- package/src/panels/agent-logs-panel.ts +2 -2
- package/src/panels/approval-panel.ts +2 -2
- package/src/panels/builtin/operations.ts +1 -1
- package/src/panels/builtin/session.ts +2 -2
- package/src/panels/builtin/shared.ts +26 -26
- package/src/panels/context-visualizer-panel.ts +3 -3
- package/src/panels/cost-tracker-panel.ts +1 -1
- package/src/panels/debug-panel.ts +1 -1
- package/src/panels/eval-panel.ts +1 -1
- package/src/panels/forensics-panel.ts +3 -3
- package/src/panels/git-panel.ts +3 -3
- package/src/panels/hooks-panel.ts +7 -7
- package/src/panels/incident-review-panel.ts +2 -2
- package/src/panels/knowledge-panel.ts +1 -1
- package/src/panels/local-auth-panel.ts +1 -1
- package/src/panels/marketplace-panel.ts +2 -2
- package/src/panels/mcp-panel.ts +2 -2
- package/src/panels/memory-panel.ts +2 -2
- package/src/panels/ops-control-panel.ts +1 -1
- package/src/panels/ops-strategy-panel.ts +2 -2
- package/src/panels/orchestration-panel.ts +1 -1
- package/src/panels/panel-list-panel.ts +1 -1
- package/src/panels/plan-dashboard-panel.ts +1 -1
- package/src/panels/plugins-panel.ts +1 -1
- package/src/panels/policy-panel.ts +1 -1
- package/src/panels/project-planning-panel.ts +1 -1
- package/src/panels/provider-account-snapshot.ts +1 -1
- package/src/panels/provider-health-domains.ts +4 -4
- package/src/panels/provider-health-panel.ts +4 -4
- package/src/panels/provider-stats-panel.ts +1 -1
- package/src/panels/qr-panel.ts +1 -1
- package/src/panels/sandbox-panel.ts +3 -3
- package/src/panels/schedule-panel.ts +4 -4
- package/src/panels/security-panel.ts +1 -1
- package/src/panels/services-panel.ts +1 -1
- package/src/panels/session-browser-panel.ts +3 -3
- package/src/panels/settings-sync-panel.ts +1 -1
- package/src/panels/skills-panel.ts +1 -1
- package/src/panels/subscription-panel.ts +2 -2
- package/src/panels/system-messages-panel.ts +1 -1
- package/src/panels/tasks-panel.ts +5 -5
- package/src/panels/thinking-panel.ts +1 -1
- package/src/panels/token-budget-panel.ts +2 -2
- package/src/panels/tool-inspector-panel.ts +1 -1
- package/src/panels/worktree-panel.ts +6 -6
- package/src/panels/wrfc-panel.ts +4 -4
- package/src/permissions/prompt.ts +3 -3
- package/src/planning/project-planning-coordinator.ts +1 -1
- package/src/plugins/loader.ts +2 -2
- package/src/renderer/agent-detail-modal.ts +5 -5
- package/src/renderer/bookmark-modal.ts +1 -1
- package/src/renderer/git-status.ts +3 -3
- package/src/renderer/help-overlay.ts +1 -1
- package/src/renderer/live-tail-modal.ts +2 -2
- package/src/renderer/model-picker-overlay.ts +2 -2
- package/src/renderer/model-workspace.ts +1 -1
- package/src/renderer/process-modal.ts +3 -3
- package/src/renderer/qr-renderer.ts +1 -1
- package/src/renderer/semantic-diff.ts +6 -6
- package/src/renderer/syntax-highlighter.ts +3 -3
- package/src/renderer/tool-call.ts +1 -1
- package/src/runtime/bootstrap-command-context.ts +46 -46
- package/src/runtime/bootstrap-command-parts.ts +46 -47
- package/src/runtime/bootstrap-core.ts +24 -23
- package/src/runtime/bootstrap-hook-bridge.ts +14 -14
- package/src/runtime/bootstrap-shell.ts +15 -15
- package/src/runtime/bootstrap.ts +27 -27
- package/src/runtime/cloudflare-control-plane.ts +1 -1
- package/src/runtime/context.ts +13 -13
- package/src/runtime/diagnostics/panels/index.ts +14 -14
- package/src/runtime/diagnostics/panels/ops.ts +7 -7
- package/src/runtime/diagnostics/panels/panel-resources.ts +1 -1
- package/src/runtime/diagnostics/panels/policy.ts +11 -11
- package/src/runtime/index.ts +625 -163
- package/src/runtime/onboarding/apply.ts +1 -1
- package/src/runtime/onboarding/derivation.ts +3 -2
- package/src/runtime/onboarding/markers.ts +1 -1
- package/src/runtime/onboarding/snapshot.ts +3 -2
- package/src/runtime/onboarding/types.ts +2 -2
- package/src/runtime/onboarding/verify.ts +1 -1
- package/src/runtime/perf/panel-contracts.ts +2 -2
- package/src/runtime/perf/panel-health-monitor.ts +2 -2
- package/src/runtime/sandbox-public-gaps.ts +486 -0
- package/src/runtime/services.ts +114 -67
- package/src/runtime/store/domains/index.ts +50 -50
- package/src/runtime/store/index.ts +21 -20
- package/src/runtime/store/selectors/index.ts +17 -17
- package/src/runtime/store/state.ts +50 -50
- package/src/runtime/surface-feature-flags.ts +1 -3
- package/src/runtime/terminal-output-guard.ts +1 -1
- package/src/runtime/ui/index.ts +7 -7
- package/src/runtime/ui/model-picker/data-provider.ts +7 -7
- package/src/runtime/ui/model-picker/health-enrichment.ts +7 -7
- package/src/runtime/ui/model-picker/index.ts +11 -11
- package/src/runtime/ui/model-picker/types.ts +1 -1
- package/src/runtime/ui/provider-health/data-provider.ts +4 -4
- package/src/runtime/ui/provider-health/fallback-visualizer.ts +5 -3
- package/src/runtime/ui/provider-health/index.ts +7 -7
- package/src/runtime/ui/provider-health/types.ts +1 -1
- package/src/runtime/ui-events.ts +1 -1
- package/src/runtime/ui-read-model-helpers.ts +1 -1
- package/src/runtime/ui-read-models-observability-maintenance.ts +1 -1
- package/src/runtime/ui-read-models-observability-options.ts +1 -1
- package/src/runtime/ui-read-models-observability-remote.ts +1 -1
- package/src/runtime/ui-read-models-observability-security.ts +1 -1
- package/src/runtime/ui-read-models-observability-system.ts +1 -1
- package/src/runtime/ui-read-models-observability.ts +1 -1
- package/src/runtime/ui-read-models.ts +8 -8
- package/src/runtime/ui-service-queries.ts +1 -1
- package/src/runtime/ui-services.ts +8 -8
- package/src/scripts/process-messages.ts +1 -1
- package/src/shell/blocking-input.ts +2 -2
- package/src/shell/ui-openers.ts +8 -7
- package/src/tools/index.ts +1 -1
- package/src/utils/clipboard.ts +3 -3
- package/src/version.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-tui",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.61",
|
|
4
4
|
"description": "Terminal-native GoodVibes product for coding, operations, automation, knowledge, channels, and daemon-backed control-plane workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main.ts",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@anthropic-ai/vertex-sdk": "^0.16.0",
|
|
92
92
|
"@ast-grep/napi": "^0.42.0",
|
|
93
93
|
"@aws/bedrock-token-generator": "^1.1.0",
|
|
94
|
-
"@pellux/goodvibes-sdk": "0.
|
|
94
|
+
"@pellux/goodvibes-sdk": "0.33.4",
|
|
95
95
|
"bash-language-server": "^5.6.0",
|
|
96
96
|
"fuse.js": "^7.1.0",
|
|
97
97
|
"graphql": "^16.13.2",
|
package/src/audio/player.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { accessSync, constants } from 'node:fs';
|
|
|
2
2
|
import { delimiter, join } from 'node:path';
|
|
3
3
|
import { spawn } from 'node:child_process';
|
|
4
4
|
import type { Writable } from 'node:stream';
|
|
5
|
-
import type { VoiceAudioChunk } from '@pellux/goodvibes-sdk/platform/voice
|
|
5
|
+
import type { VoiceAudioChunk } from '@pellux/goodvibes-sdk/platform/voice';
|
|
6
6
|
|
|
7
7
|
export interface StreamingAudioPlayerCommand {
|
|
8
8
|
readonly command: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config
|
|
2
|
-
import type { ConfigKey } from '@pellux/goodvibes-sdk/platform/config
|
|
3
|
-
import type { TurnEvent } from '
|
|
4
|
-
import type { VoiceService, VoiceSynthesisStreamResult } from '@pellux/goodvibes-sdk/platform/voice
|
|
5
|
-
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils
|
|
1
|
+
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
2
|
+
import type { ConfigKey } from '@pellux/goodvibes-sdk/platform/config';
|
|
3
|
+
import type { TurnEvent } from '@/runtime/index.ts';
|
|
4
|
+
import type { VoiceService, VoiceSynthesisStreamResult } from '@pellux/goodvibes-sdk/platform/voice';
|
|
5
|
+
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
6
6
|
import { TtsTextChunker } from './text-chunker.ts';
|
|
7
7
|
import type { StreamingAudioPlayer } from './player.ts';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config
|
|
2
|
-
import type { ModelDefinition, ProviderRegistry } from '@pellux/goodvibes-sdk/platform/providers
|
|
3
|
-
import type { ContentPart } from '@pellux/goodvibes-sdk/platform/providers
|
|
1
|
+
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
2
|
+
import type { ModelDefinition, ProviderRegistry } from '@pellux/goodvibes-sdk/platform/providers';
|
|
3
|
+
import type { ContentPart } from '@pellux/goodvibes-sdk/platform/providers';
|
|
4
4
|
import type { Orchestrator, OrchestratorUserInputOptions } from '../core/orchestrator.ts';
|
|
5
5
|
|
|
6
6
|
const SPOKEN_TURN_SOURCE = 'tts';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config
|
|
2
|
-
import type { UiRuntimeEvents } from '
|
|
3
|
-
import type { VoiceService } from '@pellux/goodvibes-sdk/platform/voice
|
|
1
|
+
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
2
|
+
import type { UiRuntimeEvents } from '@/runtime/index.ts';
|
|
3
|
+
import type { VoiceService } from '@pellux/goodvibes-sdk/platform/voice';
|
|
4
4
|
import { LocalStreamingAudioPlayer } from './player.ts';
|
|
5
5
|
import { SpokenTurnController } from './spoken-turn-controller.ts';
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { dirname, join } from 'node:path';
|
|
3
|
-
import { RuntimeEventBus } from '
|
|
4
|
-
import { createShellPathService } from '
|
|
5
|
-
import { listProviderRuntimeSnapshots } from '@pellux/goodvibes-sdk/platform/providers
|
|
3
|
+
import { RuntimeEventBus } from '@/runtime/index.ts';
|
|
4
|
+
import { createShellPathService } from '@/runtime/index.ts';
|
|
5
|
+
import { listProviderRuntimeSnapshots } from '@pellux/goodvibes-sdk/platform/providers';
|
|
6
6
|
import { createRuntimeServices } from '../runtime/services.ts';
|
|
7
7
|
import { createRuntimeStore } from '../runtime/store/index.ts';
|
|
8
8
|
import { getOnboardingCheckMarkerPath } from '../runtime/onboarding/index.ts';
|
package/src/cli/entrypoint.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { ConfigManager } from '../config/index.ts';
|
|
4
|
+
import { formatProviderModel, getModelIdFromProviderModel, getProviderIdFromModel } from '../config/provider-model.ts';
|
|
4
5
|
import { readOnboardingCheckMarkers } from '../runtime/onboarding/index.ts';
|
|
5
|
-
import { GlobalNetworkTransportInstaller } from '
|
|
6
|
-
import { createShellPathService } from '
|
|
7
|
-
import { configureActivityLogger } from '@pellux/goodvibes-sdk/platform/utils
|
|
6
|
+
import { GlobalNetworkTransportInstaller } from '@/runtime/index.ts';
|
|
7
|
+
import { createShellPathService } from '@/runtime/index.ts';
|
|
8
|
+
import { configureActivityLogger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
8
9
|
import {
|
|
9
10
|
applyRuntimeCommandEndpointFlagOverrides,
|
|
10
11
|
applyRuntimeConfigOverrides,
|
|
@@ -105,11 +106,11 @@ export async function prepareShellCliRuntime(
|
|
|
105
106
|
disableFeatures: cli.flags.disableFeatures,
|
|
106
107
|
});
|
|
107
108
|
|
|
108
|
-
if (cli.flags.provider !== undefined) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
applyRuntimeConfigValue(configManager, 'provider.model',
|
|
109
|
+
if (cli.flags.provider !== undefined || cli.flags.model !== undefined) {
|
|
110
|
+
const currentModel = configManager.get('provider.model');
|
|
111
|
+
const provider = cli.flags.provider ?? getProviderIdFromModel(currentModel);
|
|
112
|
+
const model = cli.flags.model ?? getModelIdFromProviderModel(currentModel);
|
|
113
|
+
applyRuntimeConfigValue(configManager, 'provider.model', formatProviderModel(provider, model));
|
|
113
114
|
}
|
|
114
115
|
const endpointOverrideErrors = applyRuntimeCommandEndpointFlagOverrides(configManager, cli.command, cli.flags);
|
|
115
116
|
if (endpointOverrideErrors.length > 0) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { dirname, join } from 'node:path';
|
|
3
3
|
import { SecretsManager } from '../config/secrets.ts';
|
|
4
|
-
import { BUILTIN_SECRET_PROVIDER_SOURCES, describeSecretRef, isSecretRefInput, resolveSecretRef } from '@pellux/goodvibes-sdk/platform/config
|
|
5
|
-
import { getSubscriptionProviderConfig, listAvailableSubscriptionProviders } from '@pellux/goodvibes-sdk/platform/config
|
|
6
|
-
import { beginOpenAICodexLogin, exchangeOpenAICodexCode } from '@pellux/goodvibes-sdk/platform/config
|
|
7
|
-
import { inspectProviderAuth } from '
|
|
8
|
-
import { getOrCreateCompanionToken, buildCompanionConnectionInfo, encodeConnectionPayload, formatConnectionBlock } from '@pellux/goodvibes-sdk/platform/pairing
|
|
9
|
-
import { generateQrMatrix, renderQrToString } from '@pellux/goodvibes-sdk/platform/pairing
|
|
4
|
+
import { BUILTIN_SECRET_PROVIDER_SOURCES, describeSecretRef, isSecretRefInput, resolveSecretRef } from '@pellux/goodvibes-sdk/platform/config';
|
|
5
|
+
import { getSubscriptionProviderConfig, listAvailableSubscriptionProviders } from '@pellux/goodvibes-sdk/platform/config';
|
|
6
|
+
import { beginOpenAICodexLogin, exchangeOpenAICodexCode } from '@pellux/goodvibes-sdk/platform/config';
|
|
7
|
+
import { inspectProviderAuth } from '@/runtime/index.ts';
|
|
8
|
+
import { getOrCreateCompanionToken, buildCompanionConnectionInfo, encodeConnectionPayload, formatConnectionBlock } from '@pellux/goodvibes-sdk/platform/pairing';
|
|
9
|
+
import { generateQrMatrix, renderQrToString } from '@pellux/goodvibes-sdk/platform/pairing';
|
|
10
10
|
import { resolveRuntimeEndpointBinding } from './endpoints.ts';
|
|
11
11
|
import { classifyBindPosture, isNetworkFacing } from './network-posture.ts';
|
|
12
12
|
import type { CliCommandRuntime } from './management.ts';
|
package/src/cli/management.ts
CHANGED
|
@@ -5,21 +5,22 @@ import { spawn } from 'node:child_process';
|
|
|
5
5
|
import { networkInterfaces } from 'node:os';
|
|
6
6
|
import type { ConfigManager, ConfigKey, GoodVibesConfig } from '../config/index.ts';
|
|
7
7
|
import { CONFIG_SCHEMA } from '../config/index.ts';
|
|
8
|
+
import { formatProviderModel, getModelIdFromProviderModel } from '../config/provider-model.ts';
|
|
8
9
|
import { bootstrapRuntime } from '../runtime/bootstrap.ts';
|
|
9
10
|
import { createRuntimeServices } from '../runtime/services.ts';
|
|
10
11
|
import { createRuntimeStore } from '../runtime/store/index.ts';
|
|
11
12
|
import type { RuntimeServices } from '../runtime/services.ts';
|
|
12
13
|
import { SecretsManager } from '../config/secrets.ts';
|
|
13
|
-
import { RuntimeEventBus, type TurnEvent } from '
|
|
14
|
-
import { createShellPathService } from '
|
|
15
|
-
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils
|
|
16
|
-
import { listProviderRuntimeSnapshots } from '@pellux/goodvibes-sdk/platform/providers
|
|
17
|
-
import { BUILTIN_SECRET_PROVIDER_SOURCES, describeSecretRef, isSecretRefInput, resolveSecretRef } from '@pellux/goodvibes-sdk/platform/config
|
|
18
|
-
import { getSubscriptionProviderConfig, listAvailableSubscriptionProviders } from '@pellux/goodvibes-sdk/platform/config
|
|
19
|
-
import { beginOpenAICodexLogin, exchangeOpenAICodexCode } from '@pellux/goodvibes-sdk/platform/config
|
|
20
|
-
import { inspectProviderAuth } from '
|
|
21
|
-
import { getOrCreateCompanionToken, buildCompanionConnectionInfo, encodeConnectionPayload, formatConnectionBlock } from '@pellux/goodvibes-sdk/platform/pairing
|
|
22
|
-
import { generateQrMatrix, renderQrToString } from '@pellux/goodvibes-sdk/platform/pairing
|
|
14
|
+
import { RuntimeEventBus, type TurnEvent } from '@/runtime/index.ts';
|
|
15
|
+
import { createShellPathService } from '@/runtime/index.ts';
|
|
16
|
+
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
17
|
+
import { listProviderRuntimeSnapshots } from '@pellux/goodvibes-sdk/platform/providers';
|
|
18
|
+
import { BUILTIN_SECRET_PROVIDER_SOURCES, describeSecretRef, isSecretRefInput, resolveSecretRef } from '@pellux/goodvibes-sdk/platform/config';
|
|
19
|
+
import { getSubscriptionProviderConfig, listAvailableSubscriptionProviders } from '@pellux/goodvibes-sdk/platform/config';
|
|
20
|
+
import { beginOpenAICodexLogin, exchangeOpenAICodexCode } from '@pellux/goodvibes-sdk/platform/config';
|
|
21
|
+
import { inspectProviderAuth } from '@/runtime/index.ts';
|
|
22
|
+
import { getOrCreateCompanionToken, buildCompanionConnectionInfo, encodeConnectionPayload, formatConnectionBlock } from '@pellux/goodvibes-sdk/platform/pairing';
|
|
23
|
+
import { generateQrMatrix, renderQrToString } from '@pellux/goodvibes-sdk/platform/pairing';
|
|
23
24
|
import type { GoodVibesCliParseResult } from './types.ts';
|
|
24
25
|
import { formatProviderAuthRoute, summarizeProviderAuthRoutes } from './provider-auth-routes.ts';
|
|
25
26
|
import { classifyProviderSetup } from './provider-classification.ts';
|
|
@@ -409,13 +410,15 @@ async function renderProviders(runtime: CliCommandRuntime): Promise<string> {
|
|
|
409
410
|
? providerModels.find((model) => model.registryKey === requestedModel || model.id === requestedModel)
|
|
410
411
|
: providerModels.find((model) => model.registryKey === current.registryKey) ?? providerModels[0];
|
|
411
412
|
if (providerModels.length === 0 || !selected) {
|
|
412
|
-
|
|
413
|
-
|
|
413
|
+
if (requestedModel) {
|
|
414
|
+
runtime.configManager.setDynamic('provider.model', formatProviderModel(provider, requestedModel));
|
|
415
|
+
} else {
|
|
416
|
+
runtime.configManager.setDynamic('provider.model', formatProviderModel(provider, getModelIdFromProviderModel(runtime.configManager.get('provider.model'))));
|
|
417
|
+
}
|
|
414
418
|
return requestedModel
|
|
415
419
|
? `Provider selected: ${provider} (${requestedModel})\n warning: model catalog entry was not available locally; saved explicit selection.`
|
|
416
420
|
: `Provider selected: ${provider}\n warning: model catalog entry was not available locally; model selection was left unchanged.`;
|
|
417
421
|
}
|
|
418
|
-
runtime.configManager.setDynamic('provider.provider', selected.provider);
|
|
419
422
|
runtime.configManager.setDynamic('provider.model', selected.registryKey);
|
|
420
423
|
return `Provider selected: ${selected.provider} (${selected.registryKey})`;
|
|
421
424
|
}
|
|
@@ -519,12 +522,10 @@ async function renderModels(runtime: CliCommandRuntime): Promise<string> {
|
|
|
519
522
|
.find((candidate) => candidate.registryKey === modelKey || candidate.id === modelKey);
|
|
520
523
|
if (!model) {
|
|
521
524
|
const provider = inferProviderFromRegistryKey(modelKey);
|
|
522
|
-
runtime.configManager.setDynamic('provider.
|
|
523
|
-
runtime.configManager.setDynamic('provider.model', modelKey);
|
|
525
|
+
runtime.configManager.setDynamic('provider.model', formatProviderModel(provider, modelKey));
|
|
524
526
|
await services.favoritesStore.recordUsage(modelKey);
|
|
525
527
|
return `Model selected: ${modelKey}\n warning: model catalog entry was not available locally; saved explicit selection.`;
|
|
526
528
|
}
|
|
527
|
-
runtime.configManager.setDynamic('provider.provider', model.provider);
|
|
528
529
|
runtime.configManager.setDynamic('provider.model', model.registryKey);
|
|
529
530
|
await services.favoritesStore.recordUsage(model.registryKey);
|
|
530
531
|
return `Model selected: ${model.registryKey}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ProviderAuthRouteDescriptor } from '@pellux/goodvibes-sdk/platform/providers
|
|
1
|
+
import type { ProviderAuthRouteDescriptor } from '@pellux/goodvibes-sdk/platform/providers';
|
|
2
2
|
|
|
3
3
|
function routeUsable(route: ProviderAuthRouteDescriptor): boolean {
|
|
4
4
|
return route.usable ?? route.configured;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { closeSync, existsSync, openSync, readSync, statSync } from 'node:fs';
|
|
2
2
|
import net from 'node:net';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { PlatformServiceManager } from '@pellux/goodvibes-sdk/platform/daemon
|
|
5
|
-
import type { ManagedServiceStatus } from '@pellux/goodvibes-sdk/platform/daemon
|
|
4
|
+
import { PlatformServiceManager } from '@pellux/goodvibes-sdk/platform/daemon';
|
|
5
|
+
import type { ManagedServiceStatus } from '@pellux/goodvibes-sdk/platform/daemon';
|
|
6
6
|
import type { ConfigManager } from '../config/index.ts';
|
|
7
7
|
import { resolveRuntimeEndpointBinding } from './endpoints.ts';
|
|
8
8
|
import type { RuntimeEndpointBinding, RuntimeEndpointId } from './endpoints.ts';
|
package/src/cli/status.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config
|
|
1
|
+
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
2
2
|
import type { OnboardingCheckMarkersState } from '../runtime/onboarding/index.ts';
|
|
3
3
|
import { resolveRuntimeEndpointBinding } from './endpoints.ts';
|
|
4
4
|
import { isNetworkFacing } from './network-posture.ts';
|
|
5
5
|
import type { GoodVibesCliOutputFormat } from './types.ts';
|
|
6
6
|
import type { CliServicePosture } from './service-posture.ts';
|
|
7
|
+
import { getProviderIdFromModel } from '../config/provider-model.ts';
|
|
7
8
|
|
|
8
9
|
export interface CliStatusOptions {
|
|
9
10
|
readonly configManager: Pick<ConfigManager, 'get'>;
|
|
@@ -254,7 +255,7 @@ export function buildCliStatusSnapshot(options: CliStatusOptions): CliStatusSnap
|
|
|
254
255
|
workingDirectory: options.workingDirectory,
|
|
255
256
|
homeDirectory: options.homeDirectory,
|
|
256
257
|
provider: {
|
|
257
|
-
provider:
|
|
258
|
+
provider: getProviderIdFromModel(config.get('provider.model')),
|
|
258
259
|
model: String(config.get('provider.model')),
|
|
259
260
|
reasoning: String(config.get('provider.reasoningEffort')),
|
|
260
261
|
},
|
|
@@ -308,7 +309,7 @@ export function renderCliStatus(options: CliStatusOptions): string {
|
|
|
308
309
|
` homeDir: ${options.homeDirectory}`,
|
|
309
310
|
'',
|
|
310
311
|
'Provider:',
|
|
311
|
-
` provider: ${
|
|
312
|
+
` provider: ${getProviderIdFromModel(config.get('provider.model'))}`,
|
|
312
313
|
` model: ${String(config.get('provider.model'))}`,
|
|
313
314
|
` reasoning: ${String(config.get('provider.reasoningEffort'))}`,
|
|
314
315
|
'',
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
GOODVIBES_NTFY_CHAT_TOPIC,
|
|
5
5
|
GOODVIBES_NTFY_REMOTE_TOPIC,
|
|
6
6
|
resolveGoodVibesNtfyTopics,
|
|
7
|
-
} from '@pellux/goodvibes-sdk/platform/integrations
|
|
7
|
+
} from '@pellux/goodvibes-sdk/platform/integrations';
|
|
8
8
|
import { enableFeatureFlags, getMissingSurfaceFeatureFlags, getServerSurfaceFeatureFlags } from '../runtime/surface-feature-flags.ts';
|
|
9
9
|
import { resolveRuntimeEndpointBinding } from './endpoints.ts';
|
|
10
10
|
import { classifyBindPosture, isNetworkFacing } from './network-posture.ts';
|
package/src/config/index.ts
CHANGED
|
@@ -6,17 +6,18 @@
|
|
|
6
6
|
* - Pure helpers that derive values from an explicit ConfigManager instance
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
export { ConfigManager } from '@pellux/goodvibes-sdk/platform/config
|
|
10
|
-
export type { DeepReadonly } from '@pellux/goodvibes-sdk/platform/config
|
|
11
|
-
export type { GoodVibesConfig, ConfigKey, ConfigValue, ConfigSetting, PermissionMode, PermissionAction, PermissionsToolConfig, NotificationsConfig, PersistedFlagState } from '@pellux/goodvibes-sdk/platform/config
|
|
12
|
-
export { DEFAULT_CONFIG, CONFIG_SCHEMA } from '@pellux/goodvibes-sdk/platform/config
|
|
13
|
-
export { ConfigError } from '@pellux/goodvibes-sdk/platform/types
|
|
9
|
+
export { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
10
|
+
export type { DeepReadonly } from '@pellux/goodvibes-sdk/platform/config';
|
|
11
|
+
export type { GoodVibesConfig, ConfigKey, ConfigValue, ConfigSetting, PermissionMode, PermissionAction, PermissionsToolConfig, NotificationsConfig, PersistedFlagState } from '@pellux/goodvibes-sdk/platform/config';
|
|
12
|
+
export { DEFAULT_CONFIG, CONFIG_SCHEMA } from '@pellux/goodvibes-sdk/platform/config';
|
|
13
|
+
export { ConfigError } from '@pellux/goodvibes-sdk/platform/types';
|
|
14
14
|
|
|
15
15
|
import { readFileSync } from 'fs';
|
|
16
|
-
import { ConfigManager } from '@pellux/goodvibes-sdk/platform/config
|
|
17
|
-
import type { GoodVibesConfig } from '@pellux/goodvibes-sdk/platform/config
|
|
18
|
-
import { logger } from '@pellux/goodvibes-sdk/platform/utils
|
|
19
|
-
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils
|
|
16
|
+
import { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
17
|
+
import type { GoodVibesConfig } from '@pellux/goodvibes-sdk/platform/config';
|
|
18
|
+
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
19
|
+
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
20
|
+
import { getProviderIdFromModel } from './provider-model.ts';
|
|
20
21
|
|
|
21
22
|
export function getConfigSnapshot(configManager: Pick<ConfigManager, 'getRaw'>): Readonly<GoodVibesConfig> {
|
|
22
23
|
return configManager.getRaw();
|
|
@@ -27,7 +28,7 @@ export function getConfiguredModelId(configManager: Pick<ConfigManager, 'get'>):
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export function getConfiguredProviderId(configManager: Pick<ConfigManager, 'get'>): string {
|
|
30
|
-
return configManager.get('provider.
|
|
31
|
+
return getProviderIdFromModel(configManager.get('provider.model'));
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export function getConfiguredEmbeddingProviderId(configManager: Pick<ConfigManager, 'get'>): string {
|
|
@@ -53,4 +54,4 @@ export function getConfiguredSystemPrompt(configManager: Pick<ConfigManager, 'ge
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
export { getConfiguredApiKeys, resolveApiKeys } from '@pellux/goodvibes-sdk/platform/config
|
|
57
|
+
export { getConfiguredApiKeys, resolveApiKeys } from '@pellux/goodvibes-sdk/platform/config';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DEFAULT_CONFIG } from '@pellux/goodvibes-sdk/platform/config';
|
|
2
|
+
|
|
3
|
+
export function getProviderIdFromModel(model: unknown): string {
|
|
4
|
+
const raw = String(model ?? '').trim();
|
|
5
|
+
if (!raw) return getProviderIdFromModel(DEFAULT_CONFIG.provider.model);
|
|
6
|
+
const separator = raw.indexOf(':');
|
|
7
|
+
return separator > 0 ? raw.slice(0, separator) : raw;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function getModelIdFromProviderModel(model: unknown): string {
|
|
11
|
+
const raw = String(model ?? '').trim();
|
|
12
|
+
if (!raw) return String(DEFAULT_CONFIG.provider.model);
|
|
13
|
+
const separator = raw.indexOf(':');
|
|
14
|
+
return separator > 0 ? raw.slice(separator + 1) : raw;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function formatProviderModel(providerId: string, modelId: string): string {
|
|
18
|
+
const provider = providerId.trim();
|
|
19
|
+
const model = modelId.trim();
|
|
20
|
+
if (!provider) return model;
|
|
21
|
+
if (!model) return `${provider}:`;
|
|
22
|
+
return model.includes(':') ? model : `${provider}:${model}`;
|
|
23
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isSecretRefInput } from '@pellux/goodvibes-sdk/platform/config
|
|
1
|
+
import { isSecretRefInput } from '@pellux/goodvibes-sdk/platform/config';
|
|
2
2
|
import type { ConfigKey } from './index.ts';
|
|
3
3
|
import type { SecretScope, SecretStorageMedium } from './secrets.ts';
|
|
4
4
|
|
package/src/config/secrets.ts
CHANGED
|
@@ -7,13 +7,13 @@ export type {
|
|
|
7
7
|
SecretStorageMode,
|
|
8
8
|
SecretStorageReview,
|
|
9
9
|
SecretWriteOptions,
|
|
10
|
-
} from '@pellux/goodvibes-sdk/platform/config
|
|
10
|
+
} from '@pellux/goodvibes-sdk/platform/config';
|
|
11
11
|
|
|
12
12
|
import {
|
|
13
13
|
SecretsManager as SdkSecretsManager,
|
|
14
14
|
type SecretsManagerOptions as SdkSecretsManagerOptions,
|
|
15
|
-
} from '@pellux/goodvibes-sdk/platform/config
|
|
16
|
-
import { isSecretRefInput } from '@pellux/goodvibes-sdk/platform/config
|
|
15
|
+
} from '@pellux/goodvibes-sdk/platform/config';
|
|
16
|
+
import { isSecretRefInput } from '@pellux/goodvibes-sdk/platform/config';
|
|
17
17
|
|
|
18
18
|
export type SecretsManagerOptions = Omit<SdkSecretsManagerOptions, 'surfaceRoot'>;
|
|
19
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SubmissionIntent } from '../input/submission-intent.ts';
|
|
2
2
|
import { routeSubmissionIntent, type SubmissionRouterInput } from '../input/submission-router.ts';
|
|
3
|
-
import type { TurnState } from '
|
|
3
|
+
import type { TurnState } from '@/runtime/index.ts';
|
|
4
4
|
|
|
5
5
|
export interface ComposerState {
|
|
6
6
|
readonly intent: SubmissionIntent;
|
|
@@ -7,12 +7,12 @@ import { createEmptyLine, type Line, type Cell } from '../types/grid.ts';
|
|
|
7
7
|
import { getSplashLines, type SplashOptions } from '../utils/splash-lines.ts';
|
|
8
8
|
import { interpolateColor, getDisplayWidth, wrapText } from '../utils/terminal-width.ts';
|
|
9
9
|
import { LAYOUT } from '../renderer/layout.ts';
|
|
10
|
-
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config
|
|
10
|
+
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
11
11
|
import { renderConversationCollapsedFragment, renderConversationEventLine } from '../renderer/conversation-surface.ts';
|
|
12
12
|
import { GLYPHS } from '../renderer/ui-primitives.ts';
|
|
13
13
|
import type { BlockMeta, ConversationMessageSnapshot } from './conversation';
|
|
14
|
-
import { parseDiffForApply } from '@pellux/goodvibes-sdk/platform/core
|
|
15
|
-
import { extractUserDisplayText } from '@pellux/goodvibes-sdk/platform/core
|
|
14
|
+
import { parseDiffForApply } from '@pellux/goodvibes-sdk/platform/core';
|
|
15
|
+
import { extractUserDisplayText } from '@pellux/goodvibes-sdk/platform/core';
|
|
16
16
|
|
|
17
17
|
type Message = ConversationMessageSnapshot;
|
|
18
18
|
|
package/src/core/conversation.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { InfiniteBuffer } from './history.ts';
|
|
2
2
|
import { createEmptyLine, type Line, type Cell } from '../types/grid.ts';
|
|
3
3
|
import type { SplashOptions } from '../utils/splash-lines.ts';
|
|
4
|
-
import type { ToolCall, ToolResult } from '@pellux/goodvibes-sdk/platform/types
|
|
5
|
-
import type { ProviderMessage, ContentPart } from '@pellux/goodvibes-sdk/platform/providers
|
|
6
|
-
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config
|
|
7
|
-
import type { TranscriptEventKind } from '@pellux/goodvibes-sdk/platform/core
|
|
4
|
+
import type { ToolCall, ToolResult } from '@pellux/goodvibes-sdk/platform/types';
|
|
5
|
+
import type { ProviderMessage, ContentPart } from '@pellux/goodvibes-sdk/platform/providers';
|
|
6
|
+
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
7
|
+
import type { TranscriptEventKind } from '@pellux/goodvibes-sdk/platform/core';
|
|
8
8
|
import {
|
|
9
9
|
ConversationManager as SdkConversationManager,
|
|
10
10
|
type BlockMeta as SdkBlockMeta,
|
|
11
|
-
} from '@pellux/goodvibes-sdk/platform/core
|
|
11
|
+
} from '@pellux/goodvibes-sdk/platform/core';
|
|
12
12
|
import {
|
|
13
13
|
addConversationSplashScreen,
|
|
14
14
|
appendConversationMessages,
|
|
@@ -33,7 +33,7 @@ export type {
|
|
|
33
33
|
TokenUsage,
|
|
34
34
|
ConversationMessageSnapshot,
|
|
35
35
|
ConversationTitleSource,
|
|
36
|
-
} from '@pellux/goodvibes-sdk/platform/core
|
|
36
|
+
} from '@pellux/goodvibes-sdk/platform/core';
|
|
37
37
|
|
|
38
38
|
export type { SdkBlockMeta };
|
|
39
39
|
|
|
@@ -50,7 +50,7 @@ export interface BlockMeta extends SdkBlockMeta {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
// Import internal types needed for rendering helpers
|
|
53
|
-
import type { ConversationMessageSnapshot } from '@pellux/goodvibes-sdk/platform/core
|
|
53
|
+
import type { ConversationMessageSnapshot } from '@pellux/goodvibes-sdk/platform/core';
|
|
54
54
|
type Message = ConversationMessageSnapshot;
|
|
55
55
|
|
|
56
56
|
export class ConversationManager extends SdkConversationManager {
|
|
@@ -120,7 +120,7 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
120
120
|
toolCalls?: ToolCall[];
|
|
121
121
|
reasoningContent?: string;
|
|
122
122
|
reasoningSummary?: string;
|
|
123
|
-
usage?: import('@pellux/goodvibes-sdk/platform/core
|
|
123
|
+
usage?: import('@pellux/goodvibes-sdk/platform/core').TokenUsage;
|
|
124
124
|
model?: string;
|
|
125
125
|
provider?: string;
|
|
126
126
|
},
|
|
@@ -269,7 +269,7 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
269
269
|
branches?: Record<string, Message[]>;
|
|
270
270
|
currentBranch?: string;
|
|
271
271
|
title?: string;
|
|
272
|
-
titleSource?: import('@pellux/goodvibes-sdk/platform/core
|
|
272
|
+
titleSource?: import('@pellux/goodvibes-sdk/platform/core').ConversationTitleSource;
|
|
273
273
|
}): void {
|
|
274
274
|
super.fromJSON(data);
|
|
275
275
|
this.history.clear();
|
|
@@ -548,4 +548,4 @@ export class ConversationManager extends SdkConversationManager {
|
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
|
|
551
|
-
export { parseDiffForApply, applyDiffContent } from '@pellux/goodvibes-sdk/platform/core
|
|
551
|
+
export { parseDiffForApply, applyDiffContent } from '@pellux/goodvibes-sdk/platform/core';
|
package/src/core/orchestrator.ts
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
import { getConfigSnapshot } from '../config/index.ts';
|
|
32
|
-
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config
|
|
32
|
+
import type { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
33
33
|
import type { ConversationManager } from './conversation';
|
|
34
34
|
import type { SystemMessagesPanel, SystemMessagePriority } from '../panels/system-messages-panel.ts';
|
|
35
35
|
import {
|
|
@@ -39,12 +39,12 @@ import {
|
|
|
39
39
|
resolveSystemMessageDelivery,
|
|
40
40
|
type SystemMessageKind,
|
|
41
41
|
type SystemMessageTarget,
|
|
42
|
-
} from '
|
|
42
|
+
} from '@/runtime/index.ts';
|
|
43
43
|
|
|
44
44
|
export type {
|
|
45
45
|
SystemMessageKind,
|
|
46
46
|
SystemMessageTarget,
|
|
47
|
-
} from '
|
|
47
|
+
} from '@/runtime/index.ts';
|
|
48
48
|
|
|
49
49
|
function targetForKind(
|
|
50
50
|
configManager: Pick<ConfigManager, 'getRaw'>,
|
package/src/daemon/cli.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { homedir, networkInterfaces } from 'node:os';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { readFileSync } from 'node:fs';
|
|
4
|
-
import { ConfigManager } from '@pellux/goodvibes-sdk/platform/config
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
4
|
+
import { ConfigManager } from '@pellux/goodvibes-sdk/platform/config';
|
|
5
|
+
import { formatProviderModel, getModelIdFromProviderModel, getProviderIdFromModel } from '../config/provider-model.ts';
|
|
6
|
+
import { RuntimeEventBus, GlobalNetworkTransportInstaller } from '@/runtime/index.ts';
|
|
7
|
+
import { createFeatureFlagManager } from '@/runtime/index.ts';
|
|
8
|
+
import type { FlagState } from '@/runtime/index.ts';
|
|
8
9
|
import { createRuntimeStore } from '../runtime/store/index.ts';
|
|
9
10
|
import { createRuntimeServices } from '../runtime/services.ts';
|
|
10
|
-
import { DaemonServer } from '@pellux/goodvibes-sdk/platform/daemon
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { GlobalNetworkTransportInstaller } from '@pellux/goodvibes-sdk/platform/runtime/network/index';
|
|
14
|
-
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils/error-display';
|
|
11
|
+
import { DaemonServer, HttpListener } from '@pellux/goodvibes-sdk/platform/daemon';
|
|
12
|
+
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
13
|
+
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
15
14
|
import {
|
|
16
15
|
getOrCreateCompanionToken,
|
|
17
16
|
pruneStaleOperatorTokens,
|
|
18
17
|
buildCompanionConnectionInfo,
|
|
19
18
|
encodeConnectionPayload,
|
|
20
19
|
formatConnectionBlock,
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
generateQrMatrix,
|
|
21
|
+
renderQrToString,
|
|
22
|
+
} from '@pellux/goodvibes-sdk/platform/pairing';
|
|
23
23
|
import { workspaceOperatorTokenCandidates } from '../runtime/operator-token-cleanup.ts';
|
|
24
24
|
import {
|
|
25
25
|
scan,
|
|
26
26
|
loadPersistedProviders,
|
|
27
27
|
persistProviders,
|
|
28
|
-
} from '@pellux/goodvibes-sdk/platform/discovery
|
|
28
|
+
} from '@pellux/goodvibes-sdk/platform/discovery';
|
|
29
29
|
import { createSafeHostServeFactory } from './safe-serve.ts';
|
|
30
30
|
|
|
31
31
|
import {
|
|
@@ -138,13 +138,13 @@ async function main(): Promise<void> {
|
|
|
138
138
|
|
|
139
139
|
// Apply remaining CLI flags before the provider registry is constructed.
|
|
140
140
|
// These are runtime-only overrides; they must not rewrite settings.json.
|
|
141
|
-
if (cliFlags.provider !== undefined) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
applyRuntimeConfigValue(config, 'provider.model',
|
|
147
|
-
logger.info('daemon:
|
|
141
|
+
if (cliFlags.provider !== undefined || cliFlags.model !== undefined) {
|
|
142
|
+
const currentModel = config.get('provider.model');
|
|
143
|
+
const provider = cliFlags.provider ?? getProviderIdFromModel(currentModel);
|
|
144
|
+
const model = cliFlags.model ?? getModelIdFromProviderModel(currentModel);
|
|
145
|
+
const registryKey = formatProviderModel(provider, model);
|
|
146
|
+
applyRuntimeConfigValue(config, 'provider.model', registryKey);
|
|
147
|
+
logger.info('daemon: provider/model flags applied', { provider, model: registryKey });
|
|
148
148
|
}
|
|
149
149
|
const endpointOverrideErrors = applyRuntimeEndpointFlagOverrides(config, 'controlPlane', cliFlags);
|
|
150
150
|
if (endpointOverrideErrors.length > 0) {
|
package/src/daemon/safe-serve.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { logger } from '@pellux/goodvibes-sdk/platform/utils
|
|
2
|
-
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils
|
|
1
|
+
import { logger } from '@pellux/goodvibes-sdk/platform/utils';
|
|
2
|
+
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
3
3
|
|
|
4
4
|
type HostServeFetch = (
|
|
5
5
|
request: Request,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* selected index, scroll offset, and pending action.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { BookmarkEntry, BookmarkManager } from '@pellux/goodvibes-sdk/platform/bookmarks
|
|
8
|
+
import type { BookmarkEntry, BookmarkManager } from '@pellux/goodvibes-sdk/platform/bookmarks';
|
|
9
9
|
|
|
10
10
|
// ---------------------------------------------------------------------------
|
|
11
11
|
// BookmarkModal
|