@opencxh/domain 1.81.0 → 1.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/ai-conversation/index.d.ts +1 -0
- package/dist/entities/ai-conversation/types.d.ts +25 -0
- package/dist/entities/ai-message/types.d.ts +2 -2
- package/dist/entities/ai-profile/types.d.ts +6 -0
- package/dist/entities/interaction/types.d.ts +7 -0
- package/dist/entities/mcp/types.d.ts +79 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -3
- package/dist/platform/api.d.ts +2 -0
- package/dist/platform/communication.d.ts +25 -0
- package/dist/platform/context.d.ts +22 -0
- package/dist/platform/ui.d.ts +5 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type AIConversationVisibility = "shared" | "personal";
|
|
2
|
+
/**
|
|
3
|
+
* A single assistant conversation (thread). Grouped into the tools-panel tabs by
|
|
4
|
+
* `scopeKey`; messages, runs and thread-continuity key on the conversation id.
|
|
5
|
+
*
|
|
6
|
+
* - `shared` → tied to the scope, visible to everyone who may see that scope
|
|
7
|
+
* (e.g. the interaction's team). `ownerUserId` is unset.
|
|
8
|
+
* - `personal` → private to `ownerUserId`, even within a shared scope.
|
|
9
|
+
*
|
|
10
|
+
* The scope-owning app declares whether a scope's anchor conversation is shared.
|
|
11
|
+
*/
|
|
12
|
+
export interface AIConversation {
|
|
13
|
+
id: string;
|
|
14
|
+
organizationId: string;
|
|
15
|
+
/** "workspace:<userId>" | "interaction:<id>" | future kinds like "contact:<id>". */
|
|
16
|
+
scopeKey: string;
|
|
17
|
+
visibility: AIConversationVisibility;
|
|
18
|
+
/** Set when `visibility === "personal"`. */
|
|
19
|
+
ownerUserId?: string;
|
|
20
|
+
title: string;
|
|
21
|
+
/** "auto" = the scope-anchor conversation; "user" = opened via the + button. */
|
|
22
|
+
origin: "auto" | "user";
|
|
23
|
+
createdAt: number;
|
|
24
|
+
updatedAt: number;
|
|
25
|
+
}
|
|
@@ -10,7 +10,7 @@ export interface AIMessageOutput {
|
|
|
10
10
|
export interface AIMessage {
|
|
11
11
|
id: string;
|
|
12
12
|
organizationId: string;
|
|
13
|
-
|
|
13
|
+
conversationId: string;
|
|
14
14
|
sender: "user" | "assistant" | "system";
|
|
15
15
|
timestamp: number;
|
|
16
16
|
input: AIMessageInput;
|
|
@@ -27,7 +27,7 @@ export interface AIMessage {
|
|
|
27
27
|
* systemPrompt/enabledTools from it.
|
|
28
28
|
*/
|
|
29
29
|
export interface AIMessageAskPayload {
|
|
30
|
-
|
|
30
|
+
conversationId: string;
|
|
31
31
|
input: AIMessageInput;
|
|
32
32
|
profileId: string;
|
|
33
33
|
previousExternalId?: string;
|
|
@@ -15,4 +15,10 @@ export interface AIProfile<T extends Record<string, any> = Record<string, any>>
|
|
|
15
15
|
predefinedPrompts?: PredefinedPrompt[];
|
|
16
16
|
/** Namespaced tool names this profile may use (default: none enabled). */
|
|
17
17
|
enabledTools?: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Whether the acting user's PERSONAL MCP tools (their own per-user connections)
|
|
20
|
+
* are available on this profile, on top of the admin-curated `enabledTools`.
|
|
21
|
+
* "off" (default) = strictly the curated set; "allow" = also include personal.
|
|
22
|
+
*/
|
|
23
|
+
personalTools?: "off" | "allow";
|
|
18
24
|
}
|
|
@@ -15,6 +15,13 @@ export interface InteractionSearchQuery {
|
|
|
15
15
|
scheme?: string;
|
|
16
16
|
resource?: string;
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Free-text term. Matched case-insensitively (substring) in-memory over the
|
|
20
|
+
* interaction's title, remoteParty/participants (resource + displayName),
|
|
21
|
+
* tags, ticketId and last-activity snippet — the datastore has no full-text
|
|
22
|
+
* operator, so `status`/`since` bound the scan first, then this filters.
|
|
23
|
+
*/
|
|
24
|
+
text?: string;
|
|
18
25
|
status?: string;
|
|
19
26
|
/** Only interactions with activity since this epoch-ms; null = no lower bound. */
|
|
20
27
|
since?: number | null;
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/** How the AI server authenticates to an MCP server. */
|
|
2
|
+
export type McpAuthMode = "header" | "oauth";
|
|
3
|
+
/** Whether an OAuth-authenticated MCP server uses one shared org account or one per user. */
|
|
4
|
+
export type McpOAuthAccountScope = "user" | "org";
|
|
5
|
+
/**
|
|
6
|
+
* Client-facing OAuth view for an MCP server. Never carries the client secret
|
|
7
|
+
* or tokens — those live server-side (entity `oauth.client` / ManagedAccount).
|
|
8
|
+
*/
|
|
9
|
+
export interface McpOAuthClientView {
|
|
10
|
+
scope: McpOAuthAccountScope;
|
|
11
|
+
/** Requested scopes (optional override of discovered/default scopes). */
|
|
12
|
+
scopes?: string[];
|
|
13
|
+
/** OAuth client_id (manual config or Dynamic Client Registration result). Not secret. */
|
|
14
|
+
clientId?: string;
|
|
15
|
+
/** True when a manual client secret is stored (masked; never sent raw). */
|
|
16
|
+
hasClientSecret?: boolean;
|
|
17
|
+
/** True when an account exists for the relevant scope/user. */
|
|
18
|
+
connected?: boolean;
|
|
19
|
+
/** Health of that account: "connected" (usable), or needs re-auth ("expired"/"error"). */
|
|
20
|
+
status?: "connected" | "expired" | "error";
|
|
21
|
+
}
|
|
1
22
|
/** Configuration for an external MCP (Model Context Protocol) server, per organization. */
|
|
2
23
|
export interface McpServerConfig {
|
|
3
24
|
id: string;
|
|
@@ -6,7 +27,64 @@ export interface McpServerConfig {
|
|
|
6
27
|
/** Only Streamable HTTP transport is supported for server-side connections. */
|
|
7
28
|
transport: "http";
|
|
8
29
|
url: string;
|
|
9
|
-
/** Optional auth/extra headers sent on connect (e.g. `Authorization`). */
|
|
30
|
+
/** Optional auth/extra headers sent on connect (e.g. `Authorization`). Header-mode only. */
|
|
10
31
|
headers?: Record<string, string>;
|
|
11
32
|
enabled: boolean;
|
|
33
|
+
/** How we authenticate to this server. Defaults to "header" for back-compat. */
|
|
34
|
+
authMode?: McpAuthMode;
|
|
35
|
+
/** OAuth settings, present when `authMode === "oauth"`. */
|
|
36
|
+
oauth?: McpOAuthClientView;
|
|
37
|
+
/**
|
|
38
|
+
* Owner of this server DEFINITION: absent/null = org-defined (admin-managed),
|
|
39
|
+
* set = a user's own custom personal server. Governs who may edit/delete it and
|
|
40
|
+
* where it is visible; orthogonal to `oauth.scope` (which is about credentials).
|
|
41
|
+
*/
|
|
42
|
+
ownerUserId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Org-defined servers only: users may connect this personally (the "catalog").
|
|
45
|
+
* Only meaningful together with `oauth.scope === "user"`.
|
|
46
|
+
*/
|
|
47
|
+
personalConnect?: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Write-only OAuth fields accepted by create/update (not part of the read view).
|
|
51
|
+
* `clientSecret` is masked on read, mirroring the header-secret pattern.
|
|
52
|
+
*/
|
|
53
|
+
export interface McpServerOAuthInput {
|
|
54
|
+
scope?: McpOAuthAccountScope;
|
|
55
|
+
scopes?: string[];
|
|
56
|
+
clientId?: string;
|
|
57
|
+
clientSecret?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* A curated, platform-maintained connector template shown in the admin "add from
|
|
61
|
+
* catalog" picker. Selecting one pre-fills the create endpoint (no secrets - these
|
|
62
|
+
* providers support Dynamic Client Registration). Not persisted; served read-only.
|
|
63
|
+
*/
|
|
64
|
+
export interface McpCatalogEntry {
|
|
65
|
+
key: string;
|
|
66
|
+
name: string;
|
|
67
|
+
description?: string;
|
|
68
|
+
/** Grouping label for the catalog picker (e.g. "Project management"). */
|
|
69
|
+
category?: string;
|
|
70
|
+
iconUrl?: string;
|
|
71
|
+
docsUrl?: string;
|
|
72
|
+
url: string;
|
|
73
|
+
authMode: McpAuthMode;
|
|
74
|
+
oauth?: {
|
|
75
|
+
scope?: McpOAuthAccountScope;
|
|
76
|
+
scopes?: string[];
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
/** Body accepted by the create/update endpoints (write shape, distinct from the read view). */
|
|
80
|
+
export interface McpServerInput {
|
|
81
|
+
name?: string;
|
|
82
|
+
url?: string;
|
|
83
|
+
enabled?: boolean;
|
|
84
|
+
/** Header-mode secrets; masked values mean "unchanged". */
|
|
85
|
+
headers?: Record<string, string>;
|
|
86
|
+
authMode?: McpAuthMode;
|
|
87
|
+
oauth?: McpServerOAuthInput;
|
|
88
|
+
/** Org-defined servers: mark as personally connectable (catalog membership). */
|
|
89
|
+
personalConnect?: boolean;
|
|
12
90
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=140;function i(e){return e.replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<[^>]+>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/\s+/g," ").trim()}function A(e){const t=e.trim();return t.length<=l?t:t.slice(0,l-1).trimEnd()+"…"}function E(e){if(!e||e<0)return"";const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function I(e){switch(e.type){case"EMAIL_RECEIVED":case"EMAIL_SENT":{const t=e.payload,n=t.bodySnippet?.trim()||i(t.body??"");return t.subject?`${t.subject} — ${n}`:n}case"CHAT_MESSAGE_SENT":case"CHAT_MESSAGE_RECEIVED":return e.payload.text??"";case"CHAT_RENAMED":return`Hernoemd naar "${e.payload.newName}"`;case"CHAT_MEMBER_JOINED":return`${e.payload.members.map(t=>t.name).join(", ")} toegevoegd`;case"CHAT_MEMBER_LEFT":return`${e.payload.members.map(t=>t.name).join(", ")} verlaten`;case"CHAT_CALL_STARTED":return"Gesprek gestart";case"CHAT_CALL_ENDED":return`Gesprek beëindigd${e.payload.duration?` (${E(e.payload.duration)})`:""}`;case"CHAT_EVENT":return e.payload.text??e.payload.eventType;case"VOICE_CALL_STARTED":case"VIDEO_CALL_STARTED":return"Gesprek gestart";case"VOICE_CALL_ANSWERED":case"VIDEO_CALL_ANSWERED":return"Gesprek aangenomen";case"VOICE_CALL_HOLD":case"VIDEO_CALL_HOLD":return"In de wacht";case"VOICE_CALL_UNHOLD":case"VIDEO_CALL_UNHOLD":return"Hervat";case"VOICE_CALL_ENDED":case"VIDEO_CALL_ENDED":return`Gesprek beëindigd${e.payload.duration?` (${E(e.payload.duration)})`:""}`;case"VOICE_CALL_MISSED":case"VIDEO_CALL_MISSED":return"Gemiste oproep";case"VOICE_CALL_FAILED":case"VIDEO_CALL_FAILED":return"Gesprek mislukt";case"VOICE_CALL_VOICEMAIL":return e.payload.transcription?.trim()?e.payload.transcription:"Voicemail ontvangen";case"TRANSCRIPT_ADDED":return(e.payload.segments??[]).map(t=>t.text).join(" ");case"AI_MESSAGE_ADDED":return e.payload.output?.text??e.payload.input?.text??"";case"MEETING_SCHEDULED":return`Vergadering gepland: ${e.payload.title}`;case"MEETING_STARTED":return`Vergadering gestart: ${e.payload.title}`;case"MEETING_ENDED":return`Vergadering beëindigd${e.payload.duration?` (${E(e.payload.duration)})`:""}`;case"MEETING_PARTICIPANT_JOINED":return`${e.payload.name} deelgenomen`;case"MEETING_PARTICIPANT_LEFT":return`${e.payload.name} verlaten`;case"COMMENT_ADDED":return e.payload.text??"";case"FILE_UPLOADED":return`Bestand: ${e.payload.fileName}`;case"INTERACTION_CREATED":return"Interactie aangemaakt";case"INTERACTION_STATUS_CHANGED":return`Status: ${e.payload.fromStatus} → ${e.payload.toStatus}`;case"INTERACTION_ASSIGNED":return"Interactie toegewezen";default:return""}}function T(e){return{activityId:e.id,type:e.type,snippet:A(I(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now()}}function _(e,t){const n=e.settings?.signatures?.[t];return!n||!n.enabled||!n.body||n.body.trim()===""?null:n}function g(e){return e.endpoints??[]}const D=e=>!!e.assignedUserId||!!e.assignedInboxId,f=e=>e.status==="closed",S=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=140;function i(e){return e.replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<[^>]+>/g," ").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/\s+/g," ").trim()}function A(e){const t=e.trim();return t.length<=l?t:t.slice(0,l-1).trimEnd()+"…"}function E(e){if(!e||e<0)return"";const t=Math.floor(e/60),n=Math.floor(e%60);return`${t}:${n.toString().padStart(2,"0")}`}function I(e){switch(e.type){case"EMAIL_RECEIVED":case"EMAIL_SENT":{const t=e.payload,n=t.bodySnippet?.trim()||i(t.body??"");return t.subject?`${t.subject} — ${n}`:n}case"CHAT_MESSAGE_SENT":case"CHAT_MESSAGE_RECEIVED":return e.payload.text??"";case"CHAT_RENAMED":return`Hernoemd naar "${e.payload.newName}"`;case"CHAT_MEMBER_JOINED":return`${e.payload.members.map(t=>t.name).join(", ")} toegevoegd`;case"CHAT_MEMBER_LEFT":return`${e.payload.members.map(t=>t.name).join(", ")} verlaten`;case"CHAT_CALL_STARTED":return"Gesprek gestart";case"CHAT_CALL_ENDED":return`Gesprek beëindigd${e.payload.duration?` (${E(e.payload.duration)})`:""}`;case"CHAT_EVENT":return e.payload.text??e.payload.eventType;case"VOICE_CALL_STARTED":case"VIDEO_CALL_STARTED":return"Gesprek gestart";case"VOICE_CALL_ANSWERED":case"VIDEO_CALL_ANSWERED":return"Gesprek aangenomen";case"VOICE_CALL_HOLD":case"VIDEO_CALL_HOLD":return"In de wacht";case"VOICE_CALL_UNHOLD":case"VIDEO_CALL_UNHOLD":return"Hervat";case"VOICE_CALL_ENDED":case"VIDEO_CALL_ENDED":return`Gesprek beëindigd${e.payload.duration?` (${E(e.payload.duration)})`:""}`;case"VOICE_CALL_MISSED":case"VIDEO_CALL_MISSED":return"Gemiste oproep";case"VOICE_CALL_FAILED":case"VIDEO_CALL_FAILED":return"Gesprek mislukt";case"VOICE_CALL_VOICEMAIL":return e.payload.transcription?.trim()?e.payload.transcription:"Voicemail ontvangen";case"TRANSCRIPT_ADDED":return(e.payload.segments??[]).map(t=>t.text).join(" ");case"AI_MESSAGE_ADDED":return e.payload.output?.text??e.payload.input?.text??"";case"MEETING_SCHEDULED":return`Vergadering gepland: ${e.payload.title}`;case"MEETING_STARTED":return`Vergadering gestart: ${e.payload.title}`;case"MEETING_ENDED":return`Vergadering beëindigd${e.payload.duration?` (${E(e.payload.duration)})`:""}`;case"MEETING_PARTICIPANT_JOINED":return`${e.payload.name} deelgenomen`;case"MEETING_PARTICIPANT_LEFT":return`${e.payload.name} verlaten`;case"COMMENT_ADDED":return e.payload.text??"";case"FILE_UPLOADED":return`Bestand: ${e.payload.fileName}`;case"INTERACTION_CREATED":return"Interactie aangemaakt";case"INTERACTION_STATUS_CHANGED":return`Status: ${e.payload.fromStatus} → ${e.payload.toStatus}`;case"INTERACTION_ASSIGNED":return"Interactie toegewezen";default:return""}}function T(e){return{activityId:e.id,type:e.type,snippet:A(I(e)),authorName:e.author?.name??"",direction:e.direction,createdAt:e.createdAt??Date.now()}}function _(e,t){const n=e.settings?.signatures?.[t];return!n||!n.enabled||!n.body||n.body.trim()===""?null:n}function g(e){return e.endpoints??[]}const D=e=>!!e.assignedUserId||!!e.assignedInboxId,f=e=>e.status==="closed",S=e=>({urgent:10,high:5,normal:2,low:1})[e.priority]||0,R=(e,t=30)=>e.title?.length<=t?e.title:`${e.title.substring(0,t)}...`;function L(e,t){return e.lastActivityAt?!(e.seenBy??[]).includes(t):!1}function u(e,t){const n=new Set(e.disabledIntents??[]),r=e.intentOverrides??{},s=t.intents.filter(a=>!n.has(a.intent)).map(a=>C(a,r[a.intent]));if(!e.extraIntents||e.extraIntents.length===0)return s;const o=new Set(s.map(a=>a.intent));for(const a of e.extraIntents)o.has(a.intent)||(s.push(a),o.add(a.intent));return s}function c(e,t){const n={};for(const r of e.intents){if(!r.togglable)continue;const s=t?.[r.intent];n[r.intent]=s??r.defaultEnabled??!0}return n}function N(e,t){const n=c(e,t);return Object.entries(n).filter(([,r])=>!r).map(([r])=>r)}function C(e,t){return t?{intent:t.intent??e.intent,targetSchemes:t.targetSchemes??e.targetSchemes,transport:t.transport??e.transport}:e}function O(e,t){const n=[];for(const r of e){if(!r.enabled)continue;const s=t[r.providerId];if(s)for(const o of u(r,s))n.push({channel:r,description:s,capability:o})}return n}function M(e,t){return t.filter(n=>n.capability.intent===e)}function d(e,t){return t.filter(n=>n.capability.targetSchemes.includes(e))}function b(e,t){return d(e.scheme,t)}function P(e,t,n){const r=[];for(const s of e)for(const o of n)o.capability.intent===t&&o.capability.targetSchemes.includes(s.scheme)&&r.push({channelIntent:o,endpoint:s});return r}var p=(e=>(e.MAILTO="mailto",e.SIP="sip",e.TEL="tel",e.WEBHOOK="webhook",e.USERNAME="username",e.ID="id",e.CUSTOM="custom",e.URL="url",e.TELEGRAM="telegram",e.WHATSAPP="whatsapp",e.MESSENGER="messenger",e.INSTAGRAM="instagram",e.VIBER="viber",e.SMS="sms",e.FAX="fax",e.TEAMS="teams",e.CALENDAR="calendar",e))(p||{});const G="message_window",U="message_templates",V={FROM:"from",TO:"to",CC:"cc",BCC:"bcc",ORGANIZER:"organizer",PRESENTER:"presenter",ATTENDEE:"attendee",OWNER:"owner",MEMBER:"member",GUEST:"guest",HOST:"host",PARTICIPANT:"participant"},m=(e,t)=>({intent:e,...t}),y="folder_management",H="remote_search",h={ok:!1,code:"UNSUPPORTED",message:"Provider does not support this op"},$="installation-id";exports.CommunicationScheme=p;exports.FEATURE_FOLDER_MANAGEMENT=y;exports.FEATURE_REMOTE_SEARCH=H;exports.INSTALLATION_HEADER=$;exports.InteractionParticipantRole=V;exports.PROVIDER_FEATURE_MESSAGE_TEMPLATES=U;exports.PROVIDER_FEATURE_MESSAGE_WINDOW=G;exports.UNSUPPORTED=h;exports.buildActivityPreview=T;exports.buildChannelIntents=O;exports.defineIntent=m;exports.disabledIntentsFromCapabilities=N;exports.filterByEndpoint=b;exports.filterByIntent=M;exports.filterByTargetScheme=d;exports.getContactEndpoints=g;exports.getShortTitle=R;exports.getUrgencyScore=S;exports.isAssigned=D;exports.isClosed=f;exports.isInteractionUnseen=L;exports.matchContactToIntents=P;exports.resolveAccountCapabilities=c;exports.resolveChannelIntents=u;exports.resolveSignature=_;exports.stripHtml=i;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './entities/kb';
|
|
|
3
3
|
export * from './entities/topic';
|
|
4
4
|
export * from './entities/ai-account';
|
|
5
5
|
export * from './entities/ai-context';
|
|
6
|
+
export * from './entities/ai-conversation';
|
|
6
7
|
export * from './entities/ai-message';
|
|
7
8
|
export * from './entities/ai-profile';
|
|
8
9
|
export * from './entities/mcp';
|
|
@@ -24,6 +25,7 @@ export * from './platform/ai-tools';
|
|
|
24
25
|
export * from './platform/api';
|
|
25
26
|
export * from './platform/common';
|
|
26
27
|
export * from './platform/capabilities';
|
|
28
|
+
export * from './platform/context';
|
|
27
29
|
export * from './platform/communication';
|
|
28
30
|
export * from './platform/federated';
|
|
29
31
|
export * from './platform/intents';
|
package/dist/index.js
CHANGED
|
@@ -182,15 +182,16 @@ const P = "message_window", V = "message_templates", G = {
|
|
|
182
182
|
// Voice/conference
|
|
183
183
|
HOST: "host",
|
|
184
184
|
PARTICIPANT: "participant"
|
|
185
|
-
}, H = (e, t) => ({ intent: e, ...t }), $ = "folder_management", y = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" },
|
|
185
|
+
}, H = (e, t) => ({ intent: e, ...t }), $ = "folder_management", y = "remote_search", U = { ok: !1, code: "UNSUPPORTED", message: "Provider does not support this op" }, m = "installation-id";
|
|
186
186
|
export {
|
|
187
187
|
I as CommunicationScheme,
|
|
188
188
|
$ as FEATURE_FOLDER_MANAGEMENT,
|
|
189
|
-
|
|
189
|
+
y as FEATURE_REMOTE_SEARCH,
|
|
190
|
+
m as INSTALLATION_HEADER,
|
|
190
191
|
G as InteractionParticipantRole,
|
|
191
192
|
V as PROVIDER_FEATURE_MESSAGE_TEMPLATES,
|
|
192
193
|
P as PROVIDER_FEATURE_MESSAGE_WINDOW,
|
|
193
|
-
|
|
194
|
+
U as UNSUPPORTED,
|
|
194
195
|
_ as buildActivityPreview,
|
|
195
196
|
C as buildChannelIntents,
|
|
196
197
|
H as defineIntent,
|
package/dist/platform/api.d.ts
CHANGED
|
@@ -432,6 +432,12 @@ export type ServerOp = {
|
|
|
432
432
|
kind: "contact.fetch";
|
|
433
433
|
channelId: string;
|
|
434
434
|
externalId: string;
|
|
435
|
+
} | {
|
|
436
|
+
kind: "mailbox.search";
|
|
437
|
+
channelId: string;
|
|
438
|
+
query: string;
|
|
439
|
+
cursor?: string;
|
|
440
|
+
limit?: number;
|
|
435
441
|
} | {
|
|
436
442
|
kind: "folder.list";
|
|
437
443
|
channelId: string;
|
|
@@ -486,12 +492,31 @@ export interface FolderMessagePage {
|
|
|
486
492
|
/** Opaque provider-cursor (bv. Graph `@odata.nextLink`). Afwezig = laatste pagina. */
|
|
487
493
|
nextCursor?: string;
|
|
488
494
|
}
|
|
495
|
+
/**
|
|
496
|
+
* Een zoekbare externe bron (channel) voor de client-fan-out. Retourneerd door
|
|
497
|
+
* `GET /search/sources`: elke door de user toegankelijke, ingeschakelde channel
|
|
498
|
+
* waarvan de provider `FEATURE_REMOTE_SEARCH` declareert. De client vuurt per
|
|
499
|
+
* bron parallel een `POST /search/mailbox` af (non-blocking).
|
|
500
|
+
*/
|
|
501
|
+
export interface MailboxSearchSource {
|
|
502
|
+
channelId: string;
|
|
503
|
+
providerId: string;
|
|
504
|
+
displayName: string;
|
|
505
|
+
}
|
|
489
506
|
/**
|
|
490
507
|
* Well-known `ProviderFeature.name` voor de folder-capability. Een provider die
|
|
491
508
|
* folder.list/messages/import/move ondersteunt zet `{ name: FEATURE_FOLDER_MANAGEMENT, value: true }`
|
|
492
509
|
* in `describe().features`; de client toont dan de Folders-nav voor dat channel.
|
|
493
510
|
*/
|
|
494
511
|
export declare const FEATURE_FOLDER_MANAGEMENT = "folder_management";
|
|
512
|
+
/**
|
|
513
|
+
* Well-known `ProviderFeature.name` voor de remote-search-capability. Een provider
|
|
514
|
+
* die `mailbox.search` ondersteunt (de externe bron zelf doorzoeken, bv. Outlook
|
|
515
|
+
* Graph `$search` of IMAP `SEARCH`) zet `{ name: FEATURE_REMOTE_SEARCH, value: true }`
|
|
516
|
+
* in `describe().features`. De comm-server neemt de channels van zo'n provider mee
|
|
517
|
+
* in `GET /search/sources`; de client fan-out er parallel op via `POST /search/mailbox`.
|
|
518
|
+
*/
|
|
519
|
+
export declare const FEATURE_REMOTE_SEARCH = "remote_search";
|
|
495
520
|
/**
|
|
496
521
|
* Result-shape voor `IProvider.dispatch` en de comm-server `dispatchToProvider`-
|
|
497
522
|
* helper. Discriminated op `ok`. Bewust niet strict-null-discriminated zodat
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host context resolved for the tools-panel. Any app can contribute one via the
|
|
3
|
+
* `context.collect` service; the shell picks the highest-priority non-null claim
|
|
4
|
+
* for the current route and falls back to `{ kind: "global", scopeKey:
|
|
5
|
+
* "workspace:<userId>" }` when no app claims it.
|
|
6
|
+
*
|
|
7
|
+
* `kind` drives tool visibility (`ExtensionConfig.contexts`); `scopeKey` groups
|
|
8
|
+
* the assistant's conversations; `shared` marks the scope's anchor conversation
|
|
9
|
+
* as team-shared.
|
|
10
|
+
*/
|
|
11
|
+
export interface HostContext {
|
|
12
|
+
kind: string;
|
|
13
|
+
scopeKey: string;
|
|
14
|
+
/** The scope's anchor conversation is shared with everyone who may see the scope. */
|
|
15
|
+
shared?: boolean;
|
|
16
|
+
/** Default title for the anchor conversation. */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** Highest wins when multiple apps claim the same route. */
|
|
19
|
+
priority?: number;
|
|
20
|
+
/** Extra data providers attach (e.g. interaction, activities, transcripts). */
|
|
21
|
+
slices?: Record<string, unknown>;
|
|
22
|
+
}
|
package/dist/platform/ui.d.ts
CHANGED
|
@@ -57,7 +57,11 @@ export interface ToastConfig {
|
|
|
57
57
|
variant?: 'primary' | 'secondary';
|
|
58
58
|
}[];
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Well-known context kinds, kept for autocomplete; any app may declare its own
|
|
62
|
+
* kind (e.g. "contact") via a context provider, so the type stays open.
|
|
63
|
+
*/
|
|
64
|
+
export type ExtensionContext = 'global' | 'call' | 'interaction' | (string & {});
|
|
61
65
|
export interface ExtensionConfig {
|
|
62
66
|
id: string;
|
|
63
67
|
slot: string;
|