@perstack/core 0.0.54 → 0.0.55
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/src/index.d.ts +6363 -28
- package/dist/src/index.js +1982 -28
- package/dist/src/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/src/adapters/event-creators.d.ts +0 -26
- package/dist/src/adapters/event-creators.d.ts.map +0 -1
- package/dist/src/adapters/event-creators.js +0 -126
- package/dist/src/adapters/event-creators.js.map +0 -1
- package/dist/src/adapters/index.d.ts +0 -2
- package/dist/src/adapters/index.d.ts.map +0 -1
- package/dist/src/adapters/index.js +0 -2
- package/dist/src/adapters/index.js.map +0 -1
- package/dist/src/constants/constants.d.ts +0 -11
- package/dist/src/constants/constants.d.ts.map +0 -1
- package/dist/src/constants/constants.js +0 -13
- package/dist/src/constants/constants.js.map +0 -1
- package/dist/src/errors.d.ts +0 -4
- package/dist/src/errors.d.ts.map +0 -1
- package/dist/src/errors.js +0 -7
- package/dist/src/errors.js.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/known-models/index.d.ts +0 -9
- package/dist/src/known-models/index.d.ts.map +0 -1
- package/dist/src/known-models/index.js +0 -216
- package/dist/src/known-models/index.js.map +0 -1
- package/dist/src/schemas/activity.d.ts +0 -2159
- package/dist/src/schemas/activity.d.ts.map +0 -1
- package/dist/src/schemas/activity.js +0 -209
- package/dist/src/schemas/activity.js.map +0 -1
- package/dist/src/schemas/checkpoint.d.ts +0 -338
- package/dist/src/schemas/checkpoint.d.ts.map +0 -1
- package/dist/src/schemas/checkpoint.js +0 -69
- package/dist/src/schemas/checkpoint.js.map +0 -1
- package/dist/src/schemas/expert.d.ts +0 -309
- package/dist/src/schemas/expert.d.ts.map +0 -1
- package/dist/src/schemas/expert.js +0 -70
- package/dist/src/schemas/expert.js.map +0 -1
- package/dist/src/schemas/job.d.ts +0 -44
- package/dist/src/schemas/job.d.ts.map +0 -1
- package/dist/src/schemas/job.js +0 -22
- package/dist/src/schemas/job.js.map +0 -1
- package/dist/src/schemas/lockfile.d.ts +0 -143
- package/dist/src/schemas/lockfile.d.ts.map +0 -1
- package/dist/src/schemas/lockfile.js +0 -26
- package/dist/src/schemas/lockfile.js.map +0 -1
- package/dist/src/schemas/message-part.d.ts +0 -239
- package/dist/src/schemas/message-part.d.ts.map +0 -1
- package/dist/src/schemas/message-part.js +0 -80
- package/dist/src/schemas/message-part.js.map +0 -1
- package/dist/src/schemas/message.d.ts +0 -236
- package/dist/src/schemas/message.d.ts.map +0 -1
- package/dist/src/schemas/message.js +0 -44
- package/dist/src/schemas/message.js.map +0 -1
- package/dist/src/schemas/perstack-toml.d.ts +0 -366
- package/dist/src/schemas/perstack-toml.d.ts.map +0 -1
- package/dist/src/schemas/perstack-toml.js +0 -175
- package/dist/src/schemas/perstack-toml.js.map +0 -1
- package/dist/src/schemas/provider-config.d.ts +0 -216
- package/dist/src/schemas/provider-config.d.ts.map +0 -1
- package/dist/src/schemas/provider-config.js +0 -86
- package/dist/src/schemas/provider-config.js.map +0 -1
- package/dist/src/schemas/provider-tools.d.ts +0 -93
- package/dist/src/schemas/provider-tools.d.ts.map +0 -1
- package/dist/src/schemas/provider-tools.js +0 -60
- package/dist/src/schemas/provider-tools.js.map +0 -1
- package/dist/src/schemas/run-command.d.ts +0 -127
- package/dist/src/schemas/run-command.d.ts.map +0 -1
- package/dist/src/schemas/run-command.js +0 -82
- package/dist/src/schemas/run-command.js.map +0 -1
- package/dist/src/schemas/runtime-version.d.ts +0 -4
- package/dist/src/schemas/runtime-version.d.ts.map +0 -1
- package/dist/src/schemas/runtime-version.js +0 -6
- package/dist/src/schemas/runtime-version.js.map +0 -1
- package/dist/src/schemas/runtime.d.ts +0 -1317
- package/dist/src/schemas/runtime.d.ts.map +0 -1
- package/dist/src/schemas/runtime.js +0 -205
- package/dist/src/schemas/runtime.js.map +0 -1
- package/dist/src/schemas/skill-manager.d.ts +0 -64
- package/dist/src/schemas/skill-manager.d.ts.map +0 -1
- package/dist/src/schemas/skill-manager.js +0 -2
- package/dist/src/schemas/skill-manager.js.map +0 -1
- package/dist/src/schemas/skill.d.ts +0 -147
- package/dist/src/schemas/skill.d.ts.map +0 -1
- package/dist/src/schemas/skill.js +0 -99
- package/dist/src/schemas/skill.js.map +0 -1
- package/dist/src/schemas/step.d.ts +0 -370
- package/dist/src/schemas/step.d.ts.map +0 -1
- package/dist/src/schemas/step.js +0 -21
- package/dist/src/schemas/step.js.map +0 -1
- package/dist/src/schemas/tool-call.d.ts +0 -19
- package/dist/src/schemas/tool-call.d.ts.map +0 -1
- package/dist/src/schemas/tool-call.js +0 -10
- package/dist/src/schemas/tool-call.js.map +0 -1
- package/dist/src/schemas/tool-result.d.ts +0 -86
- package/dist/src/schemas/tool-result.d.ts.map +0 -1
- package/dist/src/schemas/tool-result.js +0 -11
- package/dist/src/schemas/tool-result.js.map +0 -1
- package/dist/src/schemas/usage.d.ts +0 -22
- package/dist/src/schemas/usage.d.ts.map +0 -1
- package/dist/src/schemas/usage.js +0 -10
- package/dist/src/schemas/usage.js.map +0 -1
- package/dist/src/utils/activity.d.ts +0 -20
- package/dist/src/utils/activity.d.ts.map +0 -1
- package/dist/src/utils/activity.js +0 -449
- package/dist/src/utils/activity.js.map +0 -1
- package/dist/src/utils/env-filter.d.ts +0 -4
- package/dist/src/utils/env-filter.d.ts.map +0 -1
- package/dist/src/utils/env-filter.js +0 -50
- package/dist/src/utils/env-filter.js.map +0 -1
- package/dist/src/utils/event-filter.d.ts +0 -16
- package/dist/src/utils/event-filter.d.ts.map +0 -1
- package/dist/src/utils/event-filter.js +0 -31
- package/dist/src/utils/event-filter.js.map +0 -1
- package/dist/src/utils/expert-type.d.ts +0 -38
- package/dist/src/utils/expert-type.d.ts.map +0 -1
- package/dist/src/utils/expert-type.js +0 -88
- package/dist/src/utils/expert-type.js.map +0 -1
- package/dist/src/utils/zod-error.d.ts +0 -4
- package/dist/src/utils/zod-error.d.ts.map +0 -1
- package/dist/src/utils/zod-error.js +0 -17
- package/dist/src/utils/zod-error.js.map +0 -1
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { InstructionMessage, Message, ToolMessage, UserMessage } from "./message.js";
|
|
3
|
-
import type { ToolCall } from "./tool-call.js";
|
|
4
|
-
import type { ToolResult } from "./tool-result.js";
|
|
5
|
-
import type { Usage } from "./usage.js";
|
|
6
|
-
/**
|
|
7
|
-
* A single execution step in an Expert run.
|
|
8
|
-
* Each step represents one LLM generation cycle, optionally followed by tool calls.
|
|
9
|
-
*/
|
|
10
|
-
export interface Step {
|
|
11
|
-
/** Sequential step number (1-indexed) */
|
|
12
|
-
stepNumber: number;
|
|
13
|
-
/** Messages sent to the LLM for this step */
|
|
14
|
-
inputMessages?: (InstructionMessage | UserMessage | ToolMessage)[];
|
|
15
|
-
/** Messages generated during this step */
|
|
16
|
-
newMessages: Message[];
|
|
17
|
-
/** Tool calls made during this step, if any */
|
|
18
|
-
toolCalls?: ToolCall[];
|
|
19
|
-
/** Results of the tool calls, if any */
|
|
20
|
-
toolResults?: ToolResult[];
|
|
21
|
-
/** Tool calls waiting to be processed (sorted: MCP → Delegate → Interactive) */
|
|
22
|
-
pendingToolCalls?: ToolCall[];
|
|
23
|
-
/** Partial tool results collected so far (used during mixed tool call processing) */
|
|
24
|
-
partialToolResults?: ToolResult[];
|
|
25
|
-
/** Token usage for this step */
|
|
26
|
-
usage: Usage;
|
|
27
|
-
/** Unix timestamp (ms) when step started */
|
|
28
|
-
startedAt: number;
|
|
29
|
-
/** Unix timestamp (ms) when step finished */
|
|
30
|
-
finishedAt?: number;
|
|
31
|
-
}
|
|
32
|
-
export declare const stepSchema: z.ZodObject<{
|
|
33
|
-
stepNumber: z.ZodNumber;
|
|
34
|
-
inputMessages: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
35
|
-
id: z.ZodString;
|
|
36
|
-
type: z.ZodLiteral<"instructionMessage">;
|
|
37
|
-
contents: z.ZodArray<z.ZodObject<{
|
|
38
|
-
id: z.ZodString;
|
|
39
|
-
type: z.ZodLiteral<"textPart">;
|
|
40
|
-
text: z.ZodString;
|
|
41
|
-
}, z.core.$strip>>;
|
|
42
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
-
id: z.ZodString;
|
|
45
|
-
type: z.ZodLiteral<"userMessage">;
|
|
46
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
47
|
-
id: z.ZodString;
|
|
48
|
-
type: z.ZodLiteral<"textPart">;
|
|
49
|
-
text: z.ZodString;
|
|
50
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
-
id: z.ZodString;
|
|
52
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
53
|
-
url: z.ZodURL;
|
|
54
|
-
mimeType: z.ZodString;
|
|
55
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
-
id: z.ZodString;
|
|
57
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
58
|
-
encodedData: z.ZodString;
|
|
59
|
-
mimeType: z.ZodString;
|
|
60
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
61
|
-
id: z.ZodString;
|
|
62
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
63
|
-
data: z.ZodString;
|
|
64
|
-
mimeType: z.ZodString;
|
|
65
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
66
|
-
id: z.ZodString;
|
|
67
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
68
|
-
url: z.ZodString;
|
|
69
|
-
mimeType: z.ZodString;
|
|
70
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
-
id: z.ZodString;
|
|
72
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
73
|
-
encodedData: z.ZodString;
|
|
74
|
-
mimeType: z.ZodString;
|
|
75
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
-
id: z.ZodString;
|
|
77
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
78
|
-
data: z.ZodString;
|
|
79
|
-
mimeType: z.ZodString;
|
|
80
|
-
}, z.core.$strip>]>>;
|
|
81
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
-
id: z.ZodString;
|
|
84
|
-
type: z.ZodLiteral<"toolMessage">;
|
|
85
|
-
contents: z.ZodArray<z.ZodObject<{
|
|
86
|
-
id: z.ZodString;
|
|
87
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
88
|
-
toolCallId: z.ZodString;
|
|
89
|
-
toolName: z.ZodString;
|
|
90
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
91
|
-
id: z.ZodString;
|
|
92
|
-
type: z.ZodLiteral<"textPart">;
|
|
93
|
-
text: z.ZodString;
|
|
94
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
95
|
-
id: z.ZodString;
|
|
96
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
97
|
-
encodedData: z.ZodString;
|
|
98
|
-
mimeType: z.ZodString;
|
|
99
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
100
|
-
id: z.ZodString;
|
|
101
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
102
|
-
encodedData: z.ZodString;
|
|
103
|
-
mimeType: z.ZodString;
|
|
104
|
-
}, z.core.$strip>]>>;
|
|
105
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
-
}, z.core.$strip>>;
|
|
107
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
-
}, z.core.$strip>]>>>;
|
|
109
|
-
newMessages: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
110
|
-
id: z.ZodString;
|
|
111
|
-
type: z.ZodLiteral<"instructionMessage">;
|
|
112
|
-
contents: z.ZodArray<z.ZodObject<{
|
|
113
|
-
id: z.ZodString;
|
|
114
|
-
type: z.ZodLiteral<"textPart">;
|
|
115
|
-
text: z.ZodString;
|
|
116
|
-
}, z.core.$strip>>;
|
|
117
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
119
|
-
id: z.ZodString;
|
|
120
|
-
type: z.ZodLiteral<"userMessage">;
|
|
121
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
122
|
-
id: z.ZodString;
|
|
123
|
-
type: z.ZodLiteral<"textPart">;
|
|
124
|
-
text: z.ZodString;
|
|
125
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
126
|
-
id: z.ZodString;
|
|
127
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
128
|
-
url: z.ZodURL;
|
|
129
|
-
mimeType: z.ZodString;
|
|
130
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
131
|
-
id: z.ZodString;
|
|
132
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
133
|
-
encodedData: z.ZodString;
|
|
134
|
-
mimeType: z.ZodString;
|
|
135
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
136
|
-
id: z.ZodString;
|
|
137
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
138
|
-
data: z.ZodString;
|
|
139
|
-
mimeType: z.ZodString;
|
|
140
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
141
|
-
id: z.ZodString;
|
|
142
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
143
|
-
url: z.ZodString;
|
|
144
|
-
mimeType: z.ZodString;
|
|
145
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
146
|
-
id: z.ZodString;
|
|
147
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
148
|
-
encodedData: z.ZodString;
|
|
149
|
-
mimeType: z.ZodString;
|
|
150
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
151
|
-
id: z.ZodString;
|
|
152
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
153
|
-
data: z.ZodString;
|
|
154
|
-
mimeType: z.ZodString;
|
|
155
|
-
}, z.core.$strip>]>>;
|
|
156
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
158
|
-
id: z.ZodString;
|
|
159
|
-
type: z.ZodLiteral<"expertMessage">;
|
|
160
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
161
|
-
id: z.ZodString;
|
|
162
|
-
type: z.ZodLiteral<"textPart">;
|
|
163
|
-
text: z.ZodString;
|
|
164
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
165
|
-
id: z.ZodString;
|
|
166
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
167
|
-
toolCallId: z.ZodString;
|
|
168
|
-
toolName: z.ZodString;
|
|
169
|
-
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
170
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
171
|
-
id: z.ZodString;
|
|
172
|
-
type: z.ZodLiteral<"thinkingPart">;
|
|
173
|
-
thinking: z.ZodString;
|
|
174
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
175
|
-
}, z.core.$strip>]>>;
|
|
176
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
177
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
178
|
-
id: z.ZodString;
|
|
179
|
-
type: z.ZodLiteral<"toolMessage">;
|
|
180
|
-
contents: z.ZodArray<z.ZodObject<{
|
|
181
|
-
id: z.ZodString;
|
|
182
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
183
|
-
toolCallId: z.ZodString;
|
|
184
|
-
toolName: z.ZodString;
|
|
185
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
186
|
-
id: z.ZodString;
|
|
187
|
-
type: z.ZodLiteral<"textPart">;
|
|
188
|
-
text: z.ZodString;
|
|
189
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
190
|
-
id: z.ZodString;
|
|
191
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
192
|
-
encodedData: z.ZodString;
|
|
193
|
-
mimeType: z.ZodString;
|
|
194
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
195
|
-
id: z.ZodString;
|
|
196
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
197
|
-
encodedData: z.ZodString;
|
|
198
|
-
mimeType: z.ZodString;
|
|
199
|
-
}, z.core.$strip>]>>;
|
|
200
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
-
}, z.core.$strip>>;
|
|
202
|
-
cache: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
-
}, z.core.$strip>]>>;
|
|
204
|
-
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
205
|
-
id: z.ZodString;
|
|
206
|
-
skillName: z.ZodString;
|
|
207
|
-
toolName: z.ZodString;
|
|
208
|
-
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
209
|
-
}, z.core.$strip>>>;
|
|
210
|
-
toolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
211
|
-
id: z.ZodString;
|
|
212
|
-
skillName: z.ZodString;
|
|
213
|
-
toolName: z.ZodString;
|
|
214
|
-
result: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
215
|
-
id: z.ZodString;
|
|
216
|
-
type: z.ZodLiteral<"textPart">;
|
|
217
|
-
text: z.ZodString;
|
|
218
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
219
|
-
id: z.ZodString;
|
|
220
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
221
|
-
url: z.ZodURL;
|
|
222
|
-
mimeType: z.ZodString;
|
|
223
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
224
|
-
id: z.ZodString;
|
|
225
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
226
|
-
encodedData: z.ZodString;
|
|
227
|
-
mimeType: z.ZodString;
|
|
228
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
229
|
-
id: z.ZodString;
|
|
230
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
231
|
-
data: z.ZodString;
|
|
232
|
-
mimeType: z.ZodString;
|
|
233
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
234
|
-
id: z.ZodString;
|
|
235
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
236
|
-
url: z.ZodString;
|
|
237
|
-
mimeType: z.ZodString;
|
|
238
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
239
|
-
id: z.ZodString;
|
|
240
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
241
|
-
encodedData: z.ZodString;
|
|
242
|
-
mimeType: z.ZodString;
|
|
243
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
244
|
-
id: z.ZodString;
|
|
245
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
246
|
-
data: z.ZodString;
|
|
247
|
-
mimeType: z.ZodString;
|
|
248
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
-
id: z.ZodString;
|
|
250
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
251
|
-
toolCallId: z.ZodString;
|
|
252
|
-
toolName: z.ZodString;
|
|
253
|
-
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
254
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
255
|
-
id: z.ZodString;
|
|
256
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
257
|
-
toolCallId: z.ZodString;
|
|
258
|
-
toolName: z.ZodString;
|
|
259
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
260
|
-
id: z.ZodString;
|
|
261
|
-
type: z.ZodLiteral<"textPart">;
|
|
262
|
-
text: z.ZodString;
|
|
263
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
264
|
-
id: z.ZodString;
|
|
265
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
266
|
-
encodedData: z.ZodString;
|
|
267
|
-
mimeType: z.ZodString;
|
|
268
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
269
|
-
id: z.ZodString;
|
|
270
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
271
|
-
encodedData: z.ZodString;
|
|
272
|
-
mimeType: z.ZodString;
|
|
273
|
-
}, z.core.$strip>]>>;
|
|
274
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
276
|
-
id: z.ZodString;
|
|
277
|
-
type: z.ZodLiteral<"thinkingPart">;
|
|
278
|
-
thinking: z.ZodString;
|
|
279
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
280
|
-
}, z.core.$strip>], "type">>;
|
|
281
|
-
}, z.core.$strip>>>;
|
|
282
|
-
pendingToolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
283
|
-
id: z.ZodString;
|
|
284
|
-
skillName: z.ZodString;
|
|
285
|
-
toolName: z.ZodString;
|
|
286
|
-
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
287
|
-
}, z.core.$strip>>>;
|
|
288
|
-
partialToolResults: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
289
|
-
id: z.ZodString;
|
|
290
|
-
skillName: z.ZodString;
|
|
291
|
-
toolName: z.ZodString;
|
|
292
|
-
result: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
293
|
-
id: z.ZodString;
|
|
294
|
-
type: z.ZodLiteral<"textPart">;
|
|
295
|
-
text: z.ZodString;
|
|
296
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
297
|
-
id: z.ZodString;
|
|
298
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
299
|
-
url: z.ZodURL;
|
|
300
|
-
mimeType: z.ZodString;
|
|
301
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
302
|
-
id: z.ZodString;
|
|
303
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
304
|
-
encodedData: z.ZodString;
|
|
305
|
-
mimeType: z.ZodString;
|
|
306
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
307
|
-
id: z.ZodString;
|
|
308
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
309
|
-
data: z.ZodString;
|
|
310
|
-
mimeType: z.ZodString;
|
|
311
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
312
|
-
id: z.ZodString;
|
|
313
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
314
|
-
url: z.ZodString;
|
|
315
|
-
mimeType: z.ZodString;
|
|
316
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
317
|
-
id: z.ZodString;
|
|
318
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
319
|
-
encodedData: z.ZodString;
|
|
320
|
-
mimeType: z.ZodString;
|
|
321
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
322
|
-
id: z.ZodString;
|
|
323
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
324
|
-
data: z.ZodString;
|
|
325
|
-
mimeType: z.ZodString;
|
|
326
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
327
|
-
id: z.ZodString;
|
|
328
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
329
|
-
toolCallId: z.ZodString;
|
|
330
|
-
toolName: z.ZodString;
|
|
331
|
-
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
332
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
333
|
-
id: z.ZodString;
|
|
334
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
335
|
-
toolCallId: z.ZodString;
|
|
336
|
-
toolName: z.ZodString;
|
|
337
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
338
|
-
id: z.ZodString;
|
|
339
|
-
type: z.ZodLiteral<"textPart">;
|
|
340
|
-
text: z.ZodString;
|
|
341
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
342
|
-
id: z.ZodString;
|
|
343
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
344
|
-
encodedData: z.ZodString;
|
|
345
|
-
mimeType: z.ZodString;
|
|
346
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
347
|
-
id: z.ZodString;
|
|
348
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
349
|
-
encodedData: z.ZodString;
|
|
350
|
-
mimeType: z.ZodString;
|
|
351
|
-
}, z.core.$strip>]>>;
|
|
352
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
353
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
354
|
-
id: z.ZodString;
|
|
355
|
-
type: z.ZodLiteral<"thinkingPart">;
|
|
356
|
-
thinking: z.ZodString;
|
|
357
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
358
|
-
}, z.core.$strip>], "type">>;
|
|
359
|
-
}, z.core.$strip>>>;
|
|
360
|
-
usage: z.ZodObject<{
|
|
361
|
-
inputTokens: z.ZodNumber;
|
|
362
|
-
outputTokens: z.ZodNumber;
|
|
363
|
-
reasoningTokens: z.ZodNumber;
|
|
364
|
-
totalTokens: z.ZodNumber;
|
|
365
|
-
cachedInputTokens: z.ZodNumber;
|
|
366
|
-
}, z.core.$strip>;
|
|
367
|
-
startedAt: z.ZodNumber;
|
|
368
|
-
finishedAt: z.ZodOptional<z.ZodNumber>;
|
|
369
|
-
}, z.core.$strip>;
|
|
370
|
-
//# sourceMappingURL=step.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../src/schemas/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAOzF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAElD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAGvC;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,CAAC,kBAAkB,GAAG,WAAW,GAAG,WAAW,CAAC,EAAE,CAAA;IAClE,0CAA0C;IAC1C,WAAW,EAAE,OAAO,EAAE,CAAA;IACtB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,wCAAwC;IACxC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,gFAAgF;IAChF,gBAAgB,CAAC,EAAE,QAAQ,EAAE,CAAA;IAC7B,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,UAAU,EAAE,CAAA;IACjC,gCAAgC;IAChC,KAAK,EAAE,KAAK,CAAA;IACZ,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAA;IACjB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAarB,CAAA"}
|
package/dist/src/schemas/step.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { instructionMessageSchema, messageSchema, toolMessageSchema, userMessageSchema, } from "./message.js";
|
|
3
|
-
import { toolCallSchema } from "./tool-call.js";
|
|
4
|
-
import { toolResultSchema } from "./tool-result.js";
|
|
5
|
-
import { usageSchema } from "./usage.js";
|
|
6
|
-
export const stepSchema = z.object({
|
|
7
|
-
stepNumber: z.number(),
|
|
8
|
-
inputMessages: z
|
|
9
|
-
.array(z.union([instructionMessageSchema, userMessageSchema, toolMessageSchema]))
|
|
10
|
-
.optional(),
|
|
11
|
-
newMessages: z.array(messageSchema),
|
|
12
|
-
toolCalls: z.array(toolCallSchema).optional(),
|
|
13
|
-
toolResults: z.array(toolResultSchema).optional(),
|
|
14
|
-
pendingToolCalls: z.array(toolCallSchema).optional(),
|
|
15
|
-
partialToolResults: z.array(toolResultSchema).optional(),
|
|
16
|
-
usage: usageSchema,
|
|
17
|
-
startedAt: z.number(),
|
|
18
|
-
finishedAt: z.number().optional(),
|
|
19
|
-
});
|
|
20
|
-
stepSchema;
|
|
21
|
-
//# sourceMappingURL=step.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"step.js","sourceRoot":"","sources":["../../../src/schemas/step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AA6BxC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,aAAa,EAAE,CAAC;SACb,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,wBAAwB,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC;SAChF,QAAQ,EAAE;IACb,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;IACnC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;IAC7C,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE;IACjD,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;IACpD,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE;IACxD,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAA;AACF,UAAoC,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
/** A tool call made by an Expert during execution */
|
|
3
|
-
export interface ToolCall {
|
|
4
|
-
/** Unique identifier for this tool call */
|
|
5
|
-
id: string;
|
|
6
|
-
/** Name of the skill providing the tool */
|
|
7
|
-
skillName: string;
|
|
8
|
-
/** Name of the tool being called */
|
|
9
|
-
toolName: string;
|
|
10
|
-
/** Arguments passed to the tool */
|
|
11
|
-
args: Record<string, unknown>;
|
|
12
|
-
}
|
|
13
|
-
export declare const toolCallSchema: z.ZodObject<{
|
|
14
|
-
id: z.ZodString;
|
|
15
|
-
skillName: z.ZodString;
|
|
16
|
-
toolName: z.ZodString;
|
|
17
|
-
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
18
|
-
}, z.core.$strip>;
|
|
19
|
-
//# sourceMappingURL=tool-call.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-call.d.ts","sourceRoot":"","sources":["../../../src/schemas/tool-call.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,qDAAqD;AACrD,MAAM,WAAW,QAAQ;IACvB,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAA;IACV,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC9B;AAED,eAAO,MAAM,cAAc;;;;;iBAKzB,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { maxSkillNameLength, maxSkillToolNameLength } from "../constants/constants.js";
|
|
3
|
-
export const toolCallSchema = z.object({
|
|
4
|
-
id: z.string().min(1).max(255),
|
|
5
|
-
skillName: z.string().min(1).max(maxSkillNameLength),
|
|
6
|
-
toolName: z.string().min(1).max(maxSkillToolNameLength),
|
|
7
|
-
args: z.record(z.string().min(1), z.unknown()),
|
|
8
|
-
});
|
|
9
|
-
toolCallSchema;
|
|
10
|
-
//# sourceMappingURL=tool-call.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-call.js","sourceRoot":"","sources":["../../../src/schemas/tool-call.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AActF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAC9B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC;IACpD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC;IACvD,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;CAC/C,CAAC,CAAA;AACF,cAA4C,CAAA"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { MessagePart } from "./message-part.js";
|
|
3
|
-
/** Result returned from a tool call */
|
|
4
|
-
export interface ToolResult {
|
|
5
|
-
/** Unique identifier for this result */
|
|
6
|
-
id: string;
|
|
7
|
-
/** Name of the skill that provided the tool */
|
|
8
|
-
skillName: string;
|
|
9
|
-
/** Name of the tool that was called */
|
|
10
|
-
toolName: string;
|
|
11
|
-
/** Content parts returned by the tool */
|
|
12
|
-
result: MessagePart[];
|
|
13
|
-
}
|
|
14
|
-
export declare const toolResultSchema: z.ZodObject<{
|
|
15
|
-
id: z.ZodString;
|
|
16
|
-
skillName: z.ZodString;
|
|
17
|
-
toolName: z.ZodString;
|
|
18
|
-
result: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
19
|
-
id: z.ZodString;
|
|
20
|
-
type: z.ZodLiteral<"textPart">;
|
|
21
|
-
text: z.ZodString;
|
|
22
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
-
id: z.ZodString;
|
|
24
|
-
type: z.ZodLiteral<"imageUrlPart">;
|
|
25
|
-
url: z.ZodURL;
|
|
26
|
-
mimeType: z.ZodString;
|
|
27
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
28
|
-
id: z.ZodString;
|
|
29
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
30
|
-
encodedData: z.ZodString;
|
|
31
|
-
mimeType: z.ZodString;
|
|
32
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
33
|
-
id: z.ZodString;
|
|
34
|
-
type: z.ZodLiteral<"imageBinaryPart">;
|
|
35
|
-
data: z.ZodString;
|
|
36
|
-
mimeType: z.ZodString;
|
|
37
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
-
id: z.ZodString;
|
|
39
|
-
type: z.ZodLiteral<"fileUrlPart">;
|
|
40
|
-
url: z.ZodString;
|
|
41
|
-
mimeType: z.ZodString;
|
|
42
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
-
id: z.ZodString;
|
|
44
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
45
|
-
encodedData: z.ZodString;
|
|
46
|
-
mimeType: z.ZodString;
|
|
47
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
48
|
-
id: z.ZodString;
|
|
49
|
-
type: z.ZodLiteral<"fileBinaryPart">;
|
|
50
|
-
data: z.ZodString;
|
|
51
|
-
mimeType: z.ZodString;
|
|
52
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
-
id: z.ZodString;
|
|
54
|
-
type: z.ZodLiteral<"toolCallPart">;
|
|
55
|
-
toolCallId: z.ZodString;
|
|
56
|
-
toolName: z.ZodString;
|
|
57
|
-
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
58
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
-
id: z.ZodString;
|
|
60
|
-
type: z.ZodLiteral<"toolResultPart">;
|
|
61
|
-
toolCallId: z.ZodString;
|
|
62
|
-
toolName: z.ZodString;
|
|
63
|
-
contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
64
|
-
id: z.ZodString;
|
|
65
|
-
type: z.ZodLiteral<"textPart">;
|
|
66
|
-
text: z.ZodString;
|
|
67
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
68
|
-
id: z.ZodString;
|
|
69
|
-
type: z.ZodLiteral<"imageInlinePart">;
|
|
70
|
-
encodedData: z.ZodString;
|
|
71
|
-
mimeType: z.ZodString;
|
|
72
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
73
|
-
id: z.ZodString;
|
|
74
|
-
type: z.ZodLiteral<"fileInlinePart">;
|
|
75
|
-
encodedData: z.ZodString;
|
|
76
|
-
mimeType: z.ZodString;
|
|
77
|
-
}, z.core.$strip>]>>;
|
|
78
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
80
|
-
id: z.ZodString;
|
|
81
|
-
type: z.ZodLiteral<"thinkingPart">;
|
|
82
|
-
thinking: z.ZodString;
|
|
83
|
-
signature: z.ZodOptional<z.ZodString>;
|
|
84
|
-
}, z.core.$strip>], "type">>;
|
|
85
|
-
}, z.core.$strip>;
|
|
86
|
-
//# sourceMappingURL=tool-result.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-result.d.ts","sourceRoot":"","sources":["../../../src/schemas/tool-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAGpD,uCAAuC;AACvC,MAAM,WAAW,UAAU;IACzB,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAA;IACjB,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAA;IAChB,yCAAyC;IACzC,MAAM,EAAE,WAAW,EAAE,CAAA;CACtB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK3B,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { maxSkillNameLength, maxSkillToolNameLength } from "../constants/constants.js";
|
|
3
|
-
import { messagePartSchema } from "./message-part.js";
|
|
4
|
-
export const toolResultSchema = z.object({
|
|
5
|
-
id: z.string().min(1).max(255),
|
|
6
|
-
skillName: z.string().min(1).max(maxSkillNameLength),
|
|
7
|
-
toolName: z.string().min(1).max(maxSkillToolNameLength),
|
|
8
|
-
result: z.array(messagePartSchema),
|
|
9
|
-
});
|
|
10
|
-
toolResultSchema;
|
|
11
|
-
//# sourceMappingURL=tool-result.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-result.js","sourceRoot":"","sources":["../../../src/schemas/tool-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAEtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAcrD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAC9B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC;IACpD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC;IACvD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC;CACnC,CAAC,CAAA;AACF,gBAAgD,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
/** Token usage statistics for a single step or run */
|
|
3
|
-
export interface Usage {
|
|
4
|
-
/** Number of tokens in the input prompt */
|
|
5
|
-
inputTokens: number;
|
|
6
|
-
/** Number of tokens generated in the response */
|
|
7
|
-
outputTokens: number;
|
|
8
|
-
/** Number of tokens used for reasoning (extended thinking) */
|
|
9
|
-
reasoningTokens: number;
|
|
10
|
-
/** Total tokens (input + output) */
|
|
11
|
-
totalTokens: number;
|
|
12
|
-
/** Number of input tokens served from cache */
|
|
13
|
-
cachedInputTokens: number;
|
|
14
|
-
}
|
|
15
|
-
export declare const usageSchema: z.ZodObject<{
|
|
16
|
-
inputTokens: z.ZodNumber;
|
|
17
|
-
outputTokens: z.ZodNumber;
|
|
18
|
-
reasoningTokens: z.ZodNumber;
|
|
19
|
-
totalTokens: z.ZodNumber;
|
|
20
|
-
cachedInputTokens: z.ZodNumber;
|
|
21
|
-
}, z.core.$strip>;
|
|
22
|
-
//# sourceMappingURL=usage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../src/schemas/usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,sDAAsD;AACtD,MAAM,WAAW,KAAK;IACpB,2CAA2C;IAC3C,WAAW,EAAE,MAAM,CAAA;IACnB,iDAAiD;IACjD,YAAY,EAAE,MAAM,CAAA;IACpB,8DAA8D;IAC9D,eAAe,EAAE,MAAM,CAAA;IACvB,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAA;IACnB,+CAA+C;IAC/C,iBAAiB,EAAE,MAAM,CAAA;CAC1B;AAED,eAAO,MAAM,WAAW;;;;;;iBAMtB,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export const usageSchema = z.object({
|
|
3
|
-
inputTokens: z.number(),
|
|
4
|
-
outputTokens: z.number(),
|
|
5
|
-
reasoningTokens: z.number(),
|
|
6
|
-
totalTokens: z.number(),
|
|
7
|
-
cachedInputTokens: z.number(),
|
|
8
|
-
});
|
|
9
|
-
usageSchema;
|
|
10
|
-
//# sourceMappingURL=usage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../../../src/schemas/usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAgBvB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;CAC9B,CAAC,CAAA;AACF,WAAsC,CAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Activity, ActivityOrGroup } from "../schemas/activity.js";
|
|
2
|
-
import type { Checkpoint } from "../schemas/checkpoint.js";
|
|
3
|
-
import type { Step } from "../schemas/step.js";
|
|
4
|
-
import type { ToolCall } from "../schemas/tool-call.js";
|
|
5
|
-
import type { ToolResult } from "../schemas/tool-result.js";
|
|
6
|
-
export declare const BASE_SKILL_PREFIX = "@perstack/base";
|
|
7
|
-
export type GetActivitiesParams = {
|
|
8
|
-
checkpoint: Checkpoint;
|
|
9
|
-
step: Step;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Computes activities from a checkpoint and step.
|
|
13
|
-
* Returns an array of activities or activity groups, supporting parallel tool calls and delegations.
|
|
14
|
-
* When multiple activities are produced from a single step, they are wrapped in a ParallelActivitiesGroup
|
|
15
|
-
* with shared reasoning.
|
|
16
|
-
*/
|
|
17
|
-
export declare function getActivities(params: GetActivitiesParams): ActivityOrGroup[];
|
|
18
|
-
export declare function createBaseToolActivity(toolName: string, toolCall: ToolCall, toolResult: ToolResult, reasoning: string | undefined): Activity;
|
|
19
|
-
export declare function createGeneralToolActivity(skillName: string, toolName: string, toolCall: ToolCall, toolResult: ToolResult, reasoning: string | undefined): Activity;
|
|
20
|
-
//# sourceMappingURL=activity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../src/utils/activity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAA2B,MAAM,wBAAwB,CAAA;AAChG,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,0BAA0B,CAAA;AAG5E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAE3D,eAAO,MAAM,iBAAiB,mBAAmB,CAAA;AAEjD,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,UAAU,CAAA;IACtB,IAAI,EAAE,IAAI,CAAA;CACX,CAAA;AAqDD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,eAAe,EAAE,CAiH5E;AAiFD,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,QAAQ,CA4JV;AAED,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,QAAQ,CAcV"}
|