@promptbook/remote-client 0.112.0-99 → 0.112.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 (156) hide show
  1. package/README.md +37 -21
  2. package/esm/index.es.js +9 -10
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/src/_packages/components.index.d.ts +4 -0
  5. package/esm/src/_packages/core.index.d.ts +0 -2
  6. package/esm/src/_packages/node.index.d.ts +40 -0
  7. package/esm/src/_packages/types.index.d.ts +18 -0
  8. package/esm/src/avatars/avatarAnimationScheduler.d.ts +4 -0
  9. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  10. package/esm/src/avatars/visuals/octopus3d3AvatarVisual.d.ts +7 -0
  11. package/esm/src/avatars/visuals/octopus3d4AvatarVisual.d.ts +7 -0
  12. package/esm/src/book-3.0/BookNodeAgentSource.d.ts +38 -0
  13. package/esm/src/book-3.0/CliAgent.d.ts +66 -0
  14. package/esm/src/book-3.0/CliAgent.test.d.ts +1 -0
  15. package/esm/src/book-3.0/LiteAgent.d.ts +68 -0
  16. package/esm/src/book-3.0/LiteAgent.test.d.ts +1 -0
  17. package/esm/src/book-3.0/agentFolderPaths.d.ts +30 -0
  18. package/esm/src/book-3.0/cliAgentEnv.d.ts +33 -0
  19. package/esm/src/book-components/BookEditor/BookEditor.d.ts +6 -5
  20. package/esm/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.d.ts +12 -0
  21. package/esm/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
  22. package/esm/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
  23. package/esm/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +1 -0
  24. package/esm/src/book-components/BookEditor/BookEditorTheme.d.ts +24 -0
  25. package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
  26. package/esm/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +1 -6
  27. package/esm/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +1 -4
  28. package/esm/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
  29. package/esm/src/book-components/Chat/Chat/ChatCitationModal.d.ts +2 -0
  30. package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +4 -0
  31. package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
  32. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
  33. package/esm/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +2 -0
  34. package/esm/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +3 -1
  35. package/esm/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
  36. package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -0
  37. package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
  38. package/esm/src/book-components/Chat/SourceChip/SourceChip.d.ts +6 -1
  39. package/esm/src/book-components/Chat/hooks/useResolvedCitationLabel.d.ts +12 -0
  40. package/esm/src/book-components/Chat/types/ChatMessage.d.ts +4 -0
  41. package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
  42. package/esm/src/book-components/Chat/types/CitationLabelResolver.d.ts +8 -0
  43. package/esm/src/book-components/Chat/utils/citationHelpers.d.ts +9 -0
  44. package/esm/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.d.ts +14 -0
  45. package/esm/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.test.d.ts +1 -0
  46. package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
  47. package/esm/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +4 -0
  48. package/esm/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
  49. package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
  50. package/esm/src/book-components/_common/Modal/Modal.d.ts +1 -1
  51. package/esm/src/book-components/icons/AboutIcon.d.ts +1 -1
  52. package/esm/src/book-components/icons/DownloadIcon.d.ts +1 -1
  53. package/esm/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
  54. package/esm/src/book-components/icons/FullscreenIcon.d.ts +1 -1
  55. package/esm/src/cli/cli-commands/agent/agentCliOptions.d.ts +38 -0
  56. package/esm/src/cli/cli-commands/agent/chat.d.ts +10 -0
  57. package/esm/src/cli/cli-commands/agent/exec.d.ts +10 -0
  58. package/esm/src/cli/cli-commands/agent/run.test.d.ts +1 -0
  59. package/esm/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -24
  60. package/esm/src/cli/cli-commands/agent.d.ts +14 -0
  61. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +17 -1
  62. package/esm/src/cli/cli-commands/agents-server/run.d.ts +6 -0
  63. package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +9 -2
  64. package/esm/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
  65. package/esm/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.d.ts +25 -0
  66. package/esm/src/cli/cli-commands/coder/find-unwritten.d.ts +10 -0
  67. package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +2 -0
  68. package/esm/src/cli/cli-commands/coder/server.d.ts +13 -0
  69. package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +14 -0
  70. package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -25
  71. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
  72. package/esm/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
  73. package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  74. package/esm/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
  75. package/esm/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
  76. package/esm/src/utils/isTimingSafeEqualString.d.ts +25 -0
  77. package/esm/src/utils/validators/url/isValidAgentUrl.d.ts +5 -0
  78. package/esm/src/version.d.ts +1 -1
  79. package/package.json +2 -3
  80. package/umd/index.umd.js +13 -11
  81. package/umd/index.umd.js.map +1 -1
  82. package/umd/src/_packages/components.index.d.ts +4 -0
  83. package/umd/src/_packages/core.index.d.ts +0 -2
  84. package/umd/src/_packages/node.index.d.ts +40 -0
  85. package/umd/src/_packages/types.index.d.ts +18 -0
  86. package/umd/src/avatars/avatarAnimationScheduler.d.ts +4 -0
  87. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  88. package/umd/src/avatars/visuals/octopus3d3AvatarVisual.d.ts +7 -0
  89. package/umd/src/avatars/visuals/octopus3d4AvatarVisual.d.ts +7 -0
  90. package/umd/src/book-3.0/BookNodeAgentSource.d.ts +38 -0
  91. package/umd/src/book-3.0/CliAgent.d.ts +66 -0
  92. package/umd/src/book-3.0/CliAgent.test.d.ts +1 -0
  93. package/umd/src/book-3.0/LiteAgent.d.ts +68 -0
  94. package/umd/src/book-3.0/LiteAgent.test.d.ts +1 -0
  95. package/umd/src/book-3.0/agentFolderPaths.d.ts +30 -0
  96. package/umd/src/book-3.0/cliAgentEnv.d.ts +33 -0
  97. package/umd/src/book-components/BookEditor/BookEditor.d.ts +6 -5
  98. package/umd/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.d.ts +12 -0
  99. package/umd/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
  100. package/umd/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
  101. package/umd/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +1 -0
  102. package/umd/src/book-components/BookEditor/BookEditorTheme.d.ts +24 -0
  103. package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
  104. package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +1 -6
  105. package/umd/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +1 -4
  106. package/umd/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
  107. package/umd/src/book-components/Chat/Chat/ChatCitationModal.d.ts +2 -0
  108. package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +4 -0
  109. package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
  110. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
  111. package/umd/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +2 -0
  112. package/umd/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +3 -1
  113. package/umd/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
  114. package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -0
  115. package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
  116. package/umd/src/book-components/Chat/SourceChip/SourceChip.d.ts +6 -1
  117. package/umd/src/book-components/Chat/hooks/useResolvedCitationLabel.d.ts +12 -0
  118. package/umd/src/book-components/Chat/types/ChatMessage.d.ts +4 -0
  119. package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
  120. package/umd/src/book-components/Chat/types/CitationLabelResolver.d.ts +8 -0
  121. package/umd/src/book-components/Chat/utils/citationHelpers.d.ts +9 -0
  122. package/umd/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.d.ts +14 -0
  123. package/umd/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.test.d.ts +1 -0
  124. package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
  125. package/umd/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +4 -0
  126. package/umd/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
  127. package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
  128. package/umd/src/book-components/_common/Modal/Modal.d.ts +1 -1
  129. package/umd/src/book-components/icons/AboutIcon.d.ts +1 -1
  130. package/umd/src/book-components/icons/DownloadIcon.d.ts +1 -1
  131. package/umd/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
  132. package/umd/src/book-components/icons/FullscreenIcon.d.ts +1 -1
  133. package/umd/src/cli/cli-commands/agent/agentCliOptions.d.ts +38 -0
  134. package/umd/src/cli/cli-commands/agent/chat.d.ts +10 -0
  135. package/umd/src/cli/cli-commands/agent/exec.d.ts +10 -0
  136. package/umd/src/cli/cli-commands/agent/run.test.d.ts +1 -0
  137. package/umd/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -24
  138. package/umd/src/cli/cli-commands/agent.d.ts +14 -0
  139. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +17 -1
  140. package/umd/src/cli/cli-commands/agents-server/run.d.ts +6 -0
  141. package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +9 -2
  142. package/umd/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
  143. package/umd/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.d.ts +25 -0
  144. package/umd/src/cli/cli-commands/coder/find-unwritten.d.ts +10 -0
  145. package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +2 -0
  146. package/umd/src/cli/cli-commands/coder/server.d.ts +13 -0
  147. package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +14 -0
  148. package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -25
  149. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
  150. package/umd/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
  151. package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  152. package/umd/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
  153. package/umd/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
  154. package/umd/src/utils/isTimingSafeEqualString.d.ts +25 -0
  155. package/umd/src/utils/validators/url/isValidAgentUrl.d.ts +5 -0
  156. package/umd/src/version.d.ts +1 -1
@@ -60,6 +60,28 @@ export declare class AgentCollectionInSupabase {
60
60
  * Gets all agents in the collection
61
61
  */
62
62
  listAgents(): Promise<ReadonlyArray<AgentBasicInformation>>;
63
+ /**
64
+ * Finds one active agent profile by its human-readable name or permanent id.
65
+ *
66
+ * This keeps route-level lookups from loading the whole agent collection when only
67
+ * one canonical route identifier is needed.
68
+ *
69
+ * @param agentNameOrPermanentId - Agent name or stable permanent identifier.
70
+ * @returns Matching active agent profile or `null` when not found.
71
+ *
72
+ * @public exported from `@promptbook/core`
73
+ */
74
+ findAgentBasicInformation(agentNameOrPermanentId: string_agent_name | string_agent_permanent_id): Promise<AgentBasicInformation | null>;
75
+ /**
76
+ * Converts one database row into public agent information.
77
+ *
78
+ * @param row - Database row carrying the persisted profile snapshot.
79
+ * @param isVerbose - Whether profile-name mismatches should be logged.
80
+ * @returns Agent profile with canonical database name and permanent id.
81
+ *
82
+ * @private internal helper of `AgentCollectionInSupabase`
83
+ */
84
+ private mapAgentBasicInformationRow;
63
85
  /**
64
86
  * Retrieves the permanent ID of an agent by its name or permanent ID.
65
87
  */
@@ -26,7 +26,15 @@ export type TeamInternalAgentAccessHeadersOptions = {
26
26
  /**
27
27
  * Resolves the internal token used by same-server TEAM calls.
28
28
  *
29
- * @returns Hashed token, or `null` when the server does not have a private secret.
29
+ * `PROMPTBOOK_TEAM_AGENT_ACCESS_TOKEN` must be a dedicated secret falling
30
+ * back to `ADMIN_PASSWORD`, `SUPABASE_SERVICE_ROLE_KEY`, or any other shared
31
+ * credential would let a leak of one secret compromise both authentication
32
+ * boundaries (admin login and same-server teammate-agent access). When the
33
+ * dedicated variable is missing, this function returns `null` so the calling
34
+ * server fails closed — same-server TEAM access is disabled and no header is
35
+ * sent — instead of silently authorizing requests with the wrong secret.
36
+ *
37
+ * @returns Hashed token, or `null` when the dedicated secret is not configured.
30
38
  *
31
39
  * @private internal Agents Server access wiring
32
40
  */
@@ -6,7 +6,7 @@ import type { LlmToolsConfiguration } from './LlmToolsConfiguration';
6
6
  *
7
7
  * It looks for environment variables:
8
8
  * - `process.env.OPENAI_API_KEY`
9
- * - `process.env.ANTHROPIC_CLAUDE_API_KEY`
9
+ * - `process.env.ANTHROPIC_API_KEY` (or the deprecated `process.env.ANTHROPIC_CLAUDE_API_KEY`)
10
10
  * - ...
11
11
  *
12
12
  * @see Environment variables documentation or .env file for required variables.
@@ -13,7 +13,7 @@ import type { CreateLlmToolsFromConfigurationOptions } from './createLlmToolsFro
13
13
  *
14
14
  * It looks for environment variables:
15
15
  * - `process.env.OPENAI_API_KEY`
16
- * - `process.env.ANTHROPIC_CLAUDE_API_KEY`
16
+ * - `process.env.ANTHROPIC_API_KEY` (or the deprecated `process.env.ANTHROPIC_CLAUDE_API_KEY`)
17
17
  * - ...
18
18
  *
19
19
  * @param options Configuration options for the LLM tools
@@ -1,7 +1,7 @@
1
- import { Converter as ShowdownConverter } from 'showdown';
1
+ import showdown from 'showdown';
2
2
  /**
3
3
  * Create a new showdown converter instance
4
4
  *
5
5
  * @private utility of `WebsiteScraper`
6
6
  */
7
- export declare function createShowdownConverter(): ShowdownConverter;
7
+ export declare function createShowdownConverter(): showdown.Converter;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Compares two strings in constant time to prevent timing attacks.
3
+ *
4
+ * Plain JavaScript `===` / `!==` string comparisons short-circuit on the first
5
+ * byte that differs, which lets a remote attacker who can measure response
6
+ * timing recover the expected value one byte at a time. This helper performs
7
+ * the comparison through Node's `timingSafeEqual`, which always inspects every
8
+ * byte of the equal-length buffers.
9
+ *
10
+ * Returning `false` early when the byte lengths differ does not expose
11
+ * character content — only length — which is an acceptable trade-off, since
12
+ * `timingSafeEqual` requires equal-length buffers and length is typically not
13
+ * secret.
14
+ *
15
+ * `null` and `undefined` inputs are treated as non-matching so callers can
16
+ * forward raw request values (for example `request.headers.get(name)`) without
17
+ * an extra guard.
18
+ *
19
+ * @param candidate - Value supplied by the caller (for example a request header or cookie).
20
+ * @param expected - Value to compare against (for example a configured secret).
21
+ * @returns `true` when both values are strings of equal length with identical bytes.
22
+ *
23
+ * @private internal helper function
24
+ */
25
+ export declare function isTimingSafeEqualString(candidate: string | null | undefined, expected: string | null | undefined): boolean;
@@ -8,6 +8,11 @@ import type { really_unknown } from '../../organization/really_unknown';
8
8
  * - `isValidAgentUrl` *(this one)* which tests just agent URL
9
9
  * - `isValidPipelineUrl` which tests just pipeline URL
10
10
  *
11
+ * Note: This is a pure structural validator and does not block private/internal network
12
+ * addresses. Callers that fetch the URL server-side from an untrusted network context must
13
+ * additionally apply the `assertSafeUrl` SSRF guard from the Agents Server before any
14
+ * outbound request.
15
+ *
11
16
  * @public exported from `@promptbook/utils`
12
17
  */
13
18
  export declare function isValidAgentUrl(url: really_unknown): url is string_agent_url;
@@ -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.112.0-98`).
18
+ * It follows semantic versioning (e.g., `0.112.0-140`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/remote-client",
3
- "version": "0.112.0-99",
3
+ "version": "0.112.0",
4
4
  "description": "Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -104,10 +104,9 @@
104
104
  "types": "./esm/src/_packages/remote-client.index.d.ts",
105
105
  "typings": "./esm/src/_packages/remote-client.index.d.ts",
106
106
  "peerDependencies": {
107
- "@promptbook/core": "0.112.0-99"
107
+ "@promptbook/core": "0.112.0"
108
108
  },
109
109
  "dependencies": {
110
- "crypto": "1.0.1",
111
110
  "crypto-js": "4.2.0",
112
111
  "papaparse": "5.4.1",
113
112
  "socket.io-client": "4.7.5",
package/umd/index.umd.js CHANGED
@@ -1,11 +1,13 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('spacetrim'), require('crypto'), require('socket.io-client'), require('papaparse'), require('crypto-js'), require('crypto-js/enc-hex'), require('path')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'spacetrim', 'crypto', 'socket.io-client', 'papaparse', 'crypto-js', 'crypto-js/enc-hex', 'path'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-remote-client"] = {}, global.spacetrim, global.crypto, global.socket_ioClient, global.papaparse, global.cryptoJs, global.hexEncoder, global.path));
5
- })(this, (function (exports, spacetrim, crypto, socket_ioClient, papaparse, cryptoJs, hexEncoder, path) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('spacetrim'), require('crypto-js'), require('socket.io-client'), require('papaparse'), require('crypto-js/enc-hex'), require('path')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'spacetrim', 'crypto-js', 'socket.io-client', 'papaparse', 'crypto-js/enc-hex', 'path'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-remote-client"] = {}, global.spacetrim, global.CryptoJS, global.socket_ioClient, global.papaparse, global.hexEncoder, global.path));
5
+ })(this, (function (exports, spacetrim, CryptoJS, socket_ioClient, papaparse, hexEncoder, path) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
+ var CryptoJS__default = /*#__PURE__*/_interopDefaultLegacy(CryptoJS);
10
+ var papaparse__default = /*#__PURE__*/_interopDefaultLegacy(papaparse);
9
11
  var hexEncoder__default = /*#__PURE__*/_interopDefaultLegacy(hexEncoder);
10
12
 
11
13
  // ⚠️ WARNING: This code has been generated so that any manual changes will be overwritten
@@ -22,7 +24,7 @@
22
24
  * @generated
23
25
  * @see https://github.com/webgptorg/promptbook
24
26
  */
25
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-99';
27
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0';
26
28
  /**
27
29
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
30
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -259,7 +261,7 @@
259
261
  * @private internal helper function
260
262
  */
261
263
  function $randomToken(randomness) {
262
- return crypto.randomBytes(randomness).toString('hex');
264
+ return CryptoJS__default["default"].lib.WordArray.random(randomness).toString(CryptoJS__default["default"].enc.Hex);
263
265
  }
264
266
  // TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
265
267
  // TODO: Maybe use nanoid instead https://github.com/ai/nanoid
@@ -2256,7 +2258,7 @@
2256
2258
  console.warn('CSV string contains carriage return characters, but in the CSV settings the `newline` setting does not include them. Autohealing the CSV string.');
2257
2259
  value = value.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
2258
2260
  }
2259
- const csv = papaparse.parse(value, settings);
2261
+ const csv = papaparse__default["default"].parse(value, settings);
2260
2262
  return csv;
2261
2263
  }
2262
2264
 
@@ -2341,10 +2343,10 @@
2341
2343
  i > index ? { ...row, [outputParameterName]: PENDING_VALUE_PLACEHOLDER } : row,
2342
2344
  );
2343
2345
  */
2344
- await onProgress(papaparse.unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS }));
2346
+ await onProgress(papaparse__default["default"].unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS }));
2345
2347
  }
2346
2348
  }
2347
- return papaparse.unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
2349
+ return papaparse__default["default"].unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
2348
2350
  },
2349
2351
  },
2350
2352
  {
@@ -2372,7 +2374,7 @@
2372
2374
  return /* not await */ mapCallback({ [key]: value }, index, array.length);
2373
2375
  }));
2374
2376
  }));
2375
- return papaparse.unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
2377
+ return papaparse__default["default"].unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
2376
2378
  },
2377
2379
  },
2378
2380
  ],
@@ -4173,7 +4175,7 @@
4173
4175
  * @public exported from `@promptbook/editable`
4174
4176
  */
4175
4177
  function knowledgeSourceContentToName(knowledgeSourceContent) {
4176
- const hash = cryptoJs.SHA256(hexEncoder__default["default"].parse(JSON.stringify(knowledgeSourceContent)))
4178
+ const hash = CryptoJS__default["default"].SHA256(hexEncoder__default["default"].parse(JSON.stringify(knowledgeSourceContent)))
4177
4179
  // <- TODO: [🥬] Encapsulate sha256 to some private utility function
4178
4180
  .toString( /* hex */)
4179
4181
  .substring(0, 20);