@memberjunction/ng-conversations 6.3.0-edge.1 → 6.3.0-edge.2

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 (128) hide show
  1. package/README.md +13 -0
  2. package/dist/assets/edge-ai.worker.js +3451 -798
  3. package/dist/lib/components/agent/agent-instance-editor-modal.component.d.ts +186 -0
  4. package/dist/lib/components/agent/agent-instance-editor-modal.component.d.ts.map +1 -0
  5. package/dist/lib/components/agent/agent-instance-editor-modal.component.js +2202 -0
  6. package/dist/lib/components/agent/agent-instance-editor-modal.component.js.map +1 -0
  7. package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
  8. package/dist/lib/components/artifact/artifact-share-modal.component.js +289 -266
  9. package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
  10. package/dist/lib/components/composer/ai-composer.component.d.ts +15 -1
  11. package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
  12. package/dist/lib/components/composer/ai-composer.component.js +43 -4
  13. package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
  14. package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts +20 -2
  15. package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts.map +1 -1
  16. package/dist/lib/components/conversation/conversation-agent-picker.component.js +378 -62
  17. package/dist/lib/components/conversation/conversation-agent-picker.component.js.map +1 -1
  18. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +59 -9
  19. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  20. package/dist/lib/components/conversation/conversation-chat-area.component.js +645 -416
  21. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  22. package/dist/lib/components/conversation/conversation-list.component.d.ts +5 -1
  23. package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
  24. package/dist/lib/components/conversation/conversation-list.component.js +100 -56
  25. package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
  26. package/dist/lib/components/library/library-workspace.component.d.ts +30 -2
  27. package/dist/lib/components/library/library-workspace.component.d.ts.map +1 -1
  28. package/dist/lib/components/library/library-workspace.component.js +1342 -641
  29. package/dist/lib/components/library/library-workspace.component.js.map +1 -1
  30. package/dist/lib/components/library/library.models.d.ts +33 -3
  31. package/dist/lib/components/library/library.models.d.ts.map +1 -1
  32. package/dist/lib/components/library/library.models.js.map +1 -1
  33. package/dist/lib/components/message/agent-handoff-card.component.js +1 -1
  34. package/dist/lib/components/message/agent-handoff-card.component.js.map +1 -1
  35. package/dist/lib/components/message/message-input.component.d.ts +7 -0
  36. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  37. package/dist/lib/components/message/message-input.component.js +52 -20
  38. package/dist/lib/components/message/message-input.component.js.map +1 -1
  39. package/dist/lib/components/message/message-item.component.d.ts +17 -4
  40. package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
  41. package/dist/lib/components/message/message-item.component.js +58 -8
  42. package/dist/lib/components/message/message-item.component.js.map +1 -1
  43. package/dist/lib/components/message/message-list.component.d.ts +15 -1
  44. package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
  45. package/dist/lib/components/message/message-list.component.js +73 -3
  46. package/dist/lib/components/message/message-list.component.js.map +1 -1
  47. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.d.ts.map +1 -1
  48. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js +30 -0
  49. package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js.map +1 -1
  50. package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts +28 -1
  51. package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts.map +1 -1
  52. package/dist/lib/components/realtime/capture/realtime-capture-channel.js +53 -1
  53. package/dist/lib/components/realtime/capture/realtime-capture-channel.js.map +1 -1
  54. package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -1
  55. package/dist/lib/components/realtime/channels/client-context-channel.js +23 -7
  56. package/dist/lib/components/realtime/channels/client-context-channel.js.map +1 -1
  57. package/dist/lib/components/realtime/media/media-channel.d.ts +32 -11
  58. package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
  59. package/dist/lib/components/realtime/media/media-channel.js +186 -23
  60. package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
  61. package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts +9 -1
  62. package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts.map +1 -1
  63. package/dist/lib/components/realtime/media/realtime-media-surface.component.js +33 -10
  64. package/dist/lib/components/realtime/media/realtime-media-surface.component.js.map +1 -1
  65. package/dist/lib/components/realtime/realtime-agent-banner.component.js +2 -2
  66. package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts.map +1 -1
  67. package/dist/lib/components/realtime/realtime-agent-picker.component.js +3 -3
  68. package/dist/lib/components/realtime/realtime-agent-picker.component.js.map +1 -1
  69. package/dist/lib/components/realtime/realtime-composer.component.js +2 -2
  70. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +1 -1
  71. package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
  72. package/dist/lib/components/realtime/realtime-session-overlay.component.js +20 -11
  73. package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
  74. package/dist/lib/components/realtime/realtime-session-state.d.ts.map +1 -1
  75. package/dist/lib/components/realtime/realtime-session-state.js +1 -1
  76. package/dist/lib/components/realtime/realtime-session-state.js.map +1 -1
  77. package/dist/lib/components/realtime/realtime-session-thread.component.d.ts.map +1 -1
  78. package/dist/lib/components/realtime/realtime-session-thread.component.js +1 -1
  79. package/dist/lib/components/realtime/realtime-session-thread.component.js.map +1 -1
  80. package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts +7 -0
  81. package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts.map +1 -1
  82. package/dist/lib/components/realtime/realtime-surface-tab-style.js +19 -0
  83. package/dist/lib/components/realtime/realtime-surface-tab-style.js.map +1 -1
  84. package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
  85. package/dist/lib/components/realtime/realtime-surface-tabs.model.js +13 -2
  86. package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
  87. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts +3 -1
  88. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
  89. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +9 -0
  90. package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
  91. package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
  92. package/dist/lib/components/share/share-modal.component.js +181 -127
  93. package/dist/lib/components/share/share-modal.component.js.map +1 -1
  94. package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +14 -1
  95. package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
  96. package/dist/lib/components/sidebar/conversation-sidebar.component.js +50 -11
  97. package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
  98. package/dist/lib/components/sidebar/my-agents-section.component.d.ts +78 -0
  99. package/dist/lib/components/sidebar/my-agents-section.component.d.ts.map +1 -0
  100. package/dist/lib/components/sidebar/my-agents-section.component.js +450 -0
  101. package/dist/lib/components/sidebar/my-agents-section.component.js.map +1 -0
  102. package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
  103. package/dist/lib/components/task/tasks-full-view.component.js +9 -0
  104. package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
  105. package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts +1 -0
  106. package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts.map +1 -1
  107. package/dist/lib/composer-plugins/base-conversation-mention.provider.js +13 -1
  108. package/dist/lib/composer-plugins/base-conversation-mention.provider.js.map +1 -1
  109. package/dist/lib/conversations.module.d.ts +78 -76
  110. package/dist/lib/conversations.module.d.ts.map +1 -1
  111. package/dist/lib/conversations.module.js +8 -0
  112. package/dist/lib/conversations.module.js.map +1 -1
  113. package/dist/lib/services/conversation-agent.service.d.ts +23 -18
  114. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
  115. package/dist/lib/services/conversation-agent.service.js +75 -32
  116. package/dist/lib/services/conversation-agent.service.js.map +1 -1
  117. package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
  118. package/dist/lib/services/realtime-session.service.js +2 -1
  119. package/dist/lib/services/realtime-session.service.js.map +1 -1
  120. package/dist/lib/utils/agent-handoff-map.js +1 -1
  121. package/dist/lib/utils/agent-handoff-map.js.map +1 -1
  122. package/dist/lib/utils/agent-turn-routing.js +1 -1
  123. package/dist/lib/utils/agent-turn-routing.js.map +1 -1
  124. package/dist/public-api.d.ts +2 -0
  125. package/dist/public-api.d.ts.map +1 -1
  126. package/dist/public-api.js +2 -0
  127. package/dist/public-api.js.map +1 -1
  128. package/package.json +37 -37
@@ -1 +1 @@
1
- {"version":3,"file":"agent-handoff-map.js","sourceRoot":"","sources":["../../../src/lib/utils/agent-handoff-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAS5E,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,wBAAwB,CAAC;AA6ChC,MAAM,CAAC,MAAM,mBAAmB,GAAa;IAC3C,IAAI;IACJ,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,UAAU;IACV,QAAQ;IACR,UAAU;IACV,WAAW;IACX,YAAY;IACZ,cAAc;CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,QAA2B,EAC3B,MAAyB;IAEzB,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAC1B,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EA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W,CAAC,EAAE;gBAC5B,CAAC,OAAO,CAAC,OAAO;gBAChB,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,EAC5D,CAAC;YACD,OAAO;gBACL,WAAW,EAAE,aAAa,CAAC,WAAW;gBACtC,WAAW,EAAE,aAAa,CAAC,WAAW;gBACtC,UAAU,EAAE,aAAa,CAAC,UAAU,IAAI,IAAI;gBAC5C,KAAK,EAAE,aAAa,CAAC,KAAK,IAAI,IAAI;gBAClC,MAAM,EAAE,aAAa,CAAC,MAAM,IAAI,IAAI;gBACpC,QAAQ,EAAE,aAAa,CAAC,QAAQ,IAAI,IAAI;gBACxC,cAAc,EAAE,OAAO,CAAC,QAAQ;aACjC,CAAC;QACJ,CAAC;IACH,CAAC;IAED,KAAK,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,IAAI,kBAAkB,CAAC,OAAO,EAAE,EAAE,CAAC;QACrE,IACE,OAAO,CAAC,MAAM,KAAK,QAAQ;YAC3B,OAAO,CAAC,cAAc;YACtB,UAAU,CAAC,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,EAAE,CAAC,EAC9C,CAAC;YACD,OAAO;gBACL,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,IAAI;gBACtC,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,IAAI;gBAC5B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,IAAI;gBAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,IAAI;gBAClC,cAAc,EAAE,cAAc;aAC/B,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { IMetadataProvider, LogError, RunView } from '@memberjunction/core';\nimport {\n MJConversationDetailEntity,\n MJAIAgentConfigurationEntity,\n} from '@memberjunction/core-entities';\nimport {\n MJAIAgentEntityExtended,\n MJAIAgentRunEntityExtended,\n} from '@memberjunction/ai-core-plus';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport {\n CleanAndParseJSON,\n EscapeSQLString,\n IndexByUUID,\n NormalizeUUID,\n UUIDsEqual,\n} from '@memberjunction/global';\nimport {\n AgentHandoffParticipant,\n AgentHandoffStatus,\n MessageHandedOffFromInfo,\n MessageHandoffInfo,\n} from '../components/message/agent-handoff-card.component';\n\n/**\n * Simple row shape projected from `MJ: AI Agent Run Steps` for `StepType = 'Handoff'`.\n */\nexport interface HandoffRunStepRow {\n ID: string;\n AgentRunID: string;\n StepNumber?: number | null;\n StepName?: string | null;\n StepType?: string | null;\n Status?: string | null;\n TargetID?: string | null;\n InputData?: string | null;\n OutputData?: string | null;\n ErrorMessage?: string | null;\n}\n\ninterface ParsedHandoffInput {\n agentName?: string;\n brief?: string;\n reason?: string;\n}\n\ninterface ParsedHandoffOutput {\n HandoffToAgentID?: string;\n TargetAgentName?: string;\n AgentName?: string;\n TargetConversationDetailID?: string | null;\n PresetID?: string | null;\n PresetName?: string | null;\n PresetSource?: string | null;\n Brief?: string;\n Reason?: string;\n RefusalReason?: string;\n Hop?: number;\n Chain?: string[];\n}\n\nexport const HANDOFF_STEP_FIELDS: string[] = [\n 'ID',\n 'AgentRunID',\n 'StepNumber',\n 'StepName',\n 'StepType',\n 'Status',\n 'TargetID',\n 'InputData',\n 'OutputData',\n 'ErrorMessage',\n];\n\n/**\n * Loads `MJ: AI Agent Run Steps` rows with `StepType = 'Handoff'` for the given run IDs\n * in a single `RunView` query (`ResultType: 'simple'`, explicit `Fields`).\n */\nexport async function LoadHandoffStepsForRuns(\n provider: IMetadataProvider,\n runIds: readonly string[]\n): Promise<HandoffRunStepRow[]> {\n const uniqueIds = Array.from(\n new Set(runIds.map(id => id?.trim()).filter((id): id is string => !!id))\n );\n if (uniqueIds.length === 0) {\n return [];\n }\n try {\n const rv = RunView.FromMetadataProvider(provider);\n const quotedIds = uniqueIds.map(id => `'${EscapeSQLString(id)}'`).join(',');\n const result = await rv.RunView<HandoffRunStepRow>({\n EntityName: 'MJ: AI Agent Run Steps',\n ExtraFilter: `StepType = 'Handoff' AND AgentRunID IN (${quotedIds})`,\n Fields: HANDOFF_STEP_FIELDS,\n OrderBy: 'StepNumber ASC',\n ResultType: 'simple',\n });\n if (!result?.Success || !result.Results) {\n LogError(`LoadHandoffStepsForRuns failed: ${result?.ErrorMessage ?? 'Unknown RunView error'}`);\n return [];\n }\n return result.Results;\n } catch (error) {\n LogError('LoadHandoffStepsForRuns threw an error:', undefined, error);\n return [];\n }\n}\n\nfunction parseJsonSafe<T>(raw: string | null | undefined): T | null {\n if (!raw || !raw.trim()) {\n return null;\n }\n try {\n return JSON.parse(raw) as T;\n } catch {\n return CleanAndParseJSON<T>(raw, false);\n }\n}\n\nfunction resolveParticipant(\n agentId: string | null | undefined,\n fallbackName: string | null | undefined,\n agents: readonly MJAIAgentEntityExtended[]\n): AgentHandoffParticipant {\n const agentsById = IndexByUUID(agents);\n const match = agentId\n ? agentsById.Get(agentId)\n : fallbackName\n ? agents.find(a => a.Name?.trim().toLowerCase() === fallbackName.trim().toLowerCase())\n : undefined;\n\n if (match) {\n return {\n ID: match.ID,\n Name: match.Name || fallbackName || 'Agent',\n AvatarUrl: match.LogoURL || null,\n IconClass: match.IconClass || null,\n };\n }\n return {\n ID: agentId ?? null,\n Name: fallbackName?.trim() || 'Agent',\n AvatarUrl: null,\n IconClass: null,\n };\n}\n\n/**\n * Looks up a `MessageHandoffInfo` in a detail-ID map using case-insensitive UUID matching.\n */\nexport function LookupHandoffByDetailId(\n map: ReadonlyMap<string, MessageHandoffInfo> | null | undefined,\n detailId: string | null | undefined\n): MessageHandoffInfo | null {\n if (!map || !detailId) {\n return null;\n }\n const direct = map.get(detailId) ?? map.get(NormalizeUUID(detailId));\n if (direct) {\n return direct;\n }\n for (const [key, value] of map.entries()) {\n if (UUIDsEqual(key, detailId)) {\n return value;\n }\n }\n return null;\n}\n\n/**\n * Finds the target detail row in `messages` for a handoff originating from `sourceDetailId`.\n */\nexport function FindHandoffTargetDetail(\n sourceDetailId: string,\n targetAgentId: string | null | undefined,\n messages: readonly MJConversationDetailEntity[]\n): MJConversationDetailEntity | undefined {\n return messages.find(\n m =>\n m.Role === 'AI' &&\n !UUIDsEqual(m.ID, sourceDetailId) &&\n UUIDsEqual(m.ParentID, sourceDetailId) &&\n (!targetAgentId || !m.AgentID || UUIDsEqual(m.AgentID, targetAgentId))\n );\n}\n\n/**\n * Computes the effective `Status` of a handoff given the current loaded `messages`.\n */\nexport function DeriveHandoffStatus(\n baseStatus: AgentHandoffStatus,\n sourceDetailId: string,\n targetAgentId: string | null | undefined,\n targetDetailId: string | null | undefined,\n messages: readonly MJConversationDetailEntity[]\n): AgentHandoffStatus {\n if (baseStatus === 'Failed') {\n return 'Failed';\n }\n const targetDetail = targetDetailId\n ? messages.find(m => UUIDsEqual(m.ID, targetDetailId)) ??\n FindHandoffTargetDetail(sourceDetailId, targetAgentId, messages)\n : FindHandoffTargetDetail(sourceDetailId, targetAgentId, messages);\n if (!targetDetail || targetDetail.Status === 'In-Progress') {\n return 'Transferring';\n }\n return 'Transferred';\n}\n\n/**\n * Builds the `HandoffsByDetailId` map from loaded messages, agent runs, and `Handoff` run steps.\n */\nexport function BuildHandoffsByDetailId(params: {\n Messages: readonly MJConversationDetailEntity[];\n AgentRunsByDetailId: ReadonlyMap<string, MJAIAgentRunEntityExtended>;\n HandoffSteps: readonly HandoffRunStepRow[];\n Agents: readonly MJAIAgentEntityExtended[];\n Presets?: readonly MJAIAgentConfigurationEntity[];\n}): Map<string, MessageHandoffInfo> {\n const {\n Messages: messages,\n AgentRunsByDetailId: agentRunsByDetailId,\n HandoffSteps: handoffSteps,\n Agents: agents,\n Presets: presets = [],\n } = params;\n\n const result = new Map<string, MessageHandoffInfo>();\n if (handoffSteps.length === 0 || agentRunsByDetailId.size === 0) {\n return result;\n }\n\n const stepsByRunKey = new Map<string, HandoffRunStepRow[]>();\n for (const step of handoffSteps) {\n if (!step.AgentRunID) continue;\n if (step.StepType && step.StepType !== 'Handoff') continue;\n const key = NormalizeUUID(step.AgentRunID);\n const list = stepsByRunKey.get(key) ?? [];\n list.push(step);\n stepsByRunKey.set(key, list);\n }\n\n for (const list of stepsByRunKey.values()) {\n list.sort((a, b) => (a.StepNumber ?? 0) - (b.StepNumber ?? 0));\n }\n\n const messagesById = IndexByUUID(messages);\n const presetsById = IndexByUUID(presets);\n const defaultPresetsByAgentKey = new Map<string, MJAIAgentConfigurationEntity>();\n for (const p of presets) {\n if (p.Status === 'Active' && p.IsDefault && p.AgentID) {\n const key = NormalizeUUID(p.AgentID);\n if (!defaultPresetsByAgentKey.has(key)) {\n defaultPresetsByAgentKey.set(key, p);\n }\n }\n }\n\n for (const [detailId, agentRun] of agentRunsByDetailId.entries()) {\n const runSteps = stepsByRunKey.get(NormalizeUUID(agentRun.ID));\n if (!runSteps || runSteps.length === 0) {\n continue;\n }\n\n const completedSteps = runSteps.filter(s => s.Status === 'Completed');\n const chosenStep =\n completedSteps.length > 0\n ? completedSteps[completedSteps.length - 1]\n : runSteps[runSteps.length - 1];\n\n const isFailed = chosenStep.Status === 'Failed' && completedSteps.length === 0;\n const input = parseJsonSafe<ParsedHandoffInput>(chosenStep.InputData);\n const output = parseJsonSafe<ParsedHandoffOutput>(chosenStep.OutputData);\n\n const sourceDetail = messagesById.Get(detailId);\n const sourceAgentId = sourceDetail?.AgentID || agentRun.AgentID || null;\n const sourceFallbackName = sourceDetail?.Agent || agentRun.Agent || 'Sage';\n const sourceParticipant = resolveParticipant(sourceAgentId, sourceFallbackName, agents);\n\n const targetAgentId =\n chosenStep.TargetID || output?.HandoffToAgentID || null;\n const targetFallbackName =\n output?.TargetAgentName ||\n output?.AgentName ||\n input?.agentName ||\n chosenStep.StepName?.replace(/^Handoff:\\s*/i, '').trim() ||\n 'Agent';\n const targetParticipant = resolveParticipant(targetAgentId, targetFallbackName, agents);\n\n const explicitTargetDetailId = output?.TargetConversationDetailID ?? null;\n const targetDetail = isFailed\n ? undefined\n : (explicitTargetDetailId ? messagesById.Get(explicitTargetDetailId) : undefined) ??\n FindHandoffTargetDetail(detailId, targetParticipant.ID, messages);\n\n const resolvedTargetDetailId = targetDetail?.ID ?? explicitTargetDetailId ?? null;\n\n const status: AgentHandoffStatus = isFailed\n ? 'Failed'\n : DeriveHandoffStatus(\n 'Transferred',\n detailId,\n targetParticipant.ID,\n resolvedTargetDetailId,\n messages\n );\n\n let presetName: string | null = null;\n if (!isFailed) {\n if (output?.PresetName?.trim()) {\n presetName = output.PresetName.trim();\n } else if (output?.PresetID) {\n const matchedPreset = presetsById.Get(output.PresetID);\n presetName = matchedPreset?.DisplayName || matchedPreset?.Name || null;\n } else if (targetParticipant.ID) {\n const defaultPreset =\n defaultPresetsByAgentKey.get(NormalizeUUID(targetParticipant.ID)) ??\n AIEngineBase.Instance.GetDefaultAgentConfigurationPreset(targetParticipant.ID);\n presetName = defaultPreset?.DisplayName || defaultPreset?.Name || null;\n }\n }\n\n const brief = output?.Brief ?? input?.brief ?? null;\n const reason = output?.Reason ?? input?.reason ?? null;\n const failureReason = isFailed\n ? output?.RefusalReason || chosenStep.ErrorMessage || 'Transfer could not complete'\n : null;\n\n let hopChain: AgentHandoffParticipant[] | null = null;\n if (Array.isArray(output?.Chain) && output.Chain.length >= 2) {\n const chainParticipants = output.Chain.map(hopAgentId =>\n resolveParticipant(hopAgentId, null, agents)\n );\n chainParticipants.push(targetParticipant);\n hopChain = chainParticipants;\n }\n\n result.set(detailId, {\n SourceAgent: sourceParticipant,\n TargetAgent: targetParticipant,\n PresetName: presetName,\n Brief: brief,\n Reason: reason,\n Status: status,\n FailureReason: failureReason,\n HopChain: hopChain,\n TargetDetailId: resolvedTargetDetailId,\n });\n }\n\n return result;\n}\n\n/**\n * Resolves `MessageHandedOffFromInfo` for a target message row when its parent row handed off to it.\n */\nexport function ResolveHandedOffFromForMessage(\n message: MJConversationDetailEntity,\n handoffsByDetailId: ReadonlyMap<string, MessageHandoffInfo> | null | undefined\n): MessageHandedOffFromInfo | null {\n if (!handoffsByDetailId || handoffsByDetailId.size === 0 || message.Role !== 'AI') {\n return null;\n }\n\n if (message.ParentID) {\n const parentHandoff = LookupHandoffByDetailId(handoffsByDetailId, message.ParentID);\n if (\n parentHandoff &&\n parentHandoff.Status !== 'Failed' &&\n (!parentHandoff.TargetAgent.ID ||\n !message.AgentID ||\n UUIDsEqual(parentHandoff.TargetAgent.ID, message.AgentID))\n ) {\n return {\n SourceAgent: parentHandoff.SourceAgent,\n TargetAgent: parentHandoff.TargetAgent,\n PresetName: parentHandoff.PresetName ?? null,\n Brief: parentHandoff.Brief ?? null,\n Reason: parentHandoff.Reason ?? null,\n HopChain: parentHandoff.HopChain ?? null,\n SourceDetailId: message.ParentID,\n };\n }\n }\n\n for (const [sourceDetailId, handoff] of handoffsByDetailId.entries()) {\n if (\n handoff.Status !== 'Failed' &&\n handoff.TargetDetailId &&\n UUIDsEqual(handoff.TargetDetailId, message.ID)\n ) {\n return {\n SourceAgent: handoff.SourceAgent,\n TargetAgent: handoff.TargetAgent,\n PresetName: handoff.PresetName ?? null,\n Brief: handoff.Brief ?? null,\n Reason: handoff.Reason ?? null,\n HopChain: handoff.HopChain ?? null,\n SourceDetailId: sourceDetailId,\n };\n }\n }\n\n return null;\n}\n"]}
1
+ {"version":3,"file":"agent-handoff-map.js","sourceRoot":"","sources":["../../../src/lib/utils/agent-handoff-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAS5E,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,aAAa,EACb,UAAU,GACX,MAAM,wBAAwB,CAAC;AA6ChC,MAAM,CAAC,MAAM,mBAAmB,GAAa;IAC3C,IAAI;IACJ,YAAY;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gBAC5B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,IAAI;gBAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,IAAI;gBAClC,cAAc,EAAE,cAAc;aAC/B,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { IMetadataProvider, LogError, RunView } from '@memberjunction/core';\nimport {\n MJConversationDetailEntity,\n MJAIAgentConfigurationEntity,\n} from '@memberjunction/core-entities';\nimport {\n MJAIAgentEntityExtended,\n MJAIAgentRunEntityExtended,\n} from '@memberjunction/ai-core-plus';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport {\n CleanAndParseJSON,\n EscapeSQLString,\n IndexByUUID,\n NormalizeUUID,\n UUIDsEqual,\n} from '@memberjunction/global';\nimport {\n AgentHandoffParticipant,\n AgentHandoffStatus,\n MessageHandedOffFromInfo,\n MessageHandoffInfo,\n} from '../components/message/agent-handoff-card.component';\n\n/**\n * Simple row shape projected from `MJ: AI Agent Run Steps` for `StepType = 'Handoff'`.\n */\nexport interface HandoffRunStepRow {\n ID: string;\n AgentRunID: string;\n StepNumber?: number | null;\n StepName?: string | null;\n StepType?: string | null;\n Status?: string | null;\n TargetID?: string | null;\n InputData?: string | null;\n OutputData?: string | null;\n ErrorMessage?: string | null;\n}\n\ninterface ParsedHandoffInput {\n agentName?: string;\n brief?: string;\n reason?: string;\n}\n\ninterface ParsedHandoffOutput {\n HandoffToAgentID?: string;\n TargetAgentName?: string;\n AgentName?: string;\n TargetConversationDetailID?: string | null;\n PresetID?: string | null;\n PresetName?: string | null;\n PresetSource?: string | null;\n Brief?: string;\n Reason?: string;\n RefusalReason?: string;\n Hop?: number;\n Chain?: string[];\n}\n\nexport const HANDOFF_STEP_FIELDS: string[] = [\n 'ID',\n 'AgentRunID',\n 'StepNumber',\n 'StepName',\n 'StepType',\n 'Status',\n 'TargetID',\n 'InputData',\n 'OutputData',\n 'ErrorMessage',\n];\n\n/**\n * Loads `MJ: AI Agent Run Steps` rows with `StepType = 'Handoff'` for the given run IDs\n * in a single `RunView` query (`ResultType: 'simple'`, explicit `Fields`).\n */\nexport async function LoadHandoffStepsForRuns(\n provider: IMetadataProvider,\n runIds: readonly string[]\n): Promise<HandoffRunStepRow[]> {\n const uniqueIds = Array.from(\n new Set(runIds.map(id => id?.trim()).filter((id): id is string => !!id))\n );\n if (uniqueIds.length === 0) {\n return [];\n }\n try {\n const rv = RunView.FromMetadataProvider(provider);\n const quotedIds = uniqueIds.map(id => `'${EscapeSQLString(id)}'`).join(',');\n const result = await rv.RunView<HandoffRunStepRow>({\n EntityName: 'MJ: AI Agent Run Steps',\n ExtraFilter: `StepType = 'Handoff' AND AgentRunID IN (${quotedIds})`,\n Fields: HANDOFF_STEP_FIELDS,\n OrderBy: 'StepNumber ASC',\n ResultType: 'simple',\n });\n if (!result?.Success || !result.Results) {\n LogError(`LoadHandoffStepsForRuns failed: ${result?.ErrorMessage ?? 'Unknown RunView error'}`);\n return [];\n }\n return result.Results;\n } catch (error) {\n LogError('LoadHandoffStepsForRuns threw an error:', undefined, error);\n return [];\n }\n}\n\nfunction parseJsonSafe<T>(raw: string | null | undefined): T | null {\n if (!raw || !raw.trim()) {\n return null;\n }\n try {\n return JSON.parse(raw) as T;\n } catch {\n return CleanAndParseJSON<T>(raw, false);\n }\n}\n\nfunction resolveParticipant(\n agentId: string | null | undefined,\n fallbackName: string | null | undefined,\n agents: readonly MJAIAgentEntityExtended[]\n): AgentHandoffParticipant {\n const agentsById = IndexByUUID(agents);\n const match = agentId\n ? agentsById.Get(agentId)\n : fallbackName\n ? agents.find(a => a.Name?.trim().toLowerCase() === fallbackName.trim().toLowerCase())\n : undefined;\n\n if (match) {\n return {\n ID: match.ID,\n Name: match.Name || fallbackName || 'Agent',\n AvatarUrl: match.LogoURL || null,\n IconClass: match.IconClass || null,\n };\n }\n return {\n ID: agentId ?? null,\n Name: fallbackName?.trim() || 'Agent',\n AvatarUrl: null,\n IconClass: null,\n };\n}\n\n/**\n * Looks up a `MessageHandoffInfo` in a detail-ID map using case-insensitive UUID matching.\n */\nexport function LookupHandoffByDetailId(\n map: ReadonlyMap<string, MessageHandoffInfo> | null | undefined,\n detailId: string | null | undefined\n): MessageHandoffInfo | null {\n if (!map || !detailId) {\n return null;\n }\n const direct = map.get(detailId) ?? map.get(NormalizeUUID(detailId));\n if (direct) {\n return direct;\n }\n for (const [key, value] of map.entries()) {\n if (UUIDsEqual(key, detailId)) {\n return value;\n }\n }\n return null;\n}\n\n/**\n * Finds the target detail row in `messages` for a handoff originating from `sourceDetailId`.\n */\nexport function FindHandoffTargetDetail(\n sourceDetailId: string,\n targetAgentId: string | null | undefined,\n messages: readonly MJConversationDetailEntity[]\n): MJConversationDetailEntity | undefined {\n return messages.find(\n m =>\n m.Role === 'AI' &&\n !UUIDsEqual(m.ID, sourceDetailId) &&\n UUIDsEqual(m.ParentID, sourceDetailId) &&\n (!targetAgentId || !m.AgentID || UUIDsEqual(m.AgentID, targetAgentId))\n );\n}\n\n/**\n * Computes the effective `Status` of a handoff given the current loaded `messages`.\n */\nexport function DeriveHandoffStatus(\n baseStatus: AgentHandoffStatus,\n sourceDetailId: string,\n targetAgentId: string | null | undefined,\n targetDetailId: string | null | undefined,\n messages: readonly MJConversationDetailEntity[]\n): AgentHandoffStatus {\n if (baseStatus === 'Failed') {\n return 'Failed';\n }\n const targetDetail = targetDetailId\n ? messages.find(m => UUIDsEqual(m.ID, targetDetailId)) ??\n FindHandoffTargetDetail(sourceDetailId, targetAgentId, messages)\n : FindHandoffTargetDetail(sourceDetailId, targetAgentId, messages);\n if (!targetDetail || targetDetail.Status === 'In-Progress') {\n return 'Transferring';\n }\n return 'Transferred';\n}\n\n/**\n * Builds the `HandoffsByDetailId` map from loaded messages, agent runs, and `Handoff` run steps.\n */\nexport function BuildHandoffsByDetailId(params: {\n Messages: readonly MJConversationDetailEntity[];\n AgentRunsByDetailId: ReadonlyMap<string, MJAIAgentRunEntityExtended>;\n HandoffSteps: readonly HandoffRunStepRow[];\n Agents: readonly MJAIAgentEntityExtended[];\n Presets?: readonly MJAIAgentConfigurationEntity[];\n}): Map<string, MessageHandoffInfo> {\n const {\n Messages: messages,\n AgentRunsByDetailId: agentRunsByDetailId,\n HandoffSteps: handoffSteps,\n Agents: agents,\n Presets: presets = [],\n } = params;\n\n const result = new Map<string, MessageHandoffInfo>();\n if (handoffSteps.length === 0 || agentRunsByDetailId.size === 0) {\n return result;\n }\n\n const stepsByRunKey = new Map<string, HandoffRunStepRow[]>();\n for (const step of handoffSteps) {\n if (!step.AgentRunID) continue;\n if (step.StepType && step.StepType !== 'Handoff') continue;\n const key = NormalizeUUID(step.AgentRunID);\n const list = stepsByRunKey.get(key) ?? [];\n list.push(step);\n stepsByRunKey.set(key, list);\n }\n\n for (const list of stepsByRunKey.values()) {\n list.sort((a, b) => (a.StepNumber ?? 0) - (b.StepNumber ?? 0));\n }\n\n const messagesById = IndexByUUID(messages);\n const presetsById = IndexByUUID(presets);\n const defaultPresetsByAgentKey = new Map<string, MJAIAgentConfigurationEntity>();\n for (const p of presets) {\n if (p.Status === 'Active' && p.IsDefault && p.AgentID) {\n const key = NormalizeUUID(p.AgentID);\n if (!defaultPresetsByAgentKey.has(key)) {\n defaultPresetsByAgentKey.set(key, p);\n }\n }\n }\n\n for (const [detailId, agentRun] of agentRunsByDetailId.entries()) {\n const runSteps = stepsByRunKey.get(NormalizeUUID(agentRun.ID));\n if (!runSteps || runSteps.length === 0) {\n continue;\n }\n\n const completedSteps = runSteps.filter(s => s.Status === 'Completed');\n const chosenStep =\n completedSteps.length > 0\n ? completedSteps[completedSteps.length - 1]\n : runSteps[runSteps.length - 1];\n\n const isFailed = chosenStep.Status === 'Failed' && completedSteps.length === 0;\n const input = parseJsonSafe<ParsedHandoffInput>(chosenStep.InputData);\n const output = parseJsonSafe<ParsedHandoffOutput>(chosenStep.OutputData);\n\n const sourceDetail = messagesById.Get(detailId);\n const sourceAgentId = sourceDetail?.AgentID || agentRun.AgentID || null;\n const sourceFallbackName = sourceDetail?.Agent || agentRun.Agent || 'Assistant';\n const sourceParticipant = resolveParticipant(sourceAgentId, sourceFallbackName, agents);\n\n const targetAgentId =\n chosenStep.TargetID || output?.HandoffToAgentID || null;\n const targetFallbackName =\n output?.TargetAgentName ||\n output?.AgentName ||\n input?.agentName ||\n chosenStep.StepName?.replace(/^Handoff:\\s*/i, '').trim() ||\n 'Agent';\n const targetParticipant = resolveParticipant(targetAgentId, targetFallbackName, agents);\n\n const explicitTargetDetailId = output?.TargetConversationDetailID ?? null;\n const targetDetail = isFailed\n ? undefined\n : (explicitTargetDetailId ? messagesById.Get(explicitTargetDetailId) : undefined) ??\n FindHandoffTargetDetail(detailId, targetParticipant.ID, messages);\n\n const resolvedTargetDetailId = targetDetail?.ID ?? explicitTargetDetailId ?? null;\n\n const status: AgentHandoffStatus = isFailed\n ? 'Failed'\n : DeriveHandoffStatus(\n 'Transferred',\n detailId,\n targetParticipant.ID,\n resolvedTargetDetailId,\n messages\n );\n\n let presetName: string | null = null;\n if (!isFailed) {\n if (output?.PresetName?.trim()) {\n presetName = output.PresetName.trim();\n } else if (output?.PresetID) {\n const matchedPreset = presetsById.Get(output.PresetID);\n presetName = matchedPreset?.DisplayName || matchedPreset?.Name || null;\n } else if (targetParticipant.ID) {\n const defaultPreset =\n defaultPresetsByAgentKey.get(NormalizeUUID(targetParticipant.ID)) ??\n AIEngineBase.Instance.GetDefaultAgentConfigurationPreset(targetParticipant.ID);\n presetName = defaultPreset?.DisplayName || defaultPreset?.Name || null;\n }\n }\n\n const brief = output?.Brief ?? input?.brief ?? null;\n const reason = output?.Reason ?? input?.reason ?? null;\n const failureReason = isFailed\n ? output?.RefusalReason || chosenStep.ErrorMessage || 'Transfer could not complete'\n : null;\n\n let hopChain: AgentHandoffParticipant[] | null = null;\n if (Array.isArray(output?.Chain) && output.Chain.length >= 2) {\n const chainParticipants = output.Chain.map(hopAgentId =>\n resolveParticipant(hopAgentId, null, agents)\n );\n chainParticipants.push(targetParticipant);\n hopChain = chainParticipants;\n }\n\n result.set(detailId, {\n SourceAgent: sourceParticipant,\n TargetAgent: targetParticipant,\n PresetName: presetName,\n Brief: brief,\n Reason: reason,\n Status: status,\n FailureReason: failureReason,\n HopChain: hopChain,\n TargetDetailId: resolvedTargetDetailId,\n });\n }\n\n return result;\n}\n\n/**\n * Resolves `MessageHandedOffFromInfo` for a target message row when its parent row handed off to it.\n */\nexport function ResolveHandedOffFromForMessage(\n message: MJConversationDetailEntity,\n handoffsByDetailId: ReadonlyMap<string, MessageHandoffInfo> | null | undefined\n): MessageHandedOffFromInfo | null {\n if (!handoffsByDetailId || handoffsByDetailId.size === 0 || message.Role !== 'AI') {\n return null;\n }\n\n if (message.ParentID) {\n const parentHandoff = LookupHandoffByDetailId(handoffsByDetailId, message.ParentID);\n if (\n parentHandoff &&\n parentHandoff.Status !== 'Failed' &&\n (!parentHandoff.TargetAgent.ID ||\n !message.AgentID ||\n UUIDsEqual(parentHandoff.TargetAgent.ID, message.AgentID))\n ) {\n return {\n SourceAgent: parentHandoff.SourceAgent,\n TargetAgent: parentHandoff.TargetAgent,\n PresetName: parentHandoff.PresetName ?? null,\n Brief: parentHandoff.Brief ?? null,\n Reason: parentHandoff.Reason ?? null,\n HopChain: parentHandoff.HopChain ?? null,\n SourceDetailId: message.ParentID,\n };\n }\n }\n\n for (const [sourceDetailId, handoff] of handoffsByDetailId.entries()) {\n if (\n handoff.Status !== 'Failed' &&\n handoff.TargetDetailId &&\n UUIDsEqual(handoff.TargetDetailId, message.ID)\n ) {\n return {\n SourceAgent: handoff.SourceAgent,\n TargetAgent: handoff.TargetAgent,\n PresetName: handoff.PresetName ?? null,\n Brief: handoff.Brief ?? null,\n Reason: handoff.Reason ?? null,\n HopChain: handoff.HopChain ?? null,\n SourceDetailId: sourceDetailId,\n };\n }\n }\n\n return null;\n}\n"]}
@@ -174,7 +174,7 @@ export function MessageMentionsAgent(messageText, agentId, agentName) {
174
174
  */
175
175
  export function FindContinuityAgentMessage(messages, conversationManagerAgentId, options) {
176
176
  const normalizedManagerId = NormalizeUUID(conversationManagerAgentId ?? '');
177
- const managerName = options?.conversationManagerName ?? 'Sage';
177
+ const managerName = options?.conversationManagerName ?? null;
178
178
  const byId = new Map();
179
179
  for (const m of messages) {
180
180
  if (m.ID) {
@@ -1 +1 @@
1
- {"version":3,"file":"agent-turn-routing.js","sourceRoot":"","sources":["../../../src/lib/utils/agent-turn-routing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAuCnE;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAA+B;IAC9D,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC;WAC9C,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;WACtC,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;AACxD,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,gBAAgB,CAC5B,UAA+B,EAC/B,KAAqB,EACrB,YAA0C,EAC1C,kBAAgD,YAAY;IAE5D,MAAM,SAAS,GAAG,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;IACrG,IAAI,SAAS,EAAE,CAAC;QACZ,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IACpD,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,kBAAkB,EAAE,CAAC;QAClF,OAAO,IAAI,CAAC;IAChB,CAAC;IACD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C,mBAAmB,CAAC,GAAG,CAAC;gBAClC,CAAC,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,EAAE,0BAA0B,EAAE,WAAW,CAAC,CAAC;YACjF,IAAI,eAAe,EAAE,CAAC;gBAClB,OAAO,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACjC,QAAsB,EACtB,0BAAyC,EACzC,OAIC;IAED,OAAO,0BAA0B,CAAC,QAAQ,EAAE,0BAA0B,EAAE,OAAO,CAAC,EAAE,OAAO,IAAI,IAAI,CAAC;AACtG,CAAC","sourcesContent":["/**\n * @fileoverview Pure routing rules for an agent turn: which agent answers a message, and whether\n * any does. Kept free of Angular and of I/O so the whole matrix (reply mode × mention × allowed\n * list × route) is testable directly; `MessageInputComponent` supplies the candidates.\n *\n * @module @memberjunction/ng-conversations\n */\n\nimport { IsAgentAllowed } from '@memberjunction/ai-core-plus';\nimport { NormalizeUUID, UUIDsEqual } from '@memberjunction/global';\nimport type { AgentReplyMode, AgentTurnRoute, AgentTurnTarget } from '../models/agent-turn.model';\n\n/** The agent each route would use for one message, before the host's rules are applied. */\nexport interface AgentTurnCandidates {\n /** Agents the message tags, in the order they appear. */\n MentionedAgentIds: readonly string[];\n /** People the message tags (`@Person`). Addressing a person with no agent tag starts no agent turn. */\n MentionedUserIds?: readonly string[];\n /** The agent of the message this one replies to (`ParentID` -> `Role === 'AI'`), when set. */\n ReplyParentAgentId?: string | null;\n /** True when this message replies (`ParentID`) to another person's message (`Role === 'User'`). */\n ReplyParentIsHuman?: boolean;\n /** The last agent that answered in the conversation, other than the conversation manager. */\n ContinuityAgentId: string | null;\n /**\n * True when a routing decision put `ContinuityAgentId` there in place of the last agent that\n * answered (or confirmed it in a multi-person chat). The turn is then labelled `DecisionRouted`\n * instead of `Continuity`.\n */\n ContinuityDecisionRouted?: boolean;\n /** True when a routing decision in a multi-person chat concluded the message is addressed to a person. */\n DecisionAddressedToHuman?: boolean;\n /** The agent pinned on the conversation. */\n ConversationDefaultAgentId: string | null;\n /** The host's `DefaultAgentId` input. */\n HostDefaultAgentId: string | null;\n /** MJ's conversation manager agent. */\n ConversationManagerAgentId: string | null;\n}\n\n/** The host's rules for the chat. */\nexport interface AgentTurnRules {\n /** When a message starts a turn. */\n ReplyMode: AgentReplyMode;\n /** The agents that may answer. Null allows every agent. */\n AllowedAgentIDs: readonly string[] | null;\n}\n\n/**\n * True when a message with no allowed `@Agent` mention is intentionally addressed to a person\n * rather than an agent: it tags a person (`@Person`), replies (`ParentID`) to another person's\n * message, or was judged human-addressed by the routing decision.\n */\nexport function IsAddressedToHuman(candidates: AgentTurnCandidates): boolean {\n return (candidates.MentionedUserIds?.length ?? 0) > 0\n || Boolean(candidates.ReplyParentIsHuman)\n || Boolean(candidates.DecisionAddressedToHuman);\n}\n\n/**\n * Picks the agent and route for one message, or null when no turn starts.\n *\n * The order is MJ's: the first tagged agent the host allows, a direct thread reply (`ParentID`) to\n * a runnable agent, a continuity candidate that a routing decision chose (`DecisionRouted`), and\n * then (under `Always` only) the last agent that answered, the conversation's pinned agent, the\n * host's default agent, and the conversation manager. A message that tags a person, replies to\n * another person's message, or receives a `NoAgent` routing decision with no allowed `@Agent` tag\n * starts no turn. A candidate the host doesn't allow is skipped.\n *\n * A continuity or default candidate that `isKnownAgent` doesn't recognise falls back to the\n * conversation manager, as MJ always has, rather than to the next route. A tagged agent is taken\n * as tagged; a `ThreadReply` target must pass `isRunnableAgent`.\n *\n * @param candidates The agent each route would use.\n * @param rules The host's reply mode and allowed list.\n * @param isKnownAgent True when the agent exists in the client's agent catalog.\n * @param isRunnableAgent True when the current user can run the agent directly (defaults to `isKnownAgent`).\n */\nexport function ResolveAgentTurn(\n candidates: AgentTurnCandidates,\n rules: AgentTurnRules,\n isKnownAgent: (agentId: string) => boolean,\n isRunnableAgent: (agentId: string) => boolean = isKnownAgent\n): AgentTurnTarget | null {\n const mentioned = candidates.MentionedAgentIds.find(id => IsAgentAllowed(id, rules.AllowedAgentIDs));\n if (mentioned) {\n return { AgentId: mentioned, Route: 'Mention' };\n }\n if ((candidates.MentionedUserIds?.length ?? 0) > 0 || candidates.ReplyParentIsHuman) {\n return null;\n }\n const replyAgent = candidates.ReplyParentAgentId;\n if (replyAgent && IsAgentAllowed(replyAgent, rules.AllowedAgentIDs) && isRunnableAgent(replyAgent)) {\n return { AgentId: replyAgent, Route: 'ThreadReply' };\n }\n if (candidates.DecisionAddressedToHuman) {\n return null;\n }\n if (\n candidates.ContinuityDecisionRouted\n && candidates.ContinuityAgentId\n && IsAgentAllowed(candidates.ContinuityAgentId, rules.AllowedAgentIDs)\n && isKnownAgent(candidates.ContinuityAgentId)\n ) {\n return { AgentId: candidates.ContinuityAgentId, Route: 'DecisionRouted' };\n }\n if (rules.ReplyMode === 'MentionOnly') {\n return null;\n }\n\n const implicitRoutes: ReadonlyArray<[AgentTurnRoute, string | null]> = [\n [candidates.ContinuityDecisionRouted ? 'DecisionRouted' : 'Continuity', candidates.ContinuityAgentId],\n ['ConversationDefault', candidates.ConversationDefaultAgentId],\n ['HostDefault', candidates.HostDefaultAgentId],\n ];\n for (const [route, agentId] of implicitRoutes) {\n if (agentId && IsAgentAllowed(agentId, rules.AllowedAgentIDs)) {\n return isKnownAgent(agentId)\n ? { AgentId: agentId, Route: route }\n : conversationManagerTarget(candidates, rules);\n }\n }\n return conversationManagerTarget(candidates, rules);\n}\n\n/** The conversation manager's turn, when there is one and the host allows it. */\nfunction conversationManagerTarget(candidates: AgentTurnCandidates, rules: AgentTurnRules): AgentTurnTarget | null {\n const agentId = candidates.ConversationManagerAgentId;\n return agentId && IsAgentAllowed(agentId, rules.AllowedAgentIDs)\n ? { AgentId: agentId, Route: 'ConversationManager' }\n : null;\n}\n\n/** A task-graph step that runs an agent, as the conversation manager emits it. */\ninterface AgentTaskStep {\n kind: string;\n configuration?: { agentName?: string } | object;\n}\n\n/**\n * The agent names in a task graph that the host doesn't allow. The conversation manager can\n * answer with a multi-step workflow instead of a single delegation; each `Agent` step names the\n * agent that runs it, so the allowed list has to hold there too.\n *\n * @param steps The graph's tasks.\n * @param allowedAgentIDs The host's allowed list. Null allows every agent.\n * @param resolveAgentId Maps an agent name to its ID, or null when no such agent exists.\n * @returns The disallowed names, each once, in the order they appear. Empty when all are allowed.\n */\nexport function FindDisallowedTaskGraphAgents(\n steps: ReadonlyArray<AgentTaskStep>,\n allowedAgentIDs: readonly string[] | null,\n resolveAgentId: (agentName: string) => string | null\n): string[] {\n if (allowedAgentIDs == null) {\n return [];\n }\n const disallowed: string[] = [];\n for (const step of steps) {\n const agentName = step.kind === 'Agent' ? agentNameOf(step.configuration) : null;\n if (agentName && !IsAgentAllowed(resolveAgentId(agentName), allowedAgentIDs) && !disallowed.includes(agentName)) {\n disallowed.push(agentName);\n }\n }\n return disallowed;\n}\n\n/** The `agentName` of an Agent step's configuration, when it has one. */\nfunction agentNameOf(configuration: AgentTaskStep['configuration']): string | null {\n if (configuration && 'agentName' in configuration && typeof configuration.agentName === 'string') {\n return configuration.agentName;\n }\n return null;\n}\n\n/** Minimal shape of a conversation detail row inspected when resolving continuity routing. */\nexport interface ContinuityHistoryMessage {\n ID?: string | null;\n Role?: string | null;\n AgentID?: string | null;\n ParentID?: string | null;\n Message?: string | null;\n}\n\n/**\n * Returns true when a user message explicitly `@`-mentions the given agent (by JSON mention token\n * `@{...\"id\":\"<agentId>\"...}`, JSON token `@{...\"name\":\"<agentName>\"...}`, or plain `@<agentName>`).\n */\nexport function MessageMentionsAgent(\n messageText: string | null | undefined,\n agentId: string | null | undefined,\n agentName?: string | null\n): boolean {\n if (!messageText) {\n return false;\n }\n const normalizedId = NormalizeUUID(agentId ?? '');\n const normalizedName = (agentName ?? '').trim().toLowerCase();\n\n let cursor = 0;\n while (cursor < messageText.length) {\n const openIdx = messageText.indexOf('@{', cursor);\n if (openIdx === -1) {\n break;\n }\n const closeIdx = messageText.indexOf('}', openIdx + 2);\n if (closeIdx === -1) {\n break;\n }\n const body = messageText.slice(openIdx + 2, closeIdx);\n cursor = closeIdx + 1;\n if (!body) {\n continue;\n }\n try {\n const parsed = JSON.parse(`{${body}}`) as { type?: string; id?: string; name?: string };\n if (parsed.type && parsed.type !== 'agent') {\n continue;\n }\n if (normalizedId && typeof parsed.id === 'string' && UUIDsEqual(parsed.id, normalizedId)) {\n return true;\n }\n if (normalizedName && typeof parsed.name === 'string' && parsed.name.trim().toLowerCase() === normalizedName) {\n return true;\n }\n } catch {\n // Ignore malformed token and continue scanning\n }\n }\n\n if (normalizedName) {\n const escaped = normalizedName.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const plainMention = new RegExp(`(?:^|\\\\s)@${escaped}(?=\\\\b|\\\\s|$)`, 'i');\n if (plainMention.test(messageText)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Walks conversation history from newest to oldest to find the most recent non-manager `AI` message\n * that owns continuity for the next turn.\n *\n * Stops and returns `null` (returning ownership to the conversation manager) when:\n * - A `User` message explicitly `@`-mentions the conversation manager and no non-manager `AI`\n * message has replied since (e.g. the user said `@Sage …` and Sage answered directly).\n * - An `AI` message from the conversation manager was handed back from another `AI` message\n * (`ParentID` references an `AI` message, or the immediately preceding row is a non-manager `AI`\n * message in the same turn).\n */\nexport function FindContinuityAgentMessage<T extends ContinuityHistoryMessage>(\n messages: readonly T[],\n conversationManagerAgentId: string | null,\n options?: {\n conversationManagerName?: string | null;\n isWithinFloor?: (msg: T) => boolean;\n userMentionsManager?: (msg: T) => boolean;\n }\n): T | null {\n const normalizedManagerId = NormalizeUUID(conversationManagerAgentId ?? '');\n const managerName = options?.conversationManagerName ?? 'Sage';\n const byId = new Map<string, T>();\n for (const m of messages) {\n if (m.ID) {\n byId.set(NormalizeUUID(m.ID), m);\n }\n }\n\n for (let i = messages.length - 1; i >= 0; i--) {\n const msg = messages[i];\n if (options?.isWithinFloor && !options.isWithinFloor(msg)) {\n continue;\n }\n if (msg.Role === 'AI' && msg.AgentID) {\n const isManager = normalizedManagerId.length > 0 && UUIDsEqual(msg.AgentID, normalizedManagerId);\n if (!isManager) {\n return msg;\n }\n // Conversation manager AI row: check if it is a handback from another AI row\n const parent = msg.ParentID ? byId.get(NormalizeUUID(msg.ParentID)) : undefined;\n if (parent && parent.Role === 'AI') {\n return null;\n }\n const prev = i > 0 ? messages[i - 1] : undefined;\n if (\n prev &&\n prev.Role === 'AI' &&\n prev.AgentID &&\n !UUIDsEqual(prev.AgentID, normalizedManagerId)\n ) {\n return null;\n }\n continue;\n }\n if (msg.Role === 'User') {\n const mentionsManager = options?.userMentionsManager\n ? options.userMentionsManager(msg)\n : MessageMentionsAgent(msg.Message, conversationManagerAgentId, managerName);\n if (mentionsManager) {\n return null;\n }\n }\n }\n return null;\n}\n\n/**\n * Convenience wrapper around {@link FindContinuityAgentMessage} returning only the `AgentID`.\n */\nexport function FindContinuityAgentId<T extends ContinuityHistoryMessage>(\n messages: readonly T[],\n conversationManagerAgentId: string | null,\n options?: {\n conversationManagerName?: string | null;\n isWithinFloor?: (msg: T) => boolean;\n userMentionsManager?: (msg: T) => boolean;\n }\n): string | null {\n return FindContinuityAgentMessage(messages, conversationManagerAgentId, options)?.AgentID ?? null;\n}\n\n"]}
1
+ {"version":3,"file":"agent-turn-routing.js","sourceRoot":"","sources":["../../../src/lib/utils/agent-turn-routing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAuCnE;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAA+B;IAC9D,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC;WAC9C,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;WACtC,OAAO,CAAC,UAAU,CAAC,wB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C;YAChF,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;gBACjC,OAAO,IAAI,CAAC;YAChB,CAAC;YACD,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACjD,IACI,IAAI;gBACJ,IAAI,CAAC,IAAI,KAAK,IAAI;gBAClB,IAAI,CAAC,OAAO;gBACZ,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,mBAAmB,CAAC,EAChD,CAAC;gBACC,OAAO,IAAI,CAAC;YAChB,CAAC;YACD,SAAS;QACb,CAAC;QACD,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YACtB,MAAM,eAAe,GAAG,OAAO,EAAE,mBAAmB;gBAChD,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,CAAC;gBAClC,CAAC,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,EAAE,0BAA0B,EAAE,WAAW,CAAC,CAAC;YACjF,IAAI,eAAe,EAAE,CAAC;gBAClB,OAAO,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACjC,QAAsB,EACtB,0BAAyC,EACzC,OAIC;IAED,OAAO,0BAA0B,CAAC,QAAQ,EAAE,0BAA0B,EAAE,OAAO,CAAC,EAAE,OAAO,IAAI,IAAI,CAAC;AACtG,CAAC","sourcesContent":["/**\n * @fileoverview Pure routing rules for an agent turn: which agent answers a message, and whether\n * any does. Kept free of Angular and of I/O so the whole matrix (reply mode × mention × allowed\n * list × route) is testable directly; `MessageInputComponent` supplies the candidates.\n *\n * @module @memberjunction/ng-conversations\n */\n\nimport { IsAgentAllowed } from '@memberjunction/ai-core-plus';\nimport { NormalizeUUID, UUIDsEqual } from '@memberjunction/global';\nimport type { AgentReplyMode, AgentTurnRoute, AgentTurnTarget } from '../models/agent-turn.model';\n\n/** The agent each route would use for one message, before the host's rules are applied. */\nexport interface AgentTurnCandidates {\n /** Agents the message tags, in the order they appear. */\n MentionedAgentIds: readonly string[];\n /** People the message tags (`@Person`). Addressing a person with no agent tag starts no agent turn. */\n MentionedUserIds?: readonly string[];\n /** The agent of the message this one replies to (`ParentID` -> `Role === 'AI'`), when set. */\n ReplyParentAgentId?: string | null;\n /** True when this message replies (`ParentID`) to another person's message (`Role === 'User'`). */\n ReplyParentIsHuman?: boolean;\n /** The last agent that answered in the conversation, other than the conversation manager. */\n ContinuityAgentId: string | null;\n /**\n * True when a routing decision put `ContinuityAgentId` there in place of the last agent that\n * answered (or confirmed it in a multi-person chat). The turn is then labelled `DecisionRouted`\n * instead of `Continuity`.\n */\n ContinuityDecisionRouted?: boolean;\n /** True when a routing decision in a multi-person chat concluded the message is addressed to a person. */\n DecisionAddressedToHuman?: boolean;\n /** The agent pinned on the conversation. */\n ConversationDefaultAgentId: string | null;\n /** The host's `DefaultAgentId` input. */\n HostDefaultAgentId: string | null;\n /** MJ's conversation manager agent. */\n ConversationManagerAgentId: string | null;\n}\n\n/** The host's rules for the chat. */\nexport interface AgentTurnRules {\n /** When a message starts a turn. */\n ReplyMode: AgentReplyMode;\n /** The agents that may answer. Null allows every agent. */\n AllowedAgentIDs: readonly string[] | null;\n}\n\n/**\n * True when a message with no allowed `@Agent` mention is intentionally addressed to a person\n * rather than an agent: it tags a person (`@Person`), replies (`ParentID`) to another person's\n * message, or was judged human-addressed by the routing decision.\n */\nexport function IsAddressedToHuman(candidates: AgentTurnCandidates): boolean {\n return (candidates.MentionedUserIds?.length ?? 0) > 0\n || Boolean(candidates.ReplyParentIsHuman)\n || Boolean(candidates.DecisionAddressedToHuman);\n}\n\n/**\n * Picks the agent and route for one message, or null when no turn starts.\n *\n * The order is MJ's: the first tagged agent the host allows, a direct thread reply (`ParentID`) to\n * a runnable agent, a continuity candidate that a routing decision chose (`DecisionRouted`), and\n * then (under `Always` only) the last agent that answered, the conversation's pinned agent, the\n * host's default agent, and the conversation manager. A message that tags a person, replies to\n * another person's message, or receives a `NoAgent` routing decision with no allowed `@Agent` tag\n * starts no turn. A candidate the host doesn't allow is skipped.\n *\n * A continuity or default candidate that `isKnownAgent` doesn't recognise falls back to the\n * conversation manager, as MJ always has, rather than to the next route. A tagged agent is taken\n * as tagged; a `ThreadReply` target must pass `isRunnableAgent`.\n *\n * @param candidates The agent each route would use.\n * @param rules The host's reply mode and allowed list.\n * @param isKnownAgent True when the agent exists in the client's agent catalog.\n * @param isRunnableAgent True when the current user can run the agent directly (defaults to `isKnownAgent`).\n */\nexport function ResolveAgentTurn(\n candidates: AgentTurnCandidates,\n rules: AgentTurnRules,\n isKnownAgent: (agentId: string) => boolean,\n isRunnableAgent: (agentId: string) => boolean = isKnownAgent\n): AgentTurnTarget | null {\n const mentioned = candidates.MentionedAgentIds.find(id => IsAgentAllowed(id, rules.AllowedAgentIDs));\n if (mentioned) {\n return { AgentId: mentioned, Route: 'Mention' };\n }\n if ((candidates.MentionedUserIds?.length ?? 0) > 0 || candidates.ReplyParentIsHuman) {\n return null;\n }\n const replyAgent = candidates.ReplyParentAgentId;\n if (replyAgent && IsAgentAllowed(replyAgent, rules.AllowedAgentIDs) && isRunnableAgent(replyAgent)) {\n return { AgentId: replyAgent, Route: 'ThreadReply' };\n }\n if (candidates.DecisionAddressedToHuman) {\n return null;\n }\n if (\n candidates.ContinuityDecisionRouted\n && candidates.ContinuityAgentId\n && IsAgentAllowed(candidates.ContinuityAgentId, rules.AllowedAgentIDs)\n && isKnownAgent(candidates.ContinuityAgentId)\n ) {\n return { AgentId: candidates.ContinuityAgentId, Route: 'DecisionRouted' };\n }\n if (rules.ReplyMode === 'MentionOnly') {\n return null;\n }\n\n const implicitRoutes: ReadonlyArray<[AgentTurnRoute, string | null]> = [\n [candidates.ContinuityDecisionRouted ? 'DecisionRouted' : 'Continuity', candidates.ContinuityAgentId],\n ['ConversationDefault', candidates.ConversationDefaultAgentId],\n ['HostDefault', candidates.HostDefaultAgentId],\n ];\n for (const [route, agentId] of implicitRoutes) {\n if (agentId && IsAgentAllowed(agentId, rules.AllowedAgentIDs)) {\n return isKnownAgent(agentId)\n ? { AgentId: agentId, Route: route }\n : conversationManagerTarget(candidates, rules);\n }\n }\n return conversationManagerTarget(candidates, rules);\n}\n\n/** The conversation manager's turn, when there is one and the host allows it. */\nfunction conversationManagerTarget(candidates: AgentTurnCandidates, rules: AgentTurnRules): AgentTurnTarget | null {\n const agentId = candidates.ConversationManagerAgentId;\n return agentId && IsAgentAllowed(agentId, rules.AllowedAgentIDs)\n ? { AgentId: agentId, Route: 'ConversationManager' }\n : null;\n}\n\n/** A task-graph step that runs an agent, as the conversation manager emits it. */\ninterface AgentTaskStep {\n kind: string;\n configuration?: { agentName?: string } | object;\n}\n\n/**\n * The agent names in a task graph that the host doesn't allow. The conversation manager can\n * answer with a multi-step workflow instead of a single delegation; each `Agent` step names the\n * agent that runs it, so the allowed list has to hold there too.\n *\n * @param steps The graph's tasks.\n * @param allowedAgentIDs The host's allowed list. Null allows every agent.\n * @param resolveAgentId Maps an agent name to its ID, or null when no such agent exists.\n * @returns The disallowed names, each once, in the order they appear. Empty when all are allowed.\n */\nexport function FindDisallowedTaskGraphAgents(\n steps: ReadonlyArray<AgentTaskStep>,\n allowedAgentIDs: readonly string[] | null,\n resolveAgentId: (agentName: string) => string | null\n): string[] {\n if (allowedAgentIDs == null) {\n return [];\n }\n const disallowed: string[] = [];\n for (const step of steps) {\n const agentName = step.kind === 'Agent' ? agentNameOf(step.configuration) : null;\n if (agentName && !IsAgentAllowed(resolveAgentId(agentName), allowedAgentIDs) && !disallowed.includes(agentName)) {\n disallowed.push(agentName);\n }\n }\n return disallowed;\n}\n\n/** The `agentName` of an Agent step's configuration, when it has one. */\nfunction agentNameOf(configuration: AgentTaskStep['configuration']): string | null {\n if (configuration && 'agentName' in configuration && typeof configuration.agentName === 'string') {\n return configuration.agentName;\n }\n return null;\n}\n\n/** Minimal shape of a conversation detail row inspected when resolving continuity routing. */\nexport interface ContinuityHistoryMessage {\n ID?: string | null;\n Role?: string | null;\n AgentID?: string | null;\n ParentID?: string | null;\n Message?: string | null;\n}\n\n/**\n * Returns true when a user message explicitly `@`-mentions the given agent (by JSON mention token\n * `@{...\"id\":\"<agentId>\"...}`, JSON token `@{...\"name\":\"<agentName>\"...}`, or plain `@<agentName>`).\n */\nexport function MessageMentionsAgent(\n messageText: string | null | undefined,\n agentId: string | null | undefined,\n agentName?: string | null\n): boolean {\n if (!messageText) {\n return false;\n }\n const normalizedId = NormalizeUUID(agentId ?? '');\n const normalizedName = (agentName ?? '').trim().toLowerCase();\n\n let cursor = 0;\n while (cursor < messageText.length) {\n const openIdx = messageText.indexOf('@{', cursor);\n if (openIdx === -1) {\n break;\n }\n const closeIdx = messageText.indexOf('}', openIdx + 2);\n if (closeIdx === -1) {\n break;\n }\n const body = messageText.slice(openIdx + 2, closeIdx);\n cursor = closeIdx + 1;\n if (!body) {\n continue;\n }\n try {\n const parsed = JSON.parse(`{${body}}`) as { type?: string; id?: string; name?: string };\n if (parsed.type && parsed.type !== 'agent') {\n continue;\n }\n if (normalizedId && typeof parsed.id === 'string' && UUIDsEqual(parsed.id, normalizedId)) {\n return true;\n }\n if (normalizedName && typeof parsed.name === 'string' && parsed.name.trim().toLowerCase() === normalizedName) {\n return true;\n }\n } catch {\n // Ignore malformed token and continue scanning\n }\n }\n\n if (normalizedName) {\n const escaped = normalizedName.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n const plainMention = new RegExp(`(?:^|\\\\s)@${escaped}(?=\\\\b|\\\\s|$)`, 'i');\n if (plainMention.test(messageText)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Walks conversation history from newest to oldest to find the most recent non-manager `AI` message\n * that owns continuity for the next turn.\n *\n * Stops and returns `null` (returning ownership to the conversation manager) when:\n * - A `User` message explicitly `@`-mentions the conversation manager and no non-manager `AI`\n * message has replied since (e.g. the user said `@Sage …` and Sage answered directly).\n * - An `AI` message from the conversation manager was handed back from another `AI` message\n * (`ParentID` references an `AI` message, or the immediately preceding row is a non-manager `AI`\n * message in the same turn).\n */\nexport function FindContinuityAgentMessage<T extends ContinuityHistoryMessage>(\n messages: readonly T[],\n conversationManagerAgentId: string | null,\n options?: {\n conversationManagerName?: string | null;\n isWithinFloor?: (msg: T) => boolean;\n userMentionsManager?: (msg: T) => boolean;\n }\n): T | null {\n const normalizedManagerId = NormalizeUUID(conversationManagerAgentId ?? '');\n const managerName = options?.conversationManagerName ?? null;\n const byId = new Map<string, T>();\n for (const m of messages) {\n if (m.ID) {\n byId.set(NormalizeUUID(m.ID), m);\n }\n }\n\n for (let i = messages.length - 1; i >= 0; i--) {\n const msg = messages[i];\n if (options?.isWithinFloor && !options.isWithinFloor(msg)) {\n continue;\n }\n if (msg.Role === 'AI' && msg.AgentID) {\n const isManager = normalizedManagerId.length > 0 && UUIDsEqual(msg.AgentID, normalizedManagerId);\n if (!isManager) {\n return msg;\n }\n // Conversation manager AI row: check if it is a handback from another AI row\n const parent = msg.ParentID ? byId.get(NormalizeUUID(msg.ParentID)) : undefined;\n if (parent && parent.Role === 'AI') {\n return null;\n }\n const prev = i > 0 ? messages[i - 1] : undefined;\n if (\n prev &&\n prev.Role === 'AI' &&\n prev.AgentID &&\n !UUIDsEqual(prev.AgentID, normalizedManagerId)\n ) {\n return null;\n }\n continue;\n }\n if (msg.Role === 'User') {\n const mentionsManager = options?.userMentionsManager\n ? options.userMentionsManager(msg)\n : MessageMentionsAgent(msg.Message, conversationManagerAgentId, managerName);\n if (mentionsManager) {\n return null;\n }\n }\n }\n return null;\n}\n\n/**\n * Convenience wrapper around {@link FindContinuityAgentMessage} returning only the `AgentID`.\n */\nexport function FindContinuityAgentId<T extends ContinuityHistoryMessage>(\n messages: readonly T[],\n conversationManagerAgentId: string | null,\n options?: {\n conversationManagerName?: string | null;\n isWithinFloor?: (msg: T) => boolean;\n userMentionsManager?: (msg: T) => boolean;\n }\n): string | null {\n return FindContinuityAgentMessage(messages, conversationManagerAgentId, options)?.AgentID ?? null;\n}\n\n"]}
@@ -46,6 +46,7 @@ export * from './lib/services/edge-ai/edge-agent-pre-discovery.service';
46
46
  export * from './lib/components/workspace/conversation-workspace.component';
47
47
  export * from './lib/components/navigation/conversation-navigation.component';
48
48
  export * from './lib/components/sidebar/conversation-sidebar.component';
49
+ export * from './lib/components/sidebar/my-agents-section.component';
49
50
  export * from './lib/components/sidebar/routines-section.component';
50
51
  export * from './lib/components/conversation/conversation-list.component';
51
52
  export * from './lib/components/conversation/conversation-chat-area.component';
@@ -75,6 +76,7 @@ export * from './lib/components/task/tasks-full-view.component';
75
76
  export * from './lib/components/tasks/task-widget.component';
76
77
  export * from './lib/components/agent/agent-process-panel.component';
77
78
  export * from './lib/components/agent/active-agent-indicator.component';
79
+ export * from './lib/components/agent/agent-instance-editor-modal.component';
78
80
  export * from './lib/components/active-tasks/active-tasks-panel.component';
79
81
  export * from './lib/components/share/share-modal.component';
80
82
  export * from './lib/components/notification/notification-badge.component';
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAKA,cAAc,4BAA4B,CAAC;AAG3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAI9C,cAAc,8BAA8B,CAAC;AAE7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAGlD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD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3E,cAAc,0DAA0D,CAAC;AACzE,cAAc,sEAAsE,CAAC;AAErF,cAAc,0DAA0D,CAAC;AACzE,cAAc,oEAAoE,CAAC;AAKnF,cAAc,6EAA6E,CAAC;AAC5F,cAAc,8EAA8E,CAAC;AAC7F,cAAc,oEAAoE,CAAC;AACnF,cAAc,sEAAsE,CAAC;AACrF,cAAc,2EAA2E,CAAC;AAC1F,cAAc,wEAAwE,CAAC;AACvF,cAAc,oFAAoF,CAAC;AACnG,cAAc,+EAA+E,CAAC;AAC9F,cAAc,kGAAkG,CAAC;AACjH,cAAc,uEAAuE,CAAC;AACtF,cAAc,wEAAwE,CAAC;AACvF,cAAc,yEAAyE,CAAC;AACxF,cAAc,4FAA4F,CAAC;AAE3G,cAAc,kFAAkF,CAAC;AACjG,cAAc,qCAAqC,CAAC"}
@@ -66,6 +66,7 @@ export * from './lib/services/edge-ai/edge-agent-pre-discovery.service';
66
66
  export * from './lib/components/workspace/conversation-workspace.component';
67
67
  export * from './lib/components/navigation/conversation-navigation.component';
68
68
  export * from './lib/components/sidebar/conversation-sidebar.component';
69
+ export * from './lib/components/sidebar/my-agents-section.component';
69
70
  export * from './lib/components/sidebar/routines-section.component';
70
71
  export * from './lib/components/conversation/conversation-list.component';
71
72
  export * from './lib/components/conversation/conversation-chat-area.component';
@@ -101,6 +102,7 @@ export * from './lib/components/task/tasks-full-view.component';
101
102
  export * from './lib/components/tasks/task-widget.component';
102
103
  export * from './lib/components/agent/agent-process-panel.component';
103
104
  export * from './lib/components/agent/active-agent-indicator.component';
105
+ export * from './lib/components/agent/agent-instance-editor-modal.component';
104
106
  export * from './lib/components/active-tasks/active-tasks-panel.component';
105
107
  export * from './lib/components/share/share-modal.component';
106
108
  export * from './lib/components/notification/notification-badge.component';
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,SAAS;AACT,cAAc,4BAA4B,CAAC;AAE3C,SAAS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E,CAAC;AACnF,cAAc,sEAAsE,CAAC;AACrF,cAAc,2EAA2E,CAAC;AAC1F,cAAc,wEAAwE,CAAC;AACvF,cAAc,oFAAoF,CAAC;AACnG,cAAc,+EAA+E,CAAC;AAC9F,cAAc,kGAAkG,CAAC;AACjH,cAAc,uEAAuE,CAAC;AACtF,cAAc,wEAAwE,CAAC;AACvF,cAAc,yEAAyE,CAAC;AACxF,cAAc,4FAA4F,CAAC;AAC3G,8FAA8F;AAC9F,cAAc,kFAAkF,CAAC;AACjG,cAAc,qCAAqC,CAAC","sourcesContent":["/*\n * Public API Surface of @memberjunction/ng-conversations\n */\n\n// Module\nexport * from './lib/conversations.module';\n\n// Models\nexport * from './lib/models/conversation-state.model';\nexport * from './lib/models/notification.model';\nexport * from './lib/models/lazy-artifact-info';\nexport * from './lib/models/navigation-request.model';\n// Host rules for an agent turn: reply mode, routes, and the host turn handler contract\nexport * from './lib/models/agent-turn.model';\nexport * from './lib/utils/agent-turn-routing';\nexport * from './lib/utils/agent-handoff-map';\n// Decision routing for an unmentioned message (EnableDecisionRouting, on by default)\n// NOTE: the routing decision's builders and types, and IsAgentAllowed, live in\n// @memberjunction/ai-core-plus — import them from there directly.\nexport * from './lib/utils/decision-routing';\n// Fork rules: the delete guard and the open view (Main or one fork)\nexport * from './lib/utils/conversation-branching';\nexport * from './lib/utils/conversation-forks';\nexport * from './lib/utils/thread-replies';\nexport * from './lib/utils/agent-failure-display';\n\n// Services - State\nexport * from './lib/services/data-cache.service';\nexport * from './lib/services/artifact-state.service';\nexport * from './lib/services/agent-state.service';\nexport * from './lib/services/conversation-liveness-dom.service';\nexport * from './lib/services/conversation-agent.service';\nexport * from './lib/services/active-tasks.service';\nexport * from './lib/services/conversation-tasks-filter';\nexport * from './lib/services/conversation-streaming.service';\nexport * from './lib/services/dialog.service';\nexport * from './lib/services/export.service';\nexport * from './lib/services/notification.service';\nexport * from './lib/services/toast.service';\nexport * from './lib/services/mention-parser.service';\n// AI-aware mention suggestion engine (BaseSingleton — use MentionAutocompleteService.Instance).\n// NOTE: the generic MentionSuggestion TYPE lives in @memberjunction/ng-composer — import it\n// from there directly (no re-exports between packages).\nexport * from './lib/services/mention-autocomplete.service';\nexport * from './lib/services/collection-permission.service';\nexport * from './lib/services/artifact-permission.service';\nexport * from './lib/services/artifact-use-tracking.service';\nexport * from './lib/services/collection-state.service';\nexport * from './lib/services/library-creation.service';\nexport * from './lib/services/conversation-attachment.service';\nexport * from './lib/services/graphql-attachment-blob-store';\nexport * from './lib/services/ui-command-handler.service';\nexport * from './lib/services/conversation-bridge.service';\nexport * from './lib/services/realtime-session.service';\nexport * from './lib/services/browser-realtime-media-host';\n// NOTE: the realtime session types (RealtimeCaption, RealtimeConnectionState,\n// RealtimeSessionRunOptions, …), the channel plugin base class, and the delegation-result\n// parser now live in `@memberjunction/realtime-runtime`. Import them from there directly —\n// MJ does not re-export across package boundaries.\nexport * from './lib/services/realtime-pairing';\nexport * from './lib/services/user-authorization';\nexport * from './lib/services/realtime-sessions-adapter';\nexport * from './lib/services/realtime-session-review.service';\n// Shared lazy ONNX/WASM Edge AI worker host + Stage 6C.1 pre-discovery service\nexport * from './lib/services/edge-ai/edge-ai-protocol';\nexport * from './lib/services/edge-ai/edge-ai-worker-host';\nexport * from './lib/services/edge-ai/edge-agent-pre-discovery.service';\n\n// Components\nexport * from './lib/components/workspace/conversation-workspace.component';\nexport * from './lib/components/navigation/conversation-navigation.component';\nexport * from './lib/components/sidebar/conversation-sidebar.component';\nexport * from './lib/components/sidebar/routines-section.component';\nexport * from './lib/components/conversation/conversation-list.component';\nexport * from './lib/components/conversation/conversation-chat-area.component';\nexport * from './lib/components/conversation/conversation-remote-browser-controller';\nexport * from './lib/components/conversation/conversation-empty-state.component';\nexport * from './lib/components/message/message-item.component';\nexport * from './lib/components/message/agent-handoff-card.component';\nexport * from './lib/components/message/message-list.component';\nexport * from './lib/components/message/message-input.component';\n// AI-aware composer wrapper (mj-ai-composer): mj-message-input-box + the three AI trigger\n// plugins built in, proxying the input box's full inputs/outputs/methods surface.\nexport * from './lib/components/composer/ai-composer.component';\n// Composer trigger-provider plugins ('@' / '#' / '/') — ClassFactory-registered; also\n// directly instantiable for explicit provider lists.\nexport * from './lib/composer-plugins/base-conversation-mention.provider';\nexport * from './lib/composer-plugins/agent-mention.provider';\nexport * from './lib/composer-plugins/record-mention.provider';\nexport * from './lib/composer-plugins/skill-command.provider';\nexport * from './lib/composer-plugins/load-composer-plugins';\n// NOTE: MessageInputBoxComponent, MentionEditorComponent (+ PendingAttachment), and\n// MentionDropdownComponent live in @memberjunction/ng-composer — import from there directly.\nexport * from './lib/components/message/conversation-message-rating.component';\nexport * from './lib/components/collection/collection-tree.component';\nexport * from './lib/components/collection/collection-view.component';\nexport * from './lib/components/collection/collections-full-view.component';\nexport * from './lib/components/collection/collection-artifact-card.component';\nexport * from './lib/components/collection/artifact-collection-picker-modal.component';\nexport * from './lib/components/collection/collection-share-modal.component';\nexport * from './lib/components/artifact/artifact-share-modal.component';\nexport * from './lib/components/project/project-selector.component';\nexport * from './lib/components/project/project-form-modal.component';\nexport * from './lib/components/task/tasks-full-view.component';\nexport * from './lib/components/tasks/task-widget.component';\nexport * from './lib/components/agent/agent-process-panel.component';\nexport * from './lib/components/agent/active-agent-indicator.component';\nexport * from './lib/components/active-tasks/active-tasks-panel.component';\nexport * from './lib/components/share/share-modal.component';\nexport * from './lib/components/notification/notification-badge.component';\nexport * from './lib/components/notification/activity-indicator.component';\nexport * from './lib/components/toast/toast.component';\nexport * from './lib/components/global-tasks/global-tasks-panel.component';\nexport * from './lib/components/attachment/image-viewer.component';\nexport * from './lib/components/overlay/chat-overlay.component';\n\n// Components declared AND exported by ConversationsModule but previously missing\n// from public-api. They are used in the templates of exported components (e.g.\n// mj-conversation-chat-area), so a consumer app compiling in Angular's\n// local-compilation / HMR mode fails to build (NG3004: \"Unable to import\n// component … not exported from @memberjunction/ng-conversations\") unless every\n// module-exported component is importable from the package entry point.\nexport * from './lib/components/collection/artifact-create-modal.component';\nexport * from './lib/components/collection/collection-form-modal.component';\nexport * from './lib/components/conversation/conversation-agent-picker.component';\nexport * from './lib/components/conversation/conversation-mode-picker.component';\nexport * from './lib/components/conversation/pinned-messages-panel.component';\nexport * from './lib/components/conversation/forks-popover.component';\nexport * from './lib/components/dialogs/input-dialog.component';\nexport * from './lib/components/dialogs/rating-dialog.component';\nexport * from './lib/components/export/export-modal.component';\nexport * from './lib/components/library/library-full-view.component';\nexport * from './lib/components/library/library.models';\nexport * from './lib/components/library/library-workspace.component';\nexport * from './lib/components/library/library-remote-drive-pane.component';\nexport * from './lib/components/library/library-create-dialog.component';\nexport * from './lib/components/members/members-modal.component';\nexport * from './lib/components/message/actionable-commands.component';\nexport * from './lib/components/message/workflow-plan-card.component';\nexport * from './lib/components/search/search-panel.component';\nexport * from './lib/components/shared/user-picker.component';\nexport * from './lib/components/tasks/tasks-dropdown.component';\nexport * from './lib/directives/search-shortcut.directive';\n// SearchResult / SearchResultType are the payload of SearchPanelComponent's\n// ResultSelected output, so consumers cannot type a handler without them.\nexport type { SearchResult, SearchResultType } from './lib/services/search.service';\n\n// PR 2c — Widget extension surface (slots, events, design tokens)\nexport * from './lib/services/conversations-runtime-bootstrap.service';\nexport * from './lib/directives/chat-slot.directive';\nexport * from './lib/components/slots/slot-interfaces';\nexport * from './lib/components/slots/mj-chat-empty-state-default.component';\nexport * from './lib/components/slots/mj-chat-agent-presence-default.component';\nexport * from './lib/components/slots/mj-chat-header-default.component';\nexport * from './lib/components/slots/mj-chat-message-extra-default.component';\nexport * from './lib/components/slots/mj-chat-demonstration-surface-default.component';\nexport * from './lib/components/slots/mj-chat-message-bubble-default.component';\nexport * from './lib/events/chat-events';\n\n// Realtime / voice (PR #2787 — co-agent realtime sessions)\nexport * from './lib/components/realtime/realtime-agent-picker.component';\n// Real-time \"call mode\" overlay + its componentized parts\nexport * from './lib/components/realtime/realtime-session-overlay.component';\nexport * from './lib/components/realtime/realtime-session-state';\nexport * from './lib/components/realtime/realtime-agent-banner.component';\nexport * from './lib/components/realtime/realtime-agent-orb.component';\nexport * from './lib/components/realtime/realtime-session-thread.component';\nexport * from './lib/components/realtime/realtime-delegation-card.component';\nexport * from './lib/components/realtime/realtime-activity-rail.component';\nexport * from './lib/components/realtime/realtime-surface-tabs.component';\nexport * from './lib/components/realtime/realtime-surface-tabs.model';\nexport * from './lib/components/realtime/realtime-surface-stage.model';\nexport * from './lib/components/realtime/realtime-surface-placement-prefs';\nexport * from './lib/components/realtime/realtime-surface-panel-prefs';\nexport * from './lib/components/realtime/realtime-disclosure';\nexport * from './lib/components/realtime/realtime-audio-visuals';\nexport * from './lib/components/realtime/realtime-composer.component';\nexport * from './lib/components/realtime/realtime-channel-strip.component';\n// Conversation-timeline collapse of past realtime sessions (one card per session) + its pure grouping pass\nexport * from './lib/components/realtime/realtime-session-timeline-card.component';\nexport * from './lib/utils/realtime-session-timeline';\n// Pluggable interactive-channel contract (registry-resolved client plugins) + pane host\nexport * from './lib/components/realtime/channels/client-context-channel';\nexport * from './lib/components/realtime/channels/realtime-channel-pane.component';\nexport * from './lib/components/realtime/channels/channel-onboarding-panel.component';\n// Live whiteboard channel plugin + artifact viewer (thin consumers of the generic board).\n// NOTE: the whiteboard itself (engine, tools, components, export builders) lives in\n// @memberjunction/ng-whiteboard — import board types/components from there directly.\nexport * from './lib/components/realtime/whiteboard/whiteboard-channel';\nexport * from './lib/components/realtime/whiteboard/whiteboard-channel-config';\nexport * from './lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component';\n// Remote Browser channel plugin (client-direct, server-hosted browser) + its live surface + tools.\nexport * from './lib/components/realtime/remote-browser/remote-browser-channel';\nexport * from './lib/components/realtime/remote-browser/remote-browser-surface.component';\nexport * from './lib/components/realtime/remote-browser/remote-browser-tools';\nexport * from './lib/components/realtime/remote-browser/remote-browser-audio-player';\n// Media channel plugin (Tabs-layout media display surface) + its state engine, tools, and surface.\nexport * from './lib/components/realtime/media/media-channel';\nexport * from './lib/components/realtime/media/media-channel-state';\nexport * from './lib/components/realtime/media/media-channel-tools';\nexport * from './lib/components/realtime/media/realtime-media-surface.component';\n// Identity Verification channel (generic, opt-in): prove an email address mid-call. State machine + surface.\nexport * from './lib/components/realtime/identity-verification/identity-verification-channel';\nexport * from './lib/components/realtime/identity-verification/identity-verification-model';\nexport * from './lib/components/realtime/identity-verification/identity-verification-surface.component';\n// Camera and Screen Share channels (opt-in, on demand): the agent asks, the user turns the capture on. State + surface.\nexport * from './lib/components/realtime/capture/realtime-capture-channel';\nexport * from './lib/components/realtime/capture/realtime-capture-model';\nexport * from './lib/components/realtime/capture/realtime-capture-surface.component';\n// The Avatar channel (in every call, inert without video): the agent's video on its surface.\nexport * from './lib/components/realtime/avatar/realtime-avatar-channel';\nexport * from './lib/components/realtime/avatar/realtime-avatar-surface.component';\n\n// Interactive Component channel: hosts any component artifact (mj-react-component) next to the call, with a\n// contract derived from the component's own spec. The pure parts (spec -> contract, config, data-state bounding,\n// instance engine, artifact source port) are framework-free; the channel and surface are the Angular layer.\nexport * from './lib/components/realtime/interactive-component/interactive-component-types';\nexport * from './lib/components/realtime/interactive-component/interactive-component-config';\nexport * from './lib/components/realtime/interactive-component/component-contract';\nexport * from './lib/components/realtime/interactive-component/component-data-state';\nexport * from './lib/components/realtime/interactive-component/component-instance-engine';\nexport * from './lib/components/realtime/interactive-component/component-spec-content';\nexport * from './lib/components/realtime/interactive-component/run-view-component-artifact-source';\nexport * from './lib/components/realtime/interactive-component/interactive-component-channel';\nexport * from './lib/components/realtime/interactive-component/realtime-interactive-component-surface.component';\nexport * from './lib/components/realtime/artifact-workspace/artifact-workspace-types';\nexport * from './lib/components/realtime/artifact-workspace/artifact-workspace-engine';\nexport * from './lib/components/realtime/artifact-workspace/artifact-workspace-channel';\nexport * from './lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component';\n// Time-aligned Evidence Playback component (recorded session audio synced to the transcript).\nexport * from './lib/components/realtime/evidence-playback/realtime-evidence-playback.component';\nexport * from './lib/services/composer-draft-store';\n"]}
1
+ {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,SAAS;AACT,cAAc,4BAA4B,CAAC;AAE3C,SAAS;AACT,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,uFAAuF;AACvF,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,qFAAqF;AACrF,+EAA+E;AAC/E,kEAAkE;AAClE,cAAc,8BAA8B,CAAC;AAC7C,oEAAoE;AACpE,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAElD,mBAAmB;AACnB,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AACnD,cAAc,kDAAkD,CAAC;AACjE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,gGAAgG;AAChG,4FAA4F;AAC5F,wDAAwD;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAA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AAc,sEAAsE,CAAC;AACrF,6FAA6F;AAC7F,cAAc,0DAA0D,CAAC;AACzE,cAAc,oEAAoE,CAAC;AAEnF,4GAA4G;AAC5G,iHAAiH;AACjH,4GAA4G;AAC5G,cAAc,6EAA6E,CAAC;AAC5F,cAAc,8EAA8E,CAAC;AAC7F,cAAc,oEAAoE,CAAC;AACnF,cAAc,sEAAsE,CAAC;AACrF,cAAc,2EAA2E,CAAC;AAC1F,cAAc,wEAAwE,CAAC;AACvF,cAAc,oFAAoF,CAAC;AACnG,cAAc,+EAA+E,CAAC;AAC9F,cAAc,kGAAkG,CAAC;AACjH,cAAc,uEAAuE,CAAC;AACtF,cAAc,wEAAwE,CAAC;AACvF,cAAc,yEAAyE,CAAC;AACxF,cAAc,4FAA4F,CAAC;AAC3G,8FAA8F;AAC9F,cAAc,kFAAkF,CAAC;AACjG,cAAc,qCAAqC,CAAC","sourcesContent":["/*\n * Public API Surface of @memberjunction/ng-conversations\n */\n\n// Module\nexport * from './lib/conversations.module';\n\n// Models\nexport * from './lib/models/conversation-state.model';\nexport * from './lib/models/notification.model';\nexport * from './lib/models/lazy-artifact-info';\nexport * from './lib/models/navigation-request.model';\n// Host rules for an agent turn: reply mode, routes, and the host turn handler contract\nexport * from './lib/models/agent-turn.model';\nexport * from './lib/utils/agent-turn-routing';\nexport * from './lib/utils/agent-handoff-map';\n// Decision routing for an unmentioned message (EnableDecisionRouting, on by default)\n// NOTE: the routing decision's builders and types, and IsAgentAllowed, live in\n// @memberjunction/ai-core-plus — import them from there directly.\nexport * from './lib/utils/decision-routing';\n// Fork rules: the delete guard and the open view (Main or one fork)\nexport * from './lib/utils/conversation-branching';\nexport * from './lib/utils/conversation-forks';\nexport * from './lib/utils/thread-replies';\nexport * from './lib/utils/agent-failure-display';\n\n// Services - State\nexport * from './lib/services/data-cache.service';\nexport * from './lib/services/artifact-state.service';\nexport * from './lib/services/agent-state.service';\nexport * from './lib/services/conversation-liveness-dom.service';\nexport * from './lib/services/conversation-agent.service';\nexport * from './lib/services/active-tasks.service';\nexport * from './lib/services/conversation-tasks-filter';\nexport * from './lib/services/conversation-streaming.service';\nexport * from './lib/services/dialog.service';\nexport * from './lib/services/export.service';\nexport * from './lib/services/notification.service';\nexport * from './lib/services/toast.service';\nexport * from './lib/services/mention-parser.service';\n// AI-aware mention suggestion engine (BaseSingleton — use MentionAutocompleteService.Instance).\n// NOTE: the generic MentionSuggestion TYPE lives in @memberjunction/ng-composer — import it\n// from there directly (no re-exports between packages).\nexport * from './lib/services/mention-autocomplete.service';\nexport * from './lib/services/collection-permission.service';\nexport * from './lib/services/artifact-permission.service';\nexport * from './lib/services/artifact-use-tracking.service';\nexport * from './lib/services/collection-state.service';\nexport * from './lib/services/library-creation.service';\nexport * from './lib/services/conversation-attachment.service';\nexport * from './lib/services/graphql-attachment-blob-store';\nexport * from './lib/services/ui-command-handler.service';\nexport * from './lib/services/conversation-bridge.service';\nexport * from './lib/services/realtime-session.service';\nexport * from './lib/services/browser-realtime-media-host';\n// NOTE: the realtime session types (RealtimeCaption, RealtimeConnectionState,\n// RealtimeSessionRunOptions, …), the channel plugin base class, and the delegation-result\n// parser now live in `@memberjunction/realtime-runtime`. Import them from there directly —\n// MJ does not re-export across package boundaries.\nexport * from './lib/services/realtime-pairing';\nexport * from './lib/services/user-authorization';\nexport * from './lib/services/realtime-sessions-adapter';\nexport * from './lib/services/realtime-session-review.service';\n// Shared lazy ONNX/WASM Edge AI worker host + Stage 6C.1 pre-discovery service\nexport * from './lib/services/edge-ai/edge-ai-protocol';\nexport * from './lib/services/edge-ai/edge-ai-worker-host';\nexport * from './lib/services/edge-ai/edge-agent-pre-discovery.service';\n\n// Components\nexport * from './lib/components/workspace/conversation-workspace.component';\nexport * from './lib/components/navigation/conversation-navigation.component';\nexport * from './lib/components/sidebar/conversation-sidebar.component';\nexport * from './lib/components/sidebar/my-agents-section.component';\nexport * from './lib/components/sidebar/routines-section.component';\nexport * from './lib/components/conversation/conversation-list.component';\nexport * from './lib/components/conversation/conversation-chat-area.component';\nexport * from './lib/components/conversation/conversation-remote-browser-controller';\nexport * from './lib/components/conversation/conversation-empty-state.component';\nexport * from './lib/components/message/message-item.component';\nexport * from './lib/components/message/agent-handoff-card.component';\nexport * from './lib/components/message/message-list.component';\nexport * from './lib/components/message/message-input.component';\n// AI-aware composer wrapper (mj-ai-composer): mj-message-input-box + the three AI trigger\n// plugins built in, proxying the input box's full inputs/outputs/methods surface.\nexport * from './lib/components/composer/ai-composer.component';\n// Composer trigger-provider plugins ('@' / '#' / '/') — ClassFactory-registered; also\n// directly instantiable for explicit provider lists.\nexport * from './lib/composer-plugins/base-conversation-mention.provider';\nexport * from './lib/composer-plugins/agent-mention.provider';\nexport * from './lib/composer-plugins/record-mention.provider';\nexport * from './lib/composer-plugins/skill-command.provider';\nexport * from './lib/composer-plugins/load-composer-plugins';\n// NOTE: MessageInputBoxComponent, MentionEditorComponent (+ PendingAttachment), and\n// MentionDropdownComponent live in @memberjunction/ng-composer — import from there directly.\nexport * from './lib/components/message/conversation-message-rating.component';\nexport * from './lib/components/collection/collection-tree.component';\nexport * from './lib/components/collection/collection-view.component';\nexport * from './lib/components/collection/collections-full-view.component';\nexport * from './lib/components/collection/collection-artifact-card.component';\nexport * from './lib/components/collection/artifact-collection-picker-modal.component';\nexport * from './lib/components/collection/collection-share-modal.component';\nexport * from './lib/components/artifact/artifact-share-modal.component';\nexport * from './lib/components/project/project-selector.component';\nexport * from './lib/components/project/project-form-modal.component';\nexport * from './lib/components/task/tasks-full-view.component';\nexport * from './lib/components/tasks/task-widget.component';\nexport * from './lib/components/agent/agent-process-panel.component';\nexport * from './lib/components/agent/active-agent-indicator.component';\nexport * from './lib/components/agent/agent-instance-editor-modal.component';\nexport * from './lib/components/active-tasks/active-tasks-panel.component';\nexport * from './lib/components/share/share-modal.component';\nexport * from './lib/components/notification/notification-badge.component';\nexport * from './lib/components/notification/activity-indicator.component';\nexport * from './lib/components/toast/toast.component';\nexport * from './lib/components/global-tasks/global-tasks-panel.component';\nexport * from './lib/components/attachment/image-viewer.component';\nexport * from './lib/components/overlay/chat-overlay.component';\n\n// Components declared AND exported by ConversationsModule but previously missing\n// from public-api. They are used in the templates of exported components (e.g.\n// mj-conversation-chat-area), so a consumer app compiling in Angular's\n// local-compilation / HMR mode fails to build (NG3004: \"Unable to import\n// component … not exported from @memberjunction/ng-conversations\") unless every\n// module-exported component is importable from the package entry point.\nexport * from './lib/components/collection/artifact-create-modal.component';\nexport * from './lib/components/collection/collection-form-modal.component';\nexport * from './lib/components/conversation/conversation-agent-picker.component';\nexport * from './lib/components/conversation/conversation-mode-picker.component';\nexport * from './lib/components/conversation/pinned-messages-panel.component';\nexport * from './lib/components/conversation/forks-popover.component';\nexport * from './lib/components/dialogs/input-dialog.component';\nexport * from './lib/components/dialogs/rating-dialog.component';\nexport * from './lib/components/export/export-modal.component';\nexport * from './lib/components/library/library-full-view.component';\nexport * from './lib/components/library/library.models';\nexport * from './lib/components/library/library-workspace.component';\nexport * from './lib/components/library/library-remote-drive-pane.component';\nexport * from './lib/components/library/library-create-dialog.component';\nexport * from './lib/components/members/members-modal.component';\nexport * from './lib/components/message/actionable-commands.component';\nexport * from './lib/components/message/workflow-plan-card.component';\nexport * from './lib/components/search/search-panel.component';\nexport * from './lib/components/shared/user-picker.component';\nexport * from './lib/components/tasks/tasks-dropdown.component';\nexport * from './lib/directives/search-shortcut.directive';\n// SearchResult / SearchResultType are the payload of SearchPanelComponent's\n// ResultSelected output, so consumers cannot type a handler without them.\nexport type { SearchResult, SearchResultType } from './lib/services/search.service';\n\n// PR 2c — Widget extension surface (slots, events, design tokens)\nexport * from './lib/services/conversations-runtime-bootstrap.service';\nexport * from './lib/directives/chat-slot.directive';\nexport * from './lib/components/slots/slot-interfaces';\nexport * from './lib/components/slots/mj-chat-empty-state-default.component';\nexport * from './lib/components/slots/mj-chat-agent-presence-default.component';\nexport * from './lib/components/slots/mj-chat-header-default.component';\nexport * from './lib/components/slots/mj-chat-message-extra-default.component';\nexport * from './lib/components/slots/mj-chat-demonstration-surface-default.component';\nexport * from './lib/components/slots/mj-chat-message-bubble-default.component';\nexport * from './lib/events/chat-events';\n\n// Realtime / voice (PR #2787 — co-agent realtime sessions)\nexport * from './lib/components/realtime/realtime-agent-picker.component';\n// Real-time \"call mode\" overlay + its componentized parts\nexport * from './lib/components/realtime/realtime-session-overlay.component';\nexport * from './lib/components/realtime/realtime-session-state';\nexport * from './lib/components/realtime/realtime-agent-banner.component';\nexport * from './lib/components/realtime/realtime-agent-orb.component';\nexport * from './lib/components/realtime/realtime-session-thread.component';\nexport * from './lib/components/realtime/realtime-delegation-card.component';\nexport * from './lib/components/realtime/realtime-activity-rail.component';\nexport * from './lib/components/realtime/realtime-surface-tabs.component';\nexport * from './lib/components/realtime/realtime-surface-tabs.model';\nexport * from './lib/components/realtime/realtime-surface-stage.model';\nexport * from './lib/components/realtime/realtime-surface-placement-prefs';\nexport * from './lib/components/realtime/realtime-surface-panel-prefs';\nexport * from './lib/components/realtime/realtime-disclosure';\nexport * from './lib/components/realtime/realtime-audio-visuals';\nexport * from './lib/components/realtime/realtime-composer.component';\nexport * from './lib/components/realtime/realtime-channel-strip.component';\n// Conversation-timeline collapse of past realtime sessions (one card per session) + its pure grouping pass\nexport * from './lib/components/realtime/realtime-session-timeline-card.component';\nexport * from './lib/utils/realtime-session-timeline';\n// Pluggable interactive-channel contract (registry-resolved client plugins) + pane host\nexport * from './lib/components/realtime/channels/client-context-channel';\nexport * from './lib/components/realtime/channels/realtime-channel-pane.component';\nexport * from './lib/components/realtime/channels/channel-onboarding-panel.component';\n// Live whiteboard channel plugin + artifact viewer (thin consumers of the generic board).\n// NOTE: the whiteboard itself (engine, tools, components, export builders) lives in\n// @memberjunction/ng-whiteboard — import board types/components from there directly.\nexport * from './lib/components/realtime/whiteboard/whiteboard-channel';\nexport * from './lib/components/realtime/whiteboard/whiteboard-channel-config';\nexport * from './lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component';\n// Remote Browser channel plugin (client-direct, server-hosted browser) + its live surface + tools.\nexport * from './lib/components/realtime/remote-browser/remote-browser-channel';\nexport * from './lib/components/realtime/remote-browser/remote-browser-surface.component';\nexport * from './lib/components/realtime/remote-browser/remote-browser-tools';\nexport * from './lib/components/realtime/remote-browser/remote-browser-audio-player';\n// Media channel plugin (Tabs-layout media display surface) + its state engine, tools, and surface.\nexport * from './lib/components/realtime/media/media-channel';\nexport * from './lib/components/realtime/media/media-channel-state';\nexport * from './lib/components/realtime/media/media-channel-tools';\nexport * from './lib/components/realtime/media/realtime-media-surface.component';\n// Identity Verification channel (generic, opt-in): prove an email address mid-call. State machine + surface.\nexport * from './lib/components/realtime/identity-verification/identity-verification-channel';\nexport * from './lib/components/realtime/identity-verification/identity-verification-model';\nexport * from './lib/components/realtime/identity-verification/identity-verification-surface.component';\n// Camera and Screen Share channels (opt-in, on demand): the agent asks, the user turns the capture on. State + surface.\nexport * from './lib/components/realtime/capture/realtime-capture-channel';\nexport * from './lib/components/realtime/capture/realtime-capture-model';\nexport * from './lib/components/realtime/capture/realtime-capture-surface.component';\n// The Avatar channel (in every call, inert without video): the agent's video on its surface.\nexport * from './lib/components/realtime/avatar/realtime-avatar-channel';\nexport * from './lib/components/realtime/avatar/realtime-avatar-surface.component';\n\n// Interactive Component channel: hosts any component artifact (mj-react-component) next to the call, with a\n// contract derived from the component's own spec. The pure parts (spec -> contract, config, data-state bounding,\n// instance engine, artifact source port) are framework-free; the channel and surface are the Angular layer.\nexport * from './lib/components/realtime/interactive-component/interactive-component-types';\nexport * from './lib/components/realtime/interactive-component/interactive-component-config';\nexport * from './lib/components/realtime/interactive-component/component-contract';\nexport * from './lib/components/realtime/interactive-component/component-data-state';\nexport * from './lib/components/realtime/interactive-component/component-instance-engine';\nexport * from './lib/components/realtime/interactive-component/component-spec-content';\nexport * from './lib/components/realtime/interactive-component/run-view-component-artifact-source';\nexport * from './lib/components/realtime/interactive-component/interactive-component-channel';\nexport * from './lib/components/realtime/interactive-component/realtime-interactive-component-surface.component';\nexport * from './lib/components/realtime/artifact-workspace/artifact-workspace-types';\nexport * from './lib/components/realtime/artifact-workspace/artifact-workspace-engine';\nexport * from './lib/components/realtime/artifact-workspace/artifact-workspace-channel';\nexport * from './lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component';\n// Time-aligned Evidence Playback component (recorded session audio synced to the transcript).\nexport * from './lib/components/realtime/evidence-playback/realtime-evidence-playback.component';\nexport * from './lib/services/composer-draft-store';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-conversations",
3
- "version": "6.3.0-edge.1",
3
+ "version": "6.3.0-edge.2",
4
4
  "description": "MemberJunction: Conversation, Collection, and Artifact management components for any Angular application",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -14,7 +14,7 @@
14
14
  "@angular/compiler": "21.2.22",
15
15
  "@angular/compiler-cli": "21.2.22",
16
16
  "@fortawesome/fontawesome-free": "6.7.2",
17
- "@memberjunction/ng-test-utils": "6.3.0-edge.1",
17
+ "@memberjunction/ng-test-utils": "6.3.0-edge.2",
18
18
  "esbuild": "0.28.1",
19
19
  "sass": "^1.97.3",
20
20
  "vitest": "^4.0.18"
@@ -28,41 +28,41 @@
28
28
  "@angular/platform-browser": "^21.2.22"
29
29
  },
30
30
  "dependencies": {
31
- "@memberjunction/ai": "6.3.0-edge.1",
32
- "@memberjunction/ai-agent-client": "6.3.0-edge.1",
33
- "@memberjunction/ai-core-plus": "6.3.0-edge.1",
34
- "@memberjunction/ai-engine-base": "6.3.0-edge.1",
35
- "@memberjunction/ai-realtime-client": "6.3.0-edge.1",
36
- "@memberjunction/ai-vectors-memory": "6.3.0-edge.1",
37
- "@memberjunction/conversations-runtime": "6.3.0-edge.1",
38
- "@memberjunction/core": "6.3.0-edge.1",
39
- "@memberjunction/core-entities": "6.3.0-edge.1",
40
- "@memberjunction/global": "6.3.0-edge.1",
41
- "@memberjunction/graphql-dataprovider": "6.3.0-edge.1",
42
- "@memberjunction/interactive-component-types": "6.3.0-edge.1",
43
- "@memberjunction/ng-agent-client": "6.3.0-edge.1",
44
- "@memberjunction/ng-artifacts": "6.3.0-edge.1",
45
- "@memberjunction/ng-base-forms": "6.3.0-edge.1",
46
- "@memberjunction/ng-base-types": "6.3.0-edge.1",
47
- "@memberjunction/ng-code-editor": "6.3.0-edge.1",
48
- "@memberjunction/ng-composer": "6.3.0-edge.1",
49
- "@memberjunction/ng-container-directives": "6.3.0-edge.1",
50
- "@memberjunction/ng-forms": "6.3.0-edge.1",
51
- "@memberjunction/ng-markdown": "6.3.0-edge.1",
52
- "@memberjunction/ng-media-player": "6.3.0-edge.1",
53
- "@memberjunction/ng-notifications": "6.3.0-edge.1",
54
- "@memberjunction/ng-react": "6.3.0-edge.1",
55
- "@memberjunction/ng-realtime-channels": "6.3.0-edge.1",
56
- "@memberjunction/ng-realtime-media": "6.3.0-edge.1",
57
- "@memberjunction/ng-resource-permissions": "6.3.0-edge.1",
58
- "@memberjunction/ng-shared-generic": "6.3.0-edge.1",
59
- "@memberjunction/ng-task-graph-editor": "6.3.0-edge.1",
60
- "@memberjunction/ng-tasks": "6.3.0-edge.1",
61
- "@memberjunction/ng-testing": "6.3.0-edge.1",
62
- "@memberjunction/ng-ui-components": "6.3.0-edge.1",
63
- "@memberjunction/ng-user-routines": "6.3.0-edge.1",
64
- "@memberjunction/ng-whiteboard": "6.3.0-edge.1",
65
- "@memberjunction/realtime-runtime": "6.3.0-edge.1",
31
+ "@memberjunction/ai": "6.3.0-edge.2",
32
+ "@memberjunction/ai-agent-client": "6.3.0-edge.2",
33
+ "@memberjunction/ai-core-plus": "6.3.0-edge.2",
34
+ "@memberjunction/ai-engine-base": "6.3.0-edge.2",
35
+ "@memberjunction/ai-realtime-client": "6.3.0-edge.2",
36
+ "@memberjunction/ai-vectors-memory": "6.3.0-edge.2",
37
+ "@memberjunction/conversations-runtime": "6.3.0-edge.2",
38
+ "@memberjunction/core": "6.3.0-edge.2",
39
+ "@memberjunction/core-entities": "6.3.0-edge.2",
40
+ "@memberjunction/global": "6.3.0-edge.2",
41
+ "@memberjunction/graphql-dataprovider": "6.3.0-edge.2",
42
+ "@memberjunction/interactive-component-types": "6.3.0-edge.2",
43
+ "@memberjunction/ng-agent-client": "6.3.0-edge.2",
44
+ "@memberjunction/ng-artifacts": "6.3.0-edge.2",
45
+ "@memberjunction/ng-base-forms": "6.3.0-edge.2",
46
+ "@memberjunction/ng-base-types": "6.3.0-edge.2",
47
+ "@memberjunction/ng-code-editor": "6.3.0-edge.2",
48
+ "@memberjunction/ng-composer": "6.3.0-edge.2",
49
+ "@memberjunction/ng-container-directives": "6.3.0-edge.2",
50
+ "@memberjunction/ng-forms": "6.3.0-edge.2",
51
+ "@memberjunction/ng-markdown": "6.3.0-edge.2",
52
+ "@memberjunction/ng-media-player": "6.3.0-edge.2",
53
+ "@memberjunction/ng-notifications": "6.3.0-edge.2",
54
+ "@memberjunction/ng-react": "6.3.0-edge.2",
55
+ "@memberjunction/ng-realtime-channels": "6.3.0-edge.2",
56
+ "@memberjunction/ng-realtime-media": "6.3.0-edge.2",
57
+ "@memberjunction/ng-resource-permissions": "6.3.0-edge.2",
58
+ "@memberjunction/ng-shared-generic": "6.3.0-edge.2",
59
+ "@memberjunction/ng-task-graph-editor": "6.3.0-edge.2",
60
+ "@memberjunction/ng-tasks": "6.3.0-edge.2",
61
+ "@memberjunction/ng-testing": "6.3.0-edge.2",
62
+ "@memberjunction/ng-ui-components": "6.3.0-edge.2",
63
+ "@memberjunction/ng-user-routines": "6.3.0-edge.2",
64
+ "@memberjunction/ng-whiteboard": "6.3.0-edge.2",
65
+ "@memberjunction/realtime-runtime": "6.3.0-edge.2",
66
66
  "angular-split": "^20.0.0",
67
67
  "rxjs": "^7.8.2",
68
68
  "tslib": "^2.8.1"