@mutagent/sdk 0.3.55 → 0.4.1

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.
Files changed (193) hide show
  1. package/README.md +15 -7
  2. package/dist/commonjs/funcs/sandbox-get-api-sandbox-helix-defaults.d.ts +18 -0
  3. package/dist/commonjs/funcs/sandbox-get-api-sandbox-helix-defaults.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/sandbox-get-api-sandbox-helix-defaults.js +108 -0
  5. package/dist/commonjs/funcs/sandbox-get-api-sandbox-helix-defaults.js.map +1 -0
  6. package/dist/commonjs/funcs/sandbox-post-api-sandbox-agent-run.d.ts +1 -1
  7. package/dist/commonjs/funcs/sandbox-post-api-sandbox-agent-run.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/sandbox-post-api-sandbox-agent-run.js +1 -1
  9. package/dist/commonjs/funcs/sandbox-post-api-sandbox-agent-run.js.map +1 -1
  10. package/dist/commonjs/funcs/sandbox-post-api-sandbox-by-id-session.d.ts +1 -1
  11. package/dist/commonjs/funcs/sandbox-post-api-sandbox-by-id-session.d.ts.map +1 -1
  12. package/dist/commonjs/funcs/sandbox-post-api-sandbox-by-id-session.js +1 -1
  13. package/dist/commonjs/funcs/sandbox-post-api-sandbox-by-id-session.js.map +1 -1
  14. package/dist/commonjs/funcs/sandbox-put-api-sandbox-helix-defaults.d.ts +18 -0
  15. package/dist/commonjs/funcs/sandbox-put-api-sandbox-helix-defaults.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/sandbox-put-api-sandbox-helix-defaults.js +119 -0
  17. package/dist/commonjs/funcs/sandbox-put-api-sandbox-helix-defaults.js.map +1 -0
  18. package/dist/commonjs/lib/config.d.ts +2 -2
  19. package/dist/commonjs/lib/config.js +2 -2
  20. package/dist/commonjs/lib/config.js.map +1 -1
  21. package/dist/commonjs/models/errors/error-message-model.d.ts +23 -0
  22. package/dist/commonjs/models/errors/error-message-model.d.ts.map +1 -0
  23. package/dist/commonjs/models/errors/error-message-model.js +71 -0
  24. package/dist/commonjs/models/errors/error-message-model.js.map +1 -0
  25. package/dist/commonjs/models/errors/error-message2.d.ts +20 -0
  26. package/dist/commonjs/models/errors/error-message2.d.ts.map +1 -0
  27. package/dist/commonjs/models/errors/error-message2.js +67 -0
  28. package/dist/commonjs/models/errors/error-message2.js.map +1 -0
  29. package/dist/commonjs/models/errors/index.d.ts +5 -0
  30. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  31. package/dist/commonjs/models/errors/index.js +5 -0
  32. package/dist/commonjs/models/errors/index.js.map +1 -1
  33. package/dist/commonjs/models/errors/post-api-sandbox-agent-run.d.ts +45 -0
  34. package/dist/commonjs/models/errors/post-api-sandbox-agent-run.d.ts.map +1 -0
  35. package/dist/commonjs/models/errors/post-api-sandbox-agent-run.js +95 -0
  36. package/dist/commonjs/models/errors/post-api-sandbox-agent-run.js.map +1 -0
  37. package/dist/commonjs/models/errors/post-api-sandbox-by-id-session.d.ts +45 -0
  38. package/dist/commonjs/models/errors/post-api-sandbox-by-id-session.d.ts.map +1 -0
  39. package/dist/commonjs/models/errors/post-api-sandbox-by-id-session.js +91 -0
  40. package/dist/commonjs/models/errors/post-api-sandbox-by-id-session.js.map +1 -0
  41. package/dist/commonjs/models/errors/put-api-sandbox-helix-defaults.d.ts +13 -0
  42. package/dist/commonjs/models/errors/put-api-sandbox-helix-defaults.d.ts.map +1 -0
  43. package/dist/commonjs/models/errors/put-api-sandbox-helix-defaults.js +17 -0
  44. package/dist/commonjs/models/errors/put-api-sandbox-helix-defaults.js.map +1 -0
  45. package/dist/commonjs/models/index.d.ts +1 -1
  46. package/dist/commonjs/models/index.d.ts.map +1 -1
  47. package/dist/commonjs/models/index.js +1 -1
  48. package/dist/commonjs/models/index.js.map +1 -1
  49. package/dist/commonjs/models/{mode-arm-args.d.ts → mode-arm-model.d.ts} +16 -11
  50. package/dist/commonjs/models/mode-arm-model.d.ts.map +1 -0
  51. package/dist/commonjs/models/{mode-arm-args.js → mode-arm-model.js} +12 -11
  52. package/dist/commonjs/models/mode-arm-model.js.map +1 -0
  53. package/dist/commonjs/models/operations/get-api-sandbox-helix-defaults.d.ts +45 -0
  54. package/dist/commonjs/models/operations/get-api-sandbox-helix-defaults.d.ts.map +1 -0
  55. package/dist/commonjs/models/operations/get-api-sandbox-helix-defaults.js +67 -0
  56. package/dist/commonjs/models/operations/get-api-sandbox-helix-defaults.js.map +1 -0
  57. package/dist/commonjs/models/operations/index.d.ts +2 -0
  58. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  59. package/dist/commonjs/models/operations/index.js +2 -0
  60. package/dist/commonjs/models/operations/index.js.map +1 -1
  61. package/dist/commonjs/models/operations/list-available-models.d.ts +4 -4
  62. package/dist/commonjs/models/operations/list-available-models.d.ts.map +1 -1
  63. package/dist/commonjs/models/operations/list-available-models.js +6 -6
  64. package/dist/commonjs/models/operations/list-available-models.js.map +1 -1
  65. package/dist/commonjs/models/operations/post-api-sandbox-agent-run.d.ts +18 -0
  66. package/dist/commonjs/models/operations/post-api-sandbox-agent-run.d.ts.map +1 -1
  67. package/dist/commonjs/models/operations/post-api-sandbox-agent-run.js +24 -1
  68. package/dist/commonjs/models/operations/post-api-sandbox-agent-run.js.map +1 -1
  69. package/dist/commonjs/models/operations/post-api-sandbox-by-id-session.d.ts +20 -2
  70. package/dist/commonjs/models/operations/post-api-sandbox-by-id-session.d.ts.map +1 -1
  71. package/dist/commonjs/models/operations/post-api-sandbox-by-id-session.js +25 -2
  72. package/dist/commonjs/models/operations/post-api-sandbox-by-id-session.js.map +1 -1
  73. package/dist/commonjs/models/operations/put-api-sandbox-helix-defaults.d.ts +58 -0
  74. package/dist/commonjs/models/operations/put-api-sandbox-helix-defaults.d.ts.map +1 -0
  75. package/dist/commonjs/models/operations/put-api-sandbox-helix-defaults.js +75 -0
  76. package/dist/commonjs/models/operations/put-api-sandbox-helix-defaults.js.map +1 -0
  77. package/dist/commonjs/models/preset-timeout-ms-keep2.d.ts +5 -0
  78. package/dist/commonjs/models/preset-timeout-ms-keep2.d.ts.map +1 -1
  79. package/dist/commonjs/models/preset-timeout-ms-keep2.js +1 -0
  80. package/dist/commonjs/models/preset-timeout-ms-keep2.js.map +1 -1
  81. package/dist/commonjs/sdk/sandbox.d.ts +14 -0
  82. package/dist/commonjs/sdk/sandbox.d.ts.map +1 -1
  83. package/dist/commonjs/sdk/sandbox.js +20 -0
  84. package/dist/commonjs/sdk/sandbox.js.map +1 -1
  85. package/dist/esm/funcs/sandbox-get-api-sandbox-helix-defaults.d.ts +18 -0
  86. package/dist/esm/funcs/sandbox-get-api-sandbox-helix-defaults.d.ts.map +1 -0
  87. package/dist/esm/funcs/sandbox-get-api-sandbox-helix-defaults.js +72 -0
  88. package/dist/esm/funcs/sandbox-get-api-sandbox-helix-defaults.js.map +1 -0
  89. package/dist/esm/funcs/sandbox-post-api-sandbox-agent-run.d.ts +1 -1
  90. package/dist/esm/funcs/sandbox-post-api-sandbox-agent-run.d.ts.map +1 -1
  91. package/dist/esm/funcs/sandbox-post-api-sandbox-agent-run.js +1 -1
  92. package/dist/esm/funcs/sandbox-post-api-sandbox-agent-run.js.map +1 -1
  93. package/dist/esm/funcs/sandbox-post-api-sandbox-by-id-session.d.ts +1 -1
  94. package/dist/esm/funcs/sandbox-post-api-sandbox-by-id-session.d.ts.map +1 -1
  95. package/dist/esm/funcs/sandbox-post-api-sandbox-by-id-session.js +1 -1
  96. package/dist/esm/funcs/sandbox-post-api-sandbox-by-id-session.js.map +1 -1
  97. package/dist/esm/funcs/sandbox-put-api-sandbox-helix-defaults.d.ts +18 -0
  98. package/dist/esm/funcs/sandbox-put-api-sandbox-helix-defaults.d.ts.map +1 -0
  99. package/dist/esm/funcs/sandbox-put-api-sandbox-helix-defaults.js +83 -0
  100. package/dist/esm/funcs/sandbox-put-api-sandbox-helix-defaults.js.map +1 -0
  101. package/dist/esm/lib/config.d.ts +2 -2
  102. package/dist/esm/lib/config.js +2 -2
  103. package/dist/esm/lib/config.js.map +1 -1
  104. package/dist/esm/models/errors/error-message-model.d.ts +23 -0
  105. package/dist/esm/models/errors/error-message-model.d.ts.map +1 -0
  106. package/dist/esm/models/errors/error-message-model.js +34 -0
  107. package/dist/esm/models/errors/error-message-model.js.map +1 -0
  108. package/dist/esm/models/errors/error-message2.d.ts +20 -0
  109. package/dist/esm/models/errors/error-message2.d.ts.map +1 -0
  110. package/dist/esm/models/errors/error-message2.js +30 -0
  111. package/dist/esm/models/errors/error-message2.js.map +1 -0
  112. package/dist/esm/models/errors/index.d.ts +5 -0
  113. package/dist/esm/models/errors/index.d.ts.map +1 -1
  114. package/dist/esm/models/errors/index.js +5 -0
  115. package/dist/esm/models/errors/index.js.map +1 -1
  116. package/dist/esm/models/errors/post-api-sandbox-agent-run.d.ts +45 -0
  117. package/dist/esm/models/errors/post-api-sandbox-agent-run.d.ts.map +1 -0
  118. package/dist/esm/models/errors/post-api-sandbox-agent-run.js +57 -0
  119. package/dist/esm/models/errors/post-api-sandbox-agent-run.js.map +1 -0
  120. package/dist/esm/models/errors/post-api-sandbox-by-id-session.d.ts +45 -0
  121. package/dist/esm/models/errors/post-api-sandbox-by-id-session.d.ts.map +1 -0
  122. package/dist/esm/models/errors/post-api-sandbox-by-id-session.js +53 -0
  123. package/dist/esm/models/errors/post-api-sandbox-by-id-session.js.map +1 -0
  124. package/dist/esm/models/errors/put-api-sandbox-helix-defaults.d.ts +13 -0
  125. package/dist/esm/models/errors/put-api-sandbox-helix-defaults.d.ts.map +1 -0
  126. package/dist/esm/models/errors/put-api-sandbox-helix-defaults.js +13 -0
  127. package/dist/esm/models/errors/put-api-sandbox-helix-defaults.js.map +1 -0
  128. package/dist/esm/models/index.d.ts +1 -1
  129. package/dist/esm/models/index.d.ts.map +1 -1
  130. package/dist/esm/models/index.js +1 -1
  131. package/dist/esm/models/index.js.map +1 -1
  132. package/dist/esm/models/{mode-arm-args.d.ts → mode-arm-model.d.ts} +16 -11
  133. package/dist/esm/models/mode-arm-model.d.ts.map +1 -0
  134. package/dist/esm/models/{mode-arm-args.js → mode-arm-model.js} +9 -8
  135. package/dist/esm/models/mode-arm-model.js.map +1 -0
  136. package/dist/esm/models/operations/get-api-sandbox-helix-defaults.d.ts +45 -0
  137. package/dist/esm/models/operations/get-api-sandbox-helix-defaults.d.ts.map +1 -0
  138. package/dist/esm/models/operations/get-api-sandbox-helix-defaults.js +29 -0
  139. package/dist/esm/models/operations/get-api-sandbox-helix-defaults.js.map +1 -0
  140. package/dist/esm/models/operations/index.d.ts +2 -0
  141. package/dist/esm/models/operations/index.d.ts.map +1 -1
  142. package/dist/esm/models/operations/index.js +2 -0
  143. package/dist/esm/models/operations/index.js.map +1 -1
  144. package/dist/esm/models/operations/list-available-models.d.ts +4 -4
  145. package/dist/esm/models/operations/list-available-models.d.ts.map +1 -1
  146. package/dist/esm/models/operations/list-available-models.js +4 -4
  147. package/dist/esm/models/operations/list-available-models.js.map +1 -1
  148. package/dist/esm/models/operations/post-api-sandbox-agent-run.d.ts +18 -0
  149. package/dist/esm/models/operations/post-api-sandbox-agent-run.d.ts.map +1 -1
  150. package/dist/esm/models/operations/post-api-sandbox-agent-run.js +21 -0
  151. package/dist/esm/models/operations/post-api-sandbox-agent-run.js.map +1 -1
  152. package/dist/esm/models/operations/post-api-sandbox-by-id-session.d.ts +20 -2
  153. package/dist/esm/models/operations/post-api-sandbox-by-id-session.d.ts.map +1 -1
  154. package/dist/esm/models/operations/post-api-sandbox-by-id-session.js +22 -1
  155. package/dist/esm/models/operations/post-api-sandbox-by-id-session.js.map +1 -1
  156. package/dist/esm/models/operations/put-api-sandbox-helix-defaults.d.ts +58 -0
  157. package/dist/esm/models/operations/put-api-sandbox-helix-defaults.d.ts.map +1 -0
  158. package/dist/esm/models/operations/put-api-sandbox-helix-defaults.js +36 -0
  159. package/dist/esm/models/operations/put-api-sandbox-helix-defaults.js.map +1 -0
  160. package/dist/esm/models/preset-timeout-ms-keep2.d.ts +5 -0
  161. package/dist/esm/models/preset-timeout-ms-keep2.d.ts.map +1 -1
  162. package/dist/esm/models/preset-timeout-ms-keep2.js +1 -0
  163. package/dist/esm/models/preset-timeout-ms-keep2.js.map +1 -1
  164. package/dist/esm/sdk/sandbox.d.ts +14 -0
  165. package/dist/esm/sdk/sandbox.d.ts.map +1 -1
  166. package/dist/esm/sdk/sandbox.js +20 -0
  167. package/dist/esm/sdk/sandbox.js.map +1 -1
  168. package/package.json +1 -1
  169. package/src/funcs/sandbox-get-api-sandbox-helix-defaults.ts +156 -0
  170. package/src/funcs/sandbox-post-api-sandbox-agent-run.ts +14 -0
  171. package/src/funcs/sandbox-post-api-sandbox-by-id-session.ts +14 -0
  172. package/src/funcs/sandbox-put-api-sandbox-helix-defaults.ts +187 -0
  173. package/src/lib/config.ts +2 -2
  174. package/src/models/errors/error-message-model.ts +60 -0
  175. package/src/models/errors/error-message2.ts +54 -0
  176. package/src/models/errors/index.ts +5 -0
  177. package/src/models/errors/post-api-sandbox-agent-run.ts +123 -0
  178. package/src/models/errors/post-api-sandbox-by-id-session.ts +122 -0
  179. package/src/models/errors/put-api-sandbox-helix-defaults.ts +45 -0
  180. package/src/models/index.ts +1 -1
  181. package/src/models/{mode-arm-args.ts → mode-arm-model.ts} +24 -18
  182. package/src/models/operations/get-api-sandbox-helix-defaults.ts +91 -0
  183. package/src/models/operations/index.ts +2 -0
  184. package/src/models/operations/list-available-models.ts +11 -8
  185. package/src/models/operations/post-api-sandbox-agent-run.ts +55 -0
  186. package/src/models/operations/post-api-sandbox-by-id-session.ts +59 -3
  187. package/src/models/operations/put-api-sandbox-helix-defaults.ts +121 -0
  188. package/src/models/preset-timeout-ms-keep2.ts +6 -0
  189. package/src/sdk/sandbox.ts +34 -0
  190. package/dist/commonjs/models/mode-arm-args.d.ts.map +0 -1
  191. package/dist/commonjs/models/mode-arm-args.js.map +0 -1
  192. package/dist/esm/models/mode-arm-args.d.ts.map +0 -1
  193. package/dist/esm/models/mode-arm-args.js.map +0 -1
@@ -0,0 +1,122 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import { smartUnion } from "../../types/smart-union.js";
11
+ import * as operations from "../operations/index.js";
12
+ import {
13
+ ErrorMessageModel,
14
+ ErrorMessageModel$inboundSchema,
15
+ } from "./error-message-model.js";
16
+ import {
17
+ ErrorMessage2,
18
+ ErrorMessage2$inboundSchema,
19
+ } from "./error-message2.js";
20
+ import { MutagentError } from "./mutagent-error.js";
21
+ import { SDKValidationError } from "./sdk-validation-error.js";
22
+
23
+ /**
24
+ * Response for status 428
25
+ */
26
+ export type PostApiSandboxByIdSessionNoProviderConfiguredErrorData = {
27
+ error: string;
28
+ message: string;
29
+ code: operations.PostApiSandboxByIdSessionCode;
30
+ workspaceId: string;
31
+ provider?: string | undefined;
32
+ directive: operations.PostApiSandboxByIdSessionDirective;
33
+ };
34
+
35
+ /**
36
+ * Response for status 428
37
+ */
38
+ export class PostApiSandboxByIdSessionNoProviderConfiguredError
39
+ extends MutagentError
40
+ {
41
+ error: string;
42
+ code: operations.PostApiSandboxByIdSessionCode;
43
+ workspaceId: string;
44
+ provider?: string | undefined;
45
+ directive: operations.PostApiSandboxByIdSessionDirective;
46
+
47
+ /** The original data that was passed to this error instance. */
48
+ data$: PostApiSandboxByIdSessionNoProviderConfiguredErrorData;
49
+
50
+ constructor(
51
+ err: PostApiSandboxByIdSessionNoProviderConfiguredErrorData,
52
+ httpMeta: { response: Response; request: Request; body: string },
53
+ ) {
54
+ const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
55
+ super(message, httpMeta);
56
+ this.data$ = err;
57
+ this.error = err.error;
58
+ this.code = err.code;
59
+ this.workspaceId = err.workspaceId;
60
+ if (err.provider != null) this.provider = err.provider;
61
+ this.directive = err.directive;
62
+
63
+ this.name = "PostApiSandboxByIdSessionNoProviderConfiguredError";
64
+ }
65
+ }
66
+
67
+ /**
68
+ * Response for status 422
69
+ */
70
+ export type PostApiSandboxByIdSessionUnprocessableEntity =
71
+ | ErrorMessageModel
72
+ | ErrorMessage2;
73
+
74
+ /** @internal */
75
+ export const PostApiSandboxByIdSessionNoProviderConfiguredError$inboundSchema:
76
+ z.ZodMiniType<PostApiSandboxByIdSessionNoProviderConfiguredError, unknown> = z
77
+ .pipe(
78
+ z.object({
79
+ error: types.string(),
80
+ message: types.string(),
81
+ code: operations.PostApiSandboxByIdSessionCode$inboundSchema,
82
+ workspaceId: types.string(),
83
+ provider: types.optional(types.string()),
84
+ _directive: z.lazy(() =>
85
+ operations.PostApiSandboxByIdSessionDirective$inboundSchema
86
+ ),
87
+ request$: z.custom<Request>(x => x instanceof Request),
88
+ response$: z.custom<Response>(x => x instanceof Response),
89
+ body$: z.string(),
90
+ }),
91
+ z.transform((v) => {
92
+ const remapped = remap$(v, {
93
+ "_directive": "directive",
94
+ });
95
+
96
+ return new PostApiSandboxByIdSessionNoProviderConfiguredError(
97
+ remapped,
98
+ { request: v.request$, response: v.response$, body: v.body$ },
99
+ );
100
+ }),
101
+ );
102
+
103
+ /** @internal */
104
+ export const PostApiSandboxByIdSessionUnprocessableEntity$inboundSchema:
105
+ z.ZodMiniType<PostApiSandboxByIdSessionUnprocessableEntity, unknown> =
106
+ smartUnion([ErrorMessageModel$inboundSchema, ErrorMessage2$inboundSchema]);
107
+
108
+ export function postApiSandboxByIdSessionUnprocessableEntityFromJSON(
109
+ jsonString: string,
110
+ ): SafeParseResult<
111
+ PostApiSandboxByIdSessionUnprocessableEntity,
112
+ SDKValidationError
113
+ > {
114
+ return safeParse(
115
+ jsonString,
116
+ (x) =>
117
+ PostApiSandboxByIdSessionUnprocessableEntity$inboundSchema.parse(
118
+ JSON.parse(x),
119
+ ),
120
+ `Failed to parse 'PostApiSandboxByIdSessionUnprocessableEntity' from JSON`,
121
+ );
122
+ }
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { smartUnion } from "../../types/smart-union.js";
9
+ import {
10
+ ErrorMessageModel,
11
+ ErrorMessageModel$inboundSchema,
12
+ } from "./error-message-model.js";
13
+ import {
14
+ ErrorMessage2,
15
+ ErrorMessage2$inboundSchema,
16
+ } from "./error-message2.js";
17
+ import { SDKValidationError } from "./sdk-validation-error.js";
18
+
19
+ /**
20
+ * Response for status 422
21
+ */
22
+ export type PutApiSandboxHelixDefaultsUnprocessableEntity =
23
+ | ErrorMessageModel
24
+ | ErrorMessage2;
25
+
26
+ /** @internal */
27
+ export const PutApiSandboxHelixDefaultsUnprocessableEntity$inboundSchema:
28
+ z.ZodMiniType<PutApiSandboxHelixDefaultsUnprocessableEntity, unknown> =
29
+ smartUnion([ErrorMessageModel$inboundSchema, ErrorMessage2$inboundSchema]);
30
+
31
+ export function putApiSandboxHelixDefaultsUnprocessableEntityFromJSON(
32
+ jsonString: string,
33
+ ): SafeParseResult<
34
+ PutApiSandboxHelixDefaultsUnprocessableEntity,
35
+ SDKValidationError
36
+ > {
37
+ return safeParse(
38
+ jsonString,
39
+ (x) =>
40
+ PutApiSandboxHelixDefaultsUnprocessableEntity$inboundSchema.parse(
41
+ JSON.parse(x),
42
+ ),
43
+ `Failed to parse 'PutApiSandboxHelixDefaultsUnprocessableEntity' from JSON`,
44
+ );
45
+ }
@@ -16,7 +16,7 @@ export * from "./id-name-email.js";
16
16
  export * from "./id-organization-id-email.js";
17
17
  export * from "./id-user-id-role.js";
18
18
  export * from "./id-user-id-role2.js";
19
- export * from "./mode-arm-args.js";
19
+ export * from "./mode-arm-model.js";
20
20
  export * from "./name-api-key-credential-fields.js";
21
21
  export * from "./name-description-system-prompt.js";
22
22
  export * from "./name-email-avatar-url.js";
@@ -17,14 +17,14 @@ import {
17
17
  /**
18
18
  * Per-session override of what continuous capture carries.
19
19
  */
20
- export type ModeArmArgsCapture = {
20
+ export type ModeArmModelCapture = {
21
21
  /**
22
22
  * Archive this session's working directory at every consistency point. Overrides the definition's `capture.workspace` for this session only; `false` records the leg as disabled in every checkpoint manifest the session produces, so a restore says "disabled" rather than "did not travel".
23
23
  */
24
24
  workspace?: boolean | undefined;
25
25
  };
26
26
 
27
- export type ModeArmArgs = {
27
+ export type ModeArmModel = {
28
28
  /**
29
29
  * Defaults to `oneshot` — the pre-existing behaviour. `rpc` starts a duplex session that emits `rpc` events on the stream and accepts `POST /:id/input`.
30
30
  */
@@ -33,6 +33,10 @@ export type ModeArmArgs = {
33
33
  * Which launcher arm to run. `classic` = `helix …` (orchestrator loaded), `prime` = `helix --prime …`, `agent` = `helix agent …`. Defaults to `agent`.
34
34
  */
35
35
  arm?: Schemadefaul8Open | undefined;
36
+ /**
37
+ * The `provider/model` to run, from the workspace's Helix Cloud model list (GET /api/sandbox/helix/defaults, or `mutagent helix models`). Omitted: the workspace default; none configured: 428. A value outside the list is a 422 that names the list. Equivalent to `--model` in `args`; if both are given they must name the same model, or the request is a 422. A `--model` in `args` with no value is a 422 too, and so is more than one `--model` there, or any `--provider` or `--models`: the harness runs the last `--model`, and those flags change which model it resolves.
38
+ */
39
+ model?: string | undefined;
36
40
  /**
37
41
  * Arguments for the Helix binary. Omitted starts it with none.
38
42
  */
@@ -52,55 +56,57 @@ export type ModeArmArgs = {
52
56
  /**
53
57
  * Per-session override of what continuous capture carries.
54
58
  */
55
- capture?: ModeArmArgsCapture | undefined;
59
+ capture?: ModeArmModelCapture | undefined;
56
60
  };
57
61
 
58
62
  /** @internal */
59
- export type ModeArmArgsCapture$Outbound = {
63
+ export type ModeArmModelCapture$Outbound = {
60
64
  workspace?: boolean | undefined;
61
65
  };
62
66
 
63
67
  /** @internal */
64
- export const ModeArmArgsCapture$outboundSchema: z.ZodMiniType<
65
- ModeArmArgsCapture$Outbound,
66
- ModeArmArgsCapture
68
+ export const ModeArmModelCapture$outboundSchema: z.ZodMiniType<
69
+ ModeArmModelCapture$Outbound,
70
+ ModeArmModelCapture
67
71
  > = z.object({
68
72
  workspace: z.optional(z.boolean()),
69
73
  });
70
74
 
71
- export function modeArmArgsCaptureToJSON(
72
- modeArmArgsCapture: ModeArmArgsCapture,
75
+ export function modeArmModelCaptureToJSON(
76
+ modeArmModelCapture: ModeArmModelCapture,
73
77
  ): string {
74
78
  return JSON.stringify(
75
- ModeArmArgsCapture$outboundSchema.parse(modeArmArgsCapture),
79
+ ModeArmModelCapture$outboundSchema.parse(modeArmModelCapture),
76
80
  );
77
81
  }
78
82
 
79
83
  /** @internal */
80
- export type ModeArmArgs$Outbound = {
84
+ export type ModeArmModel$Outbound = {
81
85
  mode: string;
82
86
  arm: string;
87
+ model?: string | undefined;
83
88
  args?: Array<string> | undefined;
84
89
  env?: { [k: string]: string } | undefined;
85
90
  environment?: string | undefined;
86
91
  cwd?: string | undefined;
87
- capture?: ModeArmArgsCapture$Outbound | undefined;
92
+ capture?: ModeArmModelCapture$Outbound | undefined;
88
93
  };
89
94
 
90
95
  /** @internal */
91
- export const ModeArmArgs$outboundSchema: z.ZodMiniType<
92
- ModeArmArgs$Outbound,
93
- ModeArmArgs
96
+ export const ModeArmModel$outboundSchema: z.ZodMiniType<
97
+ ModeArmModel$Outbound,
98
+ ModeArmModel
94
99
  > = z.object({
95
100
  mode: z._default(Schemadefaul7$outboundSchema, Schemadefaul7.Oneshot),
96
101
  arm: z._default(Schemadefaul8$outboundSchema, Schemadefaul8.Classic),
102
+ model: z.optional(z.string()),
97
103
  args: z.optional(z.array(z.string())),
98
104
  env: z.optional(z.record(z.string(), z.string())),
99
105
  environment: z.optional(z.string()),
100
106
  cwd: z.optional(z.string()),
101
- capture: z.optional(z.lazy(() => ModeArmArgsCapture$outboundSchema)),
107
+ capture: z.optional(z.lazy(() => ModeArmModelCapture$outboundSchema)),
102
108
  });
103
109
 
104
- export function modeArmArgsToJSON(modeArmArgs: ModeArmArgs): string {
105
- return JSON.stringify(ModeArmArgs$outboundSchema.parse(modeArmArgs));
110
+ export function modeArmModelToJSON(modeArmModel: ModeArmModel): string {
111
+ return JSON.stringify(ModeArmModel$outboundSchema.parse(modeArmModel));
106
112
  }
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
10
+
11
+ export type GetApiSandboxHelixDefaultsModel = {
12
+ /**
13
+ * `provider/model` in the harness spelling — the exact value `--model` (or a session/agent-run `model`) takes.
14
+ */
15
+ id: string;
16
+ /**
17
+ * The platform provider id of the row this model comes from (`provider_configs.provider`).
18
+ */
19
+ provider: string;
20
+ /**
21
+ * The harness provider id — the key in the box’s generated `models.json`.
22
+ */
23
+ harnessProvider: string;
24
+ model: string;
25
+ displayName: string;
26
+ };
27
+
28
+ /**
29
+ * The workspace’s Helix Cloud model list — the platform catalog restricted to the workspace’s active providers — and its default models.
30
+ */
31
+ export type GetApiSandboxHelixDefaultsResponse = {
32
+ workspaceId: string;
33
+ models: Array<GetApiSandboxHelixDefaultsModel>;
34
+ /**
35
+ * The stored `helix_default_models`, ordered, as written — an entry whose provider has since been deactivated stays listed here and is skipped at resolution.
36
+ */
37
+ defaults: Array<string>;
38
+ /**
39
+ * The model a run that names none will use: the first entry of `defaults` that is in `models`. Null means such a run answers 428 NO_PROVIDER_CONFIGURED.
40
+ */
41
+ default: string | null;
42
+ /**
43
+ * Active providers the box cannot credential, by name (a `custom` row as `custom:<harnessProvider>`). They contribute no models.
44
+ */
45
+ unmapped: Array<string>;
46
+ };
47
+
48
+ /** @internal */
49
+ export const GetApiSandboxHelixDefaultsModel$inboundSchema: z.ZodMiniType<
50
+ GetApiSandboxHelixDefaultsModel,
51
+ unknown
52
+ > = z.object({
53
+ id: types.string(),
54
+ provider: types.string(),
55
+ harnessProvider: types.string(),
56
+ model: types.string(),
57
+ displayName: types.string(),
58
+ });
59
+
60
+ export function getApiSandboxHelixDefaultsModelFromJSON(
61
+ jsonString: string,
62
+ ): SafeParseResult<GetApiSandboxHelixDefaultsModel, SDKValidationError> {
63
+ return safeParse(
64
+ jsonString,
65
+ (x) => GetApiSandboxHelixDefaultsModel$inboundSchema.parse(JSON.parse(x)),
66
+ `Failed to parse 'GetApiSandboxHelixDefaultsModel' from JSON`,
67
+ );
68
+ }
69
+
70
+ /** @internal */
71
+ export const GetApiSandboxHelixDefaultsResponse$inboundSchema: z.ZodMiniType<
72
+ GetApiSandboxHelixDefaultsResponse,
73
+ unknown
74
+ > = z.object({
75
+ workspaceId: types.string(),
76
+ models: z.array(z.lazy(() => GetApiSandboxHelixDefaultsModel$inboundSchema)),
77
+ defaults: z.array(types.string()),
78
+ default: types.nullable(types.string()),
79
+ unmapped: z.array(types.string()),
80
+ });
81
+
82
+ export function getApiSandboxHelixDefaultsResponseFromJSON(
83
+ jsonString: string,
84
+ ): SafeParseResult<GetApiSandboxHelixDefaultsResponse, SDKValidationError> {
85
+ return safeParse(
86
+ jsonString,
87
+ (x) =>
88
+ GetApiSandboxHelixDefaultsResponse$inboundSchema.parse(JSON.parse(x)),
89
+ `Failed to parse 'GetApiSandboxHelixDefaultsResponse' from JSON`,
90
+ );
91
+ }
@@ -25,6 +25,7 @@ export * from "./get-api-sandbox-by-id-traces.js";
25
25
  export * from "./get-api-sandbox-by-id.js";
26
26
  export * from "./get-api-sandbox-environments-by-name.js";
27
27
  export * from "./get-api-sandbox-environments.js";
28
+ export * from "./get-api-sandbox-helix-defaults.js";
28
29
  export * from "./get-api-sandbox-presets.js";
29
30
  export * from "./get-api-sandbox-providers.js";
30
31
  export * from "./get-api-sandbox.js";
@@ -65,6 +66,7 @@ export * from "./post-api-sandbox-telemetry-v1-traces.js";
65
66
  export * from "./post-api-sandbox-token.js";
66
67
  export * from "./post-api-sandbox.js";
67
68
  export * from "./put-api-sandbox-environments-by-name.js";
69
+ export * from "./put-api-sandbox-helix-defaults.js";
68
70
  export * from "./remove-organization-member.js";
69
71
  export * from "./remove-workspace-member.js";
70
72
  export * from "./resend-invitation.js";
@@ -8,7 +8,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import * as types from "../../types/primitives.js";
9
9
  import { SDKValidationError } from "../errors/sdk-validation-error.js";
10
10
 
11
- export type Model = {
11
+ export type ListAvailableModelsModel = {
12
12
  /**
13
13
  * Model identifier (e.g., "gpt-4o")
14
14
  */
@@ -38,7 +38,7 @@ export type ListAvailableModelsResponse = {
38
38
  /**
39
39
  * Available models from configured providers
40
40
  */
41
- models: Array<Model>;
41
+ models: Array<ListAvailableModelsModel>;
42
42
  /**
43
43
  * Provider types that have active configurations
44
44
  */
@@ -46,7 +46,10 @@ export type ListAvailableModelsResponse = {
46
46
  };
47
47
 
48
48
  /** @internal */
49
- export const Model$inboundSchema: z.ZodMiniType<Model, unknown> = z.object({
49
+ export const ListAvailableModelsModel$inboundSchema: z.ZodMiniType<
50
+ ListAvailableModelsModel,
51
+ unknown
52
+ > = z.object({
50
53
  id: types.string(),
51
54
  name: types.string(),
52
55
  provider: types.string(),
@@ -54,13 +57,13 @@ export const Model$inboundSchema: z.ZodMiniType<Model, unknown> = z.object({
54
57
  description: types.optional(types.string()),
55
58
  });
56
59
 
57
- export function modelFromJSON(
60
+ export function listAvailableModelsModelFromJSON(
58
61
  jsonString: string,
59
- ): SafeParseResult<Model, SDKValidationError> {
62
+ ): SafeParseResult<ListAvailableModelsModel, SDKValidationError> {
60
63
  return safeParse(
61
64
  jsonString,
62
- (x) => Model$inboundSchema.parse(JSON.parse(x)),
63
- `Failed to parse 'Model' from JSON`,
65
+ (x) => ListAvailableModelsModel$inboundSchema.parse(JSON.parse(x)),
66
+ `Failed to parse 'ListAvailableModelsModel' from JSON`,
64
67
  );
65
68
  }
66
69
 
@@ -69,7 +72,7 @@ export const ListAvailableModelsResponse$inboundSchema: z.ZodMiniType<
69
72
  ListAvailableModelsResponse,
70
73
  unknown
71
74
  > = z.object({
72
- models: z.array(z.lazy(() => Model$inboundSchema)),
75
+ models: z.array(z.lazy(() => ListAvailableModelsModel$inboundSchema)),
73
76
  providers: z.array(types.string()),
74
77
  });
75
78
 
@@ -17,6 +17,19 @@ export type PostApiSandboxAgentRunRequest = {
17
17
  body: models.PresetTimeoutMsKeep2;
18
18
  };
19
19
 
20
+ export enum PostApiSandboxAgentRunCode {
21
+ NoProviderConfigured = "NO_PROVIDER_CONFIGURED",
22
+ }
23
+
24
+ export type PostApiSandboxAgentRunNext = {
25
+ command?: string | undefined;
26
+ url?: string | undefined;
27
+ };
28
+
29
+ export type PostApiSandboxAgentRunDirective = {
30
+ next: Array<PostApiSandboxAgentRunNext>;
31
+ };
32
+
20
33
  /**
21
34
  * Result of a one-shot run
22
35
  */
@@ -70,6 +83,48 @@ export function postApiSandboxAgentRunRequestToJSON(
70
83
  );
71
84
  }
72
85
 
86
+ /** @internal */
87
+ export const PostApiSandboxAgentRunCode$inboundSchema: z.ZodMiniEnum<
88
+ typeof PostApiSandboxAgentRunCode
89
+ > = z.enum(PostApiSandboxAgentRunCode);
90
+
91
+ /** @internal */
92
+ export const PostApiSandboxAgentRunNext$inboundSchema: z.ZodMiniType<
93
+ PostApiSandboxAgentRunNext,
94
+ unknown
95
+ > = z.object({
96
+ command: types.optional(types.string()),
97
+ url: types.optional(types.string()),
98
+ });
99
+
100
+ export function postApiSandboxAgentRunNextFromJSON(
101
+ jsonString: string,
102
+ ): SafeParseResult<PostApiSandboxAgentRunNext, SDKValidationError> {
103
+ return safeParse(
104
+ jsonString,
105
+ (x) => PostApiSandboxAgentRunNext$inboundSchema.parse(JSON.parse(x)),
106
+ `Failed to parse 'PostApiSandboxAgentRunNext' from JSON`,
107
+ );
108
+ }
109
+
110
+ /** @internal */
111
+ export const PostApiSandboxAgentRunDirective$inboundSchema: z.ZodMiniType<
112
+ PostApiSandboxAgentRunDirective,
113
+ unknown
114
+ > = z.object({
115
+ next: z.array(z.lazy(() => PostApiSandboxAgentRunNext$inboundSchema)),
116
+ });
117
+
118
+ export function postApiSandboxAgentRunDirectiveFromJSON(
119
+ jsonString: string,
120
+ ): SafeParseResult<PostApiSandboxAgentRunDirective, SDKValidationError> {
121
+ return safeParse(
122
+ jsonString,
123
+ (x) => PostApiSandboxAgentRunDirective$inboundSchema.parse(JSON.parse(x)),
124
+ `Failed to parse 'PostApiSandboxAgentRunDirective' from JSON`,
125
+ );
126
+ }
127
+
73
128
  /** @internal */
74
129
  export const PostApiSandboxAgentRunResponse$inboundSchema: z.ZodMiniType<
75
130
  PostApiSandboxAgentRunResponse,
@@ -14,7 +14,20 @@ export type PostApiSandboxByIdSessionRequest = {
14
14
  /**
15
15
  * Start a Helix session inside a running sandbox
16
16
  */
17
- body: models.ModeArmArgs;
17
+ body: models.ModeArmModel;
18
+ };
19
+
20
+ export enum PostApiSandboxByIdSessionCode {
21
+ NoProviderConfigured = "NO_PROVIDER_CONFIGURED",
22
+ }
23
+
24
+ export type PostApiSandboxByIdSessionNext = {
25
+ command?: string | undefined;
26
+ url?: string | undefined;
27
+ };
28
+
29
+ export type PostApiSandboxByIdSessionDirective = {
30
+ next: Array<PostApiSandboxByIdSessionNext>;
18
31
  };
19
32
 
20
33
  /**
@@ -42,7 +55,7 @@ export type PostApiSandboxByIdSessionResponse = {
42
55
  /** @internal */
43
56
  export type PostApiSandboxByIdSessionRequest$Outbound = {
44
57
  id: string;
45
- body: models.ModeArmArgs$Outbound;
58
+ body: models.ModeArmModel$Outbound;
46
59
  };
47
60
 
48
61
  /** @internal */
@@ -51,7 +64,7 @@ export const PostApiSandboxByIdSessionRequest$outboundSchema: z.ZodMiniType<
51
64
  PostApiSandboxByIdSessionRequest
52
65
  > = z.object({
53
66
  id: z.string(),
54
- body: models.ModeArmArgs$outboundSchema,
67
+ body: models.ModeArmModel$outboundSchema,
55
68
  });
56
69
 
57
70
  export function postApiSandboxByIdSessionRequestToJSON(
@@ -64,6 +77,49 @@ export function postApiSandboxByIdSessionRequestToJSON(
64
77
  );
65
78
  }
66
79
 
80
+ /** @internal */
81
+ export const PostApiSandboxByIdSessionCode$inboundSchema: z.ZodMiniEnum<
82
+ typeof PostApiSandboxByIdSessionCode
83
+ > = z.enum(PostApiSandboxByIdSessionCode);
84
+
85
+ /** @internal */
86
+ export const PostApiSandboxByIdSessionNext$inboundSchema: z.ZodMiniType<
87
+ PostApiSandboxByIdSessionNext,
88
+ unknown
89
+ > = z.object({
90
+ command: types.optional(types.string()),
91
+ url: types.optional(types.string()),
92
+ });
93
+
94
+ export function postApiSandboxByIdSessionNextFromJSON(
95
+ jsonString: string,
96
+ ): SafeParseResult<PostApiSandboxByIdSessionNext, SDKValidationError> {
97
+ return safeParse(
98
+ jsonString,
99
+ (x) => PostApiSandboxByIdSessionNext$inboundSchema.parse(JSON.parse(x)),
100
+ `Failed to parse 'PostApiSandboxByIdSessionNext' from JSON`,
101
+ );
102
+ }
103
+
104
+ /** @internal */
105
+ export const PostApiSandboxByIdSessionDirective$inboundSchema: z.ZodMiniType<
106
+ PostApiSandboxByIdSessionDirective,
107
+ unknown
108
+ > = z.object({
109
+ next: z.array(z.lazy(() => PostApiSandboxByIdSessionNext$inboundSchema)),
110
+ });
111
+
112
+ export function postApiSandboxByIdSessionDirectiveFromJSON(
113
+ jsonString: string,
114
+ ): SafeParseResult<PostApiSandboxByIdSessionDirective, SDKValidationError> {
115
+ return safeParse(
116
+ jsonString,
117
+ (x) =>
118
+ PostApiSandboxByIdSessionDirective$inboundSchema.parse(JSON.parse(x)),
119
+ `Failed to parse 'PostApiSandboxByIdSessionDirective' from JSON`,
120
+ );
121
+ }
122
+
67
123
  /** @internal */
68
124
  export const PostApiSandboxByIdSessionResponse$inboundSchema: z.ZodMiniType<
69
125
  PostApiSandboxByIdSessionResponse,