@promptbook/core 0.40.0-0 → 0.40.0-10

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 (73) hide show
  1. package/esm/index.es.js +466 -188
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/_packages/core.index.d.ts +6 -2
  4. package/esm/typings/_packages/types.index.d.ts +1 -4
  5. package/esm/typings/_packages/utils.index.d.ts +5 -2
  6. package/esm/typings/config.d.ts +4 -0
  7. package/esm/typings/conversion/{_importPromptbook.d.ts → test/_importPromptbook.d.ts} +2 -2
  8. package/{umd/typings/conversion → esm/typings/conversion/test}/validatePromptbookJson.d.ts +1 -1
  9. package/{umd/typings → esm/typings/conversion}/utils/extractVariables.d.ts +2 -2
  10. package/esm/typings/conversion/utils/parseCommand.d.ts +8 -0
  11. package/{umd/typings → esm/typings/conversion}/utils/parseNumber.d.ts +2 -0
  12. package/esm/typings/errors/ExpectError.d.ts +2 -0
  13. package/esm/typings/errors/NotFoundError.d.ts +1 -1
  14. package/esm/typings/errors/PromptbookExecutionError.d.ts +7 -0
  15. package/esm/typings/errors/PromptbookLogicError.d.ts +7 -0
  16. package/esm/typings/errors/PromptbookReferenceError.d.ts +7 -0
  17. package/esm/typings/errors/PromptbookSyntaxError.d.ts +7 -0
  18. package/esm/typings/errors/UnexpectedError.d.ts +7 -0
  19. package/esm/typings/execution/UserInterfaceTools.d.ts +1 -1
  20. package/esm/typings/execution/createPromptbookExecutor.d.ts +1 -1
  21. package/{umd/typings → esm/typings/execution}/utils/replaceParameters.d.ts +3 -3
  22. package/esm/typings/library/PromptbookLibrary.d.ts +1 -1
  23. package/esm/typings/library/SimplePromptbookLibrary.d.ts +7 -13
  24. package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +7 -0
  25. package/esm/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +16 -0
  26. package/esm/typings/library/constructors/createPromptbookSublibrary.d.ts +6 -0
  27. package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +3 -0
  28. package/package.json +2 -2
  29. package/umd/index.umd.js +468 -187
  30. package/umd/index.umd.js.map +1 -1
  31. package/umd/typings/_packages/core.index.d.ts +6 -2
  32. package/umd/typings/_packages/types.index.d.ts +1 -4
  33. package/umd/typings/_packages/utils.index.d.ts +5 -2
  34. package/umd/typings/config.d.ts +4 -0
  35. package/umd/typings/conversion/{_importPromptbook.d.ts → test/_importPromptbook.d.ts} +2 -2
  36. package/{esm/typings/conversion → umd/typings/conversion/test}/validatePromptbookJson.d.ts +1 -1
  37. package/{esm/typings → umd/typings/conversion}/utils/extractVariables.d.ts +2 -2
  38. package/umd/typings/conversion/utils/parseCommand.d.ts +8 -0
  39. package/{esm/typings → umd/typings/conversion}/utils/parseNumber.d.ts +2 -0
  40. package/umd/typings/errors/ExpectError.d.ts +2 -0
  41. package/umd/typings/errors/NotFoundError.d.ts +1 -1
  42. package/umd/typings/errors/PromptbookExecutionError.d.ts +7 -0
  43. package/umd/typings/errors/PromptbookLogicError.d.ts +7 -0
  44. package/umd/typings/errors/PromptbookReferenceError.d.ts +7 -0
  45. package/umd/typings/errors/PromptbookSyntaxError.d.ts +7 -0
  46. package/umd/typings/errors/UnexpectedError.d.ts +7 -0
  47. package/umd/typings/execution/UserInterfaceTools.d.ts +1 -1
  48. package/umd/typings/execution/createPromptbookExecutor.d.ts +1 -1
  49. package/{esm/typings → umd/typings/execution}/utils/replaceParameters.d.ts +3 -3
  50. package/umd/typings/library/PromptbookLibrary.d.ts +1 -1
  51. package/umd/typings/library/SimplePromptbookLibrary.d.ts +7 -13
  52. package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +7 -0
  53. package/umd/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +16 -0
  54. package/umd/typings/library/constructors/createPromptbookSublibrary.d.ts +6 -0
  55. package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +3 -0
  56. package/esm/typings/conversion/parseCommand.d.ts +0 -6
  57. package/umd/typings/conversion/parseCommand.d.ts +0 -6
  58. /package/esm/typings/conversion/{promptbookStringToJson-syntaxErrors.test.d.ts → test/promptbookStringToJson-syntaxErrors.test.d.ts} +0 -0
  59. /package/esm/typings/conversion/{promptbookStringToJson.test.d.ts → test/promptbookStringToJson.test.d.ts} +0 -0
  60. /package/esm/typings/conversion/{validatePromptbookJson-logicErrors.test.d.ts → test/validatePromptbookJson-logicErrors.test.d.ts} +0 -0
  61. /package/esm/typings/conversion/{validatePromptbookJson.test.d.ts → test/validatePromptbookJson.test.d.ts} +0 -0
  62. /package/esm/typings/{utils → conversion/utils}/extractVariables.test.d.ts +0 -0
  63. /package/esm/typings/conversion/{parseCommand.test.d.ts → utils/parseCommand.test.d.ts} +0 -0
  64. /package/esm/typings/{utils → conversion/utils}/parseNumber.test.d.ts +0 -0
  65. /package/esm/typings/{utils → execution/utils}/replaceParameters.test.d.ts +0 -0
  66. /package/umd/typings/conversion/{promptbookStringToJson-syntaxErrors.test.d.ts → test/promptbookStringToJson-syntaxErrors.test.d.ts} +0 -0
  67. /package/umd/typings/conversion/{promptbookStringToJson.test.d.ts → test/promptbookStringToJson.test.d.ts} +0 -0
  68. /package/umd/typings/conversion/{validatePromptbookJson-logicErrors.test.d.ts → test/validatePromptbookJson-logicErrors.test.d.ts} +0 -0
  69. /package/umd/typings/conversion/{validatePromptbookJson.test.d.ts → test/validatePromptbookJson.test.d.ts} +0 -0
  70. /package/umd/typings/{utils → conversion/utils}/extractVariables.test.d.ts +0 -0
  71. /package/umd/typings/conversion/{parseCommand.test.d.ts → utils/parseCommand.test.d.ts} +0 -0
  72. /package/umd/typings/{utils → conversion/utils}/parseNumber.test.d.ts +0 -0
  73. /package/umd/typings/{utils → execution/utils}/replaceParameters.test.d.ts +0 -0
@@ -0,0 +1,16 @@
1
+ import { PromptbookJson, PromptbookString } from '../../_packages/types.index';
2
+ import { SimplePromptbookLibrary } from '../SimplePromptbookLibrary';
3
+ export declare function createPromptbookLibraryFromSources(...promptbookSources: Array<PromptbookJson | PromptbookString>): SimplePromptbookLibrary;
4
+ /**
5
+ * Constructs Promptbook from any sources
6
+ *
7
+ * Note: During the construction syntax and logic of all sources are validated
8
+ * Note: You can combine .ptbk.md and .ptbk.json files BUT it is not recommended
9
+ *
10
+ * @param promptbookSources contents of .ptbk.md or .ptbk.json files
11
+ * @param settings settings for creating executor functions
12
+ * @returns PromptbookLibrary
13
+ */
14
+ /***
15
+ * TODO: !!! Annotate all + all to README and samples
16
+ */
@@ -0,0 +1,6 @@
1
+ import type { string_promptbook_url } from '../../types/typeAliases';
2
+ import { PromptbookLibrary } from '../PromptbookLibrary';
3
+ export declare function createPromptbookSublibrary(library: PromptbookLibrary, predicate: (url: string_promptbook_url) => boolean): PromptbookLibrary;
4
+ /***
5
+ * TODO: !!! Annotate all + all to README and samples
6
+ */
@@ -12,3 +12,6 @@ export declare function extractOneBlockFromMarkdown(markdown: string_markdown):
12
12
  language: string | null;
13
13
  content: string;
14
14
  };
15
+ /***
16
+ * TODO: [🌻] !!! Decide of this is internal util, external util OR validator/postprocessor
17
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/core",
3
- "version": "0.40.0-0",
3
+ "version": "0.40.0-10",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -35,7 +35,7 @@
35
35
  "homepage": "https://www.npmjs.com/package/@promptbook/core",
36
36
  "dependencies": {
37
37
  "n12": "1.8.18",
38
- "spacetrim": "0.11.0"
38
+ "spacetrim": "0.11.2"
39
39
  },
40
40
  "main": "./umd/index.umd.js",
41
41
  "module": "./esm/index.es.js",