supercompat 3.6.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +421 -171
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +421 -171
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -6648,6 +6648,14 @@ function serializeItemAsMessageCreationRunStep(param) {
|
|
|
6648
6648
|
// src/lib/items/serializeItemAsFunctionCallRunStep.ts
|
|
6649
6649
|
import dayjs13 from "dayjs";
|
|
6650
6650
|
import { uid as uid6 } from "radash";
|
|
6651
|
+
var serializeFunctionCallOutput = function(param) {
|
|
6652
|
+
var functionCallOutput = param.functionCallOutput;
|
|
6653
|
+
if (!functionCallOutput) return null;
|
|
6654
|
+
if (typeof functionCallOutput.output === "string") {
|
|
6655
|
+
return functionCallOutput.output;
|
|
6656
|
+
}
|
|
6657
|
+
return JSON.stringify(functionCallOutput.output);
|
|
6658
|
+
};
|
|
6651
6659
|
var serializeItemAsFunctionCallRunStep = function(param) {
|
|
6652
6660
|
var item = param.item, items = param.items, threadId = param.threadId, openaiAssistant = param.openaiAssistant, _param_runId = param.runId, runId = _param_runId === void 0 ? "run_".concat(uid6(24)) : _param_runId, tmp = param.status, status3 = tmp === void 0 ? "completed" : tmp, _param_completedAt = param.completedAt, completedAt = _param_completedAt === void 0 ? dayjs13().unix() : _param_completedAt;
|
|
6653
6661
|
var itemId = typeof item.id === "string" ? item.id : "item_".concat(uid6(18));
|
|
@@ -6676,7 +6684,9 @@ var serializeItemAsFunctionCallRunStep = function(param) {
|
|
|
6676
6684
|
function: {
|
|
6677
6685
|
name: item.name,
|
|
6678
6686
|
arguments: item.arguments,
|
|
6679
|
-
output:
|
|
6687
|
+
output: serializeFunctionCallOutput({
|
|
6688
|
+
functionCallOutput: functionCallOutput
|
|
6689
|
+
})
|
|
6680
6690
|
}
|
|
6681
6691
|
};
|
|
6682
6692
|
return _object_spread_props(_object_spread({}, base), {
|
|
@@ -7020,6 +7030,64 @@ var serializeItemAsComputerCallRunStep = function(param) {
|
|
|
7020
7030
|
}
|
|
7021
7031
|
});
|
|
7022
7032
|
};
|
|
7033
|
+
// src/lib/items/serializeItemAsReasoningRunStep.ts
|
|
7034
|
+
import dayjs20 from "dayjs";
|
|
7035
|
+
var serializeStatus7 = function(param) {
|
|
7036
|
+
var item = param.item, completedAt = param.completedAt;
|
|
7037
|
+
if (!item.status) {
|
|
7038
|
+
if (completedAt) {
|
|
7039
|
+
return "completed";
|
|
7040
|
+
} else {
|
|
7041
|
+
return "in_progress";
|
|
7042
|
+
}
|
|
7043
|
+
}
|
|
7044
|
+
if (item.status === "incomplete") {
|
|
7045
|
+
return "in_progress";
|
|
7046
|
+
}
|
|
7047
|
+
return item.status;
|
|
7048
|
+
};
|
|
7049
|
+
var serializeItemAsReasoningRunStep = function(param) {
|
|
7050
|
+
var item = param.item, openaiAssistant = param.openaiAssistant, threadId = param.threadId, runId = param.runId, _param_completedAt = param.completedAt, completedAt = _param_completedAt === void 0 ? dayjs20().unix() : _param_completedAt;
|
|
7051
|
+
var toolCall = {
|
|
7052
|
+
id: "ftc".concat(item.id),
|
|
7053
|
+
type: "function",
|
|
7054
|
+
function: {
|
|
7055
|
+
name: "reasoning",
|
|
7056
|
+
arguments: "{}",
|
|
7057
|
+
output: JSON.stringify({
|
|
7058
|
+
summary: item.summary,
|
|
7059
|
+
content: item.content,
|
|
7060
|
+
encrypted_content: item.encrypted_content
|
|
7061
|
+
})
|
|
7062
|
+
}
|
|
7063
|
+
};
|
|
7064
|
+
return {
|
|
7065
|
+
id: "fc".concat(item.id),
|
|
7066
|
+
object: "thread.run.step",
|
|
7067
|
+
created_at: dayjs20().unix(),
|
|
7068
|
+
assistant_id: openaiAssistant.id,
|
|
7069
|
+
thread_id: threadId,
|
|
7070
|
+
run_id: runId,
|
|
7071
|
+
status: serializeStatus7({
|
|
7072
|
+
item: item,
|
|
7073
|
+
completedAt: completedAt
|
|
7074
|
+
}),
|
|
7075
|
+
last_error: null,
|
|
7076
|
+
expired_at: null,
|
|
7077
|
+
cancelled_at: null,
|
|
7078
|
+
failed_at: null,
|
|
7079
|
+
completed_at: completedAt,
|
|
7080
|
+
metadata: {},
|
|
7081
|
+
usage: null,
|
|
7082
|
+
type: "tool_calls",
|
|
7083
|
+
step_details: {
|
|
7084
|
+
type: "tool_calls",
|
|
7085
|
+
tool_calls: [
|
|
7086
|
+
toolCall
|
|
7087
|
+
]
|
|
7088
|
+
}
|
|
7089
|
+
};
|
|
7090
|
+
};
|
|
7023
7091
|
// src/adapters/storage/responsesStorageAdapter/threads/runs/steps/get.ts
|
|
7024
7092
|
var get17 = function(param) {
|
|
7025
7093
|
var client = param.client, runAdapter = param.runAdapter;
|
|
@@ -7103,6 +7171,16 @@ var get17 = function(param) {
|
|
|
7103
7171
|
}),
|
|
7104
7172
|
step
|
|
7105
7173
|
];
|
|
7174
|
+
} else if (item.type === "reasoning") {
|
|
7175
|
+
return [
|
|
7176
|
+
serializeItemAsReasoningRunStep({
|
|
7177
|
+
item: item,
|
|
7178
|
+
openaiAssistant: openaiAssistant,
|
|
7179
|
+
threadId: threadId,
|
|
7180
|
+
runId: response.id
|
|
7181
|
+
}),
|
|
7182
|
+
step
|
|
7183
|
+
];
|
|
7106
7184
|
} else if (item.type === "image_generation_call") {
|
|
7107
7185
|
return [
|
|
7108
7186
|
serializeItemAsImageGenerationRunStep({
|
|
@@ -7519,7 +7597,7 @@ var responsesStorageAdapter = function() {
|
|
|
7519
7597
|
};
|
|
7520
7598
|
};
|
|
7521
7599
|
// src/adapters/run/responsesRunAdapter/index.ts
|
|
7522
|
-
import
|
|
7600
|
+
import dayjs21 from "dayjs";
|
|
7523
7601
|
import { uid as uid8 } from "radash";
|
|
7524
7602
|
var serializeToolCalls2 = function(param) {
|
|
7525
7603
|
var toolCalls = param.toolCalls;
|
|
@@ -7605,7 +7683,7 @@ var responsesRunAdapter = function(param) {
|
|
|
7605
7683
|
}();
|
|
7606
7684
|
var handleRun = /*#__PURE__*/ function() {
|
|
7607
7685
|
var _ref = _async_to_generator(function(param) {
|
|
7608
|
-
var client, threadId, response, onEvent2, responseCreatedResponse, toolCalls, mcpCalls, codeInterpreterCalls, itemIds, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, event, _, _tmp, _tmp1, _tmp2, _tmp3, toolCalls2, _tmp4, _tmp5, _tmp6, _tmp7, _tmp8, _tmp9, _tmp10, _tmp11, _tmp12, _tmp13, _tmp14, _tmp15, _tmp16, _tmp17, _tmp18, _tmp19, _tmp20, _tmp21, _tmp22, _tmp23, _tmp24, _tmp25, _tmp26, _tmp27, _tmp28, _tmp29, _tmp30, _tmp31, _tmp32, _tmp33, _tmp34, _tmp35, _tmp36, _tmp37, _tmp38, _tmp39, _tmp40, _tmp41, _tmp42, _tmp43, _tmp44, _tmp45, _tmp46, _tmp47, _tmp48, _tmp49, _tmp50, _tmp51, _tmp52, _tmp53, _tmp54, _tmp55, _tmp56, _tmp57, _tmp58, _tmp59, _tmp60, _tmp61, _tmp62, _tmp63, _tmp64, _tmp65, _tmp66, _tmp67, _tmp68, _tmp69, _tmp70, _tmp71, _tmp72, _tmp73, _tmp74, _tmp75, _tmp76, _tmp77, _tmp78, _tmp79, _tmp80, _tmp81, _tmp82, _tmp83, _tmp84, _tmp85, _tmp86, _tmp87, _tmp88, toolCall, mcpCall,
|
|
7686
|
+
var client, threadId, response, onEvent2, responseCreatedResponse, toolCalls, mcpCalls, codeInterpreterCalls, itemIds, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, event, _, _tmp, _tmp1, _tmp2, _tmp3, toolCalls2, _tmp4, _tmp5, _tmp6, _tmp7, _tmp8, _tmp9, _tmp10, _tmp11, _tmp12, _tmp13, _tmp14, _tmp15, _tmp16, _tmp17, _tmp18, _tmp19, _tmp20, _tmp21, _tmp22, _tmp23, _tmp24, _tmp25, _tmp26, _tmp27, _tmp28, _tmp29, _tmp30, _tmp31, _tmp32, _tmp33, _tmp34, _tmp35, _tmp36, _tmp37, _tmp38, _tmp39, _tmp40, _tmp41, _tmp42, _tmp43, _tmp44, _tmp45, _tmp46, _tmp47, _tmp48, _tmp49, _tmp50, _tmp51, _tmp52, _tmp53, _tmp54, _tmp55, _tmp56, _tmp57, _tmp58, _tmp59, _tmp60, _tmp61, _tmp62, _tmp63, _tmp64, _tmp65, _tmp66, _tmp67, _tmp68, _tmp69, _tmp70, _tmp71, _tmp72, _tmp73, _tmp74, _tmp75, _tmp76, _tmp77, _tmp78, _tmp79, _tmp80, _tmp81, _tmp82, _tmp83, _tmp84, _tmp85, _tmp86, _tmp87, _tmp88, _tmp89, _tmp90, _tmp91, _tmp92, _tmp93, _tmp94, _tmp95, _tmp96, _tmp97, _tmp98, _tmp99, _tmp100, toolCall, mcpCall, _tmp101, _tmp102, _tmp103, _tmp104, err, e, _tmp105, _tmp106;
|
|
7609
7687
|
return _ts_generator(this, function(_state) {
|
|
7610
7688
|
switch(_state.label){
|
|
7611
7689
|
case 0:
|
|
@@ -7619,18 +7697,18 @@ var responsesRunAdapter = function(param) {
|
|
|
7619
7697
|
case 1:
|
|
7620
7698
|
_state.trys.push([
|
|
7621
7699
|
1,
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7700
|
+
152,
|
|
7701
|
+
155,
|
|
7702
|
+
156
|
|
7625
7703
|
]);
|
|
7626
7704
|
_iteratorAbruptCompletion = false, _didIteratorError = false;
|
|
7627
7705
|
_state.label = 2;
|
|
7628
7706
|
case 2:
|
|
7629
7707
|
_state.trys.push([
|
|
7630
7708
|
2,
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7709
|
+
145,
|
|
7710
|
+
146,
|
|
7711
|
+
151
|
|
7634
7712
|
]);
|
|
7635
7713
|
_iterator = _async_iterator(response);
|
|
7636
7714
|
_state.label = 3;
|
|
@@ -7642,7 +7720,7 @@ var responsesRunAdapter = function(param) {
|
|
|
7642
7720
|
case 4:
|
|
7643
7721
|
if (!(_iteratorAbruptCompletion = !(_step = _state.sent()).done)) return [
|
|
7644
7722
|
3,
|
|
7645
|
-
|
|
7723
|
+
144
|
|
7646
7724
|
];
|
|
7647
7725
|
_value = _step.value;
|
|
7648
7726
|
event = _value;
|
|
@@ -7681,37 +7759,37 @@ var responsesRunAdapter = function(param) {
|
|
|
7681
7759
|
case "response.output_item.done":
|
|
7682
7760
|
return [
|
|
7683
7761
|
3,
|
|
7684
|
-
|
|
7762
|
+
81
|
|
7685
7763
|
];
|
|
7686
7764
|
case "response.function_call_arguments.delta":
|
|
7687
7765
|
return [
|
|
7688
7766
|
3,
|
|
7689
|
-
|
|
7767
|
+
132
|
|
7690
7768
|
];
|
|
7691
7769
|
case "response.mcp_call_arguments.delta":
|
|
7692
7770
|
return [
|
|
7693
7771
|
3,
|
|
7694
|
-
|
|
7772
|
+
134
|
|
7695
7773
|
];
|
|
7696
7774
|
case "response.image_generation_call.in_progress":
|
|
7697
7775
|
return [
|
|
7698
7776
|
3,
|
|
7699
|
-
|
|
7777
|
+
136
|
|
7700
7778
|
];
|
|
7701
7779
|
case "response.image_generation_call.generating":
|
|
7702
7780
|
return [
|
|
7703
7781
|
3,
|
|
7704
|
-
|
|
7782
|
+
136
|
|
7705
7783
|
];
|
|
7706
7784
|
case "response.image_generation_call.partial_image":
|
|
7707
7785
|
return [
|
|
7708
7786
|
3,
|
|
7709
|
-
|
|
7787
|
+
139
|
|
7710
7788
|
];
|
|
7711
7789
|
}
|
|
7712
7790
|
return [
|
|
7713
7791
|
3,
|
|
7714
|
-
|
|
7792
|
+
142
|
|
7715
7793
|
];
|
|
7716
7794
|
case 5:
|
|
7717
7795
|
responseCreatedResponse = event.response;
|
|
@@ -7742,7 +7820,7 @@ var responsesRunAdapter = function(param) {
|
|
|
7742
7820
|
_state.sent();
|
|
7743
7821
|
return [
|
|
7744
7822
|
3,
|
|
7745
|
-
|
|
7823
|
+
143
|
|
7746
7824
|
];
|
|
7747
7825
|
case 8:
|
|
7748
7826
|
_tmp2 = {
|
|
@@ -7772,7 +7850,7 @@ var responsesRunAdapter = function(param) {
|
|
|
7772
7850
|
_state.sent();
|
|
7773
7851
|
return [
|
|
7774
7852
|
3,
|
|
7775
|
-
|
|
7853
|
+
143
|
|
7776
7854
|
];
|
|
7777
7855
|
case 11:
|
|
7778
7856
|
itemIds = event.response.output.filter(function(o) {
|
|
@@ -7862,7 +7940,7 @@ var responsesRunAdapter = function(param) {
|
|
|
7862
7940
|
case 17:
|
|
7863
7941
|
return [
|
|
7864
7942
|
3,
|
|
7865
|
-
|
|
7943
|
+
143
|
|
7866
7944
|
];
|
|
7867
7945
|
case 18:
|
|
7868
7946
|
_tmp9 = {
|
|
@@ -7892,7 +7970,7 @@ var responsesRunAdapter = function(param) {
|
|
|
7892
7970
|
_state.sent();
|
|
7893
7971
|
return [
|
|
7894
7972
|
3,
|
|
7895
|
-
|
|
7973
|
+
143
|
|
7896
7974
|
];
|
|
7897
7975
|
case 21:
|
|
7898
7976
|
return [
|
|
@@ -7919,7 +7997,7 @@ var responsesRunAdapter = function(param) {
|
|
|
7919
7997
|
_state.sent();
|
|
7920
7998
|
return [
|
|
7921
7999
|
3,
|
|
7922
|
-
|
|
8000
|
+
143
|
|
7923
8001
|
];
|
|
7924
8002
|
case 23:
|
|
7925
8003
|
if (!(event.item.type === "message")) return [
|
|
@@ -7946,7 +8024,7 @@ var responsesRunAdapter = function(param) {
|
|
|
7946
8024
|
4,
|
|
7947
8025
|
onEvent2.apply(void 0, [
|
|
7948
8026
|
(_tmp11.data = serializeItemAsMessage.apply(void 0, [
|
|
7949
|
-
(_tmp12.openaiAssistant = _state.sent(), _tmp12.createdAt =
|
|
8027
|
+
(_tmp12.openaiAssistant = _state.sent(), _tmp12.createdAt = dayjs21().unix(), _tmp12.runId = responseCreatedResponse.id, _tmp12.status = "in_progress", _tmp12)
|
|
7950
8028
|
]), _tmp11)
|
|
7951
8029
|
])
|
|
7952
8030
|
];
|
|
@@ -7980,7 +8058,7 @@ var responsesRunAdapter = function(param) {
|
|
|
7980
8058
|
_state.sent();
|
|
7981
8059
|
return [
|
|
7982
8060
|
3,
|
|
7983
|
-
|
|
8061
|
+
80
|
|
7984
8062
|
];
|
|
7985
8063
|
case 28:
|
|
7986
8064
|
if (!(event.item.type === "function_call")) return [
|
|
@@ -8016,7 +8094,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8016
8094
|
_state.sent();
|
|
8017
8095
|
return [
|
|
8018
8096
|
3,
|
|
8019
|
-
|
|
8097
|
+
80
|
|
8020
8098
|
];
|
|
8021
8099
|
case 31:
|
|
8022
8100
|
if (!(event.item.type === "computer_call")) return [
|
|
@@ -8043,7 +8121,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8043
8121
|
4,
|
|
8044
8122
|
onEvent2.apply(void 0, [
|
|
8045
8123
|
(_tmp17.data = serializeItemAsMessage.apply(void 0, [
|
|
8046
|
-
(_tmp18.openaiAssistant = _state.sent(), _tmp18.createdAt =
|
|
8124
|
+
(_tmp18.openaiAssistant = _state.sent(), _tmp18.createdAt = dayjs21().unix(), _tmp18.runId = responseCreatedResponse.id, _tmp18.status = "in_progress", _tmp18)
|
|
8047
8125
|
]), _tmp17)
|
|
8048
8126
|
])
|
|
8049
8127
|
];
|
|
@@ -8103,7 +8181,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8103
8181
|
_state.sent();
|
|
8104
8182
|
return [
|
|
8105
8183
|
3,
|
|
8106
|
-
|
|
8184
|
+
80
|
|
8107
8185
|
];
|
|
8108
8186
|
case 38:
|
|
8109
8187
|
if (!(event.item.type === "image_generation_call")) return [
|
|
@@ -8130,7 +8208,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8130
8208
|
4,
|
|
8131
8209
|
onEvent2.apply(void 0, [
|
|
8132
8210
|
(_tmp23.data = serializeItemAsMessage.apply(void 0, [
|
|
8133
|
-
(_tmp24.openaiAssistant = _state.sent(), _tmp24.createdAt =
|
|
8211
|
+
(_tmp24.openaiAssistant = _state.sent(), _tmp24.createdAt = dayjs21().unix(), _tmp24.runId = responseCreatedResponse.id, _tmp24.status = "in_progress", _tmp24)
|
|
8134
8212
|
]), _tmp23)
|
|
8135
8213
|
])
|
|
8136
8214
|
];
|
|
@@ -8189,10 +8267,10 @@ var responsesRunAdapter = function(param) {
|
|
|
8189
8267
|
_state.sent();
|
|
8190
8268
|
return [
|
|
8191
8269
|
3,
|
|
8192
|
-
|
|
8270
|
+
80
|
|
8193
8271
|
];
|
|
8194
8272
|
case 45:
|
|
8195
|
-
if (!(event.item.type === "
|
|
8273
|
+
if (!(event.item.type === "reasoning")) return [
|
|
8196
8274
|
3,
|
|
8197
8275
|
52
|
|
8198
8276
|
];
|
|
@@ -8216,7 +8294,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8216
8294
|
4,
|
|
8217
8295
|
onEvent2.apply(void 0, [
|
|
8218
8296
|
(_tmp29.data = serializeItemAsMessage.apply(void 0, [
|
|
8219
|
-
(_tmp30.openaiAssistant = _state.sent(), _tmp30.createdAt =
|
|
8297
|
+
(_tmp30.openaiAssistant = _state.sent(), _tmp30.createdAt = dayjs21().unix(), _tmp30.runId = responseCreatedResponse.id, _tmp30.status = "in_progress", _tmp30)
|
|
8220
8298
|
]), _tmp29)
|
|
8221
8299
|
])
|
|
8222
8300
|
];
|
|
@@ -8266,7 +8344,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8266
8344
|
return [
|
|
8267
8345
|
4,
|
|
8268
8346
|
onEvent2.apply(void 0, [
|
|
8269
|
-
(_tmp33.data =
|
|
8347
|
+
(_tmp33.data = serializeItemAsReasoningRunStep.apply(void 0, [
|
|
8270
8348
|
(_tmp34.openaiAssistant = _state.sent(), _tmp34.threadId = threadId, _tmp34.runId = responseCreatedResponse.id, _tmp34.completedAt = null, _tmp34)
|
|
8271
8349
|
]), _tmp33)
|
|
8272
8350
|
])
|
|
@@ -8275,10 +8353,10 @@ var responsesRunAdapter = function(param) {
|
|
|
8275
8353
|
_state.sent();
|
|
8276
8354
|
return [
|
|
8277
8355
|
3,
|
|
8278
|
-
|
|
8356
|
+
80
|
|
8279
8357
|
];
|
|
8280
8358
|
case 52:
|
|
8281
|
-
if (!(event.item.type === "
|
|
8359
|
+
if (!(event.item.type === "web_search_call")) return [
|
|
8282
8360
|
3,
|
|
8283
8361
|
59
|
|
8284
8362
|
];
|
|
@@ -8302,7 +8380,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8302
8380
|
4,
|
|
8303
8381
|
onEvent2.apply(void 0, [
|
|
8304
8382
|
(_tmp35.data = serializeItemAsMessage.apply(void 0, [
|
|
8305
|
-
(_tmp36.openaiAssistant = _state.sent(), _tmp36.createdAt =
|
|
8383
|
+
(_tmp36.openaiAssistant = _state.sent(), _tmp36.createdAt = dayjs21().unix(), _tmp36.runId = responseCreatedResponse.id, _tmp36.status = "in_progress", _tmp36)
|
|
8306
8384
|
]), _tmp35)
|
|
8307
8385
|
])
|
|
8308
8386
|
];
|
|
@@ -8352,7 +8430,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8352
8430
|
return [
|
|
8353
8431
|
4,
|
|
8354
8432
|
onEvent2.apply(void 0, [
|
|
8355
|
-
(_tmp39.data =
|
|
8433
|
+
(_tmp39.data = serializeItemAsWebSearchRunStep.apply(void 0, [
|
|
8356
8434
|
(_tmp40.openaiAssistant = _state.sent(), _tmp40.threadId = threadId, _tmp40.runId = responseCreatedResponse.id, _tmp40.completedAt = null, _tmp40)
|
|
8357
8435
|
]), _tmp39)
|
|
8358
8436
|
])
|
|
@@ -8361,14 +8439,13 @@ var responsesRunAdapter = function(param) {
|
|
|
8361
8439
|
_state.sent();
|
|
8362
8440
|
return [
|
|
8363
8441
|
3,
|
|
8364
|
-
|
|
8442
|
+
80
|
|
8365
8443
|
];
|
|
8366
8444
|
case 59:
|
|
8367
|
-
if (!(event.item.type === "
|
|
8445
|
+
if (!(event.item.type === "mcp_list_tools")) return [
|
|
8368
8446
|
3,
|
|
8369
8447
|
66
|
|
8370
8448
|
];
|
|
8371
|
-
mcpCalls[event.item.id] = event.item;
|
|
8372
8449
|
_tmp41 = {
|
|
8373
8450
|
event: "thread.message.created"
|
|
8374
8451
|
};
|
|
@@ -8389,7 +8466,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8389
8466
|
4,
|
|
8390
8467
|
onEvent2.apply(void 0, [
|
|
8391
8468
|
(_tmp41.data = serializeItemAsMessage.apply(void 0, [
|
|
8392
|
-
(_tmp42.openaiAssistant = _state.sent(), _tmp42.createdAt =
|
|
8469
|
+
(_tmp42.openaiAssistant = _state.sent(), _tmp42.createdAt = dayjs21().unix(), _tmp42.runId = responseCreatedResponse.id, _tmp42.status = "in_progress", _tmp42)
|
|
8393
8470
|
]), _tmp41)
|
|
8394
8471
|
])
|
|
8395
8472
|
];
|
|
@@ -8439,7 +8516,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8439
8516
|
return [
|
|
8440
8517
|
4,
|
|
8441
8518
|
onEvent2.apply(void 0, [
|
|
8442
|
-
(_tmp45.data =
|
|
8519
|
+
(_tmp45.data = serializeItemAsMcpListToolsRunStep.apply(void 0, [
|
|
8443
8520
|
(_tmp46.openaiAssistant = _state.sent(), _tmp46.threadId = threadId, _tmp46.runId = responseCreatedResponse.id, _tmp46.completedAt = null, _tmp46)
|
|
8444
8521
|
]), _tmp45)
|
|
8445
8522
|
])
|
|
@@ -8448,14 +8525,14 @@ var responsesRunAdapter = function(param) {
|
|
|
8448
8525
|
_state.sent();
|
|
8449
8526
|
return [
|
|
8450
8527
|
3,
|
|
8451
|
-
|
|
8528
|
+
80
|
|
8452
8529
|
];
|
|
8453
8530
|
case 66:
|
|
8454
|
-
if (!(event.item.type === "
|
|
8531
|
+
if (!(event.item.type === "mcp_call")) return [
|
|
8455
8532
|
3,
|
|
8456
8533
|
73
|
|
8457
8534
|
];
|
|
8458
|
-
|
|
8535
|
+
mcpCalls[event.item.id] = event.item;
|
|
8459
8536
|
_tmp47 = {
|
|
8460
8537
|
event: "thread.message.created"
|
|
8461
8538
|
};
|
|
@@ -8476,7 +8553,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8476
8553
|
4,
|
|
8477
8554
|
onEvent2.apply(void 0, [
|
|
8478
8555
|
(_tmp47.data = serializeItemAsMessage.apply(void 0, [
|
|
8479
|
-
(_tmp48.openaiAssistant = _state.sent(), _tmp48.createdAt =
|
|
8556
|
+
(_tmp48.openaiAssistant = _state.sent(), _tmp48.createdAt = dayjs21().unix(), _tmp48.runId = responseCreatedResponse.id, _tmp48.status = "in_progress", _tmp48)
|
|
8480
8557
|
]), _tmp47)
|
|
8481
8558
|
])
|
|
8482
8559
|
];
|
|
@@ -8526,27 +8603,25 @@ var responsesRunAdapter = function(param) {
|
|
|
8526
8603
|
return [
|
|
8527
8604
|
4,
|
|
8528
8605
|
onEvent2.apply(void 0, [
|
|
8529
|
-
(_tmp51.data =
|
|
8606
|
+
(_tmp51.data = serializeItemAsMcpCallRunStep.apply(void 0, [
|
|
8530
8607
|
(_tmp52.openaiAssistant = _state.sent(), _tmp52.threadId = threadId, _tmp52.runId = responseCreatedResponse.id, _tmp52.completedAt = null, _tmp52)
|
|
8531
8608
|
]), _tmp51)
|
|
8532
8609
|
])
|
|
8533
8610
|
];
|
|
8534
8611
|
case 72:
|
|
8535
8612
|
_state.sent();
|
|
8536
|
-
_state.label = 73;
|
|
8537
|
-
case 73:
|
|
8538
|
-
if (event.item.id) itemIds.push(event.item.id);
|
|
8539
8613
|
return [
|
|
8540
8614
|
3,
|
|
8541
|
-
|
|
8615
|
+
80
|
|
8542
8616
|
];
|
|
8543
|
-
case
|
|
8544
|
-
if (!(event.item.type === "
|
|
8617
|
+
case 73:
|
|
8618
|
+
if (!(event.item.type === "code_interpreter_call")) return [
|
|
8545
8619
|
3,
|
|
8546
|
-
|
|
8620
|
+
80
|
|
8547
8621
|
];
|
|
8622
|
+
codeInterpreterCalls[event.item.id] = event.item;
|
|
8548
8623
|
_tmp53 = {
|
|
8549
|
-
event: "thread.
|
|
8624
|
+
event: "thread.message.created"
|
|
8550
8625
|
};
|
|
8551
8626
|
_tmp54 = {
|
|
8552
8627
|
item: event.item,
|
|
@@ -8560,19 +8635,19 @@ var responsesRunAdapter = function(param) {
|
|
|
8560
8635
|
}
|
|
8561
8636
|
})
|
|
8562
8637
|
];
|
|
8563
|
-
case
|
|
8638
|
+
case 74:
|
|
8564
8639
|
return [
|
|
8565
8640
|
4,
|
|
8566
8641
|
onEvent2.apply(void 0, [
|
|
8567
|
-
(_tmp53.data =
|
|
8568
|
-
(_tmp54.openaiAssistant = _state.sent(), _tmp54.runId = responseCreatedResponse.id, _tmp54)
|
|
8642
|
+
(_tmp53.data = serializeItemAsMessage.apply(void 0, [
|
|
8643
|
+
(_tmp54.openaiAssistant = _state.sent(), _tmp54.createdAt = dayjs21().unix(), _tmp54.runId = responseCreatedResponse.id, _tmp54.status = "in_progress", _tmp54)
|
|
8569
8644
|
]), _tmp53)
|
|
8570
8645
|
])
|
|
8571
8646
|
];
|
|
8572
|
-
case
|
|
8647
|
+
case 75:
|
|
8573
8648
|
_state.sent();
|
|
8574
8649
|
_tmp55 = {
|
|
8575
|
-
event: "thread.
|
|
8650
|
+
event: "thread.run.step.created"
|
|
8576
8651
|
};
|
|
8577
8652
|
_tmp56 = {
|
|
8578
8653
|
item: event.item,
|
|
@@ -8586,33 +8661,22 @@ var responsesRunAdapter = function(param) {
|
|
|
8586
8661
|
}
|
|
8587
8662
|
})
|
|
8588
8663
|
];
|
|
8589
|
-
case
|
|
8664
|
+
case 76:
|
|
8590
8665
|
return [
|
|
8591
8666
|
4,
|
|
8592
8667
|
onEvent2.apply(void 0, [
|
|
8593
|
-
(_tmp55.data =
|
|
8594
|
-
(_tmp56.openaiAssistant = _state.sent(), _tmp56.
|
|
8668
|
+
(_tmp55.data = serializeItemAsMessageCreationRunStep.apply(void 0, [
|
|
8669
|
+
(_tmp56.openaiAssistant = _state.sent(), _tmp56.runId = responseCreatedResponse.id, _tmp56.status = "in_progress", _tmp56.completedAt = null, _tmp56)
|
|
8595
8670
|
]), _tmp55)
|
|
8596
8671
|
])
|
|
8597
8672
|
];
|
|
8598
|
-
case
|
|
8673
|
+
case 77:
|
|
8599
8674
|
_state.sent();
|
|
8600
|
-
return [
|
|
8601
|
-
3,
|
|
8602
|
-
117
|
|
8603
|
-
];
|
|
8604
|
-
case 79:
|
|
8605
|
-
if (!(event.item.type === "function_call")) return [
|
|
8606
|
-
3,
|
|
8607
|
-
82
|
|
8608
|
-
];
|
|
8609
|
-
toolCalls[event.item.id] = event.item;
|
|
8610
8675
|
_tmp57 = {
|
|
8611
|
-
event: "thread.run.step.
|
|
8676
|
+
event: "thread.run.step.created"
|
|
8612
8677
|
};
|
|
8613
8678
|
_tmp58 = {
|
|
8614
|
-
item: event.item
|
|
8615
|
-
threadId: threadId
|
|
8679
|
+
item: event.item
|
|
8616
8680
|
};
|
|
8617
8681
|
return [
|
|
8618
8682
|
4,
|
|
@@ -8622,31 +8686,35 @@ var responsesRunAdapter = function(param) {
|
|
|
8622
8686
|
}
|
|
8623
8687
|
})
|
|
8624
8688
|
];
|
|
8625
|
-
case
|
|
8689
|
+
case 78:
|
|
8626
8690
|
return [
|
|
8627
8691
|
4,
|
|
8628
8692
|
onEvent2.apply(void 0, [
|
|
8629
|
-
(_tmp57.data =
|
|
8630
|
-
(_tmp58.openaiAssistant = _state.sent(), _tmp58.runId = responseCreatedResponse.id, _tmp58)
|
|
8693
|
+
(_tmp57.data = serializeItemAsCodeInterpreterCallRunStep.apply(void 0, [
|
|
8694
|
+
(_tmp58.openaiAssistant = _state.sent(), _tmp58.threadId = threadId, _tmp58.runId = responseCreatedResponse.id, _tmp58.completedAt = null, _tmp58)
|
|
8631
8695
|
]), _tmp57)
|
|
8632
8696
|
])
|
|
8633
8697
|
];
|
|
8634
|
-
case
|
|
8698
|
+
case 79:
|
|
8635
8699
|
_state.sent();
|
|
8700
|
+
_state.label = 80;
|
|
8701
|
+
case 80:
|
|
8702
|
+
if (event.item.id) itemIds.push(event.item.id);
|
|
8636
8703
|
return [
|
|
8637
8704
|
3,
|
|
8638
|
-
|
|
8705
|
+
143
|
|
8639
8706
|
];
|
|
8640
|
-
case
|
|
8641
|
-
if (!(event.item.type === "
|
|
8707
|
+
case 81:
|
|
8708
|
+
if (!(event.item.type === "message")) return [
|
|
8642
8709
|
3,
|
|
8643
|
-
|
|
8710
|
+
86
|
|
8644
8711
|
];
|
|
8645
8712
|
_tmp59 = {
|
|
8646
8713
|
event: "thread.run.step.completed"
|
|
8647
8714
|
};
|
|
8648
8715
|
_tmp60 = {
|
|
8649
|
-
item: event.item
|
|
8716
|
+
item: event.item,
|
|
8717
|
+
threadId: threadId
|
|
8650
8718
|
};
|
|
8651
8719
|
return [
|
|
8652
8720
|
4,
|
|
@@ -8656,19 +8724,19 @@ var responsesRunAdapter = function(param) {
|
|
|
8656
8724
|
}
|
|
8657
8725
|
})
|
|
8658
8726
|
];
|
|
8659
|
-
case
|
|
8727
|
+
case 82:
|
|
8660
8728
|
return [
|
|
8661
8729
|
4,
|
|
8662
8730
|
onEvent2.apply(void 0, [
|
|
8663
|
-
(_tmp59.data =
|
|
8664
|
-
(_tmp60.openaiAssistant = _state.sent(), _tmp60.
|
|
8731
|
+
(_tmp59.data = serializeItemAsMessageCreationRunStep.apply(void 0, [
|
|
8732
|
+
(_tmp60.openaiAssistant = _state.sent(), _tmp60.runId = responseCreatedResponse.id, _tmp60)
|
|
8665
8733
|
]), _tmp59)
|
|
8666
8734
|
])
|
|
8667
8735
|
];
|
|
8668
|
-
case
|
|
8736
|
+
case 83:
|
|
8669
8737
|
_state.sent();
|
|
8670
8738
|
_tmp61 = {
|
|
8671
|
-
event: "thread.
|
|
8739
|
+
event: "thread.message.completed"
|
|
8672
8740
|
};
|
|
8673
8741
|
_tmp62 = {
|
|
8674
8742
|
item: event.item,
|
|
@@ -8682,19 +8750,29 @@ var responsesRunAdapter = function(param) {
|
|
|
8682
8750
|
}
|
|
8683
8751
|
})
|
|
8684
8752
|
];
|
|
8685
|
-
case
|
|
8753
|
+
case 84:
|
|
8686
8754
|
return [
|
|
8687
8755
|
4,
|
|
8688
8756
|
onEvent2.apply(void 0, [
|
|
8689
|
-
(_tmp61.data =
|
|
8690
|
-
(_tmp62.openaiAssistant = _state.sent(), _tmp62.runId = responseCreatedResponse.id, _tmp62)
|
|
8757
|
+
(_tmp61.data = serializeItemAsMessage.apply(void 0, [
|
|
8758
|
+
(_tmp62.openaiAssistant = _state.sent(), _tmp62.createdAt = dayjs21().unix(), _tmp62.runId = responseCreatedResponse.id, _tmp62)
|
|
8691
8759
|
]), _tmp61)
|
|
8692
8760
|
])
|
|
8693
8761
|
];
|
|
8694
|
-
case
|
|
8762
|
+
case 85:
|
|
8695
8763
|
_state.sent();
|
|
8764
|
+
return [
|
|
8765
|
+
3,
|
|
8766
|
+
131
|
|
8767
|
+
];
|
|
8768
|
+
case 86:
|
|
8769
|
+
if (!(event.item.type === "function_call")) return [
|
|
8770
|
+
3,
|
|
8771
|
+
89
|
|
8772
|
+
];
|
|
8773
|
+
toolCalls[event.item.id] = event.item;
|
|
8696
8774
|
_tmp63 = {
|
|
8697
|
-
event: "thread.
|
|
8775
|
+
event: "thread.run.step.in_progress"
|
|
8698
8776
|
};
|
|
8699
8777
|
_tmp64 = {
|
|
8700
8778
|
item: event.item,
|
|
@@ -8712,8 +8790,8 @@ var responsesRunAdapter = function(param) {
|
|
|
8712
8790
|
return [
|
|
8713
8791
|
4,
|
|
8714
8792
|
onEvent2.apply(void 0, [
|
|
8715
|
-
(_tmp63.data =
|
|
8716
|
-
(_tmp64.openaiAssistant = _state.sent(), _tmp64.
|
|
8793
|
+
(_tmp63.data = serializeItemAsMessageCreationRunStep.apply(void 0, [
|
|
8794
|
+
(_tmp64.openaiAssistant = _state.sent(), _tmp64.runId = responseCreatedResponse.id, _tmp64)
|
|
8717
8795
|
]), _tmp63)
|
|
8718
8796
|
])
|
|
8719
8797
|
];
|
|
@@ -8721,10 +8799,10 @@ var responsesRunAdapter = function(param) {
|
|
|
8721
8799
|
_state.sent();
|
|
8722
8800
|
return [
|
|
8723
8801
|
3,
|
|
8724
|
-
|
|
8802
|
+
131
|
|
8725
8803
|
];
|
|
8726
8804
|
case 89:
|
|
8727
|
-
if (!(event.item.type === "
|
|
8805
|
+
if (!(event.item.type === "image_generation_call")) return [
|
|
8728
8806
|
3,
|
|
8729
8807
|
96
|
|
8730
8808
|
];
|
|
@@ -8746,7 +8824,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8746
8824
|
return [
|
|
8747
8825
|
4,
|
|
8748
8826
|
onEvent2.apply(void 0, [
|
|
8749
|
-
(_tmp65.data =
|
|
8827
|
+
(_tmp65.data = serializeItemAsImageGenerationRunStep.apply(void 0, [
|
|
8750
8828
|
(_tmp66.openaiAssistant = _state.sent(), _tmp66.threadId = threadId, _tmp66.runId = responseCreatedResponse.id, _tmp66)
|
|
8751
8829
|
]), _tmp65)
|
|
8752
8830
|
])
|
|
@@ -8799,7 +8877,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8799
8877
|
4,
|
|
8800
8878
|
onEvent2.apply(void 0, [
|
|
8801
8879
|
(_tmp69.data = serializeItemAsMessage.apply(void 0, [
|
|
8802
|
-
(_tmp70.openaiAssistant = _state.sent(), _tmp70.createdAt =
|
|
8880
|
+
(_tmp70.openaiAssistant = _state.sent(), _tmp70.createdAt = dayjs21().unix(), _tmp70.runId = responseCreatedResponse.id, _tmp70)
|
|
8803
8881
|
]), _tmp69)
|
|
8804
8882
|
])
|
|
8805
8883
|
];
|
|
@@ -8807,10 +8885,10 @@ var responsesRunAdapter = function(param) {
|
|
|
8807
8885
|
_state.sent();
|
|
8808
8886
|
return [
|
|
8809
8887
|
3,
|
|
8810
|
-
|
|
8888
|
+
131
|
|
8811
8889
|
];
|
|
8812
8890
|
case 96:
|
|
8813
|
-
if (!(event.item.type === "
|
|
8891
|
+
if (!(event.item.type === "reasoning")) return [
|
|
8814
8892
|
3,
|
|
8815
8893
|
103
|
|
8816
8894
|
];
|
|
@@ -8832,7 +8910,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8832
8910
|
return [
|
|
8833
8911
|
4,
|
|
8834
8912
|
onEvent2.apply(void 0, [
|
|
8835
|
-
(_tmp71.data =
|
|
8913
|
+
(_tmp71.data = serializeItemAsReasoningRunStep.apply(void 0, [
|
|
8836
8914
|
(_tmp72.openaiAssistant = _state.sent(), _tmp72.threadId = threadId, _tmp72.runId = responseCreatedResponse.id, _tmp72)
|
|
8837
8915
|
]), _tmp71)
|
|
8838
8916
|
])
|
|
@@ -8885,7 +8963,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8885
8963
|
4,
|
|
8886
8964
|
onEvent2.apply(void 0, [
|
|
8887
8965
|
(_tmp75.data = serializeItemAsMessage.apply(void 0, [
|
|
8888
|
-
(_tmp76.openaiAssistant = _state.sent(), _tmp76.createdAt =
|
|
8966
|
+
(_tmp76.openaiAssistant = _state.sent(), _tmp76.createdAt = dayjs21().unix(), _tmp76.runId = responseCreatedResponse.id, _tmp76)
|
|
8889
8967
|
]), _tmp75)
|
|
8890
8968
|
])
|
|
8891
8969
|
];
|
|
@@ -8893,10 +8971,10 @@ var responsesRunAdapter = function(param) {
|
|
|
8893
8971
|
_state.sent();
|
|
8894
8972
|
return [
|
|
8895
8973
|
3,
|
|
8896
|
-
|
|
8974
|
+
131
|
|
8897
8975
|
];
|
|
8898
8976
|
case 103:
|
|
8899
|
-
if (!(event.item.type === "
|
|
8977
|
+
if (!(event.item.type === "web_search_call")) return [
|
|
8900
8978
|
3,
|
|
8901
8979
|
110
|
|
8902
8980
|
];
|
|
@@ -8918,7 +8996,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8918
8996
|
return [
|
|
8919
8997
|
4,
|
|
8920
8998
|
onEvent2.apply(void 0, [
|
|
8921
|
-
(_tmp77.data =
|
|
8999
|
+
(_tmp77.data = serializeItemAsWebSearchRunStep.apply(void 0, [
|
|
8922
9000
|
(_tmp78.openaiAssistant = _state.sent(), _tmp78.threadId = threadId, _tmp78.runId = responseCreatedResponse.id, _tmp78)
|
|
8923
9001
|
]), _tmp77)
|
|
8924
9002
|
])
|
|
@@ -8971,7 +9049,7 @@ var responsesRunAdapter = function(param) {
|
|
|
8971
9049
|
4,
|
|
8972
9050
|
onEvent2.apply(void 0, [
|
|
8973
9051
|
(_tmp81.data = serializeItemAsMessage.apply(void 0, [
|
|
8974
|
-
(_tmp82.openaiAssistant = _state.sent(), _tmp82.createdAt =
|
|
9052
|
+
(_tmp82.openaiAssistant = _state.sent(), _tmp82.createdAt = dayjs21().unix(), _tmp82.runId = responseCreatedResponse.id, _tmp82)
|
|
8975
9053
|
]), _tmp81)
|
|
8976
9054
|
])
|
|
8977
9055
|
];
|
|
@@ -8979,10 +9057,10 @@ var responsesRunAdapter = function(param) {
|
|
|
8979
9057
|
_state.sent();
|
|
8980
9058
|
return [
|
|
8981
9059
|
3,
|
|
8982
|
-
|
|
9060
|
+
131
|
|
8983
9061
|
];
|
|
8984
9062
|
case 110:
|
|
8985
|
-
if (!(event.item.type === "
|
|
9063
|
+
if (!(event.item.type === "mcp_list_tools")) return [
|
|
8986
9064
|
3,
|
|
8987
9065
|
117
|
|
8988
9066
|
];
|
|
@@ -9004,7 +9082,7 @@ var responsesRunAdapter = function(param) {
|
|
|
9004
9082
|
return [
|
|
9005
9083
|
4,
|
|
9006
9084
|
onEvent2.apply(void 0, [
|
|
9007
|
-
(_tmp83.data =
|
|
9085
|
+
(_tmp83.data = serializeItemAsMcpListToolsRunStep.apply(void 0, [
|
|
9008
9086
|
(_tmp84.openaiAssistant = _state.sent(), _tmp84.threadId = threadId, _tmp84.runId = responseCreatedResponse.id, _tmp84)
|
|
9009
9087
|
]), _tmp83)
|
|
9010
9088
|
])
|
|
@@ -9057,23 +9135,195 @@ var responsesRunAdapter = function(param) {
|
|
|
9057
9135
|
4,
|
|
9058
9136
|
onEvent2.apply(void 0, [
|
|
9059
9137
|
(_tmp87.data = serializeItemAsMessage.apply(void 0, [
|
|
9060
|
-
(_tmp88.openaiAssistant = _state.sent(), _tmp88.createdAt =
|
|
9138
|
+
(_tmp88.openaiAssistant = _state.sent(), _tmp88.createdAt = dayjs21().unix(), _tmp88.runId = responseCreatedResponse.id, _tmp88)
|
|
9061
9139
|
]), _tmp87)
|
|
9062
9140
|
])
|
|
9063
9141
|
];
|
|
9064
9142
|
case 116:
|
|
9065
9143
|
_state.sent();
|
|
9066
|
-
_state.label = 117;
|
|
9067
|
-
case 117:
|
|
9068
9144
|
return [
|
|
9069
9145
|
3,
|
|
9070
|
-
|
|
9146
|
+
131
|
|
9147
|
+
];
|
|
9148
|
+
case 117:
|
|
9149
|
+
if (!(event.item.type === "mcp_call")) return [
|
|
9150
|
+
3,
|
|
9151
|
+
124
|
|
9152
|
+
];
|
|
9153
|
+
_tmp89 = {
|
|
9154
|
+
event: "thread.run.step.completed"
|
|
9155
|
+
};
|
|
9156
|
+
_tmp90 = {
|
|
9157
|
+
item: event.item
|
|
9158
|
+
};
|
|
9159
|
+
return [
|
|
9160
|
+
4,
|
|
9161
|
+
getOpenaiAssistant({
|
|
9162
|
+
select: {
|
|
9163
|
+
id: true
|
|
9164
|
+
}
|
|
9165
|
+
})
|
|
9071
9166
|
];
|
|
9072
9167
|
case 118:
|
|
9168
|
+
return [
|
|
9169
|
+
4,
|
|
9170
|
+
onEvent2.apply(void 0, [
|
|
9171
|
+
(_tmp89.data = serializeItemAsMcpCallRunStep.apply(void 0, [
|
|
9172
|
+
(_tmp90.openaiAssistant = _state.sent(), _tmp90.threadId = threadId, _tmp90.runId = responseCreatedResponse.id, _tmp90)
|
|
9173
|
+
]), _tmp89)
|
|
9174
|
+
])
|
|
9175
|
+
];
|
|
9176
|
+
case 119:
|
|
9177
|
+
_state.sent();
|
|
9178
|
+
_tmp91 = {
|
|
9179
|
+
event: "thread.run.step.completed"
|
|
9180
|
+
};
|
|
9181
|
+
_tmp92 = {
|
|
9182
|
+
item: event.item,
|
|
9183
|
+
threadId: threadId
|
|
9184
|
+
};
|
|
9185
|
+
return [
|
|
9186
|
+
4,
|
|
9187
|
+
getOpenaiAssistant({
|
|
9188
|
+
select: {
|
|
9189
|
+
id: true
|
|
9190
|
+
}
|
|
9191
|
+
})
|
|
9192
|
+
];
|
|
9193
|
+
case 120:
|
|
9194
|
+
return [
|
|
9195
|
+
4,
|
|
9196
|
+
onEvent2.apply(void 0, [
|
|
9197
|
+
(_tmp91.data = serializeItemAsMessageCreationRunStep.apply(void 0, [
|
|
9198
|
+
(_tmp92.openaiAssistant = _state.sent(), _tmp92.runId = responseCreatedResponse.id, _tmp92)
|
|
9199
|
+
]), _tmp91)
|
|
9200
|
+
])
|
|
9201
|
+
];
|
|
9202
|
+
case 121:
|
|
9203
|
+
_state.sent();
|
|
9204
|
+
_tmp93 = {
|
|
9205
|
+
event: "thread.message.completed"
|
|
9206
|
+
};
|
|
9207
|
+
_tmp94 = {
|
|
9208
|
+
item: event.item,
|
|
9209
|
+
threadId: threadId
|
|
9210
|
+
};
|
|
9211
|
+
return [
|
|
9212
|
+
4,
|
|
9213
|
+
getOpenaiAssistant({
|
|
9214
|
+
select: {
|
|
9215
|
+
id: true
|
|
9216
|
+
}
|
|
9217
|
+
})
|
|
9218
|
+
];
|
|
9219
|
+
case 122:
|
|
9220
|
+
return [
|
|
9221
|
+
4,
|
|
9222
|
+
onEvent2.apply(void 0, [
|
|
9223
|
+
(_tmp93.data = serializeItemAsMessage.apply(void 0, [
|
|
9224
|
+
(_tmp94.openaiAssistant = _state.sent(), _tmp94.createdAt = dayjs21().unix(), _tmp94.runId = responseCreatedResponse.id, _tmp94)
|
|
9225
|
+
]), _tmp93)
|
|
9226
|
+
])
|
|
9227
|
+
];
|
|
9228
|
+
case 123:
|
|
9229
|
+
_state.sent();
|
|
9230
|
+
return [
|
|
9231
|
+
3,
|
|
9232
|
+
131
|
|
9233
|
+
];
|
|
9234
|
+
case 124:
|
|
9235
|
+
if (!(event.item.type === "code_interpreter_call")) return [
|
|
9236
|
+
3,
|
|
9237
|
+
131
|
|
9238
|
+
];
|
|
9239
|
+
_tmp95 = {
|
|
9240
|
+
event: "thread.run.step.completed"
|
|
9241
|
+
};
|
|
9242
|
+
_tmp96 = {
|
|
9243
|
+
item: event.item
|
|
9244
|
+
};
|
|
9245
|
+
return [
|
|
9246
|
+
4,
|
|
9247
|
+
getOpenaiAssistant({
|
|
9248
|
+
select: {
|
|
9249
|
+
id: true
|
|
9250
|
+
}
|
|
9251
|
+
})
|
|
9252
|
+
];
|
|
9253
|
+
case 125:
|
|
9254
|
+
return [
|
|
9255
|
+
4,
|
|
9256
|
+
onEvent2.apply(void 0, [
|
|
9257
|
+
(_tmp95.data = serializeItemAsCodeInterpreterCallRunStep.apply(void 0, [
|
|
9258
|
+
(_tmp96.openaiAssistant = _state.sent(), _tmp96.threadId = threadId, _tmp96.runId = responseCreatedResponse.id, _tmp96)
|
|
9259
|
+
]), _tmp95)
|
|
9260
|
+
])
|
|
9261
|
+
];
|
|
9262
|
+
case 126:
|
|
9263
|
+
_state.sent();
|
|
9264
|
+
_tmp97 = {
|
|
9265
|
+
event: "thread.run.step.completed"
|
|
9266
|
+
};
|
|
9267
|
+
_tmp98 = {
|
|
9268
|
+
item: event.item,
|
|
9269
|
+
threadId: threadId
|
|
9270
|
+
};
|
|
9271
|
+
return [
|
|
9272
|
+
4,
|
|
9273
|
+
getOpenaiAssistant({
|
|
9274
|
+
select: {
|
|
9275
|
+
id: true
|
|
9276
|
+
}
|
|
9277
|
+
})
|
|
9278
|
+
];
|
|
9279
|
+
case 127:
|
|
9280
|
+
return [
|
|
9281
|
+
4,
|
|
9282
|
+
onEvent2.apply(void 0, [
|
|
9283
|
+
(_tmp97.data = serializeItemAsMessageCreationRunStep.apply(void 0, [
|
|
9284
|
+
(_tmp98.openaiAssistant = _state.sent(), _tmp98.runId = responseCreatedResponse.id, _tmp98)
|
|
9285
|
+
]), _tmp97)
|
|
9286
|
+
])
|
|
9287
|
+
];
|
|
9288
|
+
case 128:
|
|
9289
|
+
_state.sent();
|
|
9290
|
+
_tmp99 = {
|
|
9291
|
+
event: "thread.message.completed"
|
|
9292
|
+
};
|
|
9293
|
+
_tmp100 = {
|
|
9294
|
+
item: event.item,
|
|
9295
|
+
threadId: threadId
|
|
9296
|
+
};
|
|
9297
|
+
return [
|
|
9298
|
+
4,
|
|
9299
|
+
getOpenaiAssistant({
|
|
9300
|
+
select: {
|
|
9301
|
+
id: true
|
|
9302
|
+
}
|
|
9303
|
+
})
|
|
9304
|
+
];
|
|
9305
|
+
case 129:
|
|
9306
|
+
return [
|
|
9307
|
+
4,
|
|
9308
|
+
onEvent2.apply(void 0, [
|
|
9309
|
+
(_tmp99.data = serializeItemAsMessage.apply(void 0, [
|
|
9310
|
+
(_tmp100.openaiAssistant = _state.sent(), _tmp100.createdAt = dayjs21().unix(), _tmp100.runId = responseCreatedResponse.id, _tmp100)
|
|
9311
|
+
]), _tmp99)
|
|
9312
|
+
])
|
|
9313
|
+
];
|
|
9314
|
+
case 130:
|
|
9315
|
+
_state.sent();
|
|
9316
|
+
_state.label = 131;
|
|
9317
|
+
case 131:
|
|
9318
|
+
return [
|
|
9319
|
+
3,
|
|
9320
|
+
143
|
|
9321
|
+
];
|
|
9322
|
+
case 132:
|
|
9073
9323
|
toolCall = toolCalls[event.item_id];
|
|
9074
9324
|
if (!toolCall) return [
|
|
9075
9325
|
3,
|
|
9076
|
-
|
|
9326
|
+
143
|
|
9077
9327
|
];
|
|
9078
9328
|
return [
|
|
9079
9329
|
4,
|
|
@@ -9102,17 +9352,17 @@ var responsesRunAdapter = function(param) {
|
|
|
9102
9352
|
}
|
|
9103
9353
|
})
|
|
9104
9354
|
];
|
|
9105
|
-
case
|
|
9355
|
+
case 133:
|
|
9106
9356
|
_state.sent();
|
|
9107
9357
|
return [
|
|
9108
9358
|
3,
|
|
9109
|
-
|
|
9359
|
+
143
|
|
9110
9360
|
];
|
|
9111
|
-
case
|
|
9361
|
+
case 134:
|
|
9112
9362
|
mcpCall = mcpCalls[event.item_id];
|
|
9113
9363
|
if (!mcpCall) return [
|
|
9114
9364
|
3,
|
|
9115
|
-
|
|
9365
|
+
143
|
|
9116
9366
|
];
|
|
9117
9367
|
return [
|
|
9118
9368
|
4,
|
|
@@ -9141,20 +9391,20 @@ var responsesRunAdapter = function(param) {
|
|
|
9141
9391
|
}
|
|
9142
9392
|
})
|
|
9143
9393
|
];
|
|
9144
|
-
case
|
|
9394
|
+
case 135:
|
|
9145
9395
|
_state.sent();
|
|
9146
9396
|
return [
|
|
9147
9397
|
3,
|
|
9148
|
-
|
|
9398
|
+
143
|
|
9149
9399
|
];
|
|
9150
|
-
case
|
|
9151
|
-
|
|
9400
|
+
case 136:
|
|
9401
|
+
_tmp101 = {
|
|
9152
9402
|
event: "thread.message.in_progress"
|
|
9153
9403
|
};
|
|
9154
|
-
|
|
9404
|
+
_tmp102 = {
|
|
9155
9405
|
id: event.item_id,
|
|
9156
9406
|
object: "thread.message",
|
|
9157
|
-
created_at:
|
|
9407
|
+
created_at: dayjs21().unix(),
|
|
9158
9408
|
thread_id: threadId,
|
|
9159
9409
|
completed_at: null,
|
|
9160
9410
|
incomplete_at: null,
|
|
@@ -9170,29 +9420,29 @@ var responsesRunAdapter = function(param) {
|
|
|
9170
9420
|
}
|
|
9171
9421
|
})
|
|
9172
9422
|
];
|
|
9173
|
-
case
|
|
9423
|
+
case 137:
|
|
9174
9424
|
return [
|
|
9175
9425
|
4,
|
|
9176
9426
|
onEvent2.apply(void 0, [
|
|
9177
|
-
(
|
|
9427
|
+
(_tmp101.data = (_tmp102.assistant_id = _state.sent().id, _tmp102.run_id = responseCreatedResponse.id, _tmp102.attachments = [], _tmp102.status = "in_progress", _tmp102.metadata = {
|
|
9178
9428
|
event: JSON.stringify(event)
|
|
9179
|
-
},
|
|
9429
|
+
}, _tmp102), _tmp101)
|
|
9180
9430
|
])
|
|
9181
9431
|
];
|
|
9182
|
-
case
|
|
9432
|
+
case 138:
|
|
9183
9433
|
_state.sent();
|
|
9184
9434
|
return [
|
|
9185
9435
|
3,
|
|
9186
|
-
|
|
9436
|
+
143
|
|
9187
9437
|
];
|
|
9188
|
-
case
|
|
9189
|
-
|
|
9438
|
+
case 139:
|
|
9439
|
+
_tmp103 = {
|
|
9190
9440
|
event: "thread.message.in_progress"
|
|
9191
9441
|
};
|
|
9192
|
-
|
|
9442
|
+
_tmp104 = {
|
|
9193
9443
|
id: event.item_id,
|
|
9194
9444
|
object: "thread.message",
|
|
9195
|
-
created_at:
|
|
9445
|
+
created_at: dayjs21().unix(),
|
|
9196
9446
|
thread_id: threadId,
|
|
9197
9447
|
completed_at: null,
|
|
9198
9448
|
incomplete_at: null,
|
|
@@ -9217,92 +9467,92 @@ var responsesRunAdapter = function(param) {
|
|
|
9217
9467
|
}
|
|
9218
9468
|
})
|
|
9219
9469
|
];
|
|
9220
|
-
case
|
|
9470
|
+
case 140:
|
|
9221
9471
|
return [
|
|
9222
9472
|
4,
|
|
9223
9473
|
onEvent2.apply(void 0, [
|
|
9224
|
-
(
|
|
9474
|
+
(_tmp103.data = (_tmp104.assistant_id = _state.sent().id, _tmp104.run_id = responseCreatedResponse.id, _tmp104.attachments = [], _tmp104.status = "in_progress", _tmp104.metadata = {
|
|
9225
9475
|
event: JSON.stringify(_object_spread_props(_object_spread({}, event), {
|
|
9226
9476
|
partial_image_b64: "truncated"
|
|
9227
9477
|
}))
|
|
9228
|
-
},
|
|
9478
|
+
}, _tmp104), _tmp103)
|
|
9229
9479
|
])
|
|
9230
9480
|
];
|
|
9231
|
-
case
|
|
9481
|
+
case 141:
|
|
9232
9482
|
_state.sent();
|
|
9233
9483
|
return [
|
|
9234
9484
|
3,
|
|
9235
|
-
|
|
9485
|
+
143
|
|
9236
9486
|
];
|
|
9237
|
-
case
|
|
9487
|
+
case 142:
|
|
9238
9488
|
return [
|
|
9239
9489
|
3,
|
|
9240
|
-
|
|
9490
|
+
143
|
|
9241
9491
|
];
|
|
9242
|
-
case
|
|
9492
|
+
case 143:
|
|
9243
9493
|
_iteratorAbruptCompletion = false;
|
|
9244
9494
|
return [
|
|
9245
9495
|
3,
|
|
9246
9496
|
3
|
|
9247
9497
|
];
|
|
9248
|
-
case
|
|
9498
|
+
case 144:
|
|
9249
9499
|
return [
|
|
9250
9500
|
3,
|
|
9251
|
-
|
|
9501
|
+
151
|
|
9252
9502
|
];
|
|
9253
|
-
case
|
|
9503
|
+
case 145:
|
|
9254
9504
|
err = _state.sent();
|
|
9255
9505
|
_didIteratorError = true;
|
|
9256
9506
|
_iteratorError = err;
|
|
9257
9507
|
return [
|
|
9258
9508
|
3,
|
|
9259
|
-
|
|
9509
|
+
151
|
|
9260
9510
|
];
|
|
9261
|
-
case
|
|
9511
|
+
case 146:
|
|
9262
9512
|
_state.trys.push([
|
|
9263
|
-
|
|
9513
|
+
146,
|
|
9264
9514
|
,
|
|
9265
|
-
|
|
9266
|
-
|
|
9515
|
+
149,
|
|
9516
|
+
150
|
|
9267
9517
|
]);
|
|
9268
9518
|
if (!(_iteratorAbruptCompletion && _iterator.return != null)) return [
|
|
9269
9519
|
3,
|
|
9270
|
-
|
|
9520
|
+
148
|
|
9271
9521
|
];
|
|
9272
9522
|
return [
|
|
9273
9523
|
4,
|
|
9274
9524
|
_iterator.return()
|
|
9275
9525
|
];
|
|
9276
|
-
case
|
|
9526
|
+
case 147:
|
|
9277
9527
|
_state.sent();
|
|
9278
|
-
_state.label =
|
|
9279
|
-
case
|
|
9528
|
+
_state.label = 148;
|
|
9529
|
+
case 148:
|
|
9280
9530
|
return [
|
|
9281
9531
|
3,
|
|
9282
|
-
|
|
9532
|
+
150
|
|
9283
9533
|
];
|
|
9284
|
-
case
|
|
9534
|
+
case 149:
|
|
9285
9535
|
if (_didIteratorError) {
|
|
9286
9536
|
throw _iteratorError;
|
|
9287
9537
|
}
|
|
9288
9538
|
return [
|
|
9289
9539
|
7
|
|
9290
9540
|
];
|
|
9291
|
-
case
|
|
9541
|
+
case 150:
|
|
9292
9542
|
return [
|
|
9293
9543
|
7
|
|
9294
9544
|
];
|
|
9295
|
-
case
|
|
9545
|
+
case 151:
|
|
9296
9546
|
return [
|
|
9297
9547
|
3,
|
|
9298
|
-
|
|
9548
|
+
156
|
|
9299
9549
|
];
|
|
9300
|
-
case
|
|
9550
|
+
case 152:
|
|
9301
9551
|
e = _state.sent();
|
|
9302
|
-
|
|
9552
|
+
_tmp105 = {
|
|
9303
9553
|
event: "thread.run.failed"
|
|
9304
9554
|
};
|
|
9305
|
-
|
|
9555
|
+
_tmp106 = {
|
|
9306
9556
|
id: (responseCreatedResponse === null || responseCreatedResponse === void 0 ? void 0 : responseCreatedResponse.id) || "run_".concat(uid8(18)),
|
|
9307
9557
|
object: "thread.run",
|
|
9308
9558
|
thread_id: threadId
|
|
@@ -9315,23 +9565,23 @@ var responsesRunAdapter = function(param) {
|
|
|
9315
9565
|
}
|
|
9316
9566
|
})
|
|
9317
9567
|
];
|
|
9318
|
-
case
|
|
9568
|
+
case 153:
|
|
9319
9569
|
return [
|
|
9320
9570
|
4,
|
|
9321
9571
|
onEvent2.apply(void 0, [
|
|
9322
|
-
(
|
|
9572
|
+
(_tmp105.data = (_tmp106.assistant_id = _state.sent().id, _tmp106.status = "failed", _tmp106.failed_at = dayjs21().unix(), _tmp106.last_error = {
|
|
9323
9573
|
code: "server_error",
|
|
9324
9574
|
message: String((e === null || e === void 0 ? void 0 : e.message) || e || "Unknown error")
|
|
9325
|
-
},
|
|
9575
|
+
}, _tmp106), _tmp105)
|
|
9326
9576
|
])
|
|
9327
9577
|
];
|
|
9328
|
-
case
|
|
9578
|
+
case 154:
|
|
9329
9579
|
_state.sent();
|
|
9330
9580
|
return [
|
|
9331
9581
|
3,
|
|
9332
|
-
|
|
9582
|
+
156
|
|
9333
9583
|
];
|
|
9334
|
-
case
|
|
9584
|
+
case 155:
|
|
9335
9585
|
waitUntil(new Promise(/*#__PURE__*/ function() {
|
|
9336
9586
|
var _ref = _async_to_generator(function(resolve) {
|
|
9337
9587
|
return _ts_generator(this, function(_state) {
|
|
@@ -9368,7 +9618,7 @@ var responsesRunAdapter = function(param) {
|
|
|
9368
9618
|
return [
|
|
9369
9619
|
7
|
|
9370
9620
|
];
|
|
9371
|
-
case
|
|
9621
|
+
case 156:
|
|
9372
9622
|
return [
|
|
9373
9623
|
2
|
|
9374
9624
|
];
|