@orq-ai/node 4.17.0-rc.6 → 4.17.0-rc.8

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 (130) hide show
  1. package/README.md +5 -3
  2. package/funcs/routerClassifyCreate.d.ts +10 -2
  3. package/funcs/routerClassifyCreate.d.ts.map +1 -1
  4. package/funcs/routerClassifyCreate.js +10 -2
  5. package/funcs/routerClassifyCreate.js.map +1 -1
  6. package/funcs/routerDecisionsCreate.d.ts +10 -2
  7. package/funcs/routerDecisionsCreate.d.ts.map +1 -1
  8. package/funcs/routerDecisionsCreate.js +11 -2
  9. package/funcs/routerDecisionsCreate.js.map +1 -1
  10. package/jsr.json +1 -1
  11. package/lib/config.d.ts +2 -2
  12. package/lib/config.js +2 -2
  13. package/models/components/classifytimeoutconfig.d.ts +15 -0
  14. package/models/components/classifytimeoutconfig.d.ts.map +1 -0
  15. package/models/components/classifytimeoutconfig.js +54 -0
  16. package/models/components/classifytimeoutconfig.js.map +1 -0
  17. package/models/components/index.d.ts +6 -0
  18. package/models/components/index.d.ts.map +1 -1
  19. package/models/components/index.js +6 -0
  20. package/models/components/index.js.map +1 -1
  21. package/models/components/reasoningpart.js +1 -1
  22. package/models/components/responsefunctioncallargumentsdonestreamevent.d.ts +4 -0
  23. package/models/components/responsefunctioncallargumentsdonestreamevent.d.ts.map +1 -1
  24. package/models/components/responsefunctioncallargumentsdonestreamevent.js +1 -0
  25. package/models/components/responsefunctioncallargumentsdonestreamevent.js.map +1 -1
  26. package/models/components/responseimagegenerationcallpartialimagestreamevent.d.ts +16 -0
  27. package/models/components/responseimagegenerationcallpartialimagestreamevent.d.ts.map +1 -1
  28. package/models/components/responseimagegenerationcallpartialimagestreamevent.js +5 -0
  29. package/models/components/responseimagegenerationcallpartialimagestreamevent.js.map +1 -1
  30. package/models/components/responsereasoningsummarypartaddedstreamevent.d.ts +4 -0
  31. package/models/components/responsereasoningsummarypartaddedstreamevent.d.ts.map +1 -1
  32. package/models/components/responsereasoningsummarypartaddedstreamevent.js +1 -0
  33. package/models/components/responsereasoningsummarypartaddedstreamevent.js.map +1 -1
  34. package/models/components/responsereasoningsummarypartdonestreamevent.d.ts +4 -0
  35. package/models/components/responsereasoningsummarypartdonestreamevent.d.ts.map +1 -1
  36. package/models/components/responsereasoningsummarypartdonestreamevent.js +1 -0
  37. package/models/components/responsereasoningsummarypartdonestreamevent.js.map +1 -1
  38. package/models/components/responseshellcallcommandaddedstreamevent.d.ts +35 -0
  39. package/models/components/responseshellcallcommandaddedstreamevent.d.ts.map +1 -0
  40. package/models/components/responseshellcallcommandaddedstreamevent.js +61 -0
  41. package/models/components/responseshellcallcommandaddedstreamevent.js.map +1 -0
  42. package/models/components/responseshellcallcommanddeltastreamevent.d.ts +39 -0
  43. package/models/components/responseshellcallcommanddeltastreamevent.d.ts.map +1 -0
  44. package/models/components/responseshellcallcommanddeltastreamevent.js +62 -0
  45. package/models/components/responseshellcallcommanddeltastreamevent.js.map +1 -0
  46. package/models/components/responseshellcallcommanddonestreamevent.d.ts +35 -0
  47. package/models/components/responseshellcallcommanddonestreamevent.d.ts.map +1 -0
  48. package/models/components/responseshellcallcommanddonestreamevent.js +61 -0
  49. package/models/components/responseshellcallcommanddonestreamevent.js.map +1 -0
  50. package/models/components/responseshellcalloutputcontentdeltastreamevent.d.ts +41 -0
  51. package/models/components/responseshellcalloutputcontentdeltastreamevent.d.ts.map +1 -0
  52. package/models/components/responseshellcalloutputcontentdeltastreamevent.js +63 -0
  53. package/models/components/responseshellcalloutputcontentdeltastreamevent.js.map +1 -0
  54. package/models/components/responseshellcalloutputcontentdonestreamevent.d.ts +38 -0
  55. package/models/components/responseshellcalloutputcontentdonestreamevent.d.ts.map +1 -0
  56. package/models/components/responseshellcalloutputcontentdonestreamevent.js +63 -0
  57. package/models/components/responseshellcalloutputcontentdonestreamevent.js.map +1 -0
  58. package/models/components/responsestreamevent.d.ts +6 -1
  59. package/models/components/responsestreamevent.d.ts.map +1 -1
  60. package/models/components/responsestreamevent.js +10 -0
  61. package/models/components/responsestreamevent.js.map +1 -1
  62. package/models/errors/createclassify.d.ts +23 -2
  63. package/models/errors/createclassify.d.ts.map +1 -1
  64. package/models/errors/createclassify.js +30 -2
  65. package/models/errors/createclassify.js.map +1 -1
  66. package/models/errors/createdecisions.d.ts +23 -2
  67. package/models/errors/createdecisions.d.ts.map +1 -1
  68. package/models/errors/createdecisions.js +30 -2
  69. package/models/errors/createdecisions.js.map +1 -1
  70. package/models/operations/createclassify.d.ts +2 -0
  71. package/models/operations/createclassify.d.ts.map +1 -1
  72. package/models/operations/createclassify.js +1 -0
  73. package/models/operations/createclassify.js.map +1 -1
  74. package/models/operations/createdecisions.d.ts +2 -0
  75. package/models/operations/createdecisions.d.ts.map +1 -1
  76. package/models/operations/createdecisions.js +1 -0
  77. package/models/operations/createdecisions.js.map +1 -1
  78. package/models/operations/createtool.js +4 -4
  79. package/models/operations/getalltools.js +4 -4
  80. package/models/operations/getv2humanevalsets.js +2 -2
  81. package/models/operations/getv2humanevalsetsid.js +2 -2
  82. package/models/operations/patchv2humanevalsetsid.js +2 -2
  83. package/models/operations/postv2feedbackevaluation.js +4 -4
  84. package/models/operations/postv2humanevalsets.js +2 -2
  85. package/models/operations/retrievetool.js +4 -4
  86. package/models/operations/runagent.js +1 -1
  87. package/models/operations/streamrunagent.js +1 -1
  88. package/models/operations/updatetool.js +4 -4
  89. package/package.json +1 -1
  90. package/sdk/classify.d.ts +9 -1
  91. package/sdk/classify.d.ts.map +1 -1
  92. package/sdk/classify.js +9 -1
  93. package/sdk/classify.js.map +1 -1
  94. package/sdk/decisions.d.ts +9 -1
  95. package/sdk/decisions.d.ts.map +1 -1
  96. package/sdk/decisions.js +9 -1
  97. package/sdk/decisions.js.map +1 -1
  98. package/src/funcs/routerClassifyCreate.ts +16 -1
  99. package/src/funcs/routerDecisionsCreate.ts +17 -1
  100. package/src/lib/config.ts +2 -2
  101. package/src/models/components/classifytimeoutconfig.ts +39 -0
  102. package/src/models/components/index.ts +6 -0
  103. package/src/models/components/reasoningpart.ts +1 -1
  104. package/src/models/components/responsefunctioncallargumentsdonestreamevent.ts +5 -0
  105. package/src/models/components/responseimagegenerationcallpartialimagestreamevent.ts +21 -0
  106. package/src/models/components/responsereasoningsummarypartaddedstreamevent.ts +5 -0
  107. package/src/models/components/responsereasoningsummarypartdonestreamevent.ts +5 -0
  108. package/src/models/components/responseshellcallcommandaddedstreamevent.ts +78 -0
  109. package/src/models/components/responseshellcallcommanddeltastreamevent.ts +83 -0
  110. package/src/models/components/responseshellcallcommanddonestreamevent.ts +78 -0
  111. package/src/models/components/responseshellcalloutputcontentdeltastreamevent.ts +85 -0
  112. package/src/models/components/responseshellcalloutputcontentdonestreamevent.ts +82 -0
  113. package/src/models/components/responsestreamevent.ts +30 -0
  114. package/src/models/errors/createclassify.ts +54 -2
  115. package/src/models/errors/createdecisions.ts +54 -2
  116. package/src/models/operations/createclassify.ts +3 -0
  117. package/src/models/operations/createdecisions.ts +3 -0
  118. package/src/models/operations/createtool.ts +4 -4
  119. package/src/models/operations/getalltools.ts +4 -4
  120. package/src/models/operations/getv2humanevalsets.ts +2 -2
  121. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  122. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  123. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  124. package/src/models/operations/postv2humanevalsets.ts +2 -2
  125. package/src/models/operations/retrievetool.ts +4 -4
  126. package/src/models/operations/runagent.ts +1 -1
  127. package/src/models/operations/streamrunagent.ts +1 -1
  128. package/src/models/operations/updatetool.ts +4 -4
  129. package/src/sdk/classify.ts +9 -1
  130. package/src/sdk/decisions.ts +9 -1
@@ -91,6 +91,7 @@ export * from "./classifynoulanswer.js";
91
91
  export * from "./classifyrefusalanswer.js";
92
92
  export * from "./classifyretryconfig.js";
93
93
  export * from "./classifyscoreanswer.js";
94
+ export * from "./classifytimeoutconfig.js";
94
95
  export * from "./classifyusage.js";
95
96
  export * from "./codeinterpretertoolinput.js";
96
97
  export * from "./codetoolinput.js";
@@ -545,6 +546,11 @@ export * from "./responsereasoningtextdonestreamevent.js";
545
546
  export * from "./responserefusaldeltastreamevent.js";
546
547
  export * from "./responserefusaldonestreamevent.js";
547
548
  export * from "./responseretryconfig.js";
549
+ export * from "./responseshellcallcommandaddedstreamevent.js";
550
+ export * from "./responseshellcallcommanddeltastreamevent.js";
551
+ export * from "./responseshellcallcommanddonestreamevent.js";
552
+ export * from "./responseshellcalloutputcontentdeltastreamevent.js";
553
+ export * from "./responseshellcalloutputcontentdonestreamevent.js";
548
554
  export * from "./responsestartedevent.js";
549
555
  export * from "./responsestreamevent.js";
550
556
  export * from "./responsestreamingevent.js";
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
40
40
  z.ZodTypeDef,
41
41
  unknown
42
42
  > = z.object({
43
- _id: z.string().default("reasoning_01m4gd6yttgv9d36vz51fyhetc"),
43
+ _id: z.string().default("reasoning_01m4h4gsswce33sqxcdy6yk8s8"),
44
44
  metadata: z.record(z.any()).optional(),
45
45
  kind: z.literal("reasoning"),
46
46
  reasoning: z.string(),
@@ -23,6 +23,10 @@ export type ResponseFunctionCallArgumentsDoneStreamEvent = {
23
23
  * ID of the output item this event refers to.
24
24
  */
25
25
  itemId: string;
26
+ /**
27
+ * The function name.
28
+ */
29
+ name?: string | undefined;
26
30
  /**
27
31
  * Index of the output item in the response output array.
28
32
  */
@@ -48,6 +52,7 @@ export const ResponseFunctionCallArgumentsDoneStreamEvent$inboundSchema:
48
52
  z.object({
49
53
  arguments: z.string(),
50
54
  item_id: z.string(),
55
+ name: z.string().optional(),
51
56
  output_index: z.number().int(),
52
57
  sequence_number: z.number().int(),
53
58
  type: z.literal("response.function_call_arguments.done"),
@@ -15,10 +15,18 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
15
15
  * A `response.image_generation_call.partial_image` server-sent event.
16
16
  */
17
17
  export type ResponseImageGenerationCallPartialImageStreamEvent = {
18
+ /**
19
+ * Image background.
20
+ */
21
+ background?: string | undefined;
18
22
  /**
19
23
  * ID of the output item this event refers to.
20
24
  */
21
25
  itemId: string;
26
+ /**
27
+ * Image encoding format.
28
+ */
29
+ outputFormat?: string | undefined;
22
30
  /**
23
31
  * Index of the output item in the response output array.
24
32
  */
@@ -31,10 +39,18 @@ export type ResponseImageGenerationCallPartialImageStreamEvent = {
31
39
  * Index of the partial image.
32
40
  */
33
41
  partialImageIndex: number;
42
+ /**
43
+ * Image quality.
44
+ */
45
+ quality?: string | undefined;
34
46
  /**
35
47
  * Monotonically increasing sequence number for ordering events.
36
48
  */
37
49
  sequenceNumber: number;
50
+ /**
51
+ * Image dimensions.
52
+ */
53
+ size?: string | undefined;
38
54
  /**
39
55
  * The event type. Discriminates the payload.
40
56
  */
@@ -50,11 +66,15 @@ export const ResponseImageGenerationCallPartialImageStreamEvent$inboundSchema:
50
66
  unknown
51
67
  > = collectExtraKeys$(
52
68
  z.object({
69
+ background: z.string().optional(),
53
70
  item_id: z.string(),
71
+ output_format: z.string().optional(),
54
72
  output_index: z.number().int(),
55
73
  partial_image_b64: z.string(),
56
74
  partial_image_index: z.number().int(),
75
+ quality: z.string().optional(),
57
76
  sequence_number: z.number().int(),
77
+ size: z.string().optional(),
58
78
  type: z.literal("response.image_generation_call.partial_image"),
59
79
  }).catchall(z.any()),
60
80
  "additionalProperties",
@@ -62,6 +82,7 @@ export const ResponseImageGenerationCallPartialImageStreamEvent$inboundSchema:
62
82
  ).transform((v) => {
63
83
  return remap$(v, {
64
84
  "item_id": "itemId",
85
+ "output_format": "outputFormat",
65
86
  "output_index": "outputIndex",
66
87
  "partial_image_b64": "partialImageB64",
67
88
  "partial_image_index": "partialImageIndex",
@@ -31,6 +31,10 @@ export type ResponseReasoningSummaryPartAddedStreamEvent = {
31
31
  * Monotonically increasing sequence number for ordering events.
32
32
  */
33
33
  sequenceNumber: number;
34
+ /**
35
+ * The completed summary part status, when supplied.
36
+ */
37
+ status?: string | undefined;
34
38
  /**
35
39
  * Index of the reasoning summary part.
36
40
  */
@@ -54,6 +58,7 @@ export const ResponseReasoningSummaryPartAddedStreamEvent$inboundSchema:
54
58
  output_index: z.number().int(),
55
59
  part: z.record(z.any()),
56
60
  sequence_number: z.number().int(),
61
+ status: z.string().optional(),
57
62
  summary_index: z.number().int(),
58
63
  type: z.literal("response.reasoning_summary_part.added"),
59
64
  }).catchall(z.any()),
@@ -31,6 +31,10 @@ export type ResponseReasoningSummaryPartDoneStreamEvent = {
31
31
  * Monotonically increasing sequence number for ordering events.
32
32
  */
33
33
  sequenceNumber: number;
34
+ /**
35
+ * The completed summary part status, when supplied.
36
+ */
37
+ status?: string | undefined;
34
38
  /**
35
39
  * Index of the reasoning summary part.
36
40
  */
@@ -54,6 +58,7 @@ export const ResponseReasoningSummaryPartDoneStreamEvent$inboundSchema:
54
58
  output_index: z.number().int(),
55
59
  part: z.record(z.any()),
56
60
  sequence_number: z.number().int(),
61
+ status: z.string().optional(),
57
62
  summary_index: z.number().int(),
58
63
  type: z.literal("response.reasoning_summary_part.done"),
59
64
  }).catchall(z.any()),
@@ -0,0 +1,78 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import {
8
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { Result as SafeParseResult } from "../../types/fp.js";
12
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
+
14
+ /**
15
+ * A `response.shell_call_command.added` server-sent event.
16
+ */
17
+ export type ResponseShellCallCommandAddedStreamEvent = {
18
+ /**
19
+ * The shell command.
20
+ */
21
+ command: string;
22
+ /**
23
+ * Index of the shell command.
24
+ */
25
+ commandIndex: number;
26
+ /**
27
+ * Index of the output item in the response output array.
28
+ */
29
+ outputIndex: number;
30
+ /**
31
+ * Monotonically increasing sequence number for ordering events.
32
+ */
33
+ sequenceNumber: number;
34
+ /**
35
+ * The event type. Discriminates the payload.
36
+ */
37
+ type: "response.shell_call_command.added";
38
+ additionalProperties?: { [k: string]: any } | undefined;
39
+ };
40
+
41
+ /** @internal */
42
+ export const ResponseShellCallCommandAddedStreamEvent$inboundSchema: z.ZodType<
43
+ ResponseShellCallCommandAddedStreamEvent,
44
+ z.ZodTypeDef,
45
+ unknown
46
+ > = collectExtraKeys$(
47
+ z.object({
48
+ command: z.string(),
49
+ command_index: z.number().int(),
50
+ output_index: z.number().int(),
51
+ sequence_number: z.number().int(),
52
+ type: z.literal("response.shell_call_command.added"),
53
+ }).catchall(z.any()),
54
+ "additionalProperties",
55
+ true,
56
+ ).transform((v) => {
57
+ return remap$(v, {
58
+ "command_index": "commandIndex",
59
+ "output_index": "outputIndex",
60
+ "sequence_number": "sequenceNumber",
61
+ });
62
+ });
63
+
64
+ export function responseShellCallCommandAddedStreamEventFromJSON(
65
+ jsonString: string,
66
+ ): SafeParseResult<
67
+ ResponseShellCallCommandAddedStreamEvent,
68
+ SDKValidationError
69
+ > {
70
+ return safeParse(
71
+ jsonString,
72
+ (x) =>
73
+ ResponseShellCallCommandAddedStreamEvent$inboundSchema.parse(
74
+ JSON.parse(x),
75
+ ),
76
+ `Failed to parse 'ResponseShellCallCommandAddedStreamEvent' from JSON`,
77
+ );
78
+ }
@@ -0,0 +1,83 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import {
8
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { Result as SafeParseResult } from "../../types/fp.js";
12
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
+
14
+ /**
15
+ * A `response.shell_call_command.delta` server-sent event.
16
+ */
17
+ export type ResponseShellCallCommandDeltaStreamEvent = {
18
+ /**
19
+ * Index of the shell command.
20
+ */
21
+ commandIndex: number;
22
+ /**
23
+ * Incremental text or argument chunk.
24
+ */
25
+ delta: string;
26
+ /**
27
+ * Obfuscation padding accompanying the delta, when present.
28
+ */
29
+ obfuscation?: string | undefined;
30
+ /**
31
+ * Index of the output item in the response output array.
32
+ */
33
+ outputIndex: number;
34
+ /**
35
+ * Monotonically increasing sequence number for ordering events.
36
+ */
37
+ sequenceNumber: number;
38
+ /**
39
+ * The event type. Discriminates the payload.
40
+ */
41
+ type: "response.shell_call_command.delta";
42
+ additionalProperties?: { [k: string]: any } | undefined;
43
+ };
44
+
45
+ /** @internal */
46
+ export const ResponseShellCallCommandDeltaStreamEvent$inboundSchema: z.ZodType<
47
+ ResponseShellCallCommandDeltaStreamEvent,
48
+ z.ZodTypeDef,
49
+ unknown
50
+ > = collectExtraKeys$(
51
+ z.object({
52
+ command_index: z.number().int(),
53
+ delta: z.string(),
54
+ obfuscation: z.string().optional(),
55
+ output_index: z.number().int(),
56
+ sequence_number: z.number().int(),
57
+ type: z.literal("response.shell_call_command.delta"),
58
+ }).catchall(z.any()),
59
+ "additionalProperties",
60
+ true,
61
+ ).transform((v) => {
62
+ return remap$(v, {
63
+ "command_index": "commandIndex",
64
+ "output_index": "outputIndex",
65
+ "sequence_number": "sequenceNumber",
66
+ });
67
+ });
68
+
69
+ export function responseShellCallCommandDeltaStreamEventFromJSON(
70
+ jsonString: string,
71
+ ): SafeParseResult<
72
+ ResponseShellCallCommandDeltaStreamEvent,
73
+ SDKValidationError
74
+ > {
75
+ return safeParse(
76
+ jsonString,
77
+ (x) =>
78
+ ResponseShellCallCommandDeltaStreamEvent$inboundSchema.parse(
79
+ JSON.parse(x),
80
+ ),
81
+ `Failed to parse 'ResponseShellCallCommandDeltaStreamEvent' from JSON`,
82
+ );
83
+ }
@@ -0,0 +1,78 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import {
8
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { Result as SafeParseResult } from "../../types/fp.js";
12
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
+
14
+ /**
15
+ * A `response.shell_call_command.done` server-sent event.
16
+ */
17
+ export type ResponseShellCallCommandDoneStreamEvent = {
18
+ /**
19
+ * The shell command.
20
+ */
21
+ command: string;
22
+ /**
23
+ * Index of the shell command.
24
+ */
25
+ commandIndex: number;
26
+ /**
27
+ * Index of the output item in the response output array.
28
+ */
29
+ outputIndex: number;
30
+ /**
31
+ * Monotonically increasing sequence number for ordering events.
32
+ */
33
+ sequenceNumber: number;
34
+ /**
35
+ * The event type. Discriminates the payload.
36
+ */
37
+ type: "response.shell_call_command.done";
38
+ additionalProperties?: { [k: string]: any } | undefined;
39
+ };
40
+
41
+ /** @internal */
42
+ export const ResponseShellCallCommandDoneStreamEvent$inboundSchema: z.ZodType<
43
+ ResponseShellCallCommandDoneStreamEvent,
44
+ z.ZodTypeDef,
45
+ unknown
46
+ > = collectExtraKeys$(
47
+ z.object({
48
+ command: z.string(),
49
+ command_index: z.number().int(),
50
+ output_index: z.number().int(),
51
+ sequence_number: z.number().int(),
52
+ type: z.literal("response.shell_call_command.done"),
53
+ }).catchall(z.any()),
54
+ "additionalProperties",
55
+ true,
56
+ ).transform((v) => {
57
+ return remap$(v, {
58
+ "command_index": "commandIndex",
59
+ "output_index": "outputIndex",
60
+ "sequence_number": "sequenceNumber",
61
+ });
62
+ });
63
+
64
+ export function responseShellCallCommandDoneStreamEventFromJSON(
65
+ jsonString: string,
66
+ ): SafeParseResult<
67
+ ResponseShellCallCommandDoneStreamEvent,
68
+ SDKValidationError
69
+ > {
70
+ return safeParse(
71
+ jsonString,
72
+ (x) =>
73
+ ResponseShellCallCommandDoneStreamEvent$inboundSchema.parse(
74
+ JSON.parse(x),
75
+ ),
76
+ `Failed to parse 'ResponseShellCallCommandDoneStreamEvent' from JSON`,
77
+ );
78
+ }
@@ -0,0 +1,85 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import {
8
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { Result as SafeParseResult } from "../../types/fp.js";
12
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
+
14
+ /**
15
+ * A `response.shell_call_output_content.delta` server-sent event.
16
+ */
17
+ export type ResponseShellCallOutputContentDeltaStreamEvent = {
18
+ /**
19
+ * Index of the shell command.
20
+ */
21
+ commandIndex: number;
22
+ /**
23
+ * Shell stdout and stderr deltas.
24
+ */
25
+ delta: { [k: string]: any };
26
+ /**
27
+ * ID of the output item this event refers to.
28
+ */
29
+ itemId: string;
30
+ /**
31
+ * Index of the output item in the response output array.
32
+ */
33
+ outputIndex: number;
34
+ /**
35
+ * Monotonically increasing sequence number for ordering events.
36
+ */
37
+ sequenceNumber: number;
38
+ /**
39
+ * The event type. Discriminates the payload.
40
+ */
41
+ type: "response.shell_call_output_content.delta";
42
+ additionalProperties?: { [k: string]: any } | undefined;
43
+ };
44
+
45
+ /** @internal */
46
+ export const ResponseShellCallOutputContentDeltaStreamEvent$inboundSchema:
47
+ z.ZodType<
48
+ ResponseShellCallOutputContentDeltaStreamEvent,
49
+ z.ZodTypeDef,
50
+ unknown
51
+ > = collectExtraKeys$(
52
+ z.object({
53
+ command_index: z.number().int(),
54
+ delta: z.record(z.any()),
55
+ item_id: z.string(),
56
+ output_index: z.number().int(),
57
+ sequence_number: z.number().int(),
58
+ type: z.literal("response.shell_call_output_content.delta"),
59
+ }).catchall(z.any()),
60
+ "additionalProperties",
61
+ true,
62
+ ).transform((v) => {
63
+ return remap$(v, {
64
+ "command_index": "commandIndex",
65
+ "item_id": "itemId",
66
+ "output_index": "outputIndex",
67
+ "sequence_number": "sequenceNumber",
68
+ });
69
+ });
70
+
71
+ export function responseShellCallOutputContentDeltaStreamEventFromJSON(
72
+ jsonString: string,
73
+ ): SafeParseResult<
74
+ ResponseShellCallOutputContentDeltaStreamEvent,
75
+ SDKValidationError
76
+ > {
77
+ return safeParse(
78
+ jsonString,
79
+ (x) =>
80
+ ResponseShellCallOutputContentDeltaStreamEvent$inboundSchema.parse(
81
+ JSON.parse(x),
82
+ ),
83
+ `Failed to parse 'ResponseShellCallOutputContentDeltaStreamEvent' from JSON`,
84
+ );
85
+ }
@@ -0,0 +1,82 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import {
8
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { Result as SafeParseResult } from "../../types/fp.js";
12
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
+
14
+ /**
15
+ * A `response.shell_call_output_content.done` server-sent event.
16
+ */
17
+ export type ResponseShellCallOutputContentDoneStreamEvent = {
18
+ /**
19
+ * Index of the shell command.
20
+ */
21
+ commandIndex: number;
22
+ /**
23
+ * ID of the output item this event refers to.
24
+ */
25
+ itemId: string;
26
+ output: Array<{ [k: string]: any }>;
27
+ /**
28
+ * Index of the output item in the response output array.
29
+ */
30
+ outputIndex: number;
31
+ /**
32
+ * Monotonically increasing sequence number for ordering events.
33
+ */
34
+ sequenceNumber: number;
35
+ /**
36
+ * The event type. Discriminates the payload.
37
+ */
38
+ type: "response.shell_call_output_content.done";
39
+ additionalProperties?: { [k: string]: any } | undefined;
40
+ };
41
+
42
+ /** @internal */
43
+ export const ResponseShellCallOutputContentDoneStreamEvent$inboundSchema:
44
+ z.ZodType<
45
+ ResponseShellCallOutputContentDoneStreamEvent,
46
+ z.ZodTypeDef,
47
+ unknown
48
+ > = collectExtraKeys$(
49
+ z.object({
50
+ command_index: z.number().int(),
51
+ item_id: z.string(),
52
+ output: z.array(z.record(z.any())),
53
+ output_index: z.number().int(),
54
+ sequence_number: z.number().int(),
55
+ type: z.literal("response.shell_call_output_content.done"),
56
+ }).catchall(z.any()),
57
+ "additionalProperties",
58
+ true,
59
+ ).transform((v) => {
60
+ return remap$(v, {
61
+ "command_index": "commandIndex",
62
+ "item_id": "itemId",
63
+ "output_index": "outputIndex",
64
+ "sequence_number": "sequenceNumber",
65
+ });
66
+ });
67
+
68
+ export function responseShellCallOutputContentDoneStreamEventFromJSON(
69
+ jsonString: string,
70
+ ): SafeParseResult<
71
+ ResponseShellCallOutputContentDoneStreamEvent,
72
+ SDKValidationError
73
+ > {
74
+ return safeParse(
75
+ jsonString,
76
+ (x) =>
77
+ ResponseShellCallOutputContentDoneStreamEvent$inboundSchema.parse(
78
+ JSON.parse(x),
79
+ ),
80
+ `Failed to parse 'ResponseShellCallOutputContentDoneStreamEvent' from JSON`,
81
+ );
82
+ }
@@ -198,6 +198,26 @@ import {
198
198
  ResponseRefusalDoneStreamEvent,
199
199
  ResponseRefusalDoneStreamEvent$inboundSchema,
200
200
  } from "./responserefusaldonestreamevent.js";
201
+ import {
202
+ ResponseShellCallCommandAddedStreamEvent,
203
+ ResponseShellCallCommandAddedStreamEvent$inboundSchema,
204
+ } from "./responseshellcallcommandaddedstreamevent.js";
205
+ import {
206
+ ResponseShellCallCommandDeltaStreamEvent,
207
+ ResponseShellCallCommandDeltaStreamEvent$inboundSchema,
208
+ } from "./responseshellcallcommanddeltastreamevent.js";
209
+ import {
210
+ ResponseShellCallCommandDoneStreamEvent,
211
+ ResponseShellCallCommandDoneStreamEvent$inboundSchema,
212
+ } from "./responseshellcallcommanddonestreamevent.js";
213
+ import {
214
+ ResponseShellCallOutputContentDeltaStreamEvent,
215
+ ResponseShellCallOutputContentDeltaStreamEvent$inboundSchema,
216
+ } from "./responseshellcalloutputcontentdeltastreamevent.js";
217
+ import {
218
+ ResponseShellCallOutputContentDoneStreamEvent,
219
+ ResponseShellCallOutputContentDoneStreamEvent$inboundSchema,
220
+ } from "./responseshellcalloutputcontentdonestreamevent.js";
201
221
  import {
202
222
  ResponseWebSearchCallCompletedStreamEvent,
203
223
  ResponseWebSearchCallCompletedStreamEvent$inboundSchema,
@@ -263,6 +283,11 @@ export type ResponseStreamEvent =
263
283
  | ResponseReasoningTextDoneStreamEvent
264
284
  | ResponseRefusalDeltaStreamEvent
265
285
  | ResponseRefusalDoneStreamEvent
286
+ | ResponseShellCallCommandAddedStreamEvent
287
+ | ResponseShellCallCommandDeltaStreamEvent
288
+ | ResponseShellCallCommandDoneStreamEvent
289
+ | ResponseShellCallOutputContentDeltaStreamEvent
290
+ | ResponseShellCallOutputContentDoneStreamEvent
266
291
  | ResponseWebSearchCallCompletedStreamEvent
267
292
  | ResponseWebSearchCallInProgressStreamEvent
268
293
  | ResponseWebSearchCallSearchingStreamEvent;
@@ -321,6 +346,11 @@ export const ResponseStreamEvent$inboundSchema: z.ZodType<
321
346
  ResponseReasoningTextDoneStreamEvent$inboundSchema,
322
347
  ResponseRefusalDeltaStreamEvent$inboundSchema,
323
348
  ResponseRefusalDoneStreamEvent$inboundSchema,
349
+ ResponseShellCallCommandAddedStreamEvent$inboundSchema,
350
+ ResponseShellCallCommandDeltaStreamEvent$inboundSchema,
351
+ ResponseShellCallCommandDoneStreamEvent$inboundSchema,
352
+ ResponseShellCallOutputContentDeltaStreamEvent$inboundSchema,
353
+ ResponseShellCallOutputContentDoneStreamEvent$inboundSchema,
324
354
  ResponseWebSearchCallCompletedStreamEvent$inboundSchema,
325
355
  ResponseWebSearchCallInProgressStreamEvent$inboundSchema,
326
356
  ResponseWebSearchCallSearchingStreamEvent$inboundSchema,
@@ -134,6 +134,38 @@ export class CreateClassifyRouterClassifyResponse422ResponseBody
134
134
  }
135
135
  }
136
136
 
137
+ /**
138
+ * The final model call exceeded its timeout after available retries and fallbacks were exhausted.
139
+ */
140
+ export type CreateClassifyRouterClassifyResponse408ResponseBodyData = {
141
+ error: components.APIError;
142
+ };
143
+
144
+ /**
145
+ * The final model call exceeded its timeout after available retries and fallbacks were exhausted.
146
+ */
147
+ export class CreateClassifyRouterClassifyResponse408ResponseBody
148
+ extends OrqError
149
+ {
150
+ error: components.APIError;
151
+
152
+ /** The original data that was passed to this error instance. */
153
+ data$: CreateClassifyRouterClassifyResponse408ResponseBodyData;
154
+
155
+ constructor(
156
+ err: CreateClassifyRouterClassifyResponse408ResponseBodyData,
157
+ httpMeta: { response: Response; request: Request; body: string },
158
+ ) {
159
+ const message = err.error?.message
160
+ || `API error occurred: ${JSON.stringify(err)}`;
161
+ super(message, httpMeta);
162
+ this.data$ = err;
163
+ this.error = err.error;
164
+
165
+ this.name = "CreateClassifyRouterClassifyResponse408ResponseBody";
166
+ }
167
+ }
168
+
137
169
  /**
138
170
  * The API key lacks classify permission, or the workspace or project cannot access the model.
139
171
  */
@@ -195,14 +227,14 @@ export class CreateClassifyRouterClassifyResponseBody extends OrqError {
195
227
  }
196
228
 
197
229
  /**
198
- * Malformed JSON, missing or unsupported model, or invalid retry/fallback fields.
230
+ * Malformed JSON, missing or unsupported model, or invalid retry, timeout, or fallback fields.
199
231
  */
200
232
  export type CreateClassifyResponseBodyData = {
201
233
  error: components.APIError;
202
234
  };
203
235
 
204
236
  /**
205
- * Malformed JSON, missing or unsupported model, or invalid retry/fallback fields.
237
+ * Malformed JSON, missing or unsupported model, or invalid retry, timeout, or fallback fields.
206
238
  */
207
239
  export class CreateClassifyResponseBody extends OrqError {
208
240
  error: components.APIError;
@@ -304,6 +336,26 @@ export const CreateClassifyRouterClassifyResponse422ResponseBody$inboundSchema:
304
336
  });
305
337
  });
306
338
 
339
+ /** @internal */
340
+ export const CreateClassifyRouterClassifyResponse408ResponseBody$inboundSchema:
341
+ z.ZodType<
342
+ CreateClassifyRouterClassifyResponse408ResponseBody,
343
+ z.ZodTypeDef,
344
+ unknown
345
+ > = z.object({
346
+ error: components.APIError$inboundSchema,
347
+ request$: z.instanceof(Request),
348
+ response$: z.instanceof(Response),
349
+ body$: z.string(),
350
+ })
351
+ .transform((v) => {
352
+ return new CreateClassifyRouterClassifyResponse408ResponseBody(v, {
353
+ request: v.request$,
354
+ response: v.response$,
355
+ body: v.body$,
356
+ });
357
+ });
358
+
307
359
  /** @internal */
308
360
  export const CreateClassifyRouterClassifyResponseResponseBody$inboundSchema:
309
361
  z.ZodType<