@promptbook/node 0.114.0-2 → 0.114.0-4

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.
Files changed (190) hide show
  1. package/README.md +1 -9
  2. package/esm/index.es.js +587 -4663
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +7 -0
  5. package/esm/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +8 -1
  6. package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
  7. package/esm/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
  8. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
  9. package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
  10. package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +3 -2
  11. package/esm/src/cli/cli-commands/coder/ping.d.ts +2 -5
  12. package/esm/src/cli/cli-commands/coder.d.ts +1 -1
  13. package/esm/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +34 -0
  14. package/esm/src/cli/common/loadPromptsModule.d.ts +16 -0
  15. package/esm/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
  16. package/esm/src/commitments/META_ID/META_ID.d.ts +32 -0
  17. package/esm/src/commitments/index.d.ts +4 -12
  18. package/esm/src/llm-providers/agent/Agent.d.ts +1 -1
  19. package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  20. package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
  21. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +1 -1
  22. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +2 -2
  23. package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +1 -1
  24. package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +1 -1
  25. package/esm/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +1 -1
  26. package/esm/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +1 -1
  27. package/esm/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +1 -1
  28. package/esm/src/llm-providers/openai/utils/loadOpenAiAgentsModule.d.ts +203 -0
  29. package/esm/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +1 -1
  30. package/esm/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
  31. package/esm/src/utils/misc/createLazyModuleLoader.d.ts +14 -0
  32. package/esm/src/version.d.ts +1 -1
  33. package/package.json +2 -5
  34. package/umd/index.umd.js +601 -4674
  35. package/umd/index.umd.js.map +1 -1
  36. package/umd/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +7 -0
  37. package/umd/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +8 -1
  38. package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
  39. package/umd/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
  40. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
  41. package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
  42. package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +3 -2
  43. package/umd/src/cli/cli-commands/coder/ping.d.ts +2 -5
  44. package/umd/src/cli/cli-commands/coder.d.ts +1 -1
  45. package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +34 -0
  46. package/umd/src/cli/common/loadPromptsModule.d.ts +16 -0
  47. package/umd/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
  48. package/umd/src/commitments/META_ID/META_ID.d.ts +32 -0
  49. package/umd/src/commitments/index.d.ts +4 -12
  50. package/umd/src/llm-providers/agent/Agent.d.ts +1 -1
  51. package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  52. package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
  53. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +1 -1
  54. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +2 -2
  55. package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +1 -1
  56. package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +1 -1
  57. package/umd/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +1 -1
  58. package/umd/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +1 -1
  59. package/umd/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +1 -1
  60. package/umd/src/llm-providers/openai/utils/loadOpenAiAgentsModule.d.ts +203 -0
  61. package/umd/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +1 -1
  62. package/umd/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
  63. package/umd/src/utils/misc/createLazyModuleLoader.d.ts +14 -0
  64. package/umd/src/version.d.ts +1 -1
  65. package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -48
  66. package/esm/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
  67. package/esm/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
  68. package/esm/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
  69. package/esm/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
  70. package/esm/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
  71. package/esm/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
  72. package/esm/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  73. package/esm/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
  74. package/esm/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
  75. package/esm/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
  76. package/esm/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
  77. package/esm/src/commitments/META/META.d.ts +0 -65
  78. package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
  79. package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
  80. package/esm/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
  81. package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
  82. package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
  83. package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
  84. package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
  85. package/esm/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
  86. package/esm/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
  87. package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
  88. package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
  89. package/esm/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts +0 -1
  90. package/esm/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
  91. package/esm/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
  92. package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
  93. package/esm/src/commitments/USE_TIME/USE_TIME.test.d.ts +0 -1
  94. package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
  95. package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
  96. package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
  97. package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts +0 -1
  98. package/esm/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
  99. package/esm/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
  100. package/esm/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
  101. package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  102. package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
  103. package/esm/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
  104. package/esm/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
  105. package/esm/src/commitments/WALLET/WALLET.d.ts +0 -21
  106. package/esm/src/commitments/WALLET/WALLET.test.d.ts +0 -1
  107. package/esm/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
  108. package/esm/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
  109. package/esm/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
  110. package/esm/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
  111. package/esm/src/commitments/WALLET/createWalletTools.d.ts +0 -7
  112. package/esm/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
  113. package/esm/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
  114. package/esm/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
  115. package/esm/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
  116. package/esm/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
  117. package/esm/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
  118. package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
  119. package/umd/src/book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts +0 -1
  120. package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -48
  121. package/umd/src/commitments/MEMORY/MEMORY.test.d.ts +0 -1
  122. package/umd/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
  123. package/umd/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
  124. package/umd/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
  125. package/umd/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
  126. package/umd/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
  127. package/umd/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
  128. package/umd/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  129. package/umd/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
  130. package/umd/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
  131. package/umd/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
  132. package/umd/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
  133. package/umd/src/commitments/META/META.d.ts +0 -65
  134. package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
  135. package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
  136. package/umd/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts +0 -1
  137. package/umd/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
  138. package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
  139. package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts +0 -1
  140. package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
  141. package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts +0 -1
  142. package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
  143. package/umd/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts +0 -1
  144. package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
  145. package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts +0 -1
  146. package/umd/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
  147. package/umd/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
  148. package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
  149. package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts +0 -1
  150. package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
  151. package/umd/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts +0 -1
  152. package/umd/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
  153. package/umd/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
  154. package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
  155. package/umd/src/commitments/USE_TIME/USE_TIME.test.d.ts +0 -1
  156. package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
  157. package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
  158. package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
  159. package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts +0 -1
  160. package/umd/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
  161. package/umd/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
  162. package/umd/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
  163. package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  164. package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
  165. package/umd/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
  166. package/umd/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
  167. package/umd/src/commitments/WALLET/WALLET.d.ts +0 -21
  168. package/umd/src/commitments/WALLET/WALLET.test.d.ts +0 -1
  169. package/umd/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
  170. package/umd/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
  171. package/umd/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
  172. package/umd/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
  173. package/umd/src/commitments/WALLET/createWalletTools.d.ts +0 -7
  174. package/umd/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
  175. package/umd/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
  176. package/umd/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
  177. package/umd/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
  178. package/umd/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
  179. package/umd/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
  180. package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
  181. /package/esm/src/book-2.0/agent-source/{createAgentModelRequirements.useCommitmentAggregation.test.d.ts → createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
  182. /package/esm/src/{commitments/MEMORY/MEMORY.test.d.ts → cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
  183. /package/esm/src/{commitments/USE_BROWSER/USE_BROWSER.test.d.ts → cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
  184. /package/esm/src/{commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → cli/cli-commands/common/coderGitSyncCliOptions.test.d.ts} +0 -0
  185. /package/esm/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
  186. /package/{esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → umd/src/book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
  187. /package/{esm/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts → umd/src/cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
  188. /package/{esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → umd/src/cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
  189. /package/{esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → umd/src/cli/cli-commands/common/coderGitSyncCliOptions.test.d.ts} +0 -0
  190. /package/umd/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
@@ -0,0 +1,203 @@
1
+ /// <reference types="node" />
2
+ /**
3
+ * Loads the OpenAI AgentKit SDK (`@openai/agents`) on demand
4
+ *
5
+ * Note: [🐌] The AgentKit SDK is one of the heaviest dependencies of Promptbook, loading it eagerly would slow down
6
+ * every single run of the `ptbk` CLI utility even when no AgentKit agent is used
7
+ *
8
+ * @private internal utility of `@promptbook/openai`
9
+ */
10
+ export declare const loadOpenAiAgentsModule: () => Promise<{
11
+ default: typeof import("@openai/agents");
12
+ applyPatchTool: typeof import("@openai/agents").applyPatchTool;
13
+ shellTool: typeof import("@openai/agents").shellTool;
14
+ realtime: typeof import("@openai/agents-realtime");
15
+ RuntimeEventEmitter: typeof import("events");
16
+ Agent: typeof import("@openai/agents").Agent;
17
+ AgentsError: typeof import("@openai/agents").AgentsError;
18
+ GuardrailExecutionError: typeof import("@openai/agents").GuardrailExecutionError;
19
+ InputGuardrailTripwireTriggered: typeof import("@openai/agents").InputGuardrailTripwireTriggered;
20
+ MaxTurnsExceededError: typeof import("@openai/agents").MaxTurnsExceededError;
21
+ ModelBehaviorError: typeof import("@openai/agents").ModelBehaviorError;
22
+ OutputGuardrailTripwireTriggered: typeof import("@openai/agents").OutputGuardrailTripwireTriggered;
23
+ ToolInputGuardrailTripwireTriggered: typeof import("@openai/agents").ToolInputGuardrailTripwireTriggered;
24
+ ToolOutputGuardrailTripwireTriggered: typeof import("@openai/agents").ToolOutputGuardrailTripwireTriggered;
25
+ ToolCallError: typeof import("@openai/agents").ToolCallError;
26
+ ToolTimeoutError: typeof import("@openai/agents").ToolTimeoutError;
27
+ UserError: typeof import("@openai/agents").UserError;
28
+ SystemError: typeof import("@openai/agents").SystemError;
29
+ RunAgentUpdatedStreamEvent: typeof import("@openai/agents").RunAgentUpdatedStreamEvent;
30
+ RunRawModelStreamEvent: typeof import("@openai/agents").RunRawModelStreamEvent;
31
+ RunItemStreamEvent: typeof import("@openai/agents").RunItemStreamEvent;
32
+ defineOutputGuardrail: typeof import("@openai/agents").defineOutputGuardrail;
33
+ ToolGuardrailFunctionOutputFactory: {
34
+ allow(outputInfo?: any): import("@openai/agents").ToolGuardrailFunctionOutput;
35
+ rejectContent(message: string, outputInfo?: any): import("@openai/agents").ToolGuardrailFunctionOutput;
36
+ throwException(outputInfo?: any): import("@openai/agents").ToolGuardrailFunctionOutput;
37
+ };
38
+ defineToolInputGuardrail: typeof import("@openai/agents").defineToolInputGuardrail;
39
+ defineToolOutputGuardrail: typeof import("@openai/agents").defineToolOutputGuardrail;
40
+ resolveToolInputGuardrails: typeof import("@openai/agents").resolveToolInputGuardrails;
41
+ resolveToolOutputGuardrails: typeof import("@openai/agents").resolveToolOutputGuardrails;
42
+ getHandoff: typeof import("@openai/agents").getHandoff;
43
+ getTransferMessage: typeof import("@openai/agents").getTransferMessage;
44
+ Handoff: typeof import("@openai/agents").Handoff;
45
+ handoff: typeof import("@openai/agents").handoff;
46
+ assistant: typeof import("@openai/agents").assistant;
47
+ system: typeof import("@openai/agents").system;
48
+ user: typeof import("@openai/agents").user;
49
+ extractAllTextOutput: typeof import("@openai/agents").extractAllTextOutput;
50
+ RunHandoffCallItem: typeof import("@openai/agents").RunHandoffCallItem;
51
+ RunHandoffOutputItem: typeof import("@openai/agents").RunHandoffOutputItem;
52
+ RunMessageOutputItem: typeof import("@openai/agents").RunMessageOutputItem;
53
+ RunReasoningItem: typeof import("@openai/agents").RunReasoningItem;
54
+ RunToolApprovalItem: typeof import("@openai/agents").RunToolApprovalItem;
55
+ RunToolCallItem: typeof import("@openai/agents").RunToolCallItem;
56
+ RunToolCallOutputItem: typeof import("@openai/agents").RunToolCallOutputItem;
57
+ AgentHooks: typeof import("@openai/agents").AgentHooks;
58
+ getLogger: typeof import("@openai/agents").getLogger;
59
+ applyDiff: typeof import("@openai/agents").applyDiff;
60
+ getAllMcpTools: typeof import("@openai/agents").getAllMcpTools;
61
+ invalidateServerToolsCache: typeof import("@openai/agents").invalidateServerToolsCache;
62
+ mcpToFunctionTool: typeof import("@openai/agents").mcpToFunctionTool;
63
+ MCPServerStdio: typeof import("@openai/agents").MCPServerStdio;
64
+ MCPServerStreamableHttp: typeof import("@openai/agents").MCPServerStreamableHttp;
65
+ MCPServerSSE: typeof import("@openai/agents").MCPServerSSE;
66
+ MCPServers: typeof import("@openai/agents").MCPServers;
67
+ connectMcpServers: typeof import("@openai/agents").connectMcpServers;
68
+ createMCPToolStaticFilter: typeof import("@openai/agents").createMCPToolStaticFilter;
69
+ OPENAI_DEFAULT_MODEL_ENV_VARIABLE_NAME: "OPENAI_DEFAULT_MODEL";
70
+ gpt5ReasoningSettingsRequired: typeof import("@openai/agents").gpt5ReasoningSettingsRequired;
71
+ getDefaultModel: typeof import("@openai/agents").getDefaultModel;
72
+ getDefaultModelSettings: typeof import("@openai/agents").getDefaultModelSettings;
73
+ isGpt5Default: typeof import("@openai/agents").isGpt5Default;
74
+ setDefaultModelProvider: typeof import("@openai/agents").setDefaultModelProvider;
75
+ RunResult: typeof import("@openai/agents").RunResult;
76
+ StreamedRunResult: typeof import("@openai/agents").StreamedRunResult;
77
+ run: typeof import("@openai/agents").run;
78
+ Runner: typeof import("@openai/agents").Runner;
79
+ RunContext: typeof import("@openai/agents").RunContext;
80
+ RunState: typeof import("@openai/agents").RunState;
81
+ computerTool: typeof import("@openai/agents").computerTool;
82
+ hostedMcpTool: typeof import("@openai/agents").hostedMcpTool;
83
+ tool: typeof import("@openai/agents").tool;
84
+ invokeFunctionTool: typeof import("@openai/agents").invokeFunctionTool;
85
+ getGlobalTraceProvider: typeof import("@openai/agents").getGlobalTraceProvider;
86
+ TraceProvider: typeof import("@openai/agents").TraceProvider;
87
+ runToolInputGuardrails: typeof import("@openai/agents").runToolInputGuardrails;
88
+ runToolOutputGuardrails: typeof import("@openai/agents").runToolOutputGuardrails;
89
+ RequestUsage: typeof import("@openai/agents").RequestUsage;
90
+ Usage: typeof import("@openai/agents").Usage;
91
+ isOpenAIResponsesCompactionAwareSession: typeof import("@openai/agents").isOpenAIResponsesCompactionAwareSession;
92
+ MemorySession: typeof import("@openai/agents").MemorySession;
93
+ protocol: typeof import("@openai/agents-core/dist/types/protocol");
94
+ addTraceProcessor(processor: import("@openai/agents").TracingProcessor): void;
95
+ setTraceProcessors(processors: import("@openai/agents").TracingProcessor[]): void;
96
+ setTracingDisabled(disabled: boolean): void;
97
+ startTraceExportLoop(): void;
98
+ getCurrentSpan: typeof import("@openai/agents").getCurrentSpan;
99
+ getCurrentTrace: typeof import("@openai/agents").getCurrentTrace;
100
+ getOrCreateTrace: typeof import("@openai/agents").getOrCreateTrace;
101
+ resetCurrentSpan: typeof import("@openai/agents").resetCurrentSpan;
102
+ setCurrentSpan: typeof import("@openai/agents").setCurrentSpan;
103
+ withTrace: typeof import("@openai/agents").withTrace;
104
+ BatchTraceProcessor: typeof import("@openai/agents").BatchTraceProcessor;
105
+ ConsoleSpanExporter: typeof import("@openai/agents").ConsoleSpanExporter;
106
+ NoopSpan: typeof import("@openai/agents").NoopSpan;
107
+ Span: typeof import("@openai/agents").Span;
108
+ NoopTrace: typeof import("@openai/agents").NoopTrace;
109
+ Trace: typeof import("@openai/agents").Trace;
110
+ generateGroupId: typeof import("@openai/agents").generateGroupId;
111
+ generateSpanId: typeof import("@openai/agents").generateSpanId;
112
+ generateTraceId: typeof import("@openai/agents").generateTraceId;
113
+ createResponseSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").ResponseSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").ResponseSpanData>;
114
+ createAgentSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").AgentSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").AgentSpanData>;
115
+ createFunctionSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").FunctionSpanData>> & {
116
+ data: {
117
+ name: string;
118
+ };
119
+ }, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").FunctionSpanData>;
120
+ createHandoffSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").HandoffSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").HandoffSpanData>;
121
+ createGenerationSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").GenerationSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").GenerationSpanData>;
122
+ createCustomSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").CustomSpanData>> & {
123
+ data: {
124
+ name: string;
125
+ };
126
+ }, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").CustomSpanData>;
127
+ createGuardrailSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").GuardrailSpanData>> & {
128
+ data: {
129
+ name: string;
130
+ };
131
+ }, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").GuardrailSpanData>;
132
+ createTranscriptionSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").TranscriptionSpanData>> & {
133
+ data: {
134
+ input: {
135
+ data: string;
136
+ format: (string & {}) | "pcm";
137
+ };
138
+ };
139
+ }, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").TranscriptionSpanData>;
140
+ createSpeechSpan(options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").SpeechSpanData>> & {
141
+ data: {
142
+ output: {
143
+ data: string;
144
+ format: (string & {}) | "pcm";
145
+ };
146
+ };
147
+ }, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").SpeechSpanData>;
148
+ createSpeechGroupSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").SpeechGroupSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").SpeechGroupSpanData>;
149
+ createMCPListToolsSpan(options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").MCPListToolsSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined): import("@openai/agents").Span<import("@openai/agents").MCPListToolsSpanData>;
150
+ withResponseSpan: <TOutput>(fn: (span: import("@openai/agents").Span<import("@openai/agents").ResponseSpanData>) => Promise<TOutput>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").ResponseSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput>;
151
+ withAgentSpan: <TOutput_1>(fn: (span: import("@openai/agents").Span<import("@openai/agents").AgentSpanData>) => Promise<TOutput_1>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").AgentSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_1>;
152
+ withFunctionSpan: <TOutput_2>(fn: (span: import("@openai/agents").Span<import("@openai/agents").FunctionSpanData>) => Promise<TOutput_2>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").FunctionSpanData>> & {
153
+ data: {
154
+ name: string;
155
+ };
156
+ }, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_2>;
157
+ withHandoffSpan: <TOutput_3>(fn: (span: import("@openai/agents").Span<import("@openai/agents").HandoffSpanData>) => Promise<TOutput_3>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").HandoffSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_3>;
158
+ withGenerationSpan: <TOutput_4>(fn: (span: import("@openai/agents").Span<import("@openai/agents").GenerationSpanData>) => Promise<TOutput_4>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").GenerationSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_4>;
159
+ withCustomSpan: <TOutput_5>(fn: (span: import("@openai/agents").Span<import("@openai/agents").CustomSpanData>) => Promise<TOutput_5>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").CustomSpanData>> & {
160
+ data: {
161
+ name: string;
162
+ };
163
+ }, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_5>;
164
+ withGuardrailSpan: <TOutput_6>(fn: (span: import("@openai/agents").Span<import("@openai/agents").GuardrailSpanData>) => Promise<TOutput_6>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").GuardrailSpanData>> & {
165
+ data: {
166
+ name: string;
167
+ };
168
+ }, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_6>;
169
+ withTranscriptionSpan: <TOutput_7>(fn: (span: import("@openai/agents").Span<import("@openai/agents").TranscriptionSpanData>) => Promise<TOutput_7>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").TranscriptionSpanData>> & {
170
+ data: {
171
+ input: {
172
+ data: string;
173
+ format: (string & {}) | "pcm";
174
+ };
175
+ };
176
+ }, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_7>;
177
+ withSpeechSpan: <TOutput_8>(fn: (span: import("@openai/agents").Span<import("@openai/agents").SpeechSpanData>) => Promise<TOutput_8>, options: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").SpeechSpanData>> & {
178
+ data: {
179
+ output: {
180
+ data: string;
181
+ format: (string & {}) | "pcm";
182
+ };
183
+ };
184
+ }, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_8>;
185
+ withSpeechGroupSpan: <TOutput_9>(fn: (span: import("@openai/agents").Span<import("@openai/agents").SpeechGroupSpanData>) => Promise<TOutput_9>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").SpeechGroupSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_9>;
186
+ withMCPListToolsSpan: <TOutput_10>(fn: (span: import("@openai/agents").Span<import("@openai/agents").MCPListToolsSpanData>) => Promise<TOutput_10>, options?: import("@openai/agents-core/types").DeepPartial<import("@openai/agents-core/dist/tracing/provider").CreateSpanOptions<import("@openai/agents").MCPListToolsSpanData>> | undefined, parent?: import("@openai/agents").Trace | import("@openai/agents").Span<any> | undefined) => Promise<TOutput_10>;
187
+ OpenAIProvider: typeof import("@openai/agents").OpenAIProvider;
188
+ OpenAIResponsesModel: typeof import("@openai/agents").OpenAIResponsesModel;
189
+ OpenAIChatCompletionsModel: typeof import("@openai/agents").OpenAIChatCompletionsModel;
190
+ setDefaultOpenAIClient: typeof import("@openai/agents").setDefaultOpenAIClient;
191
+ setOpenAIAPI: typeof import("@openai/agents").setOpenAIAPI;
192
+ setDefaultOpenAIKey: typeof import("@openai/agents").setDefaultOpenAIKey;
193
+ setTracingExportApiKey: typeof import("@openai/agents").setTracingExportApiKey;
194
+ setDefaultOpenAITracingExporter: typeof import("@openai/agents").setDefaultOpenAITracingExporter;
195
+ OpenAITracingExporter: typeof import("@openai/agents").OpenAITracingExporter;
196
+ webSearchTool: typeof import("@openai/agents").webSearchTool;
197
+ fileSearchTool: typeof import("@openai/agents").fileSearchTool;
198
+ codeInterpreterTool: typeof import("@openai/agents").codeInterpreterTool;
199
+ imageGenerationTool: typeof import("@openai/agents").imageGenerationTool;
200
+ OpenAIConversationsSession: typeof import("@openai/agents").OpenAIConversationsSession;
201
+ startOpenAIConversationsSession: typeof import("@openai/agents").startOpenAIConversationsSession;
202
+ OpenAIResponsesCompactionSession: typeof import("@openai/agents").OpenAIResponsesCompactionSession;
203
+ }>;
@@ -1,4 +1,4 @@
1
- import OpenAI from 'openai';
1
+ import type OpenAI from 'openai';
2
2
  /**
3
3
  * Uploads files to OpenAI and returns their IDs
4
4
  *
@@ -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, use fetchUrlContentViaBrowser which proxies through
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 for USE BROWSER commitment
16
+ * @private internal scraping utility
18
17
  */
19
18
  export declare function fetchUrlContent(url: string): Promise<string>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Creates a loader which imports one module on the first call and reuses the very same module afterwards
3
+ *
4
+ * Note: [🐌] Heavy third-party dependencies are imported lazily to keep the startup of the Promptbook CLI fast.
5
+ * A statically imported dependency is loaded every single time the bundle is loaded, even when the running
6
+ * command never touches it. A lazily imported dependency is loaded only when the feature is really used.
7
+ *
8
+ * @example
9
+ * const loadJsdomModule = createLazyModuleLoader(() => import('jsdom'));
10
+ * const { JSDOM } = await loadJsdomModule();
11
+ *
12
+ * @private internal utility of Promptbook
13
+ */
14
+ export declare function createLazyModuleLoader<TModule>(importModule: () => Promise<TModule>): () => Promise<TModule>;
@@ -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.113.1-0`).
18
+ * It follows semantic versioning (e.g., `0.114.0-3`).
19
19
  *
20
20
  * @generated
21
21
  */
@@ -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
- };
@@ -1,149 +0,0 @@
1
- import type { TODO_any } from '../../utils/organization/TODO_any';
2
- /**
3
- * Tool arguments for retrieving memory.
4
- *
5
- * @private type of MemoryCommitmentDefinition
6
- */
7
- export type RetrieveMemoryToolArgs = {
8
- query?: string;
9
- limit?: number;
10
- [key: string]: TODO_any;
11
- };
12
- /**
13
- * Tool arguments for storing memory.
14
- *
15
- * @private type of MemoryCommitmentDefinition
16
- */
17
- export type StoreMemoryToolArgs = {
18
- content?: string;
19
- isGlobal?: boolean;
20
- [key: string]: TODO_any;
21
- };
22
- /**
23
- * Tool arguments for updating memory.
24
- *
25
- * @private type of MemoryCommitmentDefinition
26
- */
27
- export type UpdateMemoryToolArgs = {
28
- memoryId?: string;
29
- content?: string;
30
- isGlobal?: boolean;
31
- [key: string]: TODO_any;
32
- };
33
- /**
34
- * Tool arguments for deleting memory.
35
- *
36
- * @private type of MemoryCommitmentDefinition
37
- */
38
- export type DeleteMemoryToolArgs = {
39
- memoryId?: string;
40
- [key: string]: TODO_any;
41
- };
42
- /**
43
- * Memory record returned by runtime adapters.
44
- *
45
- * @private type of MemoryCommitmentDefinition
46
- */
47
- export type MemoryToolRecord = {
48
- id?: string;
49
- content: string;
50
- isGlobal: boolean;
51
- createdAt?: string;
52
- updatedAt?: string;
53
- };
54
- /**
55
- * Runtime context for MEMORY tools resolved from hidden tool arguments.
56
- *
57
- * @private type of MemoryCommitmentDefinition
58
- */
59
- export type MemoryToolRuntimeContext = {
60
- readonly enabled: boolean;
61
- readonly userId?: number;
62
- readonly username?: string;
63
- readonly agentId?: string;
64
- readonly agentName?: string;
65
- readonly isTeamConversation: boolean;
66
- readonly isPrivateMode: boolean;
67
- };
68
- /**
69
- * Result payload returned by retrieve memory tool.
70
- *
71
- * @private type of MemoryCommitmentDefinition
72
- */
73
- export type RetrieveMemoryToolResult = {
74
- action: 'retrieve';
75
- status: 'ok' | 'disabled' | 'error';
76
- query?: string;
77
- memories: MemoryToolRecord[];
78
- message?: string;
79
- };
80
- /**
81
- * Result payload returned by store memory tool.
82
- *
83
- * @private type of MemoryCommitmentDefinition
84
- */
85
- export type StoreMemoryToolResult = {
86
- action: 'store';
87
- status: 'stored' | 'disabled' | 'error';
88
- memory?: MemoryToolRecord;
89
- message?: string;
90
- };
91
- /**
92
- * Result payload returned by update memory tool.
93
- *
94
- * @private type of MemoryCommitmentDefinition
95
- */
96
- export type UpdateMemoryToolResult = {
97
- action: 'update';
98
- status: 'updated' | 'disabled' | 'error';
99
- memory?: MemoryToolRecord;
100
- message?: string;
101
- };
102
- /**
103
- * Result payload returned by delete memory tool.
104
- *
105
- * @private type of MemoryCommitmentDefinition
106
- */
107
- export type DeleteMemoryToolResult = {
108
- action: 'delete';
109
- status: 'deleted' | 'disabled' | 'error';
110
- memoryId?: string;
111
- message?: string;
112
- };
113
- /**
114
- * Union of all MEMORY tool actions.
115
- *
116
- * @private type of MemoryCommitmentDefinition
117
- */
118
- export type MemoryToolAction = RetrieveMemoryToolResult['action'] | StoreMemoryToolResult['action'] | UpdateMemoryToolResult['action'] | DeleteMemoryToolResult['action'];
119
- /**
120
- * Union of all MEMORY tool result payloads.
121
- *
122
- * @private type of MemoryCommitmentDefinition
123
- */
124
- export type MemoryToolResult = RetrieveMemoryToolResult | StoreMemoryToolResult | UpdateMemoryToolResult | DeleteMemoryToolResult;
125
- /**
126
- * Runtime adapter interface used by MEMORY tools.
127
- *
128
- * @private type of MemoryCommitmentDefinition
129
- */
130
- export type MemoryToolRuntimeAdapter = {
131
- retrieveMemories(args: {
132
- query?: string;
133
- limit?: number;
134
- }, runtimeContext: MemoryToolRuntimeContext): Promise<MemoryToolRecord[]>;
135
- storeMemory(args: {
136
- content: string;
137
- isGlobal: boolean;
138
- }, runtimeContext: MemoryToolRuntimeContext): Promise<MemoryToolRecord>;
139
- updateMemory(args: {
140
- memoryId: string;
141
- content: string;
142
- isGlobal?: boolean;
143
- }, runtimeContext: MemoryToolRuntimeContext): Promise<MemoryToolRecord>;
144
- deleteMemory(args: {
145
- memoryId: string;
146
- }, runtimeContext: MemoryToolRuntimeContext): Promise<{
147
- id?: string;
148
- }>;
149
- };
@@ -1,6 +0,0 @@
1
- /**
2
- * Builds the MEMORY instruction block appended to the system message.
3
- *
4
- * @private function of MemoryCommitmentDefinition
5
- */
6
- export declare function createMemorySystemMessage(extraInstructions: string): string;
@@ -1,8 +0,0 @@
1
- import type { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions';
2
- import type { string_javascript_name } from '../../types/string_person_fullname';
3
- /**
4
- * Gets MEMORY tool function implementations.
5
- *
6
- * @private function of MemoryCommitmentDefinition
7
- */
8
- export declare function createMemoryToolFunctions(): Record<string_javascript_name, ToolFunction>;
@@ -1,14 +0,0 @@
1
- import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
2
- /**
3
- * Concrete type of tool definitions in `AgentModelRequirements`.
4
- *
5
- * @private type of MemoryCommitmentDefinition
6
- */
7
- type AgentModelTools = NonNullable<AgentModelRequirements['tools']>;
8
- /**
9
- * Creates MEMORY tool definitions while preserving already-registered tools.
10
- *
11
- * @private function of MemoryCommitmentDefinition
12
- */
13
- export declare function createMemoryTools(existingTools: AgentModelRequirements['tools']): AgentModelTools;
14
- export {};
@@ -1,6 +0,0 @@
1
- /**
2
- * Markdown documentation for MEMORY commitment.
3
- *
4
- * @private function of MemoryCommitmentDefinition
5
- */
6
- export declare function getMemoryCommitmentDocumentation(type: 'MEMORY' | 'MEMORIES'): string;
@@ -1,17 +0,0 @@
1
- import type { DeleteMemoryToolResult, MemoryToolAction, MemoryToolRuntimeAdapter, MemoryToolRuntimeContext, RetrieveMemoryToolResult, StoreMemoryToolResult, UpdateMemoryToolResult } from './MemoryToolRuntimeAdapter';
2
- /**
3
- * Return type of MEMORY adapter resolution helper.
4
- *
5
- * @private type of MemoryCommitmentDefinition
6
- */
7
- type MemoryToolRuntimeAdapterResolution = {
8
- adapter: MemoryToolRuntimeAdapter | null;
9
- disabledResult: RetrieveMemoryToolResult | StoreMemoryToolResult | UpdateMemoryToolResult | DeleteMemoryToolResult | null;
10
- };
11
- /**
12
- * Gets the runtime adapter and returns a disabled result when unavailable.
13
- *
14
- * @private function of MemoryCommitmentDefinition
15
- */
16
- export declare function getMemoryToolRuntimeAdapterOrDisabledResult(action: MemoryToolAction, runtimeContext: MemoryToolRuntimeContext): MemoryToolRuntimeAdapterResolution;
17
- export {};
@@ -1,7 +0,0 @@
1
- import type { string_javascript_name } from '../../types/string_person_fullname';
2
- /**
3
- * Gets human-readable titles for MEMORY tool functions.
4
- *
5
- * @private function of MemoryCommitmentDefinition
6
- */
7
- export declare function getMemoryToolTitles(): Record<string_javascript_name, string>;
@@ -1,61 +0,0 @@
1
- import type { DeleteMemoryToolArgs, RetrieveMemoryToolArgs, StoreMemoryToolArgs, UpdateMemoryToolArgs } from './MemoryToolRuntimeAdapter';
2
- /**
3
- * Parsed retrieve memory arguments.
4
- *
5
- * @private type of MemoryCommitmentDefinition
6
- */
7
- type ParsedRetrieveMemoryArgs = {
8
- query?: string;
9
- limit?: number;
10
- };
11
- /**
12
- * Parsed store memory arguments.
13
- *
14
- * @private type of MemoryCommitmentDefinition
15
- */
16
- type ParsedStoreMemoryArgs = {
17
- content: string;
18
- isGlobal: boolean;
19
- };
20
- /**
21
- * Parsed update memory arguments.
22
- *
23
- * @private type of MemoryCommitmentDefinition
24
- */
25
- type ParsedUpdateMemoryArgs = {
26
- memoryId: string;
27
- content: string;
28
- isGlobal?: boolean;
29
- };
30
- /**
31
- * Parsed delete memory arguments.
32
- *
33
- * @private type of MemoryCommitmentDefinition
34
- */
35
- type ParsedDeleteMemoryArgs = {
36
- memoryId: string;
37
- };
38
- /**
39
- * Collection of MEMORY tool argument parsers.
40
- *
41
- * @private function of MemoryCommitmentDefinition
42
- */
43
- export declare const parseMemoryToolArgs: {
44
- /**
45
- * Parses retrieve memory arguments.
46
- */
47
- retrieve(args: RetrieveMemoryToolArgs): ParsedRetrieveMemoryArgs;
48
- /**
49
- * Parses store memory arguments.
50
- */
51
- store(args: StoreMemoryToolArgs): ParsedStoreMemoryArgs;
52
- /**
53
- * Parses update memory arguments.
54
- */
55
- update(args: UpdateMemoryToolArgs): ParsedUpdateMemoryArgs;
56
- /**
57
- * Parses delete memory arguments.
58
- */
59
- delete(args: DeleteMemoryToolArgs): ParsedDeleteMemoryArgs;
60
- };
61
- export {};
@@ -1,8 +0,0 @@
1
- import type { TODO_any } from '../../utils/organization/TODO_any';
2
- import type { MemoryToolRuntimeContext } from './MemoryToolRuntimeAdapter';
3
- /**
4
- * Resolves runtime context from hidden tool arguments.
5
- *
6
- * @private function of MemoryCommitmentDefinition
7
- */
8
- export declare function resolveMemoryRuntimeContext(args: Record<string, TODO_any>): MemoryToolRuntimeContext;
@@ -1,13 +0,0 @@
1
- import type { MemoryToolRuntimeAdapter } from './MemoryToolRuntimeAdapter';
2
- /**
3
- * Sets runtime adapter used by MEMORY commitment tools.
4
- *
5
- * @private function of MemoryCommitmentDefinition
6
- */
7
- export declare function setMemoryToolRuntimeAdapter(adapter: MemoryToolRuntimeAdapter | null): void;
8
- /**
9
- * Gets runtime adapter used by MEMORY commitment tools.
10
- *
11
- * @private function of MemoryCommitmentDefinition
12
- */
13
- export declare function getMemoryToolRuntimeAdapter(): MemoryToolRuntimeAdapter | null;