@ycodium-ai/plugin-api 0.2.5634 → 0.2.5763
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/README.md +57 -65
- package/dist/_private/ycodium-attachment-kinds/chatAttachmentKinds.d.ts +34 -0
- package/dist/_private/ycodium-attachment-kinds/chatAttachmentKinds.js +70 -0
- package/dist/_private/ycodium-attachment-kinds/mediaKinds.d.ts +23 -0
- package/dist/_private/ycodium-attachment-kinds/mediaKinds.js +73 -0
- package/dist/_private/ycodium-composer-tokens/approvalFileChanges.d.ts +20 -0
- package/dist/_private/ycodium-composer-tokens/approvalFileChanges.js +45 -0
- package/dist/_private/ycodium-composer-tokens/composerFileLink.d.ts +1 -0
- package/dist/_private/ycodium-composer-tokens/composerFileLink.js +20 -0
- package/dist/_private/ycodium-composer-tokens/composerInlineTokens.d.ts +17 -0
- package/dist/_private/ycodium-composer-tokens/composerInlineTokens.js +91 -0
- package/dist/_private/ycodium-composer-tokens/composerLogic.d.ts +30 -0
- package/dist/_private/ycodium-composer-tokens/composerLogic.js +181 -0
- package/dist/_private/ycodium-composer-tokens/composerMentionDrag.d.ts +40 -0
- package/dist/_private/ycodium-composer-tokens/composerMentionDrag.js +60 -0
- package/dist/_private/ycodium-composer-tokens/composerPromptSegments.d.ts +16 -0
- package/dist/_private/ycodium-composer-tokens/composerPromptSegments.js +142 -0
- package/dist/_private/ycodium-composer-tokens/composerTrigger.d.ts +18 -0
- package/dist/_private/ycodium-composer-tokens/composerTrigger.js +44 -0
- package/dist/_private/ycodium-composer-tokens/contextWindowFormat.d.ts +2 -0
- package/dist/_private/ycodium-composer-tokens/contextWindowFormat.js +16 -0
- package/dist/_private/ycodium-composer-tokens/diffCount.d.ts +2 -0
- package/dist/_private/ycodium-composer-tokens/diffCount.js +15 -0
- package/dist/_private/ycodium-composer-tokens/pendingUserInput.d.ts +48 -0
- package/dist/_private/ycodium-composer-tokens/pendingUserInput.js +145 -0
- package/dist/_private/ycodium-composer-tokens/promptContextBlocks.d.ts +58 -0
- package/dist/_private/ycodium-composer-tokens/promptContextBlocks.js +121 -0
- package/dist/_private/ycodium-composer-tokens/proposedPlan.d.ts +21 -0
- package/dist/_private/ycodium-composer-tokens/proposedPlan.js +106 -0
- package/dist/_private/ycodium-composer-tokens/providerSkillSearch.d.ts +3 -0
- package/dist/_private/ycodium-composer-tokens/providerSkillSearch.js +79 -0
- package/dist/_private/ycodium-composer-tokens/providerSkills.d.ts +17 -0
- package/dist/_private/ycodium-composer-tokens/providerSkills.js +57 -0
- package/dist/_private/ycodium-composer-tokens/queueEntry.d.ts +31 -0
- package/dist/_private/ycodium-composer-tokens/queueEntry.js +44 -0
- package/dist/_private/ycodium-composer-tokens/reviewCommentBlocks.d.ts +29 -0
- package/dist/_private/ycodium-composer-tokens/reviewCommentBlocks.js +118 -0
- package/dist/_private/ycodium-composer-tokens/searchRanking.d.ts +27 -0
- package/dist/_private/ycodium-composer-tokens/searchRanking.js +129 -0
- package/dist/_private/ycodium-composer-tokens/skillTokens.d.ts +101 -0
- package/dist/_private/ycodium-composer-tokens/skillTokens.js +148 -0
- package/dist/_private/ycodium-composer-tokens/slashMenu.d.ts +130 -0
- package/dist/_private/ycodium-composer-tokens/slashMenu.js +175 -0
- package/dist/_private/ycodium-composer-tokens/userInputOptionText.d.ts +33 -0
- package/dist/_private/ycodium-composer-tokens/userInputOptionText.js +27 -0
- package/dist/_private/ycodium-credential-account/credentialAccount.d.ts +21 -0
- package/dist/_private/ycodium-credential-account/credentialAccount.js +62 -0
- package/dist/_private/ycodium-credential-account/quotaJson.d.ts +12 -0
- package/dist/_private/ycodium-credential-account/quotaJson.js +14 -0
- package/dist/_private/ycodium-credential-account/quotaRequest.d.ts +32 -0
- package/dist/_private/ycodium-credential-account/quotaRequest.js +60 -0
- package/dist/_private/ycodium-day-format/dayFormat.d.ts +31 -0
- package/dist/_private/ycodium-day-format/dayFormat.js +32 -0
- package/dist/_private/ycodium-day-format/timestampFormat.d.ts +35 -0
- package/dist/_private/ycodium-day-format/timestampFormat.js +119 -0
- package/dist/_private/ycodium-decision-order/decisionOrder.d.ts +19 -0
- package/dist/_private/ycodium-decision-order/decisionOrder.js +38 -0
- package/dist/_private/ycodium-diff-format/diffRendering.d.ts +42 -0
- package/dist/_private/ycodium-diff-format/diffRendering.js +171 -0
- package/dist/_private/ycodium-duration-format/durationFormat.d.ts +20 -0
- package/dist/_private/ycodium-duration-format/durationFormat.js +56 -0
- package/dist/_private/ycodium-fetch-ports/fetchPorts.d.ts +36 -0
- package/dist/_private/ycodium-fetch-ports/fetchPorts.js +69 -0
- package/dist/_private/ycodium-fetch-ports/netFault.d.ts +10 -0
- package/dist/_private/ycodium-fetch-ports/netFault.js +17 -0
- package/dist/_private/ycodium-full-access-mode/fullAccessNativeMode.d.ts +28 -0
- package/dist/_private/ycodium-full-access-mode/fullAccessNativeMode.js +30 -0
- package/dist/_private/ycodium-instance-config/homePath.d.ts +34 -0
- package/dist/_private/ycodium-instance-config/homePath.js +85 -0
- package/dist/_private/ycodium-instance-config/instanceConfig.d.ts +46 -0
- package/dist/_private/ycodium-instance-config/instanceConfig.js +111 -0
- package/dist/_private/ycodium-instance-config/launchArgs.d.ts +5 -0
- package/dist/_private/ycodium-instance-config/launchArgs.js +65 -0
- package/dist/_private/ycodium-instance-config/probeProcess.d.ts +39 -0
- package/dist/_private/ycodium-instance-config/probeProcess.js +55 -0
- package/dist/_private/ycodium-instance-config/programHomeSchema.d.ts +44 -0
- package/dist/_private/ycodium-instance-config/programHomeSchema.js +60 -0
- package/dist/_private/ycodium-instance-config/tomlScalar.d.ts +5 -0
- package/dist/_private/ycodium-instance-config/tomlScalar.js +11 -0
- package/dist/_private/ycodium-jsonl-stream/appendedJsonl.d.ts +47 -0
- package/dist/_private/ycodium-jsonl-stream/appendedJsonl.js +172 -0
- package/dist/_private/ycodium-jsonl-stream/claudeSessions.d.ts +63 -0
- package/dist/_private/ycodium-jsonl-stream/claudeSessions.js +220 -0
- package/dist/_private/ycodium-jsonl-stream/codexSessions.d.ts +41 -0
- package/dist/_private/ycodium-jsonl-stream/codexSessions.js +197 -0
- package/dist/_private/ycodium-jsonl-stream/history.d.ts +6 -0
- package/dist/_private/ycodium-jsonl-stream/history.js +389 -0
- package/dist/_private/ycodium-jsonl-stream/historyErrors.d.ts +6 -0
- package/dist/_private/ycodium-jsonl-stream/historyErrors.js +6 -0
- package/dist/_private/ycodium-jsonl-stream/historyFile.d.ts +19 -0
- package/dist/_private/ycodium-jsonl-stream/historyFile.js +117 -0
- package/dist/_private/ycodium-jsonl-stream/historyRecord.d.ts +31 -0
- package/dist/_private/ycodium-jsonl-stream/historyRecord.js +144 -0
- package/dist/_private/ycodium-jsonl-stream/historyWaiting.d.ts +8 -0
- package/dist/_private/ycodium-jsonl-stream/historyWaiting.js +142 -0
- package/dist/_private/ycodium-jsonl-stream/jsonObjectLine.d.ts +5 -0
- package/dist/_private/ycodium-jsonl-stream/jsonObjectLine.js +18 -0
- package/dist/_private/ycodium-jsonl-stream/jsonlStream.d.ts +79 -0
- package/dist/_private/ycodium-jsonl-stream/jsonlStream.js +603 -0
- package/dist/_private/ycodium-jsonl-stream/scanCache.d.ts +69 -0
- package/dist/_private/ycodium-jsonl-stream/scanCache.js +106 -0
- package/dist/_private/ycodium-jsonl-stream/sessionDirectory.d.ts +5 -0
- package/dist/_private/ycodium-jsonl-stream/sessionDirectory.js +32 -0
- package/dist/_private/ycodium-jsonl-stream/sessionTranscript.d.ts +16 -0
- package/dist/_private/ycodium-jsonl-stream/sessionTranscript.js +112 -0
- package/dist/_private/ycodium-jsonl-stream/usageFields.d.ts +5 -0
- package/dist/_private/ycodium-jsonl-stream/usageFields.js +11 -0
- package/dist/_private/ycodium-markdown-fence/markdownFence.d.ts +6 -0
- package/dist/_private/ycodium-markdown-fence/markdownFence.js +24 -0
- package/dist/_private/ycodium-source-control/pullRequestScope.d.ts +23 -0
- package/dist/_private/ycodium-source-control/pullRequestScope.js +29 -0
- package/dist/_private/ycodium-sse-stream/sseStream.d.ts +37 -0
- package/dist/_private/ycodium-sse-stream/sseStream.js +104 -0
- package/dist/_private/ycodium-system-text/memberInstructions.d.ts +13 -0
- package/dist/_private/ycodium-system-text/memberInstructions.js +9 -0
- package/dist/_private/ycodium-system-text/systemText.d.ts +179 -0
- package/dist/_private/ycodium-system-text/systemText.js +257 -0
- package/dist/_private/ycodium-system-text/threadPreset.d.ts +18 -0
- package/dist/_private/ycodium-system-text/threadPreset.js +21 -0
- package/dist/_private/ycodium-text-generation/branchName.d.ts +6 -0
- package/dist/_private/ycodium-text-generation/branchName.js +26 -0
- package/dist/_private/ycodium-text-generation/prompts.d.ts +70 -0
- package/dist/_private/ycodium-text-generation/prompts.js +266 -0
- package/dist/_private/ycodium-text-generation/sanitize.d.ts +10 -0
- package/dist/_private/ycodium-text-generation/sanitize.js +124 -0
- package/dist/_private/ycodium-text-generation/structuredTextGeneration.d.ts +29 -0
- package/dist/_private/ycodium-text-generation/structuredTextGeneration.js +163 -0
- package/dist/_private/ycodium-tool-label/toolLabel.d.ts +42 -0
- package/dist/_private/ycodium-tool-label/toolLabel.js +249 -0
- package/dist/_private/ycodium-ui-hooks/DiffStatCounts.d.ts +22 -0
- package/dist/_private/ycodium-ui-hooks/DiffStatCounts.js +22 -0
- package/dist/_private/ycodium-ui-hooks/ProviderSignInChallenge.d.ts +29 -0
- package/dist/_private/ycodium-ui-hooks/ProviderSignInChallenge.js +13 -0
- package/dist/_private/ycodium-ui-hooks/RenderErrorBoundary.d.ts +28 -0
- package/dist/_private/ycodium-ui-hooks/RenderErrorBoundary.js +22 -0
- package/dist/_private/ycodium-ui-hooks/RuntimeMaintenanceActions.d.ts +19 -0
- package/dist/_private/ycodium-ui-hooks/RuntimeMaintenanceActions.js +7 -0
- package/dist/_private/ycodium-ui-hooks/SkillInlineText.d.ts +13 -0
- package/dist/_private/ycodium-ui-hooks/SkillInlineText.js +13 -0
- package/dist/_private/ycodium-ui-hooks/bundleStyle.d.ts +4 -0
- package/dist/_private/ycodium-ui-hooks/bundleStyle.js +52 -0
- package/dist/_private/ycodium-ui-hooks/catalogKeys.d.ts +9 -0
- package/dist/_private/ycodium-ui-hooks/catalogKeys.js +1 -0
- package/dist/_private/ycodium-ui-hooks/clipboard.d.ts +22 -0
- package/dist/_private/ycodium-ui-hooks/clipboard.js +149 -0
- package/dist/_private/ycodium-ui-hooks/hostControls.d.ts +24 -0
- package/dist/_private/ycodium-ui-hooks/hostControls.js +25 -0
- package/dist/_private/ycodium-ui-hooks/inlineChips.d.ts +50 -0
- package/dist/_private/ycodium-ui-hooks/inlineChips.js +32 -0
- package/dist/_private/ycodium-ui-hooks/notifyMessages.d.ts +20 -0
- package/dist/_private/ycodium-ui-hooks/notifyMessages.js +26 -0
- package/dist/_private/ycodium-ui-hooks/presenterInputState.d.ts +52 -0
- package/dist/_private/ycodium-ui-hooks/presenterInputState.js +240 -0
- package/dist/_private/ycodium-ui-hooks/processRowHeader.d.ts +6 -0
- package/dist/_private/ycodium-ui-hooks/processRowHeader.js +6 -0
- package/dist/_private/ycodium-ui-hooks/timelineDisclosure.d.ts +5 -0
- package/dist/_private/ycodium-ui-hooks/timelineDisclosure.js +73 -0
- package/dist/_private/ycodium-ui-hooks/useMediaQuery.d.ts +20 -0
- package/dist/_private/ycodium-ui-hooks/useMediaQuery.js +70 -0
- package/dist/_private/ycodium-ui-hooks/workEntryIcons.d.ts +25 -0
- package/dist/_private/ycodium-ui-hooks/workEntryIcons.js +66 -0
- package/dist/_private/ycodium-workspace-path/directoryScope.d.ts +5 -0
- package/dist/_private/ycodium-workspace-path/directoryScope.js +28 -0
- package/dist/_private/ycodium-workspace-path/workspacePath.d.ts +19 -0
- package/dist/_private/ycodium-workspace-path/workspacePath.js +90 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js.map +1 -1
- package/dist/capabilityPorts.d.ts.map +1 -1
- package/dist/capabilityPorts.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js.map +1 -1
- package/dist/communication-view.d.ts.map +1 -1
- package/dist/communication-view.js.map +1 -1
- package/dist/communication.d.ts.map +1 -1
- package/dist/communication.js.map +1 -1
- package/dist/composer-control.d.ts.map +1 -1
- package/dist/composer-control.js.map +1 -1
- package/dist/composer.d.ts +22 -0
- package/dist/composer.d.ts.map +1 -0
- package/dist/composer.js +22 -0
- package/dist/composer.js.map +1 -0
- package/dist/conversation-queue.d.ts.map +1 -1
- package/dist/conversation-queue.js.map +1 -1
- package/dist/conversation-view.d.ts.map +1 -1
- package/dist/conversation-view.js.map +1 -1
- package/dist/conversation.d.ts +4 -9
- package/dist/conversation.d.ts.map +1 -1
- package/dist/conversation.js.map +1 -1
- package/dist/conversationAttachments.d.ts.map +1 -1
- package/dist/conversationAttachments.js.map +1 -1
- package/dist/conversationBase.d.ts.map +1 -1
- package/dist/conversationBase.js.map +1 -1
- package/dist/conversationComposerApi.d.ts.map +1 -1
- package/dist/conversationComposerApi.js.map +1 -1
- package/dist/conversationComposerEnvironment.d.ts.map +1 -1
- package/dist/conversationComposerEnvironment.js.map +1 -1
- package/dist/conversationComposerHandle.d.ts.map +1 -1
- package/dist/conversationComposerHandle.js.map +1 -1
- package/dist/conversationComposerParts.d.ts.map +1 -1
- package/dist/conversationComposerParts.js.map +1 -1
- package/dist/conversationDerive.d.ts.map +1 -1
- package/dist/conversationDerive.js.map +1 -1
- package/dist/conversationDrafts.d.ts.map +1 -1
- package/dist/conversationDrafts.js.map +1 -1
- package/dist/conversationForks.d.ts.map +1 -1
- package/dist/conversationForks.js.map +1 -1
- package/dist/conversationHostModels.d.ts.map +1 -1
- package/dist/conversationHostModels.js.map +1 -1
- package/dist/conversationLoadFailure.d.ts.map +1 -1
- package/dist/conversationLoadFailure.js.map +1 -1
- package/dist/conversationMemberMentions.d.ts.map +1 -1
- package/dist/conversationMemberMentions.js.map +1 -1
- package/dist/conversationMessageLinks.d.ts.map +1 -1
- package/dist/conversationMessageLinks.js.map +1 -1
- package/dist/conversationMessageMemory.d.ts.map +1 -1
- package/dist/conversationMessageMemory.js.map +1 -1
- package/dist/conversationPresets.d.ts.map +1 -1
- package/dist/conversationPresets.js.map +1 -1
- package/dist/conversationRows.d.ts +2 -0
- package/dist/conversationRows.d.ts.map +1 -1
- package/dist/conversationRows.js.map +1 -1
- package/dist/conversationSessionMessage.d.ts.map +1 -1
- package/dist/conversationSessionMessage.js.map +1 -1
- package/dist/conversationSkills.d.ts.map +1 -1
- package/dist/conversationSkills.js.map +1 -1
- package/dist/conversationTrajectory.d.ts.map +1 -1
- package/dist/conversationTrajectory.js.map +1 -1
- package/dist/conversationTranscript.d.ts.map +1 -1
- package/dist/conversationTranscript.js.map +1 -1
- package/dist/conversationTurnSummaries.d.ts.map +1 -1
- package/dist/conversationTurnSummaries.js.map +1 -1
- package/dist/conversationViewProps.d.ts.map +1 -1
- package/dist/conversationViewProps.js.map +1 -1
- package/dist/conversationWorkEntry.d.ts.map +1 -1
- package/dist/conversationWorkEntry.js.map +1 -1
- package/dist/credential-account.d.ts +4 -0
- package/dist/credential-account.d.ts.map +1 -0
- package/dist/credential-account.js +4 -0
- package/dist/credential-account.js.map +1 -0
- package/dist/dataPorts.gen.d.ts +306 -0
- package/dist/dataPorts.gen.d.ts.map +1 -1
- package/dist/dataPorts.gen.js.map +1 -1
- package/dist/decision-card.d.ts.map +1 -1
- package/dist/decision-card.js.map +1 -1
- package/dist/decisions.d.ts.map +1 -1
- package/dist/decisions.js.map +1 -1
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js.map +1 -1
- package/dist/derivedState.d.ts.map +1 -1
- package/dist/derivedState.js.map +1 -1
- package/dist/diagnosticData.d.ts.map +1 -1
- package/dist/diagnosticData.js.map +1 -1
- package/dist/diff-rendering.d.ts +2 -0
- package/dist/diff-rendering.d.ts.map +1 -0
- package/dist/diff-rendering.js +2 -0
- package/dist/diff-rendering.js.map +1 -0
- package/dist/display-format.d.ts +5 -0
- package/dist/display-format.d.ts.map +1 -0
- package/dist/display-format.js +5 -0
- package/dist/display-format.js.map +1 -0
- package/dist/entity-names.d.ts.map +1 -1
- package/dist/entity-names.js.map +1 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js.map +1 -1
- package/dist/executor-mode.d.ts +2 -0
- package/dist/executor-mode.d.ts.map +1 -0
- package/dist/executor-mode.js +2 -0
- package/dist/executor-mode.js.map +1 -0
- package/dist/executor.d.ts +17 -1
- package/dist/executor.d.ts.map +1 -1
- package/dist/executor.js.map +1 -1
- package/dist/executorCapabilities.d.ts.map +1 -1
- package/dist/executorCapabilities.js.map +1 -1
- package/dist/executorCard.d.ts +6 -0
- package/dist/executorCard.d.ts.map +1 -1
- package/dist/executorCard.js.map +1 -1
- package/dist/executorCommandArgv.d.ts.map +1 -1
- package/dist/executorCommandArgv.js.map +1 -1
- package/dist/executorEffective.d.ts.map +1 -1
- package/dist/executorEffective.js.map +1 -1
- package/dist/executorErrors.d.ts.map +1 -1
- package/dist/executorErrors.js.map +1 -1
- package/dist/executorEvents.d.ts.map +1 -1
- package/dist/executorEvents.js.map +1 -1
- package/dist/executorModelOptions.d.ts.map +1 -1
- package/dist/executorModelOptions.js.map +1 -1
- package/dist/executorProcesses.d.ts.map +1 -1
- package/dist/executorProcesses.js.map +1 -1
- package/dist/executorSession.d.ts +8 -2
- package/dist/executorSession.d.ts.map +1 -1
- package/dist/executorSession.js.map +1 -1
- package/dist/executorSpawn.d.ts +5 -4
- package/dist/executorSpawn.d.ts.map +1 -1
- package/dist/executorSpawn.js +20 -7
- package/dist/executorSpawn.js.map +1 -1
- package/dist/fetch-ports.d.ts +2 -0
- package/dist/fetch-ports.d.ts.map +1 -0
- package/dist/fetch-ports.js +2 -0
- package/dist/fetch-ports.js.map +1 -0
- package/dist/file-preview.d.ts.map +1 -1
- package/dist/file-preview.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/inline-tag.d.ts.map +1 -1
- package/dist/inline-tag.js.map +1 -1
- package/dist/instance-config.d.ts +7 -0
- package/dist/instance-config.d.ts.map +1 -0
- package/dist/instance-config.js +7 -0
- package/dist/instance-config.js.map +1 -0
- package/dist/interval.d.ts.map +1 -1
- package/dist/interval.js.map +1 -1
- package/dist/jsonl.d.ts +6 -0
- package/dist/jsonl.d.ts.map +1 -0
- package/dist/jsonl.js +6 -0
- package/dist/jsonl.js.map +1 -0
- package/dist/keyedSubscribers.d.ts.map +1 -1
- package/dist/keyedSubscribers.js.map +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js.map +1 -1
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js.map +1 -1
- package/dist/model-picker.d.ts.map +1 -1
- package/dist/model-picker.js.map +1 -1
- package/dist/modelCatalogNotice.d.ts.map +1 -1
- package/dist/modelCatalogNotice.js.map +1 -1
- package/dist/modelChoice.d.ts.map +1 -1
- package/dist/modelChoice.js.map +1 -1
- package/dist/modelChoiceOptions.d.ts.map +1 -1
- package/dist/modelChoiceOptions.js.map +1 -1
- package/dist/modelChoiceTraits.d.ts.map +1 -1
- package/dist/modelChoiceTraits.js.map +1 -1
- package/dist/modelDisplayName.d.ts.map +1 -1
- package/dist/modelDisplayName.js.map +1 -1
- package/dist/pending-requests.d.ts.map +1 -1
- package/dist/pending-requests.js.map +1 -1
- package/dist/plugin-tools.d.ts.map +1 -1
- package/dist/plugin-tools.js.map +1 -1
- package/dist/pluginContextCommands.d.ts.map +1 -1
- package/dist/pluginContextCommands.js.map +1 -1
- package/dist/pluginContextProviders.d.ts.map +1 -1
- package/dist/pluginContextProviders.js.map +1 -1
- package/dist/pluginContextThreads.d.ts.map +1 -1
- package/dist/pluginContextThreads.js.map +1 -1
- package/dist/pluginContextWorkspace.d.ts.map +1 -1
- package/dist/pluginContextWorkspace.js.map +1 -1
- package/dist/process-operation.d.ts.map +1 -1
- package/dist/process-operation.js.map +1 -1
- package/dist/process-socket.d.ts.map +1 -1
- package/dist/process-socket.js.map +1 -1
- package/dist/process-stdin.d.ts.map +1 -1
- package/dist/process-stdin.js.map +1 -1
- package/dist/projects.d.ts.map +1 -1
- package/dist/projects.js.map +1 -1
- package/dist/provider-settings.d.ts.map +1 -1
- package/dist/provider-settings.js.map +1 -1
- package/dist/providerInstanceSelection.d.ts.map +1 -1
- package/dist/providerInstanceSelection.js.map +1 -1
- package/dist/reasoningLevelFallback.d.ts.map +1 -1
- package/dist/reasoningLevelFallback.js.map +1 -1
- package/dist/runtime-maintenance.d.ts.map +1 -1
- package/dist/runtime-maintenance.js.map +1 -1
- package/dist/runtimes.d.ts.map +1 -1
- package/dist/runtimes.js.map +1 -1
- package/dist/selectAllCopy.d.ts.map +1 -1
- package/dist/selectAllCopy.js.map +1 -1
- package/dist/session-history.d.ts +6 -0
- package/dist/session-history.d.ts.map +1 -0
- package/dist/session-history.js +6 -0
- package/dist/session-history.js.map +1 -0
- package/dist/settings-actions.d.ts.map +1 -1
- package/dist/settings-actions.js.map +1 -1
- package/dist/settings-card-shape.d.ts.map +1 -1
- package/dist/settings-card-shape.js.map +1 -1
- package/dist/settings-card.d.ts.map +1 -1
- package/dist/settings-card.js.map +1 -1
- package/dist/settings-ui.d.ts.map +1 -1
- package/dist/settings-ui.js.map +1 -1
- package/dist/sign-in.d.ts.map +1 -1
- package/dist/sign-in.js.map +1 -1
- package/dist/slashCommands.d.ts.map +1 -1
- package/dist/slashCommands.js.map +1 -1
- package/dist/slots.d.ts.map +1 -1
- package/dist/slots.js.map +1 -1
- package/dist/source/_private/ycodium-attachment-kinds/chatAttachmentKinds.ts +105 -0
- package/dist/source/_private/ycodium-attachment-kinds/mediaKinds.ts +83 -0
- package/dist/source/_private/ycodium-composer-tokens/approvalFileChanges.ts +58 -0
- package/dist/source/_private/ycodium-composer-tokens/composerFileLink.ts +23 -0
- package/dist/source/_private/ycodium-composer-tokens/composerInlineTokens.ts +130 -0
- package/dist/source/_private/ycodium-composer-tokens/composerLogic.ts +251 -0
- package/dist/source/_private/ycodium-composer-tokens/composerMentionDrag.ts +98 -0
- package/dist/source/_private/ycodium-composer-tokens/composerPromptSegments.ts +222 -0
- package/dist/source/_private/ycodium-composer-tokens/composerTrigger.ts +64 -0
- package/dist/source/_private/ycodium-composer-tokens/contextWindowFormat.ts +16 -0
- package/dist/source/_private/ycodium-composer-tokens/diffCount.ts +14 -0
- package/dist/source/_private/ycodium-composer-tokens/pendingUserInput.ts +256 -0
- package/dist/source/_private/ycodium-composer-tokens/promptContextBlocks.ts +179 -0
- package/dist/source/_private/ycodium-composer-tokens/proposedPlan.ts +134 -0
- package/dist/source/_private/ycodium-composer-tokens/providerSkillSearch.ts +105 -0
- package/dist/source/_private/ycodium-composer-tokens/providerSkills.ts +86 -0
- package/dist/source/_private/ycodium-composer-tokens/queueEntry.ts +49 -0
- package/dist/source/_private/ycodium-composer-tokens/reviewCommentBlocks.ts +177 -0
- package/dist/source/_private/ycodium-composer-tokens/searchRanking.ts +192 -0
- package/dist/source/_private/ycodium-composer-tokens/skillTokens.ts +192 -0
- package/dist/source/_private/ycodium-composer-tokens/slashMenu.ts +293 -0
- package/dist/source/_private/ycodium-composer-tokens/userInputOptionText.ts +51 -0
- package/dist/source/_private/ycodium-credential-account/credentialAccount.ts +83 -0
- package/dist/source/_private/ycodium-credential-account/quotaJson.ts +25 -0
- package/dist/source/_private/ycodium-credential-account/quotaRequest.ts +79 -0
- package/dist/source/_private/ycodium-day-format/dayFormat.ts +57 -0
- package/dist/source/_private/ycodium-day-format/timestampFormat.ts +165 -0
- package/dist/source/_private/ycodium-decision-order/decisionOrder.ts +54 -0
- package/dist/source/_private/ycodium-diff-format/diffRendering.ts +229 -0
- package/dist/source/_private/ycodium-duration-format/durationFormat.ts +60 -0
- package/dist/source/_private/ycodium-executor-common/catalogModel.ts +40 -0
- package/dist/source/_private/ycodium-executor-common/eventTypes.ts +97 -0
- package/dist/source/_private/ycodium-executor-common/modelSelection.ts +24 -0
- package/dist/source/_private/ycodium-executor-common/nodeStreams.ts +212 -0
- package/dist/source/_private/ycodium-executor-common/raceAbort.ts +25 -0
- package/dist/source/_private/ycodium-executor-common/reasoningLevelFallback.ts +28 -0
- package/dist/source/_private/ycodium-executor-common/stderrTail.ts +27 -0
- package/dist/source/_private/ycodium-executor-common/toolPresentation.ts +268 -0
- package/dist/source/_private/ycodium-fetch-ports/fetchPorts.ts +84 -0
- package/dist/source/_private/ycodium-fetch-ports/netFault.ts +30 -0
- package/dist/source/_private/ycodium-full-access-mode/fullAccessNativeMode.ts +32 -0
- package/dist/source/_private/ycodium-instance-config/homePath.ts +140 -0
- package/dist/source/_private/ycodium-instance-config/instanceConfig.ts +149 -0
- package/dist/source/_private/ycodium-instance-config/launchArgs.ts +60 -0
- package/dist/source/_private/ycodium-instance-config/probeProcess.ts +89 -0
- package/dist/source/_private/ycodium-instance-config/programHomeSchema.ts +74 -0
- package/dist/source/_private/ycodium-instance-config/tomlScalar.ts +10 -0
- package/dist/source/_private/ycodium-jsonl-stream/appendedJsonl.ts +222 -0
- package/dist/source/_private/ycodium-jsonl-stream/claudeSessions.ts +263 -0
- package/dist/source/_private/ycodium-jsonl-stream/codexSessions.ts +254 -0
- package/dist/source/_private/ycodium-jsonl-stream/history.ts +492 -0
- package/dist/source/_private/ycodium-jsonl-stream/historyErrors.ts +6 -0
- package/dist/source/_private/ycodium-jsonl-stream/historyFile.ts +139 -0
- package/dist/source/_private/ycodium-jsonl-stream/historyRecord.ts +180 -0
- package/dist/source/_private/ycodium-jsonl-stream/historyWaiting.ts +140 -0
- package/dist/source/_private/ycodium-jsonl-stream/jsonObjectLine.ts +15 -0
- package/dist/source/_private/ycodium-jsonl-stream/jsonlStream.ts +650 -0
- package/dist/source/_private/ycodium-jsonl-stream/scanCache.ts +163 -0
- package/dist/source/_private/ycodium-jsonl-stream/sessionDirectory.ts +39 -0
- package/dist/source/_private/ycodium-jsonl-stream/sessionTranscript.ts +136 -0
- package/dist/source/_private/ycodium-jsonl-stream/usageFields.ts +13 -0
- package/dist/source/_private/ycodium-markdown-fence/markdownFence.ts +28 -0
- package/dist/source/_private/ycodium-source-control/pullRequestScope.ts +35 -0
- package/dist/source/_private/ycodium-sse-stream/sseStream.ts +118 -0
- package/dist/source/_private/ycodium-system-text/memberInstructions.ts +24 -0
- package/dist/source/_private/ycodium-system-text/systemText.ts +356 -0
- package/dist/source/_private/ycodium-system-text/threadPreset.ts +35 -0
- package/dist/source/_private/ycodium-text-generation/branchName.ts +29 -0
- package/dist/source/_private/ycodium-text-generation/prompts.ts +342 -0
- package/dist/source/_private/ycodium-text-generation/sanitize.ts +125 -0
- package/dist/source/_private/ycodium-text-generation/structuredTextGeneration.ts +237 -0
- package/dist/source/_private/ycodium-tool-label/toolLabel.ts +287 -0
- package/dist/source/_private/ycodium-ui-hooks/DiffStatCounts.tsx +76 -0
- package/dist/source/_private/ycodium-ui-hooks/ProviderSignInChallenge.tsx +115 -0
- package/dist/source/_private/ycodium-ui-hooks/RenderErrorBoundary.tsx +34 -0
- package/dist/source/_private/ycodium-ui-hooks/RuntimeMaintenanceActions.tsx +63 -0
- package/dist/source/_private/ycodium-ui-hooks/SkillInlineText.tsx +28 -0
- package/dist/source/_private/ycodium-ui-hooks/bundleStyle.ts +52 -0
- package/dist/source/_private/ycodium-ui-hooks/catalogKeys.ts +11 -0
- package/dist/source/_private/ycodium-ui-hooks/clipboard.ts +176 -0
- package/dist/source/_private/ycodium-ui-hooks/hostControls.ts +43 -0
- package/dist/source/_private/ycodium-ui-hooks/inlineChips.tsx +114 -0
- package/dist/source/_private/ycodium-ui-hooks/notifyMessages.ts +36 -0
- package/dist/source/_private/ycodium-ui-hooks/presenterInputState.ts +341 -0
- package/dist/source/_private/ycodium-ui-hooks/processRowHeader.ts +7 -0
- package/dist/source/_private/ycodium-ui-hooks/timelineDisclosure.ts +98 -0
- package/dist/source/_private/ycodium-ui-hooks/useMediaQuery.ts +87 -0
- package/dist/source/_private/ycodium-ui-hooks/workEntryIcons.ts +99 -0
- package/dist/source/_private/ycodium-workspace-path/directoryScope.ts +34 -0
- package/dist/source/_private/ycodium-workspace-path/workspacePath.ts +110 -0
- package/dist/source/cache.ts +55 -0
- package/dist/source/capabilityPorts.ts +272 -0
- package/dist/source/cli.ts +69 -0
- package/dist/source/commands.ts +208 -0
- package/dist/source/communication-view.ts +107 -0
- package/dist/source/communication.ts +26 -0
- package/dist/source/composer-control.ts +16 -0
- package/dist/source/composer.ts +108 -0
- package/dist/source/conversation-queue.ts +165 -0
- package/dist/source/conversation-view.ts +49 -0
- package/dist/source/conversation.ts +695 -0
- package/dist/source/conversationAttachments.ts +139 -0
- package/dist/source/conversationBase.ts +128 -0
- package/dist/source/conversationComposerApi.ts +339 -0
- package/dist/source/conversationComposerEnvironment.ts +76 -0
- package/dist/source/conversationComposerHandle.ts +89 -0
- package/dist/source/conversationComposerParts.ts +10 -0
- package/dist/source/conversationDerive.ts +252 -0
- package/dist/source/conversationDrafts.ts +281 -0
- package/dist/source/conversationForks.ts +40 -0
- package/dist/source/conversationHostModels.ts +467 -0
- package/dist/source/conversationLoadFailure.ts +9 -0
- package/dist/source/conversationMemberMentions.ts +63 -0
- package/dist/source/conversationMessageLinks.ts +153 -0
- package/dist/source/conversationMessageMemory.ts +45 -0
- package/dist/source/conversationPresets.ts +15 -0
- package/dist/source/conversationRows.ts +134 -0
- package/dist/source/conversationSessionMessage.ts +18 -0
- package/dist/source/conversationSkills.ts +26 -0
- package/dist/source/conversationTrajectory.ts +116 -0
- package/dist/source/conversationTranscript.ts +33 -0
- package/dist/source/conversationTurnSummaries.ts +57 -0
- package/dist/source/conversationViewProps.ts +486 -0
- package/dist/source/conversationWorkEntry.ts +104 -0
- package/dist/source/credential-account.ts +18 -0
- package/dist/source/dataPorts.gen.ts +2207 -0
- package/dist/source/decision-card.ts +87 -0
- package/dist/source/decisions.ts +43 -0
- package/dist/source/definition.ts +28 -0
- package/dist/source/derivedState.ts +55 -0
- package/dist/source/diagnosticData.ts +238 -0
- package/dist/source/diff-rendering.ts +6 -0
- package/dist/source/display-format.ts +14 -0
- package/dist/source/entity-names.ts +73 -0
- package/dist/source/events.ts +326 -0
- package/dist/source/executor-mode.ts +1 -0
- package/dist/source/executor.ts +623 -0
- package/dist/source/executorCapabilities.ts +89 -0
- package/dist/source/executorCard.ts +426 -0
- package/dist/source/executorCommandArgv.ts +114 -0
- package/dist/source/executorEffective.ts +99 -0
- package/dist/source/executorErrors.ts +73 -0
- package/dist/source/executorEvents.ts +258 -0
- package/dist/source/executorModelOptions.ts +179 -0
- package/dist/source/executorProcesses.ts +43 -0
- package/dist/source/executorSession.ts +508 -0
- package/dist/source/executorSpawn.ts +141 -0
- package/dist/source/fetch-ports.ts +1 -0
- package/dist/source/file-preview.ts +32 -0
- package/dist/source/index.ts +416 -0
- package/dist/source/inline-tag.ts +27 -0
- package/dist/source/instance-config.ts +31 -0
- package/dist/source/interval.ts +32 -0
- package/dist/source/jsonl.ts +21 -0
- package/dist/source/keyedSubscribers.ts +55 -0
- package/dist/source/logger.ts +16 -0
- package/dist/source/messages.ts +27 -0
- package/dist/source/model-picker.ts +82 -0
- package/dist/source/modelCatalogNotice.ts +34 -0
- package/dist/source/modelChoice.ts +371 -0
- package/dist/source/modelChoiceOptions.ts +309 -0
- package/dist/source/modelChoiceTraits.ts +133 -0
- package/dist/source/modelDisplayName.ts +42 -0
- package/dist/source/pending-requests.ts +56 -0
- package/dist/source/plugin-tools.ts +181 -0
- package/dist/source/pluginContextCommands.ts +224 -0
- package/dist/source/pluginContextProviders.ts +136 -0
- package/dist/source/pluginContextThreads.ts +83 -0
- package/dist/source/pluginContextWorkspace.ts +74 -0
- package/dist/source/process-operation.ts +291 -0
- package/dist/source/process-socket.ts +371 -0
- package/dist/source/process-stdin.ts +214 -0
- package/dist/source/projects.ts +31 -0
- package/dist/source/provider-settings.ts +343 -0
- package/dist/source/providerInstanceSelection.ts +72 -0
- package/dist/source/reasoningLevelFallback.ts +13 -0
- package/dist/source/runtime-maintenance.ts +307 -0
- package/dist/source/runtimes.ts +14 -0
- package/dist/source/selectAllCopy.ts +12 -0
- package/dist/source/session-history.ts +45 -0
- package/dist/source/settings-actions.ts +91 -0
- package/dist/source/settings-card-shape.ts +229 -0
- package/dist/source/settings-card.ts +311 -0
- package/dist/source/settings-ui.ts +48 -0
- package/dist/source/sign-in.ts +52 -0
- package/dist/source/slashCommands.ts +36 -0
- package/dist/source/slots.ts +243 -0
- package/dist/source/source-control.ts +5 -0
- package/dist/source/sse.ts +1 -0
- package/dist/source/system-text.ts +18 -0
- package/dist/source/teamView.ts +67 -0
- package/dist/source/testing.ts +203 -0
- package/dist/source/text-generation.ts +5 -0
- package/dist/source/threadAnnotation.ts +12 -0
- package/dist/source/threads.ts +77 -0
- package/dist/source/timeline-process.ts +87 -0
- package/dist/source/timeline-row-error.ts +14 -0
- package/dist/source/tool-display.ts +130 -0
- package/dist/source/traits-picker.ts +84 -0
- package/dist/source/ui-bridge-version.ts +64 -0
- package/dist/source/ui-hooks.ts +26 -0
- package/dist/source/ui-i18n.ts +1 -0
- package/dist/source/ui-media-query.ts +1 -0
- package/dist/source/ui-presenter-state.ts +6 -0
- package/dist/source/ui.ts +671 -0
- package/dist/source/uiHostCapabilities.ts +85 -0
- package/dist/source/uiMachineAdmission.ts +21 -0
- package/dist/source/uiSessionProjections.ts +19 -0
- package/dist/source/usage.ts +225 -0
- package/dist/source/version.ts +31 -0
- package/dist/source/workspace-path.ts +2 -0
- package/dist/source-control.d.ts +3 -0
- package/dist/source-control.d.ts.map +1 -0
- package/dist/source-control.js +3 -0
- package/dist/source-control.js.map +1 -0
- package/dist/sse.d.ts +2 -0
- package/dist/sse.d.ts.map +1 -0
- package/dist/sse.js +2 -0
- package/dist/sse.js.map +1 -0
- package/dist/system-text.d.ts +4 -0
- package/dist/system-text.d.ts.map +1 -0
- package/dist/system-text.js +4 -0
- package/dist/system-text.js.map +1 -0
- package/dist/teamView.d.ts.map +1 -1
- package/dist/teamView.js.map +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js.map +1 -1
- package/dist/text-generation.d.ts +3 -0
- package/dist/text-generation.d.ts.map +1 -0
- package/dist/text-generation.js +3 -0
- package/dist/text-generation.js.map +1 -0
- package/dist/threadAnnotation.d.ts.map +1 -1
- package/dist/threadAnnotation.js.map +1 -1
- package/dist/threads.d.ts.map +1 -1
- package/dist/threads.js.map +1 -1
- package/dist/timeline-process.d.ts +32 -0
- package/dist/timeline-process.d.ts.map +1 -1
- package/dist/timeline-process.js.map +1 -1
- package/dist/timeline-row-error.d.ts.map +1 -1
- package/dist/timeline-row-error.js.map +1 -1
- package/dist/tool-display.d.ts.map +1 -1
- package/dist/tool-display.js.map +1 -1
- package/dist/traits-picker.d.ts.map +1 -1
- package/dist/traits-picker.js.map +1 -1
- package/dist/ui-bridge-version.d.ts.map +1 -1
- package/dist/ui-bridge-version.js.map +1 -1
- package/dist/ui-hooks.d.ts +14 -0
- package/dist/ui-hooks.d.ts.map +1 -0
- package/dist/ui-hooks.js +14 -0
- package/dist/ui-hooks.js.map +1 -0
- package/dist/ui-i18n.d.ts +2 -0
- package/dist/ui-i18n.d.ts.map +1 -0
- package/dist/ui-i18n.js +2 -0
- package/dist/ui-i18n.js.map +1 -0
- package/dist/ui-media-query.d.ts +2 -0
- package/dist/ui-media-query.d.ts.map +1 -0
- package/dist/ui-media-query.js +2 -0
- package/dist/ui-media-query.js.map +1 -0
- package/dist/ui-presenter-state.d.ts +2 -0
- package/dist/ui-presenter-state.d.ts.map +1 -0
- package/dist/ui-presenter-state.js +2 -0
- package/dist/ui-presenter-state.js.map +1 -0
- package/dist/ui.d.ts +2 -2
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js.map +1 -1
- package/dist/uiHostCapabilities.d.ts.map +1 -1
- package/dist/uiHostCapabilities.js.map +1 -1
- package/dist/uiMachineAdmission.d.ts.map +1 -1
- package/dist/uiMachineAdmission.js.map +1 -1
- package/dist/uiSessionProjections.d.ts.map +1 -1
- package/dist/uiSessionProjections.js.map +1 -1
- package/dist/usage.d.ts.map +1 -1
- package/dist/usage.js.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/workspace-path.d.ts +3 -0
- package/dist/workspace-path.d.ts.map +1 -0
- package/dist/workspace-path.js +3 -0
- package/dist/workspace-path.js.map +1 -0
- package/package.json +114 -3
|
@@ -0,0 +1,695 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@ycodium-ai/plugin-api/conversation` 的会话呈现契约:展示规则归插件,数据、发送副作用与编排事实归宿主。
|
|
3
|
+
* 插件不得 import 宿主;宿主按本文件构造 viewProps,其类型须可赋值给这里的结构子集,反向不保证。
|
|
4
|
+
*
|
|
5
|
+
* 会话插件在 manifest 里只声明 `ui.entry`(无 pages/panels),bundle 的 `register(bridge)` 返回
|
|
6
|
+
* `views: { conversation }`,并在 `viewCapabilities` 里声明 {@link CONVERSATION_VIEW_HOST_DATA_CAPABILITY}。
|
|
7
|
+
* 宿主经 `PluginViewHost` 挂载:每台机器、每个插件版本各一份;插件停用/卸载、或与宿主的
|
|
8
|
+
* 数据接口版本不一致时,宿主说明原因。多个保活会话 pane 各挂各的实例,全局资源(快捷键、
|
|
9
|
+
* 壳内容发布、已读标记)由宿主按 `scope.active` 仲裁,插件不得自行注册全局监听。
|
|
10
|
+
*
|
|
11
|
+
* 插件按 `(机器, 会话)` 经 {@link ConversationHostData} 订阅数据、发送命令;组件只随所订数据重新渲染。
|
|
12
|
+
* 数据来自宿主已有的连接与缓存,插件不另建连接或缓存;尚未迁进数据接口的部分仍由宿主经 props 给出。
|
|
13
|
+
* `ConversationTimelineEntry` / `ConversationThreadActivity` 对插件不透明,只能原样传回宿主派生函数。
|
|
14
|
+
* 行模型、用量、页脚的派生依赖宿主共享状态,因此留在宿主;插件拿到可渲染的结构子集。
|
|
15
|
+
* 接缝(`renderWorkGroup` 等)只读本契约声明的字段。回调与函数可跨界(同 bridge 的 `useCreateThread`);
|
|
16
|
+
* ReactNode 接缝按 `unknown` 声明,插件只做渲染占位。
|
|
17
|
+
*
|
|
18
|
+
* @module @ycodium-ai/plugin-api/conversation
|
|
19
|
+
*/
|
|
20
|
+
import type { PluginUiEntityReference } from "./entity-names.ts";
|
|
21
|
+
import type { ConversationThreadLoadFailure } from "./conversationLoadFailure.ts";
|
|
22
|
+
export type { ConversationThreadLoadFailure } from "./conversationLoadFailure.ts";
|
|
23
|
+
export { CONVERSATION_TRANSCRIPT_VIEW_ID } from "./conversationTranscript.ts";
|
|
24
|
+
export type {
|
|
25
|
+
ConversationTranscriptMessage,
|
|
26
|
+
ConversationTranscriptViewProps,
|
|
27
|
+
} from "./conversationTranscript.ts";
|
|
28
|
+
export type * from "./conversationAttachments.ts";
|
|
29
|
+
import type { ConversationMessageForks, ConversationMessageReveal } from "./conversationForks.ts";
|
|
30
|
+
export type * from "./conversationForks.ts";
|
|
31
|
+
import type {
|
|
32
|
+
ConversationMemoryExperience,
|
|
33
|
+
ConversationMessageMemory,
|
|
34
|
+
} from "./conversationMessageMemory.ts";
|
|
35
|
+
export type * from "./conversationMessageMemory.ts";
|
|
36
|
+
import type { ConversationSessionMessageCardProps } from "./conversationSessionMessage.ts";
|
|
37
|
+
export type * from "./conversationSessionMessage.ts";
|
|
38
|
+
import type {
|
|
39
|
+
ConversationAssistantQuoteApi,
|
|
40
|
+
ConversationThreadReferenceApi,
|
|
41
|
+
} from "./conversationMessageLinks.ts";
|
|
42
|
+
export type * from "./conversationMessageLinks.ts";
|
|
43
|
+
export {
|
|
44
|
+
CONVERSATION_ASSISTANT_QUOTE_OPEN_EVENT,
|
|
45
|
+
CONVERSATION_THREAD_REFERENCE_OPEN_EVENT,
|
|
46
|
+
} from "./conversationMessageLinks.ts";
|
|
47
|
+
import type { ConversationMemberMentionApi } from "./conversationMemberMentions.ts";
|
|
48
|
+
export type * from "./conversationMemberMentions.ts";
|
|
49
|
+
import type { ConversationShellCommand } from "./conversationComposerParts.ts";
|
|
50
|
+
export type * from "./conversationComposerParts.ts";
|
|
51
|
+
export type * from "./conversationSkills.ts";
|
|
52
|
+
import type {
|
|
53
|
+
ConversationCommunicationRecord,
|
|
54
|
+
ConversationTrajectoryRow,
|
|
55
|
+
ConversationToolCallFilter,
|
|
56
|
+
ConversationTrajectorySourceQuery,
|
|
57
|
+
} from "./conversationTrajectory.ts";
|
|
58
|
+
export type * from "./conversationTrajectory.ts";
|
|
59
|
+
export type * from "./conversationTurnSummaries.ts";
|
|
60
|
+
import type {
|
|
61
|
+
ConversationTurnSummary,
|
|
62
|
+
ConversationTurnTrajectoryGroup,
|
|
63
|
+
} from "./conversationTurnSummaries.ts";
|
|
64
|
+
import type {
|
|
65
|
+
ConversationQueuedMessageEdit,
|
|
66
|
+
ConversationQueueEntry,
|
|
67
|
+
ConversationPendingQueueSubmission,
|
|
68
|
+
ConversationQueueState,
|
|
69
|
+
} from "./conversation-queue.ts";
|
|
70
|
+
import type { ConversationWorkEntry } from "./conversationWorkEntry.ts";
|
|
71
|
+
export type * from "./conversationWorkEntry.ts";
|
|
72
|
+
import type {
|
|
73
|
+
ConversationSentMessage,
|
|
74
|
+
ConversationThreadActivity,
|
|
75
|
+
ConversationTimelineEntry,
|
|
76
|
+
ConversationTurnUsage,
|
|
77
|
+
} from "./conversationBase.ts";
|
|
78
|
+
export type * from "./conversationBase.ts";
|
|
79
|
+
import type {
|
|
80
|
+
ConversationApprovalRequestId,
|
|
81
|
+
ConversationComposerOccupant,
|
|
82
|
+
ConversationContextWindowSnapshot,
|
|
83
|
+
ConversationEnvironmentId,
|
|
84
|
+
ConversationModelSelection,
|
|
85
|
+
ConversationPendingApproval,
|
|
86
|
+
ConversationPendingUserInput,
|
|
87
|
+
ConversationPendingUserInputDraftAnswer,
|
|
88
|
+
ConversationProjectId,
|
|
89
|
+
ConversationProviderApprovalDecision,
|
|
90
|
+
ConversationProviderDriverKind,
|
|
91
|
+
ConversationProviderInteractionMode,
|
|
92
|
+
ConversationQuestions,
|
|
93
|
+
ConversationRuntimeMode,
|
|
94
|
+
ConversationServerProvider,
|
|
95
|
+
ConversationThreadActualModel,
|
|
96
|
+
ConversationThreadDecisionCard,
|
|
97
|
+
ConversationThreadId,
|
|
98
|
+
} from "./conversationHostModels.ts";
|
|
99
|
+
export type * from "./conversationHostModels.ts";
|
|
100
|
+
export type * from "./conversationDrafts.ts";
|
|
101
|
+
export type * from "./conversationComposerEnvironment.ts";
|
|
102
|
+
export type * from "./conversationComposerApi.ts";
|
|
103
|
+
export type * from "./conversationComposerHandle.ts";
|
|
104
|
+
export type * from "./conversationRows.ts";
|
|
105
|
+
import type {
|
|
106
|
+
ConversationLatestTurn,
|
|
107
|
+
ConversationRowsDeriveInput,
|
|
108
|
+
ConversationTurnStall,
|
|
109
|
+
} from "./conversationDerive.ts";
|
|
110
|
+
export type * from "./conversationDerive.ts";
|
|
111
|
+
import type {
|
|
112
|
+
ConversationComposerBanners,
|
|
113
|
+
ConversationComposerStatus,
|
|
114
|
+
ConversationTrajectoryToolCallDetailData,
|
|
115
|
+
ConversationVisibleTurnRange,
|
|
116
|
+
} from "./conversationViewProps.ts";
|
|
117
|
+
export type * from "./conversationViewProps.ts";
|
|
118
|
+
export type {
|
|
119
|
+
ConversationQueuedMessageEdit,
|
|
120
|
+
ConversationQueuedAttachment,
|
|
121
|
+
ConversationQueueEntry,
|
|
122
|
+
ConversationQueueEntrySource,
|
|
123
|
+
ConversationPendingQueueSubmission,
|
|
124
|
+
ConversationQueueState,
|
|
125
|
+
ConversationQueueActions,
|
|
126
|
+
} from "./conversation-queue.ts";
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* 宿主数据接口的契约版本。宿主与插件各自编译进自己构建时的这个数字;两边不一致时
|
|
130
|
+
* 会话区显示版本不一致的说明,而不是拿对方读不懂的数据硬画。改动或删除已有成员、
|
|
131
|
+
* 删除 viewProps 字段、或把更多数据从 props 挪进这里时加一。
|
|
132
|
+
*/
|
|
133
|
+
export const CONVERSATION_HOST_DATA_VERSION = 18;
|
|
134
|
+
/**
|
|
135
|
+
* 会话视图在 `viewCapabilities` 里声明自己读的是哪一版宿主数据接口。宿主只把会话区
|
|
136
|
+
* 交给声明了同一版的视图。
|
|
137
|
+
*/
|
|
138
|
+
export const CONVERSATION_VIEW_HOST_DATA_CAPABILITY =
|
|
139
|
+
`ycodium.conversation.host-data.v${CONVERSATION_HOST_DATA_VERSION}` as const;
|
|
140
|
+
/**
|
|
141
|
+
* `@` 找文件一次最多列几条:宿主在每个目录里各查这么多条,插件跨目录合并后也截到这么多,
|
|
142
|
+
* 一个文件夹和几个文件夹时菜单一样长。再多就该接着打字缩小范围。
|
|
143
|
+
*/
|
|
144
|
+
export const CONVERSATION_COMPOSER_PATH_SEARCH_LIMIT = 80;
|
|
145
|
+
/** 宿主数据接口读写的那条会话。`threadId` 在草稿路由上是预分配给它的会话 id。 */
|
|
146
|
+
export interface ConversationThreadTarget {
|
|
147
|
+
readonly environmentId: ConversationEnvironmentId;
|
|
148
|
+
readonly threadId: ConversationThreadId;
|
|
149
|
+
}
|
|
150
|
+
/** 一条会话的排队读模型。服务器推新数据或连接状态变化时重新渲染调用它的组件。 */
|
|
151
|
+
export interface ConversationQueueSnapshot {
|
|
152
|
+
readonly entries: readonly ConversationQueueEntry[];
|
|
153
|
+
readonly state: ConversationQueueState;
|
|
154
|
+
/** 这台机器没有连上:排队的编辑、调序、立即发送都不可用。 */
|
|
155
|
+
readonly unavailable: boolean;
|
|
156
|
+
/** 本机刚放进排队区、服务器还没登记成排队意图的提交,排队区先画占位。 */
|
|
157
|
+
readonly pendingSubmissions: readonly ConversationPendingQueueSubmission[];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** 排队管理命令。失败时 reject,错误信息可直接给用户看。 */
|
|
161
|
+
export interface ConversationQueueCommands {
|
|
162
|
+
edit(
|
|
163
|
+
target: ConversationThreadTarget,
|
|
164
|
+
entry: ConversationQueueEntry,
|
|
165
|
+
message: ConversationQueuedMessageEdit,
|
|
166
|
+
): Promise<void>;
|
|
167
|
+
reorder(
|
|
168
|
+
target: ConversationThreadTarget,
|
|
169
|
+
entry: ConversationQueueEntry,
|
|
170
|
+
beforeIntentId: string | null,
|
|
171
|
+
): Promise<void>;
|
|
172
|
+
run(
|
|
173
|
+
target: ConversationThreadTarget,
|
|
174
|
+
entry: ConversationQueueEntry,
|
|
175
|
+
mode: "steer" | "interrupt",
|
|
176
|
+
): Promise<void>;
|
|
177
|
+
cancel(target: ConversationThreadTarget, entry: ConversationQueueEntry): Promise<void>;
|
|
178
|
+
resume(target: ConversationThreadTarget): Promise<void>;
|
|
179
|
+
/** 同 {@link ConversationQueueActions.watchEditorAuthority}。 */
|
|
180
|
+
watchEditorAuthority(input: {
|
|
181
|
+
readonly threadKey: string;
|
|
182
|
+
readonly intentId: string;
|
|
183
|
+
readonly revision: string | number | null;
|
|
184
|
+
readonly onInvalid: () => void;
|
|
185
|
+
}): () => void;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* 一条会话的轨迹读模型与翻页。面板不可见时保留上一份行,不因后台流式活动反复重算;
|
|
190
|
+
* 翻页与可见轮次上报是轨迹面板自己的一份,与聊天面板互不占用。
|
|
191
|
+
*/
|
|
192
|
+
export interface ConversationTrajectorySnapshot {
|
|
193
|
+
readonly sourceQuery?: ConversationTrajectorySourceQuery;
|
|
194
|
+
readonly groupRows?: (
|
|
195
|
+
rows: readonly ConversationTrajectoryRow[],
|
|
196
|
+
expandAll?: boolean,
|
|
197
|
+
) => readonly ConversationTurnTrajectoryGroup[];
|
|
198
|
+
readonly rows: readonly ConversationTrajectoryRow[];
|
|
199
|
+
/** 行 → 聊天锚消息 id;无可锚的行返回 null。 */
|
|
200
|
+
resolveChatAnchorMessageId(row: ConversationTrajectoryRow): string | null;
|
|
201
|
+
readonly loadEarlier: { readonly loading: boolean; onLoadEarlier(): void } | null;
|
|
202
|
+
readonly loadLater: { readonly loading: boolean; onLoadLater(): void } | null;
|
|
203
|
+
/** 原生选区或编辑中的行仍占有历史正文时,不能加载会驱逐它们的新页。 */
|
|
204
|
+
readonly pagingBlockedByInteraction: boolean;
|
|
205
|
+
/** 只有最新页已可用时调用 onReady;没有更新的页时为 null。 */
|
|
206
|
+
readonly onReturnToLatest: ((onReady?: () => void) => void) | null;
|
|
207
|
+
onVisibleTurnRangeChange(range: ConversationVisibleTurnRange | null): void;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* 聊天面板的数据窗口:翻页、回到最新页与可见轮次上报。与轨迹面板各持一份,互不占用;
|
|
212
|
+
* 面板不可见时不上报可见轮次。
|
|
213
|
+
*/
|
|
214
|
+
export interface ConversationChatWindow {
|
|
215
|
+
/** 正在恢复保存的历史范围(包括请求入队前);锚点缺席时须等到结束再回退。 */
|
|
216
|
+
readonly restoringHistory?: boolean;
|
|
217
|
+
readonly loadEarlier: { readonly loading: boolean; onLoadEarlier(): void } | null;
|
|
218
|
+
readonly loadLater: { readonly loading: boolean; onLoadLater(): void } | null;
|
|
219
|
+
/** 原生选区或编辑中的行仍占有历史正文时,不能加载会驱逐它们的新页。 */
|
|
220
|
+
readonly pagingBlockedByInteraction: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* 停在历史窗口或窗口正在重载时非空:把数据窗口换回最新页,到位后调用 onReady。
|
|
223
|
+
* 为 null 时最新页已经在。
|
|
224
|
+
*/
|
|
225
|
+
readonly onReturnToLatest: ((onReady: () => void) => void) | null;
|
|
226
|
+
onVisibleTurnRangeChange(range: ConversationVisibleTurnRange | null): void;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/** 导出整段会话(轮次导航菜单里的复制与下载)。 */
|
|
230
|
+
export interface ConversationThreadExport {
|
|
231
|
+
markdown(): string;
|
|
232
|
+
download(format: "md" | "json"): void;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* 聊天正文的数据:服务器正文并上本机刚发出还没确认的消息、工具与计划行、每轮用量、
|
|
237
|
+
* 导出。停在历史窗口时不并本机消息。面板不可见时保留上一份,不因后台流式输出重算。
|
|
238
|
+
*/
|
|
239
|
+
export interface ConversationChatTimeline {
|
|
240
|
+
readonly activities: readonly ConversationThreadActivity[];
|
|
241
|
+
readonly timelineEntries: readonly ConversationTimelineEntry[];
|
|
242
|
+
/** 与正文窗口同源的逐轮投影;旧数据或旧宿主可以缺席。 */
|
|
243
|
+
readonly turnSummaries?: ConversationRowsDeriveInput["turnSummaries"];
|
|
244
|
+
readonly usageByTurnId: ReadonlyMap<string, ConversationTurnUsage>;
|
|
245
|
+
readonly export: ConversationThreadExport;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* 输入卡只读的模式与模型上下文。字段没变时是同一个对象。
|
|
250
|
+
* `projectId` 在这条会话还没有项目、或项目还没加载时为 null。
|
|
251
|
+
*/
|
|
252
|
+
export interface ConversationComposerModelContext {
|
|
253
|
+
readonly runtimeMode: ConversationRuntimeMode;
|
|
254
|
+
readonly interactionMode: ConversationProviderInteractionMode;
|
|
255
|
+
readonly lockedProvider: ConversationProviderDriverKind | null;
|
|
256
|
+
readonly providerStatuses: ReadonlyArray<ConversationServerProvider>;
|
|
257
|
+
readonly projectId: ConversationProjectId | null;
|
|
258
|
+
readonly activeProjectDefaultModelSelection: ConversationModelSelection | null;
|
|
259
|
+
readonly activeThreadModelSelection: ConversationModelSelection | null;
|
|
260
|
+
/** 线程第一次实际运行记下的型号;还没跑过、详情没到或旧数据为 null / 缺席,按没有记录处理。 */
|
|
261
|
+
readonly activeThreadActualModel?: ConversationThreadActualModel | null | undefined;
|
|
262
|
+
/** 本条会话里已发言或建立过会话的实例 id 列表,供选手菜单标示「已参与」。 */
|
|
263
|
+
readonly participatedInstanceIds?: ReadonlyArray<string> | undefined;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** 输入卡上的上下文用量:小圈的读数与点开后的三段构成。 */
|
|
267
|
+
export interface ConversationContextUsage {
|
|
268
|
+
readonly window: ConversationContextWindowSnapshot | null;
|
|
269
|
+
readonly breakdown: {
|
|
270
|
+
readonly systemTokens: number;
|
|
271
|
+
readonly toolsTokens: number;
|
|
272
|
+
readonly messageTokens: number;
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/** 会话正文的同步状态:loading 还没有可显示的正文,syncing 正在对齐已缓存的正文。 */
|
|
277
|
+
export type ConversationThreadSyncPhase = "loading" | "syncing";
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* 输入卡正在回答的那道 agent 提问走到哪了。没有待回答的提问时整份快照为 null。
|
|
281
|
+
*/
|
|
282
|
+
export interface ConversationPendingUserInputProgress {
|
|
283
|
+
readonly questionIndex: number;
|
|
284
|
+
readonly isLastQuestion: boolean;
|
|
285
|
+
readonly canAdvance: boolean;
|
|
286
|
+
readonly customAnswer: string;
|
|
287
|
+
readonly activeQuestion: {
|
|
288
|
+
readonly id: string;
|
|
289
|
+
readonly multiSelect?: boolean | undefined;
|
|
290
|
+
readonly allowFreeform?: boolean | undefined;
|
|
291
|
+
} | null;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* 输入卡的待处理项与回答它们的命令。快照在输入没变时保持同一引用。
|
|
296
|
+
* 命令失败时 reject,错误信息可直接给用户看;中断(请求被更新的请求取代)不报错。
|
|
297
|
+
*/
|
|
298
|
+
export interface ConversationComposerPending {
|
|
299
|
+
readonly activePendingApproval: ConversationPendingApproval | null;
|
|
300
|
+
/** 全部开着的审批,先到的在前;`activePendingApproval` 是它的第一条。团队页的坞要一条条摆出来。 */
|
|
301
|
+
readonly pendingApprovals: readonly ConversationPendingApproval[];
|
|
302
|
+
/** 全部开着的决定卡,先到的在前。 */
|
|
303
|
+
readonly pendingDecisions: readonly ConversationThreadDecisionCard[];
|
|
304
|
+
readonly pendingUserInputs: readonly ConversationPendingUserInput[];
|
|
305
|
+
readonly activePendingProgress: ConversationPendingUserInputProgress | null;
|
|
306
|
+
readonly activePendingResolvedAnswers: Record<string, unknown> | null;
|
|
307
|
+
readonly activePendingIsResponding: boolean;
|
|
308
|
+
readonly activePendingDraftAnswers: Record<string, ConversationPendingUserInputDraftAnswer>;
|
|
309
|
+
readonly activePendingQuestionIndex: number;
|
|
310
|
+
/** 这台机器的服务器认提问附件:为 false(含旧服务器)时提问卡不画附件入口。 */
|
|
311
|
+
readonly questionAttachmentsSupported: boolean;
|
|
312
|
+
readonly respondingRequestIds: readonly ConversationApprovalRequestId[];
|
|
313
|
+
/** 谁占着输入区顶部,已按优先级排好;输入区一次只画第一个。 */
|
|
314
|
+
readonly occupants: readonly ConversationComposerOccupant[];
|
|
315
|
+
respondToApproval(
|
|
316
|
+
requestId: ConversationApprovalRequestId,
|
|
317
|
+
decision: ConversationProviderApprovalDecision,
|
|
318
|
+
reason?: string,
|
|
319
|
+
): Promise<void>;
|
|
320
|
+
/** 回答决定卡(与时间线是同一张卡)。失败返回错误信息给线程错误条;成功或被取代时为 null。 */
|
|
321
|
+
respondToDecision(requestId: string, optionId: string): Promise<string | null>;
|
|
322
|
+
selectUserInputOption(questionId: string, optionLabel: string): void;
|
|
323
|
+
/**
|
|
324
|
+
* 写入当前提问的自由作答。`nextCursor` 是收窄后的光标,`expandedCursor` 含被折叠的
|
|
325
|
+
* 提及;`cursorAdjacentToMention` 为真时不重新探测触发器。
|
|
326
|
+
*/
|
|
327
|
+
changeUserInputCustomAnswer(
|
|
328
|
+
questionId: string,
|
|
329
|
+
value: string,
|
|
330
|
+
nextCursor: number,
|
|
331
|
+
expandedCursor: number,
|
|
332
|
+
cursorAdjacentToMention: boolean,
|
|
333
|
+
): void;
|
|
334
|
+
/**
|
|
335
|
+
* 下一题;最后一题且答案齐了就提交。提交失败时返回错误信息,调用方写进线程错误条;
|
|
336
|
+
* 推进、答案不齐、成功或被更新的请求取代时为 null。
|
|
337
|
+
*/
|
|
338
|
+
advanceUserInput(): Promise<string | null>;
|
|
339
|
+
previousUserInputQuestion(): void;
|
|
340
|
+
/** 跳到当前提问的第 `index` 题(从 0 起,越界时夹到首尾);只换题,不提交。 */
|
|
341
|
+
goToUserInputQuestion(index: number): void;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/** 轨迹工具行展开详情的回取参数。 */
|
|
345
|
+
export interface ConversationToolCallDetailRequest {
|
|
346
|
+
readonly toolCallId: string;
|
|
347
|
+
readonly turnId: string | null;
|
|
348
|
+
readonly revision: string;
|
|
349
|
+
readonly original?: boolean;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* 宿主借给会话插件的数据接口。整个对象身份恒定,不随会话或渲染变化;插件在组件
|
|
353
|
+
* 顶层调用 `use*` 成员订阅自己要的那一块数据,只有这块数据变了才重新渲染。
|
|
354
|
+
* 数据来自宿主已有的连接与缓存,插件不另建连接或缓存。
|
|
355
|
+
*/
|
|
356
|
+
export interface ConversationAccountUsageInstance {
|
|
357
|
+
readonly instanceId: string | null;
|
|
358
|
+
readonly instanceLabel: string | null;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* 这条会话的项目在这台机器上挂着的一个文件夹。`@` 找文件按它们分组;`cwd` 是在这个文件夹里
|
|
362
|
+
* 找文件的目录,会话的起步文件夹有隔离 worktree 时是那个 worktree,其余是文件夹自己的路径。
|
|
363
|
+
*/
|
|
364
|
+
export interface ConversationThreadFolder {
|
|
365
|
+
readonly id: string;
|
|
366
|
+
/** 分组标题:文件夹名;几个文件夹重名时写完整路径。不是翻译文案。 */
|
|
367
|
+
readonly name: string;
|
|
368
|
+
readonly cwd: string;
|
|
369
|
+
}
|
|
370
|
+
export interface ConversationHostData {
|
|
371
|
+
readonly version: typeof CONVERSATION_HOST_DATA_VERSION;
|
|
372
|
+
/**
|
|
373
|
+
* 这条会话的项目在这台机器上还挂着的文件夹,起步文件夹在前。草稿或项目还没加载时为空数组。
|
|
374
|
+
* 缺席(测试替身)按只有会话自己的目录读。
|
|
375
|
+
*/
|
|
376
|
+
readonly useThreadFolders?: (
|
|
377
|
+
target: ConversationThreadTarget,
|
|
378
|
+
) => readonly ConversationThreadFolder[];
|
|
379
|
+
/**
|
|
380
|
+
* 返回一个读取函数:当前这个人在这条会话里发过的消息,旧的在前,只含已加载的窗口。按键时才调用它,
|
|
381
|
+
* 不订阅消息,流式输出不会叫醒调用方。缺席时输入框的上下键只移动光标。
|
|
382
|
+
*/
|
|
383
|
+
readonly useSentMessagesReader?: (
|
|
384
|
+
target: ConversationThreadTarget,
|
|
385
|
+
) => () => ReadonlyArray<ConversationSentMessage>;
|
|
386
|
+
/** 来源消息的分叉列表;缺席时不显示分叉数量。 */
|
|
387
|
+
readonly useMessageForks?: (
|
|
388
|
+
target: ConversationThreadTarget,
|
|
389
|
+
messageId: string,
|
|
390
|
+
) => ConversationMessageForks;
|
|
391
|
+
/** 跨会话定位的交接;缺席时保留既有聊天与轨迹定位。 */
|
|
392
|
+
readonly useMessageReveal?: (target: ConversationThreadTarget) => ConversationMessageReveal;
|
|
393
|
+
/**
|
|
394
|
+
* 这条用户消息这一轮带上了哪些项目记忆;没带经验时为 null。只读本条消息那一份:别的消息、流式
|
|
395
|
+
* 输出与工具活动不会叫醒调用它的行。缺席时消息行不画「带上了 N 条记忆」。
|
|
396
|
+
*/
|
|
397
|
+
readonly useMessageMemory?: (
|
|
398
|
+
target: ConversationThreadTarget,
|
|
399
|
+
messageId: string,
|
|
400
|
+
) => ConversationMessageMemory | null;
|
|
401
|
+
/**
|
|
402
|
+
* 展开后每一条经验的显示数据与操作。只在展开后调用,收起时不取正文;同一条经验在几轮、几行里出现
|
|
403
|
+
* 只取一次。忘记与恢复由宿主按当前人的身份派发,成功后这里的状态随之更新。与 `useMessageMemory`
|
|
404
|
+
* 成对提供,缺一个消息行就不画。
|
|
405
|
+
*/
|
|
406
|
+
readonly useMemoryExperience?: (
|
|
407
|
+
target: ConversationThreadTarget,
|
|
408
|
+
experienceId: string,
|
|
409
|
+
) => ConversationMemoryExperience;
|
|
410
|
+
/**
|
|
411
|
+
* 网站图标,由宿主画(内置浏览器抓到的图标、机器代取的公网图标、地球占位依次回落)。
|
|
412
|
+
* 组件,不是函数:插件按组件渲染,`threadRef` 用来找这条会话所属项目里抓到的图标。
|
|
413
|
+
* 可选成员:旧宿主没有它时,插件对有 `pageUrl` 的浏览器工具行画地球图标。
|
|
414
|
+
*/
|
|
415
|
+
readonly SiteIcon?:
|
|
416
|
+
| ((props: {
|
|
417
|
+
readonly threadRef: unknown;
|
|
418
|
+
readonly pageUrl: string;
|
|
419
|
+
readonly className?: string | undefined;
|
|
420
|
+
}) => unknown)
|
|
421
|
+
| undefined;
|
|
422
|
+
/**
|
|
423
|
+
* 工具调用行怎么显示:宿主按工具拥有者的声明与服务器盖的来源算好、按当前语言翻好,插件照着画。
|
|
424
|
+
* 返回的函数对同一条记录给同一个对象;没有声明、也不是 Ycodium 或第三方来源的(原生命令、改文件……)
|
|
425
|
+
* 返回 null,插件照旧画。旧宿主可缺席。
|
|
426
|
+
*/
|
|
427
|
+
readonly useToolPresentation?:
|
|
428
|
+
| ((
|
|
429
|
+
target: ConversationThreadTarget,
|
|
430
|
+
) => (entry: ConversationToolPresentationInput) => ConversationToolPresentation | null)
|
|
431
|
+
| undefined;
|
|
432
|
+
/**
|
|
433
|
+
* 行首的来源图标:插件图标或宿主功能区图标,Ycodium 自己的(宿主功能、官方插件、自带技能)叠
|
|
434
|
+
* Ycodium 角标,角标与应用里的标志同源。组件,由宿主画;缺席时插件画通用图标。
|
|
435
|
+
*/
|
|
436
|
+
readonly ToolSourceIcon?:
|
|
437
|
+
| ((props: {
|
|
438
|
+
/** 调用所在的机器:插件图标按这台机器上装的那份找。 */
|
|
439
|
+
readonly environmentId: string;
|
|
440
|
+
readonly origin: ConversationToolPresentation["origin"];
|
|
441
|
+
readonly className?: string | undefined;
|
|
442
|
+
}) => unknown)
|
|
443
|
+
| undefined;
|
|
444
|
+
/** 会话之间说的一句话的卡片(宿主画,0105);子会话回报用它,缺席时插件照旧画系统条。 */
|
|
445
|
+
readonly SessionMessageCard?:
|
|
446
|
+
| ((props: ConversationSessionMessageCardProps) => unknown)
|
|
447
|
+
| undefined;
|
|
448
|
+
/** 排队区的读模型。`threadKey` 是 scope.threadKey,用来读发送流程写下的本机排队占位。 */
|
|
449
|
+
useQueue(input: {
|
|
450
|
+
readonly target: ConversationThreadTarget;
|
|
451
|
+
readonly threadKey: string;
|
|
452
|
+
}): ConversationQueueSnapshot;
|
|
453
|
+
readonly queue: ConversationQueueCommands;
|
|
454
|
+
/** 仅解释已派发的命令失败;准备阶段返回 null,插件保留原错误。旧宿主可缺席。 */
|
|
455
|
+
readonly useCommandFailureText?: () => (error: unknown) => string | null;
|
|
456
|
+
/** 仅返回已加载窗口的总结;旧宿主可缺席,完整历史仍走分页。 */
|
|
457
|
+
useTurnSummaries?(target: ConversationThreadTarget): readonly ConversationTurnSummary[];
|
|
458
|
+
/** 仅读取该轮保存的改动;旧宿主可缺席,不能回退到当前工作区差异。 */
|
|
459
|
+
readTurnChanges?(
|
|
460
|
+
target: ConversationThreadTarget,
|
|
461
|
+
input: {
|
|
462
|
+
readonly turnId: string;
|
|
463
|
+
readonly filePath: string;
|
|
464
|
+
readonly textOffset?: number;
|
|
465
|
+
readonly textLimit?: number;
|
|
466
|
+
},
|
|
467
|
+
): Promise<import("./conversationTurnSummaries.ts").ConversationRecordedTurnChanges>;
|
|
468
|
+
/**
|
|
469
|
+
* 轨迹面板的数据。`threadKey` 是 scope.threadKey,用来隔离每个 presenter 的翻页
|
|
470
|
+
* 状态;`visible` 为 false 时不重算行、不上报可见轮次。
|
|
471
|
+
*/
|
|
472
|
+
useTrajectory(input: {
|
|
473
|
+
readonly target: ConversationThreadTarget;
|
|
474
|
+
readonly threadKey: string;
|
|
475
|
+
readonly visible: boolean;
|
|
476
|
+
readonly toolFilter?: ConversationToolCallFilter;
|
|
477
|
+
}): ConversationTrajectorySnapshot;
|
|
478
|
+
/** 聊天正文;参数含义同 useTrajectory。只在聊天面板挂载时调用。 */
|
|
479
|
+
useChatTimeline(input: {
|
|
480
|
+
readonly target: ConversationThreadTarget;
|
|
481
|
+
readonly threadKey: string;
|
|
482
|
+
readonly visible: boolean;
|
|
483
|
+
}): ConversationChatTimeline;
|
|
484
|
+
/**
|
|
485
|
+
* 输入卡的上下文用量。草稿会话(服务器上还没有这条会话)为 null。只在输入卡里调用,
|
|
486
|
+
* 用量随每条回复变化,读它的组件会跟着重渲染。
|
|
487
|
+
*/
|
|
488
|
+
useContextUsage(target: ConversationThreadTarget): ConversationContextUsage | null;
|
|
489
|
+
/**
|
|
490
|
+
* 输入卡只读的模式与模型上下文:四档、计划/构建、已锁的 driver、这台机器的实例表、
|
|
491
|
+
* 项目默认与这条会话落库的模型选择。`projectId` 在这条会话还没有项目时为 null。
|
|
492
|
+
* 只在输入卡里调用;字段没变时返回同一个对象。
|
|
493
|
+
*/
|
|
494
|
+
useComposerModelContext(target: ConversationThreadTarget): ConversationComposerModelContext;
|
|
495
|
+
/**
|
|
496
|
+
* 下一条消息会交给的实例:额度显示在宿主的底栏,插件只把「是哪个」告诉它。实例按「草稿里点过的 →
|
|
497
|
+
* 会话记录的 → 落库的选择」取,这台机器上没有它时 instanceId 为 null。`instanceLabel` 缺席时宿主补默认名。
|
|
498
|
+
*/
|
|
499
|
+
useAccountUsageInstance(target: ConversationThreadTarget): ConversationAccountUsageInstance;
|
|
500
|
+
/** 聊天面板的数据窗口;参数含义同 useTrajectory。 */
|
|
501
|
+
useChatWindow(input: {
|
|
502
|
+
readonly target: ConversationThreadTarget;
|
|
503
|
+
readonly threadKey: string;
|
|
504
|
+
readonly visible: boolean;
|
|
505
|
+
}): ConversationChatWindow;
|
|
506
|
+
/**
|
|
507
|
+
* 发信行展开时订那条记录的正文与所处阶段(正文可能已撤回、删除或读不到,见 `bodyState`);recordId 为 null
|
|
508
|
+
* 不订。宿主按批推变化,不逐条推。null 是不订或还没到;`"unreadable"` 是这次读失败了;
|
|
509
|
+
* `"environment-outdated"` 是那台 environment 的版本给不出这个形状、宿主没有去订;`"client-outdated"`
|
|
510
|
+
* 是记录版本不可读,`"incomplete"` 是本帧未能识别记录号。这些结果的那一行照常在,
|
|
511
|
+
* 详情要各说各的原因,不能当成还没到。
|
|
512
|
+
*/
|
|
513
|
+
useCommunicationRecord(
|
|
514
|
+
target: ConversationThreadTarget,
|
|
515
|
+
recordId: string | null,
|
|
516
|
+
):
|
|
517
|
+
| ConversationCommunicationRecord
|
|
518
|
+
| "unreadable"
|
|
519
|
+
| "environment-outdated"
|
|
520
|
+
| "client-outdated"
|
|
521
|
+
| "incomplete"
|
|
522
|
+
| null;
|
|
523
|
+
/** 工具行展开时回取输入/输出;宿主负责去重、代际与实时输出尾部。 */
|
|
524
|
+
useToolCallDetail(
|
|
525
|
+
target: ConversationThreadTarget,
|
|
526
|
+
request: ConversationToolCallDetailRequest,
|
|
527
|
+
): ConversationTrajectoryToolCallDetailData | null;
|
|
528
|
+
/**
|
|
529
|
+
* 会话正文的同步状态,未经延时。已是实时数据、草稿会话或机器未连上时为 null;
|
|
530
|
+
* 机器未连上另有机器状态提示。
|
|
531
|
+
*/
|
|
532
|
+
useThreadSyncPhase(target: ConversationThreadTarget): ConversationThreadSyncPhase | null;
|
|
533
|
+
/** 服务端明确答了读取失败(非断网、非机器未连上)时的类别与重试;读成功回到 null,失败期间同步阶段为 null。 */
|
|
534
|
+
useThreadLoadFailure(target: ConversationThreadTarget): ConversationThreadLoadFailure | null;
|
|
535
|
+
/**
|
|
536
|
+
* 输入卡的待处理项:审批、agent 提问、决定卡与谁占着输入区。`threadKey` 是
|
|
537
|
+
* scope.threadKey,草稿答案、问题序号与正在回答的请求按它在各 presenter 间共享。
|
|
538
|
+
* 审批与提问随活动流变化,读它的组件会跟着重渲染。
|
|
539
|
+
*/
|
|
540
|
+
useComposerPending(input: {
|
|
541
|
+
readonly target: ConversationThreadTarget;
|
|
542
|
+
readonly threadKey: string;
|
|
543
|
+
}): ConversationComposerPending;
|
|
544
|
+
/**
|
|
545
|
+
* 输入卡上方的横幅:机器重连与版本、项目文件夹、会话生命周期、分支不一致。宿主按会话自己取
|
|
546
|
+
* 横幅要的数据,读它的组件只随横幅相关的数据重渲染。`threadKey` 是 scope.threadKey。会话页
|
|
547
|
+
* 外没有横幅(横幅上的动作要回到宿主的输入卡与错误表)。
|
|
548
|
+
*/
|
|
549
|
+
useComposerBanners(input: {
|
|
550
|
+
readonly target: ConversationThreadTarget;
|
|
551
|
+
readonly threadKey: string;
|
|
552
|
+
}): ConversationComposerBanners;
|
|
553
|
+
/**
|
|
554
|
+
* 输入卡的会话与发送状态:阶段、发送中、为什么发不了、机器是否可用、能否压缩。宿主按会话
|
|
555
|
+
* 自己推导,字段都没变时返回同一个对象,读它的组件只随这些状态重渲染。`threadKey` 是
|
|
556
|
+
* scope.threadKey,用来读发送流程写下的本机发送进度。
|
|
557
|
+
*/
|
|
558
|
+
useComposerStatus(input: {
|
|
559
|
+
readonly target: ConversationThreadTarget;
|
|
560
|
+
readonly threadKey: string;
|
|
561
|
+
}): ConversationComposerStatus;
|
|
562
|
+
/**
|
|
563
|
+
* 输入框 `!` 命令模式用的会话终端。只在输入卡里调用;能不能运行随机器连接、项目归档变化。
|
|
564
|
+
* 可选成员:旧宿主没有它时,插件不进命令模式,以 `!` 开头的内容照常当消息发送。
|
|
565
|
+
*/
|
|
566
|
+
readonly useShellCommand?:
|
|
567
|
+
| ((input: {
|
|
568
|
+
readonly target: ConversationThreadTarget;
|
|
569
|
+
readonly threadKey: string;
|
|
570
|
+
}) => ConversationShellCommand)
|
|
571
|
+
| undefined;
|
|
572
|
+
/** 这一轮的状态(是否在跑、卡在哪、从何时起);`visible` 为 false 时保留上一份、计时不走。 */
|
|
573
|
+
useTurnStatus(input: {
|
|
574
|
+
readonly target: ConversationThreadTarget;
|
|
575
|
+
readonly threadKey: string;
|
|
576
|
+
readonly visible: boolean;
|
|
577
|
+
}): ConversationTurnStatus;
|
|
578
|
+
/** 输入卡的计划:已提出的计划、进行中任务进度与步骤;草稿会话均为 null。 */
|
|
579
|
+
useComposerPlan(target: ConversationThreadTarget): ConversationComposerPlan;
|
|
580
|
+
/** 引用 agent 回复:识别、生成与展开都由宿主按同一份格式做,插件不自己解析。 */
|
|
581
|
+
readonly assistantQuotes: ConversationAssistantQuoteApi;
|
|
582
|
+
/** @会话:识别、生成与候选由宿主给。可选成员:旧宿主没有它时,`@` 菜单只列文件。 */
|
|
583
|
+
readonly threadReferences?: ConversationThreadReferenceApi;
|
|
584
|
+
/** @成员:候选、序列化与正文识别由宿主给。可选成员:旧宿主没有它时,`@` 菜单只列文件与会话。 */
|
|
585
|
+
readonly memberMentions?: ConversationMemberMentionApi;
|
|
586
|
+
/** 异步提问:没关的提问与回答、忽略动作,随活动流变化。卡片画在哪由插件定。 */
|
|
587
|
+
useQuestions(target: ConversationThreadTarget): ConversationQuestions;
|
|
588
|
+
}
|
|
589
|
+
export type ConversationToolPresentationInput = Pick<
|
|
590
|
+
ConversationWorkEntry,
|
|
591
|
+
"toolMetadata" | "builtinMcpTool" | "toolArgs"
|
|
592
|
+
>;
|
|
593
|
+
/** 一条工具调用行的显示(0102)。 */
|
|
594
|
+
export interface ConversationToolPresentation {
|
|
595
|
+
readonly origin:
|
|
596
|
+
| { readonly kind: "ycodium"; readonly area: string }
|
|
597
|
+
| { readonly kind: "plugin"; readonly pluginId: string; readonly official: boolean }
|
|
598
|
+
| { readonly kind: "mcp"; readonly server: string }
|
|
599
|
+
| { readonly kind: "skill"; readonly name: string; readonly official: boolean };
|
|
600
|
+
/** 第三方来源的名字(插件名、MCP 服务器名、技能名),排在标题前;Ycodium 自己的为 null。 */
|
|
601
|
+
readonly sourceName: string | null;
|
|
602
|
+
/**
|
|
603
|
+
* 标题与摘要来自声明(宿主功能、插件的 `toolViews`、技能)。false:第三方 MCP 或没有声明的插件工具,
|
|
604
|
+
* `title` 只是工具原名、`summary` 为 null,调用方照旧画这一行原来的文字,只在前面加来源。
|
|
605
|
+
*/
|
|
606
|
+
readonly declared: boolean;
|
|
607
|
+
readonly title: string;
|
|
608
|
+
readonly summary: string | null;
|
|
609
|
+
/** 没有文字摘要时画对应实体名原语;旧宿主缺席。 */
|
|
610
|
+
readonly entity?: PluginUiEntityReference | null | undefined;
|
|
611
|
+
/**
|
|
612
|
+
* 摘要是项目里这条经验的标题(读、改经验的工具):用 `useMemoryExperience` 取,同一条只取一次;
|
|
613
|
+
* 取不到(已抹掉、没权限、旧机器)就不显示摘要,不显示经验号。旧宿主缺席。
|
|
614
|
+
*/
|
|
615
|
+
readonly experienceId?: string | null;
|
|
616
|
+
/** 同一来源的连续调用并成一组时的键与组名(插件显示名、宿主功能区名、服务器名)。 */
|
|
617
|
+
readonly groupKey: string;
|
|
618
|
+
readonly groupName: string;
|
|
619
|
+
/** 更宽一层的键与名字:宿主各功能区同属 Ycodium,一组跨了功能区时组头写它。 */
|
|
620
|
+
readonly familyKey: string;
|
|
621
|
+
readonly familyName: string;
|
|
622
|
+
/** 展开后顶部那一行:完整说明来自哪里。 */
|
|
623
|
+
readonly sourceLine: string;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/** 这一轮现在的状态(宿主原先经时间线 props 传的那几样)。 */
|
|
627
|
+
export interface ConversationTurnStatus {
|
|
628
|
+
/** 完成或显式交付的最新时间;独立交付没有 latestTurn。 */
|
|
629
|
+
readonly latestReplyAt?: string | null;
|
|
630
|
+
readonly latestTurn: ConversationLatestTurn | null;
|
|
631
|
+
readonly latestAssistantMessageId: string | null;
|
|
632
|
+
/** 正在跑的那一轮;没有为 null。 */
|
|
633
|
+
readonly runningTurnId: string | null;
|
|
634
|
+
/** 本轮在干活:会话在跑,或消息刚发出、服务器还没确认。 */
|
|
635
|
+
readonly isWorking: boolean;
|
|
636
|
+
/** 工作行上那句当前步骤;不是本轮自己的计划时为 null。 */
|
|
637
|
+
readonly workingStepLabel: string | null;
|
|
638
|
+
/** 这一轮在等人:有待批的审批,或有没答的提问。工作行据此说轮到人了;不在等为 null。 */
|
|
639
|
+
readonly waitingFor?: "approval" | "userInput" | null;
|
|
640
|
+
/** 这一轮到此刻累计的输出 token;provider 中途不报时为 null。 */
|
|
641
|
+
readonly liveOutputTokens?: number | null;
|
|
642
|
+
/** 非空表示这一轮超过门槛没动静;插件只读呈现。 */
|
|
643
|
+
readonly stall: ConversationTurnStall | null;
|
|
644
|
+
readonly retry: unknown;
|
|
645
|
+
readonly activeTurnStartedAt: string | null;
|
|
646
|
+
/** 一轮结束后插件正在检查要不要接着干(轮次续跑);时间线末尾画一行,没有为 null。旧宿主缺席。 */
|
|
647
|
+
readonly continuationCheck?: ConversationContinuationCheck | null;
|
|
648
|
+
readonly totalTurnCount: number | null;
|
|
649
|
+
readonly pendingModelSelection: ConversationModelSelection | null | undefined;
|
|
650
|
+
readonly scheduledWakes: ReadonlyArray<unknown>;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/** 正在进行的续跑检查:问的是哪些插件、从什么时候起。 */
|
|
654
|
+
export interface ConversationContinuationCheck {
|
|
655
|
+
readonly pluginIds: readonly string[];
|
|
656
|
+
readonly startedAt: string;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
/** 输入卡的计划(宿主原先经输入卡 props 传的那几样)。 */
|
|
660
|
+
export interface ConversationComposerPlan {
|
|
661
|
+
/** 最新一轮已落定后,最新一份还能实施的计划;进行中、已实施或没有为 null。 */
|
|
662
|
+
readonly proposedPlan: { readonly id: string; readonly planMarkdown: string } | null;
|
|
663
|
+
/** 本轮未落定时的任务进度;落定或没有为 null。 */
|
|
664
|
+
readonly tasksProgress: {
|
|
665
|
+
readonly step: string;
|
|
666
|
+
readonly completedSteps: number;
|
|
667
|
+
readonly totalSteps: number;
|
|
668
|
+
} | null;
|
|
669
|
+
/** 与进度同一轮的步骤;对不上或没有进度为 null。 */
|
|
670
|
+
readonly taskSteps:
|
|
671
|
+
| readonly {
|
|
672
|
+
readonly durationMs?: number;
|
|
673
|
+
readonly step: string;
|
|
674
|
+
readonly status: "pending" | "inProgress" | "completed";
|
|
675
|
+
}[]
|
|
676
|
+
| null;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
export {
|
|
680
|
+
CONVERSATION_PENDING_REQUESTS_VIEW_ID,
|
|
681
|
+
CONVERSATION_PLUGIN_ID,
|
|
682
|
+
CONVERSATION_PROMPT_PREVIEW_VIEW_ID,
|
|
683
|
+
CONVERSATION_VIEW_BRIDGE_PROP,
|
|
684
|
+
CONVERSATION_VIEW_ID,
|
|
685
|
+
CONVERSATION_VIEW_REBINDABLE_BRIDGE_CAPABILITY,
|
|
686
|
+
type ConversationPendingRequestsViewProps,
|
|
687
|
+
type ConversationPromptPreviewViewProps,
|
|
688
|
+
} from "./conversation-view.ts";
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Prompt 里占位终端上下文的 wire 字符(U+FFFC)。宿主与插件必须用同一份,
|
|
692
|
+
* 改这个等于改协议。发送上限不在这里再写一份:契约在 contracts,宿主经
|
|
693
|
+
* `attachments.limits` 注入。
|
|
694
|
+
*/
|
|
695
|
+
export const INLINE_TERMINAL_CONTEXT_PLACEHOLDER = "\uFFFC";
|