@meetkai/mka1 0.54.89 → 0.54.91
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/bin/mcp-server.js +109 -31
- package/bin/mcp-server.js.map +18 -17
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/batchobject.d.ts +5 -0
- package/dist/commonjs/models/components/batchobject.d.ts.map +1 -1
- package/dist/commonjs/models/components/batchobject.js +4 -0
- package/dist/commonjs/models/components/batchobject.js.map +1 -1
- package/dist/commonjs/models/components/codeinterpretercontainerauto.d.ts +3 -1
- package/dist/commonjs/models/components/codeinterpretercontainerauto.d.ts.map +1 -1
- package/dist/commonjs/models/components/codeinterpretercontainerauto.js +2 -0
- package/dist/commonjs/models/components/codeinterpretercontainerauto.js.map +1 -1
- package/dist/commonjs/models/components/codeinterpretertooldefinition.d.ts +7 -7
- package/dist/commonjs/models/components/codeinterpretertooldefinition.d.ts.map +1 -1
- package/dist/commonjs/models/components/codeinterpretertooldefinition.js +9 -9
- package/dist/commonjs/models/components/codeinterpretertooldefinition.js.map +1 -1
- package/dist/commonjs/models/components/codeinterpretertoolrequest.d.ts +59 -0
- package/dist/commonjs/models/components/codeinterpretertoolrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/codeinterpretertoolrequest.js +112 -0
- package/dist/commonjs/models/components/codeinterpretertoolrequest.js.map +1 -0
- package/dist/commonjs/models/components/createbatchrequest.d.ts +5 -0
- package/dist/commonjs/models/components/createbatchrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createbatchrequest.js +4 -0
- package/dist/commonjs/models/components/createbatchrequest.js.map +1 -1
- package/dist/commonjs/models/components/createsessionrequest.d.ts +16 -0
- package/dist/commonjs/models/components/createsessionrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createsessionrequest.js +14 -1
- package/dist/commonjs/models/components/createsessionrequest.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/livekittokenrequest.d.ts +6 -6
- package/dist/commonjs/models/components/livekittokenrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/livekittokenrequest.js +5 -5
- package/dist/commonjs/models/components/livekittokenrequest.js.map +1 -1
- package/dist/commonjs/models/components/openaichatcompletionrequestparams.d.ts +13 -3
- package/dist/commonjs/models/components/openaichatcompletionrequestparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/openaichatcompletionrequestparams.js +8 -2
- package/dist/commonjs/models/components/openaichatcompletionrequestparams.js.map +1 -1
- package/dist/commonjs/models/components/openaitooldefinition.d.ts +5 -0
- package/dist/commonjs/models/components/openaitooldefinition.d.ts.map +1 -1
- package/dist/commonjs/models/components/openaitooldefinition.js +2 -0
- package/dist/commonjs/models/components/openaitooldefinition.js.map +1 -1
- package/dist/commonjs/models/components/responsescreaterequest.d.ts +6 -6
- package/dist/commonjs/models/components/responsescreaterequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/responsescreaterequest.js +5 -5
- package/dist/commonjs/models/components/responsescreaterequest.js.map +1 -1
- package/dist/commonjs/models/components/sessionrecord.d.ts +2 -0
- package/dist/commonjs/models/components/sessionrecord.d.ts.map +1 -1
- package/dist/commonjs/models/components/sessionrecord.js +4 -0
- package/dist/commonjs/models/components/sessionrecord.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/batchobject.d.ts +5 -0
- package/dist/esm/models/components/batchobject.d.ts.map +1 -1
- package/dist/esm/models/components/batchobject.js +4 -0
- package/dist/esm/models/components/batchobject.js.map +1 -1
- package/dist/esm/models/components/codeinterpretercontainerauto.d.ts +3 -1
- package/dist/esm/models/components/codeinterpretercontainerauto.d.ts.map +1 -1
- package/dist/esm/models/components/codeinterpretercontainerauto.js +2 -0
- package/dist/esm/models/components/codeinterpretercontainerauto.js.map +1 -1
- package/dist/esm/models/components/codeinterpretertooldefinition.d.ts +7 -7
- package/dist/esm/models/components/codeinterpretertooldefinition.d.ts.map +1 -1
- package/dist/esm/models/components/codeinterpretertooldefinition.js +6 -6
- package/dist/esm/models/components/codeinterpretertooldefinition.js.map +1 -1
- package/dist/esm/models/components/codeinterpretertoolrequest.d.ts +59 -0
- package/dist/esm/models/components/codeinterpretertoolrequest.d.ts.map +1 -0
- package/dist/esm/models/components/codeinterpretertoolrequest.js +70 -0
- package/dist/esm/models/components/codeinterpretertoolrequest.js.map +1 -0
- package/dist/esm/models/components/createbatchrequest.d.ts +5 -0
- package/dist/esm/models/components/createbatchrequest.d.ts.map +1 -1
- package/dist/esm/models/components/createbatchrequest.js +4 -0
- package/dist/esm/models/components/createbatchrequest.js.map +1 -1
- package/dist/esm/models/components/createsessionrequest.d.ts +16 -0
- package/dist/esm/models/components/createsessionrequest.d.ts.map +1 -1
- package/dist/esm/models/components/createsessionrequest.js +13 -0
- package/dist/esm/models/components/createsessionrequest.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/livekittokenrequest.d.ts +6 -6
- package/dist/esm/models/components/livekittokenrequest.d.ts.map +1 -1
- package/dist/esm/models/components/livekittokenrequest.js +5 -5
- package/dist/esm/models/components/livekittokenrequest.js.map +1 -1
- package/dist/esm/models/components/openaichatcompletionrequestparams.d.ts +13 -3
- package/dist/esm/models/components/openaichatcompletionrequestparams.d.ts.map +1 -1
- package/dist/esm/models/components/openaichatcompletionrequestparams.js +8 -2
- package/dist/esm/models/components/openaichatcompletionrequestparams.js.map +1 -1
- package/dist/esm/models/components/openaitooldefinition.d.ts +5 -0
- package/dist/esm/models/components/openaitooldefinition.d.ts.map +1 -1
- package/dist/esm/models/components/openaitooldefinition.js +2 -0
- package/dist/esm/models/components/openaitooldefinition.js.map +1 -1
- package/dist/esm/models/components/responsescreaterequest.d.ts +6 -6
- package/dist/esm/models/components/responsescreaterequest.d.ts.map +1 -1
- package/dist/esm/models/components/responsescreaterequest.js +5 -5
- package/dist/esm/models/components/responsescreaterequest.js.map +1 -1
- package/dist/esm/models/components/sessionrecord.d.ts +2 -0
- package/dist/esm/models/components/sessionrecord.d.ts.map +1 -1
- package/dist/esm/models/components/sessionrecord.js +4 -0
- package/dist/esm/models/components/sessionrecord.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/batchobject.ts +9 -0
- package/src/models/components/codeinterpretercontainerauto.ts +3 -1
- package/src/models/components/codeinterpretertooldefinition.ts +26 -14
- package/src/models/components/codeinterpretertoolrequest.ts +164 -0
- package/src/models/components/createbatchrequest.ts +9 -0
- package/src/models/components/createsessionrequest.ts +26 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/livekittokenrequest.ts +14 -14
- package/src/models/components/openaichatcompletionrequestparams.ts +21 -5
- package/src/models/components/openaitooldefinition.ts +7 -0
- package/src/models/components/responsescreaterequest.ts +14 -14
- package/src/models/components/sessionrecord.ts +6 -0
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
import {
|
|
@@ -40,7 +41,18 @@ import {
|
|
|
40
41
|
SessionKind$outboundSchema,
|
|
41
42
|
} from "./sessionkind.js";
|
|
42
43
|
|
|
44
|
+
export const MemoryLimitMib = {
|
|
45
|
+
FiveHundredAndTwelve: 512,
|
|
46
|
+
OneThousandAndTwentyFour: 1024,
|
|
47
|
+
TwoThousandAndFortyEight: 2048,
|
|
48
|
+
} as const;
|
|
49
|
+
export type MemoryLimitMib = ClosedEnum<typeof MemoryLimitMib>;
|
|
50
|
+
|
|
43
51
|
export type CreateSessionRequest = {
|
|
52
|
+
/**
|
|
53
|
+
* Hard guest memory cap: 512, 1024, or 2048 MiB for standard sessions. Disables automatic memory growth and OOM retries.
|
|
54
|
+
*/
|
|
55
|
+
memoryLimitMib?: MemoryLimitMib | null | undefined;
|
|
44
56
|
/**
|
|
45
57
|
* Additional outbound hostname allowlist. Intersects tenant and operator restrictions; an empty list denies outbound hosts.
|
|
46
58
|
*/
|
|
@@ -60,12 +72,22 @@ export type CreateSessionRequest = {
|
|
|
60
72
|
codingHarnessSkills?: { [k: string]: any } | null | undefined;
|
|
61
73
|
};
|
|
62
74
|
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const MemoryLimitMib$inboundSchema: z.ZodNativeEnum<
|
|
77
|
+
typeof MemoryLimitMib
|
|
78
|
+
> = z.nativeEnum(MemoryLimitMib);
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const MemoryLimitMib$outboundSchema: z.ZodNativeEnum<
|
|
81
|
+
typeof MemoryLimitMib
|
|
82
|
+
> = MemoryLimitMib$inboundSchema;
|
|
83
|
+
|
|
63
84
|
/** @internal */
|
|
64
85
|
export const CreateSessionRequest$inboundSchema: z.ZodType<
|
|
65
86
|
CreateSessionRequest,
|
|
66
87
|
z.ZodTypeDef,
|
|
67
88
|
unknown
|
|
68
89
|
> = z.object({
|
|
90
|
+
memory_limit_mib: z.nullable(MemoryLimitMib$inboundSchema).optional(),
|
|
69
91
|
network_policy: z.nullable(OutboundNetworkPolicy$inboundSchema).optional(),
|
|
70
92
|
session_id: z.string(),
|
|
71
93
|
session_key: z.nullable(z.string()).optional(),
|
|
@@ -82,6 +104,7 @@ export const CreateSessionRequest$inboundSchema: z.ZodType<
|
|
|
82
104
|
coding_harness_skills: z.nullable(z.record(z.any())).optional(),
|
|
83
105
|
}).transform((v) => {
|
|
84
106
|
return remap$(v, {
|
|
107
|
+
"memory_limit_mib": "memoryLimitMib",
|
|
85
108
|
"network_policy": "networkPolicy",
|
|
86
109
|
"session_id": "sessionId",
|
|
87
110
|
"session_key": "sessionKey",
|
|
@@ -100,6 +123,7 @@ export const CreateSessionRequest$inboundSchema: z.ZodType<
|
|
|
100
123
|
});
|
|
101
124
|
/** @internal */
|
|
102
125
|
export type CreateSessionRequest$Outbound = {
|
|
126
|
+
memory_limit_mib?: number | null | undefined;
|
|
103
127
|
network_policy?: OutboundNetworkPolicy$Outbound | null | undefined;
|
|
104
128
|
session_id: string;
|
|
105
129
|
session_key?: string | null | undefined;
|
|
@@ -122,6 +146,7 @@ export const CreateSessionRequest$outboundSchema: z.ZodType<
|
|
|
122
146
|
z.ZodTypeDef,
|
|
123
147
|
CreateSessionRequest
|
|
124
148
|
> = z.object({
|
|
149
|
+
memoryLimitMib: z.nullable(MemoryLimitMib$outboundSchema).optional(),
|
|
125
150
|
networkPolicy: z.nullable(OutboundNetworkPolicy$outboundSchema).optional(),
|
|
126
151
|
sessionId: z.string(),
|
|
127
152
|
sessionKey: z.nullable(z.string()).optional(),
|
|
@@ -138,6 +163,7 @@ export const CreateSessionRequest$outboundSchema: z.ZodType<
|
|
|
138
163
|
codingHarnessSkills: z.nullable(z.record(z.any())).optional(),
|
|
139
164
|
}).transform((v) => {
|
|
140
165
|
return remap$(v, {
|
|
166
|
+
memoryLimitMib: "memory_limit_mib",
|
|
141
167
|
networkPolicy: "network_policy",
|
|
142
168
|
sessionId: "session_id",
|
|
143
169
|
sessionKey: "session_key",
|
|
@@ -87,6 +87,7 @@ export * from "./codeinterpreteroutputlogs.js";
|
|
|
87
87
|
export * from "./codeinterpretertoolcall.js";
|
|
88
88
|
export * from "./codeinterpretertoolcallwithid.js";
|
|
89
89
|
export * from "./codeinterpretertooldefinition.js";
|
|
90
|
+
export * from "./codeinterpretertoolrequest.js";
|
|
90
91
|
export * from "./coderequest.js";
|
|
91
92
|
export * from "./coderesult.js";
|
|
92
93
|
export * from "./coderuntime.js";
|
|
@@ -9,11 +9,11 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "./
|
|
12
|
+
CodeInterpreterToolRequest,
|
|
13
|
+
CodeInterpreterToolRequest$inboundSchema,
|
|
14
|
+
CodeInterpreterToolRequest$Outbound,
|
|
15
|
+
CodeInterpreterToolRequest$outboundSchema,
|
|
16
|
+
} from "./codeinterpretertoolrequest.js";
|
|
17
17
|
import {
|
|
18
18
|
CompactionContextManagement,
|
|
19
19
|
CompactionContextManagement$inboundSchema,
|
|
@@ -141,7 +141,7 @@ export type LivekitTokenRequestTools =
|
|
|
141
141
|
| FunctionToolDefinition
|
|
142
142
|
| ComputerUseToolDefinition
|
|
143
143
|
| FileSearchToolDefinition
|
|
144
|
-
|
|
|
144
|
+
| CodeInterpreterToolRequest
|
|
145
145
|
| CustomToolDefinition
|
|
146
146
|
| WebSearchToolDefinition
|
|
147
147
|
| MCPToolDefinition
|
|
@@ -205,14 +205,14 @@ export type Llm = {
|
|
|
205
205
|
previousResponseId?: string | undefined;
|
|
206
206
|
prompt?: PromptTemplate | undefined;
|
|
207
207
|
/**
|
|
208
|
-
* Array of tool definitions that the agent can use during response generation. Supports built-in tools (web search, file search, code interpreter, image generation) and custom tools (functions, MCP, local shell). Caller shell
|
|
208
|
+
* Array of tool definitions that the agent can use during response generation. Supports built-in tools (web search, file search, code interpreter, image generation) and custom tools (functions, MCP, local shell). Caller shell domain_secrets and policies on existing containers are unsupported. Code interpreter memory_limit sets a hard guest memory cap. computer_use_preview is not supported: requests that include it are rejected with a 400 invalid_request_error.
|
|
209
209
|
*/
|
|
210
210
|
tools?:
|
|
211
211
|
| Array<
|
|
212
212
|
| FunctionToolDefinition
|
|
213
213
|
| ComputerUseToolDefinition
|
|
214
214
|
| FileSearchToolDefinition
|
|
215
|
-
|
|
|
215
|
+
| CodeInterpreterToolRequest
|
|
216
216
|
| CustomToolDefinition
|
|
217
217
|
| WebSearchToolDefinition
|
|
218
218
|
| MCPToolDefinition
|
|
@@ -375,7 +375,7 @@ export const LivekitTokenRequestTools$inboundSchema: z.ZodType<
|
|
|
375
375
|
FunctionToolDefinition$inboundSchema,
|
|
376
376
|
ComputerUseToolDefinition$inboundSchema,
|
|
377
377
|
FileSearchToolDefinition$inboundSchema,
|
|
378
|
-
|
|
378
|
+
CodeInterpreterToolRequest$inboundSchema,
|
|
379
379
|
CustomToolDefinition$inboundSchema,
|
|
380
380
|
WebSearchToolDefinition$inboundSchema,
|
|
381
381
|
MCPToolDefinition$inboundSchema,
|
|
@@ -392,7 +392,7 @@ export type LivekitTokenRequestTools$Outbound =
|
|
|
392
392
|
| FunctionToolDefinition$Outbound
|
|
393
393
|
| ComputerUseToolDefinition$Outbound
|
|
394
394
|
| FileSearchToolDefinition$Outbound
|
|
395
|
-
|
|
|
395
|
+
| CodeInterpreterToolRequest$Outbound
|
|
396
396
|
| CustomToolDefinition$Outbound
|
|
397
397
|
| WebSearchToolDefinition$Outbound
|
|
398
398
|
| MCPToolDefinition$Outbound
|
|
@@ -413,7 +413,7 @@ export const LivekitTokenRequestTools$outboundSchema: z.ZodType<
|
|
|
413
413
|
FunctionToolDefinition$outboundSchema,
|
|
414
414
|
ComputerUseToolDefinition$outboundSchema,
|
|
415
415
|
FileSearchToolDefinition$outboundSchema,
|
|
416
|
-
|
|
416
|
+
CodeInterpreterToolRequest$outboundSchema,
|
|
417
417
|
CustomToolDefinition$outboundSchema,
|
|
418
418
|
WebSearchToolDefinition$outboundSchema,
|
|
419
419
|
MCPToolDefinition$outboundSchema,
|
|
@@ -475,7 +475,7 @@ export const Llm$inboundSchema: z.ZodType<Llm, z.ZodTypeDef, unknown> = z
|
|
|
475
475
|
FunctionToolDefinition$inboundSchema,
|
|
476
476
|
ComputerUseToolDefinition$inboundSchema,
|
|
477
477
|
FileSearchToolDefinition$inboundSchema,
|
|
478
|
-
|
|
478
|
+
CodeInterpreterToolRequest$inboundSchema,
|
|
479
479
|
CustomToolDefinition$inboundSchema,
|
|
480
480
|
WebSearchToolDefinition$inboundSchema,
|
|
481
481
|
MCPToolDefinition$inboundSchema,
|
|
@@ -529,7 +529,7 @@ export type Llm$Outbound = {
|
|
|
529
529
|
| FunctionToolDefinition$Outbound
|
|
530
530
|
| ComputerUseToolDefinition$Outbound
|
|
531
531
|
| FileSearchToolDefinition$Outbound
|
|
532
|
-
|
|
|
532
|
+
| CodeInterpreterToolRequest$Outbound
|
|
533
533
|
| CustomToolDefinition$Outbound
|
|
534
534
|
| WebSearchToolDefinition$Outbound
|
|
535
535
|
| MCPToolDefinition$Outbound
|
|
@@ -572,7 +572,7 @@ export const Llm$outboundSchema: z.ZodType<Llm$Outbound, z.ZodTypeDef, Llm> = z
|
|
|
572
572
|
FunctionToolDefinition$outboundSchema,
|
|
573
573
|
ComputerUseToolDefinition$outboundSchema,
|
|
574
574
|
FileSearchToolDefinition$outboundSchema,
|
|
575
|
-
|
|
575
|
+
CodeInterpreterToolRequest$outboundSchema,
|
|
576
576
|
CustomToolDefinition$outboundSchema,
|
|
577
577
|
WebSearchToolDefinition$outboundSchema,
|
|
578
578
|
MCPToolDefinition$outboundSchema,
|
|
@@ -66,6 +66,10 @@ export type OpenAIChatCompletionRequestParamsType = string | Type2;
|
|
|
66
66
|
*/
|
|
67
67
|
export type JsonSchema = {
|
|
68
68
|
name: string;
|
|
69
|
+
/**
|
|
70
|
+
* What the response format is for, used by the model to decide how to respond.
|
|
71
|
+
*/
|
|
72
|
+
description?: string | undefined;
|
|
69
73
|
schema: { [k: string]: any };
|
|
70
74
|
strict?: boolean | undefined;
|
|
71
75
|
};
|
|
@@ -133,9 +137,13 @@ export type OpenAIChatCompletionRequestParams = {
|
|
|
133
137
|
*/
|
|
134
138
|
n?: number | undefined;
|
|
135
139
|
/**
|
|
136
|
-
* The maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length.
|
|
140
|
+
* The maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length. The same setting as max_completion_tokens; if both are sent they must be equal. Null is the same as omitting it.
|
|
141
|
+
*/
|
|
142
|
+
maxTokens?: number | null | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* An upper bound for the number of tokens that can be generated for a completion. The newer OpenAI name for max_tokens and the same setting; if both are sent they must be equal. Null is the same as omitting it.
|
|
137
145
|
*/
|
|
138
|
-
|
|
146
|
+
maxCompletionTokens?: number | null | undefined;
|
|
139
147
|
/**
|
|
140
148
|
* What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
|
|
141
149
|
*/
|
|
@@ -335,12 +343,14 @@ export const JsonSchema$inboundSchema: z.ZodType<
|
|
|
335
343
|
unknown
|
|
336
344
|
> = z.object({
|
|
337
345
|
name: z.string(),
|
|
346
|
+
description: z.string().optional(),
|
|
338
347
|
schema: z.record(z.any()),
|
|
339
348
|
strict: z.boolean().optional(),
|
|
340
349
|
});
|
|
341
350
|
/** @internal */
|
|
342
351
|
export type JsonSchema$Outbound = {
|
|
343
352
|
name: string;
|
|
353
|
+
description?: string | undefined;
|
|
344
354
|
schema: { [k: string]: any };
|
|
345
355
|
strict?: boolean | undefined;
|
|
346
356
|
};
|
|
@@ -352,6 +362,7 @@ export const JsonSchema$outboundSchema: z.ZodType<
|
|
|
352
362
|
JsonSchema
|
|
353
363
|
> = z.object({
|
|
354
364
|
name: z.string(),
|
|
365
|
+
description: z.string().optional(),
|
|
355
366
|
schema: z.record(z.any()),
|
|
356
367
|
strict: z.boolean().optional(),
|
|
357
368
|
});
|
|
@@ -494,7 +505,8 @@ export const OpenAIChatCompletionRequestParams$inboundSchema: z.ZodType<
|
|
|
494
505
|
tool_choice: z.any().optional(),
|
|
495
506
|
stream: z.boolean().optional(),
|
|
496
507
|
n: z.number().int().optional(),
|
|
497
|
-
max_tokens: z.number().int().optional(),
|
|
508
|
+
max_tokens: z.nullable(z.number().int()).optional(),
|
|
509
|
+
max_completion_tokens: z.nullable(z.number().int()).optional(),
|
|
498
510
|
temperature: z.number().optional(),
|
|
499
511
|
top_p: z.number().optional(),
|
|
500
512
|
frequency_penalty: z.number().optional(),
|
|
@@ -514,6 +526,7 @@ export const OpenAIChatCompletionRequestParams$inboundSchema: z.ZodType<
|
|
|
514
526
|
return remap$(v, {
|
|
515
527
|
"tool_choice": "toolChoice",
|
|
516
528
|
"max_tokens": "maxTokens",
|
|
529
|
+
"max_completion_tokens": "maxCompletionTokens",
|
|
517
530
|
"top_p": "topP",
|
|
518
531
|
"frequency_penalty": "frequencyPenalty",
|
|
519
532
|
"presence_penalty": "presencePenalty",
|
|
@@ -532,7 +545,8 @@ export type OpenAIChatCompletionRequestParams$Outbound = {
|
|
|
532
545
|
tool_choice?: any | undefined;
|
|
533
546
|
stream?: boolean | undefined;
|
|
534
547
|
n?: number | undefined;
|
|
535
|
-
max_tokens?: number | undefined;
|
|
548
|
+
max_tokens?: number | null | undefined;
|
|
549
|
+
max_completion_tokens?: number | null | undefined;
|
|
536
550
|
temperature?: number | undefined;
|
|
537
551
|
top_p?: number | undefined;
|
|
538
552
|
frequency_penalty?: number | undefined;
|
|
@@ -562,7 +576,8 @@ export const OpenAIChatCompletionRequestParams$outboundSchema: z.ZodType<
|
|
|
562
576
|
toolChoice: z.any().optional(),
|
|
563
577
|
stream: z.boolean().optional(),
|
|
564
578
|
n: z.number().int().optional(),
|
|
565
|
-
maxTokens: z.number().int().optional(),
|
|
579
|
+
maxTokens: z.nullable(z.number().int()).optional(),
|
|
580
|
+
maxCompletionTokens: z.nullable(z.number().int()).optional(),
|
|
566
581
|
temperature: z.number().optional(),
|
|
567
582
|
topP: z.number().optional(),
|
|
568
583
|
frequencyPenalty: z.number().optional(),
|
|
@@ -582,6 +597,7 @@ export const OpenAIChatCompletionRequestParams$outboundSchema: z.ZodType<
|
|
|
582
597
|
return remap$(v, {
|
|
583
598
|
toolChoice: "tool_choice",
|
|
584
599
|
maxTokens: "max_tokens",
|
|
600
|
+
maxCompletionTokens: "max_completion_tokens",
|
|
585
601
|
topP: "top_p",
|
|
586
602
|
frequencyPenalty: "frequency_penalty",
|
|
587
603
|
presencePenalty: "presence_penalty",
|
|
@@ -23,6 +23,10 @@ export type FunctionT = {
|
|
|
23
23
|
* The parameters the function accepts, described as a JSON Schema object. Omit to accept no parameters.
|
|
24
24
|
*/
|
|
25
25
|
parameters?: any | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the model must follow the exact `parameters` schema when generating the call's arguments.
|
|
28
|
+
*/
|
|
29
|
+
strict?: boolean | undefined;
|
|
26
30
|
};
|
|
27
31
|
|
|
28
32
|
/**
|
|
@@ -48,12 +52,14 @@ export const FunctionT$inboundSchema: z.ZodType<
|
|
|
48
52
|
name: z.string(),
|
|
49
53
|
description: z.string().optional(),
|
|
50
54
|
parameters: z.any().optional(),
|
|
55
|
+
strict: z.boolean().optional(),
|
|
51
56
|
});
|
|
52
57
|
/** @internal */
|
|
53
58
|
export type FunctionT$Outbound = {
|
|
54
59
|
name: string;
|
|
55
60
|
description?: string | undefined;
|
|
56
61
|
parameters?: any | undefined;
|
|
62
|
+
strict?: boolean | undefined;
|
|
57
63
|
};
|
|
58
64
|
|
|
59
65
|
/** @internal */
|
|
@@ -65,6 +71,7 @@ export const FunctionT$outboundSchema: z.ZodType<
|
|
|
65
71
|
name: z.string(),
|
|
66
72
|
description: z.string().optional(),
|
|
67
73
|
parameters: z.any().optional(),
|
|
74
|
+
strict: z.boolean().optional(),
|
|
68
75
|
});
|
|
69
76
|
|
|
70
77
|
export function functionToJSON(functionT: FunctionT): string {
|
|
@@ -9,11 +9,11 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "./
|
|
12
|
+
CodeInterpreterToolRequest,
|
|
13
|
+
CodeInterpreterToolRequest$inboundSchema,
|
|
14
|
+
CodeInterpreterToolRequest$Outbound,
|
|
15
|
+
CodeInterpreterToolRequest$outboundSchema,
|
|
16
|
+
} from "./codeinterpretertoolrequest.js";
|
|
17
17
|
import {
|
|
18
18
|
CompactionContextManagement,
|
|
19
19
|
CompactionContextManagement$inboundSchema,
|
|
@@ -168,7 +168,7 @@ export type Tools =
|
|
|
168
168
|
| FunctionToolDefinition
|
|
169
169
|
| ComputerUseToolDefinition
|
|
170
170
|
| FileSearchToolDefinition
|
|
171
|
-
|
|
|
171
|
+
| CodeInterpreterToolRequest
|
|
172
172
|
| CustomToolDefinition
|
|
173
173
|
| WebSearchToolDefinition
|
|
174
174
|
| MCPToolDefinition
|
|
@@ -316,14 +316,14 @@ export type ResponsesCreateRequest = {
|
|
|
316
316
|
*/
|
|
317
317
|
webhookSecret?: string | undefined;
|
|
318
318
|
/**
|
|
319
|
-
* Array of tool definitions that the agent can use during response generation. Supports built-in tools (web search, file search, code interpreter, image generation) and custom tools (functions, MCP, local shell). Caller shell
|
|
319
|
+
* Array of tool definitions that the agent can use during response generation. Supports built-in tools (web search, file search, code interpreter, image generation) and custom tools (functions, MCP, local shell). Caller shell domain_secrets and policies on existing containers are unsupported. Code interpreter memory_limit sets a hard guest memory cap. computer_use_preview is not supported: requests that include it are rejected with a 400 invalid_request_error.
|
|
320
320
|
*/
|
|
321
321
|
tools?:
|
|
322
322
|
| Array<
|
|
323
323
|
| FunctionToolDefinition
|
|
324
324
|
| ComputerUseToolDefinition
|
|
325
325
|
| FileSearchToolDefinition
|
|
326
|
-
|
|
|
326
|
+
| CodeInterpreterToolRequest
|
|
327
327
|
| CustomToolDefinition
|
|
328
328
|
| WebSearchToolDefinition
|
|
329
329
|
| MCPToolDefinition
|
|
@@ -590,7 +590,7 @@ export const Tools$inboundSchema: z.ZodType<Tools, z.ZodTypeDef, unknown> = z
|
|
|
590
590
|
FunctionToolDefinition$inboundSchema,
|
|
591
591
|
ComputerUseToolDefinition$inboundSchema,
|
|
592
592
|
FileSearchToolDefinition$inboundSchema,
|
|
593
|
-
|
|
593
|
+
CodeInterpreterToolRequest$inboundSchema,
|
|
594
594
|
CustomToolDefinition$inboundSchema,
|
|
595
595
|
WebSearchToolDefinition$inboundSchema,
|
|
596
596
|
MCPToolDefinition$inboundSchema,
|
|
@@ -607,7 +607,7 @@ export type Tools$Outbound =
|
|
|
607
607
|
| FunctionToolDefinition$Outbound
|
|
608
608
|
| ComputerUseToolDefinition$Outbound
|
|
609
609
|
| FileSearchToolDefinition$Outbound
|
|
610
|
-
|
|
|
610
|
+
| CodeInterpreterToolRequest$Outbound
|
|
611
611
|
| CustomToolDefinition$Outbound
|
|
612
612
|
| WebSearchToolDefinition$Outbound
|
|
613
613
|
| MCPToolDefinition$Outbound
|
|
@@ -628,7 +628,7 @@ export const Tools$outboundSchema: z.ZodType<
|
|
|
628
628
|
FunctionToolDefinition$outboundSchema,
|
|
629
629
|
ComputerUseToolDefinition$outboundSchema,
|
|
630
630
|
FileSearchToolDefinition$outboundSchema,
|
|
631
|
-
|
|
631
|
+
CodeInterpreterToolRequest$outboundSchema,
|
|
632
632
|
CustomToolDefinition$outboundSchema,
|
|
633
633
|
WebSearchToolDefinition$outboundSchema,
|
|
634
634
|
MCPToolDefinition$outboundSchema,
|
|
@@ -821,7 +821,7 @@ export const ResponsesCreateRequest$inboundSchema: z.ZodType<
|
|
|
821
821
|
FunctionToolDefinition$inboundSchema,
|
|
822
822
|
ComputerUseToolDefinition$inboundSchema,
|
|
823
823
|
FileSearchToolDefinition$inboundSchema,
|
|
824
|
-
|
|
824
|
+
CodeInterpreterToolRequest$inboundSchema,
|
|
825
825
|
CustomToolDefinition$inboundSchema,
|
|
826
826
|
WebSearchToolDefinition$inboundSchema,
|
|
827
827
|
MCPToolDefinition$inboundSchema,
|
|
@@ -917,7 +917,7 @@ export type ResponsesCreateRequest$Outbound = {
|
|
|
917
917
|
| FunctionToolDefinition$Outbound
|
|
918
918
|
| ComputerUseToolDefinition$Outbound
|
|
919
919
|
| FileSearchToolDefinition$Outbound
|
|
920
|
-
|
|
|
920
|
+
| CodeInterpreterToolRequest$Outbound
|
|
921
921
|
| CustomToolDefinition$Outbound
|
|
922
922
|
| WebSearchToolDefinition$Outbound
|
|
923
923
|
| MCPToolDefinition$Outbound
|
|
@@ -989,7 +989,7 @@ export const ResponsesCreateRequest$outboundSchema: z.ZodType<
|
|
|
989
989
|
FunctionToolDefinition$outboundSchema,
|
|
990
990
|
ComputerUseToolDefinition$outboundSchema,
|
|
991
991
|
FileSearchToolDefinition$outboundSchema,
|
|
992
|
-
|
|
992
|
+
CodeInterpreterToolRequest$outboundSchema,
|
|
993
993
|
CustomToolDefinition$outboundSchema,
|
|
994
994
|
WebSearchToolDefinition$outboundSchema,
|
|
995
995
|
MCPToolDefinition$outboundSchema,
|
|
@@ -93,6 +93,7 @@ export type SessionRecord = {
|
|
|
93
93
|
memoryMounts?: Array<MemoryMount> | undefined;
|
|
94
94
|
apiKeyId?: string | null | undefined;
|
|
95
95
|
permissions?: Array<string> | undefined;
|
|
96
|
+
memoryLimitMib?: number | null | undefined;
|
|
96
97
|
sandboxMemoryMib?: number | undefined;
|
|
97
98
|
createdAt?: Date | undefined;
|
|
98
99
|
updatedAt?: Date | undefined;
|
|
@@ -148,6 +149,7 @@ export const SessionRecord$inboundSchema: z.ZodType<
|
|
|
148
149
|
memory_mounts: z.array(MemoryMount$inboundSchema).optional(),
|
|
149
150
|
api_key_id: z.nullable(z.string()).optional(),
|
|
150
151
|
permissions: z.array(z.string()).optional(),
|
|
152
|
+
memory_limit_mib: z.nullable(z.number().int()).optional(),
|
|
151
153
|
sandbox_memory_mib: z.number().int().default(256),
|
|
152
154
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
153
155
|
.optional(),
|
|
@@ -184,6 +186,7 @@ export const SessionRecord$inboundSchema: z.ZodType<
|
|
|
184
186
|
"runtime_profile": "runtimeProfile",
|
|
185
187
|
"memory_mounts": "memoryMounts",
|
|
186
188
|
"api_key_id": "apiKeyId",
|
|
189
|
+
"memory_limit_mib": "memoryLimitMib",
|
|
187
190
|
"sandbox_memory_mib": "sandboxMemoryMib",
|
|
188
191
|
"created_at": "createdAt",
|
|
189
192
|
"updated_at": "updatedAt",
|
|
@@ -222,6 +225,7 @@ export type SessionRecord$Outbound = {
|
|
|
222
225
|
memory_mounts?: Array<MemoryMount$Outbound> | undefined;
|
|
223
226
|
api_key_id?: string | null | undefined;
|
|
224
227
|
permissions?: Array<string> | undefined;
|
|
228
|
+
memory_limit_mib?: number | null | undefined;
|
|
225
229
|
sandbox_memory_mib: number;
|
|
226
230
|
created_at?: string | undefined;
|
|
227
231
|
updated_at?: string | undefined;
|
|
@@ -270,6 +274,7 @@ export const SessionRecord$outboundSchema: z.ZodType<
|
|
|
270
274
|
memoryMounts: z.array(MemoryMount$outboundSchema).optional(),
|
|
271
275
|
apiKeyId: z.nullable(z.string()).optional(),
|
|
272
276
|
permissions: z.array(z.string()).optional(),
|
|
277
|
+
memoryLimitMib: z.nullable(z.number().int()).optional(),
|
|
273
278
|
sandboxMemoryMib: z.number().int().default(256),
|
|
274
279
|
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
275
280
|
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
@@ -304,6 +309,7 @@ export const SessionRecord$outboundSchema: z.ZodType<
|
|
|
304
309
|
runtimeProfile: "runtime_profile",
|
|
305
310
|
memoryMounts: "memory_mounts",
|
|
306
311
|
apiKeyId: "api_key_id",
|
|
312
|
+
memoryLimitMib: "memory_limit_mib",
|
|
307
313
|
sandboxMemoryMib: "sandbox_memory_mib",
|
|
308
314
|
createdAt: "created_at",
|
|
309
315
|
updatedAt: "updated_at",
|