@promptbook/markitdown 0.104.0-10 → 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.
Files changed (25) hide show
  1. package/esm/index.es.js +2 -2
  2. package/esm/typings/src/_packages/types.index.d.ts +6 -0
  3. package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +23 -0
  4. package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +2 -2
  5. package/esm/typings/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
  6. package/esm/typings/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +1 -1
  7. package/esm/typings/src/book-components/icons/AboutIcon.d.ts +1 -1
  8. package/esm/typings/src/book-components/icons/AttachmentIcon.d.ts +1 -1
  9. package/esm/typings/src/book-components/icons/CameraIcon.d.ts +1 -1
  10. package/esm/typings/src/book-components/icons/DownloadIcon.d.ts +1 -1
  11. package/esm/typings/src/book-components/icons/MenuIcon.d.ts +1 -1
  12. package/esm/typings/src/book-components/icons/SaveIcon.d.ts +1 -1
  13. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +2 -2
  14. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +0 -54
  15. package/esm/typings/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +1 -1
  16. package/esm/typings/src/llm-providers/agent/Agent.d.ts +6 -1
  17. package/esm/typings/src/remote-server/ui/ServerApp.d.ts +1 -1
  18. package/esm/typings/src/search-engines/SearchEngine.d.ts +9 -0
  19. package/esm/typings/src/search-engines/SearchResult.d.ts +18 -0
  20. package/esm/typings/src/search-engines/bing/BingSearchEngine.d.ts +15 -0
  21. package/esm/typings/src/search-engines/dummy/DummySearchEngine.d.ts +15 -0
  22. package/esm/typings/src/utils/random/$randomAgentPersona.d.ts +3 -2
  23. package/esm/typings/src/version.d.ts +1 -1
  24. package/package.json +2 -2
  25. package/umd/index.umd.js +2 -2
package/esm/index.es.js CHANGED
@@ -24,7 +24,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
24
24
  * @generated
25
25
  * @see https://github.com/webgptorg/promptbook
26
26
  */
27
- const PROMPTBOOK_ENGINE_VERSION = '0.104.0-10';
27
+ const PROMPTBOOK_ENGINE_VERSION = '0.104.0-11';
28
28
  /**
29
29
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
30
30
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -3889,7 +3889,7 @@ function countUsage(llmTools) {
3889
3889
  * TODO: [🧠] Is there some meaningfull way how to test this util
3890
3890
  * TODO: [🧠][🌯] Maybe a way how to hide ability to `get totalUsage`
3891
3891
  * > const [llmToolsWithUsage,getUsage] = countTotalUsage(llmTools);
3892
- * TODO: [👷‍♂️] @@@ Manual about construction of llmTools
3892
+ * TODO: [👷‍♂️] Write a comprehensive manual explaining the construction and usage of LLM tools in the Promptbook ecosystem
3893
3893
  */
3894
3894
 
3895
3895
  /**
@@ -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';
@@ -367,6 +370,7 @@ import type { ExportJsonOptions } from '../utils/serialization/exportJson';
367
370
  import type { ITakeChain } from '../utils/take/interfaces/ITakeChain';
368
371
  import type { string_promptbook_version } from '../version';
369
372
  export type { BookParameter };
373
+ export type { AgentCapability };
370
374
  export type { AgentBasicInformation };
371
375
  export type { AgentModelRequirements };
372
376
  export type { string_book };
@@ -546,6 +550,8 @@ export type { ScraperSourceHandler };
546
550
  export type { ScraperIntermediateSource };
547
551
  export type { JavascriptExecutionToolsOptions };
548
552
  export type { PostprocessingFunction };
553
+ export type { SearchEngine };
554
+ export type { SearchResult };
549
555
  export type { PromptbookStorage };
550
556
  export type { FileCacheStorageOptions };
551
557
  export type { IndexedDbStorageOptions };
@@ -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
@@ -72,6 +90,11 @@ export type AgentBasicInformation = {
72
90
  * - {parameterName} or {parameter with multiple words} or {parameterName: description text}
73
91
  */
74
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[];
75
98
  };
76
99
  /**
77
100
  * TODO: [🐱‍🚀] Make all properties of `AgentBasicInformation` readonly
@@ -23,11 +23,11 @@ export type ChatMessage = Omit<Message<id>, 'direction' | 'recipients' | 'thread
23
23
  */
24
24
  isComplete?: boolean;
25
25
  /**
26
- * @@@
26
+ * The expected answer for the message (used for testing or validation)
27
27
  */
28
28
  expectedAnswer?: string;
29
29
  /**
30
- * @@@
30
+ * Indicates if the message was sent via a voice call
31
31
  */
32
32
  isVoiceCall?: boolean;
33
33
  };
@@ -7,7 +7,7 @@ type DropdownProps = {
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
  */
@@ -4,7 +4,7 @@ type HamburgerMenuProps = {
4
4
  className?: string;
5
5
  };
6
6
  /**
7
- * @@@
7
+ * An animated hamburger menu button component.
8
8
  *
9
9
  * @private Internal component
10
10
  */
@@ -1,6 +1,6 @@
1
1
  import { SVGProps } from 'react';
2
2
  /**
3
- * @@@
3
+ * Renders an about icon
4
4
  *
5
5
  * @private internal subcomponent used by various components
6
6
  */
@@ -3,7 +3,7 @@ type AttachmentIconProps = {
3
3
  color?: string;
4
4
  };
5
5
  /**
6
- * @@@
6
+ * Renders an attachment icon
7
7
  *
8
8
  * @public exported from `@promptbook/components`
9
9
  */
@@ -3,7 +3,7 @@ type CameraIconProps = {
3
3
  color?: string;
4
4
  };
5
5
  /**
6
- * @@@
6
+ * Renders a camera icon
7
7
  *
8
8
  * @public exported from `@promptbook/components`
9
9
  */
@@ -1,6 +1,6 @@
1
1
  import { SVGProps } from 'react';
2
2
  /**
3
- * @@@
3
+ * Renders a download icon
4
4
  *
5
5
  * @private internal subcomponent used by various components
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { SVGProps } from 'react';
2
2
  /**
3
- * @@@
3
+ * Renders a menu icon
4
4
  *
5
5
  * @private internal subcomponent used by various components
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  /**
3
- * @@@
3
+ * Renders a save icon
4
4
  *
5
5
  * @public exported from `@promptbook/components`
6
6
  */
@@ -26,11 +26,11 @@ 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
32
  /**
33
- * [🐱‍🚀]@@@
33
+ * Retrieves the source code of an agent by its name or permanent ID.
34
34
  */
35
35
  getAgentSource(agentNameOrPermanentId: string_agent_name | string_agent_permanent_id): Promise<string_book>;
36
36
  /**
@@ -108,60 +108,6 @@ export type AgentsDatabaseSchema = {
108
108
  }
109
109
  ];
110
110
  };
111
- GenerationLock: {
112
- Row: {
113
- id: number;
114
- createdAt: string;
115
- updatedAt: string;
116
- lockKey: string;
117
- expiresAt: string;
118
- };
119
- Insert: {
120
- id?: number;
121
- createdAt?: string;
122
- updatedAt?: string;
123
- lockKey: string;
124
- expiresAt: string;
125
- };
126
- Update: {
127
- id?: number;
128
- createdAt?: string;
129
- updatedAt?: string;
130
- lockKey?: string;
131
- expiresAt?: string;
132
- };
133
- Relationships: [];
134
- };
135
- Image: {
136
- Row: {
137
- id: number;
138
- createdAt: string;
139
- updatedAt: string;
140
- filename: string;
141
- prompt: string;
142
- cdnUrl: string;
143
- cdnKey: string;
144
- };
145
- Insert: {
146
- id?: number;
147
- createdAt?: string;
148
- updatedAt?: string;
149
- filename: string;
150
- prompt: string;
151
- cdnUrl: string;
152
- cdnKey: string;
153
- };
154
- Update: {
155
- id?: number;
156
- createdAt?: string;
157
- updatedAt?: string;
158
- filename?: string;
159
- prompt?: string;
160
- cdnUrl?: string;
161
- cdnKey?: string;
162
- };
163
- Relationships: [];
164
- };
165
111
  };
166
112
  Views: Record<string, never>;
167
113
  Functions: Record<string, never>;
@@ -13,5 +13,5 @@ export declare function countUsage(llmTools: LlmExecutionTools): LlmExecutionToo
13
13
  * TODO: [🧠] Is there some meaningfull way how to test this util
14
14
  * TODO: [🧠][🌯] Maybe a way how to hide ability to `get totalUsage`
15
15
  * > const [llmToolsWithUsage,getUsage] = countTotalUsage(llmTools);
16
- * TODO: [👷‍♂️] @@@ Manual about construction of llmTools
16
+ * TODO: [👷‍♂️] Write a comprehensive manual explaining the construction and usage of LLM tools in the Promptbook ecosystem
17
17
  */
@@ -1,5 +1,5 @@
1
1
  import { BehaviorSubject } from 'rxjs';
2
- import type { AgentBasicInformation, BookParameter } from '../../book-2.0/agent-source/AgentBasicInformation';
2
+ import type { AgentBasicInformation, AgentCapability, BookParameter } from '../../book-2.0/agent-source/AgentBasicInformation';
3
3
  import type { string_book } from '../../book-2.0/agent-source/string_book';
4
4
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
5
5
  import type { ChatPromptResult } from '../../execution/PromptResult';
@@ -37,6 +37,11 @@ export declare class Agent extends AgentLlmExecutionTools implements LlmExecutio
37
37
  * Links found in the agent source
38
38
  */
39
39
  links: Array<string_agent_url>;
40
+ /**
41
+ * Capabilities of the agent
42
+ * This is parsed from commitments like USE BROWSER, USE SEARCH ENGINE, KNOWLEDGE, etc.
43
+ */
44
+ capabilities: AgentCapability[];
40
45
  /**
41
46
  * Computed hash of the agent source for integrity verification
42
47
  */
@@ -1,6 +1,6 @@
1
1
  import type { ServerInfo } from './types';
2
2
  /**
3
- * @@@
3
+ * Renders the HTML document for the Promptbook Server UI.
4
4
  *
5
5
  * @private internal utility of Remote Server
6
6
  */
@@ -0,0 +1,9 @@
1
+ import type { Promisable } from 'type-fest';
2
+ import type { string_markdown, string_markdown_text, string_title } from '../types/typeAliases';
3
+ import type { SearchResult } from './SearchResult';
4
+ export type SearchEngine = {
5
+ readonly title: string_title & string_markdown_text;
6
+ readonly description?: string_markdown;
7
+ checkConfiguration(): Promisable<void>;
8
+ search(query: string): Promise<SearchResult[]>;
9
+ };
@@ -0,0 +1,18 @@
1
+ import type { string_url } from '../types/typeAliases';
2
+ /**
3
+ * @@@
4
+ */
5
+ export type SearchResult = {
6
+ /**
7
+ * @@@
8
+ */
9
+ title: string;
10
+ /**
11
+ * @@@
12
+ */
13
+ url: string_url;
14
+ /**
15
+ * @@@
16
+ */
17
+ snippet: string;
18
+ };
@@ -0,0 +1,15 @@
1
+ import type { Promisable } from 'type-fest';
2
+ import type { string_markdown, string_markdown_text, string_title } from '../../types/typeAliases';
3
+ import type { SearchEngine } from '../SearchEngine';
4
+ import type { SearchResult } from '../SearchResult';
5
+ /**
6
+ * @@@
7
+ *
8
+ * @private <- TODO: !!!! Export via some package
9
+ */
10
+ export declare class BingSearchEngine implements SearchEngine {
11
+ get title(): string_title & string_markdown_text;
12
+ get description(): string_markdown;
13
+ checkConfiguration(): Promisable<void>;
14
+ search(query: string): Promise<SearchResult[]>;
15
+ }
@@ -0,0 +1,15 @@
1
+ import type { Promisable } from 'type-fest';
2
+ import type { string_markdown, string_markdown_text, string_title } from '../../types/typeAliases';
3
+ import type { SearchEngine } from '../SearchEngine';
4
+ import type { SearchResult } from '../SearchResult';
5
+ /**
6
+ * @@@
7
+ *
8
+ * @private <- TODO: !!!! Export via some package, maybe `@promptbook/search-engines` or `@promptbook/fake-llm`
9
+ */
10
+ export declare class DummySearchEngine implements SearchEngine {
11
+ get title(): string_title & string_markdown_text;
12
+ get description(): string_markdown;
13
+ checkConfiguration(): Promisable<void>;
14
+ search(query: string): Promise<SearchResult[]>;
15
+ }
@@ -1,9 +1,10 @@
1
+ import type { string_persona_description } from '../../types/typeAliases';
1
2
  /**
2
- * @@@@
3
+ * Generates a random agent persona description.
3
4
  *
4
5
  * @private internal helper function
5
6
  */
6
- export declare function $randomAgentPersona(): string;
7
+ export declare function $randomAgentPersona(): string_persona_description;
7
8
  /**
8
9
  * TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
9
10
  */
@@ -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.104.0-9`).
18
+ * It follows semantic versioning (e.g., `0.104.0-10`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/markitdown",
3
- "version": "0.104.0-10",
3
+ "version": "0.104.0-11",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -91,7 +91,7 @@
91
91
  "module": "./esm/index.es.js",
92
92
  "typings": "./esm/typings/src/_packages/markitdown.index.d.ts",
93
93
  "peerDependencies": {
94
- "@promptbook/core": "0.104.0-10"
94
+ "@promptbook/core": "0.104.0-11"
95
95
  },
96
96
  "dependencies": {
97
97
  "crypto": "1.0.1",
package/umd/index.umd.js CHANGED
@@ -24,7 +24,7 @@
24
24
  * @generated
25
25
  * @see https://github.com/webgptorg/promptbook
26
26
  */
27
- const PROMPTBOOK_ENGINE_VERSION = '0.104.0-10';
27
+ const PROMPTBOOK_ENGINE_VERSION = '0.104.0-11';
28
28
  /**
29
29
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
30
30
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -3889,7 +3889,7 @@
3889
3889
  * TODO: [🧠] Is there some meaningfull way how to test this util
3890
3890
  * TODO: [🧠][🌯] Maybe a way how to hide ability to `get totalUsage`
3891
3891
  * > const [llmToolsWithUsage,getUsage] = countTotalUsage(llmTools);
3892
- * TODO: [👷‍♂️] @@@ Manual about construction of llmTools
3892
+ * TODO: [👷‍♂️] Write a comprehensive manual explaining the construction and usage of LLM tools in the Promptbook ecosystem
3893
3893
  */
3894
3894
 
3895
3895
  /**