@promptbook/cli 0.104.0-1 → 0.104.0-11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/agents-server/config.ts +1 -3
- package/apps/agents-server/next.config.ts +2 -2
- package/apps/agents-server/package.json +7 -3
- package/apps/agents-server/public/fonts/OpenMoji-color-cbdt.woff2 +0 -0
- package/apps/agents-server/public/swagger.json +115 -0
- package/apps/agents-server/scripts/generate-reserved-paths/generate-reserved-paths.ts +54 -0
- package/apps/agents-server/scripts/generate-reserved-paths/tsconfig.json +19 -0
- package/apps/agents-server/src/app/AddAgentButton.tsx +47 -21
- package/apps/agents-server/src/app/actions.ts +22 -5
- package/apps/agents-server/src/app/admin/browser-test/BrowserTestClient.tsx +211 -0
- package/apps/agents-server/src/app/admin/browser-test/page.tsx +13 -0
- package/apps/agents-server/src/app/admin/chat-feedback/ChatFeedbackClient.tsx +221 -274
- package/apps/agents-server/src/app/admin/chat-history/ChatHistoryClient.tsx +94 -137
- package/apps/agents-server/src/app/admin/files/FilesGalleryClient.tsx +263 -0
- package/apps/agents-server/src/app/admin/files/actions.ts +61 -0
- package/apps/agents-server/src/app/admin/files/page.tsx +13 -0
- package/apps/agents-server/src/app/admin/image-generator-test/ImageGeneratorTestClient.tsx +169 -0
- package/apps/agents-server/src/app/admin/image-generator-test/page.tsx +13 -0
- package/apps/agents-server/src/app/admin/images/ImagesGalleryClient.tsx +256 -0
- package/apps/agents-server/src/app/admin/images/actions.ts +60 -0
- package/apps/agents-server/src/app/admin/images/page.tsx +13 -0
- package/apps/agents-server/src/app/admin/messages/MessagesClient.tsx +294 -0
- package/apps/agents-server/src/app/admin/messages/page.tsx +13 -0
- package/apps/agents-server/src/app/admin/messages/send-email/SendEmailClient.tsx +104 -0
- package/apps/agents-server/src/app/admin/messages/send-email/actions.ts +35 -0
- package/apps/agents-server/src/app/admin/messages/send-email/page.tsx +13 -0
- package/apps/agents-server/src/app/admin/metadata/MetadataClient.tsx +23 -19
- package/apps/agents-server/src/app/admin/search-engine-test/SearchEngineTestClient.tsx +109 -0
- package/apps/agents-server/src/app/admin/search-engine-test/actions.ts +17 -0
- package/apps/agents-server/src/app/admin/search-engine-test/page.tsx +13 -0
- package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +15 -1
- package/apps/agents-server/src/app/agents/[agentName]/AgentOptionsMenu.tsx +51 -9
- package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +47 -4
- package/apps/agents-server/src/app/agents/[agentName]/AgentProfileWrapper.tsx +53 -11
- package/apps/agents-server/src/app/agents/[agentName]/_utils.ts +23 -3
- package/apps/agents-server/src/app/agents/[agentName]/agentLinks.tsx +8 -8
- package/apps/agents-server/src/app/agents/[agentName]/api/agents/route.ts +17 -26
- package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +4 -2
- package/apps/agents-server/src/app/agents/[agentName]/api/chat/route.ts +20 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/mcp/route.ts +6 -11
- package/apps/agents-server/src/app/agents/[agentName]/api/profile/route.ts +5 -1
- package/apps/agents-server/src/app/agents/[agentName]/api/voice/route.ts +5 -2
- package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorWrapper.tsx +20 -16
- package/apps/agents-server/src/app/agents/[agentName]/book/page.tsx +15 -2
- package/apps/agents-server/src/app/agents/[agentName]/book+chat/page.tsx +15 -2
- package/apps/agents-server/src/app/agents/[agentName]/chat/page.tsx +12 -0
- package/apps/agents-server/src/app/agents/[agentName]/code/api/route.ts +68 -0
- package/apps/agents-server/src/app/agents/[agentName]/code/page.tsx +223 -0
- package/apps/agents-server/src/app/agents/[agentName]/generateAgentMetadata.ts +5 -0
- package/apps/agents-server/src/app/agents/[agentName]/history/actions.ts +2 -2
- package/apps/agents-server/src/app/agents/[agentName]/history/page.tsx +10 -3
- package/apps/agents-server/src/app/agents/[agentName]/images/default-avatar.png/getAgentDefaultAvatarPrompt.ts +31 -0
- package/apps/agents-server/src/app/agents/[agentName]/images/default-avatar.png/route.ts +194 -0
- package/apps/agents-server/src/app/agents/[agentName]/images/icon-256.png/route.tsx +14 -2
- package/apps/agents-server/src/app/agents/[agentName]/images/page.tsx +200 -0
- package/apps/agents-server/src/app/agents/[agentName]/images/screenshot-fullhd.png/route.tsx +4 -3
- package/apps/agents-server/src/app/agents/[agentName]/images/screenshot-phone.png/route.tsx +4 -3
- package/apps/agents-server/src/app/agents/[agentName]/integration/page.tsx +10 -3
- package/apps/agents-server/src/app/agents/[agentName]/links/page.tsx +11 -4
- package/apps/agents-server/src/app/agents/[agentName]/opengraph-image.tsx +11 -2
- package/apps/agents-server/src/app/agents/[agentName]/page.tsx +18 -10
- package/apps/agents-server/src/app/agents/[agentName]/system-message/page.tsx +100 -0
- package/apps/agents-server/src/app/api/admin-email/route.ts +12 -0
- package/apps/agents-server/src/app/api/agents/[agentName]/clone/route.ts +13 -14
- package/apps/agents-server/src/app/api/agents/[agentName]/restore/route.ts +20 -0
- package/apps/agents-server/src/app/api/agents/[agentName]/route.ts +43 -1
- package/apps/agents-server/src/app/api/agents/route.ts +28 -3
- package/apps/agents-server/src/app/api/api-tokens/route.ts +6 -7
- package/apps/agents-server/src/app/api/browser-test/act/route.ts +141 -0
- package/apps/agents-server/src/app/api/browser-test/screenshot/route.ts +30 -0
- package/apps/agents-server/src/app/api/browser-test/scroll-facebook/route.ts +62 -0
- package/apps/agents-server/src/app/api/docs/book.md/route.ts +61 -0
- package/apps/agents-server/src/app/api/emails/incoming/sendgrid/route.ts +48 -0
- package/apps/agents-server/src/app/api/federated-agents/route.ts +12 -0
- package/apps/agents-server/src/app/api/images/[filename]/route.ts +128 -0
- package/apps/agents-server/src/app/api/messages/route.ts +102 -0
- package/apps/agents-server/src/app/api/metadata/route.ts +5 -6
- package/apps/agents-server/src/app/api/upload/route.ts +128 -45
- package/apps/agents-server/src/app/docs/[docId]/page.tsx +2 -3
- package/apps/agents-server/src/app/docs/page.tsx +12 -12
- package/apps/agents-server/src/app/globals.css +140 -33
- package/apps/agents-server/src/app/humans.txt/route.ts +1 -1
- package/apps/agents-server/src/app/layout.tsx +27 -22
- package/apps/agents-server/src/app/page.tsx +54 -6
- package/apps/agents-server/src/app/recycle-bin/actions.ts +20 -14
- package/apps/agents-server/src/app/recycle-bin/page.tsx +27 -41
- package/apps/agents-server/src/app/robots.txt/route.ts +1 -1
- package/apps/agents-server/src/app/security.txt/route.ts +1 -1
- package/apps/agents-server/src/app/sitemap.xml/route.ts +9 -7
- package/apps/agents-server/src/app/swagger/page.tsx +14 -0
- package/apps/agents-server/src/components/AgentProfile/AgentCapabilityChips.tsx +38 -0
- package/apps/agents-server/src/components/AgentProfile/AgentProfile.tsx +44 -116
- package/apps/agents-server/src/components/AgentProfile/AgentProfileImage.tsx +92 -0
- package/apps/agents-server/src/components/AgentProfile/QrCodeModal.tsx +0 -1
- package/apps/agents-server/src/components/AgentProfile/useAgentBackground.ts +97 -0
- package/apps/agents-server/src/components/Auth/AuthControls.tsx +5 -4
- package/apps/agents-server/src/components/DeletedAgentBanner.tsx +26 -0
- package/apps/agents-server/src/components/DocsToolbar/DocsToolbar.tsx +38 -0
- package/apps/agents-server/src/components/DocumentationContent/DocumentationContent.tsx +11 -9
- package/apps/agents-server/src/components/Footer/Footer.tsx +5 -5
- package/apps/agents-server/src/components/ForgottenPasswordDialog/ForgottenPasswordDialog.tsx +61 -0
- package/apps/agents-server/src/components/Header/Header.tsx +130 -40
- package/apps/agents-server/src/components/Homepage/AgentCard.tsx +150 -23
- package/apps/agents-server/src/components/Homepage/AgentsList.tsx +93 -15
- package/apps/agents-server/src/components/Homepage/DeletedAgentsList.tsx +66 -0
- package/apps/agents-server/src/components/Homepage/ExternalAgentsSection.tsx +12 -3
- package/apps/agents-server/src/components/Homepage/ExternalAgentsSectionClient.tsx +19 -10
- package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +3 -2
- package/apps/agents-server/src/components/LoginForm/LoginForm.tsx +50 -1
- package/apps/agents-server/src/components/NewAgentDialog/NewAgentDialog.tsx +88 -0
- package/apps/agents-server/src/components/NotFoundPage/NotFoundPage.tsx +7 -2
- package/apps/agents-server/src/components/OpenMojiIcon/OpenMojiIcon.tsx +16 -7
- package/apps/agents-server/src/components/PrintHeader/PrintHeader.tsx +4 -4
- package/apps/agents-server/src/components/RegisterUserDialog/RegisterUserDialog.tsx +61 -0
- package/apps/agents-server/src/components/VercelDeploymentCard/VercelDeploymentCard.tsx +2 -0
- package/apps/agents-server/src/components/_utils/generateMetaTxt.ts +12 -10
- package/apps/agents-server/src/components/_utils/headlessParam.tsx +7 -3
- package/apps/agents-server/src/database/$getTableName.ts +1 -0
- package/apps/agents-server/src/database/$provideSupabaseForBrowser.ts +3 -3
- package/apps/agents-server/src/database/$provideSupabaseForServer.ts +1 -1
- package/apps/agents-server/src/database/$provideSupabaseForWorker.ts +3 -3
- package/apps/agents-server/src/database/metadataDefaults.ts +19 -1
- package/apps/agents-server/src/database/migrate.ts +34 -1
- package/apps/agents-server/src/database/migrations/2025-11-0001-initial-schema.sql +1 -3
- package/apps/agents-server/src/database/migrations/2025-11-0002-metadata-table.sql +1 -3
- package/apps/agents-server/src/database/migrations/2025-12-0240-agent-public-id.sql +3 -0
- package/apps/agents-server/src/database/migrations/2025-12-0360-agent-deleted-at.sql +1 -0
- package/apps/agents-server/src/database/migrations/2025-12-0370-image-table.sql +19 -0
- package/apps/agents-server/src/database/migrations/2025-12-0380-agent-visibility.sql +1 -0
- package/apps/agents-server/src/database/migrations/2025-12-0390-upload-tracking.sql +20 -0
- package/apps/agents-server/src/database/migrations/2025-12-0401-file-upload-status.sql +13 -0
- package/apps/agents-server/src/database/migrations/2025-12-0402-message-table.sql +42 -0
- package/apps/agents-server/src/database/migrations/2025-12-0403-generation-lock-table.sql +15 -0
- package/apps/agents-server/src/database/migrations/2025-12-0640-openai-assistant-cache.sql +12 -0
- package/apps/agents-server/src/database/migrations/2025-12-0820-agent-history-permanent-id.sql +29 -0
- package/apps/agents-server/src/database/migrations/2025-12-0830-image-purpose.sql +5 -0
- package/apps/agents-server/src/database/migrations/2025-12-0890-file-agent-id.sql +5 -0
- package/apps/agents-server/src/database/schema.ts +244 -4
- package/apps/agents-server/src/generated/reservedPaths.ts +32 -0
- package/apps/agents-server/src/message-providers/email/_common/Email.ts +73 -0
- package/apps/agents-server/src/message-providers/email/_common/utils/TODO.txt +1 -0
- package/apps/agents-server/src/message-providers/email/_common/utils/parseEmailAddress.test.ts.todo +108 -0
- package/apps/agents-server/src/message-providers/email/_common/utils/parseEmailAddress.ts +62 -0
- package/apps/agents-server/src/message-providers/email/_common/utils/parseEmailAddresses.test.ts.todo +117 -0
- package/apps/agents-server/src/message-providers/email/_common/utils/parseEmailAddresses.ts +19 -0
- package/apps/agents-server/src/message-providers/email/_common/utils/stringifyEmailAddress.test.ts.todo +119 -0
- package/apps/agents-server/src/message-providers/email/_common/utils/stringifyEmailAddress.ts +19 -0
- package/apps/agents-server/src/message-providers/email/_common/utils/stringifyEmailAddresses.test.ts.todo +74 -0
- package/apps/agents-server/src/message-providers/email/_common/utils/stringifyEmailAddresses.ts +14 -0
- package/apps/agents-server/src/message-providers/email/sendgrid/SendgridMessageProvider.ts +44 -0
- package/apps/agents-server/src/message-providers/email/sendgrid/parseInboundSendgridEmail.ts +49 -0
- package/apps/agents-server/src/message-providers/email/zeptomail/ZeptomailMessageProvider.ts +51 -0
- package/apps/agents-server/src/message-providers/index.ts +13 -0
- package/apps/agents-server/src/message-providers/interfaces/MessageProvider.ts +11 -0
- package/apps/agents-server/src/middleware.ts +19 -23
- package/apps/agents-server/src/tools/$provideBrowserForServer.ts +32 -0
- package/apps/agents-server/src/tools/$provideCdnForServer.ts +7 -2
- package/apps/agents-server/src/utils/auth.ts +117 -17
- package/apps/agents-server/src/utils/cdn/classes/TrackedFilesStorage.ts +57 -0
- package/apps/agents-server/src/utils/cdn/classes/VercelBlobStorage.ts +4 -0
- package/apps/agents-server/src/utils/cdn/interfaces/IFilesStorage.ts +18 -0
- package/apps/agents-server/src/utils/content/extractBodyContentFromHtml.ts +19 -0
- package/apps/agents-server/src/utils/getUserIdFromRequest.ts +35 -0
- package/apps/agents-server/src/utils/handleChatCompletion.ts +65 -5
- package/apps/agents-server/src/utils/messages/sendMessage.ts +91 -0
- package/apps/agents-server/src/utils/messagesAdmin.ts +72 -0
- package/apps/agents-server/src/utils/normalization/filenameToPrompt.test.ts +36 -0
- package/apps/agents-server/src/utils/normalization/filenameToPrompt.ts +25 -0
- package/apps/agents-server/src/utils/validateApiKey.ts +7 -11
- package/esm/index.es.js +1534 -1330
- package/esm/index.es.js.map +1 -1
- package/esm/typings/servers.d.ts +8 -0
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +16 -2
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +29 -1
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +6 -6
- package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.closed.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +3 -3
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageItem.d.ts +5 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/CodeBlock/CodeBlock.d.ts +13 -0
- package/esm/typings/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +9 -13
- package/esm/typings/src/book-components/_common/Dropdown/Dropdown.d.ts +3 -3
- package/esm/typings/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +1 -1
- package/esm/typings/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +56 -0
- package/esm/typings/src/book-components/icons/AboutIcon.d.ts +1 -1
- package/esm/typings/src/book-components/icons/AttachmentIcon.d.ts +1 -1
- package/esm/typings/src/book-components/icons/CameraIcon.d.ts +1 -1
- package/esm/typings/src/book-components/icons/DownloadIcon.d.ts +1 -1
- package/esm/typings/src/book-components/icons/MenuIcon.d.ts +1 -1
- package/esm/typings/src/book-components/icons/SaveIcon.d.ts +1 -1
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -12
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +27 -15
- package/esm/typings/src/commitments/DICTIONARY/DICTIONARY.d.ts +46 -0
- package/esm/typings/src/commitments/index.d.ts +2 -1
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +1 -1
- package/esm/typings/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +6 -2
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +6 -1
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/ollama/OllamaExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -0
- package/esm/typings/src/remote-server/ui/ServerApp.d.ts +1 -1
- package/esm/typings/src/search-engines/SearchEngine.d.ts +9 -0
- package/esm/typings/src/search-engines/SearchResult.d.ts +18 -0
- package/esm/typings/src/search-engines/bing/BingSearchEngine.d.ts +15 -0
- package/esm/typings/src/search-engines/dummy/DummySearchEngine.d.ts +15 -0
- package/esm/typings/src/types/Message.d.ts +49 -0
- package/esm/typings/src/types/ModelRequirements.d.ts +38 -14
- package/esm/typings/src/types/typeAliases.d.ts +23 -1
- package/esm/typings/src/utils/color/utils/colorToDataUrl.d.ts +2 -1
- package/esm/typings/src/utils/environment/$detectRuntimeEnvironment.d.ts +4 -4
- package/esm/typings/src/utils/environment/$isRunningInBrowser.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInJest.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInNode.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInWebWorker.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/random/$randomAgentPersona.d.ts +3 -2
- package/esm/typings/src/utils/random/$randomBase58.d.ts +12 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +1542 -1338
- package/umd/index.umd.js.map +1 -1
- package/apps/agents-server/package-lock.json +0 -27
- package/apps/agents-server/public/fonts/download-font.js +0 -22
- package/apps/agents-server/src/components/PrintButton/PrintButton.tsx +0 -18
- package/esm/typings/src/book-2.0/utils/generateGravatarUrl.d.ts +0 -10
package/esm/typings/servers.d.ts
CHANGED
|
@@ -22,6 +22,14 @@ type ServerConfiguration = {
|
|
|
22
22
|
*/
|
|
23
23
|
urls: Array<string_promptbook_server_url>;
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Core Promptbook server configuration.
|
|
27
|
+
*
|
|
28
|
+
* This server is also used for auto-federation in the Agents Server.
|
|
29
|
+
*
|
|
30
|
+
* @public exported from `@promptbook/core`
|
|
31
|
+
*/
|
|
32
|
+
export declare const CORE_SERVER: ServerConfiguration;
|
|
25
33
|
/**
|
|
26
34
|
* Available remote servers for the Promptbook
|
|
27
35
|
*
|
|
@@ -191,6 +191,7 @@ import { SectionTypes } from '../types/SectionType';
|
|
|
191
191
|
import { TaskTypes } from '../types/TaskType';
|
|
192
192
|
import { aboutPromptbookInformation } from '../utils/misc/aboutPromptbookInformation';
|
|
193
193
|
import { $generateBookBoilerplate } from '../utils/random/$generateBookBoilerplate';
|
|
194
|
+
import { CORE_SERVER } from '../../servers';
|
|
194
195
|
import { REMOTE_SERVER_URLS } from '../../servers';
|
|
195
196
|
import { AUTO_FEDERATED_AGENT_SERVER_URLS } from '../../servers';
|
|
196
197
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
@@ -386,5 +387,6 @@ export { SectionTypes };
|
|
|
386
387
|
export { TaskTypes };
|
|
387
388
|
export { aboutPromptbookInformation };
|
|
388
389
|
export { $generateBookBoilerplate };
|
|
390
|
+
export { CORE_SERVER };
|
|
389
391
|
export { REMOTE_SERVER_URLS };
|
|
390
392
|
export { AUTO_FEDERATED_AGENT_SERVER_URLS };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BookParameter } from '../book-2.0/agent-source/AgentBasicInformation';
|
|
2
|
+
import type { AgentCapability } from '../book-2.0/agent-source/AgentBasicInformation';
|
|
2
3
|
import type { AgentBasicInformation } from '../book-2.0/agent-source/AgentBasicInformation';
|
|
3
4
|
import type { AgentModelRequirements } from '../book-2.0/agent-source/AgentModelRequirements';
|
|
4
5
|
import type { string_book } from '../book-2.0/agent-source/string_book';
|
|
@@ -178,6 +179,8 @@ import type { ScraperSourceHandler } from '../scrapers/_common/Scraper';
|
|
|
178
179
|
import type { ScraperIntermediateSource } from '../scrapers/_common/ScraperIntermediateSource';
|
|
179
180
|
import type { JavascriptExecutionToolsOptions } from '../scripting/javascript/JavascriptExecutionToolsOptions';
|
|
180
181
|
import type { PostprocessingFunction } from '../scripting/javascript/JavascriptExecutionToolsOptions';
|
|
182
|
+
import type { SearchEngine } from '../search-engines/SearchEngine';
|
|
183
|
+
import type { SearchResult } from '../search-engines/SearchResult';
|
|
181
184
|
import type { PromptbookStorage } from '../storage/_common/PromptbookStorage';
|
|
182
185
|
import type { FileCacheStorageOptions } from '../storage/file-cache-storage/FileCacheStorageOptions';
|
|
183
186
|
import type { IndexedDbStorageOptions } from '../storage/local-storage/utils/IndexedDbStorageOptions';
|
|
@@ -185,6 +188,7 @@ import type { BookTranspiler } from '../transpilers/_common/BookTranspiler';
|
|
|
185
188
|
import type { BookTranspilerOptions } from '../transpilers/_common/BookTranspilerOptions';
|
|
186
189
|
import type { IntermediateFilesStrategy } from '../types/IntermediateFilesStrategy';
|
|
187
190
|
import type { LlmCall } from '../types/LlmCall';
|
|
191
|
+
import type { Message } from '../types/Message';
|
|
188
192
|
import type { ModelRequirements } from '../types/ModelRequirements';
|
|
189
193
|
import type { CompletionModelRequirements } from '../types/ModelRequirements';
|
|
190
194
|
import type { ChatModelRequirements } from '../types/ModelRequirements';
|
|
@@ -205,6 +209,7 @@ import type { string_char_emoji } from '../types/typeAliasEmoji';
|
|
|
205
209
|
import type { string_business_category_name } from '../types/typeAliases';
|
|
206
210
|
import type { string_model_name } from '../types/typeAliases';
|
|
207
211
|
import type { string_prompt } from '../types/typeAliases';
|
|
212
|
+
import type { string_prompt_image } from '../types/typeAliases';
|
|
208
213
|
import type { string_template } from '../types/typeAliases';
|
|
209
214
|
import type { string_text_prompt } from '../types/typeAliases';
|
|
210
215
|
import type { string_chat_prompt } from '../types/typeAliases';
|
|
@@ -225,6 +230,7 @@ import type { string_title } from '../types/typeAliases';
|
|
|
225
230
|
import type { string_agent_name } from '../types/typeAliases';
|
|
226
231
|
import type { string_agent_name_in_book } from '../types/typeAliases';
|
|
227
232
|
import type { string_agent_hash } from '../types/typeAliases';
|
|
233
|
+
import type { string_agent_permanent_id } from '../types/typeAliases';
|
|
228
234
|
import type { string_persona_description } from '../types/typeAliases';
|
|
229
235
|
import type { string_model_description } from '../types/typeAliases';
|
|
230
236
|
import type { string_knowledge_source_content } from '../types/typeAliases';
|
|
@@ -275,6 +281,7 @@ import type { string_uuid } from '../types/typeAliases';
|
|
|
275
281
|
import type { string_app_id } from '../types/typeAliases';
|
|
276
282
|
import type { string_user_id } from '../types/typeAliases';
|
|
277
283
|
import type { string_sha256 } from '../types/typeAliases';
|
|
284
|
+
import type { string_base_58 } from '../types/typeAliases';
|
|
278
285
|
import type { string_semantic_version } from '../types/typeAliases';
|
|
279
286
|
import type { string_version_dependency } from '../types/typeAliases';
|
|
280
287
|
import type { string_file_extension } from '../types/typeAliases';
|
|
@@ -337,7 +344,7 @@ import type { ColorTransformer } from '../utils/color/operators/ColorTransformer
|
|
|
337
344
|
import type { PipelineEditableSerialized } from '../utils/editable/types/PipelineEditableSerialized';
|
|
338
345
|
import type { ExecCommandOptions } from '../utils/execCommand/ExecCommandOptions';
|
|
339
346
|
import type { ExecCommandOptionsAdvanced } from '../utils/execCommand/ExecCommandOptions';
|
|
340
|
-
import type {
|
|
347
|
+
import type { MarkdownCodeBlock } from '../utils/markdown/extractAllBlocksFromMarkdown';
|
|
341
348
|
import type { MarkdownSection } from '../utils/markdown/parseMarkdownSection';
|
|
342
349
|
import type { Registered } from '../utils/misc/$Register';
|
|
343
350
|
import type { Registration } from '../utils/misc/$Register';
|
|
@@ -363,6 +370,7 @@ import type { ExportJsonOptions } from '../utils/serialization/exportJson';
|
|
|
363
370
|
import type { ITakeChain } from '../utils/take/interfaces/ITakeChain';
|
|
364
371
|
import type { string_promptbook_version } from '../version';
|
|
365
372
|
export type { BookParameter };
|
|
373
|
+
export type { AgentCapability };
|
|
366
374
|
export type { AgentBasicInformation };
|
|
367
375
|
export type { AgentModelRequirements };
|
|
368
376
|
export type { string_book };
|
|
@@ -542,6 +550,8 @@ export type { ScraperSourceHandler };
|
|
|
542
550
|
export type { ScraperIntermediateSource };
|
|
543
551
|
export type { JavascriptExecutionToolsOptions };
|
|
544
552
|
export type { PostprocessingFunction };
|
|
553
|
+
export type { SearchEngine };
|
|
554
|
+
export type { SearchResult };
|
|
545
555
|
export type { PromptbookStorage };
|
|
546
556
|
export type { FileCacheStorageOptions };
|
|
547
557
|
export type { IndexedDbStorageOptions };
|
|
@@ -549,6 +559,7 @@ export type { BookTranspiler };
|
|
|
549
559
|
export type { BookTranspilerOptions };
|
|
550
560
|
export type { IntermediateFilesStrategy };
|
|
551
561
|
export type { LlmCall };
|
|
562
|
+
export type { Message };
|
|
552
563
|
export type { ModelRequirements };
|
|
553
564
|
export type { CompletionModelRequirements };
|
|
554
565
|
export type { ChatModelRequirements };
|
|
@@ -569,6 +580,7 @@ export type { string_char_emoji };
|
|
|
569
580
|
export type { string_business_category_name };
|
|
570
581
|
export type { string_model_name };
|
|
571
582
|
export type { string_prompt };
|
|
583
|
+
export type { string_prompt_image };
|
|
572
584
|
export type { string_template };
|
|
573
585
|
export type { string_text_prompt };
|
|
574
586
|
export type { string_chat_prompt };
|
|
@@ -589,6 +601,7 @@ export type { string_title };
|
|
|
589
601
|
export type { string_agent_name };
|
|
590
602
|
export type { string_agent_name_in_book };
|
|
591
603
|
export type { string_agent_hash };
|
|
604
|
+
export type { string_agent_permanent_id };
|
|
592
605
|
export type { string_persona_description };
|
|
593
606
|
export type { string_model_description };
|
|
594
607
|
export type { string_knowledge_source_content };
|
|
@@ -639,6 +652,7 @@ export type { string_uuid };
|
|
|
639
652
|
export type { string_app_id };
|
|
640
653
|
export type { string_user_id };
|
|
641
654
|
export type { string_sha256 };
|
|
655
|
+
export type { string_base_58 };
|
|
642
656
|
export type { string_semantic_version };
|
|
643
657
|
export type { string_version_dependency };
|
|
644
658
|
export type { string_file_extension };
|
|
@@ -701,7 +715,7 @@ export type { ColorTransformer };
|
|
|
701
715
|
export type { PipelineEditableSerialized };
|
|
702
716
|
export type { ExecCommandOptions };
|
|
703
717
|
export type { ExecCommandOptionsAdvanced };
|
|
704
|
-
export type {
|
|
718
|
+
export type { MarkdownCodeBlock };
|
|
705
719
|
export type { MarkdownSection };
|
|
706
720
|
export type { Registered };
|
|
707
721
|
export type { Registration };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { string_agent_hash, string_agent_name, string_agent_url, string_color, string_fonts, string_url_image } from '../../types/typeAliases';
|
|
1
|
+
import type { string_agent_hash, string_agent_name, string_agent_permanent_id, string_agent_url, string_color, string_fonts, string_url_image } from '../../types/typeAliases';
|
|
2
2
|
/**
|
|
3
3
|
* Unified parameter representation that supports two different notations:
|
|
4
4
|
* 1. @Parameter - single word parameter starting with @
|
|
@@ -23,6 +23,24 @@ export type BookParameter = {
|
|
|
23
23
|
*/
|
|
24
24
|
description?: string;
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Capability of the agent
|
|
28
|
+
* This is parsed from commitments like USE BROWSER, USE SEARCH ENGINE, KNOWLEDGE, etc.
|
|
29
|
+
*/
|
|
30
|
+
export type AgentCapability = {
|
|
31
|
+
/**
|
|
32
|
+
* The type of the capability
|
|
33
|
+
*/
|
|
34
|
+
type: 'browser' | 'search-engine' | 'knowledge';
|
|
35
|
+
/**
|
|
36
|
+
* The label to display for this capability
|
|
37
|
+
*/
|
|
38
|
+
label: string;
|
|
39
|
+
/**
|
|
40
|
+
* The name of the icon to display for this capability
|
|
41
|
+
*/
|
|
42
|
+
iconName: string;
|
|
43
|
+
};
|
|
26
44
|
export type AgentBasicInformation = {
|
|
27
45
|
/**
|
|
28
46
|
* Name of the agent
|
|
@@ -33,6 +51,11 @@ export type AgentBasicInformation = {
|
|
|
33
51
|
* Hash of the agent source for integrity verification
|
|
34
52
|
*/
|
|
35
53
|
agentHash: string_agent_hash;
|
|
54
|
+
/**
|
|
55
|
+
* Unique identifier of the agent
|
|
56
|
+
* This is a random base58 string assigned by the server
|
|
57
|
+
*/
|
|
58
|
+
permanentId?: string_agent_permanent_id;
|
|
36
59
|
/**
|
|
37
60
|
* Optional description of the agent
|
|
38
61
|
* This is the line starting with "PERSONA"
|
|
@@ -67,6 +90,11 @@ export type AgentBasicInformation = {
|
|
|
67
90
|
* - {parameterName} or {parameter with multiple words} or {parameterName: description text}
|
|
68
91
|
*/
|
|
69
92
|
parameters: BookParameter[];
|
|
93
|
+
/**
|
|
94
|
+
* Capabilities of the agent
|
|
95
|
+
* This is parsed from commitments like USE BROWSER, USE SEARCH ENGINE, KNOWLEDGE, etc.
|
|
96
|
+
*/
|
|
97
|
+
capabilities: AgentCapability[];
|
|
70
98
|
};
|
|
71
99
|
/**
|
|
72
100
|
* TODO: [🐱🚀] Make all properties of `AgentBasicInformation` readonly
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AvailableModel } from '../../execution/AvailableModel';
|
|
2
2
|
import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
|
|
3
|
-
import type { string_model_name } from '../../types/typeAliases';
|
|
3
|
+
import type { string_agent_name, string_model_name, string_system_message, string_url_image } from '../../types/typeAliases';
|
|
4
4
|
import type { AgentModelRequirements } from './AgentModelRequirements';
|
|
5
5
|
import type { string_book } from './string_book';
|
|
6
6
|
/**
|
|
@@ -27,18 +27,18 @@ export declare function extractMcpServers(agentSource: string_book): string[];
|
|
|
27
27
|
* @deprecated Use createAgentModelRequirements instead
|
|
28
28
|
* @private
|
|
29
29
|
*/
|
|
30
|
-
export declare function createAgentSystemMessage(agentSource: string_book): Promise<
|
|
30
|
+
export declare function createAgentSystemMessage(agentSource: string_book): Promise<string_system_message>;
|
|
31
31
|
/**
|
|
32
32
|
* Extracts the agent name from the first line of the agent source
|
|
33
33
|
* @deprecated Use parseAgentSource instead
|
|
34
34
|
* @private
|
|
35
35
|
*/
|
|
36
|
-
export declare function extractAgentName(agentSource: string_book):
|
|
36
|
+
export declare function extractAgentName(agentSource: string_book): string_agent_name;
|
|
37
37
|
/**
|
|
38
|
-
* Extracts the profile image URL from agent source or returns
|
|
38
|
+
* Extracts the profile image URL from agent source or returns default avatar fallback
|
|
39
39
|
* @param agentSource The agent source string that may contain META IMAGE line
|
|
40
|
-
* @returns Profile image URL (from source or
|
|
40
|
+
* @returns Profile image URL (from source or default avatar fallback)
|
|
41
41
|
* @deprecated Use parseAgentSource instead
|
|
42
42
|
* @private
|
|
43
43
|
*/
|
|
44
|
-
export declare function extractAgentProfileImage(agentSource: string_book):
|
|
44
|
+
export declare function extractAgentProfileImage(agentSource: string_book): string_url_image | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { string_agent_name, string_url_image } from '../../types/typeAliases';
|
|
1
|
+
import type { string_agent_name, string_agent_permanent_id, string_url, string_url_image } from '../../types/typeAliases';
|
|
2
2
|
/**
|
|
3
3
|
* Generates an image for the agent to use as profile image
|
|
4
4
|
*
|
|
5
|
-
* @param
|
|
5
|
+
* @param agentId - The permanent ID of the agent
|
|
6
6
|
* @returns The placeholder profile image URL for the agent
|
|
7
7
|
*
|
|
8
8
|
* @public exported from `@promptbook/core`
|
|
9
9
|
*/
|
|
10
|
-
export declare function generatePlaceholderAgentProfileImageUrl(
|
|
10
|
+
export declare function generatePlaceholderAgentProfileImageUrl(agentIdOrName: string_agent_permanent_id | string_agent_name, agentsServerUrl?: URL | string_url): string_url_image;
|
|
11
11
|
/**
|
|
12
12
|
* TODO: [🤹] Figure out best placeholder image generator https://i.pravatar.cc/1000?u=568
|
|
13
13
|
*/
|
|
@@ -29,11 +29,15 @@ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'participants'> & {
|
|
|
29
29
|
* Called when the copy button is pressed.
|
|
30
30
|
*/
|
|
31
31
|
onCopy?: () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Called when the create agent button is pressed for book code blocks.
|
|
34
|
+
*/
|
|
35
|
+
onCreateAgent?: (bookContent: string) => void;
|
|
32
36
|
};
|
|
33
37
|
/**
|
|
34
38
|
* Renders a single chat message item with avatar, content, buttons, and rating.
|
|
35
39
|
*
|
|
36
40
|
* @private internal subcomponent of `<Chat>` component
|
|
37
41
|
*/
|
|
38
|
-
export declare const ChatMessageItem: import("react").MemoExoticComponent<({ message, participant, participants, isLastMessage, onMessage, setExpandedMessageId, isExpanded, currentRating, handleRating, mode, isCopyButtonEnabled, isFeedbackEnabled, onCopy, }: ChatMessageItemProps) => import("react/jsx-runtime").JSX.Element>;
|
|
42
|
+
export declare const ChatMessageItem: import("react").MemoExoticComponent<({ message, participant, participants, isLastMessage, onMessage, setExpandedMessageId, isExpanded, currentRating, handleRating, mode, isCopyButtonEnabled, isFeedbackEnabled, onCopy, onCreateAgent, }: ChatMessageItemProps) => import("react/jsx-runtime").JSX.Element>;
|
|
39
43
|
export {};
|
|
@@ -187,6 +187,11 @@ export type ChatProps = {
|
|
|
187
187
|
* @default true
|
|
188
188
|
*/
|
|
189
189
|
isCopyButtonEnabled?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Optional callback for creating an agent from a book code block.
|
|
192
|
+
* When provided, "Create Agent" buttons will be shown for book code blocks.
|
|
193
|
+
*/
|
|
194
|
+
onCreateAgent?: (bookContent: string) => void;
|
|
190
195
|
};
|
|
191
196
|
/**
|
|
192
197
|
* TODO: [☁️] Export component prop types only to `@promptbook/components` (not `@promptbook/types`)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type CodeBlockProps = {
|
|
2
|
+
code: string;
|
|
3
|
+
language?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
onCreateAgent?: (bookContent: string) => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Component to render a code block with syntax highlighting, copy, download, and create agent options.
|
|
9
|
+
*
|
|
10
|
+
* @private Internal utility of `<ChatMessage />` component
|
|
11
|
+
*/
|
|
12
|
+
export declare function CodeBlock({ code, language, className, onCreateAgent }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import type { string_markdown } from '../../../types/typeAliases';
|
|
|
2
2
|
type MarkdownContentProps = {
|
|
3
3
|
content: string_markdown;
|
|
4
4
|
className?: string;
|
|
5
|
+
onCreateAgent?: (bookContent: string) => void;
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
8
|
* Renders markdown content with support for code highlighting, math, and tables.
|
|
@@ -1,22 +1,17 @@
|
|
|
1
|
+
import { Message } from '../../../types/Message';
|
|
1
2
|
import type { id, string_markdown } from '../../../types/typeAliases';
|
|
2
3
|
/**
|
|
3
4
|
* A message in the chat
|
|
4
5
|
*
|
|
5
6
|
* @public exported from `@promptbook/components`
|
|
6
7
|
*/
|
|
7
|
-
export type ChatMessage = {
|
|
8
|
+
export type ChatMessage = Omit<Message<id>, 'direction' | 'recipients' | 'threadId' | 'metadata'> & {
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Date when the message was created
|
|
14
|
-
*/
|
|
15
|
-
date?: Date;
|
|
16
|
-
/**
|
|
17
|
-
* The name of the participant who sent the message
|
|
10
|
+
* Force the channel to be 'PROMPTBOOK_CHAT'
|
|
11
|
+
*
|
|
12
|
+
* @default 'PROMPTBOOK_CHAT'
|
|
18
13
|
*/
|
|
19
|
-
|
|
14
|
+
channel?: 'PROMPTBOOK_CHAT';
|
|
20
15
|
/**
|
|
21
16
|
* The content of the message with optional markdown formatting
|
|
22
17
|
*/
|
|
@@ -28,15 +23,16 @@ export type ChatMessage = {
|
|
|
28
23
|
*/
|
|
29
24
|
isComplete?: boolean;
|
|
30
25
|
/**
|
|
31
|
-
*
|
|
26
|
+
* The expected answer for the message (used for testing or validation)
|
|
32
27
|
*/
|
|
33
28
|
expectedAnswer?: string;
|
|
34
29
|
/**
|
|
35
|
-
*
|
|
30
|
+
* Indicates if the message was sent via a voice call
|
|
36
31
|
*/
|
|
37
32
|
isVoiceCall?: boolean;
|
|
38
33
|
};
|
|
39
34
|
/**
|
|
35
|
+
* TODO: Make all fields readonly
|
|
40
36
|
* TODO: Delete `expectedAnswer` from ChatMessage
|
|
41
37
|
* TODO: Rename `date` into `created`+`modified`
|
|
42
38
|
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
type DropdownProps = {
|
|
3
3
|
actions: Array<{
|
|
4
|
-
icon:
|
|
4
|
+
icon: ReactNode;
|
|
5
5
|
name: string;
|
|
6
6
|
onClick: () => void;
|
|
7
7
|
}>;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* A dropdown menu component that displays a list of actions triggered by a hamburger menu button.
|
|
11
11
|
*
|
|
12
12
|
* @private internal subcomponent used by various components
|
|
13
13
|
*/
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Item that can be hoisted to the top menu
|
|
4
|
+
*
|
|
5
|
+
* @private mechanism inside Promptbook
|
|
6
|
+
*/
|
|
7
|
+
export type HoistedMenuItem = {
|
|
8
|
+
/**
|
|
9
|
+
* Unique key for the menu item
|
|
10
|
+
*/
|
|
11
|
+
key?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Icon to display
|
|
14
|
+
*/
|
|
15
|
+
icon: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Name/Tooltip of the item
|
|
18
|
+
*/
|
|
19
|
+
name: string;
|
|
20
|
+
/**
|
|
21
|
+
* Action to perform when clicked
|
|
22
|
+
*/
|
|
23
|
+
onClick: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* If true, the item is active/toggled
|
|
26
|
+
*/
|
|
27
|
+
isActive?: boolean;
|
|
28
|
+
};
|
|
29
|
+
type MenuHoistingContextType = {
|
|
30
|
+
/**
|
|
31
|
+
* The currently hoisted menu items
|
|
32
|
+
*/
|
|
33
|
+
menu: HoistedMenuItem[];
|
|
34
|
+
/**
|
|
35
|
+
* Set the hoisted menu items
|
|
36
|
+
*/
|
|
37
|
+
setMenu: (items: HoistedMenuItem[]) => void;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Provider for menu hoisting
|
|
41
|
+
*
|
|
42
|
+
* @private mechanism inside Promptbook
|
|
43
|
+
*/
|
|
44
|
+
export declare function MenuHoistingProvider({ children }: {
|
|
45
|
+
children: ReactNode;
|
|
46
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
/**
|
|
48
|
+
* Hook to use the menu hoisting system
|
|
49
|
+
*
|
|
50
|
+
* @private mechanism inside Promptbook
|
|
51
|
+
*/
|
|
52
|
+
export declare function useMenuHoisting(): MenuHoistingContextType | null;
|
|
53
|
+
export {};
|
|
54
|
+
/**
|
|
55
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
56
|
+
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SupabaseClient } from '@supabase/supabase-js';
|
|
2
2
|
import type { AgentBasicInformation } from '../../../../book-2.0/agent-source/AgentBasicInformation';
|
|
3
3
|
import type { string_book } from '../../../../book-2.0/agent-source/string_book';
|
|
4
|
-
import type { string_agent_name } from '../../../../types/typeAliases';
|
|
4
|
+
import type { string_agent_name, string_agent_permanent_id } from '../../../../types/typeAliases';
|
|
5
5
|
import { AgentCollectionInSupabaseOptions } from './AgentCollectionInSupabaseOptions';
|
|
6
6
|
import type { AgentsDatabaseSchema } from './AgentsDatabaseSchema';
|
|
7
7
|
/**
|
|
@@ -26,40 +26,50 @@ export declare class AgentCollectionInSupabase {
|
|
|
26
26
|
*/
|
|
27
27
|
listAgents(): Promise<ReadonlyArray<AgentBasicInformation>>;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Retrieves the permanent ID of an agent by its name or permanent ID.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
getAgentPermanentId(agentNameOrPermanentId: string_agent_name | string_agent_permanent_id): Promise<string_agent_permanent_id>;
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves the source code of an agent by its name or permanent ID.
|
|
34
|
+
*/
|
|
35
|
+
getAgentSource(agentNameOrPermanentId: string_agent_name | string_agent_permanent_id): Promise<string_book>;
|
|
32
36
|
/**
|
|
33
37
|
* Creates a new agent in the collection
|
|
34
38
|
*
|
|
35
39
|
* Note: You can set 'PARENT' in the agent source to inherit from another agent in the collection.
|
|
36
40
|
*/
|
|
37
|
-
createAgent(agentSource: string_book): Promise<AgentBasicInformation
|
|
41
|
+
createAgent(agentSource: string_book): Promise<AgentBasicInformation & Required<Pick<AgentBasicInformation, 'permanentId'>>>;
|
|
38
42
|
/**
|
|
39
43
|
* Updates an existing agent in the collection
|
|
40
44
|
*/
|
|
41
|
-
updateAgentSource(
|
|
45
|
+
updateAgentSource(permanentId: string_agent_permanent_id, agentSource: string_book): Promise<void>;
|
|
42
46
|
/**
|
|
43
|
-
*
|
|
47
|
+
* List agents that are soft deleted (deletedAt IS NOT NULL)
|
|
44
48
|
*/
|
|
45
|
-
|
|
49
|
+
listDeletedAgents(): Promise<ReadonlyArray<AgentBasicInformation>>;
|
|
46
50
|
/**
|
|
47
51
|
* List history of an agent
|
|
48
52
|
*/
|
|
49
|
-
listAgentHistory(
|
|
53
|
+
listAgentHistory(permanentId: string_agent_permanent_id): Promise<ReadonlyArray<{
|
|
50
54
|
id: number;
|
|
51
55
|
createdAt: string;
|
|
52
56
|
agentHash: string;
|
|
53
57
|
promptbookEngineVersion: string;
|
|
54
58
|
}>>;
|
|
55
59
|
/**
|
|
56
|
-
*
|
|
60
|
+
* Restore a soft-deleted agent by setting deletedAt to NULL
|
|
61
|
+
*/
|
|
62
|
+
restoreAgent(permanentId: string_agent_permanent_id): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Restore an agent from a specific history entry
|
|
65
|
+
*
|
|
66
|
+
* This will update the current agent with the source from the history entry
|
|
57
67
|
*/
|
|
58
|
-
|
|
68
|
+
restoreAgentFromHistory(historyId: number): Promise<void>;
|
|
59
69
|
/**
|
|
60
|
-
*
|
|
70
|
+
* Soft delete an agent by setting deletedAt to current timestamp
|
|
61
71
|
*/
|
|
62
|
-
|
|
72
|
+
deleteAgent(permanentId: string_agent_permanent_id): Promise<void>;
|
|
63
73
|
/**
|
|
64
74
|
* Get the Supabase table name with prefix
|
|
65
75
|
*
|