@mgamadeus/ddd-agents 0.5.16 → 0.6.0

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 (109) hide show
  1. package/README.md +170 -6
  2. package/boundary.json +13 -0
  3. package/dist/chat.js +148 -773
  4. package/dist/chat.js.map +1 -1
  5. package/dist/chunks/{canvas-title-slot-context-DK4sfhkl.js → ConversationMarkdown-BsCjyhj4.js} +14 -43
  6. package/dist/chunks/ConversationMarkdown-BsCjyhj4.js.map +1 -0
  7. package/dist/chunks/{ConversationMessageInputComposerWidgets-B3Zf69rD.js → ConversationMessageInputComposerWidgets-CE8LpyXY.js} +10 -37
  8. package/dist/chunks/ConversationMessageInputComposerWidgets-CE8LpyXY.js.map +1 -0
  9. package/dist/chunks/VoiceBarsIcon-BIcURsBF.js +643 -0
  10. package/dist/chunks/VoiceBarsIcon-BIcURsBF.js.map +1 -0
  11. package/dist/chunks/{WebSearchResultsConversationWidget-887v8Wen.js → WebSearchResultsConversationWidget-DXhfSikV.js} +2 -2
  12. package/dist/chunks/{WebSearchResultsConversationWidget-887v8Wen.js.map → WebSearchResultsConversationWidget-DXhfSikV.js.map} +1 -1
  13. package/dist/chunks/browser-request-interception-BnzFbH0m.js +335 -0
  14. package/dist/chunks/browser-request-interception-BnzFbH0m.js.map +1 -0
  15. package/dist/chunks/{canvas-reducers-CwFA3rQ6.js → canvas-reducers-D-YxAR4B.js} +2 -2
  16. package/dist/chunks/{canvas-reducers-CwFA3rQ6.js.map → canvas-reducers-D-YxAR4B.js.map} +1 -1
  17. package/dist/chunks/canvas-title-slot-context-D6UXrkdJ.js +36 -0
  18. package/dist/chunks/canvas-title-slot-context-D6UXrkdJ.js.map +1 -0
  19. package/dist/chunks/{canvasBodies-C7qqThc9.js → canvasBodies-CQEBkIVw.js} +4 -4
  20. package/dist/chunks/{canvasBodies-C7qqThc9.js.map → canvasBodies-CQEBkIVw.js.map} +1 -1
  21. package/dist/chunks/{canvasStorage-i2wKVSBf.js → canvasStorage-BbEI3h-8.js} +2 -2
  22. package/dist/chunks/{canvasStorage-i2wKVSBf.js.map → canvasStorage-BbEI3h-8.js.map} +1 -1
  23. package/dist/chunks/format-agent-voice-call-duration-C-3hRc9p.js +10 -0
  24. package/dist/chunks/format-agent-voice-call-duration-C-3hRc9p.js.map +1 -0
  25. package/dist/chunks/{link-navigation-CNX8Am2L.js → link-navigation-BUcy5qWW.js} +2 -2
  26. package/dist/chunks/{link-navigation-CNX8Am2L.js.map → link-navigation-BUcy5qWW.js.map} +1 -1
  27. package/dist/chunks/{realtime-arrival-BTLE3jjt.js → realtime-arrival-BfsAPwqQ.js} +8 -3
  28. package/dist/chunks/realtime-arrival-BfsAPwqQ.js.map +1 -0
  29. package/dist/chunks/use-agents-chat-store-CuIkCz9v.js +34 -0
  30. package/dist/chunks/use-agents-chat-store-CuIkCz9v.js.map +1 -0
  31. package/dist/chunks/{widget-name-resolver-BVEuAsW5.js → widget-name-resolver-B9k-s_cF.js} +3 -3
  32. package/dist/chunks/{widget-name-resolver-BVEuAsW5.js.map → widget-name-resolver-B9k-s_cF.js.map} +1 -1
  33. package/dist/chunks/withPollingChangeSubscription-CnQnubfK.js.map +1 -1
  34. package/dist/client-testing.js +4 -4
  35. package/dist/client.js +14 -3
  36. package/dist/client.js.map +1 -1
  37. package/dist/files/i18n-keys.json +1128 -100
  38. package/dist/image-render.js +65 -38
  39. package/dist/image-render.js.map +1 -1
  40. package/dist/index.js +6 -6
  41. package/dist/kit.js +2 -2
  42. package/dist/preview.js +23 -26
  43. package/dist/preview.js.map +1 -1
  44. package/dist/provider.js +1 -1
  45. package/dist/renderer.js +25 -24
  46. package/dist/renderer.js.map +1 -1
  47. package/dist/styles.css +531 -93
  48. package/dist/types/client/AgentsConversationClient.d.ts +4 -1
  49. package/dist/types/client/http/createAgentsHttpConversationClient.d.ts +2 -1
  50. package/dist/types/entries/voice-admin.d.ts +7 -0
  51. package/dist/types/entries/voice.d.ts +24 -0
  52. package/dist/types/image-render/frozen-widget-requests.d.ts +11 -2
  53. package/dist/types/image-render/widget-image-google-map.d.ts +5 -0
  54. package/dist/types/image-render/widget-image-static-assets.d.ts +2 -0
  55. package/dist/types/preview/widget-preview-requests.d.ts +6 -5
  56. package/dist/types/request-interception/browser-request-interception.d.ts +48 -0
  57. package/dist/types/request-interception/intercepted-xml-http-request-upload.d.ts +15 -0
  58. package/dist/types/ui/account-realtime.d.ts +50 -11
  59. package/dist/types/voice/AgentVoiceCallBand/AgentVoiceCallBand.d.ts +49 -0
  60. package/dist/types/voice/AgentVoiceCallBand/agent-voice-call-outcome-title-text-key.d.ts +8 -0
  61. package/dist/types/voice/AgentVoiceCallCaptions/AgentVoiceCallCaptions.d.ts +15 -0
  62. package/dist/types/voice/AgentVoiceCallCaptions/saved-messages-of-agent-voice-chat.d.ts +12 -0
  63. package/dist/types/voice/AgentVoiceCallProvider/AgentVoiceCallProvider.d.ts +21 -0
  64. package/dist/types/voice/AgentVoiceCallProvider/agent-voice-call-context.d.ts +17 -0
  65. package/dist/types/voice/AgentVoiceChatStartButton/AgentVoiceChatStartButton.d.ts +15 -0
  66. package/dist/types/voice/AgentVoiceIcons/AgentVoiceIcons.d.ts +10 -0
  67. package/dist/types/voice/AgentVoiceIncomingCall/AgentVoiceIncomingCall.d.ts +28 -0
  68. package/dist/types/voice/AgentVoiceInputGlow/AgentVoiceInputGlow.d.ts +11 -0
  69. package/dist/types/voice/AgentVoiceInputGlow/agent-voice-input-glow-voice.d.ts +8 -0
  70. package/dist/types/voice/admin/AgentVoiceCallConversationLink/AgentVoiceCallConversationLink.d.ts +10 -0
  71. package/dist/types/voice/admin/AgentVoiceCallDetailScreen/AgentVoiceCallDetailScreen.d.ts +27 -0
  72. package/dist/types/voice/admin/AgentVoiceCallStateBadges/AgentVoiceCallStateBadges.d.ts +12 -0
  73. package/dist/types/voice/admin/AgentVoiceCallsScreen/AgentVoiceCallsScreen.d.ts +33 -0
  74. package/dist/types/voice/admin/agent-voice-admin-api.d.ts +59 -0
  75. package/dist/types/voice/admin/agent-voice-admin-format.d.ts +38 -0
  76. package/dist/types/voice/admin/agent-voice-admin-types.d.ts +110 -0
  77. package/dist/types/voice/agent-voice-api.d.ts +114 -0
  78. package/dist/types/voice/call/agent-voice-call-elapsed-seconds.d.ts +6 -0
  79. package/dist/types/voice/call/agent-voice-call-end-reasons.d.ts +3 -0
  80. package/dist/types/voice/call/agent-voice-call-store.d.ts +111 -0
  81. package/dist/types/voice/call/agent-voice-call-turn.d.ts +4 -0
  82. package/dist/types/voice/call/build-unsaved-agent-voice-call-lines.d.ts +14 -0
  83. package/dist/types/voice/call/format-agent-voice-call-duration.d.ts +2 -0
  84. package/dist/types/voice/call/use-agent-voice-call-elapsed-seconds.d.ts +3 -0
  85. package/dist/types/voice/call/use-agent-voice-call-server-end.d.ts +15 -0
  86. package/dist/types/voice/call/use-agent-voice-call.d.ts +12 -0
  87. package/dist/types/voice/call/use-follow-agent-voice-call-conversation.d.ts +9 -0
  88. package/dist/types/voice/ring/agent-voice-caller-label.d.ts +21 -0
  89. package/dist/types/voice/ring/agent-voice-incoming-ring-list.d.ts +10 -0
  90. package/dist/types/voice/ring/agent-voice-incoming-ring-store.d.ts +47 -0
  91. package/dist/types/voice/ring/agent-voice-ring-source.d.ts +75 -0
  92. package/dist/types/voice/ring/agent-voice-ring.d.ts +35 -0
  93. package/dist/types/voice/ring/answer-incoming-agent-voice-call.d.ts +13 -0
  94. package/dist/types/voice/ring/use-agent-voice-incoming-rings.d.ts +14 -0
  95. package/dist/types/voice/ring/use-agent-voice-ring-tone.d.ts +6 -0
  96. package/dist/ui.js +82 -19
  97. package/dist/ui.js.map +1 -1
  98. package/dist/voice-admin.js +738 -0
  99. package/dist/voice-admin.js.map +1 -0
  100. package/dist/voice.js +1586 -0
  101. package/dist/voice.js.map +1 -0
  102. package/dist/widgets.js +4 -4
  103. package/package.json +23 -4
  104. package/public-api.json +156 -0
  105. package/dist/chunks/ConversationMessageInputComposerWidgets-B3Zf69rD.js.map +0 -1
  106. package/dist/chunks/canvas-title-slot-context-DK4sfhkl.js.map +0 -1
  107. package/dist/chunks/realtime-arrival-BTLE3jjt.js.map +0 -1
  108. package/dist/chunks/widget-image-readiness-signal-C58JkCQA.js +0 -25
  109. package/dist/chunks/widget-image-readiness-signal-C58JkCQA.js.map +0 -1
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { useCallback, useSyncExternalStore, useContext, createContext } from "react";
4
+ const AgentsChatStoreContext = createContext(null);
5
+ const AgentsChatStoreProvider = (props) => {
6
+ const { chatStore, children } = props;
7
+ return /* @__PURE__ */ jsx(AgentsChatStoreContext.Provider, { value: chatStore, children });
8
+ };
9
+ const useAgentsChatStore = () => {
10
+ const chatStore = useContext(AgentsChatStoreContext);
11
+ if (chatStore === null) {
12
+ throw new Error("A chat component rendered outside AgentsChatStoreProvider: the app has to mount its chat store.");
13
+ }
14
+ return chatStore;
15
+ };
16
+ const useOptionalAgentsChatStore = () => useContext(AgentsChatStoreContext);
17
+ const subscribeToNothing = () => () => void 0;
18
+ const useAgentsChatSelector = (chatStore, selector, valueWithoutStore) => {
19
+ const subscribe = chatStore ? chatStore.subscribe : subscribeToNothing;
20
+ const readSelectedValue = useCallback(
21
+ () => chatStore ? selector(chatStore.getState()) : valueWithoutStore,
22
+ [chatStore, selector, valueWithoutStore]
23
+ );
24
+ return useSyncExternalStore(subscribe, readSelectedValue, readSelectedValue);
25
+ };
26
+ const useAgentsChatState = (selector) => useAgentsChatSelector(useAgentsChatStore(), selector);
27
+ export {
28
+ AgentsChatStoreProvider as A,
29
+ useOptionalAgentsChatStore as a,
30
+ useAgentsChatState as b,
31
+ useAgentsChatStore as c,
32
+ useAgentsChatSelector as u
33
+ };
34
+ //# sourceMappingURL=use-agents-chat-store-CuIkCz9v.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-agents-chat-store-CuIkCz9v.js","sources":["../../src/chat/store/use-agents-chat-store.tsx"],"sourcesContent":["import { createContext, type ReactNode, useCallback, useContext, useSyncExternalStore } from \"react\";\nimport type { AgentsChatState } from \"./agents-chat-state\";\nimport type { AgentsChatStore } from \"./create-agents-chat-store\";\n\nconst AgentsChatStoreContext = createContext<AgentsChatStore | null>(null);\n\nexport interface AgentsChatStoreProviderProps {\n /** The state handle of the chat below (the app creates and releases it). */\n chatStore: AgentsChatStore;\n children?: ReactNode;\n}\n\n/** Puts one chat instance's state handle in reach of the chat and of the app's components inside it. */\nexport const AgentsChatStoreProvider = (props: AgentsChatStoreProviderProps) => {\n const { chatStore, children } = props;\n return <AgentsChatStoreContext.Provider value={chatStore}>{children}</AgentsChatStoreContext.Provider>;\n};\n\n/** The state handle of the chat this component renders in; throws outside `AgentsChatStoreProvider`. */\nexport const useAgentsChatStore = (): AgentsChatStore => {\n const chatStore = useContext(AgentsChatStoreContext);\n if (chatStore === null) {\n throw new Error(\"A chat component rendered outside AgentsChatStoreProvider: the app has to mount its chat store.\");\n }\n return chatStore;\n};\n\n/** The state handle of the chat this component renders in, or null outside a chat. */\nexport const useOptionalAgentsChatStore = (): AgentsChatStore | null => useContext(AgentsChatStoreContext);\n\nconst subscribeToNothing = () => () => undefined;\n\n/**\n * Reads one value of a chat instance's state and re-renders when it changes. The selector must return a value that\n * keeps its identity while the state does not change (a state field, not a new object). Without a store it returns\n * `valueWithoutStore`.\n */\nexport const useAgentsChatSelector = <Selected,>(\n chatStore: AgentsChatStore | null | undefined,\n selector: (state: AgentsChatState) => Selected,\n valueWithoutStore?: Selected,\n): Selected => {\n const subscribe = chatStore ? chatStore.subscribe : subscribeToNothing;\n const readSelectedValue = useCallback(\n () => (chatStore ? selector(chatStore.getState()) : (valueWithoutStore as Selected)),\n [chatStore, selector, valueWithoutStore],\n );\n return useSyncExternalStore(subscribe, readSelectedValue, readSelectedValue);\n};\n\n/** Reads one value of the state of the chat this component renders in. */\nexport const useAgentsChatState = <Selected,>(selector: (state: AgentsChatState) => Selected): Selected =>\n useAgentsChatSelector(useAgentsChatStore(), selector);\n"],"names":[],"mappings":";;;AAIA,MAAM,yBAAyB,cAAsC,IAAI;AASlE,MAAM,0BAA0B,CAAC,UAAwC;AAC9E,QAAM,EAAE,WAAW,SAAA,IAAa;AAChC,6BAAQ,uBAAuB,UAAvB,EAAgC,OAAO,WAAY,UAAS;AACtE;AAGO,MAAM,qBAAqB,MAAuB;AACvD,QAAM,YAAY,WAAW,sBAAsB;AACnD,MAAI,cAAc,MAAM;AACtB,UAAM,IAAI,MAAM,iGAAiG;AAAA,EACnH;AACA,SAAO;AACT;AAGO,MAAM,6BAA6B,MAA8B,WAAW,sBAAsB;AAEzG,MAAM,qBAAqB,MAAM,MAAM;AAOhC,MAAM,wBAAwB,CACnC,WACA,UACA,sBACa;AACb,QAAM,YAAY,YAAY,UAAU,YAAY;AACpD,QAAM,oBAAoB;AAAA,IACxB,MAAO,YAAY,SAAS,UAAU,SAAA,CAAU,IAAK;AAAA,IACrD,CAAC,WAAW,UAAU,iBAAiB;AAAA,EAAA;AAEzC,SAAO,qBAAqB,WAAW,mBAAmB,iBAAiB;AAC7E;AAGO,MAAM,qBAAqB,CAAY,aAC5C,sBAAsB,mBAAA,GAAsB,QAAQ;"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
3
  import React, { useReducer, useRef, useCallback, useMemo, useEffect, useState, useContext, createContext, useLayoutEffect, useId, useSyncExternalStore, Fragment as Fragment$1 } from "react";
4
- import { g as registerWidgetHydrator, aw as SkeletonLine, aE as WidgetSurface, aC as WidgetKpiValue, Y as readWidgetAgentSpaceKeyAttribute, W as WidgetRenderReportContext, z as buildWidgetAgentSpaceKeyProps, bh as readTextNodeContent, bi as readAllowedValue, a0 as useConversationWidgetContext, M as ModelText, ap as DonePill, bg as ConversationWidgetButton, $ as shortStringHash, a6 as WidgetImageReadinessContext, U as messageAnchor, t as ConversationWidgetActions, bj as useReportTextNodeRenderState, bk as readTextNodeRenderState, ax as SkeletonPill, bl as buildFaviconUrl, bm as readSiteHostname, av as SkeletonCircle, bn as readSafeHttpUrl, a3 as useWidgetHydration, a1 as useIsEmailWidgetRender, a2 as useReportWidgetRenderStatus, ah as ClockConversationWidget, ai as ConceptExplainerConversationWidget, ak as CurrencyConverterConversationWidget, al as CustomVisualizationConversationWidget, aq as DriveFilesConversationWidget, bo as registerDriveFilesHydrator, bc as normalizeEntityMentionFields, as as EntityMentionConversationWidget, aG as WritingDraftConversationWidget, az as SuggestedActions, at as MultiChoiceConversationWidget, au as QuickRepliesConversationWidget, aA as ToolTraceConversationWidget, aj as ConversationSearchResultsConversationWidget, aB as WebSearchResultsConversationWidget } from "./WebSearchResultsConversationWidget-887v8Wen.js";
5
- import { Y as getWidgetSelfHydrationKeyFieldName, N as getAgentsEnvironment, J as escapePlainTextForText, s as Text, I as Icon, a8 as useAgentsOwnerSettings, F as classNames, a6 as useAgentsLinkNavigation, B as Button, A as AgentsLink, S as SegmentBar, w as TrendDelta, x as WidgetText, a1 as translateText, $ as reportWidgetCrash, W as WidgetFeatureGate, h as InteractiveSurface, C as Checkbox, f as DateInput, u as TextInput, R as RadioGroup, m as Select, l as RangeSlider, T as Tabs, t as TextArea, M as Map$1, i as MapMarker, a7 as useAgentsMapsLoader, n as Skeleton, Z as openImageGallery, q as StatusBadge, j as Markdown, a5 as useAgentsEnvironment } from "./link-navigation-CNX8Am2L.js";
4
+ import { g as registerWidgetHydrator, aw as SkeletonLine, aE as WidgetSurface, aC as WidgetKpiValue, Y as readWidgetAgentSpaceKeyAttribute, W as WidgetRenderReportContext, z as buildWidgetAgentSpaceKeyProps, bh as readTextNodeContent, bi as readAllowedValue, a0 as useConversationWidgetContext, M as ModelText, ap as DonePill, bg as ConversationWidgetButton, $ as shortStringHash, a6 as WidgetImageReadinessContext, U as messageAnchor, t as ConversationWidgetActions, bj as useReportTextNodeRenderState, bk as readTextNodeRenderState, ax as SkeletonPill, bl as buildFaviconUrl, bm as readSiteHostname, av as SkeletonCircle, bn as readSafeHttpUrl, a3 as useWidgetHydration, a1 as useIsEmailWidgetRender, a2 as useReportWidgetRenderStatus, ah as ClockConversationWidget, ai as ConceptExplainerConversationWidget, ak as CurrencyConverterConversationWidget, al as CustomVisualizationConversationWidget, aq as DriveFilesConversationWidget, bo as registerDriveFilesHydrator, bc as normalizeEntityMentionFields, as as EntityMentionConversationWidget, aG as WritingDraftConversationWidget, az as SuggestedActions, at as MultiChoiceConversationWidget, au as QuickRepliesConversationWidget, aA as ToolTraceConversationWidget, aj as ConversationSearchResultsConversationWidget, aB as WebSearchResultsConversationWidget } from "./WebSearchResultsConversationWidget-DXhfSikV.js";
5
+ import { Y as getWidgetSelfHydrationKeyFieldName, N as getAgentsEnvironment, J as escapePlainTextForText, s as Text, I as Icon, a8 as useAgentsOwnerSettings, F as classNames, a6 as useAgentsLinkNavigation, B as Button, A as AgentsLink, S as SegmentBar, w as TrendDelta, x as WidgetText, a1 as translateText, $ as reportWidgetCrash, W as WidgetFeatureGate, h as InteractiveSurface, C as Checkbox, f as DateInput, u as TextInput, R as RadioGroup, m as Select, l as RangeSlider, T as Tabs, t as TextArea, M as Map$1, i as MapMarker, a7 as useAgentsMapsLoader, n as Skeleton, Z as openImageGallery, q as StatusBadge, j as Markdown, a5 as useAgentsEnvironment } from "./link-navigation-BUcy5qWW.js";
6
6
  import ReactApexChartImport from "react-apexcharts";
7
7
  import { i as isAgentsIconName } from "./icon-names-Di6c4zLo.js";
8
8
  import { unified } from "unified";
@@ -9753,4 +9753,4 @@ export {
9753
9753
  getConversationWidgetRegistryRevision as y,
9754
9754
  readComposedViewTree as z
9755
9755
  };
9756
- //# sourceMappingURL=widget-name-resolver-BVEuAsW5.js.map
9756
+ //# sourceMappingURL=widget-name-resolver-B9k-s_cF.js.map