@kaiban/sdk 0.1.8 → 0.1.9
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.
|
@@ -1,7 +1,188 @@
|
|
|
1
1
|
import { Activity } from './activities';
|
|
2
2
|
export declare const A2ADataPartType: {
|
|
3
|
+
readonly TOOL_CALL_START: "tool_call_start";
|
|
4
|
+
readonly TOOL_CALL_ARGS: "tool_call_args";
|
|
5
|
+
readonly TOOL_CALL_END: "tool_call_end";
|
|
6
|
+
readonly TOOL_CALL_RESULT: "tool_call_result";
|
|
7
|
+
readonly TASK_INFO_MESSAGE: "task_info_message";
|
|
8
|
+
readonly TASK_STEP_OUTPUT: "task_step_output";
|
|
9
|
+
readonly USER_EVALUATION: "user_evaluation";
|
|
10
|
+
readonly USER_THREAD_FEEDBACK: "user_thread_feedback";
|
|
11
|
+
readonly USER_CLOSE_THREAD: "user_close_thread";
|
|
12
|
+
readonly GENERATE_REPORT: "generate_report";
|
|
3
13
|
readonly KAIBAN_ACTIVITY: "kaiban_activity";
|
|
14
|
+
readonly AGENT_STATUS: "agent_status";
|
|
4
15
|
};
|
|
16
|
+
export interface ToolCallStartPart {
|
|
17
|
+
kind: 'data';
|
|
18
|
+
data: {
|
|
19
|
+
type: typeof A2ADataPartType.TOOL_CALL_START;
|
|
20
|
+
toolName: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface ToolCallArgsPart {
|
|
24
|
+
kind: 'data';
|
|
25
|
+
data: {
|
|
26
|
+
type: typeof A2ADataPartType.TOOL_CALL_ARGS;
|
|
27
|
+
toolName: string;
|
|
28
|
+
args: {
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface ToolCallEndPart {
|
|
34
|
+
kind: 'data';
|
|
35
|
+
data: {
|
|
36
|
+
type: typeof A2ADataPartType.TOOL_CALL_END;
|
|
37
|
+
toolName: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface ToolCallResultPart {
|
|
41
|
+
kind: 'data';
|
|
42
|
+
data: {
|
|
43
|
+
type: typeof A2ADataPartType.TOOL_CALL_RESULT;
|
|
44
|
+
toolName: string;
|
|
45
|
+
result: {
|
|
46
|
+
[key: string]: unknown;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export interface TaskInfoMessagePart {
|
|
51
|
+
kind: 'data';
|
|
52
|
+
data: {
|
|
53
|
+
type: typeof A2ADataPartType.TASK_INFO_MESSAGE;
|
|
54
|
+
message: string;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface TaskStepOutputPart {
|
|
58
|
+
kind: 'data';
|
|
59
|
+
data: {
|
|
60
|
+
type: typeof A2ADataPartType.TASK_STEP_OUTPUT;
|
|
61
|
+
stepName: string;
|
|
62
|
+
output?: {
|
|
63
|
+
[key: string]: unknown;
|
|
64
|
+
};
|
|
65
|
+
costs?: {
|
|
66
|
+
model: string;
|
|
67
|
+
inputTokens: number;
|
|
68
|
+
outputTokens: number;
|
|
69
|
+
totalTokens: number;
|
|
70
|
+
reasoningTokens: number;
|
|
71
|
+
cachedInputTokens: number;
|
|
72
|
+
}[];
|
|
73
|
+
duration: number;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface UserEvaluationPart {
|
|
77
|
+
kind: 'data';
|
|
78
|
+
data: {
|
|
79
|
+
type: typeof A2ADataPartType.USER_EVALUATION;
|
|
80
|
+
messageId: string;
|
|
81
|
+
evaluation: 'good' | 'bad';
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export interface UserThreadFeedbackPart {
|
|
85
|
+
kind: 'data';
|
|
86
|
+
data: {
|
|
87
|
+
type: typeof A2ADataPartType.USER_THREAD_FEEDBACK;
|
|
88
|
+
wasHelpful: boolean;
|
|
89
|
+
feedback: string;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export interface UserCloseThreadPart {
|
|
93
|
+
kind: 'data';
|
|
94
|
+
data: {
|
|
95
|
+
type: typeof A2ADataPartType.USER_CLOSE_THREAD;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
export interface ToolCallStartPart {
|
|
99
|
+
kind: 'data';
|
|
100
|
+
data: {
|
|
101
|
+
type: typeof A2ADataPartType.TOOL_CALL_START;
|
|
102
|
+
toolName: string;
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
export interface ToolCallArgsPart {
|
|
106
|
+
kind: 'data';
|
|
107
|
+
data: {
|
|
108
|
+
type: typeof A2ADataPartType.TOOL_CALL_ARGS;
|
|
109
|
+
toolName: string;
|
|
110
|
+
args: {
|
|
111
|
+
[key: string]: unknown;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
export interface ToolCallEndPart {
|
|
116
|
+
kind: 'data';
|
|
117
|
+
data: {
|
|
118
|
+
type: typeof A2ADataPartType.TOOL_CALL_END;
|
|
119
|
+
toolName: string;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
export interface ToolCallResultPart {
|
|
123
|
+
kind: 'data';
|
|
124
|
+
data: {
|
|
125
|
+
type: typeof A2ADataPartType.TOOL_CALL_RESULT;
|
|
126
|
+
toolName: string;
|
|
127
|
+
result: {
|
|
128
|
+
[key: string]: unknown;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
export interface TaskInfoMessagePart {
|
|
133
|
+
kind: 'data';
|
|
134
|
+
data: {
|
|
135
|
+
type: typeof A2ADataPartType.TASK_INFO_MESSAGE;
|
|
136
|
+
message: string;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export interface TaskStepOutputPart {
|
|
140
|
+
kind: 'data';
|
|
141
|
+
data: {
|
|
142
|
+
type: typeof A2ADataPartType.TASK_STEP_OUTPUT;
|
|
143
|
+
stepName: string;
|
|
144
|
+
output?: {
|
|
145
|
+
[key: string]: unknown;
|
|
146
|
+
};
|
|
147
|
+
costs?: {
|
|
148
|
+
model: string;
|
|
149
|
+
inputTokens: number;
|
|
150
|
+
outputTokens: number;
|
|
151
|
+
totalTokens: number;
|
|
152
|
+
reasoningTokens: number;
|
|
153
|
+
cachedInputTokens: number;
|
|
154
|
+
}[];
|
|
155
|
+
duration: number;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
export interface UserEvaluationPart {
|
|
159
|
+
kind: 'data';
|
|
160
|
+
data: {
|
|
161
|
+
type: typeof A2ADataPartType.USER_EVALUATION;
|
|
162
|
+
messageId: string;
|
|
163
|
+
evaluation: 'good' | 'bad';
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
export interface UserThreadFeedbackPart {
|
|
167
|
+
kind: 'data';
|
|
168
|
+
data: {
|
|
169
|
+
type: typeof A2ADataPartType.USER_THREAD_FEEDBACK;
|
|
170
|
+
wasHelpful: boolean;
|
|
171
|
+
feedback: string;
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
export interface UserCloseThreadPart {
|
|
175
|
+
kind: 'data';
|
|
176
|
+
data: {
|
|
177
|
+
type: typeof A2ADataPartType.USER_CLOSE_THREAD;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
export interface GenerateReportPart {
|
|
181
|
+
kind: 'data';
|
|
182
|
+
data: {
|
|
183
|
+
type: typeof A2ADataPartType.GENERATE_REPORT;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
5
186
|
export interface KaibanActivityPart {
|
|
6
187
|
kind: 'data';
|
|
7
188
|
data: {
|
|
@@ -9,3 +190,13 @@ export interface KaibanActivityPart {
|
|
|
9
190
|
activity: Activity;
|
|
10
191
|
};
|
|
11
192
|
}
|
|
193
|
+
export interface AgentStatusPart {
|
|
194
|
+
kind: 'data';
|
|
195
|
+
data: {
|
|
196
|
+
type: typeof A2ADataPartType.AGENT_STATUS;
|
|
197
|
+
status: {
|
|
198
|
+
name: string;
|
|
199
|
+
description: string;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
export const A2ADataPartType = {
|
|
2
|
+
TOOL_CALL_START: 'tool_call_start',
|
|
3
|
+
TOOL_CALL_ARGS: 'tool_call_args',
|
|
4
|
+
TOOL_CALL_END: 'tool_call_end',
|
|
5
|
+
TOOL_CALL_RESULT: 'tool_call_result',
|
|
6
|
+
TASK_INFO_MESSAGE: 'task_info_message',
|
|
7
|
+
TASK_STEP_OUTPUT: 'task_step_output',
|
|
8
|
+
USER_EVALUATION: 'user_evaluation',
|
|
9
|
+
USER_THREAD_FEEDBACK: 'user_thread_feedback',
|
|
10
|
+
USER_CLOSE_THREAD: 'user_close_thread',
|
|
11
|
+
GENERATE_REPORT: 'generate_report',
|
|
2
12
|
KAIBAN_ACTIVITY: 'kaiban_activity',
|
|
13
|
+
AGENT_STATUS: 'agent_status',
|
|
3
14
|
};
|