@eggjs/tegg-types 3.75.0 → 3.76.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.
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
export declare const ContentBlockType: {
|
|
2
2
|
readonly Text: "text";
|
|
3
|
+
readonly ToolUse: "tool_use";
|
|
4
|
+
readonly ToolResult: "tool_result";
|
|
3
5
|
};
|
|
4
6
|
export type ContentBlockType = (typeof ContentBlockType)[keyof typeof ContentBlockType];
|
|
5
|
-
export interface
|
|
7
|
+
export interface TextInputContentPart {
|
|
6
8
|
type: typeof ContentBlockType.Text;
|
|
7
9
|
text: string;
|
|
8
10
|
}
|
|
11
|
+
export interface ToolUseInputContentPart {
|
|
12
|
+
type: typeof ContentBlockType.ToolUse;
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
input: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface ToolResultInputContentPart {
|
|
18
|
+
type: typeof ContentBlockType.ToolResult;
|
|
19
|
+
tool_use_id: string;
|
|
20
|
+
content?: string | {
|
|
21
|
+
type: string;
|
|
22
|
+
text?: string;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}[];
|
|
25
|
+
is_error?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface GenericInputContentPart {
|
|
28
|
+
type: string;
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
export type InputContentPart = TextInputContentPart | ToolUseInputContentPart | ToolResultInputContentPart | GenericInputContentPart;
|
|
9
32
|
export interface TextContentBlock {
|
|
10
33
|
type: typeof ContentBlockType.Text;
|
|
11
34
|
text: {
|
|
@@ -13,13 +36,30 @@ export interface TextContentBlock {
|
|
|
13
36
|
annotations: unknown[];
|
|
14
37
|
};
|
|
15
38
|
}
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
39
|
+
export interface ToolUseContentBlock {
|
|
40
|
+
type: typeof ContentBlockType.ToolUse;
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
input: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
export interface ToolResultContentBlock {
|
|
46
|
+
type: typeof ContentBlockType.ToolResult;
|
|
47
|
+
tool_use_id: string;
|
|
48
|
+
content?: string | {
|
|
20
49
|
type: string;
|
|
21
|
-
text
|
|
50
|
+
text?: string;
|
|
51
|
+
[key: string]: unknown;
|
|
22
52
|
}[];
|
|
53
|
+
is_error?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface GenericContentBlock {
|
|
56
|
+
type: string;
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
}
|
|
59
|
+
export type MessageContentBlock = TextContentBlock | ToolUseContentBlock | ToolResultContentBlock | GenericContentBlock;
|
|
60
|
+
export interface InputMessage {
|
|
61
|
+
role: string;
|
|
62
|
+
content: string | InputContentPart[];
|
|
23
63
|
metadata?: Record<string, unknown>;
|
|
24
64
|
}
|
|
25
65
|
export interface MessageObject {
|
|
@@ -4,5 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.ContentBlockType = void 0;
|
|
5
5
|
exports.ContentBlockType = {
|
|
6
6
|
Text: 'text',
|
|
7
|
+
ToolUse: 'tool_use',
|
|
8
|
+
ToolResult: 'tool_result',
|
|
7
9
|
};
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQWdlbnRNZXNzYWdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiQWdlbnRNZXNzYWdlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxrQ0FBa0M7OztBQUVyQixRQUFBLGdCQUFnQixHQUFHO0lBQzlCLElBQUksRUFBRSxNQUFNO0lBQ1osT0FBTyxFQUFFLFVBQVU7SUFDbkIsVUFBVSxFQUFFLGFBQWE7Q0FDakIsQ0FBQyJ9
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eggjs/tegg-types",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.76.0",
|
|
4
4
|
"description": "tegg types",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"egg",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"ts-node": "^10.9.1",
|
|
46
46
|
"typescript": "^5.0.4"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "0a338ed4ea57e53e369fd7036399eafdb0ec016e"
|
|
49
49
|
}
|