@vybestack/llxprt-code-core 0.11.0 → 0.12.0-nightly.260910.2aac6841e
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/prompt-config/defaults/default-prompts.json +3 -3
- package/dist/src/config/agentClientLifecycle.d.ts +4 -3
- package/dist/src/config/agentClientLifecycle.js +27 -14
- package/dist/src/config/agentClientLifecycle.js.map +1 -1
- package/dist/src/config/config.d.ts +2 -5
- package/dist/src/config/config.js +10 -23
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/configBase.d.ts +5 -1
- package/dist/src/config/configBase.js +27 -6
- package/dist/src/config/configBase.js.map +1 -1
- package/dist/src/config/configBaseCore.d.ts +26 -8
- package/dist/src/config/configBaseCore.js +30 -26
- package/dist/src/config/configBaseCore.js.map +1 -1
- package/dist/src/config/configMcpRuntime.d.ts +16 -0
- package/dist/src/config/configMcpRuntime.js +31 -0
- package/dist/src/config/configMcpRuntime.js.map +1 -0
- package/dist/src/config/configMediaDefaults.d.ts +10 -0
- package/dist/src/config/configMediaDefaults.js +17 -0
- package/dist/src/config/configMediaDefaults.js.map +1 -0
- package/dist/src/config/configTestHarness.d.ts +4 -0
- package/dist/src/config/configTypes.d.ts +4 -54
- package/dist/src/config/configTypes.js +6 -82
- package/dist/src/config/configTypes.js.map +1 -1
- package/dist/src/config/index.d.ts +1 -2
- package/dist/src/config/index.js +1 -2
- package/dist/src/config/index.js.map +1 -1
- package/dist/src/config/models.d.ts +0 -4
- package/dist/src/config/models.js +0 -4
- package/dist/src/config/models.js.map +1 -1
- package/dist/src/config/toolRegistryFactory.d.ts +2 -2
- package/dist/src/core/clientContract.d.ts +4 -6
- package/dist/src/core/compression/transcriptPathNotice.d.ts +22 -0
- package/dist/src/core/compression/transcriptPathNotice.js +29 -0
- package/dist/src/core/compression/transcriptPathNotice.js.map +1 -0
- package/dist/src/core/contentGenerator.d.ts +2 -5
- package/dist/src/core/contentGenerator.js +10 -24
- package/dist/src/core/contentGenerator.js.map +1 -1
- package/dist/src/core/logger.d.ts +66 -0
- package/dist/src/core/logger.js +345 -30
- package/dist/src/core/logger.js.map +1 -1
- package/dist/src/core/prompts.d.ts +0 -1
- package/dist/src/core/prompts.js +5 -79
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/core/turn.d.ts +3 -3
- package/dist/src/hooks/hookTranslator.js +5 -4
- package/dist/src/hooks/hookTranslator.js.map +1 -1
- package/dist/src/index.d.ts +8 -6
- package/dist/src/index.js +8 -6
- package/dist/src/index.js.map +1 -1
- package/dist/src/llm-types/index.d.ts +1 -1
- package/dist/src/llm-types/modelEnvelope.d.ts +2 -1
- package/dist/src/llm-types/modelEnvelope.js +17 -1
- package/dist/src/llm-types/modelEnvelope.js.map +1 -1
- package/dist/src/models/schema.d.ts +40 -40
- package/dist/src/policy/policies/read-only.toml +0 -5
- package/dist/src/prompt-config/TemplateEngine.js +0 -3
- package/dist/src/prompt-config/TemplateEngine.js.map +1 -1
- package/dist/src/prompt-config/defaults/providers/gemini/core.md +0 -2
- package/dist/src/prompt-config/defaults/providers/gemini/models/gemini-2.5-flash/core.md +0 -2
- package/dist/src/prompt-config/defaults/providers/gemini/models/gemini-2.5-flash/gemini-2-5-flash/core.md +0 -2
- package/dist/src/prompt-config/prompt-loader.d.ts +1 -1
- package/dist/src/prompt-config/prompt-loader.js +4 -4
- package/dist/src/prompt-config/prompt-loader.js.map +1 -1
- package/dist/src/prompt-config/types.d.ts +0 -1
- package/dist/src/recording/CheckpointService.d.ts +4 -0
- package/dist/src/recording/CheckpointService.js +67 -46
- package/dist/src/recording/CheckpointService.js.map +1 -1
- package/dist/src/recording/HistoryMutationService.d.ts +1 -1
- package/dist/src/recording/HistoryMutationService.js +27 -4
- package/dist/src/recording/HistoryMutationService.js.map +1 -1
- package/dist/src/recording/RecordingIntegration.d.ts +36 -2
- package/dist/src/recording/RecordingIntegration.js +224 -7
- package/dist/src/recording/RecordingIntegration.js.map +1 -1
- package/dist/src/recording/ReplayEngine.d.ts +8 -10
- package/dist/src/recording/ReplayEngine.js +161 -95
- package/dist/src/recording/ReplayEngine.js.map +1 -1
- package/dist/src/recording/SessionDiscovery.d.ts +4 -2
- package/dist/src/recording/SessionDiscovery.js +13 -5
- package/dist/src/recording/SessionDiscovery.js.map +1 -1
- package/dist/src/recording/SessionRecordingService.d.ts +23 -3
- package/dist/src/recording/SessionRecordingService.js +209 -51
- package/dist/src/recording/SessionRecordingService.js.map +1 -1
- package/dist/src/recording/SessionTransitionService.d.ts +7 -0
- package/dist/src/recording/SessionTransitionService.js +66 -13
- package/dist/src/recording/SessionTransitionService.js.map +1 -1
- package/dist/src/recording/index.d.ts +1 -0
- package/dist/src/recording/index.js +1 -0
- package/dist/src/recording/index.js.map +1 -1
- package/dist/src/recording/janitor/cleanupTypes.d.ts +3 -0
- package/dist/src/recording/janitor/cleanupTypes.js.map +1 -1
- package/dist/src/recording/janitor/mediaReclamation.d.ts +23 -0
- package/dist/src/recording/janitor/mediaReclamation.js +195 -0
- package/dist/src/recording/janitor/mediaReclamation.js.map +1 -0
- package/dist/src/recording/janitor/sessionJanitor.js +47 -1
- package/dist/src/recording/janitor/sessionJanitor.js.map +1 -1
- package/dist/src/recording/janitor/sessionScanner.d.ts +12 -9
- package/dist/src/recording/janitor/sessionScanner.js +248 -193
- package/dist/src/recording/janitor/sessionScanner.js.map +1 -1
- package/dist/src/recording/replay-test-helpers.d.ts +10 -1
- package/dist/src/recording/replay-test-helpers.js +24 -2
- package/dist/src/recording/replay-test-helpers.js.map +1 -1
- package/dist/src/recording/replayCheckpointMetadata.d.ts +28 -0
- package/dist/src/recording/replayCheckpointMetadata.js +96 -0
- package/dist/src/recording/replayCheckpointMetadata.js.map +1 -0
- package/dist/src/recording/replayErrorFormatting.d.ts +6 -0
- package/dist/src/recording/replayErrorFormatting.js +38 -0
- package/dist/src/recording/replayErrorFormatting.js.map +1 -0
- package/dist/src/recording/resumeSession.d.ts +3 -0
- package/dist/src/recording/resumeSession.js +7 -1
- package/dist/src/recording/resumeSession.js.map +1 -1
- package/dist/src/recording/semanticMediaPurgeReplayValidation.d.ts +14 -0
- package/dist/src/recording/semanticMediaPurgeReplayValidation.js +24 -0
- package/dist/src/recording/semanticMediaPurgeReplayValidation.js.map +1 -0
- package/dist/src/recording/session-media-package-blobs.d.ts +8 -0
- package/dist/src/recording/session-media-package-blobs.js +72 -0
- package/dist/src/recording/session-media-package-blobs.js.map +1 -0
- package/dist/src/recording/session-media-package-import.d.ts +26 -0
- package/dist/src/recording/session-media-package-import.js +124 -0
- package/dist/src/recording/session-media-package-import.js.map +1 -0
- package/dist/src/recording/session-media-package-state.d.ts +19 -0
- package/dist/src/recording/session-media-package-state.js +56 -0
- package/dist/src/recording/session-media-package-state.js.map +1 -0
- package/dist/src/recording/session-media-package-validation.d.ts +59 -0
- package/dist/src/recording/session-media-package-validation.js +286 -0
- package/dist/src/recording/session-media-package-validation.js.map +1 -0
- package/dist/src/recording/session-media-package-writer.d.ts +18 -0
- package/dist/src/recording/session-media-package-writer.js +70 -0
- package/dist/src/recording/session-media-package-writer.js.map +1 -0
- package/dist/src/recording/session-media-package.d.ts +27 -0
- package/dist/src/recording/session-media-package.js +366 -0
- package/dist/src/recording/session-media-package.js.map +1 -0
- package/dist/src/recording/types.d.ts +34 -2
- package/dist/src/recording/types.js.map +1 -1
- package/dist/src/runtime/AgentRuntimeContext.d.ts +22 -5
- package/dist/src/runtime/AgentRuntimeLoader.d.ts +6 -0
- package/dist/src/runtime/AgentRuntimeLoader.js +25 -6
- package/dist/src/runtime/AgentRuntimeLoader.js.map +1 -1
- package/dist/src/runtime/contracts/PromptEstimation.d.ts +1 -0
- package/dist/src/runtime/contracts/PromptEstimation.js.map +1 -1
- package/dist/src/runtime/contracts/RuntimeProvider.d.ts +3 -2
- package/dist/src/runtime/contracts/RuntimeProviderManager.d.ts +0 -2
- package/dist/src/runtime/createAgentRuntimeContext.js +28 -1
- package/dist/src/runtime/createAgentRuntimeContext.js.map +1 -1
- package/dist/src/runtime/providerRuntimeContext.d.ts +12 -0
- package/dist/src/runtime/providerRuntimeContext.js +3 -0
- package/dist/src/runtime/providerRuntimeContext.js.map +1 -1
- package/dist/src/runtime/runtimeAdapters.js +2 -2
- package/dist/src/runtime/runtimeAdapters.js.map +1 -1
- package/dist/src/services/history/ContentConverters.d.ts +11 -7
- package/dist/src/services/history/ContentConverters.js +11 -7
- package/dist/src/services/history/ContentConverters.js.map +1 -1
- package/dist/src/services/history/HistoryService.d.ts +18 -180
- package/dist/src/services/history/HistoryService.js +53 -523
- package/dist/src/services/history/HistoryService.js.map +1 -1
- package/dist/src/services/history/HistoryServiceCore.d.ts +278 -0
- package/dist/src/services/history/HistoryServiceCore.js +727 -0
- package/dist/src/services/history/HistoryServiceCore.js.map +1 -0
- package/dist/src/services/history/IContent.d.ts +118 -16
- package/dist/src/services/history/IContent.js +284 -4
- package/dist/src/services/history/IContent.js.map +1 -1
- package/dist/src/services/history/contentSize.js +22 -2
- package/dist/src/services/history/contentSize.js.map +1 -1
- package/dist/src/services/history/historyChronology.d.ts +7 -0
- package/dist/src/services/history/historyChronology.js +35 -3
- package/dist/src/services/history/historyChronology.js.map +1 -1
- package/dist/src/services/history/historyCloneUtils.d.ts +5 -4
- package/dist/src/services/history/historyCloneUtils.js +23 -16
- package/dist/src/services/history/historyCloneUtils.js.map +1 -1
- package/dist/src/services/history/historyCompressionQueue.d.ts +33 -0
- package/dist/src/services/history/historyCompressionQueue.js +81 -0
- package/dist/src/services/history/historyCompressionQueue.js.map +1 -0
- package/dist/src/services/history/historyEventTypes.d.ts +3 -0
- package/dist/src/services/history/historyMutationFailure.d.ts +15 -0
- package/dist/src/services/history/historyMutationFailure.js +22 -0
- package/dist/src/services/history/historyMutationFailure.js.map +1 -1
- package/dist/src/services/history/historyProviderPipeline.d.ts +1 -1
- package/dist/src/services/history/historyProviderPipeline.js +15 -5
- package/dist/src/services/history/historyProviderPipeline.js.map +1 -1
- package/dist/src/services/history/historyTokenEstimation.js +10 -6
- package/dist/src/services/history/historyTokenEstimation.js.map +1 -1
- package/dist/src/services/history/historyToolNormalization.d.ts +2 -0
- package/dist/src/services/history/historyToolNormalization.js +26 -9
- package/dist/src/services/history/historyToolNormalization.js.map +1 -1
- package/dist/src/services/history/provider-file-binding.d.ts +11 -0
- package/dist/src/services/history/provider-file-binding.js +70 -0
- package/dist/src/services/history/provider-file-binding.js.map +1 -0
- package/dist/src/services/history/semantic-media-purge.d.ts +66 -0
- package/dist/src/services/history/semantic-media-purge.js +404 -0
- package/dist/src/services/history/semantic-media-purge.js.map +1 -0
- package/dist/src/storage/SessionPersistenceService.d.ts +53 -2
- package/dist/src/storage/SessionPersistenceService.js +435 -23
- package/dist/src/storage/SessionPersistenceService.js.map +1 -1
- package/dist/src/storage/history-media-ownership.d.ts +38 -0
- package/dist/src/storage/history-media-ownership.js +136 -0
- package/dist/src/storage/history-media-ownership.js.map +1 -0
- package/dist/src/storage/local-media-store-child.d.ts +6 -0
- package/dist/src/storage/local-media-store-child.js +140 -0
- package/dist/src/storage/local-media-store-child.js.map +1 -0
- package/dist/src/storage/local-media-store-files.d.ts +44 -0
- package/dist/src/storage/local-media-store-files.js +460 -0
- package/dist/src/storage/local-media-store-files.js.map +1 -0
- package/dist/src/storage/local-media-store-lock-recovery.d.ts +15 -0
- package/dist/src/storage/local-media-store-lock-recovery.js +112 -0
- package/dist/src/storage/local-media-store-lock-recovery.js.map +1 -0
- package/dist/src/storage/local-media-store-persistence.d.ts +48 -0
- package/dist/src/storage/local-media-store-persistence.js +443 -0
- package/dist/src/storage/local-media-store-persistence.js.map +1 -0
- package/dist/src/storage/local-media-store-quota.d.ts +6 -0
- package/dist/src/storage/local-media-store-quota.js +66 -0
- package/dist/src/storage/local-media-store-quota.js.map +1 -0
- package/dist/src/storage/local-media-store-reservations.d.ts +55 -0
- package/dist/src/storage/local-media-store-reservations.js +377 -0
- package/dist/src/storage/local-media-store-reservations.js.map +1 -0
- package/dist/src/storage/local-media-store-types.d.ts +110 -0
- package/dist/src/storage/local-media-store-types.js +35 -0
- package/dist/src/storage/local-media-store-types.js.map +1 -0
- package/dist/src/storage/local-media-store-validation.d.ts +34 -0
- package/dist/src/storage/local-media-store-validation.js +449 -0
- package/dist/src/storage/local-media-store-validation.js.map +1 -0
- package/dist/src/storage/local-media-store.d.ts +47 -0
- package/dist/src/storage/local-media-store.js +353 -0
- package/dist/src/storage/local-media-store.js.map +1 -0
- package/dist/src/storage/media-admission-service.d.ts +49 -0
- package/dist/src/storage/media-admission-service.js +333 -0
- package/dist/src/storage/media-admission-service.js.map +1 -0
- package/dist/src/storage/media-lifecycle-metrics.d.ts +75 -0
- package/dist/src/storage/media-lifecycle-metrics.js +105 -0
- package/dist/src/storage/media-lifecycle-metrics.js.map +1 -0
- package/dist/src/storage/media-reference-lifecycle.d.ts +16 -0
- package/dist/src/storage/media-reference-lifecycle.js +84 -0
- package/dist/src/storage/media-reference-lifecycle.js.map +1 -0
- package/dist/src/storage/request-media-resolver.d.ts +67 -0
- package/dist/src/storage/request-media-resolver.js +325 -0
- package/dist/src/storage/request-media-resolver.js.map +1 -0
- package/dist/src/storage/session-media-service-factories.d.ts +19 -0
- package/dist/src/storage/session-media-service-factories.js +34 -0
- package/dist/src/storage/session-media-service-factories.js.map +1 -0
- package/dist/src/storage/session-persistence-helpers.d.ts +10 -0
- package/dist/src/storage/session-persistence-helpers.js +46 -0
- package/dist/src/storage/session-persistence-helpers.js.map +1 -0
- package/dist/src/test-utils/config.d.ts +2 -0
- package/dist/src/test-utils/config.js +5 -5
- package/dist/src/test-utils/config.js.map +1 -1
- package/dist/src/test-utils/runtime.d.ts +2 -0
- package/dist/src/test-utils/runtime.js +1 -2
- package/dist/src/test-utils/runtime.js.map +1 -1
- package/dist/src/tools-adapters/CoreShellToolHostAdapter.js +1 -9
- package/dist/src/tools-adapters/CoreShellToolHostAdapter.js.map +1 -1
- package/dist/src/tools-adapters/CoreSkillServiceAdapter.d.ts +0 -2
- package/dist/src/tools-adapters/CoreSkillServiceAdapter.js +0 -17
- package/dist/src/tools-adapters/CoreSkillServiceAdapter.js.map +1 -1
- package/dist/src/tools-adapters/CoreToolHostAdapter.d.ts +0 -21
- package/dist/src/tools-adapters/CoreToolHostAdapter.js +0 -8
- package/dist/src/tools-adapters/CoreToolHostAdapter.js.map +1 -1
- package/dist/src/utils/environmentContext.d.ts +8 -9
- package/dist/src/utils/environmentContext.js +11 -22
- package/dist/src/utils/environmentContext.js.map +1 -1
- package/dist/src/utils/errorParsing.d.ts +1 -2
- package/dist/src/utils/errorParsing.js +22 -41
- package/dist/src/utils/errorParsing.js.map +1 -1
- package/dist/src/utils/generateContentResponseUtilities.js +12 -0
- package/dist/src/utils/generateContentResponseUtilities.js.map +1 -1
- package/dist/src/utils/summarizer.d.ts +1 -2
- package/dist/src/utils/summarizer.js +6 -5
- package/dist/src/utils/summarizer.js.map +1 -1
- package/dist/src/utils/tool-utils.js +7 -1
- package/dist/src/utils/tool-utils.js.map +1 -1
- package/index.ts +0 -4
- package/package.json +38 -30
- package/src/config/agentClientLifecycle.ts +53 -22
- package/src/config/config.ts +11 -26
- package/src/config/configBase.ts +46 -7
- package/src/config/configBaseCore.ts +38 -36
- package/src/config/configMcpRuntime.ts +46 -0
- package/src/config/configMediaDefaults.ts +19 -0
- package/src/config/configTypes.ts +13 -53
- package/src/config/index.ts +1 -4
- package/src/config/models.ts +0 -6
- package/src/config/toolRegistryFactory.ts +2 -2
- package/src/core/clientContract.ts +4 -6
- package/src/core/compression/transcriptPathNotice.ts +31 -0
- package/src/core/contentGenerator.ts +15 -39
- package/src/core/logger.ts +370 -39
- package/src/core/prompts.ts +4 -114
- package/src/core/turn.ts +3 -3
- package/src/hooks/hookTranslator.ts +6 -4
- package/src/index.ts +7 -7
- package/src/llm-types/index.ts +5 -0
- package/src/llm-types/modelEnvelope.ts +26 -2
- package/src/policy/policies/read-only.toml +0 -5
- package/src/prompt-config/TemplateEngine.ts +0 -3
- package/src/prompt-config/defaults/providers/gemini/core.md +0 -2
- package/src/prompt-config/defaults/providers/gemini/models/gemini-2.5-flash/core.md +0 -2
- package/src/prompt-config/defaults/providers/gemini/models/gemini-2.5-flash/gemini-2-5-flash/core.md +0 -2
- package/src/prompt-config/prompt-loader.ts +7 -8
- package/src/prompt-config/types.ts +0 -1
- package/src/recording/CheckpointService.ts +110 -45
- package/src/recording/HistoryMutationService.ts +28 -3
- package/src/recording/RecordingIntegration.ts +258 -11
- package/src/recording/ReplayEngine.ts +220 -110
- package/src/recording/SessionDiscovery.ts +30 -4
- package/src/recording/SessionRecordingService.ts +253 -55
- package/src/recording/SessionTransitionService.ts +75 -12
- package/src/recording/index.ts +7 -0
- package/src/recording/janitor/cleanupTypes.ts +4 -0
- package/src/recording/janitor/mediaReclamation.ts +295 -0
- package/src/recording/janitor/sessionJanitor.ts +54 -1
- package/src/recording/janitor/sessionScanner.ts +319 -227
- package/src/recording/replay-test-helpers.ts +33 -2
- package/src/recording/replayCheckpointMetadata.ts +115 -0
- package/src/recording/replayErrorFormatting.ts +43 -0
- package/src/recording/resumeSession.ts +10 -0
- package/src/recording/semanticMediaPurgeReplayValidation.ts +35 -0
- package/src/recording/session-media-package-blobs.ts +116 -0
- package/src/recording/session-media-package-import.ts +189 -0
- package/src/recording/session-media-package-state.ts +120 -0
- package/src/recording/session-media-package-validation.ts +400 -0
- package/src/recording/session-media-package-writer.ts +117 -0
- package/src/recording/session-media-package.ts +692 -0
- package/src/recording/types.ts +37 -2
- package/src/runtime/AgentRuntimeContext.ts +28 -5
- package/src/runtime/AgentRuntimeLoader.ts +32 -7
- package/src/runtime/contracts/PromptEstimation.ts +1 -0
- package/src/runtime/contracts/RuntimeProvider.ts +3 -8
- package/src/runtime/contracts/RuntimeProviderManager.ts +0 -2
- package/src/runtime/createAgentRuntimeContext.ts +43 -1
- package/src/runtime/providerRuntimeContext.ts +22 -0
- package/src/runtime/runtimeAdapters.ts +2 -2
- package/src/services/history/ContentConverters.ts +11 -7
- package/src/services/history/HistoryService.ts +71 -696
- package/src/services/history/HistoryServiceCore.ts +1055 -0
- package/src/services/history/IContent.ts +460 -20
- package/src/services/history/contentSize.ts +22 -2
- package/src/services/history/historyChronology.ts +53 -3
- package/src/services/history/historyCloneUtils.ts +26 -22
- package/src/services/history/historyCompressionQueue.ts +102 -0
- package/src/services/history/historyEventTypes.ts +9 -0
- package/src/services/history/historyMutationFailure.ts +33 -0
- package/src/services/history/historyProviderPipeline.ts +19 -5
- package/src/services/history/historyTokenEstimation.ts +9 -5
- package/src/services/history/historyToolNormalization.ts +43 -11
- package/src/services/history/provider-file-binding.ts +115 -0
- package/src/services/history/semantic-media-purge.ts +593 -0
- package/src/storage/SessionPersistenceService.ts +667 -30
- package/src/storage/history-media-ownership.ts +185 -0
- package/src/storage/local-media-store-child.ts +163 -0
- package/src/storage/local-media-store-files.ts +643 -0
- package/src/storage/local-media-store-lock-recovery.ts +159 -0
- package/src/storage/local-media-store-persistence.ts +737 -0
- package/src/storage/local-media-store-quota.ts +111 -0
- package/src/storage/local-media-store-reservations.ts +485 -0
- package/src/storage/local-media-store-types.ts +161 -0
- package/src/storage/local-media-store-validation.ts +643 -0
- package/src/storage/local-media-store.ts +696 -0
- package/src/storage/media-admission-service.ts +512 -0
- package/src/storage/media-lifecycle-metrics.ts +228 -0
- package/src/storage/media-reference-lifecycle.ts +164 -0
- package/src/storage/request-media-resolver.ts +491 -0
- package/src/storage/session-media-service-factories.ts +48 -0
- package/src/storage/session-persistence-helpers.ts +85 -0
- package/src/test-utils/config.ts +7 -5
- package/src/test-utils/runtime.ts +3 -2
- package/src/tools-adapters/CoreShellToolHostAdapter.ts +1 -11
- package/src/tools-adapters/CoreSkillServiceAdapter.ts +0 -23
- package/src/tools-adapters/CoreToolHostAdapter.ts +0 -36
- package/src/utils/environmentContext.ts +11 -30
- package/src/utils/errorParsing.ts +19 -69
- package/src/utils/generateContentResponseUtilities.ts +28 -1
- package/src/utils/summarizer.ts +8 -10
- package/src/utils/tool-utils.ts +7 -1
- package/dist/src/code_assist/codeAssist.d.ts +0 -19
- package/dist/src/code_assist/codeAssist.js +0 -41
- package/dist/src/code_assist/codeAssist.js.map +0 -1
- package/dist/src/code_assist/contentGeneratorAdapters.d.ts +0 -49
- package/dist/src/code_assist/contentGeneratorAdapters.js +0 -197
- package/dist/src/code_assist/contentGeneratorAdapters.js.map +0 -1
- package/dist/src/code_assist/converter.d.ts +0 -74
- package/dist/src/code_assist/converter.js +0 -158
- package/dist/src/code_assist/converter.js.map +0 -1
- package/dist/src/code_assist/googleGenAIWrapper.d.ts +0 -27
- package/dist/src/code_assist/googleGenAIWrapper.js +0 -46
- package/dist/src/code_assist/googleGenAIWrapper.js.map +0 -1
- package/dist/src/code_assist/oauth-credential-storage.d.ts +0 -30
- package/dist/src/code_assist/oauth-credential-storage.js +0 -135
- package/dist/src/code_assist/oauth-credential-storage.js.map +0 -1
- package/dist/src/code_assist/server.d.ts +0 -44
- package/dist/src/code_assist/server.js +0 -154
- package/dist/src/code_assist/server.js.map +0 -1
- package/dist/src/code_assist/setup.d.ts +0 -20
- package/dist/src/code_assist/setup.js +0 -126
- package/dist/src/code_assist/setup.js.map +0 -1
- package/dist/src/code_assist/types.d.ts +0 -161
- package/dist/src/code_assist/types.js +0 -46
- package/dist/src/code_assist/types.js.map +0 -1
- package/dist/src/utils/getFolderStructure.d.ts +0 -31
- package/dist/src/utils/getFolderStructure.js +0 -240
- package/dist/src/utils/getFolderStructure.js.map +0 -1
- package/dist/src/utils/installationManager.d.ts +0 -16
- package/dist/src/utils/installationManager.js +0 -51
- package/dist/src/utils/installationManager.js.map +0 -1
- package/dist/src/utils/llm-edit-fixer.d.ts +0 -25
- package/dist/src/utils/llm-edit-fixer.js +0 -120
- package/dist/src/utils/llm-edit-fixer.js.map +0 -1
- package/src/code_assist/codeAssist.ts +0 -59
- package/src/code_assist/contentGeneratorAdapters.ts +0 -275
- package/src/code_assist/converter.ts +0 -288
- package/src/code_assist/googleGenAIWrapper.ts +0 -90
- package/src/code_assist/oauth-credential-storage.ts +0 -171
- package/src/code_assist/server.ts +0 -263
- package/src/code_assist/setup.ts +0 -189
- package/src/code_assist/types.ts +0 -201
- package/src/utils/getFolderStructure.ts +0 -382
- package/src/utils/installationManager.ts +0 -59
- package/src/utils/llm-edit-fixer.ts +0 -157
|
@@ -9,7 +9,14 @@
|
|
|
9
9
|
* @pseudocode consumer-migration.md lines 10-15
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
import {
|
|
13
|
+
awaitMcpDiscoveryGate,
|
|
14
|
+
mcpRuntimeStatus,
|
|
15
|
+
refreshMcpServers,
|
|
16
|
+
type McpRuntimeStatus,
|
|
17
|
+
} from './configMcpRuntime.js';
|
|
12
18
|
import * as path from 'node:path';
|
|
19
|
+
import { ConfigMediaDefaults } from './configMediaDefaults.js';
|
|
13
20
|
import type { EventEmitter } from 'node:events';
|
|
14
21
|
import type { SubagentSchedulerFactory } from '../core/subagentTypes.js';
|
|
15
22
|
import type {
|
|
@@ -22,7 +29,7 @@ import type {
|
|
|
22
29
|
} from '../core/clientContract.js';
|
|
23
30
|
import type { ToolSchedulerFactory } from '../core/toolSchedulerContract.js';
|
|
24
31
|
import type { TaskToolRegistration } from './toolRegistryFactory.js';
|
|
25
|
-
import type {
|
|
32
|
+
import type { ToolRecord } from './toolRegistryFactory.js';
|
|
26
33
|
import type { PromptRegistry } from '../prompts/prompt-registry.js';
|
|
27
34
|
import type { ResourceRegistry } from '../resources/resource-registry.js';
|
|
28
35
|
import type {
|
|
@@ -40,6 +47,7 @@ import { FileDiscoveryService } from '../services/fileDiscoveryService.js';
|
|
|
40
47
|
import type { GitService } from '../services/gitService.js';
|
|
41
48
|
import type { ContextManager } from '../services/contextManager.js';
|
|
42
49
|
import type { SessionRecordingService } from '../recording/SessionRecordingService.js';
|
|
50
|
+
import { sessionMediaServices } from '../storage/session-media-service-factories.js';
|
|
43
51
|
import type { AsyncTaskManager } from '../services/asyncTaskManager.js';
|
|
44
52
|
import type { ShellJobManager } from '../services/shellJobManager.js';
|
|
45
53
|
import type { AsyncTaskReminderService } from '../services/asyncTaskReminderService.js';
|
|
@@ -63,8 +71,8 @@ import type { SubagentManager } from './subagentManager.js';
|
|
|
63
71
|
import type { FileExclusions } from '../utils/ignorePatterns.js';
|
|
64
72
|
import type { PolicyEngine } from '../policy/policy-engine.js';
|
|
65
73
|
import type { SkillManager } from '../skills/skillManager.js';
|
|
66
|
-
import type { ToolRecord } from './toolRegistryFactory.js';
|
|
67
74
|
import type { LspState } from './lspIntegration.js';
|
|
75
|
+
import type { PostSkillDiscoveryToolRegistrar } from './configTypes.js';
|
|
68
76
|
import type { ApprovalMode, MCPServerConfig } from './configTypes.js';
|
|
69
77
|
import type { ImageOperationRunner } from '../services/image/imageCapability.js';
|
|
70
78
|
import { resolvePerfSettings } from './configConstructor.js';
|
|
@@ -85,7 +93,7 @@ import {
|
|
|
85
93
|
type FileFilteringOptions,
|
|
86
94
|
} from './configTypes.js';
|
|
87
95
|
|
|
88
|
-
export abstract class ConfigBaseCore {
|
|
96
|
+
export abstract class ConfigBaseCore extends ConfigMediaDefaults {
|
|
89
97
|
protected toolRegistry!: ToolRegistry;
|
|
90
98
|
protected mcpClientManager?: McpClientManager;
|
|
91
99
|
protected allowedMcpServers!: string[];
|
|
@@ -142,6 +150,9 @@ export abstract class ConfigBaseCore {
|
|
|
142
150
|
protected gitService: GitService | undefined = undefined;
|
|
143
151
|
protected sessionRecordingService: SessionRecordingService | undefined =
|
|
144
152
|
undefined;
|
|
153
|
+
private readonly sessionMedia = sessionMediaServices(this);
|
|
154
|
+
readonly getLocalMediaStore = this.sessionMedia.store;
|
|
155
|
+
readonly createSessionPersistenceService = this.sessionMedia.persistence;
|
|
145
156
|
// @plan PLAN-20260130-ASYNCTASK.P09
|
|
146
157
|
protected asyncTaskManager: AsyncTaskManager | undefined = undefined;
|
|
147
158
|
// #1995 slice 2 — session-owned background shell jobs
|
|
@@ -566,43 +577,14 @@ export abstract class ConfigBaseCore {
|
|
|
566
577
|
getMcpClientManager(): McpClientManager | undefined {
|
|
567
578
|
return this.mcpClientManager;
|
|
568
579
|
}
|
|
569
|
-
getMcpRuntimeStatus():
|
|
570
|
-
|
|
571
|
-
readonly servers: Record<string, MCPServerConfig>;
|
|
572
|
-
readonly discoveryFailures: ReadonlyMap<string, string>;
|
|
573
|
-
readonly discoveryState: ReturnType<
|
|
574
|
-
McpClientManager['getDiscoveryState']
|
|
575
|
-
>;
|
|
576
|
-
}
|
|
577
|
-
| undefined {
|
|
578
|
-
const manager = this.mcpClientManager;
|
|
579
|
-
if (manager === undefined) {
|
|
580
|
-
return undefined;
|
|
581
|
-
}
|
|
582
|
-
return {
|
|
583
|
-
servers: manager.getMcpServers(),
|
|
584
|
-
discoveryFailures: manager.getDiscoveryFailures(),
|
|
585
|
-
discoveryState: manager.getDiscoveryState(),
|
|
586
|
-
};
|
|
580
|
+
getMcpRuntimeStatus(): McpRuntimeStatus | undefined {
|
|
581
|
+
return mcpRuntimeStatus(this.mcpClientManager);
|
|
587
582
|
}
|
|
588
583
|
async refreshMcpServers(server?: string): Promise<void> {
|
|
589
|
-
|
|
590
|
-
if (manager === undefined) {
|
|
591
|
-
return;
|
|
592
|
-
}
|
|
593
|
-
if (server === undefined) {
|
|
594
|
-
await manager.restart();
|
|
595
|
-
} else {
|
|
596
|
-
await manager.restartServer(server);
|
|
597
|
-
}
|
|
584
|
+
await refreshMcpServers(this.mcpClientManager, server);
|
|
598
585
|
}
|
|
599
586
|
async awaitMcpDiscoveryGate(): Promise<ReadonlyMap<string, string>> {
|
|
600
|
-
|
|
601
|
-
if (manager === undefined) {
|
|
602
|
-
return new Map();
|
|
603
|
-
}
|
|
604
|
-
await manager.whenDiscoverySettled();
|
|
605
|
-
return manager.getDiscoveryFailures();
|
|
587
|
+
return awaitMcpDiscoveryGate(this.mcpClientManager);
|
|
606
588
|
}
|
|
607
589
|
getMcpInstructions(): string | undefined {
|
|
608
590
|
return this.mcpClientManager?.getMcpInstructions();
|
|
@@ -631,6 +613,17 @@ export abstract class ConfigBaseCore {
|
|
|
631
613
|
getApprovalMode(): ApprovalMode {
|
|
632
614
|
return this.approvalMode;
|
|
633
615
|
}
|
|
616
|
+
/**
|
|
617
|
+
* The single JIT-context predicate. It resolves from the
|
|
618
|
+
* constructor-assigned `jitContextEnabled` field and nothing else, so every
|
|
619
|
+
* consumer (the memory accessors, the ContextManager lifecycle, the prompt
|
|
620
|
+
* builders and the CLI) observes one answer. A second predicate with a
|
|
621
|
+
* different resolution order would let the workspace memory hierarchy be
|
|
622
|
+
* sent twice or not at all (issue #3135).
|
|
623
|
+
*
|
|
624
|
+
* The user-facing setting is `experimental.jitContext`, resolved by the CLI
|
|
625
|
+
* and threaded in as `ConfigParameters.jitContextEnabled`.
|
|
626
|
+
*/
|
|
634
627
|
isJitContextEnabled(): boolean {
|
|
635
628
|
return this.jitContextEnabled === true;
|
|
636
629
|
}
|
|
@@ -896,6 +889,15 @@ export abstract class ConfigBaseCore {
|
|
|
896
889
|
getEnablePromptCompletion(): boolean {
|
|
897
890
|
return this.enablePromptCompletion;
|
|
898
891
|
}
|
|
892
|
+
getUtilityModel(): string | undefined {
|
|
893
|
+
// Interim utilityModel source; real setting tracked in the companion feature issue (#2614 umbrella)
|
|
894
|
+
const raw = this.settingsService.get('utilityModel');
|
|
895
|
+
if (typeof raw !== 'string') {
|
|
896
|
+
return undefined;
|
|
897
|
+
}
|
|
898
|
+
const trimmed = raw.trim();
|
|
899
|
+
return trimmed === '' ? undefined : trimmed;
|
|
900
|
+
}
|
|
899
901
|
getSettingsService(): SettingsService {
|
|
900
902
|
return this.settingsService;
|
|
901
903
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ConfigBaseCore — field declarations and simple single-delegation accessors.
|
|
3
|
+
* ConfigBase extends this and adds abstract methods + complex multi-line logic.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { McpClientManager } from '@vybestack/llxprt-code-mcp';
|
|
7
|
+
import type { MCPServerConfig } from './configTypes.js';
|
|
8
|
+
|
|
9
|
+
export interface McpRuntimeStatus {
|
|
10
|
+
readonly servers: Record<string, MCPServerConfig>;
|
|
11
|
+
readonly discoveryFailures: ReadonlyMap<string, string>;
|
|
12
|
+
readonly discoveryState: ReturnType<McpClientManager['getDiscoveryState']>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** MCP runtime accessors: each reads only the client manager, so they live
|
|
16
|
+
* outside the config class. */
|
|
17
|
+
export function mcpRuntimeStatus(
|
|
18
|
+
manager: McpClientManager | undefined,
|
|
19
|
+
): McpRuntimeStatus | undefined {
|
|
20
|
+
if (manager === undefined) return undefined;
|
|
21
|
+
return {
|
|
22
|
+
servers: manager.getMcpServers(),
|
|
23
|
+
discoveryFailures: manager.getDiscoveryFailures(),
|
|
24
|
+
discoveryState: manager.getDiscoveryState(),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export async function refreshMcpServers(
|
|
29
|
+
manager: McpClientManager | undefined,
|
|
30
|
+
server?: string,
|
|
31
|
+
): Promise<void> {
|
|
32
|
+
if (manager === undefined) return;
|
|
33
|
+
if (server === undefined) {
|
|
34
|
+
await manager.restart();
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
await manager.restartServer(server);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export async function awaitMcpDiscoveryGate(
|
|
41
|
+
manager: McpClientManager | undefined,
|
|
42
|
+
): Promise<ReadonlyMap<string, string>> {
|
|
43
|
+
if (manager === undefined) return new Map();
|
|
44
|
+
await manager.whenDiscoverySettled();
|
|
45
|
+
return manager.getDiscoveryFailures();
|
|
46
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Vybestack LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export abstract class ConfigMediaDefaults {
|
|
8
|
+
getSessionRecordingQueueByteLimit(): number {
|
|
9
|
+
return 16 * 1024 * 1024;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
getSessionPersistenceQueueByteLimit(): number {
|
|
13
|
+
return 16 * 1024 * 1024;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
getMediaStoreQuotaByteLimit(): number {
|
|
17
|
+
return 4 * 1024 * 1024 * 1024;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -21,6 +21,7 @@ import type { SkillDefinition } from '../skills/skillManager.js';
|
|
|
21
21
|
*/
|
|
22
22
|
import type { BucketFailureReason } from '../runtime/contracts/BucketFailureReason.js';
|
|
23
23
|
import type { MCPOAuthConfig } from '@vybestack/llxprt-code-mcp';
|
|
24
|
+
import type { MCPServerConfig } from '@vybestack/llxprt-code-mcp/config/mcpServerConfig.js';
|
|
24
25
|
import type { OutputFormat } from '../utils/output-format.js';
|
|
25
26
|
import type { FileFilteringOptions } from './constants.js';
|
|
26
27
|
import type { EventEmitter } from 'node:events';
|
|
@@ -43,7 +44,12 @@ import type { ToolSchedulerFactory } from '../core/toolSchedulerContract.js';
|
|
|
43
44
|
import type { TaskToolRegistration } from './toolRegistryFactory.js';
|
|
44
45
|
import type { MessageBus } from '../confirmation-bus/message-bus.js';
|
|
45
46
|
|
|
46
|
-
export type {
|
|
47
|
+
export type {
|
|
48
|
+
MCPOAuthConfig,
|
|
49
|
+
MCPServerConfig,
|
|
50
|
+
AnyToolInvocation,
|
|
51
|
+
SkillDefinition,
|
|
52
|
+
};
|
|
47
53
|
|
|
48
54
|
/**
|
|
49
55
|
* Registration hook for post-skill-discovery tool registration.
|
|
@@ -231,58 +237,12 @@ export const DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES = 1000;
|
|
|
231
237
|
|
|
232
238
|
export const DEFAULT_IMAGE_PAYLOAD_BUDGET_BYTES = 15 * 1024 * 1024;
|
|
233
239
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
readonly cwd?: string,
|
|
241
|
-
// For sse transport
|
|
242
|
-
readonly url?: string,
|
|
243
|
-
// For streamable http transport
|
|
244
|
-
readonly httpUrl?: string,
|
|
245
|
-
readonly headers?: Record<string, string>,
|
|
246
|
-
// For websocket transport
|
|
247
|
-
readonly tcp?: string,
|
|
248
|
-
/**
|
|
249
|
-
* Transport type for URL-based servers.
|
|
250
|
-
* When set, disables automatic HTTP→SSE fallback.
|
|
251
|
-
* - 'http' → StreamableHTTPClientTransport
|
|
252
|
-
* - 'streamable-http' → alias for 'http' (StreamableHTTPClientTransport)
|
|
253
|
-
* - 'sse' → SSEClientTransport
|
|
254
|
-
* - omitted → defaults to HTTP with SSE fallback (deprecated; add type explicitly)
|
|
255
|
-
*
|
|
256
|
-
* Note: 'httpUrl' is deprecated; use 'url' + 'type: "http"' instead.
|
|
257
|
-
* @plan PLAN-20250219-GMERGE021.R3.P03
|
|
258
|
-
* @requirement REQ-GMERGE021-R3-001
|
|
259
|
-
*/
|
|
260
|
-
readonly type?: 'sse' | 'http' | 'streamable-http',
|
|
261
|
-
// Common
|
|
262
|
-
readonly timeout?: number,
|
|
263
|
-
readonly trust?: boolean,
|
|
264
|
-
// Metadata
|
|
265
|
-
readonly description?: string,
|
|
266
|
-
readonly includeTools?: string[],
|
|
267
|
-
readonly excludeTools?: string[],
|
|
268
|
-
readonly extensionName?: string,
|
|
269
|
-
readonly extension?: LlxprtExtension,
|
|
270
|
-
// OAuth configuration
|
|
271
|
-
readonly oauth?: MCPOAuthConfig,
|
|
272
|
-
readonly authProviderType?: AuthProviderType,
|
|
273
|
-
// Service Account Configuration
|
|
274
|
-
/* targetAudience format: CLIENT_ID.apps.googleusercontent.com */
|
|
275
|
-
readonly targetAudience?: string,
|
|
276
|
-
/* targetServiceAccount format: <service-account-name>@<project-num>.iam.gserviceaccount.com */
|
|
277
|
-
readonly targetServiceAccount?: string,
|
|
278
|
-
) {}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
export enum AuthProviderType {
|
|
282
|
-
DYNAMIC_DISCOVERY = 'dynamic_discovery',
|
|
283
|
-
GOOGLE_CREDENTIALS = 'google_credentials',
|
|
284
|
-
SERVICE_ACCOUNT_IMPERSONATION = 'service_account_impersonation',
|
|
285
|
-
}
|
|
240
|
+
// Owned by @vybestack/llxprt-code-auth (a dependency-graph leaf) so that
|
|
241
|
+
// @vybestack/llxprt-code-mcp can use it without depending on core, which
|
|
242
|
+
// value-imports mcp (#3305). Re-exported here to keep core's public surface
|
|
243
|
+
// unchanged for existing consumers.
|
|
244
|
+
import { AuthProviderType } from '@vybestack/llxprt-code-auth/mcp-auth-provider-type.js';
|
|
245
|
+
export { AuthProviderType };
|
|
286
246
|
|
|
287
247
|
export interface SandboxConfig {
|
|
288
248
|
command: 'docker' | 'podman' | 'sandbox-exec';
|
package/src/config/index.ts
CHANGED
|
@@ -15,7 +15,7 @@ export {
|
|
|
15
15
|
type SummarizeToolOutputSettings,
|
|
16
16
|
type ComplexityAnalyzerSettings,
|
|
17
17
|
type TelemetrySettings,
|
|
18
|
-
MCPServerConfig,
|
|
18
|
+
type MCPServerConfig,
|
|
19
19
|
AuthProviderType,
|
|
20
20
|
type SandboxConfig,
|
|
21
21
|
type ActiveExtension,
|
|
@@ -27,13 +27,10 @@ export {
|
|
|
27
27
|
DEFAULT_AUTOCOMPLETE_IGNORE_PATTERNS,
|
|
28
28
|
DEFAULT_AUTOCOMPLETE_MAX_DEPTH,
|
|
29
29
|
type MCPOAuthConfig,
|
|
30
|
-
DEFAULT_GEMINI_FLASH_MODEL,
|
|
31
30
|
} from './config.js';
|
|
32
31
|
|
|
33
32
|
export type { Config as ConfigInstance } from './config.js';
|
|
34
33
|
|
|
35
|
-
export { DEFAULT_GEMINI_FLASH_MODEL as DEFAULT_FLASH_MODEL } from './models.js';
|
|
36
|
-
|
|
37
34
|
/**
|
|
38
35
|
* @plan:PLAN-20250117-SUBAGENTCONFIG.P15
|
|
39
36
|
* @requirement:REQ-010
|
package/src/config/models.ts
CHANGED
|
@@ -4,12 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export const DEFAULT_GEMINI_MODEL = 'gemini-2.5-pro';
|
|
8
|
-
export const DEFAULT_GEMINI_FLASH_MODEL = 'gemini-2.5-flash';
|
|
9
|
-
export const DEFAULT_GEMINI_FLASH_LITE_MODEL = 'gemini-2.5-flash-lite';
|
|
10
|
-
|
|
11
|
-
export const DEFAULT_GEMINI_EMBEDDING_MODEL = 'gemini-embedding-001';
|
|
12
|
-
|
|
13
7
|
export const PLACEHOLDER_MODEL = 'placeholder-model';
|
|
14
8
|
|
|
15
9
|
/**
|
|
@@ -107,11 +107,11 @@ export interface TaskToolArgs {
|
|
|
107
107
|
schedulerFactoryProvider: () => SubagentSchedulerFactory | undefined;
|
|
108
108
|
getAsyncTaskManager: () => AsyncTaskManager | undefined;
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* Required session/runtime MessageBus threaded into the SubagentOrchestrator so
|
|
111
111
|
* non-interactive subagent tool execution can satisfy
|
|
112
112
|
* Config.getOrCreateScheduler's explicit MessageBus dependency (Issue #2312).
|
|
113
113
|
*/
|
|
114
|
-
messageBus: MessageBus
|
|
114
|
+
messageBus: MessageBus;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
/** Tool record for settings UI */
|
|
@@ -17,12 +17,11 @@
|
|
|
17
17
|
* - config/config.ts (initialize, initializeContentGeneratorConfig)
|
|
18
18
|
* - config/configBaseCore.ts (getAgentClient return type)
|
|
19
19
|
* - utils/summarizer.ts (generateContent)
|
|
20
|
-
* -
|
|
20
|
+
* - agents/src/api/agentImpl.ts (generateJson)
|
|
21
21
|
* - utils/checkpointUtils.ts (getHistory)
|
|
22
22
|
* - CLI consumers (14+ files: sendMessageStream, setTools, updateSystemInstruction, etc.)
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import type { UserTierId } from '../code_assist/types.js';
|
|
26
25
|
import type { ContentGeneratorConfig } from './contentGenerator.js';
|
|
27
26
|
import type { HistoryService } from '../services/history/HistoryService.js';
|
|
28
27
|
import type { IContent } from '../services/history/IContent.js';
|
|
@@ -93,7 +92,7 @@ export interface AgentChatContract {
|
|
|
93
92
|
prompt_id: string,
|
|
94
93
|
): Promise<ModelOutput>;
|
|
95
94
|
getHistory(): readonly IContent[];
|
|
96
|
-
setHistory(history: readonly IContent[]): void
|
|
95
|
+
setHistory(history: readonly IContent[]): Promise<void>;
|
|
97
96
|
clearHistory(): void;
|
|
98
97
|
getHistoryService(): HistoryService | null;
|
|
99
98
|
wasRecentlyCompressed(): boolean;
|
|
@@ -116,8 +115,8 @@ export interface AgentClientContract {
|
|
|
116
115
|
getHistory(): Promise<readonly IContent[]>;
|
|
117
116
|
getHistoryService(): HistoryService | null;
|
|
118
117
|
storeHistoryServiceForReuse(service: HistoryService): void;
|
|
119
|
-
storeHistoryForLaterUse(history: readonly IContent[]): void
|
|
120
|
-
dispose(): void
|
|
118
|
+
storeHistoryForLaterUse(history: readonly IContent[]): Promise<void>;
|
|
119
|
+
dispose(): Promise<void>;
|
|
121
120
|
setTools(): Promise<void>;
|
|
122
121
|
clearTools(): void;
|
|
123
122
|
updateSystemInstruction(): Promise<void>;
|
|
@@ -158,7 +157,6 @@ export interface AgentClientContract {
|
|
|
158
157
|
isInvalidStreamRetry?: boolean,
|
|
159
158
|
isPayloadRecoveryRetry?: boolean,
|
|
160
159
|
): AsyncGenerator<ServerAgentStreamEvent, unknown>;
|
|
161
|
-
getUserTier(): UserTierId | undefined;
|
|
162
160
|
getCurrentSequenceModel(): string | null;
|
|
163
161
|
}
|
|
164
162
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Vybestack LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Builds the notice appended to a compression request when a session recording
|
|
9
|
+
* has materialized a file on disk. Shared by both LLM compression strategies
|
|
10
|
+
* (OneShotStrategy and MiddleOutStrategy) so the two cannot drift.
|
|
11
|
+
*
|
|
12
|
+
* The wording deliberately avoids calling the file a "full transcript":
|
|
13
|
+
* recording is optional, can be enabled part way through a session (seeding
|
|
14
|
+
* only the history present at that moment), and deactivates on a write
|
|
15
|
+
* failure. It also steers the reader toward searching the file for a specific
|
|
16
|
+
* string, because the journal contains full tool results and reading it whole
|
|
17
|
+
* would burn more context than the compression saved.
|
|
18
|
+
*
|
|
19
|
+
* The notice is part of the compression request, so it asks the summarizing
|
|
20
|
+
* model to carry the path into the summary — that is what makes the pointer
|
|
21
|
+
* outlive the compression that drops the detail.
|
|
22
|
+
*/
|
|
23
|
+
export function buildTranscriptPathNotice(transcriptPath: string): string {
|
|
24
|
+
return (
|
|
25
|
+
`Note: a JSONL journal of this session is being recorded at: ${transcriptPath}\n` +
|
|
26
|
+
`The journal may be incomplete — recording can begin part way through a session and can stop on a write error. ` +
|
|
27
|
+
`Preserve this path verbatim in your summary, and record that detail dropped by compression may be recoverable by ` +
|
|
28
|
+
`searching that file for the specific text needed. The file holds full tool results and can be very large, so it ` +
|
|
29
|
+
`should be searched, not read whole.`
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -32,15 +32,11 @@ import type { Config } from '../config/config.js';
|
|
|
32
32
|
*/
|
|
33
33
|
import type { RuntimeContentGeneratorFactory } from '../runtime/contracts/RuntimeContentGeneratorFactory.js';
|
|
34
34
|
import type { RuntimeProviderManager } from '../runtime/contracts/RuntimeProviderManager.js';
|
|
35
|
-
import type { UserTierId } from '../code_assist/types.js';
|
|
36
|
-
import { GoogleGenAIWrapper } from '../code_assist/googleGenAIWrapper.js';
|
|
37
|
-
import { InstallationManager } from '../utils/installationManager.js';
|
|
38
35
|
|
|
39
36
|
/**
|
|
40
37
|
* Neutral ContentGenerator interface. All request/response types come from the
|
|
41
38
|
* provider-agnostic llm-types layer. Implementations convert to/from their
|
|
42
|
-
* native shapes at the provider boundary
|
|
43
|
-
* Gemini-backed paths).
|
|
39
|
+
* native shapes at the provider boundary.
|
|
44
40
|
*/
|
|
45
41
|
export interface ContentGenerator {
|
|
46
42
|
generateContent(
|
|
@@ -56,8 +52,6 @@ export interface ContentGenerator {
|
|
|
56
52
|
countTokens(request: CountTokensRequest): Promise<CountTokensResult>;
|
|
57
53
|
|
|
58
54
|
embedContent(request: EmbedContentRequest): Promise<EmbedContentResult>;
|
|
59
|
-
|
|
60
|
-
userTier?: UserTierId;
|
|
61
55
|
}
|
|
62
56
|
|
|
63
57
|
export type ContentGeneratorConfig = {
|
|
@@ -129,47 +123,29 @@ export function createContentGeneratorConfig(
|
|
|
129
123
|
|
|
130
124
|
export async function createContentGenerator(
|
|
131
125
|
config: ContentGeneratorConfig,
|
|
132
|
-
|
|
126
|
+
_gcConfig: Config,
|
|
133
127
|
_sessionId?: string,
|
|
134
128
|
): Promise<ContentGenerator> {
|
|
135
129
|
// @plan:PLAN-20260603-ISSUE1584.P05
|
|
136
130
|
// @requirement:REQ-DEP-001
|
|
137
131
|
// Prefer factory injection when available — eliminates core→providers construction
|
|
138
|
-
if (
|
|
139
|
-
config.contentGeneratorFactory != null &&
|
|
140
|
-
config.providerManager != null
|
|
141
|
-
) {
|
|
142
|
-
return config.contentGeneratorFactory.createContentGenerator(
|
|
143
|
-
config.providerManager,
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// @plan:PLAN-20260603-ISSUE1584.P11
|
|
148
|
-
// @requirement:REQ-DEP-001
|
|
149
|
-
// Core must not construct provider-owned content generators. CLI/providers wiring injects the factory.
|
|
150
132
|
if (config.providerManager != null) {
|
|
133
|
+
if (config.contentGeneratorFactory != null) {
|
|
134
|
+
return config.contentGeneratorFactory.createContentGenerator(
|
|
135
|
+
config.providerManager,
|
|
136
|
+
);
|
|
137
|
+
}
|
|
151
138
|
throw new Error(
|
|
152
139
|
'Provider content generator factory is required when a provider manager is configured',
|
|
153
140
|
);
|
|
154
141
|
}
|
|
155
142
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
if (config.vertexai === true) {
|
|
165
|
-
return new GoogleGenAIWrapper(config, requestOptions);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
if (!config.apiKey) {
|
|
169
|
-
throw new Error(
|
|
170
|
-
'No Gemini authentication configured. Set GEMINI_API_KEY environment variable, use --keyfile, or configure Vertex AI credentials.',
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
return new GoogleGenAIWrapper(config, requestOptions);
|
|
143
|
+
// @plan:PLAN-20260603-ISSUE1584.P11
|
|
144
|
+
// @requirement:REQ-DEP-001
|
|
145
|
+
// Core must not construct provider-owned content generators. The embedding
|
|
146
|
+
// process must compose the providers package instead of falling back to a
|
|
147
|
+
// Gemini implementation in core.
|
|
148
|
+
throw new Error(
|
|
149
|
+
'No provider runtime is composed for this Config. Compose the providers package (see packages/providers/src/composition) before creating a content generator.',
|
|
150
|
+
);
|
|
175
151
|
}
|