@vybestack/llxprt-code 0.4.7 → 0.5.0-nightly.251102.f115237d
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/dist/package.json +7 -5
- package/dist/src/auth/__tests__/oauthManager.safety.test.d.ts +6 -0
- package/dist/src/auth/__tests__/oauthManager.safety.test.js +49 -0
- package/dist/src/auth/__tests__/oauthManager.safety.test.js.map +1 -0
- package/dist/src/auth/oauth-manager.d.ts +16 -0
- package/dist/src/auth/oauth-manager.js +81 -29
- package/dist/src/auth/oauth-manager.js.map +1 -1
- package/dist/src/auth/oauth-manager.spec.js +7 -2
- package/dist/src/auth/oauth-manager.spec.js.map +1 -1
- package/dist/src/commands/extensions.js +1 -1
- package/dist/src/commands/extensions.js.map +1 -1
- package/dist/src/config/__tests__/nonInteractiveTools.test.d.ts +6 -0
- package/dist/src/config/__tests__/nonInteractiveTools.test.js +13 -0
- package/dist/src/config/__tests__/nonInteractiveTools.test.js.map +1 -0
- package/dist/src/config/__tests__/profileBootstrap.test.d.ts +6 -0
- package/dist/src/config/__tests__/profileBootstrap.test.js +91 -0
- package/dist/src/config/__tests__/profileBootstrap.test.js.map +1 -0
- package/dist/src/config/config.d.ts +7 -2
- package/dist/src/config/config.js +225 -10
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.loadMemory.test.js +1 -0
- package/dist/src/config/config.loadMemory.test.js.map +1 -1
- package/dist/src/config/profileBootstrap.d.ts +64 -0
- package/dist/src/config/profileBootstrap.js +140 -0
- package/dist/src/config/profileBootstrap.js.map +1 -0
- package/dist/src/config/settings.env.test.d.ts +6 -0
- package/dist/src/config/settings.env.test.js +38 -0
- package/dist/src/config/settings.env.test.js.map +1 -0
- package/dist/src/config/settings.js +2 -2
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/gemini.js +70 -25
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +1 -2
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +1 -1
- package/dist/src/generated/git-commit.js +1 -1
- package/dist/src/integration-tests/base-url-behavior.integration.test.js +110 -450
- package/dist/src/integration-tests/base-url-behavior.integration.test.js.map +1 -1
- package/dist/src/integration-tests/model-params-isolation.integration.test.js +101 -539
- package/dist/src/integration-tests/model-params-isolation.integration.test.js.map +1 -1
- package/dist/src/integration-tests/modelParams.integration.test.js +86 -761
- package/dist/src/integration-tests/modelParams.integration.test.js.map +1 -1
- package/dist/src/integration-tests/provider-multi-runtime.integration.test.d.ts +6 -0
- package/dist/src/integration-tests/provider-multi-runtime.integration.test.js +198 -0
- package/dist/src/integration-tests/provider-multi-runtime.integration.test.js.map +1 -0
- package/dist/src/integration-tests/provider-switching.integration.test.js +97 -151
- package/dist/src/integration-tests/provider-switching.integration.test.js.map +1 -1
- package/dist/src/integration-tests/runtime-isolation.test.d.ts +13 -0
- package/dist/src/integration-tests/runtime-isolation.test.js +170 -0
- package/dist/src/integration-tests/runtime-isolation.test.js.map +1 -0
- package/dist/src/integration-tests/test-utils.js +19 -2
- package/dist/src/integration-tests/test-utils.js.map +1 -1
- package/dist/src/integration-tests/test-utils.test.js +9 -8
- package/dist/src/integration-tests/test-utils.test.js.map +1 -1
- package/dist/src/integration-tests/todo-continuation.integration.test.js +5 -2
- package/dist/src/integration-tests/todo-continuation.integration.test.js.map +1 -1
- package/dist/src/integration-tests/tools-governance.integration.test.d.ts +6 -0
- package/dist/src/integration-tests/tools-governance.integration.test.js +98 -0
- package/dist/src/integration-tests/tools-governance.integration.test.js.map +1 -0
- package/dist/src/nonInteractiveCli.js +36 -11
- package/dist/src/nonInteractiveCli.js.map +1 -1
- package/dist/src/providers/logging/git-stats.test.js +11 -1
- package/dist/src/providers/logging/git-stats.test.js.map +1 -1
- package/dist/src/providers/logging/multi-provider-logging.integration.test.js +1 -2
- package/dist/src/providers/logging/multi-provider-logging.integration.test.js.map +1 -1
- package/dist/src/providers/logging/performance.test.js +1 -1
- package/dist/src/providers/logging/performance.test.js.map +1 -1
- package/dist/src/providers/oauth-provider-registration.d.ts +2 -2
- package/dist/src/providers/oauth-provider-registration.js +25 -9
- package/dist/src/providers/oauth-provider-registration.js.map +1 -1
- package/dist/src/providers/provider-gemini-switching.test.js +67 -89
- package/dist/src/providers/provider-gemini-switching.test.js.map +1 -1
- package/dist/src/providers/provider-switching.integration.test.js +42 -98
- package/dist/src/providers/provider-switching.integration.test.js.map +1 -1
- package/dist/src/providers/providerConfigUtils.d.ts +12 -7
- package/dist/src/providers/providerConfigUtils.js +31 -99
- package/dist/src/providers/providerConfigUtils.js.map +1 -1
- package/dist/src/providers/providerManagerInstance.d.ts +17 -1
- package/dist/src/providers/providerManagerInstance.js +157 -175
- package/dist/src/providers/providerManagerInstance.js.map +1 -1
- package/dist/src/providers/providerManagerInstance.oauthRegistration.test.js +19 -15
- package/dist/src/providers/providerManagerInstance.oauthRegistration.test.js.map +1 -1
- package/dist/src/providers/providerManagerInstance.test.js +2 -5
- package/dist/src/providers/providerManagerInstance.test.js.map +1 -1
- package/dist/src/runtime/__tests__/profileApplication.test.d.ts +5 -0
- package/dist/src/runtime/__tests__/profileApplication.test.js +232 -0
- package/dist/src/runtime/__tests__/profileApplication.test.js.map +1 -0
- package/dist/src/runtime/__tests__/runtimeIsolation.test.d.ts +5 -0
- package/dist/src/runtime/__tests__/runtimeIsolation.test.js +376 -0
- package/dist/src/runtime/__tests__/runtimeIsolation.test.js.map +1 -0
- package/dist/src/runtime/agentRuntimeAdapter.d.ts +249 -0
- package/dist/src/runtime/agentRuntimeAdapter.js +506 -0
- package/dist/src/runtime/agentRuntimeAdapter.js.map +1 -0
- package/dist/src/runtime/agentRuntimeAdapter.spec.d.ts +6 -0
- package/dist/src/runtime/agentRuntimeAdapter.spec.js +866 -0
- package/dist/src/runtime/agentRuntimeAdapter.spec.js.map +1 -0
- package/dist/src/runtime/messages.d.ts +28 -0
- package/dist/src/runtime/messages.js +64 -0
- package/dist/src/runtime/messages.js.map +1 -0
- package/dist/src/runtime/profileApplication.d.ts +33 -0
- package/dist/src/runtime/profileApplication.js +191 -0
- package/dist/src/runtime/profileApplication.js.map +1 -0
- package/dist/src/runtime/providerConfigUtils.test.d.ts +1 -0
- package/dist/src/runtime/providerConfigUtils.test.js +68 -0
- package/dist/src/runtime/providerConfigUtils.test.js.map +1 -0
- package/dist/src/runtime/runtimeContextFactory.d.ts +102 -0
- package/dist/src/runtime/runtimeContextFactory.js +190 -0
- package/dist/src/runtime/runtimeContextFactory.js.map +1 -0
- package/dist/src/runtime/runtimeSettings.d.ts +217 -0
- package/dist/src/runtime/runtimeSettings.js +1094 -0
- package/dist/src/runtime/runtimeSettings.js.map +1 -0
- package/dist/src/runtime/runtimeSettings.test.d.ts +1 -0
- package/dist/src/runtime/runtimeSettings.test.js +320 -0
- package/dist/src/runtime/runtimeSettings.test.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.d.ts +13 -4
- package/dist/src/services/BuiltinCommandLoader.js +17 -4
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/McpPromptLoader.js +34 -13
- package/dist/src/services/McpPromptLoader.js.map +1 -1
- package/dist/src/settings/ephemeralSettings.js +3 -2
- package/dist/src/settings/ephemeralSettings.js.map +1 -1
- package/dist/src/test-utils/mockCommandContext.js +5 -2
- package/dist/src/test-utils/mockCommandContext.js.map +1 -1
- package/dist/src/ui/App.js +29 -49
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/commands/aboutCommand.js +29 -0
- package/dist/src/ui/commands/aboutCommand.js.map +1 -1
- package/dist/src/ui/commands/authCommand.js +15 -12
- package/dist/src/ui/commands/authCommand.js.map +1 -1
- package/dist/src/ui/commands/baseurlCommand.js +8 -44
- package/dist/src/ui/commands/baseurlCommand.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.js +28 -12
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/diagnosticsCommand.d.ts +0 -3
- package/dist/src/ui/commands/diagnosticsCommand.js +40 -191
- package/dist/src/ui/commands/diagnosticsCommand.js.map +1 -1
- package/dist/src/ui/commands/docsCommand.js +1 -1
- package/dist/src/ui/commands/docsCommand.js.map +1 -1
- package/dist/src/ui/commands/keyCommand.js +9 -58
- package/dist/src/ui/commands/keyCommand.js.map +1 -1
- package/dist/src/ui/commands/keyCommand.test.js +48 -102
- package/dist/src/ui/commands/keyCommand.test.js.map +1 -1
- package/dist/src/ui/commands/keyfileCommand.js +42 -93
- package/dist/src/ui/commands/keyfileCommand.js.map +1 -1
- package/dist/src/ui/commands/logoutCommand.js +2 -2
- package/dist/src/ui/commands/logoutCommand.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.js +29 -7
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/modelCommand.js +8 -59
- package/dist/src/ui/commands/modelCommand.js.map +1 -1
- package/dist/src/ui/commands/profileCommand.js +151 -267
- package/dist/src/ui/commands/profileCommand.js.map +1 -1
- package/dist/src/ui/commands/profileCommand.test.js +88 -344
- package/dist/src/ui/commands/profileCommand.test.js.map +1 -1
- package/dist/src/ui/commands/providerCommand.js +9 -3
- package/dist/src/ui/commands/providerCommand.js.map +1 -1
- package/dist/src/ui/commands/restoreCommand.js +38 -18
- package/dist/src/ui/commands/restoreCommand.js.map +1 -1
- package/dist/src/ui/commands/schema/argumentResolver.test.d.ts +6 -0
- package/dist/src/ui/commands/schema/argumentResolver.test.js +619 -0
- package/dist/src/ui/commands/schema/argumentResolver.test.js.map +1 -0
- package/dist/src/ui/commands/schema/index.d.ts +15 -0
- package/dist/src/ui/commands/schema/index.js +320 -0
- package/dist/src/ui/commands/schema/index.js.map +1 -0
- package/dist/src/ui/commands/schema/types.d.ts +61 -0
- package/dist/src/ui/commands/schema/types.js +12 -0
- package/dist/src/ui/commands/schema/types.js.map +1 -0
- package/dist/src/ui/commands/setCommand.js +641 -325
- package/dist/src/ui/commands/setCommand.js.map +1 -1
- package/dist/src/ui/commands/setCommand.test.js +92 -388
- package/dist/src/ui/commands/setCommand.test.js.map +1 -1
- package/dist/src/ui/commands/statusCommand.js +2 -2
- package/dist/src/ui/commands/statusCommand.js.map +1 -1
- package/dist/src/ui/commands/subagentCommand.d.ts +16 -0
- package/dist/src/ui/commands/subagentCommand.js +656 -0
- package/dist/src/ui/commands/subagentCommand.js.map +1 -0
- package/dist/src/ui/commands/test/setCommand.mutation.test.d.ts +6 -0
- package/dist/src/ui/commands/test/setCommand.mutation.test.js +132 -0
- package/dist/src/ui/commands/test/setCommand.mutation.test.js.map +1 -0
- package/dist/src/ui/commands/test/setCommand.phase09.test.d.ts +6 -0
- package/dist/src/ui/commands/test/setCommand.phase09.test.js +222 -0
- package/dist/src/ui/commands/test/setCommand.phase09.test.js.map +1 -0
- package/dist/src/ui/commands/test/subagentCommand.schema.test.d.ts +6 -0
- package/dist/src/ui/commands/test/subagentCommand.schema.test.js +125 -0
- package/dist/src/ui/commands/test/subagentCommand.schema.test.js.map +1 -0
- package/dist/src/ui/commands/test/subagentCommand.test.d.ts +1 -0
- package/dist/src/ui/commands/test/subagentCommand.test.js +589 -0
- package/dist/src/ui/commands/test/subagentCommand.test.js.map +1 -0
- package/dist/src/ui/commands/toolformatCommand.js +25 -98
- package/dist/src/ui/commands/toolformatCommand.js.map +1 -1
- package/dist/src/ui/commands/toolformatCommand.test.js +56 -102
- package/dist/src/ui/commands/toolformatCommand.test.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.js +187 -31
- package/dist/src/ui/commands/toolsCommand.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +11 -2
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/components/AboutBox.d.ts +4 -0
- package/dist/src/ui/components/AboutBox.js +1 -1
- package/dist/src/ui/components/AboutBox.js.map +1 -1
- package/dist/src/ui/components/AuthDialog.js +4 -3
- package/dist/src/ui/components/AuthDialog.js.map +1 -1
- package/dist/src/ui/components/AuthDialog.test.js +67 -1
- package/dist/src/ui/components/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/components/Footer.js +4 -5
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +2 -0
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/InputPrompt.js +18 -6
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.js +1 -1
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/StatsDisplay.js +6 -11
- package/dist/src/ui/components/StatsDisplay.js.map +1 -1
- package/dist/src/ui/components/SuggestionsDisplay.d.ts +13 -1
- package/dist/src/ui/components/SuggestionsDisplay.js +22 -3
- package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
- package/dist/src/ui/components/WorkspaceMigrationDialog.js +1 -1
- package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.js +14 -14
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js +1 -0
- package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.js +4 -1
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/containers/SessionController.js +61 -117
- package/dist/src/ui/containers/SessionController.js.map +1 -1
- package/dist/src/ui/contexts/RuntimeContext.d.ts +61 -0
- package/dist/src/ui/contexts/RuntimeContext.js +118 -0
- package/dist/src/ui/contexts/RuntimeContext.js.map +1 -0
- package/dist/src/ui/contexts/TodoProvider.d.ts +1 -0
- package/dist/src/ui/contexts/TodoProvider.js +10 -8
- package/dist/src/ui/contexts/TodoProvider.js.map +1 -1
- package/dist/src/ui/contexts/ToolCallProvider.d.ts +1 -0
- package/dist/src/ui/contexts/ToolCallProvider.js +10 -9
- package/dist/src/ui/contexts/ToolCallProvider.js.map +1 -1
- package/dist/src/ui/hooks/__tests__/useSlashCompletion.set.phase09.test.d.ts +6 -0
- package/dist/src/ui/hooks/__tests__/useSlashCompletion.set.phase09.test.js +39 -0
- package/dist/src/ui/hooks/__tests__/useSlashCompletion.set.phase09.test.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +11 -3
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js +3 -1
- package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.js +4 -1
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +1 -0
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.js +29 -1
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useAuthCommand.js +11 -3
- package/dist/src/ui/hooks/useAuthCommand.js.map +1 -1
- package/dist/src/ui/hooks/useCommandCompletion.d.ts +1 -0
- package/dist/src/ui/hooks/useCommandCompletion.js +2 -0
- package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.js +37 -11
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.subagent.spec.d.ts +6 -0
- package/dist/src/ui/hooks/useGeminiStream.subagent.spec.js +232 -0
- package/dist/src/ui/hooks/useGeminiStream.subagent.spec.js.map +1 -0
- package/dist/src/ui/hooks/useLoadProfileDialog.d.ts +1 -1
- package/dist/src/ui/hooks/useLoadProfileDialog.js +18 -57
- package/dist/src/ui/hooks/useLoadProfileDialog.js.map +1 -1
- package/dist/src/ui/hooks/useOpenAIProviderInfo.d.ts +1 -1
- package/dist/src/ui/hooks/useOpenAIProviderInfo.js +12 -7
- package/dist/src/ui/hooks/useOpenAIProviderInfo.js.map +1 -1
- package/dist/src/ui/hooks/useProviderDialog.d.ts +1 -1
- package/dist/src/ui/hooks/useProviderDialog.js +17 -90
- package/dist/src/ui/hooks/useProviderDialog.js.map +1 -1
- package/dist/src/ui/hooks/useProviderModelDialog.d.ts +2 -2
- package/dist/src/ui/hooks/useProviderModelDialog.js +11 -12
- package/dist/src/ui/hooks/useProviderModelDialog.js.map +1 -1
- package/dist/src/ui/hooks/useReactToolScheduler.d.ts +3 -1
- package/dist/src/ui/hooks/useReactToolScheduler.js +144 -34
- package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.d.ts +32 -0
- package/dist/src/ui/hooks/useSlashCompletion.js +154 -77
- package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useSlashCompletion.test.js +39 -14
- package/dist/src/ui/hooks/useSlashCompletion.test.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +108 -79
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -1
- package/dist/src/ui/types.d.ts +5 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.js +16 -0
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
- package/dist/src/ui/utils/TableRenderer.js +213 -40
- package/dist/src/ui/utils/TableRenderer.js.map +1 -1
- package/dist/src/utils/sandbox.js +1 -1
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/validateNonInterActiveAuth.js +4 -2
- package/dist/src/validateNonInterActiveAuth.js.map +1 -1
- package/dist/src/zed-integration/schema.d.ts +30 -30
- package/dist/src/zed-integration/zedIntegration.js +112 -39
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/package.json +7 -5
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Vybestack LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
8
|
+
* @requirement REQ-STAT5-002
|
|
9
|
+
* @pseudocode cli-runtime-adapter.md lines 44-688
|
|
10
|
+
*
|
|
11
|
+
* CLI Runtime Adapter - bridges CLI commands and AgentRuntimeState abstraction.
|
|
12
|
+
* Phase 08: GREEN implementation to make all TDD tests pass.
|
|
13
|
+
*/
|
|
14
|
+
import type { Config, AgentRuntimeState, RuntimeStateParams, RuntimeStateSnapshot } from '@vybestack/llxprt-code-core';
|
|
15
|
+
import { AuthType } from '@vybestack/llxprt-code-core';
|
|
16
|
+
/**
|
|
17
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
18
|
+
* @requirement REQ-STAT5-002.1
|
|
19
|
+
* @pseudocode cli-runtime-adapter.md lines 51-88
|
|
20
|
+
*
|
|
21
|
+
* AgentRuntimeAdapter manages the foreground agent runtime state and provides
|
|
22
|
+
* a stable API for CLI commands and helpers. It bridges AgentRuntimeState with
|
|
23
|
+
* legacy Config for UI compatibility during the migration.
|
|
24
|
+
*/
|
|
25
|
+
export declare class AgentRuntimeAdapter {
|
|
26
|
+
/**
|
|
27
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
28
|
+
* @requirement REQ-STAT5-002.1
|
|
29
|
+
* @pseudocode cli-runtime-adapter.md lines 52-54
|
|
30
|
+
*/
|
|
31
|
+
private runtimeState;
|
|
32
|
+
private legacyConfig;
|
|
33
|
+
private runtimeId;
|
|
34
|
+
private unsubscribe;
|
|
35
|
+
/**
|
|
36
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
37
|
+
* @requirement REQ-STAT5-002.1
|
|
38
|
+
* @pseudocode cli-runtime-adapter.md lines 56-75
|
|
39
|
+
*
|
|
40
|
+
* Creates a new adapter instance.
|
|
41
|
+
*/
|
|
42
|
+
constructor(initialState: AgentRuntimeState, legacyConfig: Config);
|
|
43
|
+
/**
|
|
44
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
45
|
+
* @requirement REQ-STAT5-002.3
|
|
46
|
+
* @pseudocode cli-runtime-adapter.md lines 76-87
|
|
47
|
+
*
|
|
48
|
+
* Handles runtime state change events.
|
|
49
|
+
*/
|
|
50
|
+
private handleStateChange;
|
|
51
|
+
/**
|
|
52
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
53
|
+
* @requirement REQ-STAT5-002.1
|
|
54
|
+
* @pseudocode cli-runtime-adapter.md lines 199-203
|
|
55
|
+
*
|
|
56
|
+
* Returns the current provider name.
|
|
57
|
+
*/
|
|
58
|
+
getProvider(): string;
|
|
59
|
+
/**
|
|
60
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
61
|
+
* @requirement REQ-STAT5-002.1
|
|
62
|
+
* @pseudocode cli-runtime-adapter.md lines 205-206
|
|
63
|
+
*
|
|
64
|
+
* Returns the current model name.
|
|
65
|
+
*/
|
|
66
|
+
getModel(): string;
|
|
67
|
+
/**
|
|
68
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
69
|
+
* @requirement REQ-STAT5-002.1
|
|
70
|
+
* @pseudocode cli-runtime-adapter.md lines 208-209
|
|
71
|
+
*
|
|
72
|
+
* Returns the current auth type.
|
|
73
|
+
*/
|
|
74
|
+
getAuthType(): AuthType;
|
|
75
|
+
/**
|
|
76
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
77
|
+
* @requirement REQ-STAT5-002.1
|
|
78
|
+
* @pseudocode cli-runtime-adapter.md lines 211-212
|
|
79
|
+
*
|
|
80
|
+
* Returns the current session ID.
|
|
81
|
+
*/
|
|
82
|
+
getSessionId(): string;
|
|
83
|
+
/**
|
|
84
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
85
|
+
* @requirement REQ-STAT5-002.1
|
|
86
|
+
* @pseudocode cli-runtime-adapter.md lines 214-215
|
|
87
|
+
*
|
|
88
|
+
* Returns the current base URL.
|
|
89
|
+
*/
|
|
90
|
+
getBaseUrl(): string | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
93
|
+
* @requirement REQ-STAT5-002.1
|
|
94
|
+
* @pseudocode cli-runtime-adapter.md lines 217-218
|
|
95
|
+
*
|
|
96
|
+
* Returns the current runtime state.
|
|
97
|
+
*/
|
|
98
|
+
getRuntimeState(): AgentRuntimeState;
|
|
99
|
+
/**
|
|
100
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
101
|
+
* @requirement REQ-STAT5-001.3
|
|
102
|
+
* @pseudocode cli-runtime-adapter.md lines 220-221
|
|
103
|
+
*
|
|
104
|
+
* Returns a sanitized snapshot for diagnostics.
|
|
105
|
+
*/
|
|
106
|
+
getSnapshot(): RuntimeStateSnapshot;
|
|
107
|
+
/**
|
|
108
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
109
|
+
* @requirement REQ-STAT5-002.1
|
|
110
|
+
* @requirement REQ-STAT5-002.3
|
|
111
|
+
* @pseudocode cli-runtime-adapter.md lines 227-249
|
|
112
|
+
*
|
|
113
|
+
* Sets the provider and updates default model.
|
|
114
|
+
*/
|
|
115
|
+
setProvider(providerName: string): void;
|
|
116
|
+
/**
|
|
117
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
118
|
+
* @requirement REQ-STAT5-002.1
|
|
119
|
+
* @requirement REQ-STAT5-002.3
|
|
120
|
+
* @pseudocode cli-runtime-adapter.md lines 250-256
|
|
121
|
+
*
|
|
122
|
+
* Sets the model name.
|
|
123
|
+
*/
|
|
124
|
+
setModel(modelName: string): void;
|
|
125
|
+
/**
|
|
126
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
127
|
+
* @requirement REQ-STAT5-002.1
|
|
128
|
+
* @requirement REQ-STAT5-002.3
|
|
129
|
+
* @pseudocode cli-runtime-adapter.md lines 258-264
|
|
130
|
+
*
|
|
131
|
+
* Sets the auth type.
|
|
132
|
+
*/
|
|
133
|
+
setAuthType(authType: AuthType): void;
|
|
134
|
+
/**
|
|
135
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
136
|
+
* @requirement REQ-STAT5-002.1
|
|
137
|
+
* @requirement REQ-STAT5-002.3
|
|
138
|
+
* @pseudocode cli-runtime-adapter.md lines 266-272
|
|
139
|
+
*
|
|
140
|
+
* Sets the base URL.
|
|
141
|
+
*/
|
|
142
|
+
setBaseUrl(baseUrl: string): void;
|
|
143
|
+
/**
|
|
144
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
145
|
+
* @requirement REQ-STAT5-002.1
|
|
146
|
+
* @requirement REQ-STAT5-002.3
|
|
147
|
+
* @pseudocode cli-runtime-adapter.md lines 280-316
|
|
148
|
+
*
|
|
149
|
+
* Atomically switches provider with optional model and settings.
|
|
150
|
+
*/
|
|
151
|
+
switchProvider(providerName: string, options?: {
|
|
152
|
+
model?: string;
|
|
153
|
+
clearSettings?: boolean;
|
|
154
|
+
}): void;
|
|
155
|
+
/**
|
|
156
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
157
|
+
* @requirement REQ-STAT5-002.3
|
|
158
|
+
* @pseudocode cli-runtime-adapter.md lines 329-351
|
|
159
|
+
*
|
|
160
|
+
* Mirrors runtime state to legacy Config for UI compatibility.
|
|
161
|
+
*/
|
|
162
|
+
private mirrorStateToConfig;
|
|
163
|
+
/**
|
|
164
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
165
|
+
* @requirement REQ-STAT5-002.1
|
|
166
|
+
* @pseudocode cli-runtime-adapter.md lines 597-609
|
|
167
|
+
*
|
|
168
|
+
* Cleans up adapter resources and unsubscribes from events.
|
|
169
|
+
*/
|
|
170
|
+
dispose(): void;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
174
|
+
* @requirement REQ-STAT5-002.1
|
|
175
|
+
* @pseudocode cli-runtime-adapter.md lines 366-376
|
|
176
|
+
*
|
|
177
|
+
* Sets the global runtime adapter (called during CLI bootstrap).
|
|
178
|
+
*/
|
|
179
|
+
export declare function setRuntimeAdapter(adapter: AgentRuntimeAdapter): void;
|
|
180
|
+
/**
|
|
181
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
182
|
+
* @requirement REQ-STAT5-002.1
|
|
183
|
+
* @pseudocode cli-runtime-adapter.md lines 366-376
|
|
184
|
+
*
|
|
185
|
+
* Gets the global runtime adapter (used by CLI helpers).
|
|
186
|
+
*/
|
|
187
|
+
export declare function getRuntimeAdapter(): AgentRuntimeAdapter;
|
|
188
|
+
/**
|
|
189
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
190
|
+
* @requirement REQ-STAT5-002.1
|
|
191
|
+
*
|
|
192
|
+
* Resets the global runtime adapter (for testing).
|
|
193
|
+
*/
|
|
194
|
+
export declare function resetRuntimeAdapter(): void;
|
|
195
|
+
/**
|
|
196
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
197
|
+
* @requirement REQ-STAT5-002.2
|
|
198
|
+
* @pseudocode cli-runtime-adapter.md lines 101-132
|
|
199
|
+
*
|
|
200
|
+
* CLI flags for runtime state initialization.
|
|
201
|
+
*/
|
|
202
|
+
export interface CliFlags {
|
|
203
|
+
provider?: string;
|
|
204
|
+
model?: string;
|
|
205
|
+
key?: string;
|
|
206
|
+
keyfile?: string;
|
|
207
|
+
set?: Array<[string, string]>;
|
|
208
|
+
profileLoad?: string;
|
|
209
|
+
[key: string]: unknown;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
213
|
+
* @requirement REQ-STAT5-002.2
|
|
214
|
+
* @pseudocode cli-runtime-adapter.md lines 138-186
|
|
215
|
+
*
|
|
216
|
+
* Resolves runtime state parameters from CLI flags and config.
|
|
217
|
+
*/
|
|
218
|
+
export declare function resolveRuntimeStateFromFlags(flags: CliFlags, config: Config): RuntimeStateParams;
|
|
219
|
+
/**
|
|
220
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
221
|
+
* @requirement REQ-STAT5-002.2
|
|
222
|
+
* @pseudocode cli-runtime-adapter.md lines 101-132
|
|
223
|
+
*
|
|
224
|
+
* Bootstrap result containing adapter and client.
|
|
225
|
+
*/
|
|
226
|
+
export interface BootstrapResult {
|
|
227
|
+
adapter: AgentRuntimeAdapter;
|
|
228
|
+
client: unknown;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
232
|
+
* @requirement REQ-STAT5-002.2
|
|
233
|
+
* @pseudocode cli-runtime-adapter.md lines 101-132
|
|
234
|
+
*
|
|
235
|
+
* Bootstraps the foreground agent runtime from CLI flags.
|
|
236
|
+
*/
|
|
237
|
+
export declare function bootstrapForegroundAgent(cliFlags: CliFlags, config: Config): Promise<BootstrapResult>;
|
|
238
|
+
/**
|
|
239
|
+
* @plan PLAN-20251027-STATELESS5.P08
|
|
240
|
+
* @requirement REQ-STAT5-002.1
|
|
241
|
+
* @pseudocode cli-runtime-adapter.md lines 378-398
|
|
242
|
+
*
|
|
243
|
+
* Legacy helper functions that delegate to the global adapter.
|
|
244
|
+
*/
|
|
245
|
+
export declare function setRuntimeProvider(providerName: string): void;
|
|
246
|
+
export declare function getRuntimeProvider(): string;
|
|
247
|
+
export declare function setRuntimeModel(modelName: string): void;
|
|
248
|
+
export declare function getRuntimeModel(): string;
|
|
249
|
+
export declare function switchRuntimeProvider(providerName: string, model?: string): void;
|