@promptbook/ollama 0.104.0-8 → 0.104.0

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 (62) hide show
  1. package/README.md +0 -4
  2. package/esm/index.es.js +24 -4
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/components.index.d.ts +0 -6
  5. package/esm/typings/src/_packages/core.index.d.ts +8 -6
  6. package/esm/typings/src/_packages/types.index.d.ts +8 -0
  7. package/esm/typings/src/_packages/utils.index.d.ts +2 -0
  8. package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +24 -0
  9. package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +12 -2
  10. package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirements.tools.test.d.ts +1 -0
  11. package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.closed.test.d.ts +1 -0
  12. package/esm/typings/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +1 -1
  13. package/esm/typings/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +1 -1
  14. package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +6 -3
  15. package/esm/typings/src/book-components/_common/Dropdown/Dropdown.d.ts +5 -1
  16. package/esm/typings/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +5 -1
  17. package/esm/typings/src/book-components/icons/AboutIcon.d.ts +5 -1
  18. package/esm/typings/src/book-components/icons/AttachmentIcon.d.ts +6 -2
  19. package/esm/typings/src/book-components/icons/CameraIcon.d.ts +6 -2
  20. package/esm/typings/src/book-components/icons/DownloadIcon.d.ts +5 -1
  21. package/esm/typings/src/book-components/icons/MenuIcon.d.ts +5 -1
  22. package/esm/typings/src/book-components/icons/SaveIcon.d.ts +6 -2
  23. package/esm/typings/src/collection/agent-collection/AgentCollection.d.ts +1 -1
  24. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +18 -12
  25. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +6 -3
  26. package/esm/typings/src/commands/_common/types/Command.d.ts +1 -1
  27. package/esm/typings/src/commitments/META/META_DESCRIPTION.d.ts +41 -0
  28. package/esm/typings/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +2 -2
  29. package/esm/typings/src/commitments/_base/BookCommitment.d.ts +1 -1
  30. package/esm/typings/src/config.d.ts +8 -1
  31. package/esm/typings/src/formfactors/_common/FormfactorDefinition.d.ts +1 -1
  32. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +1 -1
  33. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +1 -1
  34. package/esm/typings/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +1 -1
  35. package/esm/typings/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +8 -4
  36. package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +1 -1
  37. package/esm/typings/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +1 -1
  38. package/esm/typings/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +12 -8
  39. package/esm/typings/src/llm-providers/agent/Agent.d.ts +7 -1
  40. package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +1 -1
  41. package/esm/typings/src/llm-providers/openai/utils/mapToolsToOpenAi.d.ts +8 -0
  42. package/esm/typings/src/remote-server/ui/ServerApp.d.ts +5 -1
  43. package/esm/typings/src/scrapers/_common/utils/promptbookFetch.test.d.ts +1 -0
  44. package/esm/typings/src/search-engines/SearchEngine.d.ts +9 -0
  45. package/esm/typings/src/search-engines/SearchResult.d.ts +18 -0
  46. package/esm/typings/src/search-engines/bing/BingSearchEngine.d.ts +15 -0
  47. package/esm/typings/src/search-engines/dummy/DummySearchEngine.d.ts +15 -0
  48. package/esm/typings/src/types/LlmToolDefinition.d.ts +20 -0
  49. package/esm/typings/src/types/ModelRequirements.d.ts +13 -0
  50. package/esm/typings/src/types/typeAliasEmoji.d.ts +2 -2
  51. package/esm/typings/src/utils/random/$randomAgentPersona.d.ts +7 -2
  52. package/esm/typings/src/utils/random/$randomItem.d.ts +1 -1
  53. package/esm/typings/src/utils/random/$randomSeed.d.ts +1 -1
  54. package/esm/typings/src/utils/validators/url/isValidAgentUrl.d.ts +16 -0
  55. package/esm/typings/src/utils/validators/url/isValidAgentUrl.test.d.ts +1 -0
  56. package/esm/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +2 -1
  57. package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +4 -3
  58. package/esm/typings/src/version.d.ts +1 -1
  59. package/package.json +2 -2
  60. package/umd/index.umd.js +24 -4
  61. package/umd/index.umd.js.map +1 -1
  62. package/esm/typings/servers.d.ts +0 -50
@@ -29,6 +29,7 @@ import type { GroupedCommitmentDefinition } from '../commitments/index';
29
29
  import { getGroupedCommitmentDefinitions } from '../commitments/index';
30
30
  import { NAME } from '../config';
31
31
  import { ADMIN_EMAIL } from '../config';
32
+ import { PROMPTBOOK_LEGAL_ENTITY } from '../config';
32
33
  import { ADMIN_GITHUB_NAME } from '../config';
33
34
  import { CLAIM } from '../config';
34
35
  import { PROMPTBOOK_COLOR } from '../config';
@@ -191,9 +192,9 @@ import { SectionTypes } from '../types/SectionType';
191
192
  import { TaskTypes } from '../types/TaskType';
192
193
  import { aboutPromptbookInformation } from '../utils/misc/aboutPromptbookInformation';
193
194
  import { $generateBookBoilerplate } from '../utils/random/$generateBookBoilerplate';
194
- import { CORE_SERVER } from '../../servers';
195
- import { REMOTE_SERVER_URLS } from '../../servers';
196
- import { AUTO_FEDERATED_AGENT_SERVER_URLS } from '../../servers';
195
+ import { CORE_AGENTS_SERVER } from '../../servers';
196
+ import { CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES } from '../../servers';
197
+ import { PUBLIC_AGENTS_SERVERS } from '../../servers';
197
198
  export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
198
199
  export { computeAgentHash };
199
200
  export { createAgentModelRequirements };
@@ -225,6 +226,7 @@ export type { GroupedCommitmentDefinition };
225
226
  export { getGroupedCommitmentDefinitions };
226
227
  export { NAME };
227
228
  export { ADMIN_EMAIL };
229
+ export { PROMPTBOOK_LEGAL_ENTITY };
228
230
  export { ADMIN_GITHUB_NAME };
229
231
  export { CLAIM };
230
232
  export { PROMPTBOOK_COLOR };
@@ -387,6 +389,6 @@ export { SectionTypes };
387
389
  export { TaskTypes };
388
390
  export { aboutPromptbookInformation };
389
391
  export { $generateBookBoilerplate };
390
- export { CORE_SERVER };
391
- export { REMOTE_SERVER_URLS };
392
- export { AUTO_FEDERATED_AGENT_SERVER_URLS };
392
+ export { CORE_AGENTS_SERVER };
393
+ export { CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES };
394
+ export { PUBLIC_AGENTS_SERVERS };
@@ -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 { LlmToolDefinition } from '../types/LlmToolDefinition';
188
192
  import type { Message } from '../types/Message';
189
193
  import type { ModelRequirements } from '../types/ModelRequirements';
190
194
  import type { CompletionModelRequirements } from '../types/ModelRequirements';
@@ -367,6 +371,7 @@ import type { ExportJsonOptions } from '../utils/serialization/exportJson';
367
371
  import type { ITakeChain } from '../utils/take/interfaces/ITakeChain';
368
372
  import type { string_promptbook_version } from '../version';
369
373
  export type { BookParameter };
374
+ export type { AgentCapability };
370
375
  export type { AgentBasicInformation };
371
376
  export type { AgentModelRequirements };
372
377
  export type { string_book };
@@ -546,6 +551,8 @@ export type { ScraperSourceHandler };
546
551
  export type { ScraperIntermediateSource };
547
552
  export type { JavascriptExecutionToolsOptions };
548
553
  export type { PostprocessingFunction };
554
+ export type { SearchEngine };
555
+ export type { SearchResult };
549
556
  export type { PromptbookStorage };
550
557
  export type { FileCacheStorageOptions };
551
558
  export type { IndexedDbStorageOptions };
@@ -553,6 +560,7 @@ export type { BookTranspiler };
553
560
  export type { BookTranspilerOptions };
554
561
  export type { IntermediateFilesStrategy };
555
562
  export type { LlmCall };
563
+ export type { LlmToolDefinition };
556
564
  export type { Message };
557
565
  export type { ModelRequirements };
558
566
  export type { CompletionModelRequirements };
@@ -83,6 +83,7 @@ import { isValidPromptbookVersion } from '../utils/validators/semanticVersion/is
83
83
  import { isValidSemanticVersion } from '../utils/validators/semanticVersion/isValidSemanticVersion';
84
84
  import { isHostnameOnPrivateNetwork } from '../utils/validators/url/isHostnameOnPrivateNetwork';
85
85
  import { isUrlOnPrivateNetwork } from '../utils/validators/url/isUrlOnPrivateNetwork';
86
+ import { isValidAgentUrl } from '../utils/validators/url/isValidAgentUrl';
86
87
  import { isValidPipelineUrl } from '../utils/validators/url/isValidPipelineUrl';
87
88
  import { isValidUrl } from '../utils/validators/url/isValidUrl';
88
89
  import { isValidUuid } from '../utils/validators/uuid/isValidUuid';
@@ -171,6 +172,7 @@ export { isValidPromptbookVersion };
171
172
  export { isValidSemanticVersion };
172
173
  export { isHostnameOnPrivateNetwork };
173
174
  export { isUrlOnPrivateNetwork };
175
+ export { isValidAgentUrl };
174
176
  export { isValidPipelineUrl };
175
177
  export { isValidUrl };
176
178
  export { isValidUuid };
@@ -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
@@ -55,6 +73,7 @@ export type AgentBasicInformation = {
55
73
  */
56
74
  meta: {
57
75
  fullname?: string;
76
+ description?: string;
58
77
  image?: string_url_image;
59
78
  font?: string_fonts;
60
79
  color?: string_color;
@@ -72,6 +91,11 @@ export type AgentBasicInformation = {
72
91
  * - {parameterName} or {parameter with multiple words} or {parameterName: description text}
73
92
  */
74
93
  parameters: BookParameter[];
94
+ /**
95
+ * Capabilities of the agent
96
+ * This is parsed from commitments like USE BROWSER, USE SEARCH ENGINE, KNOWLEDGE, etc.
97
+ */
98
+ capabilities: AgentCapability[];
75
99
  };
76
100
  /**
77
101
  * TODO: [🐱‍🚀] Make all properties of `AgentBasicInformation` readonly
@@ -1,4 +1,5 @@
1
- import type { string_knowledge_source_link } from '../../types/typeAliases';
1
+ import type { LlmToolDefinition } from '../../types/LlmToolDefinition';
2
+ import type { string_agent_url, string_knowledge_source_link } from '../../types/typeAliases';
2
3
  import type { TODO_any } from '../../utils/organization/TODO_any';
3
4
  /**
4
5
  * Model requirements for an agent
@@ -20,8 +21,13 @@ export type AgentModelRequirements = {
20
21
  readonly mcpServers?: ReadonlyArray<string>;
21
22
  /**
22
23
  * Optional link to the parent agent from which this agent inherits
24
+ *
25
+ * Note: [🆓] There are several cases what the agent ancestor could be:
26
+ * - 1) `parentAgentUrl` is `string_agent_url` valid agent URL
27
+ * - 2) `parentAgentUrl` is explicitly `null` (forcefully no parent)
28
+ * - 3) `parentAgentUrl` is not defined `undefined`, the default ancestor agent, Adam, will be used
23
29
  */
24
- readonly parentAgentUrl?: string_knowledge_source_link;
30
+ readonly parentAgentUrl?: string_agent_url | null;
25
31
  /**
26
32
  * Optional list of knowledge source links that the agent can use
27
33
  */
@@ -45,6 +51,10 @@ export type AgentModelRequirements = {
45
51
  * Top-k sampling value for the agent's responses
46
52
  */
47
53
  readonly topK?: number;
54
+ /**
55
+ * Tools available for the agent
56
+ */
57
+ readonly tools?: ReadonlyArray<LlmToolDefinition>;
48
58
  /**
49
59
  * Arbitrary metadata storage for commitments
50
60
  * Each commitment can store its own data here
@@ -7,7 +7,7 @@ import type { string_agent_name, string_agent_permanent_id, string_url, string_u
7
7
  *
8
8
  * @public exported from `@promptbook/core`
9
9
  */
10
- export declare function generatePlaceholderAgentProfileImageUrl(agentIdOrName: string_agent_permanent_id | string_agent_name, agentsServerUrl?: URL | string_url): string_url_image;
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
  */
@@ -3,4 +3,4 @@ import { CHAT_SAVE_FORMATS } from '../index';
3
3
  * Supported chat export formatNames
4
4
  * @public exported from `@promptbook/components`
5
5
  */
6
- export type string_chat_format_name = typeof CHAT_SAVE_FORMATS[number]['formatName'];
6
+ export type string_chat_format_name = (typeof CHAT_SAVE_FORMATS)[number]['formatName'];
@@ -1,7 +1,10 @@
1
1
  import { Message } from '../../../types/Message';
2
2
  import type { id, string_markdown } from '../../../types/typeAliases';
3
3
  /**
4
- * A message in the chat
4
+ * Represents a single message within a chat interface.
5
+ *
6
+ * This type extends the base `Message` type by omitting internal routing fields
7
+ * and adding chat-specific properties like markdown content and generation status.
5
8
  *
6
9
  * @public exported from `@promptbook/components`
7
10
  */
@@ -23,11 +26,11 @@ export type ChatMessage = Omit<Message<id>, 'direction' | 'recipients' | 'thread
23
26
  */
24
27
  isComplete?: boolean;
25
28
  /**
26
- * @@@
29
+ * The expected answer for the message (used for testing or validation)
27
30
  */
28
31
  expectedAnswer?: string;
29
32
  /**
30
- * @@@
33
+ * Indicates if the message was sent via a voice call
31
34
  */
32
35
  isVoiceCall?: boolean;
33
36
  };
@@ -7,8 +7,12 @@ type DropdownProps = {
7
7
  }>;
8
8
  };
9
9
  /**
10
- * @@@
10
+ * A dropdown menu component that displays a list of actions.
11
11
  *
12
+ * The menu is toggled by a hamburger menu button. When an action is selected,
13
+ * the menu automatically closes.
14
+ *
15
+ * @param props - Contains an array of actions with icons, names, and click handlers
12
16
  * @private internal subcomponent used by various components
13
17
  */
14
18
  export declare function Dropdown({ actions }: DropdownProps): import("react/jsx-runtime").JSX.Element;
@@ -4,8 +4,12 @@ type HamburgerMenuProps = {
4
4
  className?: string;
5
5
  };
6
6
  /**
7
- * @@@
7
+ * An animated hamburger menu button component.
8
8
  *
9
+ * This component renders a 3-bar hamburger icon that animates into an "X" when
10
+ * the menu is open.
11
+ *
12
+ * @param props - Contains the open state, an optional click handler, and optional className
9
13
  * @private Internal component
10
14
  */
11
15
  export declare function HamburgerMenu({ isOpen, onClick, className }: HamburgerMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,11 @@
1
1
  import { SVGProps } from 'react';
2
2
  /**
3
- * @@@
3
+ * Renders an information/about icon.
4
4
  *
5
+ * This icon is typically used in UI elements that provide additional information
6
+ * or "about" details to the user.
7
+ *
8
+ * @param props - SVG properties augmented with an optional `size`
5
9
  * @private internal subcomponent used by various components
6
10
  */
7
11
  export declare function AboutIcon(props: SVGProps<SVGSVGElement> & {
@@ -3,9 +3,13 @@ type AttachmentIconProps = {
3
3
  color?: string;
4
4
  };
5
5
  /**
6
- * @@@
6
+ * Renders an attachment icon.
7
7
  *
8
- * @public exported from `@promptbook/components`
8
+ * This icon is typically used in chat interfaces to indicate the ability to
9
+ * upload or view files associated with a message.
10
+ *
11
+ * @param props - SVG properties augmented with an optional `size`
12
+ * @private internal subcomponent used by various components
9
13
  */
10
14
  export declare function AttachmentIcon({ size, color }: AttachmentIconProps): import("react/jsx-runtime").JSX.Element;
11
15
  export {};
@@ -3,9 +3,13 @@ type CameraIconProps = {
3
3
  color?: string;
4
4
  };
5
5
  /**
6
- * @@@
6
+ * Renders a camera icon.
7
7
  *
8
- * @public exported from `@promptbook/components`
8
+ * This icon is typically used in buttons or inputs that trigger image capture
9
+ * or selection.
10
+ *
11
+ * @param props - SVG properties augmented with an optional `size`
12
+ * @private internal subcomponent used by various components
9
13
  */
10
14
  export declare function CameraIcon({ size, color }: CameraIconProps): import("react/jsx-runtime").JSX.Element;
11
15
  export {};
@@ -1,7 +1,11 @@
1
1
  import { SVGProps } from 'react';
2
2
  /**
3
- * @@@
3
+ * Renders a download icon.
4
4
  *
5
+ * This icon is typically used in buttons or links that trigger the downloading
6
+ * of files or assets.
7
+ *
8
+ * @param props - SVG properties augmented with an optional `size`
5
9
  * @private internal subcomponent used by various components
6
10
  */
7
11
  export declare function DownloadIcon(props: SVGProps<SVGSVGElement> & {
@@ -1,7 +1,11 @@
1
1
  import { SVGProps } from 'react';
2
2
  /**
3
- * @@@
3
+ * Renders a menu icon.
4
4
  *
5
+ * This icon is typically used in buttons that toggle the visibility of
6
+ * navigation menus or dropdowns.
7
+ *
8
+ * @param props - SVG properties augmented with an optional `size`
5
9
  * @private internal subcomponent used by various components
6
10
  */
7
11
  export declare function MenuIcon(props: SVGProps<SVGSVGElement> & {
@@ -1,8 +1,12 @@
1
1
  import React from 'react';
2
2
  /**
3
- * @@@
3
+ * Renders a save icon.
4
4
  *
5
- * @public exported from `@promptbook/components`
5
+ * This icon is typically used in buttons that trigger the saving of data,
6
+ * configurations, or agent sources.
7
+ *
8
+ * @param props - SVG properties augmented with an optional `size`
9
+ * @private internal subcomponent used by various components
6
10
  */
7
11
  export declare function SaveIcon({ size, color, ...props }: {
8
12
  size?: number;
@@ -1,4 +1,4 @@
1
- import { AgentCollectionInSupabase } from './constructors/agent-collection-in-supabase/AgentCollectionInSupabase';
1
+ import type { AgentCollectionInSupabase } from './constructors/agent-collection-in-supabase/AgentCollectionInSupabase';
2
2
  /**
3
3
  * Collection that groups together multiple AI Agents
4
4
  *
@@ -1,13 +1,16 @@
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
  /**
8
- * Agent collection stored in Supabase table
8
+ * Agent collection stored in a Supabase table.
9
9
  *
10
- * Note: This object can work both from Node.js and browser environment depending on the Supabase client provided
10
+ * This class provides a way to manage a collection of agents (pipelines) using Supabase
11
+ * as the storage backend. It supports listing, creating, updating, and soft-deleting agents.
12
+ *
13
+ * Note: This object can work both from Node.js and browser environment depending on the Supabase client provided.
11
14
  *
12
15
  * @public exported from `@promptbook/core`
13
16
  * <- TODO: [🐱‍🚀] Move to `@promptbook/supabase` package
@@ -16,9 +19,8 @@ export declare class AgentCollectionInSupabase {
16
19
  private readonly supabaseClient;
17
20
  readonly options?: AgentCollectionInSupabaseOptions | undefined;
18
21
  /**
19
- * @param rootPath - path to the directory with agents
20
- * @param tools - Execution tools to be used in [🐱‍🚀] `Agent` itself and listing the agents
21
- * @param options - Options for the collection creation
22
+ * @param supabaseClient - The initialized Supabase client
23
+ * @param options - Configuration options for the collection (e.g., table prefix, verbosity)
22
24
  */
23
25
  constructor(supabaseClient: SupabaseClient<AgentsDatabaseSchema>, options?: AgentCollectionInSupabaseOptions | undefined);
24
26
  /**
@@ -26,9 +28,13 @@ export declare class AgentCollectionInSupabase {
26
28
  */
27
29
  listAgents(): Promise<ReadonlyArray<AgentBasicInformation>>;
28
30
  /**
29
- * [🐱‍🚀]@@@
31
+ * Retrieves the permanent ID of an agent by its name or permanent ID.
32
+ */
33
+ getAgentPermanentId(agentNameOrPermanentId: string_agent_name | string_agent_permanent_id): Promise<string_agent_permanent_id>;
34
+ /**
35
+ * Retrieves the source code of an agent by its name or permanent ID.
30
36
  */
31
- getAgentSource(agentName: string_agent_name): Promise<string_book>;
37
+ getAgentSource(agentNameOrPermanentId: string_agent_name | string_agent_permanent_id): Promise<string_book>;
32
38
  /**
33
39
  * Creates a new agent in the collection
34
40
  *
@@ -38,7 +44,7 @@ export declare class AgentCollectionInSupabase {
38
44
  /**
39
45
  * Updates an existing agent in the collection
40
46
  */
41
- updateAgentSource(agentName: string_agent_name, agentSource: string_book): Promise<void>;
47
+ updateAgentSource(permanentId: string_agent_permanent_id, agentSource: string_book): Promise<void>;
42
48
  /**
43
49
  * List agents that are soft deleted (deletedAt IS NOT NULL)
44
50
  */
@@ -46,7 +52,7 @@ export declare class AgentCollectionInSupabase {
46
52
  /**
47
53
  * List history of an agent
48
54
  */
49
- listAgentHistory(agentName: string_agent_name): Promise<ReadonlyArray<{
55
+ listAgentHistory(permanentId: string_agent_permanent_id): Promise<ReadonlyArray<{
50
56
  id: number;
51
57
  createdAt: string;
52
58
  agentHash: string;
@@ -55,7 +61,7 @@ export declare class AgentCollectionInSupabase {
55
61
  /**
56
62
  * Restore a soft-deleted agent by setting deletedAt to NULL
57
63
  */
58
- restoreAgent(agentIdentifier: string): Promise<void>;
64
+ restoreAgent(permanentId: string_agent_permanent_id): Promise<void>;
59
65
  /**
60
66
  * Restore an agent from a specific history entry
61
67
  *
@@ -65,7 +71,7 @@ export declare class AgentCollectionInSupabase {
65
71
  /**
66
72
  * Soft delete an agent by setting deletedAt to current timestamp
67
73
  */
68
- deleteAgent(agentIdentifier: string): Promise<void>;
74
+ deleteAgent(permanentId: string_agent_permanent_id): Promise<void>;
69
75
  /**
70
76
  * Get the Supabase table name with prefix
71
77
  *
@@ -73,6 +73,7 @@ export type AgentsDatabaseSchema = {
73
73
  id: number;
74
74
  createdAt: string;
75
75
  agentName: string;
76
+ permanentId: string;
76
77
  agentHash: string;
77
78
  previousAgentHash: string | null;
78
79
  agentSource: string;
@@ -82,6 +83,7 @@ export type AgentsDatabaseSchema = {
82
83
  id?: number;
83
84
  createdAt: string;
84
85
  agentName: string;
86
+ permanentId: string;
85
87
  agentHash: string;
86
88
  previousAgentHash?: string | null;
87
89
  agentSource: string;
@@ -91,6 +93,7 @@ export type AgentsDatabaseSchema = {
91
93
  id?: number;
92
94
  createdAt?: string;
93
95
  agentName?: string;
96
+ permanentId?: string;
94
97
  agentHash?: string;
95
98
  previousAgentHash?: string | null;
96
99
  agentSource?: string;
@@ -98,10 +101,10 @@ export type AgentsDatabaseSchema = {
98
101
  };
99
102
  Relationships: [
100
103
  {
101
- foreignKeyName: 'AgentHistory_agentName_fkey';
102
- columns: ['agentName'];
104
+ foreignKeyName: 'AgentHistory_permanentId_fkey';
105
+ columns: ['permanentId'];
103
106
  referencedRelation: 'Agent';
104
- referencedColumns: ['agentName'];
107
+ referencedColumns: ['permanentId'];
105
108
  }
106
109
  ];
107
110
  };
@@ -3,4 +3,4 @@ import { COMMANDS } from '../../index';
3
3
  * Command is one piece of the book file section which adds some logic to the task or the whole pipeline.
4
4
  * It is parsed from the markdown from ul/ol items - one command per one item.
5
5
  */
6
- export type Command = ReturnType<typeof COMMANDS[number]['parse']>;
6
+ export type Command = ReturnType<(typeof COMMANDS)[number]['parse']>;
@@ -0,0 +1,41 @@
1
+ import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
2
+ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
3
+ /**
4
+ * META DESCRIPTION commitment definition
5
+ *
6
+ * The META DESCRIPTION commitment sets the agent's meta description for the profile page.
7
+ * This commitment is special because it doesn't affect the system message,
8
+ * but is handled separately in the parsing logic.
9
+ *
10
+ * Example usage in agent source:
11
+ *
12
+ * ```book
13
+ * META DESCRIPTION An AI assistant specialized in business tasks
14
+ * ```
15
+ *
16
+ * @private [🪔] Maybe export the commitments through some package
17
+ */
18
+ export declare class MetaDescriptionCommitmentDefinition extends BaseCommitmentDefinition<'META DESCRIPTION'> {
19
+ constructor();
20
+ /**
21
+ * Short one-line description of META DESCRIPTION.
22
+ */
23
+ get description(): string;
24
+ /**
25
+ * Icon for this commitment.
26
+ */
27
+ get icon(): string;
28
+ /**
29
+ * Markdown documentation for META DESCRIPTION commitment.
30
+ */
31
+ get documentation(): string;
32
+ applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
33
+ /**
34
+ * Extracts the meta description from the content
35
+ * This is used by the parsing logic
36
+ */
37
+ extractMetaDescription(content: string): string | null;
38
+ }
39
+ /**
40
+ * Note: [💞] Ignore a discrepancy between file name and entity name
41
+ */
@@ -6,13 +6,13 @@ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
6
6
  * The `USE SEARCH ENGINE` commitment indicates that the agent should utilize a search engine tool
7
7
  * to access and retrieve up-to-date information from the internet when necessary.
8
8
  *
9
- * The content following `USE SEARCH ENGINE` is ignored (similar to NOTE).
9
+ * The content following `USE SEARCH ENGINE` is an arbitrary text that the agent should know (e.g. search scope or instructions).
10
10
  *
11
11
  * Example usage in agent source:
12
12
  *
13
13
  * ```book
14
14
  * USE SEARCH ENGINE
15
- * USE SEARCH ENGINE This will be ignored
15
+ * USE SEARCH ENGINE Hledej informace o Přemyslovcích
16
16
  * ```
17
17
  *
18
18
  * @private [🪔] Maybe export the commitments through some package
@@ -2,4 +2,4 @@ import { COMMITMENT_REGISTRY } from '../index';
2
2
  /**
3
3
  * All available book commitment types
4
4
  */
5
- export type BookCommitment = typeof COMMITMENT_REGISTRY[number]['type'];
5
+ export type BookCommitment = (typeof COMMITMENT_REGISTRY)[number]['type'];
@@ -1,6 +1,6 @@
1
1
  import type { CsvSettings } from './formats/csv/CsvSettings';
2
2
  import type { IntermediateFilesStrategy } from './types/IntermediateFilesStrategy';
3
- import type { string_app_id, string_email, string_name, string_promptbook_server_url } from './types/typeAliases';
3
+ import type { string_app_id, string_email, string_legal_entity, string_name, string_promptbook_server_url } from './types/typeAliases';
4
4
  import { Color } from './utils/color/Color';
5
5
  /**
6
6
  * Warning message for the generated sections and files files
@@ -22,6 +22,12 @@ export declare const NAME = "Promptbook";
22
22
  * @public exported from `@promptbook/core`
23
23
  */
24
24
  export declare const ADMIN_EMAIL: string_email;
25
+ /**
26
+ * Email of the responsible person
27
+ *
28
+ * @public exported from `@promptbook/core`
29
+ */
30
+ export declare const PROMPTBOOK_LEGAL_ENTITY: string_legal_entity;
25
31
  /**
26
32
  * Name of the responsible person for the Promptbook on GitHub
27
33
  *
@@ -295,6 +301,7 @@ export declare const MOMENT_ARG_THRESHOLDS: {
295
301
  /**
296
302
  * Default remote server URL for the Promptbook
297
303
  *
304
+ * @deprecated TODO: !!! Deprecate all things related to pipelines and pipelines server
298
305
  * @public exported from `@promptbook/core`
299
306
  */
300
307
  export declare const DEFAULT_REMOTE_SERVER_URL: string_promptbook_server_url;
@@ -7,4 +7,4 @@ import { FORMFACTOR_DEFINITIONS } from '../index';
7
7
  * Note: [🚉] This is fully serializable as JSON
8
8
  * @see https://github.com/webgptorg/promptbook/discussions/172
9
9
  */
10
- export type FormfactorDefinition = typeof FORMFACTOR_DEFINITIONS[number];
10
+ export type FormfactorDefinition = (typeof FORMFACTOR_DEFINITIONS)[number];
@@ -21,7 +21,7 @@ export declare function $provideLlmToolsForTestingAndScriptsAndPlayground(option
21
21
  export {};
22
22
  /**
23
23
  * Note: [⚪] This should never be in any released package
24
- * TODO: [👷‍♂️] @@@ Manual about construction of llmTools
24
+ * TODO: [👷‍♂️] Write a comprehensive manual about the construction of LLM tools
25
25
  * TODO: This should be maybe not under `_common` but under `utils-internal` / `utils/internal`
26
26
  * TODO: [®] DRY Register logi
27
27
  */
@@ -51,7 +51,7 @@ export declare function $provideLlmToolsForWizardOrCli(options?: ProvideLlmTools
51
51
  export {};
52
52
  /**
53
53
  * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
54
- * TODO: [👷‍♂️] @@@ Manual about construction of llmTools
54
+ * TODO: [👷‍♂️] Write a comprehensive manual about the construction of LLM tools
55
55
  * TODO: [🥃] Allow `ptbk make` without llm tools
56
56
  * TODO: This should be maybe not under `_common` but under `utils-internal` / `utils/internal`
57
57
  * TODO: [®] DRY Register logic
@@ -17,6 +17,6 @@ export type LlmExecutionToolsWithTotalUsage = LlmExecutionTools & {
17
17
  spending(): Observable<Usage>;
18
18
  };
19
19
  /**
20
- * TODO: [👷‍♂️] @@@ Manual about construction of llmTools
20
+ * TODO: [👷‍♂️] Write a comprehensive manual about the construction of LLM tools
21
21
  * Note: [🥫] Not using getter `get totalUsage` but `getTotalUsage` to allow this object to be proxied
22
22
  */