@promptbook/remote-server 0.103.0-48 → 0.103.0-50
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/esm/index.es.js +25 -7
- package/esm/index.es.js.map +1 -1
- package/esm/typings/servers.d.ts +1 -0
- package/esm/typings/src/_packages/components.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +2 -0
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +12 -2
- package/esm/typings/src/book-components/PromptbookAgent/PromptbookAgent.d.ts +20 -0
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +14 -8
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +10 -0
- package/esm/typings/src/commitments/MESSAGE/InitialMessageCommitmentDefinition.d.ts +28 -0
- package/esm/typings/src/commitments/index.d.ts +2 -1
- package/esm/typings/src/config.d.ts +1 -0
- package/esm/typings/src/errors/DatabaseError.d.ts +2 -2
- package/esm/typings/src/errors/WrappedError.d.ts +2 -2
- package/esm/typings/src/execution/ExecutionTask.d.ts +2 -2
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +6 -1
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +2 -2
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +19 -3
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +13 -1
- package/esm/typings/src/llm-providers/agent/RemoteAgent.d.ts +11 -2
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +6 -1
- package/esm/typings/src/remote-server/startAgentServer.d.ts +2 -2
- package/esm/typings/src/utils/color/Color.d.ts +7 -0
- package/esm/typings/src/utils/color/Color.test.d.ts +1 -0
- package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -2
- package/esm/typings/src/utils/misc/computeHash.d.ts +11 -0
- package/esm/typings/src/utils/misc/computeHash.test.d.ts +1 -0
- package/esm/typings/src/utils/organization/$sideEffect.d.ts +2 -2
- package/esm/typings/src/utils/organization/$side_effect.d.ts +2 -2
- package/esm/typings/src/utils/organization/TODO_USE.d.ts +2 -2
- package/esm/typings/src/utils/organization/keepUnused.d.ts +2 -2
- package/esm/typings/src/utils/organization/preserve.d.ts +3 -3
- package/esm/typings/src/utils/organization/really_any.d.ts +7 -0
- package/esm/typings/src/utils/serialization/asSerializable.d.ts +2 -2
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +25 -7
- package/umd/index.umd.js.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { chococake } from '../organization/really_any';
|
|
2
2
|
/**
|
|
3
3
|
* Function `asSerializable` will convert values which are not serializable to serializable values
|
|
4
4
|
* It walks deeply through the object and converts all values
|
|
@@ -12,4 +12,4 @@ import type { really_any } from '../organization/really_any';
|
|
|
12
12
|
*
|
|
13
13
|
* @private Internal helper function
|
|
14
14
|
*/
|
|
15
|
-
export declare function asSerializable(value:
|
|
15
|
+
export declare function asSerializable(value: chococake): chococake;
|
|
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
|
|
|
15
15
|
export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
|
|
16
16
|
/**
|
|
17
17
|
* Represents the version string of the Promptbook engine.
|
|
18
|
-
* It follows semantic versioning (e.g., `0.103.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.103.0-49`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-server",
|
|
3
|
-
"version": "0.103.0-
|
|
3
|
+
"version": "0.103.0-50",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"module": "./esm/index.es.js",
|
|
96
96
|
"typings": "./esm/typings/src/_packages/remote-server.index.d.ts",
|
|
97
97
|
"peerDependencies": {
|
|
98
|
-
"@promptbook/core": "0.103.0-
|
|
98
|
+
"@promptbook/core": "0.103.0-50"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"colors": "^1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
* @generated
|
|
48
48
|
* @see https://github.com/webgptorg/promptbook
|
|
49
49
|
*/
|
|
50
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-
|
|
50
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-50';
|
|
51
51
|
/**
|
|
52
52
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
53
53
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -383,6 +383,9 @@
|
|
|
383
383
|
if (hex.length === 3) {
|
|
384
384
|
return Color.fromHex3(hex);
|
|
385
385
|
}
|
|
386
|
+
if (hex.length === 4) {
|
|
387
|
+
return Color.fromHex4(hex);
|
|
388
|
+
}
|
|
386
389
|
if (hex.length === 6) {
|
|
387
390
|
return Color.fromHex6(hex);
|
|
388
391
|
}
|
|
@@ -403,6 +406,19 @@
|
|
|
403
406
|
const b = parseInt(hex.substr(2, 1), 16) * 16;
|
|
404
407
|
return take(new Color(r, g, b));
|
|
405
408
|
}
|
|
409
|
+
/**
|
|
410
|
+
* Creates a new Color instance from color in hex format with 4 digits (with alpha channel)
|
|
411
|
+
*
|
|
412
|
+
* @param color in hex for example `09df`
|
|
413
|
+
* @returns Color object
|
|
414
|
+
*/
|
|
415
|
+
static fromHex4(hex) {
|
|
416
|
+
const r = parseInt(hex.substr(0, 1), 16) * 16;
|
|
417
|
+
const g = parseInt(hex.substr(1, 1), 16) * 16;
|
|
418
|
+
const b = parseInt(hex.substr(2, 1), 16) * 16;
|
|
419
|
+
const a = parseInt(hex.substr(3, 1), 16) * 16;
|
|
420
|
+
return take(new Color(r, g, b, a));
|
|
421
|
+
}
|
|
406
422
|
/**
|
|
407
423
|
* Creates a new Color instance from color in hex format with 6 color digits (without alpha channel)
|
|
408
424
|
*
|
|
@@ -593,7 +609,8 @@
|
|
|
593
609
|
* @returns true if the value is a valid hex color string (e.g., `#009edd`, `#fff`, etc.)
|
|
594
610
|
*/
|
|
595
611
|
static isHexColorString(value) {
|
|
596
|
-
return typeof value === 'string' &&
|
|
612
|
+
return (typeof value === 'string' &&
|
|
613
|
+
/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(value));
|
|
597
614
|
}
|
|
598
615
|
/**
|
|
599
616
|
* Creates new Color object
|
|
@@ -928,6 +945,7 @@
|
|
|
928
945
|
({
|
|
929
946
|
TITLE: Color.fromHex('#244EA8'),
|
|
930
947
|
LINE: Color.fromHex('#eeeeee'),
|
|
948
|
+
SEPARATOR: Color.fromHex('#cccccc'),
|
|
931
949
|
COMMITMENT: Color.fromHex('#DA0F78'),
|
|
932
950
|
PARAMETER: Color.fromHex('#8e44ad'),
|
|
933
951
|
});
|
|
@@ -1299,7 +1317,7 @@
|
|
|
1299
1317
|
*/
|
|
1300
1318
|
|
|
1301
1319
|
/**
|
|
1302
|
-
*
|
|
1320
|
+
* [🐱🚀]
|
|
1303
1321
|
* Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
|
|
1304
1322
|
*
|
|
1305
1323
|
* You can simply use `RemoteExecutionTools` on client-side javascript and connect to your remote server.
|
|
@@ -1307,11 +1325,11 @@
|
|
|
1307
1325
|
*
|
|
1308
1326
|
* @see https://github.com/webgptorg/promptbook#remote-server
|
|
1309
1327
|
* @public exported from `@promptbook/remote-server`
|
|
1310
|
-
* <- TODO:
|
|
1328
|
+
* <- TODO: [🐱🚀] Change to `@promptbook/agent-server`
|
|
1311
1329
|
*/
|
|
1312
1330
|
async function startAgentServer(options) {
|
|
1313
1331
|
const { port = 4440 } = options;
|
|
1314
|
-
// TODO:
|
|
1332
|
+
// TODO: [🐱🚀] [🌕]
|
|
1315
1333
|
const agentsServerRoot = path.join(__dirname, '../apps/agents-server');
|
|
1316
1334
|
console.trace(`!!! Starting agents server on port ${port}...`);
|
|
1317
1335
|
console.log(`!!! cwd`, process.cwd());
|
|
@@ -1548,7 +1566,7 @@
|
|
|
1548
1566
|
}
|
|
1549
1567
|
}
|
|
1550
1568
|
/**
|
|
1551
|
-
* TODO:
|
|
1569
|
+
* TODO: [🐱🚀] Explain that NotFoundError ([🐱🚀] and other specific errors) has priority over DatabaseError in some contexts
|
|
1552
1570
|
*/
|
|
1553
1571
|
|
|
1554
1572
|
/**
|
|
@@ -2236,7 +2254,7 @@
|
|
|
2236
2254
|
TODO: [🧠] Is there a better implementation?
|
|
2237
2255
|
> const propertyNames = Object.getOwnPropertyNames(objectValue);
|
|
2238
2256
|
> for (const propertyName of propertyNames) {
|
|
2239
|
-
> const value = (objectValue as
|
|
2257
|
+
> const value = (objectValue as chococake)[propertyName];
|
|
2240
2258
|
> if (value && typeof value === 'object') {
|
|
2241
2259
|
> deepClone(value);
|
|
2242
2260
|
> }
|