@promptbook/javascript 0.111.0-7 → 0.112.0-11
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/esm/index.es.js +14 -7
- package/esm/index.es.js.map +1 -1
- package/esm/src/_packages/components.index.d.ts +2 -0
- package/esm/src/_packages/core.index.d.ts +26 -0
- package/esm/src/_packages/markdown-utils.index.d.ts +5 -5
- package/esm/src/_packages/types.index.d.ts +250 -228
- package/esm/src/_packages/utils.index.d.ts +2 -0
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +4 -1
- package/esm/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -1
- package/esm/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +2 -2
- package/esm/src/book-2.0/agent-source/createAgentModelRequirements.writing.test.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.knowledge.test.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/createTeamToolName.d.ts +12 -0
- package/esm/src/book-2.0/agent-source/extractOpenTeacherInstructions.d.ts +12 -0
- package/esm/src/book-2.0/agent-source/extractOpenTeacherInstructions.test.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/parseAgentSourcePrelude.d.ts +38 -0
- package/esm/src/book-2.0/agent-source/parseAgentSourceWithCommitments.d.ts +3 -0
- package/esm/src/book-2.0/agent-source/parseAgentSourceWithCommitments.title.test.d.ts +1 -0
- package/esm/src/book-2.0/agent-source/pseudoAgentReferences.d.ts +110 -0
- package/esm/src/book-2.0/agent-source/removeCommentsFromSystemMessage.d.ts +2 -2
- package/esm/src/book-components/BookEditor/BookEditor.d.ts +15 -0
- package/esm/src/book-components/BookEditor/BookEditorActionbar.d.ts +2 -0
- package/esm/src/book-components/BookEditor/BookEditorMonacoConstants.d.ts +1 -0
- package/esm/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +14 -7
- package/esm/src/book-components/BookEditor/BookEditorMonacoTokenization.test.d.ts +1 -0
- package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.d.ts +28 -0
- package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.test.d.ts +1 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +27 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoLanguage.test.d.ts +1 -0
- package/esm/src/book-components/Chat/AgentChat/AgentChatProps.d.ts +5 -0
- package/esm/src/book-components/Chat/Chat/ChatActionsBar.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/ChatInputArea.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/ChatInputArea.test.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +6 -1
- package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +3 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +56 -0
- package/esm/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +11 -0
- package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +32 -0
- package/esm/src/book-components/Chat/Chat/chatCssClassNames.d.ts +41 -0
- package/esm/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +44 -0
- package/esm/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +36 -0
- package/esm/src/book-components/Chat/CodeBlock/CodeBlock.d.ts +5 -0
- package/esm/src/book-components/Chat/CodeBlock/resolveCodeBlockLanguage.d.ts +18 -0
- package/esm/src/book-components/Chat/CodeBlock/resolveCodeBlockLanguage.test.d.ts +1 -0
- package/esm/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +16 -0
- package/esm/src/book-components/Chat/hooks/useChatAutoScroll.d.ts +1 -1
- package/esm/src/book-components/Chat/hooks/useChatAutoScroll.test.d.ts +1 -0
- package/esm/src/book-components/Chat/types/ChatMessage.d.ts +16 -0
- package/esm/src/book-components/Chat/utils/ChatPersistence.d.ts +16 -0
- package/esm/src/book-components/Chat/utils/ChatPersistence.test.d.ts +4 -0
- package/esm/src/book-components/Chat/utils/createTeamToolNameFromUrl.d.ts +2 -2
- package/esm/src/book-components/Chat/utils/parseMessageButtons.d.ts +22 -5
- package/esm/src/book-components/Chat/utils/parseMessageButtons.test.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/resolveToolCallFromChatMessages.d.ts +13 -0
- package/esm/src/book-components/Chat/utils/resolveToolCallState.d.ts +10 -0
- package/esm/src/book-components/Chat/utils/sanitizeStreamingMessageContent.d.ts +29 -1
- package/esm/src/book-components/Chat/utils/splitMessageContentIntoSegments.d.ts +16 -3
- package/esm/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +24 -0
- package/esm/src/book-components/Chat/utils/thinkingMessageVariants.test.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/RunBrowserToolResult.d.ts +50 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/TeamToolResult.d.ts +30 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/extractSearchResults.d.ts +19 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/getToolCallResultDate.d.ts +9 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/getToolCallTimestamp.d.ts +9 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/parseRunBrowserToolResult.d.ts +10 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/parseTeamToolResult.d.ts +10 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/parseToolCallArguments.d.ts +10 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/parseToolCallResult.d.ts +10 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing/resolveRunBrowserArtifactUrl.d.ts +8 -0
- package/esm/src/book-components/Chat/utils/toolCallParsing.d.ts +10 -68
- package/esm/src/book-components/Chat/utils/toolCallParsing.test.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/walletCredentialToolCall.d.ts +52 -0
- package/esm/src/book-components/Chat/utils/walletCredentialToolCall.test.d.ts +1 -0
- package/esm/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +14 -0
- package/esm/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +3 -0
- package/esm/src/book-components/_common/MonacoEditorWithShadowDom.d.ts +17 -0
- package/esm/src/book-components/icons/ArrowIcon.d.ts +30 -5
- package/esm/src/book-components/icons/SolidArrowButton.d.ts +28 -0
- package/esm/src/book-components/icons/StopIcon.d.ts +8 -0
- package/esm/src/cli/cli-commands/coder/find-fresh-emoji-tag.d.ts +14 -0
- package/esm/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +14 -0
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +14 -0
- package/esm/src/cli/cli-commands/coder/run.d.ts +14 -0
- package/esm/src/cli/cli-commands/coder/verify.d.ts +14 -0
- package/esm/src/cli/cli-commands/coder.d.ts +21 -0
- package/esm/src/collection/agent-collection/CreateAgentInput.d.ts +59 -0
- package/esm/src/collection/agent-collection/CreateAgentInput.test.d.ts +1 -0
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +52 -8
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +6 -3
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +36 -0
- package/esm/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -3
- package/esm/src/commitments/MEMORY/MEMORY.d.ts +4 -59
- package/esm/src/commitments/MEMORY/MemoryToolNames.d.ts +11 -0
- package/esm/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +149 -0
- package/esm/src/commitments/MEMORY/createMemorySystemMessage.d.ts +6 -0
- package/esm/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +8 -0
- package/esm/src/commitments/MEMORY/createMemoryTools.d.ts +14 -0
- package/esm/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +6 -0
- package/esm/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +17 -0
- package/esm/src/commitments/MEMORY/getMemoryToolTitles.d.ts +7 -0
- package/esm/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +61 -0
- package/esm/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +8 -0
- package/esm/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +13 -0
- package/esm/src/commitments/MESSAGE/InternalMessageCommitmentDefinition.d.ts +33 -0
- package/esm/src/commitments/MESSAGE/MESSAGE.d.ts +2 -2
- package/esm/src/commitments/META/META.d.ts +4 -0
- package/esm/src/commitments/META_DOMAIN/META_DOMAIN.d.ts +33 -0
- package/esm/src/commitments/META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER.d.ts +33 -0
- package/esm/src/commitments/META_VOICE/META_VOICE.d.ts +39 -0
- package/esm/src/commitments/SAMPLE/SAMPLE.d.ts +13 -13
- package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +1 -1
- package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +10 -0
- package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts +1 -0
- package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +4 -11
- package/esm/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts +1 -0
- package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +21 -0
- package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts +1 -0
- package/esm/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +2 -7
- package/esm/src/commitments/USE_POPUP/USE_POPUP.d.ts +49 -0
- package/esm/src/commitments/USE_PRIVACY/USE_PRIVACY.d.ts +39 -0
- package/esm/src/commitments/USE_PRIVACY/USE_PRIVACY.test.d.ts +1 -0
- package/esm/src/commitments/USE_PROJECT/USE_PROJECT.d.ts +42 -0
- package/esm/src/commitments/USE_PROJECT/USE_PROJECT.test.d.ts +1 -0
- package/esm/src/commitments/USE_PROJECT/UseProjectToolNames.d.ts +13 -0
- package/esm/src/commitments/USE_PROJECT/UseProjectWallet.d.ts +9 -0
- package/esm/src/commitments/USE_PROJECT/callGitHubApi.d.ts +69 -0
- package/esm/src/commitments/USE_PROJECT/createUseProjectToolFunctions.d.ts +8 -0
- package/esm/src/commitments/USE_PROJECT/createUseProjectTools.d.ts +7 -0
- package/esm/src/commitments/USE_PROJECT/getUseProjectToolTitles.d.ts +7 -0
- package/esm/src/commitments/USE_PROJECT/normalizeConfiguredProjects.d.ts +16 -0
- package/esm/src/commitments/USE_PROJECT/normalizeOptionalToolText.d.ts +12 -0
- package/esm/src/commitments/USE_PROJECT/projectReference.d.ts +52 -0
- package/esm/src/commitments/USE_PROJECT/projectReference.test.d.ts +1 -0
- package/esm/src/commitments/USE_PROJECT/resolveUseProjectToolRuntimeOrWalletCredentialResult.d.ts +34 -0
- package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +41 -0
- package/esm/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts +1 -0
- package/esm/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +9 -0
- package/esm/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +12 -0
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +9 -0
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +90 -0
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +41 -0
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts +1 -0
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +6 -0
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +8 -0
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +7 -0
- package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +17 -0
- package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +34 -0
- package/esm/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +8 -0
- package/esm/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +13 -0
- package/esm/src/commitments/WALLET/WALLET.d.ts +24 -0
- package/esm/src/commitments/WALLET/WALLET.test.d.ts +1 -0
- package/esm/src/commitments/WALLET/WalletToolNames.d.ts +12 -0
- package/esm/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +163 -0
- package/esm/src/commitments/WALLET/createWalletSystemMessage.d.ts +6 -0
- package/esm/src/commitments/WALLET/createWalletToolFunctions.d.ts +8 -0
- package/esm/src/commitments/WALLET/createWalletTools.d.ts +7 -0
- package/esm/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +6 -0
- package/esm/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +16 -0
- package/esm/src/commitments/WALLET/getWalletToolTitles.d.ts +7 -0
- package/esm/src/commitments/WALLET/parseWalletToolArgs.d.ts +51 -0
- package/esm/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +8 -0
- package/esm/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +13 -0
- package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +29 -0
- package/esm/src/commitments/WRITING_SAMPLE/WRITING_SAMPLE.d.ts +29 -0
- package/esm/src/commitments/_base/BaseCommitmentDefinition.d.ts +12 -0
- package/esm/src/commitments/_base/CommitmentDefinition.d.ts +23 -0
- package/esm/src/commitments/_common/createWritingCommitmentSections.d.ts +19 -0
- package/esm/src/commitments/_common/getGroupedCommitmentDefinitions.writing.test.d.ts +1 -0
- package/esm/src/commitments/_common/toolExecutionEnvelope.d.ts +22 -0
- package/esm/src/commitments/_common/toolRuntimeContext.d.ts +90 -0
- package/esm/src/commitments/index.d.ts +12 -1
- package/esm/src/config.d.ts +3 -0
- package/esm/src/errors/0-index.d.ts +3 -0
- package/esm/src/errors/ConflictError.d.ts +9 -0
- package/esm/src/execution/LlmExecutionTools.d.ts +12 -1
- package/esm/src/execution/Usage.d.ts +4 -0
- package/esm/src/execution/utils/usageToHuman.d.ts +1 -0
- package/esm/src/file-security-checkers/FileSecurityCheckResult.d.ts +32 -0
- package/esm/src/file-security-checkers/FileSecurityChecker.d.ts +34 -0
- package/esm/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.d.ts +36 -0
- package/esm/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.test.d.ts +1 -0
- package/esm/src/llm-providers/agent/Agent.d.ts +2 -2
- package/esm/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +2 -2
- package/esm/src/llm-providers/agent/RemoteAgent.d.ts +2 -1
- package/esm/src/llm-providers/agent/self-learning/SelfLearningManager.test.d.ts +1 -0
- package/esm/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.d.ts +3 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +33 -3
- package/esm/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +2 -2
- package/esm/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +2 -2
- package/esm/src/llm-providers/openai/computeOpenAiUsage.d.ts +3 -1
- package/esm/src/playground/playground.d.ts +1 -0
- package/esm/src/speech-recognition/OpenAiSpeechRecognition.d.ts +49 -1
- package/esm/src/types/SpeechRecognition.d.ts +14 -0
- package/esm/src/types/ToolCall.d.ts +56 -0
- package/esm/src/types/number_usd.d.ts +110 -0
- package/esm/src/types/string_filename.d.ts +39 -0
- package/esm/src/types/string_knowledge_source_content.d.ts +29 -0
- package/esm/src/types/string_markdown.d.ts +138 -0
- package/esm/src/types/string_parameter_name.d.ts +170 -0
- package/esm/src/types/string_person_fullname.d.ts +85 -0
- package/esm/src/types/string_sha256.d.ts +44 -0
- package/esm/src/types/string_token.d.ts +58 -0
- package/esm/src/types/string_url.d.ts +146 -0
- package/esm/src/types/typeAliases.d.ts +9 -741
- package/esm/src/utils/chat/chatAttachments/appendChatAttachmentContext.d.ts +10 -0
- package/esm/src/utils/chat/chatAttachments/appendChatAttachmentContextWithContent.d.ts +14 -0
- package/esm/src/utils/chat/chatAttachments/appendChatContextSections.d.ts +6 -0
- package/esm/src/utils/chat/chatAttachments/formatChatAttachmentContentContext.d.ts +9 -0
- package/esm/src/utils/chat/chatAttachments/formatChatAttachmentContext.d.ts +9 -0
- package/esm/src/utils/chat/chatAttachments/normalizeChatAttachments.d.ts +11 -0
- package/esm/src/utils/chat/chatAttachments/resolveChatAttachmentContent.d.ts +11 -0
- package/esm/src/utils/chat/chatAttachments/resolveChatAttachmentContents.d.ts +10 -0
- package/esm/src/utils/chat/chatAttachments.d.ts +54 -0
- package/esm/src/utils/chat/chatAttachments.test.d.ts +1 -0
- package/esm/src/utils/chat/constants.d.ts +21 -0
- package/esm/src/utils/chat/decodeChatStreamWhitespaceFromTransport.d.ts +7 -0
- package/esm/src/utils/chat/encodeChatStreamWhitespaceForTransport.d.ts +7 -0
- package/esm/src/utils/chat/escapeRegExp.d.ts +6 -0
- package/esm/src/utils/database/uniqueConstraint.d.ts +28 -0
- package/esm/src/utils/files/decodeAttachmentAsText.d.ts +81 -0
- package/esm/src/utils/files/decodeAttachmentAsText.test.d.ts +1 -0
- package/esm/src/utils/files/readResponseBytes.d.ts +14 -0
- package/esm/src/utils/random/EnglishNamePool.d.ts +9 -1
- package/esm/src/utils/toolCalls/getToolCallIdentity.d.ts +1 -1
- package/esm/src/utils/toolCalls/mergeToolCalls.d.ts +12 -0
- package/esm/src/utils/toolCalls/resolveToolCallIdempotencyKey.d.ts +10 -0
- package/esm/src/utils/validators/url/extractUrlsFromText.d.ts +8 -0
- package/esm/src/utils/validators/url/extractUrlsFromText.test.d.ts +1 -0
- package/esm/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +12 -1
- package/esm/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +8 -2
- package/esm/src/utils/validators/url/normalizeDomainForMatching.d.ts +11 -0
- package/esm/src/utils/validators/url/normalizeDomainForMatching.test.d.ts +1 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +14 -7
- package/umd/index.umd.js.map +1 -1
- package/umd/src/_packages/components.index.d.ts +2 -0
- package/umd/src/_packages/core.index.d.ts +26 -0
- package/umd/src/_packages/markdown-utils.index.d.ts +5 -5
- package/umd/src/_packages/types.index.d.ts +250 -228
- package/umd/src/_packages/utils.index.d.ts +2 -0
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +4 -1
- package/umd/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -1
- package/umd/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +2 -2
- package/umd/src/book-2.0/agent-source/createAgentModelRequirements.writing.test.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.knowledge.test.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/createTeamToolName.d.ts +12 -0
- package/umd/src/book-2.0/agent-source/extractOpenTeacherInstructions.d.ts +12 -0
- package/umd/src/book-2.0/agent-source/extractOpenTeacherInstructions.test.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/parseAgentSourcePrelude.d.ts +38 -0
- package/umd/src/book-2.0/agent-source/parseAgentSourceWithCommitments.d.ts +3 -0
- package/umd/src/book-2.0/agent-source/parseAgentSourceWithCommitments.title.test.d.ts +1 -0
- package/umd/src/book-2.0/agent-source/pseudoAgentReferences.d.ts +110 -0
- package/umd/src/book-2.0/agent-source/removeCommentsFromSystemMessage.d.ts +2 -2
- package/umd/src/book-components/BookEditor/BookEditor.d.ts +15 -0
- package/umd/src/book-components/BookEditor/BookEditorActionbar.d.ts +2 -0
- package/umd/src/book-components/BookEditor/BookEditorMonacoConstants.d.ts +1 -0
- package/umd/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +14 -7
- package/umd/src/book-components/BookEditor/BookEditorMonacoTokenization.test.d.ts +1 -0
- package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.d.ts +28 -0
- package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.test.d.ts +1 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +27 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.test.d.ts +1 -0
- package/umd/src/book-components/Chat/AgentChat/AgentChatProps.d.ts +5 -0
- package/umd/src/book-components/Chat/Chat/ChatActionsBar.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/ChatInputArea.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/ChatInputArea.test.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +6 -1
- package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +3 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +56 -0
- package/umd/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +11 -0
- package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +32 -0
- package/umd/src/book-components/Chat/Chat/chatCssClassNames.d.ts +41 -0
- package/umd/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +44 -0
- package/umd/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +36 -0
- package/umd/src/book-components/Chat/CodeBlock/CodeBlock.d.ts +5 -0
- package/umd/src/book-components/Chat/CodeBlock/resolveCodeBlockLanguage.d.ts +18 -0
- package/umd/src/book-components/Chat/CodeBlock/resolveCodeBlockLanguage.test.d.ts +1 -0
- package/umd/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +16 -0
- package/umd/src/book-components/Chat/hooks/useChatAutoScroll.d.ts +1 -1
- package/umd/src/book-components/Chat/hooks/useChatAutoScroll.test.d.ts +1 -0
- package/umd/src/book-components/Chat/types/ChatMessage.d.ts +16 -0
- package/umd/src/book-components/Chat/utils/ChatPersistence.d.ts +16 -0
- package/umd/src/book-components/Chat/utils/ChatPersistence.test.d.ts +4 -0
- package/umd/src/book-components/Chat/utils/createTeamToolNameFromUrl.d.ts +2 -2
- package/umd/src/book-components/Chat/utils/parseMessageButtons.d.ts +22 -5
- package/umd/src/book-components/Chat/utils/parseMessageButtons.test.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/resolveToolCallFromChatMessages.d.ts +13 -0
- package/umd/src/book-components/Chat/utils/resolveToolCallState.d.ts +10 -0
- package/umd/src/book-components/Chat/utils/sanitizeStreamingMessageContent.d.ts +29 -1
- package/umd/src/book-components/Chat/utils/splitMessageContentIntoSegments.d.ts +16 -3
- package/umd/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +24 -0
- package/umd/src/book-components/Chat/utils/thinkingMessageVariants.test.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/RunBrowserToolResult.d.ts +50 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/TeamToolResult.d.ts +30 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/extractSearchResults.d.ts +19 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/getToolCallResultDate.d.ts +9 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/getToolCallTimestamp.d.ts +9 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/parseRunBrowserToolResult.d.ts +10 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/parseTeamToolResult.d.ts +10 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/parseToolCallArguments.d.ts +10 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/parseToolCallResult.d.ts +10 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing/resolveRunBrowserArtifactUrl.d.ts +8 -0
- package/umd/src/book-components/Chat/utils/toolCallParsing.d.ts +10 -68
- package/umd/src/book-components/Chat/utils/toolCallParsing.test.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/walletCredentialToolCall.d.ts +52 -0
- package/umd/src/book-components/Chat/utils/walletCredentialToolCall.test.d.ts +1 -0
- package/umd/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +14 -0
- package/umd/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +3 -0
- package/umd/src/book-components/_common/MonacoEditorWithShadowDom.d.ts +17 -0
- package/umd/src/book-components/icons/ArrowIcon.d.ts +30 -5
- package/umd/src/book-components/icons/SolidArrowButton.d.ts +28 -0
- package/umd/src/book-components/icons/StopIcon.d.ts +8 -0
- package/umd/src/cli/cli-commands/coder/find-fresh-emoji-tag.d.ts +14 -0
- package/umd/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +14 -0
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +14 -0
- package/umd/src/cli/cli-commands/coder/run.d.ts +14 -0
- package/umd/src/cli/cli-commands/coder/verify.d.ts +14 -0
- package/umd/src/cli/cli-commands/coder.d.ts +21 -0
- package/umd/src/collection/agent-collection/CreateAgentInput.d.ts +59 -0
- package/umd/src/collection/agent-collection/CreateAgentInput.test.d.ts +1 -0
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +52 -8
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +6 -3
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +36 -0
- package/umd/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -3
- package/umd/src/commitments/MEMORY/MEMORY.d.ts +4 -59
- package/umd/src/commitments/MEMORY/MemoryToolNames.d.ts +11 -0
- package/umd/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +149 -0
- package/umd/src/commitments/MEMORY/createMemorySystemMessage.d.ts +6 -0
- package/umd/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +8 -0
- package/umd/src/commitments/MEMORY/createMemoryTools.d.ts +14 -0
- package/umd/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +6 -0
- package/umd/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +17 -0
- package/umd/src/commitments/MEMORY/getMemoryToolTitles.d.ts +7 -0
- package/umd/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +61 -0
- package/umd/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +8 -0
- package/umd/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +13 -0
- package/umd/src/commitments/MESSAGE/InternalMessageCommitmentDefinition.d.ts +33 -0
- package/umd/src/commitments/MESSAGE/MESSAGE.d.ts +2 -2
- package/umd/src/commitments/META/META.d.ts +4 -0
- package/umd/src/commitments/META_DOMAIN/META_DOMAIN.d.ts +33 -0
- package/umd/src/commitments/META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER.d.ts +33 -0
- package/umd/src/commitments/META_VOICE/META_VOICE.d.ts +39 -0
- package/umd/src/commitments/SAMPLE/SAMPLE.d.ts +13 -13
- package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +1 -1
- package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +10 -0
- package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts +1 -0
- package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +4 -11
- package/umd/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts +1 -0
- package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +21 -0
- package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts +1 -0
- package/umd/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +2 -7
- package/umd/src/commitments/USE_POPUP/USE_POPUP.d.ts +49 -0
- package/umd/src/commitments/USE_PRIVACY/USE_PRIVACY.d.ts +39 -0
- package/umd/src/commitments/USE_PRIVACY/USE_PRIVACY.test.d.ts +1 -0
- package/umd/src/commitments/USE_PROJECT/USE_PROJECT.d.ts +42 -0
- package/umd/src/commitments/USE_PROJECT/USE_PROJECT.test.d.ts +1 -0
- package/umd/src/commitments/USE_PROJECT/UseProjectToolNames.d.ts +13 -0
- package/umd/src/commitments/USE_PROJECT/UseProjectWallet.d.ts +9 -0
- package/umd/src/commitments/USE_PROJECT/callGitHubApi.d.ts +69 -0
- package/umd/src/commitments/USE_PROJECT/createUseProjectToolFunctions.d.ts +8 -0
- package/umd/src/commitments/USE_PROJECT/createUseProjectTools.d.ts +7 -0
- package/umd/src/commitments/USE_PROJECT/getUseProjectToolTitles.d.ts +7 -0
- package/umd/src/commitments/USE_PROJECT/normalizeConfiguredProjects.d.ts +16 -0
- package/umd/src/commitments/USE_PROJECT/normalizeOptionalToolText.d.ts +12 -0
- package/umd/src/commitments/USE_PROJECT/projectReference.d.ts +52 -0
- package/umd/src/commitments/USE_PROJECT/projectReference.test.d.ts +1 -0
- package/umd/src/commitments/USE_PROJECT/resolveUseProjectToolRuntimeOrWalletCredentialResult.d.ts +34 -0
- package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +41 -0
- package/umd/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts +1 -0
- package/umd/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +9 -0
- package/umd/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +12 -0
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +9 -0
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +90 -0
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +41 -0
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts +1 -0
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +6 -0
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +8 -0
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +7 -0
- package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +17 -0
- package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +34 -0
- package/umd/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +8 -0
- package/umd/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +13 -0
- package/umd/src/commitments/WALLET/WALLET.d.ts +24 -0
- package/umd/src/commitments/WALLET/WALLET.test.d.ts +1 -0
- package/umd/src/commitments/WALLET/WalletToolNames.d.ts +12 -0
- package/umd/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +163 -0
- package/umd/src/commitments/WALLET/createWalletSystemMessage.d.ts +6 -0
- package/umd/src/commitments/WALLET/createWalletToolFunctions.d.ts +8 -0
- package/umd/src/commitments/WALLET/createWalletTools.d.ts +7 -0
- package/umd/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +6 -0
- package/umd/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +16 -0
- package/umd/src/commitments/WALLET/getWalletToolTitles.d.ts +7 -0
- package/umd/src/commitments/WALLET/parseWalletToolArgs.d.ts +51 -0
- package/umd/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +8 -0
- package/umd/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +13 -0
- package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +29 -0
- package/umd/src/commitments/WRITING_SAMPLE/WRITING_SAMPLE.d.ts +29 -0
- package/umd/src/commitments/_base/BaseCommitmentDefinition.d.ts +12 -0
- package/umd/src/commitments/_base/CommitmentDefinition.d.ts +23 -0
- package/umd/src/commitments/_common/createWritingCommitmentSections.d.ts +19 -0
- package/umd/src/commitments/_common/getGroupedCommitmentDefinitions.writing.test.d.ts +1 -0
- package/umd/src/commitments/_common/toolExecutionEnvelope.d.ts +22 -0
- package/umd/src/commitments/_common/toolRuntimeContext.d.ts +90 -0
- package/umd/src/commitments/index.d.ts +12 -1
- package/umd/src/config.d.ts +3 -0
- package/umd/src/errors/0-index.d.ts +3 -0
- package/umd/src/errors/ConflictError.d.ts +9 -0
- package/umd/src/execution/LlmExecutionTools.d.ts +12 -1
- package/umd/src/execution/Usage.d.ts +4 -0
- package/umd/src/execution/utils/usageToHuman.d.ts +1 -0
- package/umd/src/file-security-checkers/FileSecurityCheckResult.d.ts +32 -0
- package/umd/src/file-security-checkers/FileSecurityChecker.d.ts +34 -0
- package/umd/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.d.ts +36 -0
- package/umd/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.test.d.ts +1 -0
- package/umd/src/llm-providers/agent/Agent.d.ts +2 -2
- package/umd/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +2 -2
- package/umd/src/llm-providers/agent/RemoteAgent.d.ts +2 -1
- package/umd/src/llm-providers/agent/self-learning/SelfLearningManager.test.d.ts +1 -0
- package/umd/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.d.ts +3 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +33 -3
- package/umd/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +2 -2
- package/umd/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +2 -2
- package/umd/src/llm-providers/openai/computeOpenAiUsage.d.ts +3 -1
- package/umd/src/playground/playground.d.ts +1 -0
- package/umd/src/speech-recognition/OpenAiSpeechRecognition.d.ts +49 -1
- package/umd/src/types/SpeechRecognition.d.ts +14 -0
- package/umd/src/types/ToolCall.d.ts +56 -0
- package/umd/src/types/number_usd.d.ts +110 -0
- package/umd/src/types/string_filename.d.ts +39 -0
- package/umd/src/types/string_knowledge_source_content.d.ts +29 -0
- package/umd/src/types/string_markdown.d.ts +138 -0
- package/umd/src/types/string_parameter_name.d.ts +170 -0
- package/umd/src/types/string_person_fullname.d.ts +85 -0
- package/umd/src/types/string_sha256.d.ts +44 -0
- package/umd/src/types/string_token.d.ts +58 -0
- package/umd/src/types/string_url.d.ts +146 -0
- package/umd/src/types/typeAliases.d.ts +9 -741
- package/umd/src/utils/chat/chatAttachments/appendChatAttachmentContext.d.ts +10 -0
- package/umd/src/utils/chat/chatAttachments/appendChatAttachmentContextWithContent.d.ts +14 -0
- package/umd/src/utils/chat/chatAttachments/appendChatContextSections.d.ts +6 -0
- package/umd/src/utils/chat/chatAttachments/formatChatAttachmentContentContext.d.ts +9 -0
- package/umd/src/utils/chat/chatAttachments/formatChatAttachmentContext.d.ts +9 -0
- package/umd/src/utils/chat/chatAttachments/normalizeChatAttachments.d.ts +11 -0
- package/umd/src/utils/chat/chatAttachments/resolveChatAttachmentContent.d.ts +11 -0
- package/umd/src/utils/chat/chatAttachments/resolveChatAttachmentContents.d.ts +10 -0
- package/umd/src/utils/chat/chatAttachments.d.ts +54 -0
- package/umd/src/utils/chat/chatAttachments.test.d.ts +1 -0
- package/umd/src/utils/chat/constants.d.ts +21 -0
- package/umd/src/utils/chat/decodeChatStreamWhitespaceFromTransport.d.ts +7 -0
- package/umd/src/utils/chat/encodeChatStreamWhitespaceForTransport.d.ts +7 -0
- package/umd/src/utils/chat/escapeRegExp.d.ts +6 -0
- package/umd/src/utils/database/uniqueConstraint.d.ts +28 -0
- package/umd/src/utils/files/decodeAttachmentAsText.d.ts +81 -0
- package/umd/src/utils/files/decodeAttachmentAsText.test.d.ts +1 -0
- package/umd/src/utils/files/readResponseBytes.d.ts +14 -0
- package/umd/src/utils/random/EnglishNamePool.d.ts +9 -1
- package/umd/src/utils/toolCalls/getToolCallIdentity.d.ts +1 -1
- package/umd/src/utils/toolCalls/mergeToolCalls.d.ts +12 -0
- package/umd/src/utils/toolCalls/resolveToolCallIdempotencyKey.d.ts +10 -0
- package/umd/src/utils/validators/url/extractUrlsFromText.d.ts +8 -0
- package/umd/src/utils/validators/url/extractUrlsFromText.test.d.ts +1 -0
- package/umd/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +12 -1
- package/umd/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +8 -2
- package/umd/src/utils/validators/url/normalizeDomainForMatching.d.ts +11 -0
- package/umd/src/utils/validators/url/normalizeDomainForMatching.test.d.ts +1 -0
- package/umd/src/version.d.ts +1 -1
|
@@ -19,17 +19,65 @@ export type OpenAiSpeechRecognitionOptions = {
|
|
|
19
19
|
export declare class OpenAiSpeechRecognition implements SpeechRecognition {
|
|
20
20
|
private readonly options;
|
|
21
21
|
private mediaRecorder;
|
|
22
|
+
private mediaStream;
|
|
22
23
|
private audioContext;
|
|
24
|
+
private mediaStreamSource;
|
|
23
25
|
private analyser;
|
|
24
|
-
private
|
|
26
|
+
private silenceCheckAnimationFrameId;
|
|
25
27
|
private audioChunks;
|
|
26
28
|
private callbacks;
|
|
27
29
|
private _state;
|
|
30
|
+
private pendingStopDuringStart;
|
|
31
|
+
private isStopping;
|
|
32
|
+
private recordingStartedAt;
|
|
33
|
+
private lastSpeechDetectedAt;
|
|
34
|
+
private ambientNoiseLevel;
|
|
35
|
+
private voiceLevelMultiplier;
|
|
36
|
+
private silenceAutoStopDelayMs;
|
|
28
37
|
get state(): SpeechRecognitionState;
|
|
29
38
|
constructor(options?: OpenAiSpeechRecognitionOptions);
|
|
30
39
|
$start(options?: SpeechRecognitionStartOptions): Promise<void>;
|
|
31
40
|
$stop(): void;
|
|
32
41
|
private transcribe;
|
|
42
|
+
/**
|
|
43
|
+
* Handles `MediaRecorder.onstop` by releasing audio resources and forwarding the clip to transcription.
|
|
44
|
+
*
|
|
45
|
+
* @param language Optional language hint for Whisper.
|
|
46
|
+
*/
|
|
47
|
+
private handleRecorderStop;
|
|
48
|
+
/**
|
|
49
|
+
* Starts continuous silence detection and auto-stops recording shortly after speech ends.
|
|
50
|
+
*/
|
|
51
|
+
private startSilenceDetection;
|
|
52
|
+
/**
|
|
53
|
+
* Stops the silence-detection animation loop.
|
|
54
|
+
*/
|
|
55
|
+
private stopSilenceDetection;
|
|
56
|
+
/**
|
|
57
|
+
* Measures current voice intensity from the waveform (`0` silent .. `1` loud).
|
|
58
|
+
*
|
|
59
|
+
* @param sampleBuffer Buffer reused across animation frames.
|
|
60
|
+
* @returns RMS-based volume level.
|
|
61
|
+
*/
|
|
62
|
+
private measureVoiceLevel;
|
|
63
|
+
/**
|
|
64
|
+
* Returns an adaptive speech threshold based on recently observed ambient noise.
|
|
65
|
+
*/
|
|
66
|
+
private resolveAdaptiveVoiceThreshold;
|
|
67
|
+
/**
|
|
68
|
+
* Updates the rolling ambient noise estimate during silent frames.
|
|
69
|
+
*
|
|
70
|
+
* @param voiceLevel Observed frame loudness.
|
|
71
|
+
*/
|
|
72
|
+
private updateAmbientNoiseLevel;
|
|
73
|
+
/**
|
|
74
|
+
* Releases browser audio resources so the microphone is fully freed for other apps.
|
|
75
|
+
*/
|
|
76
|
+
private releaseRecordingResources;
|
|
77
|
+
/**
|
|
78
|
+
* Stops all microphone tracks if an active media stream exists.
|
|
79
|
+
*/
|
|
80
|
+
private stopMediaStreamTracks;
|
|
33
81
|
subscribe(callback: (event: SpeechRecognitionEvent) => void): () => void;
|
|
34
82
|
private emit;
|
|
35
83
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { string_language } from './typeAliases';
|
|
2
|
+
/**
|
|
3
|
+
* Stable speech-recognition error codes consumed by UI and telemetry.
|
|
4
|
+
*/
|
|
5
|
+
export type SpeechRecognitionErrorCode = 'permission-denied' | 'audio-capture' | 'network' | 'no-speech' | 'aborted' | 'unsupported-browser' | 'unknown';
|
|
2
6
|
/**
|
|
3
7
|
* Interface for speech-to-text recognition
|
|
4
8
|
*
|
|
@@ -36,6 +40,10 @@ export type SpeechRecognitionStartOptions = {
|
|
|
36
40
|
* @default true
|
|
37
41
|
*/
|
|
38
42
|
readonly interimResults?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Enables a more sensitive profile for quiet speech.
|
|
45
|
+
*/
|
|
46
|
+
readonly whisperMode?: boolean;
|
|
39
47
|
};
|
|
40
48
|
/**
|
|
41
49
|
* Current state of the speech recognition
|
|
@@ -46,6 +54,8 @@ export type SpeechRecognitionState = 'IDLE' | 'STARTING' | 'RECORDING' | 'TRANSC
|
|
|
46
54
|
*/
|
|
47
55
|
export type SpeechRecognitionEvent = {
|
|
48
56
|
readonly type: 'START';
|
|
57
|
+
} | {
|
|
58
|
+
readonly type: 'TRANSCRIBING';
|
|
49
59
|
} | {
|
|
50
60
|
readonly type: 'RESULT';
|
|
51
61
|
readonly text: string;
|
|
@@ -53,6 +63,10 @@ export type SpeechRecognitionEvent = {
|
|
|
53
63
|
} | {
|
|
54
64
|
readonly type: 'ERROR';
|
|
55
65
|
readonly message: string;
|
|
66
|
+
readonly code?: SpeechRecognitionErrorCode;
|
|
67
|
+
readonly providerId?: string;
|
|
68
|
+
readonly canRetry?: boolean;
|
|
69
|
+
readonly canOpenBrowserSettings?: boolean;
|
|
56
70
|
} | {
|
|
57
71
|
readonly type: 'STOP';
|
|
58
72
|
};
|
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
import type { TODO_any } from '../utils/organization/TODO_any';
|
|
2
2
|
import type { string_date_iso8601 } from './typeAliases';
|
|
3
|
+
/**
|
|
4
|
+
* Explicit lifecycle state of one tool call snapshot.
|
|
5
|
+
*/
|
|
6
|
+
export type ToolCallState = 'PENDING' | 'PARTIAL' | 'COMPLETE' | 'ERROR';
|
|
7
|
+
/**
|
|
8
|
+
* Severity level attached to one tool-call log entry.
|
|
9
|
+
*/
|
|
10
|
+
export type ToolCallLogLevel = 'info' | 'warning' | 'error';
|
|
11
|
+
/**
|
|
12
|
+
* Incremental log entry emitted while one tool call is running.
|
|
13
|
+
*
|
|
14
|
+
* These logs are designed to stream progressively so chat chips can expose
|
|
15
|
+
* partial details before the final result is available.
|
|
16
|
+
*/
|
|
17
|
+
export type ToolCallLogEntry = {
|
|
18
|
+
/**
|
|
19
|
+
* Timestamp when this log entry was observed.
|
|
20
|
+
*/
|
|
21
|
+
readonly createdAt?: string_date_iso8601;
|
|
22
|
+
/**
|
|
23
|
+
* Stable machine-friendly log kind such as `request`, `browser-action`, or `result`.
|
|
24
|
+
*/
|
|
25
|
+
readonly kind?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Severity level used by UI renderers.
|
|
28
|
+
*/
|
|
29
|
+
readonly level?: ToolCallLogLevel;
|
|
30
|
+
/**
|
|
31
|
+
* Short human-readable title for the log row.
|
|
32
|
+
*/
|
|
33
|
+
readonly title?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Human-readable message associated with the log row.
|
|
36
|
+
*/
|
|
37
|
+
readonly message?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Optional structured payload for advanced/raw inspection.
|
|
40
|
+
*/
|
|
41
|
+
readonly payload?: TODO_any;
|
|
42
|
+
};
|
|
3
43
|
/**
|
|
4
44
|
* Represents a single tool call with its inputs, outputs, and timing.
|
|
5
45
|
*
|
|
@@ -22,6 +62,18 @@ export type ToolCall = {
|
|
|
22
62
|
* Raw tool call payload from the model.
|
|
23
63
|
*/
|
|
24
64
|
readonly rawToolCall?: TODO_any;
|
|
65
|
+
/**
|
|
66
|
+
* Explicit lifecycle state of this tool call snapshot.
|
|
67
|
+
*
|
|
68
|
+
* When omitted, consumers should infer the state from available result/error data.
|
|
69
|
+
*/
|
|
70
|
+
readonly state?: ToolCallState;
|
|
71
|
+
/**
|
|
72
|
+
* Idempotency identifier that should not change between partial updates of the same tool call.
|
|
73
|
+
*
|
|
74
|
+
* @public exported from `@promptbook/types`
|
|
75
|
+
*/
|
|
76
|
+
readonly idempotencyKey?: string;
|
|
25
77
|
/**
|
|
26
78
|
* Timestamp when the tool call was initiated.
|
|
27
79
|
*/
|
|
@@ -34,6 +86,10 @@ export type ToolCall = {
|
|
|
34
86
|
* Warnings reported during tool execution.
|
|
35
87
|
*/
|
|
36
88
|
readonly warnings?: ReadonlyArray<TODO_any>;
|
|
89
|
+
/**
|
|
90
|
+
* Incremental logs observed while the tool call is running.
|
|
91
|
+
*/
|
|
92
|
+
readonly logs?: ReadonlyArray<ToolCallLogEntry>;
|
|
37
93
|
};
|
|
38
94
|
/**
|
|
39
95
|
* Breakdown of teacher-learned commitment categories for self-learning.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic helper for US Dollars
|
|
3
|
+
*/
|
|
4
|
+
export type number_usd = number;
|
|
5
|
+
/**
|
|
6
|
+
* Semantic helper for incremental IDs
|
|
7
|
+
*/
|
|
8
|
+
export type number_id = number_integer & (number_positive | 0);
|
|
9
|
+
/**
|
|
10
|
+
* Semantic helper for number of rows and columns
|
|
11
|
+
*/
|
|
12
|
+
export type number_linecol_number = number_integer & number_positive;
|
|
13
|
+
/**
|
|
14
|
+
* Semantic helper for number of tokens
|
|
15
|
+
*/
|
|
16
|
+
export type number_tokens = number_integer & (number_positive | 0);
|
|
17
|
+
/**
|
|
18
|
+
* Positive number helper.
|
|
19
|
+
*/
|
|
20
|
+
export type number_positive = number;
|
|
21
|
+
/**
|
|
22
|
+
* Negative number helper.
|
|
23
|
+
*/
|
|
24
|
+
export type number_negative = number;
|
|
25
|
+
/**
|
|
26
|
+
* Integer number helper.
|
|
27
|
+
*/
|
|
28
|
+
export type number_integer = number;
|
|
29
|
+
/**
|
|
30
|
+
* TCP/UDP port helper.
|
|
31
|
+
*/
|
|
32
|
+
export type number_port = number_positive & number_integer;
|
|
33
|
+
/**
|
|
34
|
+
* Semantic helper;
|
|
35
|
+
* Percentage from 0 to 1 (100%) (and below and above)
|
|
36
|
+
*/
|
|
37
|
+
export type number_percent = number;
|
|
38
|
+
/**
|
|
39
|
+
* Semantic helper;
|
|
40
|
+
* Model temperature
|
|
41
|
+
*/
|
|
42
|
+
export type number_model_temperature = number_percent;
|
|
43
|
+
/**
|
|
44
|
+
* Semantic helper;
|
|
45
|
+
* Seed for random generator
|
|
46
|
+
*
|
|
47
|
+
* Percentage from 0 to 1 (100%)
|
|
48
|
+
* TODO: Is seed (in OpenAI) number from 0 to 1?
|
|
49
|
+
*/
|
|
50
|
+
export type number_seed = number_percent;
|
|
51
|
+
/**
|
|
52
|
+
* Likeness of the wallpaper
|
|
53
|
+
*
|
|
54
|
+
* - 👍 is equivalent to 1
|
|
55
|
+
* - 👎 is equivalent to -1
|
|
56
|
+
* - ❤ is equivalent to more than 1
|
|
57
|
+
*/
|
|
58
|
+
export type number_likeness = number;
|
|
59
|
+
/**
|
|
60
|
+
* Milliseconds helper.
|
|
61
|
+
*/
|
|
62
|
+
export type number_milliseconds = number_integer;
|
|
63
|
+
/**
|
|
64
|
+
* Seconds helper.
|
|
65
|
+
*/
|
|
66
|
+
export type number_seconds = number;
|
|
67
|
+
/**
|
|
68
|
+
* Minutes helper.
|
|
69
|
+
*/
|
|
70
|
+
export type number_minutes = number;
|
|
71
|
+
/**
|
|
72
|
+
* Hours helper.
|
|
73
|
+
*/
|
|
74
|
+
export type number_hours = number;
|
|
75
|
+
/**
|
|
76
|
+
* Days helper.
|
|
77
|
+
*/
|
|
78
|
+
export type number_days = number;
|
|
79
|
+
/**
|
|
80
|
+
* Weeks helper.
|
|
81
|
+
*/
|
|
82
|
+
export type number_weeks = number;
|
|
83
|
+
/**
|
|
84
|
+
* Months helper.
|
|
85
|
+
*/
|
|
86
|
+
export type number_months = number;
|
|
87
|
+
/**
|
|
88
|
+
* Years helper.
|
|
89
|
+
*/
|
|
90
|
+
export type number_years = number;
|
|
91
|
+
/**
|
|
92
|
+
* Byte count helper.
|
|
93
|
+
*/
|
|
94
|
+
export type number_bytes = number_integer & number_positive;
|
|
95
|
+
/**
|
|
96
|
+
* Kilobyte count helper.
|
|
97
|
+
*/
|
|
98
|
+
export type number_kilobytes = number_positive;
|
|
99
|
+
/**
|
|
100
|
+
* Megabyte count helper.
|
|
101
|
+
*/
|
|
102
|
+
export type number_megabytes = number_positive;
|
|
103
|
+
/**
|
|
104
|
+
* Gigabyte count helper.
|
|
105
|
+
*/
|
|
106
|
+
export type number_gigabytes = number_positive;
|
|
107
|
+
/**
|
|
108
|
+
* Terabyte count helper.
|
|
109
|
+
*/
|
|
110
|
+
export type number_terabytes = number_positive;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic helper
|
|
3
|
+
*
|
|
4
|
+
* For example `"C:/Users/me/work/collboard/modules-sdk/src/colldev/commands/develop/ColldevDevelop.tsx"`
|
|
5
|
+
*/
|
|
6
|
+
export type string_absolute_filename = string;
|
|
7
|
+
/**
|
|
8
|
+
* Semantic helper
|
|
9
|
+
*
|
|
10
|
+
* For example `"./src/colldev/commands/develop/ColldevDevelop.tsx"`
|
|
11
|
+
*/
|
|
12
|
+
export type string_relative_filename = string;
|
|
13
|
+
/**
|
|
14
|
+
* Semantic helper
|
|
15
|
+
*/
|
|
16
|
+
export type string_filename = string_absolute_filename | string_relative_filename;
|
|
17
|
+
/**
|
|
18
|
+
* Semantic helper
|
|
19
|
+
*
|
|
20
|
+
* For example `"C:/Users/me/work/collboard/modules-sdk/src/colldev/commands/develop/ColldevDevelop.tsx"`
|
|
21
|
+
*/
|
|
22
|
+
export type string_absolute_dirname = string;
|
|
23
|
+
/**
|
|
24
|
+
* Semantic helper
|
|
25
|
+
*
|
|
26
|
+
* For example `"./src/colldev/commands/develop/ColldevDevelop.tsx"`
|
|
27
|
+
*/
|
|
28
|
+
export type string_relative_dirname = string;
|
|
29
|
+
/**
|
|
30
|
+
* Semantic helper
|
|
31
|
+
*/
|
|
32
|
+
export type string_dirname = string_absolute_dirname | string_relative_dirname;
|
|
33
|
+
/**
|
|
34
|
+
* Semantic helper
|
|
35
|
+
*
|
|
36
|
+
* For example `"C:/Users/me/AppData/Local/Pandoc/pandoc.exe"`
|
|
37
|
+
* For example `"C:/Program Files/LibreOffice/program/swriter.exe"`
|
|
38
|
+
*/
|
|
39
|
+
export type string_executable_path = string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { string_filename } from './string_filename';
|
|
2
|
+
import type { string_markdown } from './string_markdown';
|
|
3
|
+
import type { string_url } from './string_url';
|
|
4
|
+
/**
|
|
5
|
+
* Source of one knowledge piece.
|
|
6
|
+
*
|
|
7
|
+
* It can be a link, a relative path to file or direct text content.
|
|
8
|
+
*
|
|
9
|
+
* For example `"https://pavolhejny.com/"`
|
|
10
|
+
* For example `"./pavol-hejny-cv.pdf"`
|
|
11
|
+
* For example `"Pavol Hejný has web https://pavolhejny.com/"`
|
|
12
|
+
* For example `"Pavol Hejný is web developer and creator of Promptbook and Collboard"`
|
|
13
|
+
*
|
|
14
|
+
* Note: Distinguishes between `string_knowledge_source_content` and `string_knowledge_source_link`:
|
|
15
|
+
* `string_knowledge_source_content` refers to the actual content or source of knowledge
|
|
16
|
+
* `string_knowledge_source_link` refers to a reference or link to the knowledge source
|
|
17
|
+
*/
|
|
18
|
+
export type string_knowledge_source_content = string_knowledge_source_link | string_markdown;
|
|
19
|
+
/**
|
|
20
|
+
* One link to a knowledge source.
|
|
21
|
+
*
|
|
22
|
+
* It can be a URL or relative path.
|
|
23
|
+
*
|
|
24
|
+
* For example `"https://pavolhejny.com/"`
|
|
25
|
+
* For example `"./pavol-hejny-cv.pdf"`
|
|
26
|
+
*
|
|
27
|
+
* Note: string_knowledge_source_link refers to a reference or link to the knowledge source, while string_knowledge_source_content can be the link or the actual content.
|
|
28
|
+
*/
|
|
29
|
+
export type string_knowledge_source_link = string_url | string_filename;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic helper
|
|
3
|
+
*
|
|
4
|
+
* For example `"<div>Hello World!</div>"`
|
|
5
|
+
*/
|
|
6
|
+
export type string_html = string;
|
|
7
|
+
/**
|
|
8
|
+
* Semantic helper
|
|
9
|
+
*
|
|
10
|
+
* For example `"<foo>bar</foo>"`
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* TODO: [🎞️] Probably use some object-based method for working with XMLs
|
|
14
|
+
*/
|
|
15
|
+
export type string_xml = string;
|
|
16
|
+
/**
|
|
17
|
+
* Semantic helper
|
|
18
|
+
*
|
|
19
|
+
* For example `"**Hello** World!"`
|
|
20
|
+
*
|
|
21
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
22
|
+
*/
|
|
23
|
+
export type string_markdown = string;
|
|
24
|
+
/**
|
|
25
|
+
* Semantic helper
|
|
26
|
+
*
|
|
27
|
+
* Markdown text with exactly ONE heading on first line NO less NO more
|
|
28
|
+
*
|
|
29
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
30
|
+
*/
|
|
31
|
+
export type string_markdown_section = string;
|
|
32
|
+
/**
|
|
33
|
+
* Semantic helper
|
|
34
|
+
*
|
|
35
|
+
* Markdown without any headings like h1, h2
|
|
36
|
+
* BUT with formatting, lists, blockquotes, blocks, etc. is allowed
|
|
37
|
+
*
|
|
38
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
39
|
+
*/
|
|
40
|
+
export type string_markdown_section_content = string;
|
|
41
|
+
/**
|
|
42
|
+
* Semantic helper
|
|
43
|
+
*
|
|
44
|
+
* Markdown text without any structure like h1, h2, lists, blockquotes, blocks, etc.
|
|
45
|
+
* BUT with bold, italic, etc. is allowed
|
|
46
|
+
*
|
|
47
|
+
* For example `"**Hello** World!"`
|
|
48
|
+
*
|
|
49
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
50
|
+
*/
|
|
51
|
+
export type string_markdown_text = string;
|
|
52
|
+
/**
|
|
53
|
+
* Semantic helper
|
|
54
|
+
*
|
|
55
|
+
* Markdown code block language
|
|
56
|
+
*
|
|
57
|
+
* For example ```js -> `"js"`
|
|
58
|
+
*
|
|
59
|
+
* @public exported from `@promptbook/markdown-utils`
|
|
60
|
+
*/
|
|
61
|
+
export type string_markdown_codeblock_language = 'book' | 'markdown' | 'text' | 'javascript' | 'css' | 'json';
|
|
62
|
+
/**
|
|
63
|
+
* A URL pointing to Promptbook documentation or a specific discussion.
|
|
64
|
+
*
|
|
65
|
+
* For example: `https://github.com/webgptorg/promptbook/discussions/123`
|
|
66
|
+
*/
|
|
67
|
+
export type string_promptbook_documentation_url = `https://github.com/webgptorg/promptbook/discussions/${number | `@@${string}`}`;
|
|
68
|
+
/**
|
|
69
|
+
* Semantic helper
|
|
70
|
+
*
|
|
71
|
+
* For example `.foo{border: 1px solid red}`
|
|
72
|
+
*/
|
|
73
|
+
export type string_css = string;
|
|
74
|
+
/**
|
|
75
|
+
* Semantic helper
|
|
76
|
+
*
|
|
77
|
+
* For example `"<svg><circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /></svg>"`
|
|
78
|
+
*/
|
|
79
|
+
export type string_svg = string;
|
|
80
|
+
/**
|
|
81
|
+
* Semantic helper
|
|
82
|
+
*
|
|
83
|
+
* For example `console.info("Hello World!")` or `print("Hello World!")`
|
|
84
|
+
*/
|
|
85
|
+
export type string_script = string;
|
|
86
|
+
/**
|
|
87
|
+
* Semantic helper
|
|
88
|
+
*
|
|
89
|
+
* For example `console.info("Hello World!")`
|
|
90
|
+
*/
|
|
91
|
+
export type string_javascript = string;
|
|
92
|
+
/**
|
|
93
|
+
* Semantic helper
|
|
94
|
+
*
|
|
95
|
+
* For example `console.info("Hello World!" as string)`
|
|
96
|
+
*/
|
|
97
|
+
export type string_typescript = string;
|
|
98
|
+
/**
|
|
99
|
+
* Semantic helper for JSON strings
|
|
100
|
+
*
|
|
101
|
+
* Note: TType is a type of the JSON object inside the string
|
|
102
|
+
*
|
|
103
|
+
* For example `{"foo": "bar"}`
|
|
104
|
+
*/
|
|
105
|
+
export type string_json<TType> = string & {
|
|
106
|
+
_type: 'string_json';
|
|
107
|
+
scheme: TType;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Semantic helper
|
|
111
|
+
*
|
|
112
|
+
* For example `menu`
|
|
113
|
+
*/
|
|
114
|
+
export type string_css_class = string;
|
|
115
|
+
/**
|
|
116
|
+
* Semantic helper
|
|
117
|
+
*
|
|
118
|
+
* For example `border`
|
|
119
|
+
*/
|
|
120
|
+
export type string_css_property = string;
|
|
121
|
+
/**
|
|
122
|
+
* Semantic helper
|
|
123
|
+
*
|
|
124
|
+
* For example `"Arial, sans-serif"`
|
|
125
|
+
*/
|
|
126
|
+
export type string_fonts = string;
|
|
127
|
+
/**
|
|
128
|
+
* Semantic helper
|
|
129
|
+
*
|
|
130
|
+
* For example `13px`
|
|
131
|
+
*/
|
|
132
|
+
export type string_css_value = string | number;
|
|
133
|
+
/**
|
|
134
|
+
* Semantic helper
|
|
135
|
+
*
|
|
136
|
+
* For example `.foo`
|
|
137
|
+
*/
|
|
138
|
+
export type string_css_selector = string;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import type { TupleToUnion } from 'type-fest';
|
|
2
|
+
import { RESERVED_PARAMETER_NAMES } from '../constants';
|
|
3
|
+
import type { really_unknown } from '../utils/organization/really_unknown';
|
|
4
|
+
import { string_base_58, string_sha256 } from './string_sha256';
|
|
5
|
+
/**
|
|
6
|
+
* Semantic helper
|
|
7
|
+
*/
|
|
8
|
+
export type string_business_category_name = 'restaurant' | 'grocery' | 'person' | 'conference' | string;
|
|
9
|
+
/**
|
|
10
|
+
* Semantic helper
|
|
11
|
+
*
|
|
12
|
+
* For example `"gpt-4"`
|
|
13
|
+
*/
|
|
14
|
+
export type string_model_name = 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-16k-0613' | string;
|
|
15
|
+
/**
|
|
16
|
+
* Semantic helper
|
|
17
|
+
*
|
|
18
|
+
* For example `"How many eyes does a cat have?"`
|
|
19
|
+
*/
|
|
20
|
+
export type string_prompt = string;
|
|
21
|
+
/**
|
|
22
|
+
* Semantic helper
|
|
23
|
+
*
|
|
24
|
+
* For example `"A cat wearing a hat"`
|
|
25
|
+
*/
|
|
26
|
+
export type string_prompt_image = string;
|
|
27
|
+
/**
|
|
28
|
+
* Semantic helper
|
|
29
|
+
*
|
|
30
|
+
* For example `"A cat wearing a {item}"`
|
|
31
|
+
*/
|
|
32
|
+
export type string_template = string;
|
|
33
|
+
/**
|
|
34
|
+
* Semantic helper
|
|
35
|
+
*
|
|
36
|
+
* For example `"How many hats does the cat wear?"`
|
|
37
|
+
*/
|
|
38
|
+
export type string_text_prompt = string_prompt;
|
|
39
|
+
/**
|
|
40
|
+
* Semantic helper
|
|
41
|
+
*
|
|
42
|
+
* For example `"How many hats does the cat wear?"`
|
|
43
|
+
*/
|
|
44
|
+
export type string_chat_prompt = string_text_prompt;
|
|
45
|
+
/**
|
|
46
|
+
* Semantic helper
|
|
47
|
+
*
|
|
48
|
+
* For example `"You are an AI assistant. You are here to help me with my work."`
|
|
49
|
+
*/
|
|
50
|
+
export type string_system_message = string_text_prompt;
|
|
51
|
+
/**
|
|
52
|
+
* Semantic helper
|
|
53
|
+
*
|
|
54
|
+
* For example `"Following is a text about cats: Once upon a time there was a cat"`
|
|
55
|
+
*/
|
|
56
|
+
export type string_completion_prompt = string_text_prompt;
|
|
57
|
+
/**
|
|
58
|
+
* Semantic helper
|
|
59
|
+
*
|
|
60
|
+
* For example `"index"` or `"explanation"`
|
|
61
|
+
* Always in kebab-case
|
|
62
|
+
*/
|
|
63
|
+
export type string_page = 'index' | string;
|
|
64
|
+
/**
|
|
65
|
+
* Semantic helper
|
|
66
|
+
*
|
|
67
|
+
* For example `"a"`
|
|
68
|
+
*/
|
|
69
|
+
export type string_char = string;
|
|
70
|
+
/**
|
|
71
|
+
* Semantic helper
|
|
72
|
+
* Unique identifier of anything
|
|
73
|
+
*
|
|
74
|
+
* For example `"ainautes"`
|
|
75
|
+
*/
|
|
76
|
+
export type string_name = string;
|
|
77
|
+
/**
|
|
78
|
+
* Semantic helper
|
|
79
|
+
* Unique identifier of anything
|
|
80
|
+
*
|
|
81
|
+
* For example `"eventTitle"`
|
|
82
|
+
*/
|
|
83
|
+
export type string_parameter_name = string_name;
|
|
84
|
+
/**
|
|
85
|
+
* Semantic helper
|
|
86
|
+
* Unique identifier of parameter
|
|
87
|
+
*
|
|
88
|
+
* For example `"DevConf 2024"`
|
|
89
|
+
*/
|
|
90
|
+
export type string_parameter_value = string;
|
|
91
|
+
/**
|
|
92
|
+
* Parameters of the pipeline
|
|
93
|
+
*
|
|
94
|
+
* There are three types of parameters:
|
|
95
|
+
* - **INPUT PARAMETERs** are required to execute the pipeline.
|
|
96
|
+
* - **Intermediate parameters** are used internally in the pipeline.
|
|
97
|
+
* - **OUTPUT PARAMETERs** are not used internally in the pipeline, but are returned as the result of the pipeline execution.
|
|
98
|
+
*
|
|
99
|
+
* Note: [🚉] This is fully serializable as JSON
|
|
100
|
+
* @see https://ptbk.io/parameters
|
|
101
|
+
*/
|
|
102
|
+
export type Parameters = Exclude<Record<string_parameter_name, string_parameter_value>, ReservedParameters>;
|
|
103
|
+
/**
|
|
104
|
+
* Parameters to pass to execution of the pipeline
|
|
105
|
+
*
|
|
106
|
+
* Note: [🚉] This should be fully serializable as JSON
|
|
107
|
+
* @see https://ptbk.io/parameters
|
|
108
|
+
*/
|
|
109
|
+
export type InputParameters = Exclude<Record<string_parameter_name, really_unknown>, ReservedParameters>;
|
|
110
|
+
/**
|
|
111
|
+
* Semantic helper
|
|
112
|
+
* Unique identifier of reserved parameter
|
|
113
|
+
*
|
|
114
|
+
* For example `"context"`
|
|
115
|
+
*/
|
|
116
|
+
export type string_reserved_parameter_name = TupleToUnion<typeof RESERVED_PARAMETER_NAMES>;
|
|
117
|
+
/**
|
|
118
|
+
* Represents a mapping of reserved parameter names to their values.
|
|
119
|
+
* Reserved parameters are used internally by the pipeline and should not be set by users.
|
|
120
|
+
*
|
|
121
|
+
* Note: [🚉] This is fully serializable as JSON
|
|
122
|
+
*/
|
|
123
|
+
export type ReservedParameters = Record<string_reserved_parameter_name, string_parameter_value>;
|
|
124
|
+
/**
|
|
125
|
+
* Semantic helper
|
|
126
|
+
* Title of anything
|
|
127
|
+
*
|
|
128
|
+
* For example `"Ai*nautes"`
|
|
129
|
+
*/
|
|
130
|
+
export type string_title = string;
|
|
131
|
+
/**
|
|
132
|
+
* Semantic helper
|
|
133
|
+
*
|
|
134
|
+
* For example `"My AI Assistant"`
|
|
135
|
+
*
|
|
136
|
+
* TODO: !!!! Brand the type
|
|
137
|
+
*/
|
|
138
|
+
export type string_agent_name = string;
|
|
139
|
+
/**
|
|
140
|
+
* Semantic helper
|
|
141
|
+
*
|
|
142
|
+
* For example `"My AI Assistant"`
|
|
143
|
+
*/
|
|
144
|
+
export type string_agent_name_in_book = string;
|
|
145
|
+
/**
|
|
146
|
+
* Semantic helper
|
|
147
|
+
*
|
|
148
|
+
* For example `"b126926439c5fcb83609888a11283723c1ef137c0ad599a77a1be81812bd221d"`
|
|
149
|
+
*/
|
|
150
|
+
export type string_agent_hash = string_sha256;
|
|
151
|
+
/**
|
|
152
|
+
* Semantic helper
|
|
153
|
+
*
|
|
154
|
+
* For example `"3mJr7AoUXx2Wqd"`
|
|
155
|
+
*
|
|
156
|
+
* TODO: !!!! Brand the type
|
|
157
|
+
*/
|
|
158
|
+
export type string_agent_permanent_id = string_base_58;
|
|
159
|
+
/**
|
|
160
|
+
* Unstructured description of the persona
|
|
161
|
+
*
|
|
162
|
+
* For example `"Skilled copywriter"`
|
|
163
|
+
*/
|
|
164
|
+
export type string_persona_description = string;
|
|
165
|
+
/**
|
|
166
|
+
* Unstructured description of the model
|
|
167
|
+
*
|
|
168
|
+
* For example `"Model with logical reasoning and creative mindset"`
|
|
169
|
+
*/
|
|
170
|
+
export type string_model_description = string;
|