@promptbook/remote-client 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.
Files changed (39) hide show
  1. package/esm/index.es.js +22 -4
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/servers.d.ts +1 -0
  4. package/esm/typings/src/_packages/components.index.d.ts +2 -0
  5. package/esm/typings/src/_packages/types.index.d.ts +2 -0
  6. package/esm/typings/src/_packages/utils.index.d.ts +2 -0
  7. package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +12 -2
  8. package/esm/typings/src/book-components/PromptbookAgent/PromptbookAgent.d.ts +20 -0
  9. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +14 -8
  10. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +10 -0
  11. package/esm/typings/src/commitments/MESSAGE/InitialMessageCommitmentDefinition.d.ts +28 -0
  12. package/esm/typings/src/commitments/index.d.ts +2 -1
  13. package/esm/typings/src/config.d.ts +1 -0
  14. package/esm/typings/src/errors/DatabaseError.d.ts +2 -2
  15. package/esm/typings/src/errors/WrappedError.d.ts +2 -2
  16. package/esm/typings/src/execution/ExecutionTask.d.ts +2 -2
  17. package/esm/typings/src/execution/LlmExecutionTools.d.ts +6 -1
  18. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +2 -2
  19. package/esm/typings/src/llm-providers/agent/Agent.d.ts +19 -3
  20. package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +13 -1
  21. package/esm/typings/src/llm-providers/agent/RemoteAgent.d.ts +11 -2
  22. package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +6 -1
  23. package/esm/typings/src/remote-server/startAgentServer.d.ts +2 -2
  24. package/esm/typings/src/utils/color/Color.d.ts +7 -0
  25. package/esm/typings/src/utils/color/Color.test.d.ts +1 -0
  26. package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -2
  27. package/esm/typings/src/utils/misc/computeHash.d.ts +11 -0
  28. package/esm/typings/src/utils/misc/computeHash.test.d.ts +1 -0
  29. package/esm/typings/src/utils/organization/$sideEffect.d.ts +2 -2
  30. package/esm/typings/src/utils/organization/$side_effect.d.ts +2 -2
  31. package/esm/typings/src/utils/organization/TODO_USE.d.ts +2 -2
  32. package/esm/typings/src/utils/organization/keepUnused.d.ts +2 -2
  33. package/esm/typings/src/utils/organization/preserve.d.ts +3 -3
  34. package/esm/typings/src/utils/organization/really_any.d.ts +7 -0
  35. package/esm/typings/src/utils/serialization/asSerializable.d.ts +2 -2
  36. package/esm/typings/src/version.d.ts +1 -1
  37. package/package.json +2 -2
  38. package/umd/index.umd.js +22 -4
  39. package/umd/index.umd.js.map +1 -1
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Organizational helper to tell to use intentionally `any`
3
+ *
4
+ * @alias really_any
5
+ * @private within the repository
6
+ */
7
+ export type chococake = really_any;
1
8
  /**
2
9
  * Organizational helper to mark a place where to really use `any`
3
10
  *
@@ -1,4 +1,4 @@
1
- import type { really_any } from '../organization/really_any';
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: really_any): really_any;
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-47`).
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-client",
3
- "version": "0.103.0-48",
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,
@@ -100,7 +100,7 @@
100
100
  "module": "./esm/index.es.js",
101
101
  "typings": "./esm/typings/src/_packages/remote-client.index.d.ts",
102
102
  "peerDependencies": {
103
- "@promptbook/core": "0.103.0-48"
103
+ "@promptbook/core": "0.103.0-50"
104
104
  },
105
105
  "dependencies": {
106
106
  "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.103.0-48';
26
+ const PROMPTBOOK_ENGINE_VERSION = '0.103.0-50';
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
@@ -98,7 +98,7 @@
98
98
  }
99
99
  }
100
100
  /**
101
- * TODO: !!!! Explain that NotFoundError (!!! and other specific errors) has priority over DatabaseError in some contexts
101
+ * TODO: [🐱‍🚀] Explain that NotFoundError ([🐱‍🚀] and other specific errors) has priority over DatabaseError in some contexts
102
102
  */
103
103
 
104
104
  /**
@@ -644,6 +644,9 @@
644
644
  if (hex.length === 3) {
645
645
  return Color.fromHex3(hex);
646
646
  }
647
+ if (hex.length === 4) {
648
+ return Color.fromHex4(hex);
649
+ }
647
650
  if (hex.length === 6) {
648
651
  return Color.fromHex6(hex);
649
652
  }
@@ -664,6 +667,19 @@
664
667
  const b = parseInt(hex.substr(2, 1), 16) * 16;
665
668
  return take(new Color(r, g, b));
666
669
  }
670
+ /**
671
+ * Creates a new Color instance from color in hex format with 4 digits (with alpha channel)
672
+ *
673
+ * @param color in hex for example `09df`
674
+ * @returns Color object
675
+ */
676
+ static fromHex4(hex) {
677
+ const r = parseInt(hex.substr(0, 1), 16) * 16;
678
+ const g = parseInt(hex.substr(1, 1), 16) * 16;
679
+ const b = parseInt(hex.substr(2, 1), 16) * 16;
680
+ const a = parseInt(hex.substr(3, 1), 16) * 16;
681
+ return take(new Color(r, g, b, a));
682
+ }
667
683
  /**
668
684
  * Creates a new Color instance from color in hex format with 6 color digits (without alpha channel)
669
685
  *
@@ -854,7 +870,8 @@
854
870
  * @returns true if the value is a valid hex color string (e.g., `#009edd`, `#fff`, etc.)
855
871
  */
856
872
  static isHexColorString(value) {
857
- return typeof value === 'string' && /^#(?:[0-9a-fA-F]{3}){1,2}$/.test(value);
873
+ return (typeof value === 'string' &&
874
+ /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(value));
858
875
  }
859
876
  /**
860
877
  * Creates new Color object
@@ -1181,6 +1198,7 @@
1181
1198
  ({
1182
1199
  TITLE: Color.fromHex('#244EA8'),
1183
1200
  LINE: Color.fromHex('#eeeeee'),
1201
+ SEPARATOR: Color.fromHex('#cccccc'),
1184
1202
  COMMITMENT: Color.fromHex('#DA0F78'),
1185
1203
  PARAMETER: Color.fromHex('#8e44ad'),
1186
1204
  });
@@ -3297,7 +3315,7 @@
3297
3315
  TODO: [🧠] Is there a better implementation?
3298
3316
  > const propertyNames = Object.getOwnPropertyNames(objectValue);
3299
3317
  > for (const propertyName of propertyNames) {
3300
- > const value = (objectValue as really_any)[propertyName];
3318
+ > const value = (objectValue as chococake)[propertyName];
3301
3319
  > if (value && typeof value === 'object') {
3302
3320
  > deepClone(value);
3303
3321
  > }