@ycodium-ai/plugin-api 0.2.5634 → 0.2.5751
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 +55 -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.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.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 +700 -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 +132 -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 +30 -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,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 插件命令与流式命令:`ctx.command`、`ctx.stream`,以及它们用的 JSON Schema 子集。类型与常量从
|
|
3
|
+
* `index.ts` 再导出。
|
|
4
|
+
*
|
|
5
|
+
* @module @ycodium-ai/plugin-api/commands
|
|
6
|
+
*/
|
|
7
|
+
import type {
|
|
8
|
+
PluginAsCallerPorts,
|
|
9
|
+
PluginAsPersonPorts,
|
|
10
|
+
PluginViewerPorts,
|
|
11
|
+
} from "./dataPorts.gen.ts";
|
|
12
|
+
|
|
13
|
+
/** 只在本次本机会话 agent 的工具调用内有效;只能在调用项目上替该 agent claim。 */
|
|
14
|
+
export type PluginAsCaller = PluginAsCallerPorts;
|
|
15
|
+
|
|
16
|
+
/** 只在当前操作调用内有效;成员由登记表的代人写白名单生成,读走 ctx.work 与 ctx.members,没有领取。 */
|
|
17
|
+
export type PluginAsPerson = PluginAsPersonPorts;
|
|
18
|
+
|
|
19
|
+
/** 每次读都现核客户端的人资格;只在发起它的命令调用内有效。 */
|
|
20
|
+
export type PluginViewer = PluginViewerPorts;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 命令被调用时宿主知道的上下文。RPC 是全局作用域(thread-scoped 命令刻意
|
|
24
|
+
* 推迟),所以这里只有调用方的粗粒度信息;字段只增不改。
|
|
25
|
+
*/
|
|
26
|
+
export interface PluginCommandInvocation {
|
|
27
|
+
/** 宿主核实的发起会话;没有会话的界面调用缺席。 */
|
|
28
|
+
readonly thread?: { readonly threadId: string; readonly projectId: string };
|
|
29
|
+
/** 单次调用结束或取消时中止。 */
|
|
30
|
+
readonly signal?: AbortSignal;
|
|
31
|
+
/** 调用方凭据已通过的 scope("read" 或 "operate")。 */
|
|
32
|
+
readonly scope: "read" | "operate";
|
|
33
|
+
/** 宿主验证的人发起的操作调用,且插件声明 work.writeAsPerson 时才有。调用结束即失效。 */
|
|
34
|
+
readonly asPerson?: PluginAsPerson;
|
|
35
|
+
/** 仅客户端发起的单次命令有;要声明 communication.read,资格失效返回 person: null,调用结束即失效。 */
|
|
36
|
+
readonly viewer?: PluginViewer;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* JSON Schema,draft-07 的一个**白名单子集**。宿主自带编译器(仓库没有 JSON Schema
|
|
41
|
+
* 运行时依赖),认不出来的关键字一律编译期报错——插件 activate 当场失败,不会静默
|
|
42
|
+
* 变成"写了等于没写"。
|
|
43
|
+
*
|
|
44
|
+
* 下面这份清单**以 `apps/server/src/pluginHost/jsonSchema.ts` 为准**(`SUPPORTED_KEYWORDS`
|
|
45
|
+
* 与 `ANNOTATION_KEYWORDS` 两张表),那边改了这里跟着改。
|
|
46
|
+
*
|
|
47
|
+
* 支持:`type`(object / string / number / integer / boolean / array / null,也可以
|
|
48
|
+
* 写成数组表示可空)、`properties`、`required`、`additionalProperties`(布尔或
|
|
49
|
+
* schema)、`enum`、`const`、`items`(单个 schema,不支持元组形式)、
|
|
50
|
+
* `minimum` / `maximum` / `exclusiveMinimum` / `exclusiveMaximum`、
|
|
51
|
+
* `minLength` / `maxLength`、`pattern`(`u` flag 的 RegExp)、`minItems` / `maxItems`、
|
|
52
|
+
* `oneOf`(至少两个分支,恰好一个匹配才算过)。
|
|
53
|
+
* 另外接受但不校验这几个注解:`description`、`title`、`default`、`examples`、
|
|
54
|
+
* `$schema`、`$comment`。
|
|
55
|
+
*
|
|
56
|
+
* 判别联合就写 `oneOf`:共有字段留在同层的 `properties` / `required` 上(同层关键字
|
|
57
|
+
* 与分支一起生效),分支里只写判别键的 `const` 与那一支自己的 `required`,这样
|
|
58
|
+
* "status 是 ok 却没带 items" 会被挡在出口。
|
|
59
|
+
*
|
|
60
|
+
* 不支持:`$ref`、`anyOf` / `allOf` / `not`、`if` / `then` / `else`、
|
|
61
|
+
* `patternProperties`、`dependencies`、`format`。一个 `oneOf` 足够表达判别联合,
|
|
62
|
+
* 其余组合关键字是复杂度不换收益。
|
|
63
|
+
*
|
|
64
|
+
* 顶层形状只有 `payloadSchema` 有额外限制(必须 `"type": "object"`);`resultSchema`
|
|
65
|
+
* 与 `itemSchema` 顶层随意。
|
|
66
|
+
*/
|
|
67
|
+
export type PluginJsonSchema = Record<string, unknown>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 请求-响应命令。客户端经宿主的 `plugins.invoke` 单信封调用;payload 在
|
|
71
|
+
* 信封入口按 payloadSchema 校验,不合格的请求不会到达 handle。handle 抛错
|
|
72
|
+
* 会以 handler-failed 的错误形状过线,message 原样透出——别把秘密放进异常。
|
|
73
|
+
*
|
|
74
|
+
* 要让调用方能**分辨**是哪一类失败,就在抛出的错误上挂一个字符串 `code`:宿主把
|
|
75
|
+
* 它原样放进过线错误的 `pluginCode`。过线错误的 `code` 字段是宿主自己的信封分类
|
|
76
|
+
* (plugin-unavailable / invalid-payload / forbidden / handler-failed),插件写不
|
|
77
|
+
* 进去;调用方也不该去 parse 人读的 message。
|
|
78
|
+
*
|
|
79
|
+
* 要让调用方**照着做**(等到几点再试之类),再挂一个 `data`:宿主做一次 JSON 往返
|
|
80
|
+
* 后放进过线错误的 `pluginData`。只有 JSON 值能过去,序列化不了的整个丢掉;形状由
|
|
81
|
+
* 插件与它的调用方约定,宿主不解释。速率限制的写法是 `{ retryAt: <epoch ms> }`。
|
|
82
|
+
*/
|
|
83
|
+
/**
|
|
84
|
+
* 宿主 contracts schema 的名字(如 `"UsageSummary"`),用来替代手写 JSON Schema。
|
|
85
|
+
*
|
|
86
|
+
* 只允许第一方包引用宿主已登记的名字;按 manifest 包名判断,目录与 npm 安装一致。
|
|
87
|
+
* 第三方包须声明自己的 JSON Schema;未知契约名在注册时失败。
|
|
88
|
+
*
|
|
89
|
+
* 与同一条命令上对应的 `*Schema` 字段**互斥**:两个都给是注册错误,一个都不给
|
|
90
|
+
* (payload 侧)也是注册错误。校验只判合法、不改值:contracts 里的
|
|
91
|
+
* `TrimmedNonEmptyString` 之类是 transformation,宿主丢弃 decode 的产物,命令的
|
|
92
|
+
* payload 与结果都按原值过线。
|
|
93
|
+
*/
|
|
94
|
+
export type PluginContractName = string;
|
|
95
|
+
|
|
96
|
+
export interface PluginCommand {
|
|
97
|
+
/** 客户端据此从本机已加载插件选择 MCP 目录或诊断数据源。重试采集需要 operate,其余查询需要 read。 */
|
|
98
|
+
readonly role?:
|
|
99
|
+
| "mcp-registry-search"
|
|
100
|
+
| "diagnostics-trace-summary"
|
|
101
|
+
| "diagnostics-resource-history"
|
|
102
|
+
| "diagnostics-resource-retry";
|
|
103
|
+
/**
|
|
104
|
+
* 插件内唯一;跨插件由 pluginId 隔开,不会撞名。
|
|
105
|
+
*
|
|
106
|
+
* 同一插件内重复注册同名命令**当场抛错**,不顶掉旧的:命令名是过线的寻址键,静默
|
|
107
|
+
* 替换会让已经在飞的调用换了含义。抛在 `ctx.command` / `ctx.stream` 调用处,即
|
|
108
|
+
* activate 失败、整个插件挂载失败。`ctx.command` 与 `ctx.stream` 共用同一张名字表。
|
|
109
|
+
*/
|
|
110
|
+
readonly name: string;
|
|
111
|
+
readonly description?: string | undefined;
|
|
112
|
+
/** 缺省 "read"。声明 "operate" 的命令要求调用方持有 operate 凭据。 */
|
|
113
|
+
readonly scope?: "read" | "operate" | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* 顶层必须是 `"type": "object"`;handle 收到的就是它校验过的形状。与
|
|
116
|
+
* `payloadContract` 二选一,缺一不可。
|
|
117
|
+
*/
|
|
118
|
+
readonly payloadSchema?: PluginJsonSchema | undefined;
|
|
119
|
+
/** 仅第一方插件:按名引用宿主注册表里的 contracts schema,替代 `payloadSchema`。 */
|
|
120
|
+
readonly payloadContract?: PluginContractName | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* 可选。声明了,宿主就在**出口**按它校验 handle 的返回值:不合格的返回值不过线,
|
|
123
|
+
* 调用方收到 `invalid-result` 错误(detail 是 JSON Pointer 风格的第一条违例),
|
|
124
|
+
* 宿主同时打一条带 pluginId / command 的 warn。不声明就不校验,返回值原样过线。
|
|
125
|
+
*
|
|
126
|
+
* 与 `payloadSchema` 不同,**顶层不限于 `"type": "object"`**:结果可以是数组、
|
|
127
|
+
* 字符串、数字这类标量,用的是同一个编译器(同一份关键字白名单)。
|
|
128
|
+
*
|
|
129
|
+
* 声明它的价值在于形状漂移当场可见:命令结果的类型在插件与调用方两边各写一份,
|
|
130
|
+
* 只有出口校验能让"少了个字段"在运行期炸出来,而不是客户端拿到半个对象。
|
|
131
|
+
*/
|
|
132
|
+
readonly resultSchema?: PluginJsonSchema | undefined;
|
|
133
|
+
/** 仅第一方插件:按名引用宿主注册表里的 contracts schema,替代 `resultSchema`。 */
|
|
134
|
+
readonly resultContract?: PluginContractName | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* 声明这条命令只在目标项目的家机器上运行。目标项目取自 payload 里明写的 `projectId`;没有就取发起会话所属的项目
|
|
137
|
+
* (`invocation.thread`)。调用方取消会中断查家,取消后不进 `handle`。
|
|
138
|
+
* 项目的家在别的机器时,宿主在进入 `handle` 之前拒绝,过线错误的 `pluginCode` 为 `not-project-home`,`pluginData`
|
|
139
|
+
* 为 `{ reason, projectId, homeEnvironmentId?, homeName? }`;暂时读不出项目的家时 `pluginCode` 为
|
|
140
|
+
* `project-home-unconfirmed`,稍后重试即可。家为空、家就是本机、单机部署、取不到目标项目的调用都照常放行。
|
|
141
|
+
* 缺省或 false 不设闸。读取或维护这个插件按项目记下的自有状态的命令应当声明它;只经数据端口读写账本的不需要。
|
|
142
|
+
*/
|
|
143
|
+
readonly homeOnly?: boolean | undefined;
|
|
144
|
+
/** 返回值必须可 JSON 序列化;形状由插件与自己的 UI/调用方约定。 */
|
|
145
|
+
readonly handle: (
|
|
146
|
+
payload: Record<string, unknown>,
|
|
147
|
+
invocation: PluginCommandInvocation,
|
|
148
|
+
) => Promise<unknown> | unknown;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* `buffer.latest` 的上限。留得越多,慢订阅方压在宿主内存里的东西越多——这个数封的
|
|
153
|
+
* 正是那个。够用就行:宿主自己的高频流留 8 条。
|
|
154
|
+
*/
|
|
155
|
+
export const MAX_PLUGIN_STREAM_BUFFER = 1024;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* 流式命令(`plugins.subscribe`)。emit 的每个值必须可 JSON 序列化;signal
|
|
159
|
+
* 中止表示订阅方挂断,handle 应尽快返回,之后的 emit 会被宿主静默丢弃。
|
|
160
|
+
*/
|
|
161
|
+
export interface PluginStreamCommand {
|
|
162
|
+
/** 诊断页订阅本机进程采样快照。仅适用于只读流。 */
|
|
163
|
+
readonly role?: "diagnostics-resource-snapshots";
|
|
164
|
+
/** 与 `PluginCommand.name` 同一张表:重复即抛错,activate 失败。 */
|
|
165
|
+
readonly name: string;
|
|
166
|
+
readonly description?: string | undefined;
|
|
167
|
+
readonly scope?: "read" | "operate" | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* 顶层必须是 `"type": "object"`;handle 收到的就是它校验过的形状。与
|
|
170
|
+
* `payloadContract` 二选一,缺一不可。
|
|
171
|
+
*/
|
|
172
|
+
readonly payloadSchema?: PluginJsonSchema | undefined;
|
|
173
|
+
/** 仅第一方插件:按名引用宿主注册表里的 contracts schema,替代 `payloadSchema`。 */
|
|
174
|
+
readonly payloadContract?: PluginContractName | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* 可选。声明了,宿主就在出口按它校验**每一个** emit 的值:出现不合格的值时这条流
|
|
177
|
+
* 立刻以 `invalid-result` 结束(此前已发出的值不撤回),并打一条带 pluginId /
|
|
178
|
+
* command 的 warn。不声明就不校验。
|
|
179
|
+
*
|
|
180
|
+
* 与 `resultSchema` 一样,**顶层不限于 `"type": "object"`** —— 只有 `payloadSchema`
|
|
181
|
+
* 那一处有这条限制。
|
|
182
|
+
*/
|
|
183
|
+
readonly itemSchema?: PluginJsonSchema | undefined;
|
|
184
|
+
/** 仅第一方插件:按名引用宿主注册表里的 contracts schema,替代 `itemSchema`。 */
|
|
185
|
+
readonly itemContract?: PluginContractName | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* 订阅方收得比你发得慢时,积压怎么办。
|
|
188
|
+
*
|
|
189
|
+
* **省略=全留**(今天的行为),适合「跑一次就完」的流——diff 分片、扫描进度:
|
|
190
|
+
* 丢中间一块等于结果是错的,宁可积压。这类流的总量由那一次操作封顶,涨不到天上去。
|
|
191
|
+
*
|
|
192
|
+
* **持续推状态的流必须写 `{ latest: N }`**:只留最近 N 条,慢订阅方丢掉的是**旧的**。
|
|
193
|
+
* 一秒一份的快照配「全留」,订阅方一慢内存就一直涨——宿主自己的高频流用的正是这个
|
|
194
|
+
* 策略(`PubSub.sliding(8)`)。N 的上限见 `MAX_PLUGIN_STREAM_BUFFER`。
|
|
195
|
+
*/
|
|
196
|
+
readonly buffer?: { readonly latest: number } | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* 同 `PluginCommand.homeOnly`:目标项目的家在别的机器时,订阅在进入 `handle` 之前以同样的错误结束。订阅信封不带发起会话,
|
|
199
|
+
* 所以流**必须**在 payload 里写 `projectId`;没写,订阅以说明原因的错误结束,宿主不猜项目、也不放行。
|
|
200
|
+
*/
|
|
201
|
+
readonly homeOnly?: boolean | undefined;
|
|
202
|
+
readonly handle: (
|
|
203
|
+
payload: Record<string, unknown>,
|
|
204
|
+
emit: (value: unknown) => void,
|
|
205
|
+
signal: AbortSignal,
|
|
206
|
+
invocation: PluginCommandInvocation,
|
|
207
|
+
) => Promise<void>;
|
|
208
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 宿主 UI 原语 `CommunicationFlow`(消息流)与 `CommunicationGraph`(关系图)的 props。两者吃同一份
|
|
3
|
+
* 「参与方 + 往来」,只负责画,不知道数据从哪来;插件经 `bridge.ui` 取用。从
|
|
4
|
+
* `@ycodium-ai/plugin-api/ui` 导出。
|
|
5
|
+
*
|
|
6
|
+
* @module @ycodium-ai/plugin-api/ui
|
|
7
|
+
*/
|
|
8
|
+
import type { PluginCommunicationRecord } from "./communication.ts";
|
|
9
|
+
|
|
10
|
+
/** 参与方。`group` 与 `order` 决定在关系图的圈上排第几(团队按 handoff 顺序)。 */
|
|
11
|
+
export interface CommunicationViewParty {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
/** 显示名:角色名、会话标题或人名。协调者给空串时宿主用「协调人」。 */
|
|
14
|
+
readonly label: string;
|
|
15
|
+
readonly group: "coordinator" | "member" | "thread" | "person";
|
|
16
|
+
readonly order: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** 正文此刻的状态,与通信记录(`PluginCommunicationRecord`)的 `bodyState` 同一份。 */
|
|
20
|
+
export type CommunicationViewBodyState = PluginCommunicationRecord["bodyState"];
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 一次往来。`state`:`waiting` 已投递、对方还没取件;`picked-up` 已取件;`processed` 处理轮已结束、还没明确回信;`answered` 回了;
|
|
24
|
+
* `unknown` 投递结果不明(不会重投);`delegated` 是委派;`recorded` 是发给人的记录,只落了记录、不走 agent
|
|
25
|
+
* 的交接;`withdrawn` 发件方撤回了、`deleted` 删掉了还没被取走的记录(都不会再被取走)。前两种算「欠着
|
|
26
|
+
* 回复」,只是 `mailbox` 的信不跟踪回复,取件(`picked-up`)后就不算欠。
|
|
27
|
+
*
|
|
28
|
+
* `text` 是 null 表示正文不在了,原因看 `bodyState`;不给 `bodyState` 的往来(信箱里的信)正文总在。
|
|
29
|
+
*/
|
|
30
|
+
export interface CommunicationViewExchange {
|
|
31
|
+
readonly id: string;
|
|
32
|
+
readonly from: string;
|
|
33
|
+
readonly to: string;
|
|
34
|
+
/** ISO 时间;消息流按它从旧到新排。 */
|
|
35
|
+
readonly at: string;
|
|
36
|
+
readonly kind: "record" | "mailbox" | "delegation";
|
|
37
|
+
readonly text: string | null;
|
|
38
|
+
readonly bodyState?: CommunicationViewBodyState | undefined;
|
|
39
|
+
readonly state: CommunicationRecordStage | "delegated";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** 一条直发记录能走到的阶段,名单只在这里列;消息流的 `state`、轨迹的 `phase` 都从它派生。 */
|
|
43
|
+
export type CommunicationRecordStage =
|
|
44
|
+
| "answered"
|
|
45
|
+
| "processed"
|
|
46
|
+
| "recorded"
|
|
47
|
+
| "picked-up"
|
|
48
|
+
| "unknown"
|
|
49
|
+
| "waiting"
|
|
50
|
+
| "withdrawn"
|
|
51
|
+
| "deleted";
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* 一条直发记录走到了哪一段,宿主轨迹与插件看板共用这一条优先级:撤回压过一切(拿掉了的信不再有后文);
|
|
55
|
+
* 回复是强信号,压过取件;收件人是人的只落了记录,不走 agent 的交接(D145 选 A);其次取件;
|
|
56
|
+
* 删除:没被取走(本来是等待或结果不明)的记录不会再被取走,收成 `deleted`,已取件、已回复、已记录的保持
|
|
57
|
+
* 原样;处理轮结束记为 `processed`,仍区别于明确回复;`unknown` 投递结果不明(不会重投);否则等待。
|
|
58
|
+
* `body` 不给就当正文在,读不到正文(`unavailable`)不改阶段。
|
|
59
|
+
*/
|
|
60
|
+
export function communicationRecordStage(record: {
|
|
61
|
+
readonly replied: boolean;
|
|
62
|
+
readonly processed?: boolean;
|
|
63
|
+
readonly toPerson: boolean;
|
|
64
|
+
readonly handedOff: "not-dispatched" | "confirmed" | "unknown";
|
|
65
|
+
readonly body?: CommunicationViewBodyState | undefined;
|
|
66
|
+
}): CommunicationRecordStage {
|
|
67
|
+
if (record.body === "withdrawn") return "withdrawn";
|
|
68
|
+
if (record.replied) return "answered";
|
|
69
|
+
if (record.toPerson) return "recorded";
|
|
70
|
+
if (record.processed) return "processed";
|
|
71
|
+
if (record.handedOff === "confirmed") return "picked-up";
|
|
72
|
+
if (record.body === "deleted") return "deleted";
|
|
73
|
+
return record.handedOff === "unknown" ? "unknown" : "waiting";
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** 消息流自己滚动(虚拟列表),调用方要给它一个有上限的高度,否则它会把每一行都画出来。 */
|
|
77
|
+
export interface CommunicationFlowProps {
|
|
78
|
+
readonly parties: readonly CommunicationViewParty[];
|
|
79
|
+
readonly exchanges: readonly CommunicationViewExchange[];
|
|
80
|
+
/** 只看这两方之间的往来(关系图点一条边带过来);null 看全部。 */
|
|
81
|
+
readonly pair?: { readonly from: string; readonly to: string } | null | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* 顶端取更早一页;null 表示更早的已经全部取完。`failed` 是上一次没取到:宿主说取失败并把按钮
|
|
84
|
+
* 换成重试,不要把失败当成「没有更早的了」。
|
|
85
|
+
*/
|
|
86
|
+
readonly loadEarlier?:
|
|
87
|
+
| {
|
|
88
|
+
readonly loading: boolean;
|
|
89
|
+
readonly failed?: boolean | undefined;
|
|
90
|
+
readonly onLoadEarlier: () => void;
|
|
91
|
+
}
|
|
92
|
+
| null
|
|
93
|
+
| undefined;
|
|
94
|
+
/** 点一行;不给就不可点。 */
|
|
95
|
+
readonly onSelectExchange?: ((exchangeId: string) => void) | undefined;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface CommunicationGraphProps {
|
|
99
|
+
readonly parties: readonly CommunicationViewParty[];
|
|
100
|
+
readonly exchanges: readonly CommunicationViewExchange[];
|
|
101
|
+
/** 超过就把往来最少的几方折成「另外 N 个」;缺省 30。 */
|
|
102
|
+
readonly maxParties?: number | undefined;
|
|
103
|
+
/** 点一条边(有方向);常见用法是切到只看这两方的消息流。 */
|
|
104
|
+
readonly onSelectPair?: ((from: string, to: string) => void) | undefined;
|
|
105
|
+
/** 点一个参与方。 */
|
|
106
|
+
readonly onSelectParty?: ((partyId: string) => void) | undefined;
|
|
107
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 宿主通信记录的形状。会话之间、会话与人之间每发一句,宿主记一条记录,带三段状态:落盘、已交给 agent
|
|
3
|
+
* (收件方取件了)、已回。从包根导出。
|
|
4
|
+
*
|
|
5
|
+
* 读走登记表组装的端口 `ctx.communication.records.get` / `ctx.communication.records.list`(见
|
|
6
|
+
* `PluginDataPorts`);这里的两个名字是它们返回的那份记录。插件发送须声明 communication.message.send,
|
|
7
|
+
* 经 ctx.communication.records.send 调用;agent 发信走消息工具组的 send_message。
|
|
8
|
+
*
|
|
9
|
+
* @module @ycodium-ai/plugin-api/communication
|
|
10
|
+
*/
|
|
11
|
+
import type { CommunicationRecordsGetOutput } from "./dataPorts.gen.ts";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 一条通信记录,与客户端读到的同一份。`delivery`:`quiet` 等收件方下次取件,`wake` 叫醒收件方,`steer` 插进
|
|
15
|
+
* 收件方正在跑的那一轮。`stages.handedOff.certainty`:`confirmed` 是收件方取件了,`not-dispatched` 是还没取,
|
|
16
|
+
* `unknown` 是投递结果不明(不会重投)。`stages.replied` 带 `recordId` 是收件方那条回信,只有 `turnId` 表示
|
|
17
|
+
* 处理它的那一轮结束了;子会话回报带的审批或提问被答了时有 `resolution`(批准、拒绝、回答等)。`to` 只有回填的历史团队消息在角色当时没人挂接时才是 null。`text` 只在
|
|
18
|
+
* `bodyState` 是 `present` 时有;`withdrawn`、`deleted` 是作者或人拿掉了正文,`unavailable` 是正文应该在却读不到。
|
|
19
|
+
*/
|
|
20
|
+
export type PluginCommunicationRecord = CommunicationRecordsGetOutput[number];
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 人是账号(userId + 显示名)或本机所有者(environmentId + 显示名,没有 userId)。
|
|
24
|
+
* 插件只作发件方,pluginId 标识作者,displayName 为发送时的清单快照。
|
|
25
|
+
*/
|
|
26
|
+
export type PluginCommunicationParticipant = PluginCommunicationRecord["from"];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 宿主 UI 原语 `ComposerControl` 一族:会话输入框底栏的控件样式,宿主的模型选择器与插件的选手格、档位、
|
|
3
|
+
* 权限格画成同一个样子。插件经 `bridge.ui` 取用。`ComposerControl` 收宿主 `Button` 的 props,
|
|
4
|
+
* `ComposerSelectControl` 收宿主 `SelectTrigger` 的 props(自带下拉箭头),两者缺省 `size="sm"`、
|
|
5
|
+
* `variant="ghost"`;`ComposerControlChevron` 是控件尾部的下拉箭头,不收 props。
|
|
6
|
+
*
|
|
7
|
+
* @module @ycodium-ai/plugin-api/ui
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** 控件里的图标。`Icon` 是图标组件的类型(如 lucide 图标),本包因此不依赖 React。 */
|
|
11
|
+
export interface ComposerControlIconProps<Icon = unknown> {
|
|
12
|
+
readonly icon: Icon;
|
|
13
|
+
readonly className?: string | undefined;
|
|
14
|
+
/** `large` 大半号。缺省 `default`。 */
|
|
15
|
+
readonly opticalSize?: "default" | "large" | undefined;
|
|
16
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
export {
|
|
2
|
+
attachmentPreviewable,
|
|
3
|
+
chatAttachmentDisplayKind,
|
|
4
|
+
type ChatAttachmentDisplayKind,
|
|
5
|
+
chatAttachmentTypeForMimeType,
|
|
6
|
+
formatChatAttachmentSize,
|
|
7
|
+
} from "./_private/ycodium-attachment-kinds/chatAttachmentKinds.ts";
|
|
8
|
+
export {
|
|
9
|
+
approvalFileChangeKeys,
|
|
10
|
+
approvalFileChangeStat,
|
|
11
|
+
approvalFileChangeToUnifiedDiff,
|
|
12
|
+
} from "./_private/ycodium-composer-tokens/approvalFileChanges.ts";
|
|
13
|
+
export { serializeComposerFileLink } from "./_private/ycodium-composer-tokens/composerFileLink.ts";
|
|
14
|
+
export { collectComposerInlineTokens } from "./_private/ycodium-composer-tokens/composerInlineTokens.ts";
|
|
15
|
+
export {
|
|
16
|
+
clampCollapsedComposerCursor,
|
|
17
|
+
collapseExpandedComposerCursor,
|
|
18
|
+
type ComposerSlashCommand,
|
|
19
|
+
type ComposerSubmissionIntent,
|
|
20
|
+
composerSubmissionIntentForEnter,
|
|
21
|
+
detectComposerTrigger,
|
|
22
|
+
expandCollapsedComposerCursor,
|
|
23
|
+
isCollapsedCursorAdjacentToInlineToken,
|
|
24
|
+
isComposerTokenBoundary,
|
|
25
|
+
replaceTextRange,
|
|
26
|
+
} from "./_private/ycodium-composer-tokens/composerLogic.ts";
|
|
27
|
+
export {
|
|
28
|
+
dataTransferHasComposerMention,
|
|
29
|
+
makeComposerMentionDragHandlers,
|
|
30
|
+
} from "./_private/ycodium-composer-tokens/composerMentionDrag.ts";
|
|
31
|
+
export {
|
|
32
|
+
selectionTouchesMentionBoundary,
|
|
33
|
+
splitPromptIntoComposerSegments,
|
|
34
|
+
} from "./_private/ycodium-composer-tokens/composerPromptSegments.ts";
|
|
35
|
+
export {
|
|
36
|
+
type ComposerTrigger,
|
|
37
|
+
type ComposerTriggerKind,
|
|
38
|
+
} from "./_private/ycodium-composer-tokens/composerTrigger.ts";
|
|
39
|
+
export { formatContextWindowTokens } from "./_private/ycodium-composer-tokens/contextWindowFormat.ts";
|
|
40
|
+
export {
|
|
41
|
+
buildPendingUserInputAnswers,
|
|
42
|
+
derivePendingUserInputProgress,
|
|
43
|
+
pendingUserInputOptionValue,
|
|
44
|
+
resolvePendingUserInputAnswer,
|
|
45
|
+
setPendingUserInputCustomAnswer,
|
|
46
|
+
togglePendingUserInputOptionSelection,
|
|
47
|
+
} from "./_private/ycodium-composer-tokens/pendingUserInput.ts";
|
|
48
|
+
export {
|
|
49
|
+
deriveDisplayedUserMessageState,
|
|
50
|
+
extractTrailingBrowserAnnotation,
|
|
51
|
+
extractTrailingElementContexts,
|
|
52
|
+
formatInlineTerminalContextLabel,
|
|
53
|
+
isTerminalContextExpired,
|
|
54
|
+
type ParsedBrowserAnnotation,
|
|
55
|
+
type ParsedContextEntry,
|
|
56
|
+
} from "./_private/ycodium-composer-tokens/promptContextBlocks.ts";
|
|
57
|
+
export {
|
|
58
|
+
buildCollapsedProposedPlanPreviewMarkdown,
|
|
59
|
+
buildProposedPlanMarkdownFilename,
|
|
60
|
+
downloadPlanAsTextFile,
|
|
61
|
+
normalizePlanMarkdownForExport,
|
|
62
|
+
proposedPlanTitle,
|
|
63
|
+
stripDisplayedPlanMarkdown,
|
|
64
|
+
} from "./_private/ycodium-composer-tokens/proposedPlan.ts";
|
|
65
|
+
export {
|
|
66
|
+
formatProviderSkillDisplayName,
|
|
67
|
+
getProviderSkillsForSlashMenu,
|
|
68
|
+
type ProviderSkillSourceKind,
|
|
69
|
+
resolveProviderSkillSourceKind,
|
|
70
|
+
} from "./_private/ycodium-composer-tokens/providerSkills.ts";
|
|
71
|
+
export { searchProviderSkills } from "./_private/ycodium-composer-tokens/providerSkillSearch.ts";
|
|
72
|
+
export {
|
|
73
|
+
firstQueueLine,
|
|
74
|
+
formatQueueWakeTime,
|
|
75
|
+
isLockedQueueEntry,
|
|
76
|
+
QUEUE_SOURCE_LABEL_KEY,
|
|
77
|
+
} from "./_private/ycodium-composer-tokens/queueEntry.ts";
|
|
78
|
+
export {
|
|
79
|
+
buildReviewCommentRenderablePatch,
|
|
80
|
+
formatReviewCommentFence,
|
|
81
|
+
parseReviewCommentMessageSegments,
|
|
82
|
+
type ReviewCommentBlock,
|
|
83
|
+
} from "./_private/ycodium-composer-tokens/reviewCommentBlocks.ts";
|
|
84
|
+
export { normalizeSearchQuery, scoreQueryMatch } from "./_private/ycodium-composer-tokens/searchRanking.ts";
|
|
85
|
+
export {
|
|
86
|
+
findSkillTokens,
|
|
87
|
+
isProviderSkillUserInvocable,
|
|
88
|
+
matchSkillTokens,
|
|
89
|
+
resolveSkillName,
|
|
90
|
+
skillIndex,
|
|
91
|
+
skillInvocationNotice,
|
|
92
|
+
typedSlashSkillCompletion,
|
|
93
|
+
} from "./_private/ycodium-composer-tokens/skillTokens.ts";
|
|
94
|
+
export {
|
|
95
|
+
buildSlashMenu,
|
|
96
|
+
groupSlashMenuItemsForEmptyQuery,
|
|
97
|
+
resolveTypedSlash,
|
|
98
|
+
searchSlashCommandItems,
|
|
99
|
+
type SlashMenuItem,
|
|
100
|
+
type PluginSlashMenuCommand,
|
|
101
|
+
type SlashMenuSection,
|
|
102
|
+
} from "./_private/ycodium-composer-tokens/slashMenu.ts";
|
|
103
|
+
export { resolveUserInputOptionText } from "./_private/ycodium-composer-tokens/userInputOptionText.ts";
|
|
104
|
+
export {
|
|
105
|
+
approvalButtonLayout,
|
|
106
|
+
orderApprovalOptions,
|
|
107
|
+
placeDecisionOptions,
|
|
108
|
+
} from "./_private/ycodium-decision-order/decisionOrder.ts";
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 会话排队读模型的类型(宿主 `TurnQueueEntry` / `TurnQueueState` 的结构子集)。
|
|
3
|
+
* `@ycodium-ai/plugin-api/conversation` 从这里再导出,对外导入路径不变;只放类型。
|
|
4
|
+
*
|
|
5
|
+
* @module @ycodium-ai/plugin-api/conversation-queue
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** 编辑一条排队消息的载荷(宿主 `QueuedMessageEdit`;attachments 原样回传)。 */
|
|
9
|
+
export interface ConversationQueuedMessageEdit {
|
|
10
|
+
readonly text: string;
|
|
11
|
+
readonly attachments: ReadonlyArray<unknown>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** 排队编辑弹窗回显的既有附件(宿主 `ChatAttachment` 的结构子集)。 */
|
|
15
|
+
export interface ConversationQueuedAttachment {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly mimeType?: string | undefined;
|
|
19
|
+
readonly sizeBytes: number;
|
|
20
|
+
/** 缩略图(image)还是回形针(file)。 */
|
|
21
|
+
readonly type: "image" | "file";
|
|
22
|
+
/** 来源标记,宿主原样带过来;thread-reference 是 @会话 带进来的转录,编辑弹窗不把它列成附件。 */
|
|
23
|
+
readonly source?: { readonly _tag: string } | undefined;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 排队消息的来源:服务器在入队那一刻记下,宿主照它给出(标题由宿主按本机会话表补,读不到为 null)。
|
|
28
|
+
* 只有 `user` 与 `scheduled-wake` 有 `management`,能改、能拖;其余都只能取消。缺席是升级前就排着的旧条目,
|
|
29
|
+
* 不打类型标记,也只能取消。`record` 是投递来的通信记录,发件方与首行按记录读(`useCommunicationRecord`)。
|
|
30
|
+
*/
|
|
31
|
+
export type ConversationQueueEntrySource =
|
|
32
|
+
| { readonly kind: "user" }
|
|
33
|
+
| { readonly kind: "scheduled-wake"; readonly dueAt: string; readonly pluginId?: string }
|
|
34
|
+
| {
|
|
35
|
+
readonly kind: "schedule";
|
|
36
|
+
readonly scheduleId: string;
|
|
37
|
+
readonly name: string;
|
|
38
|
+
readonly pluginId?: string;
|
|
39
|
+
}
|
|
40
|
+
| { readonly kind: "record"; readonly recordId: string }
|
|
41
|
+
| { readonly kind: "session"; readonly threadId: string; readonly threadTitle: string | null }
|
|
42
|
+
| { readonly kind: "reply"; readonly recordId: string }
|
|
43
|
+
| {
|
|
44
|
+
readonly kind: "child-report";
|
|
45
|
+
readonly childThreadId: string;
|
|
46
|
+
readonly childTitle: string | null;
|
|
47
|
+
/** 完成 / 失败;其余子会话通知(等批准、提问……)为 null。 */
|
|
48
|
+
readonly outcome: "settled" | "failed" | null;
|
|
49
|
+
}
|
|
50
|
+
| { readonly kind: "plugin-wake"; readonly pluginId: string }
|
|
51
|
+
| { readonly kind: "person"; readonly pluginId: string; readonly displayName: string }
|
|
52
|
+
| { readonly kind: "board-dispatch"; readonly workItemId: string }
|
|
53
|
+
| {
|
|
54
|
+
readonly kind: "plugin-notice";
|
|
55
|
+
readonly title: string;
|
|
56
|
+
/** 发通知的插件;旧通知与不是插件发的通知缺席。 */
|
|
57
|
+
readonly pluginId?: string | undefined;
|
|
58
|
+
}
|
|
59
|
+
| { readonly kind: "home-machine" }
|
|
60
|
+
| { readonly kind: "restart-resume" }
|
|
61
|
+
| {
|
|
62
|
+
/** 另一台机器上的人或 agent 发给这条会话的话。 */
|
|
63
|
+
readonly kind: "remote-post";
|
|
64
|
+
readonly postId: string;
|
|
65
|
+
readonly authorKind: "human" | "agent";
|
|
66
|
+
readonly authorName?: string | undefined;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export interface ConversationQueueEntry {
|
|
70
|
+
readonly rewrite?:
|
|
71
|
+
| {
|
|
72
|
+
readonly original: string;
|
|
73
|
+
readonly steps: readonly {
|
|
74
|
+
readonly pluginId: string;
|
|
75
|
+
readonly via: "before-send" | "slash-command";
|
|
76
|
+
readonly command?: string | undefined;
|
|
77
|
+
}[];
|
|
78
|
+
}
|
|
79
|
+
| undefined;
|
|
80
|
+
readonly rewrittenText?: string | undefined;
|
|
81
|
+
readonly intentId: string;
|
|
82
|
+
readonly status: string;
|
|
83
|
+
readonly deliveryCertainty: string;
|
|
84
|
+
/** 上屏用:系统通知的信封与记录号宿主已经剥掉。要原样回传的读 `management.text`。 */
|
|
85
|
+
readonly text: string | null;
|
|
86
|
+
readonly attachmentNames: ReadonlyArray<string>;
|
|
87
|
+
/** 这条消息从哪来;只有 `user` 与 `scheduled-wake` 有 `management`,能改、能拖。 */
|
|
88
|
+
readonly source?: ConversationQueueEntrySource | undefined;
|
|
89
|
+
/** 在队列里等待发送(拖拽排序只作用于这些行)。 */
|
|
90
|
+
readonly waiting: boolean;
|
|
91
|
+
readonly management?:
|
|
92
|
+
| {
|
|
93
|
+
readonly revision: string | number;
|
|
94
|
+
readonly expectedTurnId: string | null;
|
|
95
|
+
readonly canReorder: boolean;
|
|
96
|
+
readonly canRun: boolean;
|
|
97
|
+
readonly canSteer: boolean;
|
|
98
|
+
/** 编辑弹窗回显用的原文(未剥信封);改完按这一份的形状回传。 */
|
|
99
|
+
readonly text: string;
|
|
100
|
+
/** 编辑弹窗回显用的既有附件;编辑回传按原对象回传。 */
|
|
101
|
+
readonly attachments: ReadonlyArray<ConversationQueuedAttachment>;
|
|
102
|
+
}
|
|
103
|
+
| undefined;
|
|
104
|
+
readonly pendingAction?: string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* 这条消息发送时冻结的模式里,与会话当前设置不同的那几项(都相同就没有):它出队时按这些执行。
|
|
107
|
+
* 权限只给一项:`nativeModeName`(agent 自己的模式档的名字)或 `runtimeMode`。
|
|
108
|
+
*/
|
|
109
|
+
readonly sentWith?:
|
|
110
|
+
| {
|
|
111
|
+
readonly interactionMode?: "default" | "plan" | undefined;
|
|
112
|
+
readonly runtimeMode?: string | undefined;
|
|
113
|
+
readonly nativeModeName?: string | undefined;
|
|
114
|
+
}
|
|
115
|
+
| undefined;
|
|
116
|
+
readonly failure?: string | undefined;
|
|
117
|
+
/** 这条在排队等 agent 的进程名额(实例开满了),不是出错也不需要处理;可以取消。 */
|
|
118
|
+
readonly waitingForCapacity?: boolean | undefined;
|
|
119
|
+
/** cancel = 可取消;abandon = 可放弃;null = 两者都不给。 */
|
|
120
|
+
readonly action: "cancel" | "abandon" | null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** 服务端意图尚未投影时,由宿主放进队列区的本地提交占位。 */
|
|
124
|
+
export interface ConversationPendingQueueSubmission {
|
|
125
|
+
readonly messageId: string;
|
|
126
|
+
readonly text: string;
|
|
127
|
+
readonly attachmentNames: ReadonlyArray<string>;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface ConversationQueueState {
|
|
131
|
+
readonly paused: boolean;
|
|
132
|
+
readonly queuedCount: number;
|
|
133
|
+
readonly blocked: boolean;
|
|
134
|
+
readonly reconciling: boolean;
|
|
135
|
+
readonly deliveryUncertain: boolean;
|
|
136
|
+
readonly blockedReason: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* 队首在排队等进程名额:这台机器上这个 agent 同时跑的会话已经到上限,前面有人做完就轮到它。
|
|
139
|
+
* 不算 `blocked`;`maxProcesses` 是上限(不知道时为 null)。没有排队等名额的就是 null 或缺席。
|
|
140
|
+
*/
|
|
141
|
+
readonly waitingForCapacity?:
|
|
142
|
+
| {
|
|
143
|
+
readonly instanceId?: string;
|
|
144
|
+
readonly agentName?: string;
|
|
145
|
+
readonly maxProcesses: number | null;
|
|
146
|
+
}
|
|
147
|
+
| null
|
|
148
|
+
| undefined;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface ConversationQueueActions {
|
|
152
|
+
onEdit(entry: ConversationQueueEntry, message: ConversationQueuedMessageEdit): Promise<void>;
|
|
153
|
+
onReorder(entry: ConversationQueueEntry, beforeIntentId: string | null): Promise<void>;
|
|
154
|
+
onRun(entry: ConversationQueueEntry, mode: "steer" | "interrupt"): Promise<void>;
|
|
155
|
+
/**
|
|
156
|
+
* 编辑器 detach 后继续观察权威 intent;终态或 revision 失效时由宿主调用 onInvalid。
|
|
157
|
+
* 返回值释放这条轻量 model 订阅,不影响 server intent。
|
|
158
|
+
*/
|
|
159
|
+
watchEditorAuthority?(input: {
|
|
160
|
+
readonly threadKey: string;
|
|
161
|
+
readonly intentId: string;
|
|
162
|
+
readonly revision: string | number | null;
|
|
163
|
+
readonly onInvalid: () => void;
|
|
164
|
+
}): () => void;
|
|
165
|
+
}
|