@promptbook/cli 0.114.0-3 → 0.114.0-5
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 +4 -12
- package/apps/agents-server/{USE_TIMEOUT_CHIP_QA.md → TIMEOUT_CHIP_QA.md} +1 -1
- package/apps/agents-server/src/app/agents/[agentName]/api/chat/resolveAgentChatRouteContext.ts +5 -12
- package/apps/agents-server/src/app/agents/[agentName]/api/voice/route.ts +4 -9
- package/apps/agents-server/src/app/api/scrape/route.ts +1 -1
- package/apps/agents-server/src/app/layout.tsx +25 -0
- package/apps/agents-server/src/app/system/user-wallet/UserWalletDraft.ts +2 -2
- package/apps/agents-server/src/components/AgentProfile/AgentCapabilityChips.tsx +1 -24
- package/apps/agents-server/src/components/Header/Header.tsx +8 -0
- package/apps/agents-server/src/components/Header/HeaderTypes.ts +5 -0
- package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +118 -30
- package/apps/agents-server/src/components/Header/resolveHeaderSystemActivities.ts +86 -0
- package/apps/agents-server/src/components/Homepage/AgentCard.tsx +0 -3
- package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +8 -0
- package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizardState.ts +0 -12
- package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizardUseSetupStep.tsx +0 -58
- package/apps/agents-server/src/components/NewAgentDialog/newAgentWizardPresets.ts +0 -56
- package/apps/agents-server/src/components/WalletRecordDialog/useWalletRecordDialogState.ts +1 -1
- package/apps/agents-server/src/languages/ServerTranslationKeys.ts +0 -10
- package/apps/agents-server/src/languages/translations/czech.yaml +0 -10
- package/apps/agents-server/src/languages/translations/english.yaml +0 -10
- package/apps/agents-server/src/message-providers/email/smtp/SmtpMessageProvider.ts +1 -1
- package/apps/agents-server/src/tools/$provideOpenAiAgentKitExecutionToolsForServer.ts +0 -191
- package/apps/agents-server/src/tools/$provideOpenAiAssistantExecutionToolsForServer.ts +0 -3
- package/apps/agents-server/src/tools/run_browser.ts +1 -1
- package/apps/agents-server/src/tools/send_email.ts +3 -3
- package/apps/agents-server/src/utils/handleChatCompletion/createHandleChatCompletionPromptContext.ts +0 -1
- package/apps/agents-server/src/utils/handleChatCompletion/resolveHandleChatCompletionRuntime.ts +4 -12
- package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentBooks.ts +0 -1
- package/apps/agents-server/src/utils/messages/parseUseEmailSmtpCredential.ts +1 -1
- package/apps/agents-server/src/utils/resolveUseEmailSmtpCredential.ts +1 -1
- package/apps/agents-server/src/utils/useEmailSmtpWalletConstants.ts +5 -5
- package/apps/agents-server/src/utils/userChat/createRunUserChatJobExecutionContext.ts +5 -12
- package/apps/agents-server/src/utils/userWallet/UserWalletRecord.ts +1 -1
- package/apps/agents-server/src/utils/userWallet/resolveUseEmailSmtpCredentialFromWallet.ts +1 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate/deleteVpsSelfUpdateInstalledVersion.ts +2 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate/isVpsSelfUpdateJobRunning.ts +16 -0
- package/apps/agents-server/src/utils/vpsSelfUpdate/startVpsSelfUpdate.ts +2 -1
- package/apps/agents-server/src/utils/vpsSelfUpdate.ts +1 -0
- package/esm/index.es.js +2885 -6344
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
- package/esm/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +43 -0
- package/esm/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
- package/esm/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
- package/esm/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
- package/esm/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
- package/esm/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
- package/esm/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
- package/esm/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
- package/esm/scripts/verify-prompts/verify-prompts.d.ts +3 -2
- package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
- package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +3 -2
- package/esm/src/cli/cli-commands/coder/verify.d.ts +1 -1
- package/esm/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
- package/esm/src/commitments/META_ID/META_ID.d.ts +32 -0
- package/esm/src/commitments/index.d.ts +4 -12
- package/esm/src/llm-providers/agent/Agent.d.ts +1 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +1 -1
- package/esm/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/_packages/components.readme.md +1 -1
- package/src/book-2.0/agent-source/AgentBasicInformation.ts +3 -9
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/filterCommitmentsForAgentModelRequirements.ts +0 -23
- package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.ts +0 -2
- package/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.ts +16 -31
- package/src/book-2.0/agent-source/parseAgentSource/createCapabilitiesFromCommitment.ts +0 -35
- package/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.ts +0 -25
- package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +2 -10
- package/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.ts +7 -32
- package/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.ts +6 -31
- package/src/book-components/BookEditor/useBookEditorMonacoLanguage.ts +1 -1
- package/src/cli/cli-commands/coder/boilerplateCount.ts +139 -0
- package/src/cli/cli-commands/coder/generate-boilerplates.ts +52 -44
- package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +3 -1
- package/src/cli/cli-commands/coder/init.ts +2 -1
- package/src/cli/cli-commands/coder/verify.ts +29 -5
- package/src/commitments/ACTION/ACTION.ts +3 -3
- package/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.ts +1 -1
- package/src/commitments/META_FULLNAME/META_FULLNAME.ts +70 -0
- package/src/commitments/META_ID/META_ID.ts +78 -0
- package/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.ts +1 -49
- package/src/commitments/index.ts +6 -24
- package/src/llm-providers/agent/Agent.ts +1 -1
- package/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.ts +2 -2
- package/src/other/templates/getTemplatesPipelineCollection.ts +735 -693
- package/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.ts +8 -9
- package/src/version.ts +2 -2
- package/src/versions.txt +2 -0
- package/umd/index.umd.js +2888 -6347
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
- package/umd/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +43 -0
- package/umd/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
- package/umd/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
- package/umd/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
- package/umd/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
- package/umd/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
- package/umd/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
- package/umd/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
- package/umd/scripts/verify-prompts/verify-prompts.d.ts +3 -2
- package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
- package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +3 -2
- package/umd/src/cli/cli-commands/coder/verify.d.ts +1 -1
- package/umd/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
- package/umd/src/commitments/META_ID/META_ID.d.ts +32 -0
- package/umd/src/commitments/index.d.ts +4 -12
- package/umd/src/llm-providers/agent/Agent.d.ts +1 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +1 -1
- package/umd/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
- package/umd/src/version.d.ts +1 -1
- package/apps/agents-server/src/tools/configureTimeoutToolRuntimeAdapterForServer.ts +0 -381
- package/apps/agents-server/src/utils/emails/extractUseEmailConfigurationFromAgentSource.ts +0 -42
- package/esm/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +0 -7
- package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -48
- package/esm/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
- package/esm/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
- package/esm/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
- package/esm/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
- package/esm/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
- package/esm/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
- package/esm/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/esm/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
- package/esm/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
- package/esm/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/META/META.d.ts +0 -65
- package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
- package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
- package/esm/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
- package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
- package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
- package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
- package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
- package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts +0 -1
- package/esm/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
- package/esm/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
- package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
- package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts +0 -1
- package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
- package/esm/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts +0 -1
- package/esm/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
- package/esm/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
- package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
- package/esm/src/commitments/USE_TIME/USE_TIME.test.d.ts +0 -1
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
- package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
- package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts +0 -1
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
- package/esm/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
- package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
- package/esm/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/WALLET/WALLET.d.ts +0 -21
- package/esm/src/commitments/WALLET/WALLET.test.d.ts +0 -1
- package/esm/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
- package/esm/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
- package/esm/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
- package/esm/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
- package/esm/src/commitments/WALLET/createWalletTools.d.ts +0 -7
- package/esm/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
- package/esm/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
- package/esm/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
- package/esm/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
- package/esm/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
- package/esm/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
- package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
- package/src/commitments/COMPONENT/COMPONENT.ts +0 -70
- package/src/commitments/MEMORY/MEMORY.ts +0 -94
- package/src/commitments/MEMORY/MemoryToolNames.ts +0 -13
- package/src/commitments/MEMORY/MemoryToolRuntimeAdapter.ts +0 -180
- package/src/commitments/MEMORY/createMemorySystemMessage.ts +0 -27
- package/src/commitments/MEMORY/createMemoryToolFunctions.ts +0 -134
- package/src/commitments/MEMORY/createMemoryTools.ts +0 -115
- package/src/commitments/MEMORY/getMemoryCommitmentDocumentation.ts +0 -47
- package/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.ts +0 -104
- package/src/commitments/MEMORY/getMemoryToolTitles.ts +0 -16
- package/src/commitments/MEMORY/parseMemoryToolArgs.ts +0 -126
- package/src/commitments/MEMORY/resolveMemoryRuntimeContext.ts +0 -23
- package/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.ts +0 -26
- package/src/commitments/META/META.ts +0 -168
- package/src/commitments/USE/TODO.txt +0 -1
- package/src/commitments/USE/aggregateUseCommitmentSystemMessages.ts +0 -219
- package/src/commitments/USE_BROWSER/TODO.txt +0 -1
- package/src/commitments/USE_BROWSER/USE_BROWSER.ts +0 -257
- package/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.ts +0 -45
- package/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.ts +0 -83
- package/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.ts +0 -146
- package/src/commitments/USE_EMAIL/USE_EMAIL.ts +0 -201
- package/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.ts +0 -75
- package/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.ts +0 -44
- package/src/commitments/USE_EMAIL/sendEmailViaBrowser.ts +0 -47
- package/src/commitments/USE_SEARCH_ENGINE/TODO.txt +0 -1
- package/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.ts +0 -171
- package/src/commitments/USE_SPAWN/USE_SPAWN.ts +0 -150
- package/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.ts +0 -42
- package/src/commitments/USE_SPAWN/spawnAgentViaBrowser.ts +0 -50
- package/src/commitments/USE_TIME/USE_TIME.ts +0 -177
- package/src/commitments/USE_TIMEOUT/TimeoutToolNames.ts +0 -13
- package/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.ts +0 -255
- package/src/commitments/USE_TIMEOUT/USE_TIMEOUT.ts +0 -117
- package/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.ts +0 -22
- package/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.ts +0 -361
- package/src/commitments/USE_TIMEOUT/createTimeoutTools.ts +0 -127
- package/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.ts +0 -67
- package/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.ts +0 -460
- package/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.ts +0 -36
- package/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.ts +0 -26
- package/src/commitments/WALLET/WALLET.ts +0 -71
- package/src/commitments/WALLET/WalletToolNames.ts +0 -14
- package/src/commitments/WALLET/WalletToolRuntimeAdapter.ts +0 -180
- package/src/commitments/WALLET/createWalletSystemMessage.ts +0 -22
- package/src/commitments/WALLET/createWalletToolFunctions.ts +0 -145
- package/src/commitments/WALLET/createWalletTools.ts +0 -129
- package/src/commitments/WALLET/getWalletCommitmentDocumentation.ts +0 -14
- package/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.ts +0 -64
- package/src/commitments/WALLET/getWalletToolTitles.ts +0 -17
- package/src/commitments/WALLET/parseWalletToolArgs.ts +0 -231
- package/src/commitments/WALLET/resolveWalletRuntimeContext.ts +0 -23
- package/src/commitments/WALLET/setWalletToolRuntimeAdapter.ts +0 -26
- package/src/commitments/_common/createSerpSearchToolFunction.ts +0 -46
- package/umd/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +0 -7
- package/umd/src/book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts +0 -1
- package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -48
- package/umd/src/commitments/MEMORY/MEMORY.test.d.ts +0 -1
- package/umd/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
- package/umd/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
- package/umd/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
- package/umd/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
- package/umd/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
- package/umd/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
- package/umd/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/umd/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
- package/umd/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
- package/umd/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/META/META.d.ts +0 -65
- package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
- package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
- package/umd/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts +0 -1
- package/umd/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
- package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
- package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts +0 -1
- package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
- package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts +0 -1
- package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
- package/umd/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts +0 -1
- package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
- package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts +0 -1
- package/umd/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
- package/umd/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
- package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
- package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts +0 -1
- package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
- package/umd/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts +0 -1
- package/umd/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
- package/umd/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
- package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
- package/umd/src/commitments/USE_TIME/USE_TIME.test.d.ts +0 -1
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
- package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
- package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts +0 -1
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
- package/umd/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
- package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
- package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
- package/umd/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/WALLET/WALLET.d.ts +0 -21
- package/umd/src/commitments/WALLET/WALLET.test.d.ts +0 -1
- package/umd/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
- package/umd/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
- package/umd/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
- package/umd/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
- package/umd/src/commitments/WALLET/createWalletTools.d.ts +0 -7
- package/umd/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
- package/umd/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
- package/umd/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
- package/umd/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
- package/umd/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
- package/umd/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
- package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
- /package/esm/src/book-2.0/agent-source/{createAgentModelRequirements.useCommitmentAggregation.test.d.ts → createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
- /package/esm/src/{commitments/MEMORY/MEMORY.test.d.ts → cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
- /package/esm/src/{commitments/USE_BROWSER/USE_BROWSER.test.d.ts → cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
- /package/esm/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
- /package/{esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → umd/src/book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
- /package/{esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → umd/src/cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
- /package/{esm/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts → umd/src/cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
- /package/umd/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ActionCommitmentDefinition } from './ACTION/ACTION';
|
|
2
2
|
import { ClosedCommitmentDefinition } from './CLOSED/CLOSED';
|
|
3
|
-
import { ComponentCommitmentDefinition } from './COMPONENT/COMPONENT';
|
|
4
3
|
import { DeleteCommitmentDefinition } from './DELETE/DELETE';
|
|
5
4
|
import { DictionaryCommitmentDefinition } from './DICTIONARY/DICTIONARY';
|
|
6
5
|
import { FormatCommitmentDefinition } from './FORMAT/FORMAT';
|
|
@@ -9,19 +8,20 @@ import { GoalCommitmentDefinition } from './GOAL/GOAL';
|
|
|
9
8
|
import { ImportCommitmentDefinition } from './IMPORT/IMPORT';
|
|
10
9
|
import { KnowledgeCommitmentDefinition } from './KNOWLEDGE/KNOWLEDGE';
|
|
11
10
|
import { LanguageCommitmentDefinition } from './LANGUAGE/LANGUAGE';
|
|
12
|
-
import { MemoryCommitmentDefinition } from './MEMORY/MEMORY';
|
|
13
11
|
import { AgentMessageCommitmentDefinition } from './MESSAGE/AgentMessageCommitmentDefinition';
|
|
14
12
|
import { InitialMessageCommitmentDefinition } from './MESSAGE/InitialMessageCommitmentDefinition';
|
|
15
13
|
import { InternalMessageCommitmentDefinition } from './MESSAGE/InternalMessageCommitmentDefinition';
|
|
16
14
|
import { MessageCommitmentDefinition } from './MESSAGE/MESSAGE';
|
|
17
15
|
import { UserMessageCommitmentDefinition } from './MESSAGE/UserMessageCommitmentDefinition';
|
|
18
16
|
import { MessageSuffixCommitmentDefinition } from './MESSAGE_SUFFIX/MESSAGE_SUFFIX';
|
|
19
|
-
import { MetaCommitmentDefinition } from './META/META';
|
|
20
17
|
import { MetaAvatarCommitmentDefinition } from './META_AVATAR/META_AVATAR';
|
|
21
18
|
import { MetaColorCommitmentDefinition } from './META_COLOR/META_COLOR';
|
|
19
|
+
import { MetaDescriptionCommitmentDefinition } from './META_DESCRIPTION/META_DESCRIPTION';
|
|
22
20
|
import { MetaDomainCommitmentDefinition } from './META_DOMAIN/META_DOMAIN';
|
|
23
21
|
import { MetaDisclaimerCommitmentDefinition } from './META_DISCLAIMER/META_DISCLAIMER';
|
|
24
22
|
import { MetaFontCommitmentDefinition } from './META_FONT/META_FONT';
|
|
23
|
+
import { MetaFullnameCommitmentDefinition } from './META_FULLNAME/META_FULLNAME';
|
|
24
|
+
import { MetaIdCommitmentDefinition } from './META_ID/META_ID';
|
|
25
25
|
import { MetaImageCommitmentDefinition } from './META_IMAGE/META_IMAGE';
|
|
26
26
|
import { MetaInputPlaceholderCommitmentDefinition } from './META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER';
|
|
27
27
|
import { MetaLinkCommitmentDefinition } from './META_LINK/META_LINK';
|
|
@@ -38,21 +38,13 @@ import { ScenarioCommitmentDefinition } from './SCENARIO/SCENARIO';
|
|
|
38
38
|
import { StyleCommitmentDefinition } from './STYLE/STYLE';
|
|
39
39
|
import { TeamCommitmentDefinition } from './TEAM/TEAM';
|
|
40
40
|
import { TemplateCommitmentDefinition } from './TEMPLATE/TEMPLATE';
|
|
41
|
-
import { UseBrowserCommitmentDefinition } from './USE_BROWSER/USE_BROWSER';
|
|
42
41
|
import { UseCalendarCommitmentDefinition } from './USE_CALENDAR/USE_CALENDAR';
|
|
43
|
-
import { UseDeepSearchCommitmentDefinition } from './USE_DEEPSEARCH/USE_DEEPSEARCH';
|
|
44
|
-
import { UseEmailCommitmentDefinition } from './USE_EMAIL/USE_EMAIL';
|
|
45
42
|
import { UseImageGeneratorCommitmentDefinition } from './USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR';
|
|
46
43
|
import { UseMcpCommitmentDefinition } from './USE_MCP/USE_MCP';
|
|
47
44
|
import { UsePopupCommitmentDefinition } from './USE_POPUP/USE_POPUP';
|
|
48
45
|
import { UsePrivacyCommitmentDefinition } from './USE_PRIVACY/USE_PRIVACY';
|
|
49
46
|
import { UseProjectCommitmentDefinition } from './USE_PROJECT/USE_PROJECT';
|
|
50
|
-
import { UseSearchEngineCommitmentDefinition } from './USE_SEARCH_ENGINE/USE_SEARCH_ENGINE';
|
|
51
|
-
import { UseSpawnCommitmentDefinition } from './USE_SPAWN/USE_SPAWN';
|
|
52
|
-
import { UseTimeoutCommitmentDefinition } from './USE_TIMEOUT/USE_TIMEOUT';
|
|
53
|
-
import { UseTimeCommitmentDefinition } from './USE_TIME/USE_TIME';
|
|
54
47
|
import { UseUserLocationCommitmentDefinition } from './USE_USER_LOCATION/USE_USER_LOCATION';
|
|
55
|
-
import { WalletCommitmentDefinition } from './WALLET/WALLET';
|
|
56
48
|
import { WritingRulesCommitmentDefinition } from './WRITING_RULES/WRITING_RULES';
|
|
57
49
|
import { WritingSampleCommitmentDefinition } from './WRITING_SAMPLE/WRITING_SAMPLE';
|
|
58
50
|
import { NotYetImplementedCommitmentDefinition } from './_base/NotYetImplementedCommitmentDefinition';
|
|
@@ -63,4 +55,4 @@ import { NotYetImplementedCommitmentDefinition } from './_base/NotYetImplemented
|
|
|
63
55
|
*
|
|
64
56
|
* @private Use functions to access commitments instead of this array directly
|
|
65
57
|
*/
|
|
66
|
-
export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition,
|
|
58
|
+
export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, LanguageCommitmentDefinition, LanguageCommitmentDefinition, WritingSampleCommitmentDefinition, WritingRulesCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, TemplateCommitmentDefinition, TemplateCommitmentDefinition, FromCommitmentDefinition, ImportCommitmentDefinition, ImportCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, MetaAvatarCommitmentDefinition, MetaAvatarCommitmentDefinition, MetaImageCommitmentDefinition, MetaColorCommitmentDefinition, MetaFontCommitmentDefinition, MetaLinkCommitmentDefinition, MetaDomainCommitmentDefinition, MetaDescriptionCommitmentDefinition, MetaDisclaimerCommitmentDefinition, MetaFullnameCommitmentDefinition, MetaIdCommitmentDefinition, MetaInputPlaceholderCommitmentDefinition, MetaThinkingMessageCommitmentDefinition, MetaVisibilityCommitmentDefinition, MetaVoiceCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, InitialMessageCommitmentDefinition, UserMessageCommitmentDefinition, InternalMessageCommitmentDefinition, AgentMessageCommitmentDefinition, MessageSuffixCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DictionaryCommitmentDefinition, OpenCommitmentDefinition, ClosedCommitmentDefinition, TeamCommitmentDefinition, UseUserLocationCommitmentDefinition, UseCalendarCommitmentDefinition, UsePopupCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseMcpCommitmentDefinition, UsePrivacyCommitmentDefinition, UseProjectCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
|
|
@@ -45,7 +45,7 @@ export declare class Agent extends AgentLlmExecutionTools implements LlmExecutio
|
|
|
45
45
|
links: Array<string_agent_url>;
|
|
46
46
|
/**
|
|
47
47
|
* Capabilities of the agent
|
|
48
|
-
* This is parsed from commitments like USE
|
|
48
|
+
* This is parsed from commitments like USE CALENDAR, USE PROJECT, KNOWLEDGE, etc.
|
|
49
49
|
*/
|
|
50
50
|
capabilities: Array<AgentCapability>;
|
|
51
51
|
/**
|
|
@@ -73,7 +73,7 @@ export declare class OpenAiAgentKitExecutionToolsToolBuilder {
|
|
|
73
73
|
*/
|
|
74
74
|
private normalizeAgentKitToolParameters;
|
|
75
75
|
/**
|
|
76
|
-
* Creates the native Agent SDK tool used for
|
|
76
|
+
* Creates the native Agent SDK tool used for the DeepSearch capability.
|
|
77
77
|
*/
|
|
78
78
|
private createDeepSearchAgentKitTool;
|
|
79
79
|
/**
|
|
@@ -8,12 +8,11 @@
|
|
|
8
8
|
* 4. Returns the scraped markdown content
|
|
9
9
|
*
|
|
10
10
|
* WARNING: This function should NOT be used directly in browser environments.
|
|
11
|
-
* For browser environments,
|
|
12
|
-
* the Agents Server API endpoint at /api/scrape
|
|
11
|
+
* For browser environments, proxy the request through the Agents Server API endpoint at /api/scrape
|
|
13
12
|
*
|
|
14
13
|
* @param url The URL to fetch and scrape
|
|
15
14
|
* @returns Markdown content from the URL
|
|
16
15
|
*
|
|
17
|
-
* @private internal utility
|
|
16
|
+
* @private internal scraping utility
|
|
18
17
|
*/
|
|
19
18
|
export declare function fetchUrlContent(url: string): Promise<string>;
|
package/umd/src/version.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.114.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.114.0-4`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
setTimeoutToolRuntimeAdapter,
|
|
3
|
-
type TimeoutToolListItem,
|
|
4
|
-
type TimeoutToolRuntimeAdapter,
|
|
5
|
-
type TimeoutToolRuntimeContext,
|
|
6
|
-
} from '../../../../src/commitments/USE_TIMEOUT/USE_TIMEOUT';
|
|
7
|
-
import {
|
|
8
|
-
cancelAllActiveAgentScopedUserChatTimeouts,
|
|
9
|
-
cancelScheduledUserChatTimeout,
|
|
10
|
-
getAgentScopedUserChatTimeout,
|
|
11
|
-
listAgentUserChatTimeouts,
|
|
12
|
-
notifyUserChatTimeoutScheduleChanged,
|
|
13
|
-
pauseAllActiveAgentScopedUserChatTimeouts,
|
|
14
|
-
resumeAllPausedAgentScopedUserChatTimeouts,
|
|
15
|
-
scheduleThreadScopedUserChatTimeout,
|
|
16
|
-
updateAgentScopedUserChatTimeout,
|
|
17
|
-
} from '../utils/userChatTimeout';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Maximum number of timeouts returned in one `list_timeouts` runtime call.
|
|
21
|
-
*
|
|
22
|
-
* @private internal timeout adapter constant
|
|
23
|
-
*/
|
|
24
|
-
const MAX_LISTED_TIMEOUTS_LIMIT = 100;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Shared timeout runtime adapter bound to the Agents Server durable chat infrastructure.
|
|
28
|
-
*
|
|
29
|
-
* @private internal singleton for server tool providers
|
|
30
|
-
*/
|
|
31
|
-
const timeoutToolRuntimeAdapter: TimeoutToolRuntimeAdapter = {
|
|
32
|
-
async scheduleTimeout(
|
|
33
|
-
args: {
|
|
34
|
-
milliseconds: number;
|
|
35
|
-
message?: string;
|
|
36
|
-
},
|
|
37
|
-
runtimeContext: TimeoutToolRuntimeContext,
|
|
38
|
-
): Promise<{
|
|
39
|
-
timeoutId: string;
|
|
40
|
-
dueAt: string;
|
|
41
|
-
}> {
|
|
42
|
-
const chatId = requireTimeoutScopeField(runtimeContext.chatId, 'chat');
|
|
43
|
-
const userId = requireTimeoutScopeField(runtimeContext.userId, 'user');
|
|
44
|
-
const agentPermanentId = requireTimeoutScopeField(runtimeContext.agentId, 'agent');
|
|
45
|
-
const timeout = await scheduleThreadScopedUserChatTimeout({
|
|
46
|
-
userId,
|
|
47
|
-
agentPermanentId,
|
|
48
|
-
chatId,
|
|
49
|
-
durationMs: args.milliseconds,
|
|
50
|
-
message: normalizeTimeoutMessage(args.message),
|
|
51
|
-
parameters: runtimeContext.promptParameters,
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
return {
|
|
55
|
-
timeoutId: timeout.timeoutId,
|
|
56
|
-
dueAt: timeout.dueAt,
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
async cancelTimeout(
|
|
60
|
-
args:
|
|
61
|
-
| {
|
|
62
|
-
timeoutId: string;
|
|
63
|
-
}
|
|
64
|
-
| {
|
|
65
|
-
allActive: true;
|
|
66
|
-
},
|
|
67
|
-
runtimeContext: TimeoutToolRuntimeContext,
|
|
68
|
-
): Promise<{
|
|
69
|
-
status: 'cancelled' | 'cancelled_all' | 'not_found';
|
|
70
|
-
timeoutId?: string;
|
|
71
|
-
dueAt?: string;
|
|
72
|
-
cancelledCount?: number;
|
|
73
|
-
cancelledTimeoutIds?: Array<string>;
|
|
74
|
-
hasMore?: boolean;
|
|
75
|
-
}> {
|
|
76
|
-
const userId = requireTimeoutScopeField(runtimeContext.userId, 'user');
|
|
77
|
-
const agentPermanentId = requireTimeoutScopeField(runtimeContext.agentId, 'agent');
|
|
78
|
-
|
|
79
|
-
if ('allActive' in args && args.allActive) {
|
|
80
|
-
const bulkCancellationSummary = await cancelAllActiveAgentScopedUserChatTimeouts({
|
|
81
|
-
userId,
|
|
82
|
-
agentPermanentId,
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
return {
|
|
86
|
-
status: 'cancelled_all',
|
|
87
|
-
cancelledCount: bulkCancellationSummary.updatedCount,
|
|
88
|
-
cancelledTimeoutIds: bulkCancellationSummary.timeoutIds,
|
|
89
|
-
hasMore: bulkCancellationSummary.hasMore,
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (!('timeoutId' in args)) {
|
|
94
|
-
return {
|
|
95
|
-
status: 'not_found',
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const timeoutId = args.timeoutId;
|
|
100
|
-
|
|
101
|
-
const existingTimeout = await getAgentScopedUserChatTimeout({
|
|
102
|
-
userId,
|
|
103
|
-
agentPermanentId,
|
|
104
|
-
timeoutId,
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
if (!existingTimeout) {
|
|
108
|
-
return {
|
|
109
|
-
timeoutId,
|
|
110
|
-
status: 'not_found',
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
const cancelledTimeout = await cancelScheduledUserChatTimeout(timeoutId);
|
|
115
|
-
|
|
116
|
-
if (!cancelledTimeout) {
|
|
117
|
-
return {
|
|
118
|
-
timeoutId,
|
|
119
|
-
status: 'not_found',
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return {
|
|
124
|
-
timeoutId: cancelledTimeout.timeoutId,
|
|
125
|
-
dueAt: cancelledTimeout.dueAt,
|
|
126
|
-
status: 'cancelled',
|
|
127
|
-
};
|
|
128
|
-
},
|
|
129
|
-
async listTimeouts(
|
|
130
|
-
args: {
|
|
131
|
-
includeFinished: boolean;
|
|
132
|
-
limit: number;
|
|
133
|
-
},
|
|
134
|
-
runtimeContext: TimeoutToolRuntimeContext,
|
|
135
|
-
): Promise<{
|
|
136
|
-
items: Array<TimeoutToolListItem>;
|
|
137
|
-
total: number;
|
|
138
|
-
}> {
|
|
139
|
-
const userId = requireTimeoutScopeField(runtimeContext.userId, 'user');
|
|
140
|
-
const agentPermanentId = requireTimeoutScopeField(runtimeContext.agentId, 'agent');
|
|
141
|
-
const limit = normalizeTimeoutListLimit(args.limit);
|
|
142
|
-
const statuses = args.includeFinished ? undefined : (['QUEUED', 'RUNNING'] as const);
|
|
143
|
-
const listedTimeouts = await listAgentUserChatTimeouts({
|
|
144
|
-
userId,
|
|
145
|
-
agentPermanentId,
|
|
146
|
-
limit,
|
|
147
|
-
...(statuses ? { statuses } : {}),
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
return {
|
|
151
|
-
items: listedTimeouts.map(mapTimeoutRecordToToolListItem),
|
|
152
|
-
total: listedTimeouts.length,
|
|
153
|
-
};
|
|
154
|
-
},
|
|
155
|
-
async updateTimeout(
|
|
156
|
-
args:
|
|
157
|
-
| {
|
|
158
|
-
timeoutId: string;
|
|
159
|
-
patch: {
|
|
160
|
-
dueAt?: string;
|
|
161
|
-
extendByMs?: number;
|
|
162
|
-
recurrenceIntervalMs?: number | null;
|
|
163
|
-
message?: string | null;
|
|
164
|
-
parameters?: Record<string, unknown>;
|
|
165
|
-
paused?: boolean;
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
| {
|
|
169
|
-
allActive: true;
|
|
170
|
-
paused: boolean;
|
|
171
|
-
},
|
|
172
|
-
runtimeContext: TimeoutToolRuntimeContext,
|
|
173
|
-
): Promise<
|
|
174
|
-
| {
|
|
175
|
-
status: 'updated';
|
|
176
|
-
timeout: TimeoutToolListItem;
|
|
177
|
-
}
|
|
178
|
-
| {
|
|
179
|
-
status: 'not_found';
|
|
180
|
-
timeoutId: string;
|
|
181
|
-
}
|
|
182
|
-
| {
|
|
183
|
-
status: 'conflict';
|
|
184
|
-
timeoutId: string;
|
|
185
|
-
reason: 'finished' | 'running';
|
|
186
|
-
}
|
|
187
|
-
| {
|
|
188
|
-
status: 'updated_all';
|
|
189
|
-
updatedCount: number;
|
|
190
|
-
matchedCount: number;
|
|
191
|
-
updatedTimeoutIds: Array<string>;
|
|
192
|
-
hasMore?: boolean;
|
|
193
|
-
}
|
|
194
|
-
> {
|
|
195
|
-
const userId = requireTimeoutScopeField(runtimeContext.userId, 'user');
|
|
196
|
-
const agentPermanentId = requireTimeoutScopeField(runtimeContext.agentId, 'agent');
|
|
197
|
-
|
|
198
|
-
if ('allActive' in args && args.allActive) {
|
|
199
|
-
const bulkSummary = args.paused
|
|
200
|
-
? await pauseAllActiveAgentScopedUserChatTimeouts({
|
|
201
|
-
userId,
|
|
202
|
-
agentPermanentId,
|
|
203
|
-
})
|
|
204
|
-
: await resumeAllPausedAgentScopedUserChatTimeouts({
|
|
205
|
-
userId,
|
|
206
|
-
agentPermanentId,
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
return {
|
|
210
|
-
status: 'updated_all',
|
|
211
|
-
updatedCount: bulkSummary.updatedCount,
|
|
212
|
-
matchedCount: bulkSummary.matchedCount,
|
|
213
|
-
updatedTimeoutIds: bulkSummary.timeoutIds,
|
|
214
|
-
hasMore: bulkSummary.hasMore,
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
if (!('timeoutId' in args) || !('patch' in args)) {
|
|
219
|
-
return {
|
|
220
|
-
status: 'not_found',
|
|
221
|
-
timeoutId: '',
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
const timeoutId = args.timeoutId;
|
|
226
|
-
const timeoutPatch = args.patch;
|
|
227
|
-
|
|
228
|
-
const existingTimeout = await getAgentScopedUserChatTimeout({
|
|
229
|
-
userId,
|
|
230
|
-
agentPermanentId,
|
|
231
|
-
timeoutId,
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
if (!existingTimeout) {
|
|
235
|
-
return {
|
|
236
|
-
status: 'not_found',
|
|
237
|
-
timeoutId,
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
if (isFinishedTimeoutStatus(existingTimeout.status)) {
|
|
242
|
-
return {
|
|
243
|
-
status: 'conflict',
|
|
244
|
-
timeoutId,
|
|
245
|
-
reason: 'finished',
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (existingTimeout.status === 'RUNNING') {
|
|
250
|
-
return {
|
|
251
|
-
status: 'conflict',
|
|
252
|
-
timeoutId,
|
|
253
|
-
reason: 'running',
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
const updatedTimeout = await updateAgentScopedUserChatTimeout({
|
|
258
|
-
userId,
|
|
259
|
-
agentPermanentId,
|
|
260
|
-
timeoutId,
|
|
261
|
-
patch: {
|
|
262
|
-
...(timeoutPatch.dueAt !== undefined ? { dueAt: timeoutPatch.dueAt } : {}),
|
|
263
|
-
...(timeoutPatch.extendByMs !== undefined ? { extendByMs: timeoutPatch.extendByMs } : {}),
|
|
264
|
-
...(timeoutPatch.recurrenceIntervalMs !== undefined
|
|
265
|
-
? { recurrenceIntervalMs: timeoutPatch.recurrenceIntervalMs }
|
|
266
|
-
: {}),
|
|
267
|
-
...(timeoutPatch.message !== undefined
|
|
268
|
-
? { message: normalizeTimeoutMessage(timeoutPatch.message) || null }
|
|
269
|
-
: {}),
|
|
270
|
-
...(timeoutPatch.parameters !== undefined ? { parameters: timeoutPatch.parameters } : {}),
|
|
271
|
-
...(timeoutPatch.paused !== undefined
|
|
272
|
-
? { pausedAt: timeoutPatch.paused ? new Date().toISOString() : null }
|
|
273
|
-
: {}),
|
|
274
|
-
},
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
if (!updatedTimeout) {
|
|
278
|
-
return {
|
|
279
|
-
status: 'not_found',
|
|
280
|
-
timeoutId,
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
notifyUserChatTimeoutScheduleChanged(updatedTimeout);
|
|
285
|
-
|
|
286
|
-
return {
|
|
287
|
-
status: 'updated',
|
|
288
|
-
timeout: mapTimeoutRecordToToolListItem(updatedTimeout),
|
|
289
|
-
};
|
|
290
|
-
},
|
|
291
|
-
};
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Installs the Agents Server timeout runtime adapter into the `USE TIMEOUT` commitment layer.
|
|
295
|
-
*
|
|
296
|
-
* @private internal utility for server tool providers
|
|
297
|
-
*/
|
|
298
|
-
export function configureTimeoutToolRuntimeAdapterForServer(): void {
|
|
299
|
-
setTimeoutToolRuntimeAdapter(timeoutToolRuntimeAdapter);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* Trims optional timeout follow-up message text before persistence.
|
|
304
|
-
*
|
|
305
|
-
* @private internal utility for timeout tool adapters
|
|
306
|
-
*/
|
|
307
|
-
function normalizeTimeoutMessage(value: unknown): string | undefined {
|
|
308
|
-
if (typeof value !== 'string') {
|
|
309
|
-
return undefined;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
const normalizedValue = value.trim();
|
|
313
|
-
return normalizedValue || undefined;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Ensures one required timeout scope field is available in runtime context.
|
|
318
|
-
*
|
|
319
|
-
* @private internal utility for timeout tool adapters
|
|
320
|
-
*/
|
|
321
|
-
function requireTimeoutScopeField<TValue>(
|
|
322
|
-
value: TValue | undefined,
|
|
323
|
-
fieldName: 'chat' | 'user' | 'agent',
|
|
324
|
-
): TValue {
|
|
325
|
-
if (value === undefined || value === null) {
|
|
326
|
-
throw new Error(`Timeouts are unavailable because ${fieldName} scope context is missing.`);
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
if (typeof value === 'string' && value.length === 0) {
|
|
330
|
-
throw new Error(`Timeouts are unavailable because ${fieldName} scope context is missing.`);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
return value;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Clamps requested timeout-list limits to the supported adapter range.
|
|
338
|
-
*
|
|
339
|
-
* @private internal utility for timeout tool adapters
|
|
340
|
-
*/
|
|
341
|
-
function normalizeTimeoutListLimit(value: number): number {
|
|
342
|
-
if (!Number.isFinite(value)) {
|
|
343
|
-
return MAX_LISTED_TIMEOUTS_LIMIT;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
return Math.max(1, Math.min(MAX_LISTED_TIMEOUTS_LIMIT, Math.floor(value)));
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Maps one stored timeout record into one `USE TIMEOUT` list item.
|
|
351
|
-
*
|
|
352
|
-
* @private internal utility for timeout tool adapters
|
|
353
|
-
*/
|
|
354
|
-
function mapTimeoutRecordToToolListItem(timeout: {
|
|
355
|
-
timeoutId: string;
|
|
356
|
-
chatId: string;
|
|
357
|
-
status: TimeoutToolListItem['status'];
|
|
358
|
-
dueAt: string;
|
|
359
|
-
pausedAt: string | null;
|
|
360
|
-
message: string | null;
|
|
361
|
-
recurrenceIntervalMs: number | null;
|
|
362
|
-
}): TimeoutToolListItem {
|
|
363
|
-
return {
|
|
364
|
-
timeoutId: timeout.timeoutId,
|
|
365
|
-
chatId: timeout.chatId,
|
|
366
|
-
status: timeout.status,
|
|
367
|
-
dueAt: timeout.dueAt,
|
|
368
|
-
paused: Boolean(timeout.pausedAt),
|
|
369
|
-
message: timeout.message,
|
|
370
|
-
recurrenceIntervalMs: timeout.recurrenceIntervalMs,
|
|
371
|
-
};
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
/**
|
|
375
|
-
* Returns `true` when one timeout has reached a terminal state.
|
|
376
|
-
*
|
|
377
|
-
* @private internal utility for timeout tool adapters
|
|
378
|
-
*/
|
|
379
|
-
function isFinishedTimeoutStatus(status: TimeoutToolListItem['status']): boolean {
|
|
380
|
-
return status === 'COMPLETED' || status === 'FAILED' || status === 'CANCELLED';
|
|
381
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { parseAgentSourceWithCommitments } from '../../../../../src/book-2.0/agent-source/parseAgentSourceWithCommitments';
|
|
2
|
-
import type { string_book } from '../../../../../src/book-2.0/agent-source/string_book';
|
|
3
|
-
import { parseUseEmailCommitmentContent } from '../../../../../src/commitments/USE_EMAIL/parseUseEmailCommitmentContent';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* USE EMAIL configuration extracted from an agent source.
|
|
7
|
-
*/
|
|
8
|
-
export type UseEmailConfiguration = {
|
|
9
|
-
isEnabled: boolean;
|
|
10
|
-
senderEmail?: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Extracts USE EMAIL settings from agent source.
|
|
15
|
-
*/
|
|
16
|
-
export function extractUseEmailConfigurationFromAgentSource(agentSource: string_book): UseEmailConfiguration {
|
|
17
|
-
const parseResult = parseAgentSourceWithCommitments(agentSource);
|
|
18
|
-
let senderEmail: string | undefined;
|
|
19
|
-
let isEnabled = false;
|
|
20
|
-
|
|
21
|
-
for (const commitment of parseResult.commitments) {
|
|
22
|
-
if (commitment.type !== 'USE EMAIL') {
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
isEnabled = true;
|
|
27
|
-
|
|
28
|
-
if (senderEmail) {
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const parsedCommitment = parseUseEmailCommitmentContent(commitment.content);
|
|
33
|
-
if (parsedCommitment.senderEmail) {
|
|
34
|
-
senderEmail = parsedCommitment.senderEmail;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
isEnabled,
|
|
40
|
-
...(senderEmail ? { senderEmail } : {}),
|
|
41
|
-
};
|
|
42
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Replaces the complete todo status line while preserving its indentation.
|
|
3
|
-
*
|
|
4
|
-
* The complete line is replaced because a todo status can contain a required
|
|
5
|
-
* model/harness token in addition to priority markers.
|
|
6
|
-
*/
|
|
7
|
-
export declare function replacePromptTodoStatusLine(line: string, replacementStatusLine: string): string;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
-
import type { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions';
|
|
3
|
-
import type { string_javascript_name } from '../../types/string_person_fullname';
|
|
4
|
-
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
5
|
-
export type { MemoryToolRecord, MemoryToolRuntimeAdapter, MemoryToolRuntimeContext } from './MemoryToolRuntimeAdapter';
|
|
6
|
-
export { setMemoryToolRuntimeAdapter } from './setMemoryToolRuntimeAdapter';
|
|
7
|
-
/**
|
|
8
|
-
* MEMORY commitment definition
|
|
9
|
-
*
|
|
10
|
-
* The MEMORY commitment is similar to KNOWLEDGE but has a focus on remembering past
|
|
11
|
-
* interactions and user preferences. It helps the agent maintain context about the
|
|
12
|
-
* user's history, preferences, and previous conversations.
|
|
13
|
-
*
|
|
14
|
-
* Example usage in agent source:
|
|
15
|
-
*
|
|
16
|
-
* ```book
|
|
17
|
-
* MEMORY User prefers detailed technical explanations
|
|
18
|
-
* MEMORY Previously worked on React projects
|
|
19
|
-
* MEMORY Timezone: UTC-5 (Eastern Time)
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @private [🪔] Maybe export the commitments through some package
|
|
23
|
-
*/
|
|
24
|
-
export declare class MemoryCommitmentDefinition extends BaseCommitmentDefinition<'MEMORY' | 'MEMORIES'> {
|
|
25
|
-
constructor(type?: 'MEMORY' | 'MEMORIES');
|
|
26
|
-
get requiresContent(): boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Short one-line description of MEMORY.
|
|
29
|
-
*/
|
|
30
|
-
get description(): string;
|
|
31
|
-
/**
|
|
32
|
-
* Icon for this commitment.
|
|
33
|
-
*/
|
|
34
|
-
get icon(): string;
|
|
35
|
-
/**
|
|
36
|
-
* Markdown documentation for MEMORY commitment.
|
|
37
|
-
*/
|
|
38
|
-
get documentation(): string;
|
|
39
|
-
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
40
|
-
/**
|
|
41
|
-
* Gets human-readable titles for MEMORY tool functions.
|
|
42
|
-
*/
|
|
43
|
-
getToolTitles(): Record<string_javascript_name, string>;
|
|
44
|
-
/**
|
|
45
|
-
* Gets MEMORY tool function implementations.
|
|
46
|
-
*/
|
|
47
|
-
getToolFunctions(): Record<string_javascript_name, ToolFunction>;
|
|
48
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Names of tools used by the MEMORY commitment.
|
|
3
|
-
*
|
|
4
|
-
* @private function of MemoryCommitmentDefinition
|
|
5
|
-
*/
|
|
6
|
-
export declare const MemoryToolNames: {
|
|
7
|
-
readonly retrieve: string;
|
|
8
|
-
readonly store: string;
|
|
9
|
-
readonly update: string;
|
|
10
|
-
readonly delete: string;
|
|
11
|
-
};
|