@promptbook/node 0.103.0-48 → 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.
Files changed (37) 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/types.index.d.ts +2 -0
  5. package/esm/typings/src/_packages/utils.index.d.ts +2 -0
  6. package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +12 -2
  7. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +14 -8
  8. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +10 -0
  9. package/esm/typings/src/commitments/MESSAGE/InitialMessageCommitmentDefinition.d.ts +28 -0
  10. package/esm/typings/src/commitments/index.d.ts +2 -1
  11. package/esm/typings/src/config.d.ts +1 -0
  12. package/esm/typings/src/errors/DatabaseError.d.ts +2 -2
  13. package/esm/typings/src/errors/WrappedError.d.ts +2 -2
  14. package/esm/typings/src/execution/ExecutionTask.d.ts +2 -2
  15. package/esm/typings/src/execution/LlmExecutionTools.d.ts +6 -1
  16. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +2 -2
  17. package/esm/typings/src/llm-providers/agent/Agent.d.ts +11 -3
  18. package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +6 -1
  19. package/esm/typings/src/llm-providers/agent/RemoteAgent.d.ts +6 -2
  20. package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +6 -1
  21. package/esm/typings/src/remote-server/startAgentServer.d.ts +2 -2
  22. package/esm/typings/src/utils/color/Color.d.ts +7 -0
  23. package/esm/typings/src/utils/color/Color.test.d.ts +1 -0
  24. package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -2
  25. package/esm/typings/src/utils/misc/computeHash.d.ts +11 -0
  26. package/esm/typings/src/utils/misc/computeHash.test.d.ts +1 -0
  27. package/esm/typings/src/utils/organization/$sideEffect.d.ts +2 -2
  28. package/esm/typings/src/utils/organization/$side_effect.d.ts +2 -2
  29. package/esm/typings/src/utils/organization/TODO_USE.d.ts +2 -2
  30. package/esm/typings/src/utils/organization/keepUnused.d.ts +2 -2
  31. package/esm/typings/src/utils/organization/preserve.d.ts +3 -3
  32. package/esm/typings/src/utils/organization/really_any.d.ts +7 -0
  33. package/esm/typings/src/utils/serialization/asSerializable.d.ts +2 -2
  34. package/esm/typings/src/version.d.ts +1 -1
  35. package/package.json +2 -2
  36. package/umd/index.umd.js +22 -4
  37. package/umd/index.umd.js.map +1 -1
package/umd/index.umd.js CHANGED
@@ -45,7 +45,7 @@
45
45
  * @generated
46
46
  * @see https://github.com/webgptorg/promptbook
47
47
  */
48
- const PROMPTBOOK_ENGINE_VERSION = '0.103.0-48';
48
+ const PROMPTBOOK_ENGINE_VERSION = '0.103.0-49';
49
49
  /**
50
50
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
51
51
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -381,6 +381,9 @@
381
381
  if (hex.length === 3) {
382
382
  return Color.fromHex3(hex);
383
383
  }
384
+ if (hex.length === 4) {
385
+ return Color.fromHex4(hex);
386
+ }
384
387
  if (hex.length === 6) {
385
388
  return Color.fromHex6(hex);
386
389
  }
@@ -401,6 +404,19 @@
401
404
  const b = parseInt(hex.substr(2, 1), 16) * 16;
402
405
  return take(new Color(r, g, b));
403
406
  }
407
+ /**
408
+ * Creates a new Color instance from color in hex format with 4 digits (with alpha channel)
409
+ *
410
+ * @param color in hex for example `09df`
411
+ * @returns Color object
412
+ */
413
+ static fromHex4(hex) {
414
+ const r = parseInt(hex.substr(0, 1), 16) * 16;
415
+ const g = parseInt(hex.substr(1, 1), 16) * 16;
416
+ const b = parseInt(hex.substr(2, 1), 16) * 16;
417
+ const a = parseInt(hex.substr(3, 1), 16) * 16;
418
+ return take(new Color(r, g, b, a));
419
+ }
404
420
  /**
405
421
  * Creates a new Color instance from color in hex format with 6 color digits (without alpha channel)
406
422
  *
@@ -591,7 +607,8 @@
591
607
  * @returns true if the value is a valid hex color string (e.g., `#009edd`, `#fff`, etc.)
592
608
  */
593
609
  static isHexColorString(value) {
594
- return typeof value === 'string' && /^#(?:[0-9a-fA-F]{3}){1,2}$/.test(value);
610
+ return (typeof value === 'string' &&
611
+ /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(value));
595
612
  }
596
613
  /**
597
614
  * Creates new Color object
@@ -918,6 +935,7 @@
918
935
  ({
919
936
  TITLE: Color.fromHex('#244EA8'),
920
937
  LINE: Color.fromHex('#eeeeee'),
938
+ SEPARATOR: Color.fromHex('#cccccc'),
921
939
  COMMITMENT: Color.fromHex('#DA0F78'),
922
940
  PARAMETER: Color.fromHex('#8e44ad'),
923
941
  });
@@ -1470,7 +1488,7 @@
1470
1488
  TODO: [🧠] Is there a better implementation?
1471
1489
  > const propertyNames = Object.getOwnPropertyNames(objectValue);
1472
1490
  > for (const propertyName of propertyNames) {
1473
- > const value = (objectValue as really_any)[propertyName];
1491
+ > const value = (objectValue as chococake)[propertyName];
1474
1492
  > if (value && typeof value === 'object') {
1475
1493
  > deepClone(value);
1476
1494
  > }
@@ -2645,7 +2663,7 @@
2645
2663
  }
2646
2664
  }
2647
2665
  /**
2648
- * TODO: !!!! Explain that NotFoundError (!!! and other specific errors) has priority over DatabaseError in some contexts
2666
+ * TODO: [🐱‍🚀] Explain that NotFoundError ([🐱‍🚀] and other specific errors) has priority over DatabaseError in some contexts
2649
2667
  */
2650
2668
 
2651
2669
  /**