@promptbook/editable 0.112.0-46 → 0.112.0-48

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 (70) hide show
  1. package/README.md +16 -16
  2. package/esm/index.es.js +2 -2
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/src/avatars/AvatarOrImage.d.ts +49 -0
  5. package/esm/src/avatars/avatarInteractionUtils.d.ts +81 -0
  6. package/esm/src/avatars/avatarInteractionUtils.test.d.ts +1 -0
  7. package/esm/src/avatars/avatarPointerTracking.d.ts +17 -0
  8. package/esm/src/avatars/avatarRenderingUtils.d.ts +3 -2
  9. package/esm/src/avatars/avatarRenderingUtils.test.d.ts +1 -0
  10. package/esm/src/avatars/index.d.ts +2 -1
  11. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +41 -1
  12. package/esm/src/avatars/visuals/asciiOctopusAvatarVisual.d.ts +7 -0
  13. package/esm/src/avatars/visuals/octopus3AvatarVisual.d.ts +7 -0
  14. package/esm/src/avatars/visuals/octopusAvatarVisualShared.d.ts +159 -0
  15. package/esm/src/avatars/visuals/octopusAvatarVisualShared.test.d.ts +1 -0
  16. package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +1 -1
  17. package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +1 -1
  18. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +1 -1
  19. package/esm/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +8 -2
  20. package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.test.d.ts +2 -0
  21. package/esm/src/book-components/Chat/hooks/useChatCompleteNotification.d.ts +2 -0
  22. package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +10 -0
  23. package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
  24. package/esm/src/commitments/USE/USE.d.ts +1 -0
  25. package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +1 -1
  26. package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +47 -0
  27. package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts +1 -0
  28. package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +12 -0
  29. package/esm/src/commitments/index.d.ts +2 -1
  30. package/esm/src/config.d.ts +2 -2
  31. package/esm/src/llm-providers/agent/RemoteAgent.d.ts +3 -0
  32. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.test.d.ts +1 -0
  33. package/esm/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +49 -5
  34. package/esm/src/utils/agents/resolveAgentAvatarImageUrl.test.d.ts +1 -0
  35. package/esm/src/version.d.ts +1 -1
  36. package/package.json +3 -3
  37. package/umd/index.umd.js +2 -2
  38. package/umd/index.umd.js.map +1 -1
  39. package/umd/src/avatars/AvatarOrImage.d.ts +49 -0
  40. package/umd/src/avatars/avatarInteractionUtils.d.ts +81 -0
  41. package/umd/src/avatars/avatarInteractionUtils.test.d.ts +1 -0
  42. package/umd/src/avatars/avatarPointerTracking.d.ts +17 -0
  43. package/umd/src/avatars/avatarRenderingUtils.d.ts +3 -2
  44. package/umd/src/avatars/avatarRenderingUtils.test.d.ts +1 -0
  45. package/umd/src/avatars/index.d.ts +2 -1
  46. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +41 -1
  47. package/umd/src/avatars/visuals/asciiOctopusAvatarVisual.d.ts +7 -0
  48. package/umd/src/avatars/visuals/octopus3AvatarVisual.d.ts +7 -0
  49. package/umd/src/avatars/visuals/octopusAvatarVisualShared.d.ts +159 -0
  50. package/umd/src/avatars/visuals/octopusAvatarVisualShared.test.d.ts +1 -0
  51. package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +1 -1
  52. package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +1 -1
  53. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +1 -1
  54. package/umd/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +8 -2
  55. package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.test.d.ts +2 -0
  56. package/umd/src/book-components/Chat/hooks/useChatCompleteNotification.d.ts +2 -0
  57. package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +10 -0
  58. package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
  59. package/umd/src/commitments/USE/USE.d.ts +1 -0
  60. package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +1 -1
  61. package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +47 -0
  62. package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts +1 -0
  63. package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +12 -0
  64. package/umd/src/commitments/index.d.ts +2 -1
  65. package/umd/src/config.d.ts +2 -2
  66. package/umd/src/llm-providers/agent/RemoteAgent.d.ts +3 -0
  67. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.test.d.ts +1 -0
  68. package/umd/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +49 -5
  69. package/umd/src/utils/agents/resolveAgentAvatarImageUrl.test.d.ts +1 -0
  70. package/umd/src/version.d.ts +1 -1
@@ -2,6 +2,7 @@ import type { CallChatModelStreamOptions } from '../../execution/LlmExecutionToo
2
2
  import type { ChatPromptResult } from '../../execution/PromptResult';
3
3
  import type { Prompt } from '../../types/Prompt';
4
4
  import type { string_agent_hash, string_agent_name } from '../../types/typeAliases';
5
+ import type { AvatarVisualId } from '../../avatars/types/AvatarVisualDefinition';
5
6
  import { Agent } from './Agent';
6
7
  import type { RemoteAgentOptions } from './RemoteAgentOptions';
7
8
  /**
@@ -28,6 +29,8 @@ export declare class RemoteAgent extends Agent {
28
29
  toolTitles: Record<string, string>;
29
30
  private _isVoiceCallingEnabled;
30
31
  private _isVoiceTtsSttEnabled;
32
+ isMetaImageExplicit: boolean;
33
+ avatarVisualId: AvatarVisualId | undefined;
31
34
  /**
32
35
  * Indicates whether the remote server allows text-to-speech and speech-to-text.
33
36
  *
@@ -1,3 +1,5 @@
1
+ import type { AvatarDefinition } from '../../avatars/types/AvatarDefinition';
2
+ import type { AvatarVisualId } from '../../avatars/types/AvatarVisualDefinition';
1
3
  import type { AgentBasicInformation } from '../../book-2.0/agent-source/AgentBasicInformation';
2
4
  import type { string_url, string_url_image } from '../../types/typeAliases';
3
5
  /**
@@ -5,25 +7,67 @@ import type { string_url, string_url_image } from '../../types/typeAliases';
5
7
  *
6
8
  * @private utility of `<Chat/>`
7
9
  */
8
- export type ResolveAgentAvatarImageUrlOptions = {
10
+ export type ResolveAgentAvatarOptions = {
9
11
  /**
10
12
  * Agent metadata used for avatar resolution.
11
13
  */
12
- readonly agent: Pick<AgentBasicInformation, 'agentName' | 'permanentId' | 'meta'>;
14
+ readonly agent: Pick<AgentBasicInformation, 'agentName' | 'agentHash' | 'permanentId' | 'meta'> & {
15
+ /**
16
+ * Optional explicit marker coming from remote profile payloads.
17
+ * When `false`, `meta.image` is treated as the generated static fallback rather than a user-defined `META IMAGE`.
18
+ */
19
+ readonly isMetaImageExplicit?: boolean;
20
+ /**
21
+ * Optional preferred avatar visual id coming from remote profile payloads.
22
+ */
23
+ readonly avatarVisualId?: AvatarVisualId;
24
+ };
13
25
  /**
14
26
  * Optional base URL used to resolve relative meta images and placeholders.
15
27
  */
16
28
  readonly baseUrl?: string_url;
17
29
  };
30
+ /**
31
+ * Backward-compatible alias kept for callers that only need image URLs.
32
+ *
33
+ * @private utility of `<Chat/>`
34
+ */
35
+ export type ResolveAgentAvatarImageUrlOptions = ResolveAgentAvatarOptions;
36
+ /**
37
+ * Default built-in avatar visual used when an agent does not define `META IMAGE`.
38
+ *
39
+ * @private shared avatar contract
40
+ */
41
+ export declare const DEFAULT_AGENT_AVATAR_VISUAL_ID: AvatarVisualId;
42
+ /**
43
+ * Resolved avatar descriptor used by interactive UIs to pick either an image or a live canvas visual.
44
+ *
45
+ * @private shared avatar contract
46
+ */
47
+ export type ResolvedAgentAvatar = {
48
+ readonly type: 'image';
49
+ readonly imageUrl: string_url_image;
50
+ } | {
51
+ readonly type: 'visual';
52
+ readonly avatarDefinition: AvatarDefinition;
53
+ readonly visualId: AvatarVisualId;
54
+ };
18
55
  /**
19
56
  * Resolve the fallback avatar URL for an agent.
20
57
  *
21
58
  * @private utility of `<Chat/>`
22
59
  */
23
- export declare function resolveAgentAvatarFallbackUrl(options: ResolveAgentAvatarImageUrlOptions): string_url_image | null;
60
+ export declare function resolveAgentAvatarFallbackUrl(options: ResolveAgentAvatarOptions): string_url_image | null;
61
+ /**
62
+ * Resolve the best avatar representation for an agent, preferring explicit `META IMAGE`
63
+ * and otherwise returning the default deterministic canvas visual.
64
+ *
65
+ * @private utility of `<Chat/>`
66
+ */
67
+ export declare function resolveAgentAvatar(options: ResolveAgentAvatarOptions): ResolvedAgentAvatar | null;
24
68
  /**
25
- * Resolve the best avatar URL for an agent, preferring META IMAGE and falling back to placeholders.
69
+ * Resolve the best avatar URL for an agent, preferring `META IMAGE` and falling back to the static placeholder route.
26
70
  *
27
71
  * @private utility of `<Chat/>`
28
72
  */
29
- export declare function resolveAgentAvatarImageUrl(options: ResolveAgentAvatarImageUrlOptions): string_url_image | null;
73
+ export declare function resolveAgentAvatarImageUrl(options: ResolveAgentAvatarOptions): string_url_image | null;
@@ -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.112.0-45`).
18
+ * It follows semantic versioning (e.g., `0.112.0-47`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@promptbook/editable",
3
- "version": "0.112.0-46",
4
- "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
3
+ "version": "0.112.0-48",
4
+ "description": "Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "repository": {
@@ -99,7 +99,7 @@
99
99
  "types": "./esm/src/_packages/editable.index.d.ts",
100
100
  "typings": "./esm/src/_packages/editable.index.d.ts",
101
101
  "peerDependencies": {
102
- "@promptbook/core": "0.112.0-46"
102
+ "@promptbook/core": "0.112.0-48"
103
103
  },
104
104
  "dependencies": {
105
105
  "crypto-js": "4.2.0",
package/umd/index.umd.js CHANGED
@@ -22,7 +22,7 @@
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-46';
25
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-48';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1034,7 +1034,7 @@
1034
1034
  *
1035
1035
  * @public exported from `@promptbook/core`
1036
1036
  */
1037
- const DEFAULT_BOOK_TITLE = `✨ Untitled Book`;
1037
+ const DEFAULT_BOOK_TITLE = `🐙 Untitled agent`;
1038
1038
  /**
1039
1039
  * When the pipeline is flat and no name of return parameter is provided, this name is used
1040
1040
  *