@promptbook/website-crawler 0.103.0-47 → 0.103.0-49
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 +26 -4
- package/esm/index.es.js.map +1 -1
- package/esm/typings/servers.d.ts +1 -0
- package/esm/typings/src/_packages/core.index.d.ts +6 -0
- package/esm/typings/src/_packages/types.index.d.ts +4 -0
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +17 -3
- package/esm/typings/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +2 -1
- package/esm/typings/src/book-2.0/agent-source/computeAgentHash.d.ts +8 -0
- package/esm/typings/src/book-2.0/agent-source/computeAgentHash.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/createDefaultAgentName.d.ts +8 -0
- package/esm/typings/src/book-2.0/agent-source/normalizeAgentName.d.ts +9 -0
- package/esm/typings/src/book-2.0/agent-source/normalizeAgentName.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSourceWithCommitments.d.ts +1 -1
- 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/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +57 -32
- 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/_common/utils/assertUniqueModels.d.ts +12 -0
- package/esm/typings/src/llm-providers/agent/Agent.d.ts +17 -4
- package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +10 -1
- package/esm/typings/src/llm-providers/agent/RemoteAgent.d.ts +6 -2
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +30 -4
- package/esm/typings/src/llm-providers/openai/openai-models.test.d.ts +4 -0
- package/esm/typings/src/remote-server/startAgentServer.d.ts +2 -2
- package/esm/typings/src/remote-server/startRemoteServer.d.ts +1 -2
- package/esm/typings/src/transpilers/openai-sdk/register.d.ts +1 -1
- package/esm/typings/src/types/typeAliases.d.ts +6 -0
- 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/normalization/normalize-to-kebab-case.d.ts +2 -0
- package/esm/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +3 -0
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +2 -0
- package/esm/typings/src/utils/normalization/titleToName.d.ts +2 -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 +26 -4
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -27,7 +27,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
27
27
|
* @generated
|
|
28
28
|
* @see https://github.com/webgptorg/promptbook
|
|
29
29
|
*/
|
|
30
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-
|
|
30
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-49';
|
|
31
31
|
/**
|
|
32
32
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
33
33
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -407,6 +407,9 @@ class Color {
|
|
|
407
407
|
if (hex.length === 3) {
|
|
408
408
|
return Color.fromHex3(hex);
|
|
409
409
|
}
|
|
410
|
+
if (hex.length === 4) {
|
|
411
|
+
return Color.fromHex4(hex);
|
|
412
|
+
}
|
|
410
413
|
if (hex.length === 6) {
|
|
411
414
|
return Color.fromHex6(hex);
|
|
412
415
|
}
|
|
@@ -427,6 +430,19 @@ class Color {
|
|
|
427
430
|
const b = parseInt(hex.substr(2, 1), 16) * 16;
|
|
428
431
|
return take(new Color(r, g, b));
|
|
429
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* Creates a new Color instance from color in hex format with 4 digits (with alpha channel)
|
|
435
|
+
*
|
|
436
|
+
* @param color in hex for example `09df`
|
|
437
|
+
* @returns Color object
|
|
438
|
+
*/
|
|
439
|
+
static fromHex4(hex) {
|
|
440
|
+
const r = parseInt(hex.substr(0, 1), 16) * 16;
|
|
441
|
+
const g = parseInt(hex.substr(1, 1), 16) * 16;
|
|
442
|
+
const b = parseInt(hex.substr(2, 1), 16) * 16;
|
|
443
|
+
const a = parseInt(hex.substr(3, 1), 16) * 16;
|
|
444
|
+
return take(new Color(r, g, b, a));
|
|
445
|
+
}
|
|
430
446
|
/**
|
|
431
447
|
* Creates a new Color instance from color in hex format with 6 color digits (without alpha channel)
|
|
432
448
|
*
|
|
@@ -617,7 +633,8 @@ class Color {
|
|
|
617
633
|
* @returns true if the value is a valid hex color string (e.g., `#009edd`, `#fff`, etc.)
|
|
618
634
|
*/
|
|
619
635
|
static isHexColorString(value) {
|
|
620
|
-
return typeof value === 'string' &&
|
|
636
|
+
return (typeof value === 'string' &&
|
|
637
|
+
/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(value));
|
|
621
638
|
}
|
|
622
639
|
/**
|
|
623
640
|
* Creates new Color object
|
|
@@ -944,6 +961,7 @@ const PROMPTBOOK_COLOR = Color.fromHex('#79EAFD');
|
|
|
944
961
|
({
|
|
945
962
|
TITLE: Color.fromHex('#244EA8'),
|
|
946
963
|
LINE: Color.fromHex('#eeeeee'),
|
|
964
|
+
SEPARATOR: Color.fromHex('#cccccc'),
|
|
947
965
|
COMMITMENT: Color.fromHex('#DA0F78'),
|
|
948
966
|
PARAMETER: Color.fromHex('#8e44ad'),
|
|
949
967
|
});
|
|
@@ -1687,6 +1705,8 @@ function removeDiacritics(input) {
|
|
|
1687
1705
|
/**
|
|
1688
1706
|
* Converts a given text to kebab-case format.
|
|
1689
1707
|
*
|
|
1708
|
+
* Note: [🔂] This function is idempotent.
|
|
1709
|
+
*
|
|
1690
1710
|
* @param text The text to be converted.
|
|
1691
1711
|
* @returns The kebab-case formatted string.
|
|
1692
1712
|
* @example 'hello-world'
|
|
@@ -1842,6 +1862,8 @@ function removeEmojis(text) {
|
|
|
1842
1862
|
/**
|
|
1843
1863
|
* Converts a title string into a normalized name.
|
|
1844
1864
|
*
|
|
1865
|
+
* Note: [🔂] This function is idempotent.
|
|
1866
|
+
*
|
|
1845
1867
|
* @param value The title string to be converted to a name.
|
|
1846
1868
|
* @returns A normalized name derived from the input title.
|
|
1847
1869
|
* @example 'Hello World!' -> 'hello-world'
|
|
@@ -2399,7 +2421,7 @@ function deepClone(objectValue) {
|
|
|
2399
2421
|
TODO: [🧠] Is there a better implementation?
|
|
2400
2422
|
> const propertyNames = Object.getOwnPropertyNames(objectValue);
|
|
2401
2423
|
> for (const propertyName of propertyNames) {
|
|
2402
|
-
> const value = (objectValue as
|
|
2424
|
+
> const value = (objectValue as chococake)[propertyName];
|
|
2403
2425
|
> if (value && typeof value === 'object') {
|
|
2404
2426
|
> deepClone(value);
|
|
2405
2427
|
> }
|
|
@@ -3246,7 +3268,7 @@ class DatabaseError extends Error {
|
|
|
3246
3268
|
}
|
|
3247
3269
|
}
|
|
3248
3270
|
/**
|
|
3249
|
-
* TODO:
|
|
3271
|
+
* TODO: [🐱🚀] Explain that NotFoundError ([🐱🚀] and other specific errors) has priority over DatabaseError in some contexts
|
|
3250
3272
|
*/
|
|
3251
3273
|
|
|
3252
3274
|
/**
|