@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,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 宿主 UI 原语 `DecisionCard`(决策卡)与 `ChoiceList`(选项列表)的 props。agent 请求权限、向人
|
|
3
|
+
* 提问共用一张卡;插件经 `bridge.ui` 取用。`Node` 是可渲染内容的类型,宿主与插件都传 `ReactNode`,
|
|
4
|
+
* 本包因此不依赖 React。从 `@ycodium-ai/plugin-api/ui` 导出。
|
|
5
|
+
*
|
|
6
|
+
* @module @ycodium-ai/plugin-api/ui
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 待答的卡:挂在输入卡上方的抽屉里,抽屉自己画外框与底色,卡只排标题、正文与操作行。
|
|
11
|
+
* 给了 `collapse` 就能收起:标题行成了开关,收起后只剩标题行(加一行提示),正文与操作行藏起来;
|
|
12
|
+
* 外框与底色不变,收起了也看得出是一张待答卡。收起时快捷键该不该生效由调用方定。
|
|
13
|
+
*/
|
|
14
|
+
export interface DecisionCardPendingProps<Node> {
|
|
15
|
+
readonly state: "pending";
|
|
16
|
+
/** 标题左侧的图标(终端、文件、问号、拼图……),画在浅灰方块里,标明这张卡在问什么。 */
|
|
17
|
+
readonly icon?: Node | undefined;
|
|
18
|
+
readonly title: Node;
|
|
19
|
+
/** 标题下一行灰字:谁在问、为什么、有什么风险。一行说完,不另起正文段落。 */
|
|
20
|
+
readonly subtitle?: Node | undefined;
|
|
21
|
+
/** 标题右侧的小字,比如「1 / 3」。 */
|
|
22
|
+
readonly meta?: Node | undefined;
|
|
23
|
+
readonly children?: Node | undefined;
|
|
24
|
+
/** 操作行,主按钮放最右。 */
|
|
25
|
+
readonly actions?: Node | undefined;
|
|
26
|
+
/** 可收起(长内容用,比如提问);不给就是常开的。 */
|
|
27
|
+
readonly collapse?:
|
|
28
|
+
| {
|
|
29
|
+
readonly collapsed: boolean;
|
|
30
|
+
readonly onCollapsedChange: (collapsed: boolean) => void;
|
|
31
|
+
/** 收起时排在标题后面的一行提示(比如问题本身),截成一行。 */
|
|
32
|
+
readonly hint?: Node | undefined;
|
|
33
|
+
/** 开关的提示文字,按当前状态给「展开」或「收起」。 */
|
|
34
|
+
readonly toggleLabel: string;
|
|
35
|
+
}
|
|
36
|
+
| undefined;
|
|
37
|
+
readonly className?: string | undefined;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 已答的卡:留在会话流里的记录。标题下一行灰字概括结果,点它展开或收起正文。展开与否由调用方持有。
|
|
42
|
+
*/
|
|
43
|
+
export interface DecisionCardAnsweredProps<Node> {
|
|
44
|
+
readonly state: "answered";
|
|
45
|
+
/** 与待答时同一个图标;收起时整条记录就是「图标 标题 · 结果」一行。 */
|
|
46
|
+
readonly icon?: Node | undefined;
|
|
47
|
+
readonly title: Node;
|
|
48
|
+
/** 结果概括(「Answered · 2 questions」「已允许」),排在标题同一行。有正文时整行就是展开开关。 */
|
|
49
|
+
readonly summary: Node;
|
|
50
|
+
readonly children?: Node | undefined;
|
|
51
|
+
readonly expanded: boolean;
|
|
52
|
+
readonly onExpandedChange: (expanded: boolean) => void;
|
|
53
|
+
readonly className?: string | undefined;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type DecisionCardProps<Node> =
|
|
57
|
+
| DecisionCardPendingProps<Node>
|
|
58
|
+
| DecisionCardAnsweredProps<Node>;
|
|
59
|
+
|
|
60
|
+
export interface ChoiceListOption<Node> {
|
|
61
|
+
readonly value: string;
|
|
62
|
+
readonly label: Node;
|
|
63
|
+
/** 选项下一行的灰色说明。 */
|
|
64
|
+
readonly description?: Node | undefined;
|
|
65
|
+
/** 行尾的小东西,比如数字快捷键提示。 */
|
|
66
|
+
readonly trailing?: Node | undefined;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 决策卡里的选项:单选画圆点、多选画勾选框。不给 `onToggle` 就是只读的「已答」样子:列出全部
|
|
71
|
+
* 选项,没选的变淡。`customAnswer` 是不在选项里的自填答案,只读时画成最后一项、选中态。
|
|
72
|
+
*/
|
|
73
|
+
export interface ChoiceListProps<Node> {
|
|
74
|
+
readonly mode: "single" | "multiple";
|
|
75
|
+
readonly options: readonly ChoiceListOption<Node>[];
|
|
76
|
+
readonly selected: readonly string[];
|
|
77
|
+
readonly onToggle?: ((value: string) => void) | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* 单选时再点已选中的那项:值没变,`onToggle` 不会来。「再点一次也算选」(比如选完自动前进)
|
|
80
|
+
* 的调用方接这个。
|
|
81
|
+
*/
|
|
82
|
+
readonly onReselect?: ((value: string) => void) | undefined;
|
|
83
|
+
/** 待答时暂时不能选(比如答案正在发出去);控件停用,整行文字变淡。 */
|
|
84
|
+
readonly disabled?: boolean | undefined;
|
|
85
|
+
readonly customAnswer?: Node | undefined;
|
|
86
|
+
readonly "aria-label"?: string | undefined;
|
|
87
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 问人:往会话里贴一张待决定的卡(`ctx.decisions`)。类型从 `index.ts` 再导出。
|
|
3
|
+
*
|
|
4
|
+
* @module @ycodium-ai/plugin-api/decisions
|
|
5
|
+
*/
|
|
6
|
+
import type { ThreadsDecisionsRequestInput } from "./dataPorts.gen.ts";
|
|
7
|
+
import type { PluginDisposer } from "./index.ts";
|
|
8
|
+
|
|
9
|
+
/** 等待包装与生成的 request 使用同一输入;正文最多八行,超出由宿主截断。 */
|
|
10
|
+
export type PluginDecisionRequest = ThreadsDecisionsRequestInput;
|
|
11
|
+
/** 卡内唯一的按钮号,小写字母开头;tone 只影响显示。 */
|
|
12
|
+
export type PluginDecisionOption = PluginDecisionRequest["options"][number];
|
|
13
|
+
|
|
14
|
+
export interface PluginDecisionAnswer {
|
|
15
|
+
readonly requestId: string;
|
|
16
|
+
readonly threadId: string;
|
|
17
|
+
/** 人按的那个按钮的 `id`。 */
|
|
18
|
+
readonly optionId: string;
|
|
19
|
+
readonly answeredAt: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type PluginDecisionHandler = (answer: PluginDecisionAnswer) => void | Promise<void>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 问一个人。**卡上带你的插件 id,用户看得见是谁在问**——所以这里没有权限门。
|
|
26
|
+
*
|
|
27
|
+
* `ctx.threads.decisions.request` 贴完就走,答案经 `on` 回来;`askAndWait` 等到有人按,
|
|
28
|
+
* `timeoutMs` 到点自动把卡作废并 resolve 成 null。长活儿用前者:等待占着一条
|
|
29
|
+
* Promise,插件被停用时它会以 null 收场。
|
|
30
|
+
*
|
|
31
|
+
* 没人答的卡会挡住这个项目的归档和拿掉文件夹;不再需要时用 `ctx.threads.decisions.cancel` 收回。
|
|
32
|
+
*/
|
|
33
|
+
export interface PluginDecisions {
|
|
34
|
+
/**
|
|
35
|
+
* 贴一张卡并等回答。超时、被作废、插件停用都 resolve 成 null,不 reject——
|
|
36
|
+
* 「没人回答」是正常结局,不是错误。
|
|
37
|
+
*/
|
|
38
|
+
readonly askAndWait: (
|
|
39
|
+
request: PluginDecisionRequest & { readonly timeoutMs?: number },
|
|
40
|
+
) => Promise<PluginDecisionAnswer | null>;
|
|
41
|
+
/** 收本插件贴的卡的回答。别的插件的卡收不到。 */
|
|
42
|
+
readonly on: (handler: PluginDecisionHandler) => PluginDisposer;
|
|
43
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 插件的默认导出:`PluginDefinition` 与 `definePlugin`。从 `index.ts` 再导出。
|
|
3
|
+
*
|
|
4
|
+
* @module @ycodium-ai/plugin-api/definition
|
|
5
|
+
*/
|
|
6
|
+
import type { ExecutorContribution } from "./executor.ts";
|
|
7
|
+
import type { PluginApiVersion, PluginContext } from "./index.ts";
|
|
8
|
+
|
|
9
|
+
export interface PluginDefinition<Config = Record<string, unknown>> {
|
|
10
|
+
/** 必须与 patch 条目 id 的后缀一致,否则宿主拒绝加载。 */
|
|
11
|
+
readonly id: string;
|
|
12
|
+
/** 静态声明插件针对的 API 版本,不能用宿主当前的运行时版本替代兼容性声明。 */
|
|
13
|
+
readonly apiVersion: PluginApiVersion;
|
|
14
|
+
/**
|
|
15
|
+
* 执行器贡献。缺席或空数组 = 普通功能插件。非空则 manifest 必须声明
|
|
16
|
+
* `{ kind: "executor" }`,否则拒载。名片在 activate 之前即可聚合。
|
|
17
|
+
*/
|
|
18
|
+
readonly executors?: ReadonlyArray<ExecutorContribution>;
|
|
19
|
+
/** 超过 5 秒未返回视为加载失败,插件被隔离掉。 */
|
|
20
|
+
readonly activate: (ctx: PluginContext<Config>) => void | Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 只做类型锚定:默认导出经过它,宿主校验的字段就都被 TS 盯住了。
|
|
25
|
+
*/
|
|
26
|
+
export const definePlugin = <Config = Record<string, unknown>>(
|
|
27
|
+
definition: PluginDefinition<Config>,
|
|
28
|
+
): PluginDefinition<Config> => definition;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 托管的跨事件状态:`ctx.derivedState`。类型从 `index.ts` 再导出。
|
|
3
|
+
*
|
|
4
|
+
* @module @ycodium-ai/plugin-api/derivedState
|
|
5
|
+
*/
|
|
6
|
+
import type { PluginEvent } from "./events.ts";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 一块由事件折出来的状态,宿主替你记住、替你重建。
|
|
10
|
+
*
|
|
11
|
+
* 什么时候用它:你要记住的东西跨事件、跨重启(看板、名册、信箱)。**别把这种东西攒
|
|
12
|
+
* 在插件的模块变量或 Map 里** —— 插件停用、宿主重启、会话换进程,那份内存就没了,
|
|
13
|
+
* 而且没有任何东西会告诉你它没了。
|
|
14
|
+
*
|
|
15
|
+
* 只有一条硬规矩,但它排掉一整类缺陷:**`apply` 必须是纯函数**。同样的入参给同样的
|
|
16
|
+
* 结果,不读时钟、不读随机数、不发请求、不改传进来的 `state`(返回新值)。它会被跑
|
|
17
|
+
* 两次——事件来的时候一次,重启重建的时候一次——不纯就意味着两次结果不同,而你只会
|
|
18
|
+
* 在重启之后才发现。
|
|
19
|
+
*
|
|
20
|
+
* 状态必须能 JSON 序列化。宿主不校验它的形状:改了形状就把 `version` 加一,宿主会
|
|
21
|
+
* 丢掉旧的从头重折。不加,旧状态会带着旧规则一直用下去。
|
|
22
|
+
*/
|
|
23
|
+
export interface PluginDerivedState<S> {
|
|
24
|
+
/** 你自己的名字,插件内唯一。宿主会加上你的插件 id 做前缀,和别人撞不上。 */
|
|
25
|
+
readonly key: string;
|
|
26
|
+
/** 折法或状态形状改了就 +1。宿主据此丢掉旧的重折。 */
|
|
27
|
+
readonly version: number;
|
|
28
|
+
/**
|
|
29
|
+
* 只折这些事件类型;省略表示折权限允许的全部事件。`work.*` / `communication.*` / `memory.*` 没声明对应读权限的,
|
|
30
|
+
* 宿主在交给 `apply` 之前滤掉;补了或撤了权限,宿主会从日志重折。过滤在宿主侧做,不进你的进程时间。
|
|
31
|
+
*/
|
|
32
|
+
readonly events?: readonly string[] | undefined;
|
|
33
|
+
/** 空状态。重建从这里起折。 */
|
|
34
|
+
readonly init: () => S;
|
|
35
|
+
/** 纯折叠。不许就地改 `state`。 */
|
|
36
|
+
readonly apply: (state: S, event: PluginEvent) => S;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** `ctx.derivedState` 给回来的把手。 */
|
|
40
|
+
export interface PluginDerivedStateHandle<S> {
|
|
41
|
+
/**
|
|
42
|
+
* 此刻的状态。在 `reactor` / `events.onRaw` 处理器里读到的,**已经含当前这条事件**
|
|
43
|
+
* ——宿主先推进状态再把事件发给你。
|
|
44
|
+
*
|
|
45
|
+
* 读己之写:同一个插件(同一次挂载)用 `ctx.events.append` 写过事实之后,不带参数的
|
|
46
|
+
* `get()` 读到的状态**已含你最近写下的那条**,不用自己传序号。别的插件写的事实不在此列;
|
|
47
|
+
* 插件自己没写过时,`get()` 照常读当前状态,不额外等待。
|
|
48
|
+
*
|
|
49
|
+
* 指定 throughSequence 会直接补读已提交日志,保证**至少**包含到该序号,不等待 reactor 队列;
|
|
50
|
+
* 状态已推进得更远时会含更晚的事件——它不是历史快照。未提交的未来序号会拒绝,不会挂起等待。
|
|
51
|
+
*
|
|
52
|
+
* 读己之写从插件 API 101 起成立。
|
|
53
|
+
*/
|
|
54
|
+
readonly get: (options?: { readonly throughSequence: number }) => Promise<S>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/** 机器诊断页读取的进程采样、历史和链路摘要。 */
|
|
2
|
+
/** 三态。`"unknown"` 不是 `"false"`:非桌面环境读不到电源。 */
|
|
3
|
+
export type ResourceTelemetryPowerState = "true" | "false" | "unknown";
|
|
4
|
+
|
|
5
|
+
export type ResourceTelemetryIoSemantics = "storage" | "all-io";
|
|
6
|
+
|
|
7
|
+
export type ResourceTelemetryProcessCategory = "server" | "server-child" | "resource-monitor";
|
|
8
|
+
|
|
9
|
+
export type ResourceTelemetryStatus =
|
|
10
|
+
| "starting"
|
|
11
|
+
| "healthy"
|
|
12
|
+
| "degraded"
|
|
13
|
+
| "unavailable"
|
|
14
|
+
| "stopped";
|
|
15
|
+
|
|
16
|
+
/** 进程身份是 `(pid, startTimeMs)`,不是裸 pid —— pid 会被复用。 */
|
|
17
|
+
interface ResourceTelemetryProcessIdentity {
|
|
18
|
+
readonly pid: number;
|
|
19
|
+
readonly startTimeMs: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ResourceTelemetryProcess {
|
|
23
|
+
readonly identity: ResourceTelemetryProcessIdentity;
|
|
24
|
+
readonly ppid: number;
|
|
25
|
+
readonly childPids: readonly number[];
|
|
26
|
+
readonly depth: number;
|
|
27
|
+
readonly name: string;
|
|
28
|
+
readonly command: string;
|
|
29
|
+
readonly status: string;
|
|
30
|
+
readonly category: ResourceTelemetryProcessCategory;
|
|
31
|
+
readonly cpuPercent: number;
|
|
32
|
+
readonly cpuTimeMs: number;
|
|
33
|
+
readonly residentBytes: number;
|
|
34
|
+
readonly peakResidentBytes: number;
|
|
35
|
+
readonly virtualBytes: number;
|
|
36
|
+
readonly ioReadBytes: number;
|
|
37
|
+
readonly ioWriteBytes: number;
|
|
38
|
+
readonly ioReadBytesPerSecond: number;
|
|
39
|
+
readonly ioWriteBytesPerSecond: number;
|
|
40
|
+
readonly ioSemantics: ResourceTelemetryIoSemantics;
|
|
41
|
+
readonly runTimeMs: number;
|
|
42
|
+
readonly firstSeenAtIso: string;
|
|
43
|
+
readonly lastSeenAtIso: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ResourceTelemetryAggregate {
|
|
47
|
+
readonly processCount: number;
|
|
48
|
+
readonly currentCpuPercent: number;
|
|
49
|
+
readonly cpuTimeMs: number;
|
|
50
|
+
readonly currentRssBytes: number;
|
|
51
|
+
readonly peakRssBytes: number;
|
|
52
|
+
readonly ioReadBytes: number;
|
|
53
|
+
readonly ioWriteBytes: number;
|
|
54
|
+
readonly ioReadBytesPerSecond: number;
|
|
55
|
+
readonly ioWriteBytesPerSecond: number;
|
|
56
|
+
readonly processStarts: number;
|
|
57
|
+
readonly processExits: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface ResourceTelemetryGroups {
|
|
61
|
+
readonly backend: ResourceTelemetryAggregate;
|
|
62
|
+
readonly monitor: ResourceTelemetryAggregate;
|
|
63
|
+
readonly all: ResourceTelemetryAggregate;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** sidecar 的健康位。宿主那份的 `native` / `desktop` 两个来源在插件里只剩这一个。 */
|
|
67
|
+
export interface ResourceTelemetryHealth {
|
|
68
|
+
readonly status: ResourceTelemetryStatus;
|
|
69
|
+
readonly sidecarVersion: string | null;
|
|
70
|
+
readonly sidecarPid: number | null;
|
|
71
|
+
readonly restartCount: number;
|
|
72
|
+
readonly lastSampleAtIso: string | null;
|
|
73
|
+
readonly lastError: string | null;
|
|
74
|
+
readonly sampleIntervalMs: number;
|
|
75
|
+
readonly collectionDurationMicros: number;
|
|
76
|
+
readonly scannedProcessCount: number;
|
|
77
|
+
readonly retainedProcessCount: number;
|
|
78
|
+
readonly inaccessibleProcessCount: number;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
interface ResourceTelemetryPower {
|
|
82
|
+
readonly source: string;
|
|
83
|
+
readonly idle: ResourceTelemetryPowerState;
|
|
84
|
+
readonly idleSeconds: number | null;
|
|
85
|
+
readonly locked: ResourceTelemetryPowerState;
|
|
86
|
+
readonly suspended: boolean;
|
|
87
|
+
readonly onBattery: ResourceTelemetryPowerState;
|
|
88
|
+
readonly lowPowerMode: ResourceTelemetryPowerState;
|
|
89
|
+
readonly thermalState: string;
|
|
90
|
+
readonly stale: boolean;
|
|
91
|
+
readonly updatedAtIso: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface ResourceAttributionEntry {
|
|
95
|
+
readonly component: string;
|
|
96
|
+
readonly operation: string;
|
|
97
|
+
readonly logicalReadBytes: number;
|
|
98
|
+
readonly logicalWriteBytes: number;
|
|
99
|
+
readonly count: number;
|
|
100
|
+
readonly durationMs: number;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
interface ResourceTelemetryAttribution {
|
|
104
|
+
readonly readAtIso: string;
|
|
105
|
+
readonly entries: readonly ResourceAttributionEntry[];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface ResourceTelemetrySnapshot {
|
|
109
|
+
readonly readAtIso: string;
|
|
110
|
+
readonly sampleIntervalMs: number;
|
|
111
|
+
readonly processes: readonly ResourceTelemetryProcess[];
|
|
112
|
+
readonly groups: ResourceTelemetryGroups;
|
|
113
|
+
readonly power: ResourceTelemetryPower;
|
|
114
|
+
readonly attribution: ResourceTelemetryAttribution;
|
|
115
|
+
readonly health: ResourceTelemetryHealth;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface ResourceTelemetryHistoryBucket {
|
|
119
|
+
readonly startedAtIso: string;
|
|
120
|
+
readonly endedAtIso: string;
|
|
121
|
+
readonly avgCpuPercent: number;
|
|
122
|
+
readonly maxCpuPercent: number;
|
|
123
|
+
readonly maxRssBytes: number;
|
|
124
|
+
readonly ioReadBytes: number;
|
|
125
|
+
readonly ioWriteBytes: number;
|
|
126
|
+
readonly maxProcessCount: number;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface ResourceTelemetryProcessSummary {
|
|
130
|
+
readonly identity: ResourceTelemetryProcessIdentity;
|
|
131
|
+
readonly ppid: number;
|
|
132
|
+
readonly depth: number;
|
|
133
|
+
readonly name: string;
|
|
134
|
+
readonly command: string;
|
|
135
|
+
readonly category: ResourceTelemetryProcessCategory;
|
|
136
|
+
readonly firstSeenAtIso: string;
|
|
137
|
+
readonly lastSeenAtIso: string;
|
|
138
|
+
readonly currentCpuPercent: number;
|
|
139
|
+
readonly avgCpuPercent: number;
|
|
140
|
+
readonly maxCpuPercent: number;
|
|
141
|
+
readonly cpuTimeMs: number;
|
|
142
|
+
readonly currentRssBytes: number;
|
|
143
|
+
readonly peakRssBytes: number;
|
|
144
|
+
readonly ioReadBytes: number;
|
|
145
|
+
readonly ioWriteBytes: number;
|
|
146
|
+
readonly ioSemantics: ResourceTelemetryIoSemantics;
|
|
147
|
+
readonly sampleCount: number;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface ResourceTelemetryHistory {
|
|
151
|
+
readonly readAtIso: string;
|
|
152
|
+
readonly windowMs: number;
|
|
153
|
+
readonly bucketMs: number;
|
|
154
|
+
readonly sampleIntervalMs: number;
|
|
155
|
+
readonly retainedSampleCount: number;
|
|
156
|
+
readonly buckets: readonly ResourceTelemetryHistoryBucket[];
|
|
157
|
+
readonly topProcesses: readonly ResourceTelemetryProcessSummary[];
|
|
158
|
+
readonly health: ResourceTelemetryHealth;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface ResourceTelemetryHistoryInput {
|
|
162
|
+
readonly windowMs: number;
|
|
163
|
+
readonly bucketMs: number;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** `retry` 命令的应答:`accepted` 说熔断器是不是真的被打开了。 */
|
|
167
|
+
export interface ResourceTelemetryRetryResult {
|
|
168
|
+
readonly accepted: boolean;
|
|
169
|
+
readonly snapshot: ResourceTelemetrySnapshot;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export type TraceDiagnosticsErrorKind = "trace-file-not-found" | "trace-file-read-failed";
|
|
173
|
+
|
|
174
|
+
export interface TraceDiagnosticsSpanSummary {
|
|
175
|
+
readonly name: string;
|
|
176
|
+
readonly count: number;
|
|
177
|
+
readonly failureCount: number;
|
|
178
|
+
readonly totalDurationMs: number;
|
|
179
|
+
readonly averageDurationMs: number;
|
|
180
|
+
readonly maxDurationMs: number;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface TraceDiagnosticsFailureSummary {
|
|
184
|
+
readonly name: string;
|
|
185
|
+
readonly cause: string;
|
|
186
|
+
readonly count: number;
|
|
187
|
+
readonly lastSeenAt: string;
|
|
188
|
+
readonly traceId: string;
|
|
189
|
+
readonly spanId: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface TraceDiagnosticsRecentFailure {
|
|
193
|
+
readonly name: string;
|
|
194
|
+
readonly cause: string;
|
|
195
|
+
readonly durationMs: number;
|
|
196
|
+
readonly endedAt: string;
|
|
197
|
+
readonly traceId: string;
|
|
198
|
+
readonly spanId: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface TraceDiagnosticsSpanOccurrence {
|
|
202
|
+
readonly name: string;
|
|
203
|
+
readonly durationMs: number;
|
|
204
|
+
readonly endedAt: string;
|
|
205
|
+
readonly traceId: string;
|
|
206
|
+
readonly spanId: string;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface TraceDiagnosticsLogEvent {
|
|
210
|
+
readonly spanName: string;
|
|
211
|
+
readonly level: string;
|
|
212
|
+
readonly message: string;
|
|
213
|
+
readonly seenAt: string;
|
|
214
|
+
readonly traceId: string;
|
|
215
|
+
readonly spanId: string;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface TraceDiagnosticsSummary {
|
|
219
|
+
readonly traceFilePath: string;
|
|
220
|
+
readonly scannedFilePaths: readonly string[];
|
|
221
|
+
readonly readAt: string;
|
|
222
|
+
readonly recordCount: number;
|
|
223
|
+
readonly parseErrorCount: number;
|
|
224
|
+
readonly firstSpanAt: string | null;
|
|
225
|
+
readonly lastSpanAt: string | null;
|
|
226
|
+
readonly failureCount: number;
|
|
227
|
+
readonly interruptionCount: number;
|
|
228
|
+
readonly slowSpanThresholdMs: number;
|
|
229
|
+
readonly slowSpanCount: number;
|
|
230
|
+
readonly logLevelCounts: Readonly<Record<string, number>>;
|
|
231
|
+
readonly topSpansByCount: readonly TraceDiagnosticsSpanSummary[];
|
|
232
|
+
readonly slowestSpans: readonly TraceDiagnosticsSpanOccurrence[];
|
|
233
|
+
readonly commonFailures: readonly TraceDiagnosticsFailureSummary[];
|
|
234
|
+
readonly latestFailures: readonly TraceDiagnosticsRecentFailure[];
|
|
235
|
+
readonly latestWarningAndErrorLogs: readonly TraceDiagnosticsLogEvent[];
|
|
236
|
+
readonly partialFailure: boolean;
|
|
237
|
+
readonly error: { readonly kind: TraceDiagnosticsErrorKind; readonly message: string } | null;
|
|
238
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { shortDayParams } from "./_private/ycodium-day-format/dayFormat.ts";
|
|
2
|
+
export {
|
|
3
|
+
formatChatTimestampTooltip,
|
|
4
|
+
formatDayAwareTimestamp,
|
|
5
|
+
formatNumericDay,
|
|
6
|
+
localDayKey,
|
|
7
|
+
} from "./_private/ycodium-day-format/timestampFormat.ts";
|
|
8
|
+
export {
|
|
9
|
+
type DurationUnits,
|
|
10
|
+
formatCoarseWait,
|
|
11
|
+
formatCountedDuration,
|
|
12
|
+
formatDuration,
|
|
13
|
+
} from "./_private/ycodium-duration-format/durationFormat.ts";
|
|
14
|
+
export { formatToolLabel, formatToolLabelText } from "./_private/ycodium-tool-label/toolLabel.ts";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 实体名原语与工具摘要里的实体引用。组件只收 id,名字、图标与「未知…」兜底都由宿主解析;
|
|
3
|
+
* `fallbackName` 只在读模型查不到时使用,不能传同一个 id 充当名字。
|
|
4
|
+
*
|
|
5
|
+
* @module @ycodium-ai/plugin-api/ui
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export interface PluginUiMachineNameProps {
|
|
9
|
+
readonly environmentId: string;
|
|
10
|
+
readonly fallbackName?: string | undefined;
|
|
11
|
+
readonly className?: string | undefined;
|
|
12
|
+
readonly iconClassName?: string | undefined;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface PluginUiProjectNameProps {
|
|
16
|
+
readonly projectRef: { readonly environmentId: string; readonly projectId: string } | null;
|
|
17
|
+
readonly fallbackName?: string | undefined;
|
|
18
|
+
readonly className?: string | undefined;
|
|
19
|
+
readonly iconClassName?: string | undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface PluginUiProviderNameProps {
|
|
23
|
+
readonly environmentId: string | null;
|
|
24
|
+
readonly instanceId: string;
|
|
25
|
+
readonly fallbackName?: string | undefined;
|
|
26
|
+
readonly className?: string | undefined;
|
|
27
|
+
readonly iconClassName?: string | undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface PluginUiThreadNameProps {
|
|
31
|
+
readonly threadRef: { readonly environmentId: string; readonly threadId: string } | null;
|
|
32
|
+
readonly fallbackName?: string | undefined;
|
|
33
|
+
readonly className?: string | undefined;
|
|
34
|
+
readonly iconClassName?: string | undefined;
|
|
35
|
+
readonly textClassName?: string | undefined;
|
|
36
|
+
/** 工具摘要只有名字与图标,不重复所在行已经给出的状态。 */
|
|
37
|
+
readonly showStatus?: boolean | undefined;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** 插件:门面图标 + 插件显示名(随界面语言),按 id 在所在机器上查。 */
|
|
41
|
+
export interface PluginUiPluginNameProps {
|
|
42
|
+
readonly environmentId: string | null;
|
|
43
|
+
readonly pluginId: string;
|
|
44
|
+
readonly fallbackName?: string | undefined;
|
|
45
|
+
readonly className?: string | undefined;
|
|
46
|
+
readonly iconClassName?: string | undefined;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** 工具调用摘要要点名的实体。机器字段缺席时,由当前会话所属机器补齐。 */
|
|
50
|
+
export type PluginUiEntityReference =
|
|
51
|
+
| {
|
|
52
|
+
readonly kind: "thread";
|
|
53
|
+
readonly threadId: string;
|
|
54
|
+
readonly environmentId?: string | undefined;
|
|
55
|
+
readonly fallbackName?: string | undefined;
|
|
56
|
+
}
|
|
57
|
+
| {
|
|
58
|
+
readonly kind: "machine";
|
|
59
|
+
readonly environmentId: string;
|
|
60
|
+
readonly fallbackName?: string | undefined;
|
|
61
|
+
}
|
|
62
|
+
| {
|
|
63
|
+
readonly kind: "project";
|
|
64
|
+
readonly projectId: string;
|
|
65
|
+
readonly environmentId?: string | undefined;
|
|
66
|
+
readonly fallbackName?: string | undefined;
|
|
67
|
+
}
|
|
68
|
+
| {
|
|
69
|
+
readonly kind: "provider";
|
|
70
|
+
readonly instanceId: string;
|
|
71
|
+
readonly environmentId?: string | undefined;
|
|
72
|
+
readonly fallbackName?: string | undefined;
|
|
73
|
+
};
|