@promptbook/core 0.103.0-55 β†’ 0.103.0-66

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 (42) hide show
  1. package/esm/index.es.js +1390 -704
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/src/_packages/components.index.d.ts +2 -2
  4. package/esm/typings/src/_packages/core.index.d.ts +6 -8
  5. package/esm/typings/src/_packages/types.index.d.ts +7 -1
  6. package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -1
  7. package/esm/typings/src/book-2.0/agent-source/createCommitmentRegex.d.ts +1 -1
  8. package/esm/typings/src/book-components/Chat/AgentChat/AgentChat.d.ts +3 -0
  9. package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +6 -0
  10. package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +5 -0
  11. package/esm/typings/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +52 -0
  12. package/esm/typings/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +14 -0
  13. package/esm/typings/src/book-components/icons/SendIcon.d.ts +3 -0
  14. package/esm/typings/src/commitments/CLOSED/CLOSED.d.ts +4 -0
  15. package/esm/typings/src/commitments/CLOSED/CLOSED.test.d.ts +4 -0
  16. package/esm/typings/src/commitments/META_COLOR/META_COLOR.d.ts +6 -0
  17. package/esm/typings/src/commitments/META_FONT/META_FONT.d.ts +42 -0
  18. package/esm/typings/src/commitments/USE/USE.d.ts +53 -0
  19. package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +42 -0
  20. package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts +1 -0
  21. package/esm/typings/src/commitments/{IMPORTANT/IMPORTANT.d.ts β†’ USE_MCP/USE_MCP.d.ts} +16 -5
  22. package/esm/typings/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +38 -0
  23. package/esm/typings/src/commitments/_base/BaseCommitmentDefinition.d.ts +6 -0
  24. package/esm/typings/src/commitments/index.d.ts +93 -1
  25. package/esm/typings/src/llm-providers/agent/Agent.d.ts +3 -1
  26. package/esm/typings/src/other/templates/getTemplatesPipelineCollection.d.ts +1 -1
  27. package/esm/typings/src/playground/playground.d.ts +3 -0
  28. package/esm/typings/src/types/typeAliases.d.ts +6 -0
  29. package/esm/typings/src/utils/color/Color.d.ts +9 -1
  30. package/esm/typings/src/utils/color/css-colors.d.ts +1 -0
  31. package/esm/typings/src/utils/random/$generateBookBoilerplate.d.ts +6 -0
  32. package/esm/typings/src/utils/random/CzechNamePool.d.ts +7 -0
  33. package/esm/typings/src/utils/random/EnglishNamePool.d.ts +7 -0
  34. package/esm/typings/src/utils/random/NamePool.d.ts +17 -0
  35. package/esm/typings/src/utils/random/getNamePool.d.ts +10 -0
  36. package/esm/typings/src/version.d.ts +1 -1
  37. package/package.json +2 -2
  38. package/umd/index.umd.js +1147 -462
  39. package/umd/index.umd.js.map +1 -1
  40. package/esm/typings/src/book-components/PromptbookAgent/PromptbookAgent.d.ts +0 -29
  41. package/esm/typings/src/commitments/registry.d.ts +0 -68
  42. package/esm/typings/src/playground/playground1.d.ts +0 -2
@@ -23,7 +23,15 @@ export declare class Color {
23
23
  * @param color
24
24
  * @returns Color object
25
25
  */
26
- static from(color: string_color | Color): WithTake<Color>;
26
+ static from(color: string_color | Color, _isSingleValue?: boolean): WithTake<Color>;
27
+ /**
28
+ * Creates a new Color instance from miscellaneous formats
29
+ * It just does not throw error when it fails, it returns PROMPTBOOK_COLOR instead
30
+ *
31
+ * @param color
32
+ * @returns Color object
33
+ */
34
+ static fromSafe(color: string_color | Color): WithTake<Color>;
27
35
  /**
28
36
  * Creates a new Color instance from miscellaneous string formats
29
37
  *
@@ -4,6 +4,7 @@
4
4
  * @public exported from `@promptbook/color`
5
5
  */
6
6
  export declare const CSS_COLORS: {
7
+ readonly promptbook: "#79EAFD";
7
8
  readonly transparent: "rgba(0,0,0,0)";
8
9
  readonly aliceblue: "#f0f8ff";
9
10
  readonly antiquewhite: "#faebd7";
@@ -9,6 +9,12 @@ type GenerateBookBoilerplateOptions = PartialDeep<Omit<AgentBasicInformation, 'p
9
9
  * @default 'Adam'
10
10
  */
11
11
  parentAgentName?: string_agent_name_in_book;
12
+ /**
13
+ * Name pool to use for generating agent name
14
+ *
15
+ * @default 'ENGLISH'
16
+ */
17
+ namePool?: string;
12
18
  };
13
19
  /**
14
20
  * Generates boilerplate for a new agent book
@@ -0,0 +1,7 @@
1
+ import type { NamePool } from './NamePool';
2
+ /**
3
+ * Name pool for Czech names
4
+ *
5
+ * @private [πŸ‡] Maybe expose via some package
6
+ */
7
+ export declare const CzechNamePool: NamePool;
@@ -0,0 +1,7 @@
1
+ import type { NamePool } from './NamePool';
2
+ /**
3
+ * Name pool for English names
4
+ *
5
+ * @private [πŸ‡] Maybe expose via some package
6
+ */
7
+ export declare const EnglishNamePool: NamePool;
@@ -0,0 +1,17 @@
1
+ import type { string_color, string_person_fullname } from '../../types/typeAliases';
2
+ /**
3
+ * Result of generating a name
4
+ */
5
+ export type GenerateNameResult = {
6
+ fullname: string_person_fullname;
7
+ color: string_color;
8
+ };
9
+ /**
10
+ * Interface for a name pool
11
+ */
12
+ export type NamePool = {
13
+ /**
14
+ * Generates a random name
15
+ */
16
+ generateName(): GenerateNameResult;
17
+ };
@@ -0,0 +1,10 @@
1
+ import type { NamePool } from './NamePool';
2
+ /**
3
+ * Gets the name pool based on the language code
4
+ *
5
+ * @param language - The language code (e.g. 'ENGLISH', 'CZECH')
6
+ * @returns The name pool
7
+ *
8
+ * @private [πŸ‡] Maybe expose via some package
9
+ */
10
+ export declare function getNamePool(language: string): NamePool;
@@ -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.103.0-54`).
18
+ * It follows semantic versioning (e.g., `0.103.0-65`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@promptbook/core",
3
- "version": "0.103.0-55",
3
+ "version": "0.103.0-66",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/webgptorg/promptbook"
9
+ "url": "git+https://github.com/webgptorg/promptbook.git"
10
10
  },
11
11
  "author": "Pavol HejnΓ½ <pavol@ptbk.io> (https://www.pavolhejny.com/)",
12
12
  "contributors": [