terse-types 0.0.21 → 0.0.23
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/README.md +17 -22
- package/dist/ApiRouteBuilder.d.ts +0 -3
- package/dist/ApiRoutes.json +0 -3
- package/dist/FrontendRoutes.json +1 -0
- package/dist/FrontendRoutesBuilder.d.ts +1 -0
- package/dist/InvalidationKeys.d.ts +0 -1
- package/dist/InvalidationKeys.js +0 -5
- package/dist/JsonSchemaUtils.d.ts +5 -0
- package/dist/JsonSchemaUtils.js +23 -0
- package/dist/ModelEvents.d.ts +87 -114
- package/dist/ModelEvents.js +29 -73
- package/dist/SocketEvents.d.ts +0 -5
- package/dist/SocketEvents.js +1 -7
- package/dist/ToolDisplayUtils.js +0 -161
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/json-schema/terse-types.schema.json +234 -66
- package/package.json +1 -1
- package/dist/SandboxTypes.d.ts +0 -15
- package/dist/SandboxTypes.js +0 -1
- package/dist/TriggerEventPresenters.d.ts +0 -3
- package/dist/TriggerEventPresenters.js +0 -238
- package/dist/TriggerEvents.d.ts +0 -4054
- package/dist/TriggerEvents.js +0 -437
package/README.md
CHANGED
|
@@ -1,43 +1,38 @@
|
|
|
1
1
|
# terse-types
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Internal shared types for the [Terse](https://useterse.ai) platform.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## You probably don't want to be here
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install terse-types
|
|
9
|
-
```
|
|
7
|
+
`terse-types` is a workspace package that the Terse backend, frontend, CLI, and SDK use to share TypeScript types. It is not the public API.
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
pnpm add terse-types
|
|
13
|
-
```
|
|
9
|
+
If you landed here while building a workflow, you almost certainly want one of these instead:
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
- **[`terse-cli`](https://www.npmjs.com/package/terse-cli)** to scaffold, test, and deploy workflows
|
|
12
|
+
- **[`terse-sdk`](https://www.npmjs.com/package/terse-sdk)** to write workflow code (`createJob`, `TerseAgent`, trigger types)
|
|
13
|
+
- **[docs.useterse.ai](https://docs.useterse.ai)** for guides and reference
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
If a doc, post, or LLM pointed you at `terse-types` directly, that was probably a mistake on our end. [Let us know](mailto:support@useterse.ai) so we can fix it. The types you actually need are re-exported from `terse-sdk`.
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
import { IntegrationType, type User } from "terse-types"
|
|
21
|
-
```
|
|
17
|
+
## If you really do need it
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
Anything in `terse-types` is internal and may change without notice. There is no stability guarantee, no migration guide, and no semver discipline beyond what the workspace happens to need.
|
|
24
20
|
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
import type { RunHistoryStatus } from "terse-types/RunHistoryTypes"
|
|
21
|
+
```bash
|
|
22
|
+
pnpm add terse-types
|
|
28
23
|
```
|
|
29
24
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
```ts
|
|
26
|
+
import { IntegrationType, type User } from "terse-types"
|
|
27
|
+
```
|
|
33
28
|
|
|
34
|
-
|
|
29
|
+
## Local development
|
|
35
30
|
|
|
36
31
|
```bash
|
|
37
32
|
pnpm --filter terse-types run build
|
|
38
33
|
```
|
|
39
34
|
|
|
40
|
-
If you are working on the local CLI and SDK at the same time, relink
|
|
35
|
+
If you are working on the local CLI and SDK at the same time, relink everything from the repo root:
|
|
41
36
|
|
|
42
37
|
```bash
|
|
43
38
|
pnpm run install-global
|
|
@@ -177,8 +177,5 @@ export declare const ApiRoutes: {
|
|
|
177
177
|
CREATE: string;
|
|
178
178
|
BY_ID: string;
|
|
179
179
|
};
|
|
180
|
-
BUILDER_CHAT: {
|
|
181
|
-
HISTORY_BY_SESSION_ID: string;
|
|
182
|
-
};
|
|
183
180
|
};
|
|
184
181
|
export declare function buildRoute(pattern: string, params: Record<string, string | number>): string;
|
package/dist/ApiRoutes.json
CHANGED
package/dist/FrontendRoutes.json
CHANGED
|
@@ -43,7 +43,6 @@ export declare const agentDetailKey: (id: string | null) => readonly [string, {
|
|
|
43
43
|
export declare const agentImprovementsKey: (agentId: string | null) => readonly [string, {
|
|
44
44
|
agentId: string;
|
|
45
45
|
}] | null;
|
|
46
|
-
export declare const builderChatHistoryKey: (sessionId: string | null | undefined) => readonly [string, string] | null;
|
|
47
46
|
export declare const orgLogoKey: (organizationId: string | null | undefined) => readonly [string, string] | null;
|
|
48
47
|
export declare const userByIdKey: (userId: string | null | undefined) => readonly [string, string] | null;
|
|
49
48
|
export declare const agentFilesKey: (agentId: string) => readonly [string, string];
|
package/dist/InvalidationKeys.js
CHANGED
|
@@ -130,11 +130,6 @@ export const agentImprovementsKey = (agentId) => {
|
|
|
130
130
|
return null;
|
|
131
131
|
return ["agentImprovements", { agentId }];
|
|
132
132
|
};
|
|
133
|
-
export const builderChatHistoryKey = (sessionId) => {
|
|
134
|
-
if (!sessionId)
|
|
135
|
-
return null;
|
|
136
|
-
return ["builderChatHistory", sessionId];
|
|
137
|
-
};
|
|
138
133
|
export const orgLogoKey = (organizationId) => {
|
|
139
134
|
if (!organizationId)
|
|
140
135
|
return null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function isPlainObject(value) {
|
|
2
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Zod 4 embeds non-JSON Schema metadata under "~*" keys (for example "~standard").
|
|
6
|
+
* Strip those keys recursively before passing schemas to model providers.
|
|
7
|
+
*/
|
|
8
|
+
export function stripZodJsonSchemaMetadata(value) {
|
|
9
|
+
if (Array.isArray(value)) {
|
|
10
|
+
return value.map(item => stripZodJsonSchemaMetadata(item));
|
|
11
|
+
}
|
|
12
|
+
if (!isPlainObject(value)) {
|
|
13
|
+
return value;
|
|
14
|
+
}
|
|
15
|
+
const cleaned = {};
|
|
16
|
+
for (const [key, nestedValue] of Object.entries(value)) {
|
|
17
|
+
if (key.startsWith("~")) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
cleaned[key] = stripZodJsonSchemaMetadata(nestedValue);
|
|
21
|
+
}
|
|
22
|
+
return cleaned;
|
|
23
|
+
}
|
package/dist/ModelEvents.d.ts
CHANGED
|
@@ -18,43 +18,40 @@ export declare const changedItemSchema: z.ZodObject<{
|
|
|
18
18
|
}, z.core.$strip>;
|
|
19
19
|
export type ChangedItem = z.infer<typeof changedItemSchema>;
|
|
20
20
|
export declare const runErrorSchema: z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
timestamp: z.ZodNumber;
|
|
23
|
+
response_id: z.ZodString;
|
|
21
24
|
type: z.ZodLiteral<"RunError">;
|
|
22
|
-
id: z.ZodOptional<z.ZodString>;
|
|
23
25
|
error: z.ZodString;
|
|
24
26
|
code: z.ZodOptional<z.ZodString>;
|
|
25
|
-
timestamp: z.ZodNumber;
|
|
26
27
|
}, z.core.$strip>;
|
|
27
28
|
export type RunError = z.infer<typeof runErrorSchema>;
|
|
28
29
|
export declare const processOutputSchema: z.ZodObject<{
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
timestamp: z.ZodNumber;
|
|
32
|
+
response_id: z.ZodString;
|
|
29
33
|
type: z.ZodLiteral<"ProcessOutput">;
|
|
30
|
-
id: z.ZodOptional<z.ZodString>;
|
|
31
34
|
stream: z.ZodEnum<{
|
|
32
35
|
stdout: "stdout";
|
|
33
36
|
stderr: "stderr";
|
|
34
37
|
}>;
|
|
35
38
|
content: z.ZodString;
|
|
36
39
|
label: z.ZodString;
|
|
37
|
-
timestamp: z.ZodNumber;
|
|
38
40
|
}, z.core.$strip>;
|
|
39
41
|
export type ProcessOutput = z.infer<typeof processOutputSchema>;
|
|
40
42
|
export declare const cancelledSchema: z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
timestamp: z.ZodNumber;
|
|
45
|
+
response_id: z.ZodString;
|
|
41
46
|
type: z.ZodLiteral<"Cancelled">;
|
|
42
|
-
id: z.ZodOptional<z.ZodString>;
|
|
43
47
|
reason: z.ZodOptional<z.ZodString>;
|
|
44
|
-
timestamp: z.ZodNumber;
|
|
45
48
|
}, z.core.$strip>;
|
|
46
49
|
export type Cancelled = z.infer<typeof cancelledSchema>;
|
|
47
|
-
export declare const functionCallSchema: z.ZodObject<{
|
|
48
|
-
function_name: z.ZodString;
|
|
49
|
-
result: z.ZodString;
|
|
50
|
-
step_id: z.ZodString;
|
|
51
|
-
}, z.core.$strip>;
|
|
52
|
-
export type FunctionCall = z.infer<typeof functionCallSchema>;
|
|
53
50
|
export declare const naturalStopSchema: z.ZodObject<{
|
|
54
|
-
|
|
55
|
-
type: z.ZodLiteral<"NaturalStop">;
|
|
56
|
-
id: z.ZodOptional<z.ZodString>;
|
|
51
|
+
id: z.ZodString;
|
|
57
52
|
timestamp: z.ZodNumber;
|
|
53
|
+
response_id: z.ZodString;
|
|
54
|
+
type: z.ZodLiteral<"NaturalStop">;
|
|
58
55
|
}, z.core.$strip>;
|
|
59
56
|
export type NaturalStop = z.infer<typeof naturalStopSchema>;
|
|
60
57
|
export declare const sendModelRequestSchema: z.ZodObject<{
|
|
@@ -68,54 +65,46 @@ export declare const sendModelRequestSchema: z.ZodObject<{
|
|
|
68
65
|
}, z.core.$strip>;
|
|
69
66
|
export type SendModelRequest = z.infer<typeof sendModelRequestSchema>;
|
|
70
67
|
export declare const toolApprovalResponseSchema: z.ZodObject<{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
id: z.ZodString;
|
|
69
|
+
timestamp: z.ZodNumber;
|
|
70
|
+
response_id: z.ZodString;
|
|
74
71
|
approved: z.ZodBoolean;
|
|
75
72
|
rejection_reason: z.ZodOptional<z.ZodString>;
|
|
76
|
-
|
|
73
|
+
type: z.ZodLiteral<"ToolApprovalResponse">;
|
|
77
74
|
}, z.core.$strip>;
|
|
78
75
|
export type ToolApprovalResponse = z.infer<typeof toolApprovalResponseSchema>;
|
|
79
76
|
export declare const toolApprovalRequestSchema: z.ZodObject<{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
id: z.ZodString;
|
|
78
|
+
timestamp: z.ZodNumber;
|
|
79
|
+
response_id: z.ZodString;
|
|
83
80
|
name: z.ZodString;
|
|
84
81
|
arguments: z.ZodString;
|
|
85
|
-
|
|
82
|
+
type: z.ZodLiteral<"ToolApprovalRequest">;
|
|
86
83
|
}, z.core.$strip>;
|
|
87
84
|
export type ToolApprovalRequest = z.infer<typeof toolApprovalRequestSchema>;
|
|
88
85
|
export declare const textDeltaSchema: z.ZodObject<{
|
|
86
|
+
id: z.ZodString;
|
|
87
|
+
timestamp: z.ZodNumber;
|
|
88
|
+
response_id: z.ZodString;
|
|
89
89
|
delta: z.ZodString;
|
|
90
|
-
step_id: z.ZodString;
|
|
91
90
|
type: z.ZodLiteral<"TextDelta">;
|
|
92
|
-
id: z.ZodOptional<z.ZodString>;
|
|
93
|
-
timestamp: z.ZodNumber;
|
|
94
91
|
}, z.core.$strip>;
|
|
95
92
|
export type TextDelta = z.infer<typeof textDeltaSchema>;
|
|
96
|
-
export declare const toolCallGeneratingSchema: z.ZodObject<{
|
|
97
|
-
tool_name: z.ZodString;
|
|
98
|
-
step_id: z.ZodString;
|
|
99
|
-
type: z.ZodLiteral<"ToolCallGenerating">;
|
|
100
|
-
id: z.ZodOptional<z.ZodString>;
|
|
101
|
-
timestamp: z.ZodNumber;
|
|
102
|
-
}, z.core.$strip>;
|
|
103
|
-
export type ToolCallGenerating = z.infer<typeof toolCallGeneratingSchema>;
|
|
104
93
|
export declare const toolCallSchema: z.ZodObject<{
|
|
94
|
+
id: z.ZodString;
|
|
95
|
+
timestamp: z.ZodNumber;
|
|
96
|
+
response_id: z.ZodString;
|
|
105
97
|
summary: z.ZodString;
|
|
106
|
-
step_id: z.ZodString;
|
|
107
|
-
type: z.ZodLiteral<"ToolCall">;
|
|
108
|
-
id: z.ZodOptional<z.ZodString>;
|
|
109
98
|
parameters: z.ZodString;
|
|
110
99
|
integration: z.ZodString;
|
|
111
|
-
|
|
100
|
+
type: z.ZodLiteral<"ToolCall">;
|
|
112
101
|
}, z.core.$strip>;
|
|
113
102
|
export type ToolCall = z.infer<typeof toolCallSchema>;
|
|
114
103
|
export declare const thinkingSchema: z.ZodObject<{
|
|
115
|
-
|
|
116
|
-
type: z.ZodLiteral<"Thinking">;
|
|
117
|
-
id: z.ZodOptional<z.ZodString>;
|
|
104
|
+
id: z.ZodString;
|
|
118
105
|
timestamp: z.ZodNumber;
|
|
106
|
+
response_id: z.ZodString;
|
|
107
|
+
type: z.ZodLiteral<"Thinking">;
|
|
119
108
|
}, z.core.$strip>;
|
|
120
109
|
export type Thinking = z.infer<typeof thinkingSchema>;
|
|
121
110
|
export declare enum ToolCallExecutionStatus {
|
|
@@ -126,12 +115,12 @@ export declare enum ToolCallExecutionStatus {
|
|
|
126
115
|
}
|
|
127
116
|
export declare const toolCallExecutionStatusSchema: z.ZodEnum<typeof ToolCallExecutionStatus>;
|
|
128
117
|
export declare const toolCallCompleteSchema: z.ZodObject<{
|
|
129
|
-
|
|
118
|
+
id: z.ZodString;
|
|
130
119
|
timestamp: z.ZodNumber;
|
|
120
|
+
response_id: z.ZodString;
|
|
121
|
+
tool_name: z.ZodString;
|
|
131
122
|
status: z.ZodEnum<typeof ToolCallExecutionStatus>;
|
|
132
|
-
step_id: z.ZodString;
|
|
133
123
|
type: z.ZodLiteral<"ToolCallComplete">;
|
|
134
|
-
id: z.ZodOptional<z.ZodString>;
|
|
135
124
|
changed_items: z.ZodArray<z.ZodObject<{
|
|
136
125
|
type_name: z.ZodEnum<typeof EntityType>;
|
|
137
126
|
id: z.ZodString;
|
|
@@ -146,13 +135,13 @@ export declare const toolCallCompleteSchema: z.ZodObject<{
|
|
|
146
135
|
}, z.core.$strip>;
|
|
147
136
|
export type ToolCallComplete = z.infer<typeof toolCallCompleteSchema>;
|
|
148
137
|
export declare const filterResultSchema: z.ZodObject<{
|
|
138
|
+
id: z.ZodString;
|
|
139
|
+
timestamp: z.ZodNumber;
|
|
140
|
+
response_id: z.ZodString;
|
|
149
141
|
isRelevant: z.ZodBoolean;
|
|
150
142
|
reason: z.ZodString;
|
|
151
143
|
confidence: z.ZodNumber;
|
|
152
|
-
step_id: z.ZodString;
|
|
153
144
|
type: z.ZodLiteral<"FilterResult">;
|
|
154
|
-
id: z.ZodOptional<z.ZodString>;
|
|
155
|
-
timestamp: z.ZodNumber;
|
|
156
145
|
}, z.core.$strip>;
|
|
157
146
|
export type FilterResult = z.infer<typeof filterResultSchema>;
|
|
158
147
|
export declare enum SandboxStage {
|
|
@@ -165,12 +154,12 @@ export declare enum SandboxStage {
|
|
|
165
154
|
export declare const sandboxStageSchema: z.ZodEnum<typeof SandboxStage>;
|
|
166
155
|
export declare const SANDBOX_STAGE_LABELS: Record<SandboxStage, string>;
|
|
167
156
|
export declare const userMessageSchema: z.ZodObject<{
|
|
157
|
+
id: z.ZodString;
|
|
158
|
+
timestamp: z.ZodNumber;
|
|
159
|
+
response_id: z.ZodString;
|
|
168
160
|
type: z.ZodLiteral<"UserMessage">;
|
|
169
|
-
id: z.ZodOptional<z.ZodString>;
|
|
170
161
|
message: z.ZodString;
|
|
171
|
-
step_id: z.ZodString;
|
|
172
162
|
client_turn_id: z.ZodString;
|
|
173
|
-
timestamp: z.ZodNumber;
|
|
174
163
|
}, z.core.$strip>;
|
|
175
164
|
export type UserMessage = z.infer<typeof userMessageSchema>;
|
|
176
165
|
export declare const multipleChoiceOptionSchema: z.ZodObject<{
|
|
@@ -237,7 +226,6 @@ export declare const chatSnippetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
237
226
|
label: z.ZodString;
|
|
238
227
|
url: z.ZodString;
|
|
239
228
|
id: z.ZodOptional<z.ZodString>;
|
|
240
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
241
229
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
242
230
|
}, z.core.$strip>, z.ZodObject<{
|
|
243
231
|
type: z.ZodLiteral<"integration_prompt">;
|
|
@@ -245,13 +233,11 @@ export declare const chatSnippetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
245
233
|
message: z.ZodString;
|
|
246
234
|
stateToken: z.ZodOptional<z.ZodString>;
|
|
247
235
|
id: z.ZodOptional<z.ZodString>;
|
|
248
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
249
236
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
250
237
|
}, z.core.$strip>, z.ZodObject<{
|
|
251
238
|
type: z.ZodLiteral<"navigate">;
|
|
252
239
|
path: z.ZodString;
|
|
253
240
|
id: z.ZodOptional<z.ZodString>;
|
|
254
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
255
241
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
256
242
|
}, z.core.$strip>, z.ZodObject<{
|
|
257
243
|
type: z.ZodLiteral<"multiple_choice">;
|
|
@@ -263,26 +249,24 @@ export declare const chatSnippetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
263
249
|
}, z.core.$strip>>;
|
|
264
250
|
allowMultiple: z.ZodOptional<z.ZodBoolean>;
|
|
265
251
|
id: z.ZodOptional<z.ZodString>;
|
|
266
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
267
252
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
268
253
|
}, z.core.$strip>, z.ZodObject<{
|
|
269
254
|
type: z.ZodLiteral<"image">;
|
|
270
255
|
url: z.ZodString;
|
|
271
256
|
id: z.ZodOptional<z.ZodString>;
|
|
272
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
273
257
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
274
258
|
}, z.core.$strip>], "type">;
|
|
275
259
|
export type ChatSnippet = z.infer<typeof chatSnippetSchema>;
|
|
276
260
|
export declare const modelEventChatSnippetSchema: z.ZodObject<{
|
|
277
|
-
|
|
278
|
-
id: z.ZodOptional<z.ZodString>;
|
|
261
|
+
id: z.ZodString;
|
|
279
262
|
timestamp: z.ZodNumber;
|
|
263
|
+
response_id: z.ZodString;
|
|
264
|
+
type: z.ZodLiteral<"Snippet">;
|
|
280
265
|
snippet: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
281
266
|
type: z.ZodLiteral<"button">;
|
|
282
267
|
label: z.ZodString;
|
|
283
268
|
url: z.ZodString;
|
|
284
269
|
id: z.ZodOptional<z.ZodString>;
|
|
285
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
286
270
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
287
271
|
}, z.core.$strip>, z.ZodObject<{
|
|
288
272
|
type: z.ZodLiteral<"integration_prompt">;
|
|
@@ -290,13 +274,11 @@ export declare const modelEventChatSnippetSchema: z.ZodObject<{
|
|
|
290
274
|
message: z.ZodString;
|
|
291
275
|
stateToken: z.ZodOptional<z.ZodString>;
|
|
292
276
|
id: z.ZodOptional<z.ZodString>;
|
|
293
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
294
277
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
295
278
|
}, z.core.$strip>, z.ZodObject<{
|
|
296
279
|
type: z.ZodLiteral<"navigate">;
|
|
297
280
|
path: z.ZodString;
|
|
298
281
|
id: z.ZodOptional<z.ZodString>;
|
|
299
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
300
282
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
301
283
|
}, z.core.$strip>, z.ZodObject<{
|
|
302
284
|
type: z.ZodLiteral<"multiple_choice">;
|
|
@@ -308,51 +290,43 @@ export declare const modelEventChatSnippetSchema: z.ZodObject<{
|
|
|
308
290
|
}, z.core.$strip>>;
|
|
309
291
|
allowMultiple: z.ZodOptional<z.ZodBoolean>;
|
|
310
292
|
id: z.ZodOptional<z.ZodString>;
|
|
311
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
312
293
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
313
294
|
}, z.core.$strip>, z.ZodObject<{
|
|
314
295
|
type: z.ZodLiteral<"image">;
|
|
315
296
|
url: z.ZodString;
|
|
316
297
|
id: z.ZodOptional<z.ZodString>;
|
|
317
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
318
298
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
319
299
|
}, z.core.$strip>], "type">;
|
|
320
300
|
}, z.core.$strip>;
|
|
321
301
|
export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
302
|
+
id: z.ZodString;
|
|
303
|
+
timestamp: z.ZodNumber;
|
|
304
|
+
response_id: z.ZodString;
|
|
325
305
|
approved: z.ZodBoolean;
|
|
326
306
|
rejection_reason: z.ZodOptional<z.ZodString>;
|
|
327
|
-
|
|
307
|
+
type: z.ZodLiteral<"ToolApprovalResponse">;
|
|
328
308
|
}, z.core.$strip>, z.ZodObject<{
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
309
|
+
id: z.ZodString;
|
|
310
|
+
timestamp: z.ZodNumber;
|
|
311
|
+
response_id: z.ZodString;
|
|
332
312
|
name: z.ZodString;
|
|
333
313
|
arguments: z.ZodString;
|
|
334
|
-
|
|
314
|
+
type: z.ZodLiteral<"ToolApprovalRequest">;
|
|
335
315
|
}, z.core.$strip>, z.ZodObject<{
|
|
336
|
-
|
|
337
|
-
step_id: z.ZodString;
|
|
338
|
-
type: z.ZodLiteral<"ToolCallGenerating">;
|
|
339
|
-
id: z.ZodOptional<z.ZodString>;
|
|
316
|
+
id: z.ZodString;
|
|
340
317
|
timestamp: z.ZodNumber;
|
|
341
|
-
|
|
318
|
+
response_id: z.ZodString;
|
|
342
319
|
summary: z.ZodString;
|
|
343
|
-
step_id: z.ZodString;
|
|
344
|
-
type: z.ZodLiteral<"ToolCall">;
|
|
345
|
-
id: z.ZodOptional<z.ZodString>;
|
|
346
320
|
parameters: z.ZodString;
|
|
347
321
|
integration: z.ZodString;
|
|
348
|
-
|
|
322
|
+
type: z.ZodLiteral<"ToolCall">;
|
|
349
323
|
}, z.core.$strip>, z.ZodObject<{
|
|
350
|
-
|
|
324
|
+
id: z.ZodString;
|
|
351
325
|
timestamp: z.ZodNumber;
|
|
326
|
+
response_id: z.ZodString;
|
|
327
|
+
tool_name: z.ZodString;
|
|
352
328
|
status: z.ZodEnum<typeof ToolCallExecutionStatus>;
|
|
353
|
-
step_id: z.ZodString;
|
|
354
329
|
type: z.ZodLiteral<"ToolCallComplete">;
|
|
355
|
-
id: z.ZodOptional<z.ZodString>;
|
|
356
330
|
changed_items: z.ZodArray<z.ZodObject<{
|
|
357
331
|
type_name: z.ZodEnum<typeof EntityType>;
|
|
358
332
|
id: z.ZodString;
|
|
@@ -365,57 +339,59 @@ export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
365
339
|
error: z.ZodUnknown;
|
|
366
340
|
}, z.core.$strip>>;
|
|
367
341
|
}, z.core.$strip>, z.ZodObject<{
|
|
342
|
+
id: z.ZodString;
|
|
343
|
+
timestamp: z.ZodNumber;
|
|
344
|
+
response_id: z.ZodString;
|
|
368
345
|
delta: z.ZodString;
|
|
369
|
-
step_id: z.ZodString;
|
|
370
346
|
type: z.ZodLiteral<"TextDelta">;
|
|
371
|
-
id: z.ZodOptional<z.ZodString>;
|
|
372
|
-
timestamp: z.ZodNumber;
|
|
373
347
|
}, z.core.$strip>, z.ZodObject<{
|
|
348
|
+
id: z.ZodString;
|
|
349
|
+
timestamp: z.ZodNumber;
|
|
350
|
+
response_id: z.ZodString;
|
|
374
351
|
type: z.ZodLiteral<"RunError">;
|
|
375
|
-
id: z.ZodOptional<z.ZodString>;
|
|
376
352
|
error: z.ZodString;
|
|
377
353
|
code: z.ZodOptional<z.ZodString>;
|
|
378
|
-
timestamp: z.ZodNumber;
|
|
379
354
|
}, z.core.$strip>, z.ZodObject<{
|
|
355
|
+
id: z.ZodString;
|
|
356
|
+
timestamp: z.ZodNumber;
|
|
357
|
+
response_id: z.ZodString;
|
|
380
358
|
type: z.ZodLiteral<"Cancelled">;
|
|
381
|
-
id: z.ZodOptional<z.ZodString>;
|
|
382
359
|
reason: z.ZodOptional<z.ZodString>;
|
|
383
|
-
timestamp: z.ZodNumber;
|
|
384
360
|
}, z.core.$strip>, z.ZodObject<{
|
|
385
|
-
|
|
386
|
-
type: z.ZodLiteral<"NaturalStop">;
|
|
387
|
-
id: z.ZodOptional<z.ZodString>;
|
|
361
|
+
id: z.ZodString;
|
|
388
362
|
timestamp: z.ZodNumber;
|
|
363
|
+
response_id: z.ZodString;
|
|
364
|
+
type: z.ZodLiteral<"NaturalStop">;
|
|
389
365
|
}, z.core.$strip>, z.ZodObject<{
|
|
366
|
+
id: z.ZodString;
|
|
367
|
+
timestamp: z.ZodNumber;
|
|
368
|
+
response_id: z.ZodString;
|
|
390
369
|
isRelevant: z.ZodBoolean;
|
|
391
370
|
reason: z.ZodString;
|
|
392
371
|
confidence: z.ZodNumber;
|
|
393
|
-
step_id: z.ZodString;
|
|
394
372
|
type: z.ZodLiteral<"FilterResult">;
|
|
395
|
-
id: z.ZodOptional<z.ZodString>;
|
|
396
|
-
timestamp: z.ZodNumber;
|
|
397
373
|
}, z.core.$strip>, z.ZodObject<{
|
|
374
|
+
id: z.ZodString;
|
|
375
|
+
timestamp: z.ZodNumber;
|
|
376
|
+
response_id: z.ZodString;
|
|
398
377
|
type: z.ZodLiteral<"UserMessage">;
|
|
399
|
-
id: z.ZodOptional<z.ZodString>;
|
|
400
378
|
message: z.ZodString;
|
|
401
|
-
step_id: z.ZodString;
|
|
402
379
|
client_turn_id: z.ZodString;
|
|
403
|
-
timestamp: z.ZodNumber;
|
|
404
380
|
}, z.core.$strip>, z.ZodObject<{
|
|
405
|
-
|
|
406
|
-
type: z.ZodLiteral<"Thinking">;
|
|
407
|
-
id: z.ZodOptional<z.ZodString>;
|
|
381
|
+
id: z.ZodString;
|
|
408
382
|
timestamp: z.ZodNumber;
|
|
383
|
+
response_id: z.ZodString;
|
|
384
|
+
type: z.ZodLiteral<"Thinking">;
|
|
409
385
|
}, z.core.$strip>, z.ZodObject<{
|
|
410
|
-
|
|
411
|
-
id: z.ZodOptional<z.ZodString>;
|
|
386
|
+
id: z.ZodString;
|
|
412
387
|
timestamp: z.ZodNumber;
|
|
388
|
+
response_id: z.ZodString;
|
|
389
|
+
type: z.ZodLiteral<"Snippet">;
|
|
413
390
|
snippet: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
414
391
|
type: z.ZodLiteral<"button">;
|
|
415
392
|
label: z.ZodString;
|
|
416
393
|
url: z.ZodString;
|
|
417
394
|
id: z.ZodOptional<z.ZodString>;
|
|
418
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
419
395
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
420
396
|
}, z.core.$strip>, z.ZodObject<{
|
|
421
397
|
type: z.ZodLiteral<"integration_prompt">;
|
|
@@ -423,13 +399,11 @@ export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
423
399
|
message: z.ZodString;
|
|
424
400
|
stateToken: z.ZodOptional<z.ZodString>;
|
|
425
401
|
id: z.ZodOptional<z.ZodString>;
|
|
426
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
427
402
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
428
403
|
}, z.core.$strip>, z.ZodObject<{
|
|
429
404
|
type: z.ZodLiteral<"navigate">;
|
|
430
405
|
path: z.ZodString;
|
|
431
406
|
id: z.ZodOptional<z.ZodString>;
|
|
432
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
433
407
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
434
408
|
}, z.core.$strip>, z.ZodObject<{
|
|
435
409
|
type: z.ZodLiteral<"multiple_choice">;
|
|
@@ -441,25 +415,24 @@ export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
441
415
|
}, z.core.$strip>>;
|
|
442
416
|
allowMultiple: z.ZodOptional<z.ZodBoolean>;
|
|
443
417
|
id: z.ZodOptional<z.ZodString>;
|
|
444
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
445
418
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
446
419
|
}, z.core.$strip>, z.ZodObject<{
|
|
447
420
|
type: z.ZodLiteral<"image">;
|
|
448
421
|
url: z.ZodString;
|
|
449
422
|
id: z.ZodOptional<z.ZodString>;
|
|
450
|
-
step_id: z.ZodOptional<z.ZodString>;
|
|
451
423
|
selectedValue: z.ZodOptional<z.ZodString>;
|
|
452
424
|
}, z.core.$strip>], "type">;
|
|
453
425
|
}, z.core.$strip>, z.ZodObject<{
|
|
426
|
+
id: z.ZodString;
|
|
427
|
+
timestamp: z.ZodNumber;
|
|
428
|
+
response_id: z.ZodString;
|
|
454
429
|
type: z.ZodLiteral<"ProcessOutput">;
|
|
455
|
-
id: z.ZodOptional<z.ZodString>;
|
|
456
430
|
stream: z.ZodEnum<{
|
|
457
431
|
stdout: "stdout";
|
|
458
432
|
stderr: "stderr";
|
|
459
433
|
}>;
|
|
460
434
|
content: z.ZodString;
|
|
461
435
|
label: z.ZodString;
|
|
462
|
-
timestamp: z.ZodNumber;
|
|
463
436
|
}, z.core.$strip>], "type">;
|
|
464
437
|
export type ModelEvent = z.infer<typeof modelEventSchema>;
|
|
465
438
|
export declare const modelRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -471,11 +444,11 @@ export declare const modelRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
471
444
|
client_turn_id: z.ZodString;
|
|
472
445
|
template_id: z.ZodOptional<z.ZodString>;
|
|
473
446
|
}, z.core.$strip>, z.ZodObject<{
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
447
|
+
id: z.ZodString;
|
|
448
|
+
timestamp: z.ZodNumber;
|
|
449
|
+
response_id: z.ZodString;
|
|
477
450
|
approved: z.ZodBoolean;
|
|
478
451
|
rejection_reason: z.ZodOptional<z.ZodString>;
|
|
479
|
-
|
|
452
|
+
type: z.ZodLiteral<"ToolApprovalResponse">;
|
|
480
453
|
}, z.core.$strip>], "type">;
|
|
481
454
|
export type ModelRequest = z.infer<typeof modelRequestSchema>;
|