@promptbook/ollama 0.112.0-64 → 0.112.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 (55) hide show
  1. package/esm/index.es.js +55 -5
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/src/_packages/components.index.d.ts +0 -2
  4. package/esm/src/_packages/core.index.d.ts +2 -2
  5. package/esm/src/_packages/types.index.d.ts +0 -2
  6. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  7. package/esm/src/avatars/visuals/minecraft2AvatarVisual.d.ts +7 -0
  8. package/esm/src/avatars/visuals/minecraftAvatarVisualShared.d.ts +48 -0
  9. package/esm/src/book-2.0/book-language-documentation/BookLanguageDocumentationExample.d.ts +27 -0
  10. package/esm/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.d.ts +25 -0
  11. package/esm/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.d.ts +10 -0
  12. package/esm/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +14 -0
  13. package/esm/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.d.ts +43 -0
  14. package/esm/src/book-components/Chat/types/ChatMessage.d.ts +0 -34
  15. package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
  16. package/esm/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -11
  17. package/esm/src/commitments/_common/toolRuntimeContext.d.ts +0 -6
  18. package/esm/src/config.d.ts +3 -3
  19. package/esm/src/formfactors/index.d.ts +2 -2
  20. package/esm/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +1 -1
  21. package/esm/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +1 -1
  22. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +0 -4
  23. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsOptions.d.ts +0 -9
  24. package/esm/src/utils/files/getPromptbookTempPath.d.ts +24 -0
  25. package/esm/src/version.d.ts +1 -1
  26. package/package.json +2 -2
  27. package/umd/index.umd.js +58 -8
  28. package/umd/index.umd.js.map +1 -1
  29. package/umd/src/_packages/components.index.d.ts +0 -2
  30. package/umd/src/_packages/core.index.d.ts +2 -2
  31. package/umd/src/_packages/types.index.d.ts +0 -2
  32. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  33. package/umd/src/avatars/visuals/minecraft2AvatarVisual.d.ts +7 -0
  34. package/umd/src/avatars/visuals/minecraftAvatarVisualShared.d.ts +48 -0
  35. package/umd/src/book-2.0/book-language-documentation/BookLanguageDocumentationExample.d.ts +27 -0
  36. package/umd/src/book-2.0/book-language-documentation/bookLanguageCommonPitfalls.d.ts +25 -0
  37. package/umd/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.d.ts +10 -0
  38. package/umd/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.d.ts +14 -0
  39. package/umd/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.d.ts +43 -0
  40. package/umd/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.test.d.ts +1 -0
  41. package/umd/src/book-components/Chat/types/ChatMessage.d.ts +0 -34
  42. package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
  43. package/umd/src/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +0 -11
  44. package/umd/src/commitments/_common/toolRuntimeContext.d.ts +0 -6
  45. package/umd/src/config.d.ts +3 -3
  46. package/umd/src/formfactors/index.d.ts +2 -2
  47. package/umd/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +1 -1
  48. package/umd/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +1 -1
  49. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +0 -4
  50. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsOptions.d.ts +0 -9
  51. package/umd/src/utils/files/getPromptbookTempPath.d.ts +24 -0
  52. package/umd/src/utils/files/getPromptbookTempPath.test.d.ts +1 -0
  53. package/umd/src/version.d.ts +1 -1
  54. /package/esm/src/{commitments/KNOWLEDGE/KNOWLEDGE.test.d.ts → book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.test.d.ts} +0 -0
  55. /package/{umd/src/commitments/KNOWLEDGE/KNOWLEDGE.test.d.ts → esm/src/utils/files/getPromptbookTempPath.test.d.ts} +0 -0
package/esm/index.es.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { spaceTrim as spaceTrim$1 } from 'spacetrim';
2
+ import { posix } from 'path';
2
3
  import { randomBytes } from 'crypto';
3
4
  import Bottleneck from 'bottleneck';
4
5
  import colors from 'colors';
5
6
  import OpenAI from 'openai';
6
- import 'path';
7
7
  import 'crypto-js';
8
8
  import 'crypto-js/enc-hex';
9
9
 
@@ -21,7 +21,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
21
21
  * @generated
22
22
  * @see https://github.com/webgptorg/promptbook
23
23
  */
24
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-64';
24
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-66';
25
25
  /**
26
26
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
27
27
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1087,6 +1087,29 @@ function saturate(amount) {
1087
1087
  }
1088
1088
  // TODO: Maybe implement by mix+hsl
1089
1089
 
1090
+ /**
1091
+ * Relative directory name without the `./` prefix for Git ignore rules and glob patterns.
1092
+ *
1093
+ * @private internal utility for Promptbook-owned temp files
1094
+ */
1095
+ const PROMPTBOOK_TEMP_DIRECTORY_NAME = '.promptbook';
1096
+ /**
1097
+ * Builds one project-relative path inside the shared Promptbook working directory.
1098
+ *
1099
+ * @private internal utility for Promptbook-owned temp files
1100
+ */
1101
+ function getPromptbookTempPath(...pathSegments) {
1102
+ return `./${getPromptbookTempPosixPath(...pathSegments)}`;
1103
+ }
1104
+ /**
1105
+ * Builds one POSIX path fragment inside the shared Promptbook working directory for globs and generated text files.
1106
+ *
1107
+ * @private internal utility for Promptbook-owned temp files
1108
+ */
1109
+ function getPromptbookTempPosixPath(...pathSegments) {
1110
+ return posix.join(PROMPTBOOK_TEMP_DIRECTORY_NAME, ...pathSegments);
1111
+ }
1112
+
1090
1113
  /**
1091
1114
  * Name for the Promptbook
1092
1115
  *
@@ -1188,6 +1211,31 @@ const SMALL_NUMBER = 0.001;
1188
1211
  * @private within the repository - too low-level in comparison with other `MAX_...`
1189
1212
  */
1190
1213
  const CONNECTION_RETRIES_LIMIT = 5;
1214
+ // <- TODO: [🕝] Make also `AGENTS_DIRNAME_ALTERNATIVES`
1215
+ /**
1216
+ * Where to store the temporary downloads
1217
+ *
1218
+ * Note: When the folder does not exist, it is created recursively
1219
+ *
1220
+ * @public exported from `@promptbook/core`
1221
+ */
1222
+ getPromptbookTempPath('download-cache');
1223
+ /**
1224
+ * Where to store the cache of executions for promptbook CLI
1225
+ *
1226
+ * Note: When the folder does not exist, it is created recursively
1227
+ *
1228
+ * @public exported from `@promptbook/core`
1229
+ */
1230
+ getPromptbookTempPath('execution-cache');
1231
+ /**
1232
+ * Where to store the scrape cache
1233
+ *
1234
+ * Note: When the folder does not exist, it is created recursively
1235
+ *
1236
+ * @public exported from `@promptbook/core`
1237
+ */
1238
+ getPromptbookTempPath('scrape-cache');
1191
1239
  // <- TODO: [🧜‍♂️]
1192
1240
  /**
1193
1241
  * Default settings for parsing and generating CSV files in Promptbook.
@@ -3722,9 +3770,11 @@ class OpenAiCompatibleUnsupportedParameterRetrier {
3722
3770
  * Creates the retry-history error message shared by all OpenAI-compatible model variants.
3723
3771
  */
3724
3772
  createAttemptHistoryError(finalErrorMessage) {
3725
- return new PipelineExecutionError(`All attempts failed. Attempt history:\n` +
3726
- formatUnsupportedParameterAttemptHistory(this.attemptStack) +
3727
- `\nFinal error: ${finalErrorMessage}`);
3773
+ return new PipelineExecutionError(spaceTrim$1((block) => `
3774
+ All attempts failed. Attempt history:
3775
+ ${block(formatUnsupportedParameterAttemptHistory(this.attemptStack))}
3776
+ Final error: ${finalErrorMessage}
3777
+ `));
3728
3778
  }
3729
3779
  }
3730
3780