@promptbook/components 0.114.0-32 → 0.114.0-34

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 (99) hide show
  1. package/esm/index.es.js +23 -2
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +1 -1
  4. package/esm/src/book-components/Chat/MockedChat/MockedChat.test.d.ts +2 -0
  5. package/esm/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.d.ts +2 -1
  6. package/esm/src/cli/cli-commands/coder/agentCliOptions.d.ts +21 -0
  7. package/esm/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +8 -21
  8. package/esm/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +33 -0
  9. package/esm/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +4 -2
  10. package/esm/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +2 -0
  11. package/esm/src/cli/cli-commands/coder/ensureDirectory.d.ts +6 -0
  12. package/esm/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
  13. package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +7 -5
  14. package/esm/src/cli/cli-commands/coder/list.d.ts +10 -0
  15. package/esm/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +19 -1
  16. package/esm/src/cli/cli-commands/coder/printCoderRunFailure.d.ts +6 -0
  17. package/esm/src/cli/cli-commands/coder.d.ts +1 -0
  18. package/esm/src/cli/cli-commands/common/$askForConfirmation.d.ts +4 -2
  19. package/esm/src/cli/cli-commands/common/$askForConfirmation.test.d.ts +1 -0
  20. package/esm/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.d.ts +12 -0
  21. package/esm/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.test.d.ts +1 -0
  22. package/esm/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.d.ts +11 -0
  23. package/esm/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.test.d.ts +1 -0
  24. package/esm/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.d.ts +33 -0
  25. package/esm/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.d.ts +6 -0
  26. package/esm/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.test.d.ts +1 -0
  27. package/esm/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.d.ts +10 -0
  28. package/esm/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.d.ts +28 -0
  29. package/esm/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.d.ts +7 -0
  30. package/esm/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.test.d.ts +1 -0
  31. package/esm/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +2 -1
  32. package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -2
  33. package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +26 -0
  34. package/esm/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts +4 -2
  35. package/esm/src/cli/cli-commands/common/promptPriorityCliOptions.d.ts +7 -0
  36. package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +2 -1
  37. package/esm/src/cli/cli-commands/common/questionsCliOptions.d.ts +45 -0
  38. package/esm/src/cli/cli-commands/common/questionsCliOptions.test.d.ts +1 -0
  39. package/esm/src/cli/common/$deprecateCliCommand.d.ts +3 -0
  40. package/esm/src/cli/common/$hideCliCommandFromHelp.d.ts +11 -0
  41. package/esm/src/cli/common/$hideCliCommandFromHelp.test.d.ts +1 -0
  42. package/esm/src/cli/common/$requireCliSubcommand.d.ts +18 -0
  43. package/esm/src/cli/common/$requireCliSubcommand.test.d.ts +1 -0
  44. package/esm/src/llm-providers/vercel/VercelExecutionToolsOptions.d.ts +5 -2
  45. package/esm/src/version.d.ts +1 -1
  46. package/package.json +1 -4
  47. package/umd/index.umd.js +23 -2
  48. package/umd/index.umd.js.map +1 -1
  49. package/umd/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +1 -1
  50. package/umd/src/book-components/Chat/MockedChat/MockedChat.test.d.ts +2 -0
  51. package/umd/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.d.ts +2 -1
  52. package/umd/src/cli/cli-commands/coder/agentCliOptions.d.ts +21 -0
  53. package/umd/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +8 -21
  54. package/umd/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +33 -0
  55. package/umd/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +4 -2
  56. package/umd/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +2 -0
  57. package/umd/src/cli/cli-commands/coder/ensureDirectory.d.ts +6 -0
  58. package/umd/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
  59. package/umd/src/cli/cli-commands/coder/init.test.d.ts +1 -0
  60. package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +7 -5
  61. package/umd/src/cli/cli-commands/coder/list.d.ts +10 -0
  62. package/umd/src/cli/cli-commands/coder/list.test.d.ts +1 -0
  63. package/umd/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +19 -1
  64. package/umd/src/cli/cli-commands/coder/printCoderRunFailure.d.ts +6 -0
  65. package/umd/src/cli/cli-commands/coder.d.ts +1 -0
  66. package/umd/src/cli/cli-commands/common/$askForConfirmation.d.ts +4 -2
  67. package/umd/src/cli/cli-commands/common/$askForConfirmation.test.d.ts +1 -0
  68. package/umd/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.d.ts +12 -0
  69. package/umd/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.test.d.ts +1 -0
  70. package/umd/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.d.ts +11 -0
  71. package/umd/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.test.d.ts +1 -0
  72. package/umd/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.d.ts +33 -0
  73. package/umd/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.d.ts +6 -0
  74. package/umd/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.test.d.ts +1 -0
  75. package/umd/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.d.ts +10 -0
  76. package/umd/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.d.ts +28 -0
  77. package/umd/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.d.ts +7 -0
  78. package/umd/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.test.d.ts +1 -0
  79. package/umd/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +2 -1
  80. package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -2
  81. package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +26 -0
  82. package/umd/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts +4 -2
  83. package/umd/src/cli/cli-commands/common/promptPriorityCliOptions.d.ts +7 -0
  84. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +2 -1
  85. package/umd/src/cli/cli-commands/common/questionsCliOptions.d.ts +45 -0
  86. package/umd/src/cli/cli-commands/common/questionsCliOptions.test.d.ts +1 -0
  87. package/umd/src/cli/common/$deprecateCliCommand.d.ts +3 -0
  88. package/umd/src/cli/common/$hideCliCommandFromHelp.d.ts +11 -0
  89. package/umd/src/cli/common/$hideCliCommandFromHelp.test.d.ts +1 -0
  90. package/umd/src/cli/common/$requireCliSubcommand.d.ts +18 -0
  91. package/umd/src/cli/common/$requireCliSubcommand.test.d.ts +1 -0
  92. package/umd/src/llm-providers/vercel/VercelExecutionToolsOptions.d.ts +5 -2
  93. package/umd/src/version.d.ts +1 -1
  94. package/esm/src/cli/cli-commands/coder/agentCodingFile.d.ts +0 -13
  95. package/esm/src/cli/cli-commands/common/harnessUpdateCliOptions.d.ts +0 -29
  96. package/umd/src/cli/cli-commands/coder/agentCodingFile.d.ts +0 -13
  97. package/umd/src/cli/cli-commands/common/harnessUpdateCliOptions.d.ts +0 -29
  98. /package/esm/src/cli/cli-commands/{common/harnessUpdateCliOptions.test.d.ts → coder/init.test.d.ts} +0 -0
  99. /package/{umd/src/cli/cli-commands/common/harnessUpdateCliOptions.test.d.ts → esm/src/cli/cli-commands/coder/list.test.d.ts} +0 -0
@@ -17,7 +17,10 @@ export type VercelExecutionToolsOptions = CommonToolsOptions & Pick<LlmExecution
17
17
  */
18
18
  readonly availableModels: ReadonlyArray<AvailableModel>;
19
19
  /**
20
- * Additional settings for chat models when calling `vercelProvider.chat('model-name', settings)`
20
+ * Additional settings for chat models, for example `temperature` or `providerOptions`
21
+ *
22
+ * Note: Since Vercel AI SDK v5 these settings belong to the model call, not to
23
+ * `vercelProvider.chat('model-name')` which takes just the model name
21
24
  */
22
- readonly additionalChatSettings?: Partial<Parameters<VercelProvider['chat']>[1]>;
25
+ readonly additionalChatSettings?: Partial<Omit<Parameters<ReturnType<VercelProvider['chat']>['doGenerate']>[0], 'prompt'>>;
23
26
  };
@@ -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.114.0-31`).
18
+ * It follows semantic versioning (e.g., `0.114.0-33`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/components",
3
- "version": "0.114.0-32",
3
+ "version": "0.114.0-34",
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,
@@ -87,9 +87,6 @@
87
87
  "node": ">=18.18.0",
88
88
  "npm": ">=8.0.0"
89
89
  },
90
- "overrides": {
91
- "zod": "$zod"
92
- },
93
90
  "main": "./umd/index.umd.js",
94
91
  "module": "./esm/index.es.js",
95
92
  "types": "./esm/src/_packages/components.index.d.ts",
package/umd/index.umd.js CHANGED
@@ -33,7 +33,7 @@
33
33
  * @generated
34
34
  * @see https://github.com/webgptorg/promptbook
35
35
  */
36
- const PROMPTBOOK_ENGINE_VERSION = '0.114.0-32';
36
+ const PROMPTBOOK_ENGINE_VERSION = '0.114.0-34';
37
37
  /**
38
38
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
39
39
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -39673,6 +39673,26 @@
39673
39673
  */
39674
39674
  const PlayIcon = ({ size = 16 }) => (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "currentColor", role: "img", "aria-label": "Play", children: jsxRuntime.jsx("path", { d: "M8 5v14l11-7L8 5z" }) }));
39675
39675
 
39676
+ /**
39677
+ * Provides stable identifiers for mocked messages that omit them.
39678
+ *
39679
+ * Incremental typing changes the message content on every word. A stable id
39680
+ * lets the chat renderer preserve the message element instead of treating
39681
+ * every content update as a new message.
39682
+ *
39683
+ * @private function of `MockedChat`
39684
+ */
39685
+ function ensureMockedChatMessageIds(messages) {
39686
+ return messages.map((message, messageIndex) => {
39687
+ if (message.id) {
39688
+ return message;
39689
+ }
39690
+ return {
39691
+ ...message,
39692
+ id: `mocked-chat-message-${messageIndex}`,
39693
+ };
39694
+ });
39695
+ }
39676
39696
  /**
39677
39697
  * Resolves one delay value, including random ranges.
39678
39698
  *
@@ -39953,7 +39973,8 @@
39953
39973
  * @public exported from `@promptbook/components`
39954
39974
  */
39955
39975
  function MockedChat(props) {
39956
- const { delayConfig, messages: originalMessages, isResettable = true, isPausable = true, messageOffsetsMs, appendMessagesLocallyOnSend = false, onSimulationComplete, isSaveButtonEnabled = true, ...chatProps } = props;
39976
+ const { delayConfig, messages: sourceMessages, isResettable = true, isPausable = true, messageOffsetsMs, appendMessagesLocallyOnSend = false, onSimulationComplete, isSaveButtonEnabled = true, ...chatProps } = props;
39977
+ const originalMessages = react.useMemo(() => ensureMockedChatMessageIds(sourceMessages), [sourceMessages]);
39957
39978
  const delays = {
39958
39979
  ...MOCKED_CHAT_DELAY_CONFIGS.NORMAL_FLOW,
39959
39980
  ...delayConfig,