@xpert-ai/contracts 3.15.12 → 3.15.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/contracts",
3
- "version": "3.15.12",
3
+ "version": "3.15.13",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,5 +1,5 @@
1
1
  import { MessageType } from '@langchain/core/messages';
2
- import type { ChatKitReference, ChatKitReferenceBase, TChatMessageStep, TMessageContent, TMessageContentReasoning } from '@xpert-ai/chatkit-types';
2
+ import type { ChatKitReference, ChatKitReferenceBase, TChatMessageStep, TChatTaskSummaryContribution, TMessageContent, TMessageContentReasoning } from '@xpert-ai/chatkit-types';
3
3
  import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model';
4
4
  import { IChatConversation } from './chat.model';
5
5
  import { LongTermMemoryTypeEnum } from './xpert.model';
@@ -76,6 +76,8 @@ export interface IChatMessage extends IBasePerTenantAndOrganizationEntityModel,
76
76
  * Structured references associated with the human input
77
77
  */
78
78
  references?: TChatReference[];
79
+ /** Compact contribution used to rebuild the thread task summary. */
80
+ taskSummary?: TChatTaskSummaryContribution;
79
81
  /**
80
82
  * Job of summary
81
83
  */
@@ -0,0 +1,51 @@
1
+ import type { ChatTaskSummaryOutput, ChatTaskSummaryPlan, ChatTaskSummarySource, ChatTaskSummaryTodos } from '@xpert-ai/chatkit-types';
2
+ import type { IThreadGoal } from './thread-goal.model';
3
+ import type { XpertAgentExecutionStatusEnum } from './xpert-agent-execution.model';
4
+ export type TChatTaskSummaryAgent = {
5
+ id: string;
6
+ parentId?: string;
7
+ level: number;
8
+ agentKey?: string;
9
+ title: string;
10
+ status?: XpertAgentExecutionStatusEnum;
11
+ elapsedTime?: number;
12
+ error?: string;
13
+ messageId?: string;
14
+ updatedAt?: string;
15
+ };
16
+ export type TChatTaskSummaryPending = {
17
+ id: string;
18
+ kind: 'approval' | 'user_input' | 'follow_up';
19
+ title: string;
20
+ description?: string;
21
+ messageId?: string;
22
+ createdAt?: string;
23
+ };
24
+ export type TChatTaskSummarySection = 'outputs' | 'sources' | 'agents' | 'pending';
25
+ export type TChatTaskSummarySectionItem = ChatTaskSummaryOutput | ChatTaskSummarySource | TChatTaskSummaryAgent | TChatTaskSummaryPending;
26
+ export type TChatTaskSummaryList<T> = {
27
+ items: T[];
28
+ total: number;
29
+ };
30
+ export type TChatTaskSummarySnapshot = {
31
+ version: 1;
32
+ conversationId: string;
33
+ threadId: string;
34
+ task: {
35
+ goal?: IThreadGoal | null;
36
+ plan?: ChatTaskSummaryPlan;
37
+ todos?: ChatTaskSummaryTodos;
38
+ };
39
+ outputs: TChatTaskSummaryList<ChatTaskSummaryOutput>;
40
+ sources: TChatTaskSummaryList<ChatTaskSummarySource>;
41
+ agents: TChatTaskSummaryList<TChatTaskSummaryAgent>;
42
+ pending: TChatTaskSummaryList<TChatTaskSummaryPending>;
43
+ updatedAt: string;
44
+ };
45
+ export type TChatTaskSummarySectionPage = {
46
+ section: TChatTaskSummarySection;
47
+ items: TChatTaskSummarySectionItem[];
48
+ total: number;
49
+ offset: number;
50
+ limit: number;
51
+ };
package/src/ai/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export * from './chat-event.model';
11
11
  export * from './thread-goal.model';
12
12
  export * from './chat.model';
13
13
  export * from './chat-message.model';
14
+ export * from './chat-task-summary.model';
14
15
  export * from './chat-message-feedback.model';
15
16
  export * from './copilot-checkpoint.model';
16
17
  export * from './copilot-example.model';