@promptbook/remote-client 0.52.0-9 โ†’ 0.53.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 (168) hide show
  1. package/README.md +1 -13
  2. package/esm/index.es.js +1 -1
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/_packages/core.index.d.ts +4 -2
  5. package/esm/typings/_packages/utils.index.d.ts +2 -0
  6. package/esm/typings/conversion/prettify/prettifyPromptbookString.d.ts +1 -1
  7. package/esm/typings/conversion/prettify/renderPromptbookMermaid.d.ts +2 -1
  8. package/esm/typings/conversion/utils/extractParametersFromPromptTemplate.d.ts +3 -3
  9. package/esm/typings/conversion/utils/extractVariables.d.ts +2 -1
  10. package/esm/typings/conversion/validation/_importPromptbook.d.ts +2 -2
  11. package/esm/typings/errors/PromptbookLibraryError.d.ts +7 -0
  12. package/esm/typings/execution/ExecutionTools.d.ts +5 -3
  13. package/esm/typings/execution/LlmExecutionTools.d.ts +4 -2
  14. package/esm/typings/execution/PromptResult.d.ts +5 -1
  15. package/esm/typings/execution/ScriptExecutionTools.d.ts +2 -1
  16. package/esm/typings/execution/UserInterfaceTools.d.ts +2 -1
  17. package/esm/typings/execution/createPromptbookExecutor.d.ts +3 -3
  18. package/esm/typings/execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +4 -3
  19. package/esm/typings/execution/plugins/llm-execution-tools/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  20. package/esm/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionTools.d.ts +4 -3
  21. package/esm/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +2 -1
  22. package/esm/typings/execution/plugins/llm-execution-tools/langtail/LangtailExecutionTools.d.ts +0 -3
  23. package/esm/typings/execution/plugins/llm-execution-tools/mocked/MockedEchoLlmExecutionTools.d.ts +4 -2
  24. package/esm/typings/execution/plugins/llm-execution-tools/mocked/MockedFackedLlmExecutionTools.d.ts +4 -2
  25. package/esm/typings/execution/plugins/llm-execution-tools/mocked/fakeTextToExpectations.d.ts +1 -1
  26. package/esm/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionTools.d.ts +4 -2
  27. package/esm/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionToolsOptions.d.ts +2 -1
  28. package/esm/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.d.ts +5 -3
  29. package/esm/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +1 -1
  30. package/esm/typings/execution/plugins/llm-execution-tools/openai/openai-models.d.ts +1 -1
  31. package/esm/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.d.ts +5 -3
  32. package/esm/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionToolsOptions.d.ts +2 -1
  33. package/esm/typings/execution/plugins/llm-execution-tools/remote/interfaces/Promptbook_Server_Progress.d.ts +1 -1
  34. package/esm/typings/execution/plugins/llm-execution-tools/remote/interfaces/Promptbook_Server_Response.d.ts +1 -1
  35. package/esm/typings/execution/plugins/llm-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +2 -1
  36. package/esm/typings/execution/plugins/llm-execution-tools/remote/startRemoteServer.d.ts +2 -1
  37. package/esm/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +3 -2
  38. package/esm/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +3 -2
  39. package/esm/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +3 -2
  40. package/esm/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -2
  41. package/esm/typings/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +1 -1
  42. package/esm/typings/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +1 -1
  43. package/esm/typings/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +2 -2
  44. package/esm/typings/execution/translation/automatic-translate/translateMessages.d.ts +2 -2
  45. package/esm/typings/execution/utils/forEachAsync.d.ts +18 -0
  46. package/esm/typings/execution/utils/replaceParameters.d.ts +2 -2
  47. package/esm/typings/library/SimplePromptbookLibrary.d.ts +1 -1
  48. package/esm/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +30 -6
  49. package/esm/typings/library/constructors/createPromptbookLibraryFromDirectory.test.d.ts +1 -0
  50. package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +4 -4
  51. package/esm/typings/library/constructors/createPromptbookLibraryFromPromise.test.d.ts +1 -0
  52. package/esm/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +2 -1
  53. package/esm/typings/library/constructors/createPromptbookLibraryFromSources.test.d.ts +1 -0
  54. package/esm/typings/library/constructors/createPromptbookLibraryFromUrl.d.ts +23 -6
  55. package/esm/typings/library/constructors/createPromptbookSublibrary.d.ts +1 -1
  56. package/esm/typings/library/constructors/justTestFsImport.d.ts +7 -0
  57. package/esm/typings/types/Command.d.ts +5 -2
  58. package/esm/typings/types/Prompt.d.ts +5 -2
  59. package/esm/typings/types/PromptbookJson/PromptTemplateJson.d.ts +8 -1
  60. package/esm/typings/types/PromptbookJson/PromptbookJson.d.ts +2 -1
  61. package/esm/typings/types/TaskProgress.d.ts +2 -1
  62. package/esm/typings/types/execution-report/ExecutionReportJson.d.ts +2 -1
  63. package/esm/typings/types/execution-report/countWorkingDuration.d.ts +1 -1
  64. package/esm/typings/types/typeAliases.d.ts +2 -2
  65. package/esm/typings/utils/emojis.d.ts +1 -1
  66. package/esm/typings/utils/expectation-counters/index.d.ts +2 -1
  67. package/esm/typings/utils/extractParameters.d.ts +2 -1
  68. package/esm/typings/utils/markdown/addAutoGeneratedSection.d.ts +2 -1
  69. package/esm/typings/utils/markdown/createMarkdownChart.d.ts +2 -2
  70. package/esm/typings/utils/markdown/createMarkdownTable.d.ts +2 -1
  71. package/esm/typings/utils/markdown/escapeMarkdownBlock.d.ts +1 -1
  72. package/esm/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +2 -1
  73. package/esm/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
  74. package/esm/typings/utils/markdown/removeContentComments.d.ts +2 -1
  75. package/esm/typings/utils/markdown/removeMarkdownFormatting.d.ts +1 -1
  76. package/esm/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +1 -1
  77. package/esm/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +1 -1
  78. package/esm/typings/utils/normalization/isValidKeyword.d.ts +1 -1
  79. package/esm/typings/utils/normalization/parseKeywords.d.ts +1 -1
  80. package/esm/typings/utils/normalization/parseKeywordsFromString.d.ts +1 -1
  81. package/esm/typings/utils/normalization/searchKeywords.d.ts +1 -1
  82. package/esm/typings/utils/postprocessing/extractBlock.d.ts +1 -1
  83. package/package.json +2 -2
  84. package/umd/index.umd.js +1 -1
  85. package/umd/index.umd.js.map +1 -1
  86. package/umd/typings/_packages/core.index.d.ts +4 -2
  87. package/umd/typings/_packages/utils.index.d.ts +2 -0
  88. package/umd/typings/conversion/prettify/prettifyPromptbookString.d.ts +1 -1
  89. package/umd/typings/conversion/prettify/renderPromptbookMermaid.d.ts +2 -1
  90. package/umd/typings/conversion/utils/extractParametersFromPromptTemplate.d.ts +3 -3
  91. package/umd/typings/conversion/utils/extractVariables.d.ts +2 -1
  92. package/umd/typings/conversion/validation/_importPromptbook.d.ts +2 -2
  93. package/umd/typings/errors/PromptbookLibraryError.d.ts +7 -0
  94. package/umd/typings/execution/ExecutionTools.d.ts +5 -3
  95. package/umd/typings/execution/LlmExecutionTools.d.ts +4 -2
  96. package/umd/typings/execution/PromptResult.d.ts +5 -1
  97. package/umd/typings/execution/ScriptExecutionTools.d.ts +2 -1
  98. package/umd/typings/execution/UserInterfaceTools.d.ts +2 -1
  99. package/umd/typings/execution/createPromptbookExecutor.d.ts +3 -3
  100. package/umd/typings/execution/plugins/llm-execution-tools/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +4 -3
  101. package/umd/typings/execution/plugins/llm-execution-tools/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  102. package/umd/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionTools.d.ts +4 -3
  103. package/umd/typings/execution/plugins/llm-execution-tools/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +2 -1
  104. package/umd/typings/execution/plugins/llm-execution-tools/langtail/LangtailExecutionTools.d.ts +0 -3
  105. package/umd/typings/execution/plugins/llm-execution-tools/mocked/MockedEchoLlmExecutionTools.d.ts +4 -2
  106. package/umd/typings/execution/plugins/llm-execution-tools/mocked/MockedFackedLlmExecutionTools.d.ts +4 -2
  107. package/umd/typings/execution/plugins/llm-execution-tools/mocked/fakeTextToExpectations.d.ts +1 -1
  108. package/umd/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionTools.d.ts +4 -2
  109. package/umd/typings/execution/plugins/llm-execution-tools/multiple/MultipleLlmExecutionToolsOptions.d.ts +2 -1
  110. package/umd/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionTools.d.ts +5 -3
  111. package/umd/typings/execution/plugins/llm-execution-tools/openai/OpenAiExecutionToolsOptions.d.ts +1 -1
  112. package/umd/typings/execution/plugins/llm-execution-tools/openai/openai-models.d.ts +1 -1
  113. package/umd/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.d.ts +5 -3
  114. package/umd/typings/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionToolsOptions.d.ts +2 -1
  115. package/umd/typings/execution/plugins/llm-execution-tools/remote/interfaces/Promptbook_Server_Progress.d.ts +1 -1
  116. package/umd/typings/execution/plugins/llm-execution-tools/remote/interfaces/Promptbook_Server_Response.d.ts +1 -1
  117. package/umd/typings/execution/plugins/llm-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +2 -1
  118. package/umd/typings/execution/plugins/llm-execution-tools/remote/startRemoteServer.d.ts +2 -1
  119. package/umd/typings/execution/plugins/script-execution-tools/python/PythonExecutionTools.d.ts +3 -2
  120. package/umd/typings/execution/plugins/script-execution-tools/typescript/TypescriptExecutionTools.d.ts +3 -2
  121. package/umd/typings/execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools.d.ts +3 -2
  122. package/umd/typings/execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -2
  123. package/umd/typings/execution/translation/automatic-translate/automatic-translators/DebugAutomaticTranslator.d.ts +1 -1
  124. package/umd/typings/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +1 -1
  125. package/umd/typings/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +2 -2
  126. package/umd/typings/execution/translation/automatic-translate/translateMessages.d.ts +2 -2
  127. package/umd/typings/execution/utils/forEachAsync.d.ts +18 -0
  128. package/umd/typings/execution/utils/replaceParameters.d.ts +2 -2
  129. package/umd/typings/library/SimplePromptbookLibrary.d.ts +1 -1
  130. package/umd/typings/library/constructors/createPromptbookLibraryFromDirectory.d.ts +30 -6
  131. package/umd/typings/library/constructors/createPromptbookLibraryFromDirectory.test.d.ts +1 -0
  132. package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.d.ts +4 -4
  133. package/umd/typings/library/constructors/createPromptbookLibraryFromPromise.test.d.ts +1 -0
  134. package/umd/typings/library/constructors/createPromptbookLibraryFromSources.d.ts +2 -1
  135. package/umd/typings/library/constructors/createPromptbookLibraryFromSources.test.d.ts +1 -0
  136. package/umd/typings/library/constructors/createPromptbookLibraryFromUrl.d.ts +23 -6
  137. package/umd/typings/library/constructors/createPromptbookSublibrary.d.ts +1 -1
  138. package/umd/typings/library/constructors/justTestFsImport.d.ts +7 -0
  139. package/umd/typings/types/Command.d.ts +5 -2
  140. package/umd/typings/types/Prompt.d.ts +5 -2
  141. package/umd/typings/types/PromptbookJson/PromptTemplateJson.d.ts +8 -1
  142. package/umd/typings/types/PromptbookJson/PromptbookJson.d.ts +2 -1
  143. package/umd/typings/types/TaskProgress.d.ts +2 -1
  144. package/umd/typings/types/execution-report/ExecutionReportJson.d.ts +2 -1
  145. package/umd/typings/types/execution-report/countWorkingDuration.d.ts +1 -1
  146. package/umd/typings/types/typeAliases.d.ts +2 -2
  147. package/umd/typings/utils/emojis.d.ts +1 -1
  148. package/umd/typings/utils/expectation-counters/index.d.ts +2 -1
  149. package/umd/typings/utils/extractParameters.d.ts +2 -1
  150. package/umd/typings/utils/markdown/addAutoGeneratedSection.d.ts +2 -1
  151. package/umd/typings/utils/markdown/createMarkdownChart.d.ts +2 -2
  152. package/umd/typings/utils/markdown/createMarkdownTable.d.ts +2 -1
  153. package/umd/typings/utils/markdown/escapeMarkdownBlock.d.ts +1 -1
  154. package/umd/typings/utils/markdown/extractAllListItemsFromMarkdown.d.ts +2 -1
  155. package/umd/typings/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
  156. package/umd/typings/utils/markdown/removeContentComments.d.ts +2 -1
  157. package/umd/typings/utils/markdown/removeMarkdownFormatting.d.ts +1 -1
  158. package/umd/typings/utils/markdown-json/countMarkdownStructureDeepness.d.ts +1 -1
  159. package/umd/typings/utils/markdown-json/markdownToMarkdownStructure.d.ts +1 -1
  160. package/umd/typings/utils/normalization/isValidKeyword.d.ts +1 -1
  161. package/umd/typings/utils/normalization/parseKeywords.d.ts +1 -1
  162. package/umd/typings/utils/normalization/parseKeywordsFromString.d.ts +1 -1
  163. package/umd/typings/utils/normalization/searchKeywords.d.ts +1 -1
  164. package/umd/typings/utils/postprocessing/extractBlock.d.ts +1 -1
  165. package/esm/typings/wizzard/Wizzard.d.ts +0 -4
  166. package/esm/typings/wizzard/sample.d.ts +0 -6
  167. package/umd/typings/wizzard/Wizzard.d.ts +0 -4
  168. package/umd/typings/wizzard/sample.d.ts +0 -6
@@ -1,5 +1,5 @@
1
- import { AutomaticTranslator } from './AutomaticTranslator';
2
- import { TranslatorOptions } from './TranslatorOptions';
1
+ import type { AutomaticTranslator } from './AutomaticTranslator';
2
+ import type { TranslatorOptions } from './TranslatorOptions';
3
3
  interface LindatAutomaticTranslatorOptions extends TranslatorOptions {
4
4
  apiUrl: URL;
5
5
  }
@@ -1,5 +1,5 @@
1
- import { AutomaticTranslator } from './automatic-translators/AutomaticTranslator';
2
- import { TranslatorOptions } from './automatic-translators/TranslatorOptions';
1
+ import type { AutomaticTranslator } from './automatic-translators/AutomaticTranslator';
2
+ import type { TranslatorOptions } from './automatic-translators/TranslatorOptions';
3
3
  export declare function translateMessages({ automaticTranslator, from, to, }: {
4
4
  automaticTranslator: AutomaticTranslator;
5
5
  } & TranslatorOptions): Promise<void>;
@@ -0,0 +1,18 @@
1
+ import type { Promisable } from 'type-fest';
2
+ type ForEachAsyncOptions = {
3
+ /**
4
+ * Maximum number of tasks running in parallel
5
+ *
6
+ * @default Infinity
7
+ */
8
+ inParallelCount?: number;
9
+ };
10
+ /**
11
+ * Async version of Array.forEach
12
+ *
13
+ * @param array - Array to iterate over
14
+ * @param options - Options for the function
15
+ * @param callbackfunction - Function to call for each item
16
+ */
17
+ export declare function forEachAsync<TItem>(array: Array<TItem>, options: ForEachAsyncOptions, callbackfunction: (value: TItem, index: number, array: Array<TItem>) => Promisable<void>): Promise<void>;
18
+ export {};
@@ -1,5 +1,5 @@
1
- import { Parameters } from '../../types/Parameters';
2
- import { string_template } from '../../types/typeAliases';
1
+ import type { Parameters } from '../../types/Parameters';
2
+ import type { string_template } from '../../types/typeAliases';
3
3
  /**
4
4
  * Replaces parameters in template with values from parameters object
5
5
  *
@@ -1,7 +1,7 @@
1
1
  import type { Prompt } from '../types/Prompt';
2
2
  import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
3
3
  import type { string_promptbook_url } from '../types/typeAliases';
4
- import { PromptbookLibrary } from './PromptbookLibrary';
4
+ import type { PromptbookLibrary } from './PromptbookLibrary';
5
5
  /**
6
6
  * Library of promptbooks that groups together promptbooks for an application.
7
7
  * This implementation is a very thin wrapper around the Array / Map of promptbooks.
@@ -1,5 +1,5 @@
1
- import { string_folder_path } from '../../types/typeAliases';
2
- import { PromptbookLibrary } from '../PromptbookLibrary';
1
+ import type { string_folder_path } from '../../types/typeAliases';
2
+ import type { PromptbookLibrary } from '../PromptbookLibrary';
3
3
  /**
4
4
  * Options for `createPromptbookLibraryFromDirectory` function
5
5
  */
@@ -10,20 +10,44 @@ type CreatePromptbookLibraryFromDirectoryOptions = {
10
10
  * @default true
11
11
  */
12
12
  isRecursive?: boolean;
13
+ /**
14
+ * If true, the library creation outputs information about each file it reads
15
+ *
16
+ * @default false
17
+ */
18
+ isVerbose?: boolean;
19
+ /**
20
+ * If true, directory will be scanned only when needed not during the construction
21
+ *
22
+ * @default false
23
+ */
24
+ isLazyLoaded?: boolean;
25
+ /**
26
+ * If true, whole library creation crashes on error in any promptbook
27
+ * If true and isLazyLoaded is true, the error is thrown on first access to the promptbook
28
+ *
29
+ * @default true
30
+ */
31
+ isCrashOnError?: boolean;
13
32
  };
14
33
  /**
15
34
  * Constructs Promptbook from given directory
16
35
  *
17
36
  * Note: Works only in Node.js environment because it reads the file system
18
- * Note: The function does NOT return promise it returns the library directly which dynamically loads promptbooks when needed
19
- * SO during the construction syntax and logic sources IS NOT validated
20
37
  *
21
38
  * @param path - path to the directory with promptbooks
22
39
  * @param options - Misc options for the library
23
40
  * @returns PromptbookLibrary
24
41
  */
25
- export declare function createPromptbookLibraryFromDirectory(path: string_folder_path, options?: CreatePromptbookLibraryFromDirectoryOptions): PromptbookLibrary;
42
+ export declare function createPromptbookLibraryFromDirectory(path: string_folder_path, options?: CreatePromptbookLibraryFromDirectoryOptions): Promise<PromptbookLibrary>;
26
43
  export {};
27
44
  /***
28
- * TODO: [๐Ÿ“][๐Ÿšฏ] !!! Add to README and samples + maybe make `@promptbook/library` package
45
+ * TODO: [๐Ÿง ] Maybe do not do hacks like [1] and just create package @promptbook/node
46
+ * [๐Ÿ“][๐Ÿšฏ] maybe make `@promptbook/library` package
47
+ * TODO: Fix the dynamic import issue in Webpack (! Not working !)
48
+ * > ./node_modules/@promptbook/core/esm/index.es.js
49
+ * > Critical dependency: the request of a dependency is an expression
50
+ *
51
+ * Note: [1] Using require(just('fs/promises')) to allow
52
+ * the `@promptbook/core` work for both Node.js and browser environments
29
53
  */
@@ -1,6 +1,6 @@
1
1
  import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
- import { PromptbookString } from '../../types/PromptbookString';
3
- import { PromptbookLibrary } from '../PromptbookLibrary';
2
+ import type { PromptbookString } from '../../types/PromptbookString';
3
+ import type { PromptbookLibrary } from '../PromptbookLibrary';
4
4
  /**
5
5
  * Constructs Promptbook from async sources
6
6
  * It can be one of the following:
@@ -14,11 +14,11 @@ import { PromptbookLibrary } from '../PromptbookLibrary';
14
14
  * Note: The function does NOT return promise it returns the library directly which waits for the sources to be resolved
15
15
  * when error occurs in given promise or factory function, it is thrown during `listPromptbooks` or `getPromptbookByUrl` call
16
16
  *
17
+ * Note: Consider using `createPromptbookLibraryFromDirectory` or `createPromptbookLibraryFromUrl`
17
18
  *
18
19
  * @param promptbookSourcesPromiseOrFactory
19
20
  * @returns PromptbookLibrary
20
- *
21
- * @deprecated Consider using `createPromptbookLibraryFromUrl` or `createPromptbookLibraryFromDirectory`
21
+ * @private Just internal tool for other constructor functions
22
22
  */
23
23
  export declare function createPromptbookLibraryFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PromptbookJson | PromptbookString>> | (() => Promise<Array<PromptbookJson | PromptbookString>>)): PromptbookLibrary;
24
24
  /***
@@ -1,4 +1,5 @@
1
- import { PromptbookJson, PromptbookString } from '../../_packages/types.index';
1
+ import type { PromptbookJson } from '../../types/PromptbookJson/PromptbookJson';
2
+ import type { PromptbookString } from '../../types/PromptbookString';
2
3
  import { SimplePromptbookLibrary } from '../SimplePromptbookLibrary';
3
4
  /**
4
5
  * Creates PromptbookLibrary from array of PromptbookJson or PromptbookString
@@ -1,13 +1,30 @@
1
- import { PromptbookLibrary } from '../PromptbookLibrary';
1
+ import type { string_url } from '../../types/typeAliases';
2
+ import type { PromptbookLibrary } from '../PromptbookLibrary';
3
+ /**
4
+ * Options for `createPromptbookLibraryFromDirectory` function
5
+ */
6
+ type CreatePromptbookLibraryFromUrlyOptions = {
7
+ /**
8
+ * If true, the library creation outputs information about each file it reads
9
+ *
10
+ * @default false
11
+ */
12
+ isVerbose?: boolean;
13
+ /**
14
+ * If true, directory will be scanned only when needed not during the construction
15
+ *
16
+ * @default false
17
+ */
18
+ isLazyLoaded?: boolean;
19
+ };
2
20
  /**
3
21
  * Constructs Promptbook from remote Promptbase URL
4
- *
5
- * Note: The function does NOT return promise it returns the library directly which dynamically loads promptbooks when needed
6
- * SO during the construction syntax and logic sources IS NOT validated
7
- *
22
+
8
23
  * @returns PromptbookLibrary
9
24
  */
10
- export declare function createPromptbookLibraryFromUrl(): PromptbookLibrary;
25
+ export declare function createPromptbookLibraryFromUrl(url: string_url | URL, options: CreatePromptbookLibraryFromUrlyOptions): Promise<PromptbookLibrary>;
26
+ export {};
11
27
  /***
28
+ * TODO: [โš–] Compatible with remote server
12
29
  * TODO: [๐Ÿ“][๐Ÿšฏ] !!! Add to README and samples + maybe make `@promptbook/library` package
13
30
  */
@@ -1,5 +1,5 @@
1
1
  import type { string_promptbook_url } from '../../types/typeAliases';
2
- import { PromptbookLibrary } from '../PromptbookLibrary';
2
+ import type { PromptbookLibrary } from '../PromptbookLibrary';
3
3
  /**
4
4
  * Creates PromptbookLibrary as a subset of another PromptbookLibrary
5
5
  *
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Just testing imports and compatibility
3
+ */
4
+ export declare function justTestFsImport(): Promise<void>;
5
+ /**
6
+ * TODO: !!! Remove this file
7
+ */
@@ -1,7 +1,10 @@
1
- import type { string_markdown_text, string_name, string_version } from '.././types/typeAliases';
1
+ import type { string_markdown_text } from './typeAliases';
2
+ import type { string_name } from './typeAliases';
3
+ import type { string_version } from './typeAliases';
2
4
  import type { ExecutionType } from './ExecutionTypes';
3
5
  import type { ModelRequirements } from './ModelRequirements';
4
- import type { ExpectationAmount, ExpectationUnit } from './PromptbookJson/PromptTemplateJson';
6
+ import type { ExpectationAmount } from './PromptbookJson/PromptTemplateJson';
7
+ import type { ExpectationUnit } from './PromptbookJson/PromptTemplateJson';
5
8
  /**
6
9
  * Command is one piece of the prompt template which adds some logic to the prompt template or the whole pipeline.
7
10
  * It is parsed from the markdown from ul/ol items - one command per one item.
@@ -1,4 +1,7 @@
1
- import type { string_name, string_prompt, string_promptbook_url_with_hashtemplate, string_title } from '.././types/typeAliases';
1
+ import type { string_name } from './typeAliases';
2
+ import type { string_prompt } from './typeAliases';
3
+ import type { string_promptbook_url_with_hashtemplate } from './typeAliases';
4
+ import type { string_title } from './typeAliases';
2
5
  import type { PostprocessingFunction } from '../execution/plugins/script-execution-tools/javascript/JavascriptExecutionToolsOptions';
3
6
  import type { ModelRequirements } from './ModelRequirements';
4
7
  import type { Expectations } from './PromptbookJson/PromptTemplateJson';
@@ -39,7 +42,7 @@ export type Prompt = {
39
42
  /**
40
43
  * Unique identifier of the promptbook with specific template name as hash
41
44
  *
42
- * @example https://promptbook.webgpt.com/cs/write-website-content.ptbk.md@v2.4.15#keywords
45
+ * @example https://promptbook.webgpt.com/cs/write-website-content.ptbk.md#keywords
43
46
  */
44
47
  readonly promptbookUrl: string_promptbook_url_with_hashtemplate;
45
48
  /**
@@ -2,7 +2,14 @@ import type { ExpectFormatCommand } from '../Command';
2
2
  import type { ExecutionType } from '../ExecutionTypes';
3
3
  import type { ModelRequirements } from '../ModelRequirements';
4
4
  import type { ScriptLanguage } from '../ScriptLanguage';
5
- import type { number_integer, number_positive_or_zero, string_javascript, string_javascript_name, string_markdown, string_name, string_prompt, string_template } from '../typeAliases';
5
+ import type { number_integer } from '../typeAliases';
6
+ import type { number_positive_or_zero } from '../typeAliases';
7
+ import type { string_javascript } from '../typeAliases';
8
+ import type { string_javascript_name } from '../typeAliases';
9
+ import type { string_markdown } from '../typeAliases';
10
+ import type { string_name } from '../typeAliases';
11
+ import type { string_prompt } from '../typeAliases';
12
+ import type { string_template } from '../typeAliases';
6
13
  /**
7
14
  * Describes one prompt template in the promptbook
8
15
  */
@@ -1,4 +1,5 @@
1
- import type { string_promptbook_url, string_version } from '../typeAliases';
1
+ import type { string_promptbook_url } from '../typeAliases';
2
+ import type { string_version } from '../typeAliases';
2
3
  import type { PromptTemplateJson } from './PromptTemplateJson';
3
4
  import type { PromptTemplateParameterJson } from './PromptTemplateParameterJson';
4
5
  /**
@@ -1,5 +1,6 @@
1
1
  import type { ExecutionType } from './ExecutionTypes';
2
- import type { string_markdown_text, string_name } from './typeAliases';
2
+ import type { string_markdown_text } from './typeAliases';
3
+ import type { string_name } from './typeAliases';
3
4
  /**
4
5
  * TaskProgress represents the progress of a Promptbook execution.
5
6
  */
@@ -1,6 +1,7 @@
1
1
  import type { PromptResult } from '../../execution/PromptResult';
2
2
  import type { Prompt } from '../Prompt';
3
- import type { string_promptbook_url, string_version } from '../typeAliases';
3
+ import type { string_promptbook_url } from '../typeAliases';
4
+ import type { string_version } from '../typeAliases';
4
5
  /**
5
6
  * ExecutionReport is result of executing one promptbook
6
7
  * It is kind of a variant of the promptbook usefull for debugging, logging and transparency for users.
@@ -1,4 +1,4 @@
1
- import { FromtoItems } from '../../utils/FromtoItems';
1
+ import type { FromtoItems } from '../../utils/FromtoItems';
2
2
  /**
3
3
  * Count the duration of working time
4
4
  *
@@ -179,13 +179,13 @@ export type string_url = string;
179
179
  /**
180
180
  * Semantic helper
181
181
  *
182
- * For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md@v2.4.15"`
182
+ * For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md"`
183
183
  */
184
184
  export type string_promptbook_url = string;
185
185
  /**
186
186
  * Semantic helper
187
187
  *
188
- * For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md@v2.4.15#keywords"`
188
+ * For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md#keywords"`
189
189
  */
190
190
  export type string_promptbook_url_with_hashtemplate = string;
191
191
  /**
@@ -1,4 +1,4 @@
1
- import { string_char_emoji } from '../types/typeAliasEmoji';
1
+ import type { string_char_emoji } from '../types/typeAliasEmoji';
2
2
  /**
3
3
  * All possible emoji chars like "๐Ÿ†", "๐Ÿก", "๐Ÿค"...
4
4
  * Note: this will be needed to update annually - now updated at 2022-01-19
@@ -1,4 +1,5 @@
1
- import type { ExpectationAmount, ExpectationUnit } from '../../types/PromptbookJson/PromptTemplateJson';
1
+ import type { ExpectationAmount } from '../../types/PromptbookJson/PromptTemplateJson';
2
+ import type { ExpectationUnit } from '../../types/PromptbookJson/PromptTemplateJson';
2
3
  /**
3
4
  * Index of all counter functions
4
5
  */
@@ -1,4 +1,5 @@
1
- import { string_name, string_template } from '../types/typeAliases';
1
+ import type { string_name } from '../types/typeAliases';
2
+ import type { string_template } from '../types/typeAliases';
2
3
  /**
3
4
  * Parses the template and returns the list of all parameter names
4
5
  *
@@ -1,4 +1,5 @@
1
- import type { string_markdown, string_name } from '../../types/typeAliases';
1
+ import type { string_markdown } from '../../types/typeAliases';
2
+ import type { string_name } from '../../types/typeAliases';
2
3
  /**
3
4
  * Add or modify an auto-generated section in a markdown file
4
5
  *
@@ -1,5 +1,5 @@
1
- import { string_markdown } from '../../types/typeAliases';
2
- import { FromtoItems } from '../FromtoItems';
1
+ import type { string_markdown } from '../../types/typeAliases';
2
+ import type { FromtoItems } from '../FromtoItems';
3
3
  /**
4
4
  * Options for creating a markdown chart
5
5
  */
@@ -1,4 +1,5 @@
1
- import { string_markdown, string_markdown_text } from '../../types/typeAliases';
1
+ import type { string_markdown } from '../../types/typeAliases';
2
+ import type { string_markdown_text } from '../../types/typeAliases';
2
3
  /**
3
4
  * Create a markdown table from a 2D array of strings
4
5
  *
@@ -1,4 +1,4 @@
1
- import { string_markdown_text } from '../../types/typeAliases';
1
+ import type { string_markdown_text } from '../../types/typeAliases';
2
2
  /**
3
3
  * Function escapeMarkdownBlock will escape markdown block if needed
4
4
  * It is useful when you want have block in block
@@ -1,4 +1,5 @@
1
- import { string_markdown, string_markdown_text } from '../.././types/typeAliases';
1
+ import type { string_markdown } from '../../types/typeAliases';
2
+ import type { string_markdown_text } from '../../types/typeAliases';
2
3
  /**
3
4
  * Utility function to extract all list items from markdown
4
5
  *
@@ -1,5 +1,5 @@
1
- import { string_markdown } from '../.././types/typeAliases';
2
- import { CodeBlock } from './extractAllBlocksFromMarkdown';
1
+ import type { string_markdown } from '../../types/typeAliases';
2
+ import type { CodeBlock } from './extractAllBlocksFromMarkdown';
3
3
  /**
4
4
  * Extracts exactly ONE code block from markdown.
5
5
  *
@@ -1,4 +1,5 @@
1
- import { string_html, string_markdown } from '../../types/typeAliases';
1
+ import type { string_html } from '../../types/typeAliases';
2
+ import type { string_markdown } from '../../types/typeAliases';
2
3
  /**
3
4
  * Removes HTML or Markdown comments from a string.
4
5
  *
@@ -1,4 +1,4 @@
1
- import { string_markdown_text } from '../../types/typeAliases';
1
+ import type { string_markdown_text } from '../../types/typeAliases';
2
2
  /**
3
3
  * Removes Markdown formatting tags from a string.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { MarkdownStructure } from './MarkdownStructure';
1
+ import type { MarkdownStructure } from './MarkdownStructure';
2
2
  /**
3
3
  * Computes the deepness of the markdown structure.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { MarkdownStructure } from './MarkdownStructure';
1
+ import type { MarkdownStructure } from './MarkdownStructure';
2
2
  /**
3
3
  * Parse a markdown string into a MarkdownStructure object.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { string_keyword } from './IKeywords';
1
+ import type { string_keyword } from './IKeywords';
2
2
  /**
3
3
  * Tests if keyword is valid
4
4
  *
@@ -1,4 +1,4 @@
1
- import { IKeywords } from './IKeywords';
1
+ import type { IKeywords } from './IKeywords';
2
2
  /**
3
3
  * Parses keywords from any object and recursively walks through
4
4
  *
@@ -1,4 +1,4 @@
1
- import { IKeywords } from './IKeywords';
1
+ import type { IKeywords } from './IKeywords';
2
2
  /**
3
3
  * Parses keywords from a string
4
4
  *
@@ -1,4 +1,4 @@
1
- import { IKeywords } from './IKeywords';
1
+ import type { IKeywords } from './IKeywords';
2
2
  /**
3
3
  *
4
4
  */
@@ -1,4 +1,4 @@
1
- import { string_markdown } from '../../types/typeAliases';
1
+ import type { string_markdown } from '../../types/typeAliases';
2
2
  /**
3
3
  * Extracts code block from markdown.
4
4
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/remote-client",
3
- "version": "0.52.0-9",
3
+ "version": "0.53.0",
4
4
  "description": "Library to supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -47,7 +47,7 @@
47
47
  }
48
48
  ],
49
49
  "peerDependencies": {
50
- "@promptbook/core": "0.52.0-9"
50
+ "@promptbook/core": "0.53.0"
51
51
  },
52
52
  "main": "./umd/index.umd.js",
53
53
  "module": "./esm/index.es.js",
package/umd/index.umd.js CHANGED
@@ -153,7 +153,7 @@
153
153
  return RemoteLlmExecutionTools;
154
154
  }());
155
155
  /**
156
- * TODO: [๐Ÿ“][โ™] Allow to list compatible models with each variant
156
+ * TODO: [๐Ÿ“] Allow to list compatible models with each variant
157
157
  * TODO: [๐Ÿคนโ€โ™‚๏ธ] RemoteLlmExecutionTools should extend Destroyable and implement IDestroyable
158
158
  */
159
159
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null],"names":["io"],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AAuDA;IACO,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE;IAC7D,IAAI,SAAS,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,KAAK,YAAY,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,OAAO,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;IAChH,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,EAAE,UAAU,OAAO,EAAE,MAAM,EAAE;IAC/D,QAAQ,SAAS,SAAS,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;IACnG,QAAQ,SAAS,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC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AAU,EAAE,CAAC;qCACvB,CAAC,CAAC;iCACN,CAAC,EAAA;;4BAVI,YAAY,GAAG,SAUnB;4BAEF,MAAM,CAAC,UAAU,EAAE,CAAC;4BAEpB,sBAAO,YAAY,EAAC;;;;SACvB;;;;QAKY,4CAAU,GAAvB;;;oBACI,sBAAO;;yBAEN,EAAC;;;SACL;QACL,8BAAC;IAAD,CAAC,IAAA;IAED;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/execution/plugins/llm-execution-tools/remote/RemoteLlmExecutionTools.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n",null],"names":["io"],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AAuDA;IACO,SAAS,SAAS,CAAC,OAAO,EAAE,UAAU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MAAc;;;;;gCACnB,qBAAM,IAAI,CAAC,cAAc,EAAE,EAAA;;4BAApC,MAAM,GAAG,SAA2B;4BAC1C,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,QAAA,EAAsC,CAAC,CAAC;4BAEnF,qBAAM,IAAI,OAAO,CAAe,UAAC,OAAO,EAAE,MAAM;oCACjE,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,UAAC,QAAoC;wCACvD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;wCAC/B,MAAM,CAAC,UAAU,EAAE,CAAC;qCACvB,CAAC,CAAC;oCACH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,UAAC,KAA8B;;wCAE9C,MAAM,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;wCACtC,MAAM,CAAC,UAAU,EAAE,CAAC;qCACvB,CAAC,CAAC;iCACN,CAAC,EAAA;;4BAVI,YAAY,GAAG,SAUnB;4BAEF,MAAM,CAAC,UAAU,EAAE,CAAC;4BAEpB,sBAAO,YAAY,EAAC;;;;SACvB;;;;QAKY,4CAAU,GAAvB;;;oBACI,sBAAO;;yBAEN,EAAC;;;SACL;QACL,8BAAC;IAAD,CAAC,IAAA;IAED;;;;;;;;;;;;;"}
@@ -10,17 +10,19 @@ import { CallbackInterfaceToolsOptions } from '../execution/plugins/user-interfa
10
10
  import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools';
11
11
  import { checkExpectations, isPassingExpectations } from '../execution/utils/checkExpectations';
12
12
  import { createPromptbookLibraryFromDirectory } from '../library/constructors/createPromptbookLibraryFromDirectory';
13
- import { createPromptbookLibraryFromPromise } from '../library/constructors/createPromptbookLibraryFromPromise';
14
13
  import { createPromptbookLibraryFromSources } from '../library/constructors/createPromptbookLibraryFromSources';
14
+ import { createPromptbookLibraryFromUrl } from '../library/constructors/createPromptbookLibraryFromUrl';
15
15
  import { createPromptbookSublibrary } from '../library/constructors/createPromptbookSublibrary';
16
+ import { justTestFsImport } from '../library/constructors/justTestFsImport';
16
17
  import { SimplePromptbookLibrary } from '../library/SimplePromptbookLibrary';
17
18
  import { executionReportJsonToString } from '../types/execution-report/executionReportJsonToString';
18
19
  import { ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults } from '../types/execution-report/ExecutionReportStringOptions';
19
20
  import { ExecutionTypes } from '../types/ExecutionTypes';
20
21
  import { PROMPTBOOK_VERSION } from '../version';
22
+ export { justTestFsImport };
21
23
  export { ExecutionTypes, PROMPTBOOK_VERSION };
22
24
  export { assertsExecutionSuccessful, checkExpectations, executionReportJsonToString, ExecutionReportStringOptions, ExecutionReportStringOptionsDefaults, isPassingExpectations, prettifyPromptbookString, };
23
- export { createPromptbookLibraryFromDirectory, createPromptbookLibraryFromPromise, createPromptbookLibraryFromSources, createPromptbookSublibrary, SimplePromptbookLibrary, };
25
+ export { createPromptbookLibraryFromDirectory, createPromptbookLibraryFromSources, createPromptbookLibraryFromUrl, createPromptbookSublibrary, SimplePromptbookLibrary, };
24
26
  export { SimplePromptInterfaceTools };
25
27
  export { promptbookJsonToString, promptbookStringToJson, validatePromptbookJson };
26
28
  export { createPromptbookExecutor, MultipleLlmExecutionTools };