@promptbook/remote-client 0.88.0 → 0.89.0-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 +4 -0
- package/esm/index.es.js +11 -9
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/core.index.d.ts +6 -2
- package/esm/typings/src/_packages/types.index.d.ts +16 -4
- package/esm/typings/src/cli/cli-commands/login.d.ts +15 -0
- package/esm/typings/src/execution/PipelineExecutorResult.d.ts +2 -2
- package/esm/typings/src/execution/PromptResult.d.ts +2 -2
- package/esm/typings/src/execution/{PromptResultUsage.d.ts → Usage.d.ts} +5 -5
- package/esm/typings/src/execution/utils/addUsage.d.ts +2 -2
- package/esm/typings/src/execution/utils/computeUsageCounts.d.ts +3 -3
- package/esm/typings/src/execution/utils/usage-constants.d.ts +77 -60
- package/esm/typings/src/execution/utils/usageToHuman.d.ts +5 -5
- package/esm/typings/src/execution/utils/usageToWorktime.d.ts +5 -5
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +9 -2
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/{countTotalUsage.d.ts → countUsage.d.ts} +1 -1
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +2 -2
- package/esm/typings/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.d.ts +2 -2
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +0 -9
- package/esm/typings/src/llm-providers/openai/computeOpenAiUsage.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineJson/PreparationJson.d.ts +2 -2
- package/esm/typings/src/playground/BrjappConnector.d.ts +67 -0
- package/esm/typings/src/playground/brjapp-api-schema.d.ts +12879 -0
- package/esm/typings/src/playground/playground.d.ts +5 -0
- package/esm/typings/src/remote-server/socket-types/_subtypes/PromptbookServer_Identification.d.ts +2 -1
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +15 -3
- package/esm/typings/src/types/typeAliases.d.ts +8 -2
- package/package.json +2 -2
- package/umd/index.umd.js +11 -9
- package/umd/index.umd.js.map +1 -1
package/esm/typings/src/remote-server/socket-types/_subtypes/PromptbookServer_Identification.d.ts
CHANGED
|
@@ -37,7 +37,8 @@ export type PromptbookServer_AnonymousIdentification = {
|
|
|
37
37
|
/**
|
|
38
38
|
* Identifier of the end user
|
|
39
39
|
*
|
|
40
|
-
* Note:
|
|
40
|
+
* Note: This can be either some id or email or any other identifier
|
|
41
|
+
* Note: In anonymous mode, this is passed to the certain model providers to identify misuse
|
|
41
42
|
* Note: In anonymous mode, there is no need to identify yourself, nor does it change the actual configuration of LLM Tools (unlike in application mode)
|
|
42
43
|
*/
|
|
43
44
|
readonly userId?: string_user_id;
|
|
@@ -58,15 +58,27 @@ export type ApplicationRemoteServerOptions<TCustomOptions> = {
|
|
|
58
58
|
};
|
|
59
59
|
export type ApplicationRemoteServerClientOptions<TCustomOptions> = {
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* Identifier of the application
|
|
62
|
+
*
|
|
63
|
+
* Note: This is usefull when you use Promptbook remote server for multiple apps/frontends, if its used just for single app, use here just "app" or "your-app-name"
|
|
64
|
+
* Note: This can be some id or some semantic name like "email-agent"
|
|
62
65
|
*/
|
|
63
66
|
readonly appId: string_app_id | null;
|
|
64
67
|
/**
|
|
65
|
-
*
|
|
68
|
+
* Identifier of the end user
|
|
69
|
+
*
|
|
70
|
+
* Note: This can be either some id or email or any other identifier
|
|
71
|
+
* Note: This is also passed to the certain model providers to identify misuse
|
|
66
72
|
*/
|
|
67
73
|
readonly userId?: string_user_id;
|
|
68
74
|
/**
|
|
69
|
-
*
|
|
75
|
+
* Token of the user to verify its identity
|
|
76
|
+
*
|
|
77
|
+
* Note: This is passed for example to `createLlmExecutionTools`
|
|
78
|
+
*/
|
|
79
|
+
readonly userToken?: string_user_id;
|
|
80
|
+
/**
|
|
81
|
+
* Additional arbitrary options to identify the client or to pass custom metadata
|
|
70
82
|
*/
|
|
71
83
|
readonly customOptions?: TCustomOptions;
|
|
72
84
|
};
|
|
@@ -242,6 +242,12 @@ export type string_promptbook_documentation_url = `https://github.com/webgptorg/
|
|
|
242
242
|
* For example `"towns.cz"`
|
|
243
243
|
*/
|
|
244
244
|
export type string_domain = string;
|
|
245
|
+
/**
|
|
246
|
+
* Semantic helper
|
|
247
|
+
*
|
|
248
|
+
* For example `"https://*.pavolhejny.com/*"`
|
|
249
|
+
*/
|
|
250
|
+
export type string_origin = string;
|
|
245
251
|
/**
|
|
246
252
|
* Semantic helper
|
|
247
253
|
*
|
|
@@ -433,13 +439,13 @@ export type string_uuid = string & {
|
|
|
433
439
|
*
|
|
434
440
|
* @@@
|
|
435
441
|
*/
|
|
436
|
-
export type string_app_id = id;
|
|
442
|
+
export type string_app_id = id | 'app';
|
|
437
443
|
/**
|
|
438
444
|
* End user identifier
|
|
439
445
|
*
|
|
440
446
|
* @@@
|
|
441
447
|
*/
|
|
442
|
-
export type string_user_id = id;
|
|
448
|
+
export type string_user_id = id | string_email;
|
|
443
449
|
/**
|
|
444
450
|
* Semantic helper
|
|
445
451
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.89.0-2",
|
|
4
4
|
"description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"module": "./esm/index.es.js",
|
|
48
48
|
"typings": "./esm/typings/src/_packages/remote-client.index.d.ts",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@promptbook/core": "0.
|
|
50
|
+
"@promptbook/core": "0.89.0-2"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"crypto": "^1.0.1",
|
package/umd/index.umd.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @generated
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.89.0-2';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -3215,7 +3215,8 @@
|
|
|
3215
3215
|
if ($pipelineJson.defaultModelRequirements[command.key] !== undefined) {
|
|
3216
3216
|
if ($pipelineJson.defaultModelRequirements[command.key] === command.value) {
|
|
3217
3217
|
console.warn(`Multiple commands \`MODEL ${command.key} ${command.value}\` in the pipeline head`);
|
|
3218
|
-
// <- TODO: [
|
|
3218
|
+
// <- TODO: [🏮] Some better way how to get warnings from pipeline parsing / logic
|
|
3219
|
+
// <- TODO: [🏮] Some standard way how to transform errors into warnings and how to handle non-critical fails during the tasks
|
|
3219
3220
|
}
|
|
3220
3221
|
else {
|
|
3221
3222
|
throw new ParseError(spaceTrim__default["default"](`
|
|
@@ -3247,6 +3248,7 @@
|
|
|
3247
3248
|
modelVariant: 'VARIANT',
|
|
3248
3249
|
maxTokens: '???',
|
|
3249
3250
|
}[command.key]} ${command.value}\` in the task "${$taskJson.title || $taskJson.name}"`);
|
|
3251
|
+
// <- TODO: [🏮] Some standard way how to transform errors into warnings and how to handle non-critical fails during the tasks
|
|
3250
3252
|
}
|
|
3251
3253
|
else {
|
|
3252
3254
|
throw new ParseError(spaceTrim__default["default"](`
|
|
@@ -3526,15 +3528,15 @@
|
|
|
3526
3528
|
}
|
|
3527
3529
|
console.warn(spaceTrim__default["default"](`
|
|
3528
3530
|
|
|
3529
|
-
|
|
3531
|
+
Persona "${personaName}" is defined multiple times with different description:
|
|
3530
3532
|
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
+
First definition:
|
|
3534
|
+
${persona.description}
|
|
3533
3535
|
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
+
Second definition:
|
|
3537
|
+
${personaDescription}
|
|
3536
3538
|
|
|
3537
|
-
|
|
3539
|
+
`));
|
|
3538
3540
|
persona.description += spaceTrim__default["default"]('\n\n' + personaDescription);
|
|
3539
3541
|
}
|
|
3540
3542
|
|
|
@@ -4898,7 +4900,7 @@
|
|
|
4898
4900
|
if (parameterNames.has(subparameterName)) {
|
|
4899
4901
|
parameterNames.delete(subparameterName);
|
|
4900
4902
|
parameterNames.add(foreach.parameterName);
|
|
4901
|
-
// <- TODO: [
|
|
4903
|
+
// <- TODO: [🏮] Warn/logic error when `subparameterName` not used
|
|
4902
4904
|
}
|
|
4903
4905
|
}
|
|
4904
4906
|
}
|