@promptbook/remote-client 0.35.1 → 0.36.2
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.
- package/README.md +1 -1
- package/esm/index.es.js.map +1 -1
- package/esm/typings/_packages/core.index.d.ts +8 -8
- package/esm/typings/_packages/remote-server.index.d.ts +2 -2
- package/esm/typings/_packages/types.index.d.ts +8 -8
- package/esm/typings/classes/PromptbookLibrary.d.ts +61 -0
- package/esm/typings/conversion/_importPromptbook.d.ts +12 -0
- package/esm/typings/conversion/promptbookStringToJson.d.ts +13 -0
- package/esm/typings/conversion/validatePromptbookJson.d.ts +26 -0
- package/{umd/typings/execution/PtpExecutor.d.ts → esm/typings/execution/PromptbookExecutor.d.ts} +5 -5
- package/esm/typings/execution/assertsExecutionSuccessful.d.ts +2 -2
- package/esm/typings/execution/createPromptbookExecutor.d.ts +40 -0
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/joker.test.d.ts +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Error.d.ts → Promptbook_Server_Error.d.ts} +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Progress.d.ts → Promptbook_Server_Progress.d.ts} +1 -1
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Request.d.ts → Promptbook_Server_Request.d.ts} +2 -2
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Response.d.ts → Promptbook_Server_Response.d.ts} +2 -2
- package/esm/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +3 -3
- package/{umd/typings/execution/plugins/natural-execution-tools/remote/runRemoteServer.d.ts → esm/typings/execution/plugins/natural-execution-tools/remote/startRemoteServer.d.ts} +2 -2
- package/esm/typings/types/Command.d.ts +12 -12
- package/esm/typings/types/Parameters.d.ts +3 -3
- package/esm/typings/types/Prompt.d.ts +5 -5
- package/{umd/typings/types/PromptTemplatePipelineJson → esm/typings/types/PromptbookJson}/PromptTemplateJson.d.ts +4 -4
- package/esm/typings/types/{PromptTemplatePipelineJson → PromptbookJson}/PromptTemplateParameterJson.d.ts +2 -2
- package/{umd/typings/types/PromptTemplatePipelineJson/PromptTemplatePipelineJson.d.ts → esm/typings/types/PromptbookJson/PromptbookJson.d.ts} +11 -15
- package/esm/typings/types/PromptbookString.d.ts +12 -0
- package/esm/typings/types/TaskProgress.d.ts +1 -1
- package/esm/typings/types/execution-report/ExecutionReportJson.d.ts +10 -10
- package/esm/typings/types/typeAliases.d.ts +4 -4
- package/esm/typings/utils/expectation-counters/countCharacters.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countLines.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countPages.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countParagraphs.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countSentences.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/countWords.d.ts +1 -1
- package/esm/typings/utils/expectation-counters/index.d.ts +1 -1
- package/esm/typings/utils/isRunningInWhatever.d.ts +12 -0
- package/esm/typings/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js.map +1 -1
- package/umd/typings/_packages/core.index.d.ts +8 -8
- package/umd/typings/_packages/remote-server.index.d.ts +2 -2
- package/umd/typings/_packages/types.index.d.ts +8 -8
- package/umd/typings/classes/PromptbookLibrary.d.ts +61 -0
- package/umd/typings/conversion/_importPromptbook.d.ts +12 -0
- package/umd/typings/conversion/promptbookStringToJson.d.ts +13 -0
- package/umd/typings/conversion/validatePromptbookJson.d.ts +26 -0
- package/{esm/typings/execution/PtpExecutor.d.ts → umd/typings/execution/PromptbookExecutor.d.ts} +5 -5
- package/umd/typings/execution/assertsExecutionSuccessful.d.ts +2 -2
- package/umd/typings/execution/createPromptbookExecutor.d.ts +40 -0
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/joker.test.d.ts +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-chat.test.d.ts +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/mocked/mocked-completion.test.d.ts +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionToolsOptions.d.ts +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Error.d.ts → Promptbook_Server_Error.d.ts} +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Progress.d.ts → Promptbook_Server_Progress.d.ts} +1 -1
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Request.d.ts → Promptbook_Server_Request.d.ts} +2 -2
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/{Ptps_Response.d.ts → Promptbook_Server_Response.d.ts} +2 -2
- package/umd/typings/execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions.d.ts +3 -3
- package/{esm/typings/execution/plugins/natural-execution-tools/remote/runRemoteServer.d.ts → umd/typings/execution/plugins/natural-execution-tools/remote/startRemoteServer.d.ts} +2 -2
- package/umd/typings/types/Command.d.ts +12 -12
- package/umd/typings/types/Parameters.d.ts +3 -3
- package/umd/typings/types/Prompt.d.ts +5 -5
- package/{esm/typings/types/PromptTemplatePipelineJson → umd/typings/types/PromptbookJson}/PromptTemplateJson.d.ts +4 -4
- package/umd/typings/types/{PromptTemplatePipelineJson → PromptbookJson}/PromptTemplateParameterJson.d.ts +2 -2
- package/{esm/typings/types/PromptTemplatePipelineJson/PromptTemplatePipelineJson.d.ts → umd/typings/types/PromptbookJson/PromptbookJson.d.ts} +11 -15
- package/umd/typings/types/PromptbookString.d.ts +12 -0
- package/umd/typings/types/TaskProgress.d.ts +1 -1
- package/umd/typings/types/execution-report/ExecutionReportJson.d.ts +10 -10
- package/umd/typings/types/typeAliases.d.ts +4 -4
- package/umd/typings/utils/expectation-counters/countCharacters.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countLines.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countPages.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countParagraphs.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countSentences.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/countWords.d.ts +1 -1
- package/umd/typings/utils/expectation-counters/index.d.ts +1 -1
- package/umd/typings/utils/isRunningInWhatever.d.ts +12 -0
- package/umd/typings/version.d.ts +1 -1
- package/esm/typings/classes/PromptTemplatePipelineLibrary.d.ts +0 -71
- package/esm/typings/config.d.ts +0 -12
- package/esm/typings/conversion/_importPtp.d.ts +0 -12
- package/esm/typings/conversion/promptTemplatePipelineStringToJson.d.ts +0 -13
- package/esm/typings/conversion/validatePromptTemplatePipelineJson.d.ts +0 -26
- package/esm/typings/execution/createPtpExecutor.d.ts +0 -40
- package/esm/typings/types/PromptTemplatePipelineString.d.ts +0 -16
- package/umd/typings/classes/PromptTemplatePipelineLibrary.d.ts +0 -71
- package/umd/typings/config.d.ts +0 -12
- package/umd/typings/conversion/_importPtp.d.ts +0 -12
- package/umd/typings/conversion/promptTemplatePipelineStringToJson.d.ts +0 -13
- package/umd/typings/conversion/validatePromptTemplatePipelineJson.d.ts +0 -26
- package/umd/typings/execution/createPtpExecutor.d.ts +0 -40
- package/umd/typings/types/PromptTemplatePipelineString.d.ts +0 -16
- /package/esm/typings/conversion/{promptTemplatePipelineStringToJson-syntaxErrors.test.d.ts → promptbookStringToJson-syntaxErrors.test.d.ts} +0 -0
- /package/esm/typings/conversion/{promptTemplatePipelineStringToJson.test.d.ts → promptbookStringToJson.test.d.ts} +0 -0
- /package/esm/typings/conversion/{validatePromptTemplatePipelineJson-logicErrors.test.d.ts → validatePromptbookJson-logicErrors.test.d.ts} +0 -0
- /package/esm/typings/conversion/{validatePromptTemplatePipelineJson.test.d.ts → validatePromptbookJson.test.d.ts} +0 -0
- /package/umd/typings/conversion/{promptTemplatePipelineStringToJson-syntaxErrors.test.d.ts → promptbookStringToJson-syntaxErrors.test.d.ts} +0 -0
- /package/umd/typings/conversion/{promptTemplatePipelineStringToJson.test.d.ts → promptbookStringToJson.test.d.ts} +0 -0
- /package/umd/typings/conversion/{validatePromptTemplatePipelineJson-logicErrors.test.d.ts → validatePromptbookJson-logicErrors.test.d.ts} +0 -0
- /package/umd/typings/conversion/{validatePromptTemplatePipelineJson.test.d.ts → validatePromptbookJson.test.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { string_name } from '
|
|
1
|
+
import { string_name } from '../typeAliases';
|
|
2
2
|
/**
|
|
3
|
-
* Describes one parameter of the
|
|
3
|
+
* Describes one parameter of the promptbook
|
|
4
4
|
*/
|
|
5
5
|
export interface PromptTemplateParameterJson {
|
|
6
6
|
/**
|
|
@@ -1,38 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { string_promptbook_url, string_version } from '../typeAliases';
|
|
2
2
|
import { PromptTemplateJson } from './PromptTemplateJson';
|
|
3
3
|
import { PromptTemplateParameterJson } from './PromptTemplateParameterJson';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Promptbook is the **core concept of this library**.
|
|
6
6
|
* It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
* - **.ptbk.md file** in custom markdown format described above
|
|
10
|
-
* - _(this)_ **JSON** format, parsed from the .ptbk.md file
|
|
11
|
-
*
|
|
12
|
-
* @see https://github.com/webgptorg/promptbook#prompt-template-pipeline
|
|
8
|
+
* @see https://github.com/webgptorg/promptbook#promptbook
|
|
13
9
|
*/
|
|
14
|
-
export interface
|
|
10
|
+
export interface PromptbookJson {
|
|
15
11
|
/**
|
|
16
|
-
* Unique identifier of the
|
|
12
|
+
* Unique identifier of the promptbook
|
|
17
13
|
*
|
|
18
|
-
* Note: It must be unique across all
|
|
14
|
+
* Note: It must be unique across all promptbooks libraries
|
|
19
15
|
* Note: It must use HTTPs URL
|
|
20
16
|
* Tip: You can do versioning in the URL
|
|
21
|
-
* For example: https://
|
|
17
|
+
* For example: https://promptbook.webgpt.com/cs/write-website-content.ptbk.md@1.0.0
|
|
22
18
|
* Warning: Do not hash part of the URL, hash part is used for identification of the prompt template in the pipeline
|
|
23
19
|
*/
|
|
24
|
-
readonly
|
|
20
|
+
readonly promptbookUrl?: string_promptbook_url;
|
|
25
21
|
/**
|
|
26
|
-
* Title of the
|
|
22
|
+
* Title of the promptbook
|
|
27
23
|
* -It can use simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
|
|
28
24
|
*/
|
|
29
25
|
readonly title: string;
|
|
30
26
|
/**
|
|
31
27
|
* Version of the .ptbk.json file
|
|
32
28
|
*/
|
|
33
|
-
readonly
|
|
29
|
+
readonly promptbookVersion: string_version;
|
|
34
30
|
/**
|
|
35
|
-
* Description of the
|
|
31
|
+
* Description of the promptbook
|
|
36
32
|
* It can use multiple paragraphs of simple markdown formatting like **bold**, *italic*, [link](https://example.com), ... BUT not code blocks and structure
|
|
37
33
|
*/
|
|
38
34
|
readonly description?: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Promptbook is the **core concept of this library**.
|
|
3
|
+
* It represents a series of prompt templates chained together to form a pipeline / one big prompt template with input and result parameters.
|
|
4
|
+
*
|
|
5
|
+
* @see https://github.com/webgptorg/promptbook#promptbook
|
|
6
|
+
*/
|
|
7
|
+
export type PromptbookString = string & {
|
|
8
|
+
readonly _type: 'Promptbook';
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* TODO: !! Better validation (validatePromptbookString) or remove branded type and make it just string
|
|
12
|
+
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ExecutionType } from './ExecutionTypes';
|
|
2
2
|
import { string_markdown_text, string_name } from './typeAliases';
|
|
3
3
|
/**
|
|
4
|
-
* TaskProgress represents the progress of a
|
|
4
|
+
* TaskProgress represents the progress of a Promptbook execution.
|
|
5
5
|
*/
|
|
6
6
|
export interface TaskProgress {
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PromptResult } from '../../execution/PromptResult';
|
|
2
2
|
import type { Prompt } from '../Prompt';
|
|
3
|
-
import type {
|
|
3
|
+
import type { string_promptbook_url, string_version } from '../typeAliases';
|
|
4
4
|
/**
|
|
5
5
|
* ExecutionReport is result of executing one promptbook
|
|
6
6
|
* It is kind of a variant of the promptbook usefull for debugging, logging and transparency for users.
|
|
@@ -13,23 +13,23 @@ import type { string_ptbk_url, string_version } from '../typeAliases';
|
|
|
13
13
|
*/
|
|
14
14
|
export type ExecutionReportJson = {
|
|
15
15
|
/**
|
|
16
|
-
* Unique identifier of the
|
|
16
|
+
* Unique identifier of the promptbook from promptbook which was executed
|
|
17
17
|
*/
|
|
18
|
-
readonly
|
|
18
|
+
readonly promptbookUrl?: string_promptbook_url;
|
|
19
19
|
/**
|
|
20
|
-
* Title of from
|
|
20
|
+
* Title of from promptbook which was executed
|
|
21
21
|
*/
|
|
22
22
|
readonly title?: string;
|
|
23
23
|
/**
|
|
24
|
-
* Version from
|
|
24
|
+
* Version from promptbook which was executed
|
|
25
25
|
*/
|
|
26
|
-
readonly
|
|
26
|
+
readonly promptbookUsedVersion: string_version;
|
|
27
27
|
/**
|
|
28
|
-
* Version from
|
|
28
|
+
* Version from promptbook which was requested by promptbook
|
|
29
29
|
*/
|
|
30
|
-
readonly
|
|
30
|
+
readonly promptbookRequestedVersion?: string_version;
|
|
31
31
|
/**
|
|
32
|
-
* Description of the
|
|
32
|
+
* Description of the promptbook which was executed
|
|
33
33
|
*/
|
|
34
34
|
readonly description?: string;
|
|
35
35
|
/**
|
|
@@ -39,7 +39,7 @@ export type ExecutionReportJson = {
|
|
|
39
39
|
/**
|
|
40
40
|
* The prompt wich was executed
|
|
41
41
|
*/
|
|
42
|
-
prompt: Omit<Prompt, '
|
|
42
|
+
prompt: Omit<Prompt, 'promptbookUrl' | 'parameters'>;
|
|
43
43
|
/**
|
|
44
44
|
* Result of the prompt execution (if not failed during LLM execution)
|
|
45
45
|
*/
|
|
@@ -179,15 +179,15 @@ export type string_url = string;
|
|
|
179
179
|
/**
|
|
180
180
|
* Semantic helper
|
|
181
181
|
*
|
|
182
|
-
* For example `"https://
|
|
182
|
+
* For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md@v2.4.15"`
|
|
183
183
|
*/
|
|
184
|
-
export type
|
|
184
|
+
export type string_promptbook_url = string;
|
|
185
185
|
/**
|
|
186
186
|
* Semantic helper
|
|
187
187
|
*
|
|
188
|
-
* For example `"https://
|
|
188
|
+
* For example `"https://promptbook.webgpt.com/cs/write-website-content.ptbk.md@v2.4.15#keywords"`
|
|
189
189
|
*/
|
|
190
|
-
export type
|
|
190
|
+
export type string_promptbook_url_with_hashtemplate = string;
|
|
191
191
|
/**
|
|
192
192
|
* Semantic helper
|
|
193
193
|
*
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detects if the code is running in a browser environment in main thread (Not in a web worker)
|
|
3
|
+
*/
|
|
4
|
+
export declare const isRunningInBrowser: Function;
|
|
5
|
+
/**
|
|
6
|
+
* Detects if the code is running in a Node.js environment
|
|
7
|
+
*/
|
|
8
|
+
export declare const isRunningInNode: Function;
|
|
9
|
+
/**
|
|
10
|
+
* Detects if the code is running in a web worker
|
|
11
|
+
*/
|
|
12
|
+
export declare const isRunningInWebWorker: Function;
|
package/esm/typings/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.2",
|
|
4
4
|
"description": "Library to supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"socket.io-client": "4.7.2"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@promptbook/core": "0.
|
|
40
|
+
"@promptbook/core": "0.36.2"
|
|
41
41
|
},
|
|
42
42
|
"main": "./umd/index.umd.js",
|
|
43
43
|
"module": "./esm/index.es.js",
|
package/umd/index.umd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionTools.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;IAC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uB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;SACjD;;;;QAKa,+CAAS,GAAvB,UAAwB,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,EAAyB,CAAC,CAAC;4BAEtE,qBAAM,IAAI,OAAO,CAAe,UAAC,OAAO,EAAE,MAAM;oCACjE,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE,UAAC,QAAuB;wCAC1C,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,KAAiB;;wCAEjC,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;QACL,kCAAC;IAAD,CAAC,IAAA;IAED;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","../../../src/execution/plugins/natural-execution-tools/remote/RemoteNaturalExecutionTools.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,SAAS,CAAC,OAAO,CAA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,CAAC,CAAC;iCACN,CAAC,EAAA;;4BAVI,YAAY,GAAG,SAUnB;4BAEF,MAAM,CAAC,UAAU,EAAE,CAAC;4BAEpB,sBAAO,YAAY,EAAC;;;;SACvB;QACL,kCAAC;IAAD,CAAC,IAAA;IAED;;;;;;;;;;;;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { createPtpExecutor } from '../execution/createPtpExecutor';
|
|
1
|
+
import { PromptbookLibrary } from '../classes/PromptbookLibrary';
|
|
2
|
+
import { promptbookStringToJson } from '../conversion/promptbookStringToJson';
|
|
3
|
+
import { validatePromptbookJson } from '../conversion/validatePromptbookJson';
|
|
4
|
+
import { createPromptbookExecutor } from '../execution/createPromptbookExecutor';
|
|
6
5
|
import { MockedEchoNaturalExecutionTools } from '../execution/plugins/natural-execution-tools/mocked/MockedEchoNaturalExecutionTools';
|
|
7
6
|
import { CallbackInterfaceTools } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceTools';
|
|
8
7
|
import { CallbackInterfaceToolsOptions } from '../execution/plugins/user-interface-execution-tools/callback/CallbackInterfaceToolsOptions';
|
|
9
8
|
import { SimplePromptInterfaceTools } from '../execution/plugins/user-interface-execution-tools/simple-prompt/SimplePromptInterfaceTools';
|
|
10
9
|
import { ExecutionTypes } from '../types/ExecutionTypes';
|
|
11
|
-
|
|
10
|
+
import { PROMPTBOOK_VERSION } from '../version';
|
|
11
|
+
export { ExecutionTypes, PROMPTBOOK_VERSION, PromptbookLibrary };
|
|
12
12
|
export { SimplePromptInterfaceTools };
|
|
13
|
-
export {
|
|
13
|
+
export { promptbookStringToJson, validatePromptbookJson };
|
|
14
14
|
export { MockedEchoNaturalExecutionTools };
|
|
15
|
-
export {
|
|
15
|
+
export { createPromptbookExecutor };
|
|
16
16
|
export { CallbackInterfaceTools, CallbackInterfaceToolsOptions };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RemoteServerOptions } from '../execution/plugins/natural-execution-tools/remote/interfaces/RemoteServerOptions';
|
|
2
|
-
import {
|
|
3
|
-
export { RemoteServerOptions,
|
|
2
|
+
import { startRemoteServer } from '../execution/plugins/natural-execution-tools/remote/startRemoteServer';
|
|
3
|
+
export { RemoteServerOptions, startRemoteServer };
|
|
@@ -2,24 +2,24 @@ import type { CommonExecutionToolsOptions } from '../execution/CommonExecutionTo
|
|
|
2
2
|
import type { ExecutionTools } from '../execution/ExecutionTools';
|
|
3
3
|
import type { NaturalExecutionTools } from '../execution/NaturalExecutionTools';
|
|
4
4
|
import type { PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult } from '../execution/PromptResult';
|
|
5
|
-
import type {
|
|
5
|
+
import type { PromptbookExecutor } from '../execution/PromptbookExecutor';
|
|
6
6
|
import type { ScriptExecutionTools, ScriptExecutionToolsExecuteOptions } from '../execution/ScriptExecutionTools';
|
|
7
7
|
import type { UserInterfaceTools, UserInterfaceToolsPromptDialogOptions } from '../execution/UserInterfaceTools';
|
|
8
8
|
import type { ExecutionType } from '../types/ExecutionTypes';
|
|
9
9
|
import type { ModelRequirements, ModelVariant } from '../types/ModelRequirements';
|
|
10
10
|
import type { Parameters } from '../types/Parameters';
|
|
11
11
|
import type { Prompt } from '../types/Prompt';
|
|
12
|
-
import type { EXPECTATION_UNITS, ExpectationAmount, ExpectationUnit, PromptTemplateJson } from '../types/
|
|
13
|
-
import type { PromptTemplateParameterJson } from '../types/
|
|
14
|
-
import type {
|
|
15
|
-
import type {
|
|
12
|
+
import type { EXPECTATION_UNITS, ExpectationAmount, ExpectationUnit, PromptTemplateJson } from '../types/PromptbookJson/PromptTemplateJson';
|
|
13
|
+
import type { PromptTemplateParameterJson } from '../types/PromptbookJson/PromptTemplateParameterJson';
|
|
14
|
+
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
15
|
+
import type { PromptbookString } from '../types/PromptbookString';
|
|
16
16
|
import type { ScriptLanguage } from '../types/ScriptLanguage';
|
|
17
17
|
import type { TaskProgress } from '../types/TaskProgress';
|
|
18
18
|
import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
|
|
19
19
|
import type { string_char_emoji } from '../types/typeAliasEmoji';
|
|
20
|
-
import type {
|
|
20
|
+
import type { client_id, string_char, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_person_fullname, string_prompt, string_promptbook_url, string_promptbook_url_with_hashtemplate, string_script, string_sha256, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_version } from '../types/typeAliases';
|
|
21
21
|
import { FromtoItems } from '../utils/FromtoItems';
|
|
22
|
-
export { CommonExecutionToolsOptions, EXPECTATION_UNITS, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, FromtoItems,
|
|
22
|
+
export { CommonExecutionToolsOptions, EXPECTATION_UNITS, ExecutionReportJson, ExecutionTools, ExecutionType, ExpectationAmount, ExpectationUnit, FromtoItems, ModelRequirements, ModelVariant, NaturalExecutionTools, Parameters, Prompt, PromptChatResult, PromptCommonResult, PromptCompletionResult, PromptResult, PromptTemplateJson, PromptTemplateParameterJson, PromptbookExecutor, PromptbookJson, PromptbookString, ScriptExecutionTools, ScriptExecutionToolsExecuteOptions, ScriptLanguage, TaskProgress, UserInterfaceTools, UserInterfaceToolsPromptDialogOptions, client_id, string_char, string_char_emoji, string_chat_prompt, string_completion_prompt, string_data_url, string_domain, string_email, string_file_absolute_path, string_file_extension, string_file_path, string_file_relative_path, string_filename, string_folder_absolute_path, string_folder_path, string_folder_relative_path, string_host, string_hostname, string_href, string_html, string_javascript, string_javascript_name, string_license, string_markdown, string_markdown_text, string_mime_type, string_mime_type_with_wildcard, string_model_name, string_name, string_person_fullname, string_prompt, string_promptbook_url, string_promptbook_url_with_hashtemplate, string_script, string_sha256, string_tdl, string_template, string_text_prompt, string_title, string_token, string_translate_language, string_uri, string_uri_part, string_url, string_url_image, string_version, };
|
|
23
23
|
/**
|
|
24
|
-
* TODO:
|
|
24
|
+
* TODO: Delete type aliases that are not exported here
|
|
25
25
|
*/
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { string_name } from '.././types/typeAliases';
|
|
2
|
+
import { CreatePromptbookExecutorSettings } from '../execution/createPromptbookExecutor';
|
|
3
|
+
import { ExecutionTools } from '../execution/ExecutionTools';
|
|
4
|
+
import { PromptbookExecutor } from '../execution/PromptbookExecutor';
|
|
5
|
+
import { Prompt } from '../types/Prompt';
|
|
6
|
+
import { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
7
|
+
import { PromptbookString } from '../types/PromptbookString';
|
|
8
|
+
/**
|
|
9
|
+
* Library of promptbooks that groups together promptbooks for an application. This is a very thin wrapper around the Array / Set of promptbooks.
|
|
10
|
+
*
|
|
11
|
+
* Promptbook library is a useful helper in execution, it can be shared between execution and consumer parts of the app and make common knowledge about promptbooks.
|
|
12
|
+
*
|
|
13
|
+
* It allows to create executor functions from promptbooks in the library.
|
|
14
|
+
*
|
|
15
|
+
* @see https://github.com/webgptorg/promptbook#prompt-template-pipeline-library
|
|
16
|
+
*/
|
|
17
|
+
export declare class PromptbookLibrary {
|
|
18
|
+
private readonly options;
|
|
19
|
+
/**
|
|
20
|
+
* Constructs Promptbook from any sources
|
|
21
|
+
*
|
|
22
|
+
* Note: During the construction syntax and logic of all sources are validated
|
|
23
|
+
* Note: You can combine .ptbk.md and .ptbk.json files BUT it is not recommended
|
|
24
|
+
*
|
|
25
|
+
* @param promptbookSources contents of .ptbk.md or .ptbk.json files
|
|
26
|
+
* @param settings settings for creating executor functions
|
|
27
|
+
* @returns PromptbookLibrary
|
|
28
|
+
*/
|
|
29
|
+
static fromSources(promptbookSources: Record<string_name, PromptbookJson | PromptbookString>, settings?: Partial<CreatePromptbookExecutorSettings>): PromptbookLibrary;
|
|
30
|
+
private constructor();
|
|
31
|
+
/**
|
|
32
|
+
* Gets all promptbooks in the library
|
|
33
|
+
*/
|
|
34
|
+
get promptbookNames(): Array<string_name>;
|
|
35
|
+
/**
|
|
36
|
+
* Gets promptbook by name
|
|
37
|
+
*/
|
|
38
|
+
getPromptbookByName(name: string_name): PromptbookJson;
|
|
39
|
+
/**
|
|
40
|
+
* Checks whether prompt is in the library
|
|
41
|
+
*/
|
|
42
|
+
isPromptInLibrary(prompt: Prompt): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Gets executor function for given promptbook
|
|
45
|
+
*/
|
|
46
|
+
createExecutor(name: string_name, tools: ExecutionTools): PromptbookExecutor;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* TODO: [🈴] Identify promptbooks by url `promptbookUrls` + `getPromptbookByUrl`
|
|
50
|
+
* TODO: !! [👐][🧠] Split of Promptbook,PromptbookLibrary between interface and class
|
|
51
|
+
* TODO: !! [👐] Make promptbooks private WHEN split between interface and class
|
|
52
|
+
* TODO: [🧠] Maybe isPromptInLibrary should be separate utility function
|
|
53
|
+
* TODO: [🧠] Maybe createExecutor should be separate utility function
|
|
54
|
+
* TODO: Static method fromDirectory
|
|
55
|
+
* TODO: [🤜] Add generic type for entry and result parameters
|
|
56
|
+
* TODO: [🧠] Is it better to promptbookLibrary.executePromptbook('writeXyz',{...}) OR promptbookLibrary.createExecutor('writeXyz')({...}) OR createExecutor(promptbookLibrary.getPromptbook('writeXyz'))
|
|
57
|
+
* TODO: [🧠] Formarly (before commit 62229afce7668a5b85077cc18becf798b583bf8d) there were two classes PromptbookLibrary+PromptbookLibraryExecutor (maybe it was better?)
|
|
58
|
+
* TODO: [🧠] Is it better to pass tools into getExecutor or into constructor
|
|
59
|
+
* Maybe it is not a good idea to cache executors when they are can be created with different tools
|
|
60
|
+
* TODO: [👧] Strongly type the executors to avoid need of remove nullables whtn noUncheckedIndexedAccess in tsconfig.json
|
|
61
|
+
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
2
|
+
import { PromptbookString } from '../types/PromptbookString';
|
|
3
|
+
/**
|
|
4
|
+
* Import the text file
|
|
5
|
+
*
|
|
6
|
+
* Note: Using here custom import to work in jest tests
|
|
7
|
+
* Note: Using sync version is 💩 in the production code, but it's ok here in tests
|
|
8
|
+
*
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
11
|
+
export declare function importPromptbook(path: `${string}.ptbk.md`): PromptbookString;
|
|
12
|
+
export declare function importPromptbook(path: `${string}.ptbk.json`): PromptbookJson;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
2
|
+
import { PromptbookString } from '../types/PromptbookString';
|
|
3
|
+
/**
|
|
4
|
+
* Parse promptbook from string format to JSON format
|
|
5
|
+
*
|
|
6
|
+
* Note: This function does not validate logic of the pipeline only the syntax
|
|
7
|
+
*/
|
|
8
|
+
export declare function promptbookStringToJson(promptbookString: PromptbookString): PromptbookJson;
|
|
9
|
+
/**
|
|
10
|
+
* TODO: Report here line/column of error
|
|
11
|
+
* TODO: Use spaceTrim more effectively
|
|
12
|
+
* TODO: [🧠] Parameter flags - isInput, isOutput, isInternal
|
|
13
|
+
*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { PromptbookJson } from '../types/PromptbookJson/PromptbookJson';
|
|
2
|
+
/**
|
|
3
|
+
* Validates PromptbookJson if it is logically valid.
|
|
4
|
+
*
|
|
5
|
+
* It checks:
|
|
6
|
+
* - if it has correct parameters dependency
|
|
7
|
+
*
|
|
8
|
+
* It does NOT check:
|
|
9
|
+
* - if it is valid json
|
|
10
|
+
* - if it is meaningful
|
|
11
|
+
*
|
|
12
|
+
* @param promptbook valid or invalid PromptbookJson
|
|
13
|
+
* @throws {Error} if invalid
|
|
14
|
+
*/
|
|
15
|
+
export declare function validatePromptbookJson(promptbook: PromptbookJson): void;
|
|
16
|
+
/**
|
|
17
|
+
* TODO: [🧠] Work with promptbookVersion
|
|
18
|
+
* TODO: Use here some json-schema, Zod or something similar and change it to:
|
|
19
|
+
* > /**
|
|
20
|
+
* > * Validates PromptbookJson if it is logically valid.
|
|
21
|
+
* > *
|
|
22
|
+
* > * It checks:
|
|
23
|
+
* > * - it has a valid structure
|
|
24
|
+
* > * - ...
|
|
25
|
+
* > ex port function validatePromptbookJson(promptbook: unknown): asserts promptbook is PromptbookJson {
|
|
26
|
+
*/
|
package/{esm/typings/execution/PtpExecutor.d.ts → umd/typings/execution/PromptbookExecutor.d.ts}
RENAMED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { Promisable } from 'type-fest';
|
|
2
|
-
import type { string_name } from '.././types/typeAliases';
|
|
3
2
|
import type { TaskProgress } from '../types/TaskProgress';
|
|
4
3
|
import type { ExecutionReportJson } from '../types/execution-report/ExecutionReportJson';
|
|
4
|
+
import type { string_name } from '../types/typeAliases';
|
|
5
5
|
/**
|
|
6
6
|
* Executor is a simple async function that takes INPUT PARAMETERs and returns result parameters _(along with all intermediate parameters and INPUT PARAMETERs = it extends input object)_.
|
|
7
|
-
* Executor is made by combining execution tools and
|
|
7
|
+
* Executor is made by combining execution tools and promptbook library.
|
|
8
8
|
*
|
|
9
9
|
* It can be done in two ways:
|
|
10
|
-
* - From `
|
|
11
|
-
* - `
|
|
10
|
+
* - From `PromptbookLibrary.getExecutor` method
|
|
11
|
+
* - `createPromptbookExecutor` utility function
|
|
12
12
|
*
|
|
13
13
|
* @see https://github.com/webgptorg/promptbook#executor
|
|
14
14
|
*/
|
|
15
|
-
export interface
|
|
15
|
+
export interface PromptbookExecutor {
|
|
16
16
|
(inputParameters: Record<string_name, string>, onProgress: (taskProgress: TaskProgress) => Promisable<void>): Promise<{
|
|
17
17
|
/**
|
|
18
18
|
* Whether the execution was successful
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PromptbookExecutor } from './PromptbookExecutor';
|
|
2
2
|
/**
|
|
3
3
|
* Asserts that the execution of a promptnook is successful
|
|
4
4
|
*
|
|
5
5
|
* @param executionResult - The partial result of the promptnook execution
|
|
6
6
|
* @throws Error - If the execution is not successful or if multiple errors occurred
|
|
7
7
|
*/
|
|
8
|
-
export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<
|
|
8
|
+
export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<PromptbookExecutor>>, 'isSuccessful' | 'errors'>): void;
|
|
9
9
|
/**
|
|
10
10
|
* TODO: [🧠] Can this return type be better typed than void
|
|
11
11
|
*/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PromptbookJson } from '../_packages/types.index';
|
|
2
|
+
import { ExecutionTools } from './ExecutionTools';
|
|
3
|
+
import { PromptbookExecutor } from './PromptbookExecutor';
|
|
4
|
+
export interface CreatePromptbookExecutorSettings {
|
|
5
|
+
/**
|
|
6
|
+
* When executor does not satisfy expectations it will be retried this amount of times
|
|
7
|
+
*
|
|
8
|
+
* @default 3
|
|
9
|
+
*/
|
|
10
|
+
readonly maxExecutionAttempts: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Options for creating a promptbook executor
|
|
14
|
+
*/
|
|
15
|
+
interface CreatePromptbookExecutorOptions {
|
|
16
|
+
/**
|
|
17
|
+
* The promptbook to be executed
|
|
18
|
+
*/
|
|
19
|
+
readonly promptbook: PromptbookJson;
|
|
20
|
+
/**
|
|
21
|
+
* The execution tools to be used during the execution of the PROMPTBOOK
|
|
22
|
+
*/
|
|
23
|
+
readonly tools: ExecutionTools;
|
|
24
|
+
/**
|
|
25
|
+
* Optional settings for the PROMPTBOOK executor
|
|
26
|
+
*/
|
|
27
|
+
readonly settings?: Partial<CreatePromptbookExecutorSettings>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Creates executor function from promptbook and execution tools.
|
|
31
|
+
*
|
|
32
|
+
* Note: Consider using getExecutor method of the library instead of using this function
|
|
33
|
+
*/
|
|
34
|
+
export declare function createPromptbookExecutor(options: CreatePromptbookExecutorOptions): PromptbookExecutor;
|
|
35
|
+
export {};
|
|
36
|
+
/**
|
|
37
|
+
* TODO: [🧠] When not meet expectations in PROMPT_DIALOG, make some way to tell the user
|
|
38
|
+
* TODO: [👧] Strongly type the executors to avoid need of remove nullables whtn noUncheckedIndexedAccess in tsconfig.json
|
|
39
|
+
* Note: CreatePromptbookExecutorOptions are just connected to PromptbookExecutor so do not extract to types folder
|
|
40
|
+
*/
|