@promptbook/remote-client 0.61.0-12 → 0.61.0-14

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 (125) hide show
  1. package/esm/index.es.js +1 -4
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/src/_packages/execute-javascript.index.d.ts +1 -1
  4. package/esm/typings/src/_packages/types.index.d.ts +6 -3
  5. package/esm/typings/src/_packages/utils.index.d.ts +1 -1
  6. package/esm/typings/src/commands/MODEL/ModelCommand.d.ts +2 -2
  7. package/esm/typings/src/config.d.ts +5 -1
  8. package/esm/typings/src/conversion/utils/stringifyPipelineJson.d.ts +13 -0
  9. package/esm/typings/src/conversion/validation/_importPipeline.d.ts +10 -1
  10. package/esm/typings/src/conversion/validation/validatePipeline.d.ts +1 -1
  11. package/esm/typings/src/errors/LimitReachedError.d.ts +7 -0
  12. package/esm/typings/src/execution/LlmExecutionTools.d.ts +7 -7
  13. package/esm/typings/src/execution/PipelineExecutor.d.ts +1 -1
  14. package/esm/typings/src/execution/PromptResult.d.ts +14 -56
  15. package/esm/typings/src/execution/PromptResultUsage.d.ts +26 -0
  16. package/esm/typings/src/execution/UncertainNumber.d.ts +18 -0
  17. package/esm/typings/src/execution/utils/addUsage.d.ts +58 -2
  18. package/esm/typings/src/execution/utils/computeUsageCounts.d.ts +1 -1
  19. package/esm/typings/src/execution/utils/uncertainNumber.d.ts +1 -1
  20. package/esm/typings/src/execution/utils/usageToWorktime.d.ts +2 -2
  21. package/esm/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +10 -2
  22. package/esm/typings/src/llm-providers/_common/getLlmToolsForTestingAndScriptsAndPlayground.d.ts +2 -1
  23. package/esm/typings/src/llm-providers/_common/utils/count-total-cost/LlmExecutionToolsWithTotalCost.d.ts +1 -1
  24. package/esm/typings/src/llm-providers/_common/utils/count-total-cost/limitTotalCost.d.ts +32 -0
  25. package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -2
  26. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +4 -4
  27. package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +4 -4
  28. package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +6 -6
  29. package/esm/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +9 -7
  30. package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +6 -6
  31. package/esm/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +1 -1
  32. package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +9 -7
  33. package/esm/typings/src/scripting/javascript/utils/unknownToString.d.ts +2 -1
  34. package/esm/typings/src/types/ModelRequirements.d.ts +53 -14
  35. package/esm/typings/src/types/ModelVariant.d.ts +14 -0
  36. package/esm/typings/src/types/PipelineJson/PersonaJson.d.ts +2 -4
  37. package/esm/typings/src/types/PipelineJson/PreparationJson.d.ts +1 -1
  38. package/esm/typings/src/types/Prompt.d.ts +45 -1
  39. package/esm/typings/src/types/typeAliases.d.ts +11 -0
  40. package/esm/typings/src/utils/deepClone.d.ts +9 -0
  41. package/esm/typings/src/utils/deepFreeze.d.ts +13 -0
  42. package/esm/typings/src/utils/normalization/parseKeywords.d.ts +2 -1
  43. package/{umd/typings/src/utils/organization/TODO.d.ts → esm/typings/src/utils/organization/TODO_any.d.ts} +1 -1
  44. package/esm/typings/src/utils/organization/TODO_object.d.ts +6 -0
  45. package/esm/typings/src/utils/organization/TODO_unknown.d.ts +6 -0
  46. package/esm/typings/src/utils/organization/just.d.ts +4 -1
  47. package/esm/typings/src/utils/organization/keepUnused.d.ts +16 -0
  48. package/esm/typings/src/utils/organization/really_any.d.ts +1 -1
  49. package/esm/typings/src/utils/organization/really_unknown.d.ts +6 -0
  50. package/esm/typings/src/utils/validators/email/isValidEmail.d.ts +2 -1
  51. package/esm/typings/src/utils/validators/filePath/isValidFilePath.d.ts +2 -1
  52. package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +2 -1
  53. package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -1
  54. package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +2 -1
  55. package/esm/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +2 -1
  56. package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +2 -1
  57. package/esm/typings/src/utils/validators/uuid/isValidUuid.d.ts +2 -1
  58. package/esm/typings/src/version.d.ts +0 -3
  59. package/package.json +2 -2
  60. package/umd/index.umd.js +1 -4
  61. package/umd/index.umd.js.map +1 -1
  62. package/umd/typings/src/_packages/execute-javascript.index.d.ts +1 -1
  63. package/umd/typings/src/_packages/types.index.d.ts +6 -3
  64. package/umd/typings/src/_packages/utils.index.d.ts +1 -1
  65. package/umd/typings/src/commands/MODEL/ModelCommand.d.ts +2 -2
  66. package/umd/typings/src/config.d.ts +5 -1
  67. package/umd/typings/src/conversion/utils/stringifyPipelineJson.d.ts +13 -0
  68. package/umd/typings/src/conversion/validation/_importPipeline.d.ts +10 -1
  69. package/umd/typings/src/conversion/validation/validatePipeline.d.ts +1 -1
  70. package/umd/typings/src/errors/LimitReachedError.d.ts +7 -0
  71. package/umd/typings/src/execution/LlmExecutionTools.d.ts +7 -7
  72. package/umd/typings/src/execution/PipelineExecutor.d.ts +1 -1
  73. package/umd/typings/src/execution/PromptResult.d.ts +14 -56
  74. package/umd/typings/src/execution/PromptResultUsage.d.ts +26 -0
  75. package/umd/typings/src/execution/UncertainNumber.d.ts +18 -0
  76. package/umd/typings/src/execution/utils/addUsage.d.ts +58 -2
  77. package/umd/typings/src/execution/utils/computeUsageCounts.d.ts +1 -1
  78. package/umd/typings/src/execution/utils/uncertainNumber.d.ts +1 -1
  79. package/umd/typings/src/execution/utils/usageToWorktime.d.ts +2 -2
  80. package/umd/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +10 -2
  81. package/umd/typings/src/llm-providers/_common/getLlmToolsForTestingAndScriptsAndPlayground.d.ts +2 -1
  82. package/umd/typings/src/llm-providers/_common/utils/count-total-cost/LlmExecutionToolsWithTotalCost.d.ts +1 -1
  83. package/umd/typings/src/llm-providers/_common/utils/count-total-cost/limitTotalCost.d.ts +32 -0
  84. package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -2
  85. package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +4 -4
  86. package/umd/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +4 -4
  87. package/umd/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +6 -6
  88. package/umd/typings/src/llm-providers/multiple/MultipleLlmExecutionTools.d.ts +9 -7
  89. package/umd/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +6 -6
  90. package/umd/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +1 -1
  91. package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +9 -7
  92. package/umd/typings/src/scripting/javascript/utils/unknownToString.d.ts +2 -1
  93. package/umd/typings/src/types/ModelRequirements.d.ts +53 -14
  94. package/umd/typings/src/types/ModelVariant.d.ts +14 -0
  95. package/umd/typings/src/types/PipelineJson/PersonaJson.d.ts +2 -4
  96. package/umd/typings/src/types/PipelineJson/PreparationJson.d.ts +1 -1
  97. package/umd/typings/src/types/Prompt.d.ts +45 -1
  98. package/umd/typings/src/types/typeAliases.d.ts +11 -0
  99. package/umd/typings/src/utils/deepClone.d.ts +9 -0
  100. package/umd/typings/src/utils/deepFreeze.d.ts +13 -0
  101. package/umd/typings/src/utils/normalization/parseKeywords.d.ts +2 -1
  102. package/{esm/typings/src/utils/organization/TODO.d.ts → umd/typings/src/utils/organization/TODO_any.d.ts} +1 -1
  103. package/umd/typings/src/utils/organization/TODO_object.d.ts +6 -0
  104. package/umd/typings/src/utils/organization/TODO_unknown.d.ts +6 -0
  105. package/umd/typings/src/utils/organization/just.d.ts +4 -1
  106. package/umd/typings/src/utils/organization/keepUnused.d.ts +16 -0
  107. package/umd/typings/src/utils/organization/really_any.d.ts +1 -1
  108. package/umd/typings/src/utils/organization/really_unknown.d.ts +6 -0
  109. package/umd/typings/src/utils/validators/email/isValidEmail.d.ts +2 -1
  110. package/umd/typings/src/utils/validators/filePath/isValidFilePath.d.ts +2 -1
  111. package/umd/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +2 -1
  112. package/umd/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -1
  113. package/umd/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +2 -1
  114. package/umd/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +2 -1
  115. package/umd/typings/src/utils/validators/url/isValidUrl.d.ts +2 -1
  116. package/umd/typings/src/utils/validators/uuid/isValidUuid.d.ts +2 -1
  117. package/umd/typings/src/version.d.ts +0 -3
  118. package/esm/typings/src/utils/organization/keepImported.d.ts +0 -12
  119. package/esm/typings/src/utils/organization/notUsing.d.ts +0 -12
  120. package/umd/typings/src/utils/organization/keepImported.d.ts +0 -12
  121. package/umd/typings/src/utils/organization/notUsing.d.ts +0 -12
  122. /package/esm/typings/src/{execution/addPromptResultUsage.test.d.ts → conversion/utils/stringifyPipelineJson.test.d.ts} +0 -0
  123. /package/esm/typings/src/{utils/postprocessing → postprocessing/utils}/extractBlock.d.ts +0 -0
  124. /package/umd/typings/src/{execution/addPromptResultUsage.test.d.ts → conversion/utils/stringifyPipelineJson.test.d.ts} +0 -0
  125. /package/umd/typings/src/{utils/postprocessing → postprocessing/utils}/extractBlock.d.ts +0 -0
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Organizational helper to mark a place where to really use `unknown`
3
+ *
4
+ * @private within the repository
5
+ */
6
+ export type really_unknown = unknown;
@@ -1,5 +1,6 @@
1
1
  import type { string_email } from '../../../types/typeAliases';
2
+ import type { really_unknown } from '../../organization/really_unknown';
2
3
  /**
3
4
  * Checks if value is valid email
4
5
  */
5
- export declare function isValidEmail(email: unknown): email is string_email;
6
+ export declare function isValidEmail(email: really_unknown): email is string_email;
@@ -1,7 +1,8 @@
1
1
  import type { string_file_path } from '../../../types/typeAliases';
2
+ import type { really_unknown } from '../../organization/really_unknown';
2
3
  /**
3
4
  * Tests if given string is valid URL.
4
5
  *
5
6
  * Note: This does not check if the file exists only if the path is valid
6
7
  */
7
- export declare function isValidFilePath(filePath: unknown): filePath is string_file_path;
8
+ export declare function isValidFilePath(filePath: really_unknown): filePath is string_file_path;
@@ -1,2 +1,3 @@
1
1
  import type { string_javascript_name } from '../../../types/typeAliases';
2
- export declare function isValidJavascriptName(javascriptName: unknown): javascriptName is string_javascript_name;
2
+ import type { really_unknown } from '../../organization/really_unknown';
3
+ export declare function isValidJavascriptName(javascriptName: really_unknown): javascriptName is string_javascript_name;
@@ -1,4 +1,5 @@
1
1
  import type { string_promptbook_version } from '../../../version';
2
+ import type { really_unknown } from '../../organization/really_unknown';
2
3
  /**
3
4
  * Tests if given string is valid promptbook version
4
5
  * It looks into list of known promptbook versions.
@@ -9,4 +10,4 @@ import type { string_promptbook_version } from '../../../version';
9
10
  * - `isValidSemanticVersion` which tests any semantic version
10
11
  * - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
11
12
  */
12
- export declare function isValidPromptbookVersion(version: unknown): version is string_promptbook_version;
13
+ export declare function isValidPromptbookVersion(version: really_unknown): version is string_promptbook_version;
@@ -1,4 +1,5 @@
1
1
  import type { string_semantic_version } from '../../../types/typeAliases';
2
+ import type { really_unknown } from '../../organization/really_unknown';
2
3
  /**
3
4
  * Tests if given string is valid semantic version
4
5
  *
@@ -6,4 +7,4 @@ import type { string_semantic_version } from '../../../types/typeAliases';
6
7
  * - `isValidSemanticVersion` which tests any semantic version
7
8
  * - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
8
9
  */
9
- export declare function isValidSemanticVersion(version: unknown): version is string_semantic_version;
10
+ export declare function isValidSemanticVersion(version: really_unknown): version is string_semantic_version;
@@ -1,4 +1,5 @@
1
1
  import type { string_pipeline_url } from '../../../types/typeAliases';
2
+ import type { really_unknown } from '../../organization/really_unknown';
2
3
  /**
3
4
  * Tests if given string is valid pipeline URL URL.
4
5
  *
@@ -6,7 +7,7 @@ import type { string_pipeline_url } from '../../../types/typeAliases';
6
7
  * - `isValidUrl` which tests any URL
7
8
  * - `isValidPipelineUrl` *(this one)* which tests just pipeline URL
8
9
  */
9
- export declare function isValidPipelineUrl(url: unknown): url is string_pipeline_url;
10
+ export declare function isValidPipelineUrl(url: really_unknown): url is string_pipeline_url;
10
11
  /**
11
12
  * TODO: [🐠] Maybe more info why the URL is invalid
12
13
  */
@@ -1,4 +1,5 @@
1
1
  import type { string_url } from '../../../types/typeAliases';
2
+ import type { really_unknown } from '../../organization/really_unknown';
2
3
  /**
3
4
  * Tests if given string is valid URL.
4
5
  *
@@ -7,4 +8,4 @@ import type { string_url } from '../../../types/typeAliases';
7
8
  * - `isValidUrl` which tests any URL
8
9
  * - `isValidPipelineUrl` *(this one)* which tests just promptbook URL
9
10
  */
10
- export declare function isValidUrl(url: unknown): url is string_url;
11
+ export declare function isValidUrl(url: really_unknown): url is string_url;
@@ -1,5 +1,6 @@
1
1
  import type { string_uuid } from '../../../types/typeAliases';
2
+ import type { really_unknown } from '../../organization/really_unknown';
2
3
  /**
3
4
  * Checks if value is valid uuid
4
5
  */
5
- export declare function isValidUuid(value: unknown): value is string_uuid;
6
+ export declare function isValidUuid(value: really_unknown): value is string_uuid;
@@ -4,6 +4,3 @@ import type { string_semantic_version } from './types/typeAliases';
4
4
  */
5
5
  export declare const PROMPTBOOK_VERSION: string_promptbook_version;
6
6
  export type string_promptbook_version = string_semantic_version;
7
- /**
8
- * TODO: [🔼] !!! Export via `@promptbook/code`
9
- */
@@ -1,12 +0,0 @@
1
- import type { really_any } from './really_any';
2
- /**
3
- * Just says that the variable is not used but should be kept
4
- * No side effects.
5
- *
6
- * Note: It can be usefull suppressing eager optimization of unused imports
7
- *
8
- * @param value any values
9
- * @returns void
10
- * @private within the repository
11
- */
12
- export declare function keepImported(...value: Array<really_any>): void;
@@ -1,12 +0,0 @@
1
- import type { really_any } from './really_any';
2
- /**
3
- * Just says that the variable is not used
4
- * No side effects.
5
- *
6
- * Note: It can be usefull suppressing eslint errors of unused variables in the tests
7
- *
8
- * @param value any values
9
- * @returns void
10
- * @private within the repository
11
- */
12
- export declare function notUsing(...value: Array<really_any>): void;
@@ -1,12 +0,0 @@
1
- import type { really_any } from './really_any';
2
- /**
3
- * Just says that the variable is not used but should be kept
4
- * No side effects.
5
- *
6
- * Note: It can be usefull suppressing eager optimization of unused imports
7
- *
8
- * @param value any values
9
- * @returns void
10
- * @private within the repository
11
- */
12
- export declare function keepImported(...value: Array<really_any>): void;
@@ -1,12 +0,0 @@
1
- import type { really_any } from './really_any';
2
- /**
3
- * Just says that the variable is not used
4
- * No side effects.
5
- *
6
- * Note: It can be usefull suppressing eslint errors of unused variables in the tests
7
- *
8
- * @param value any values
9
- * @returns void
10
- * @private within the repository
11
- */
12
- export declare function notUsing(...value: Array<really_any>): void;