supercompat 3.15.7 → 3.16.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 +1159 -92
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +1135 -72
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -436,6 +436,9 @@ __export(index_exports, {
|
|
|
436
436
|
ollamaClientAdapter: function() {
|
|
437
437
|
return ollamaClientAdapter;
|
|
438
438
|
},
|
|
439
|
+
openRouterClientAdapter: function() {
|
|
440
|
+
return openRouterClientAdapter;
|
|
441
|
+
},
|
|
439
442
|
openaiClientAdapter: function() {
|
|
440
443
|
return openaiClientAdapter;
|
|
441
444
|
},
|
|
@@ -1197,7 +1200,7 @@ var get3 = function(param) {
|
|
|
1197
1200
|
var azureAiProject = param.azureAiProject;
|
|
1198
1201
|
return function(_url, _options) {
|
|
1199
1202
|
return _async_to_generator(function() {
|
|
1200
|
-
var
|
|
1203
|
+
var models14, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, deployment, err, error;
|
|
1201
1204
|
return _ts_generator(this, function(_state) {
|
|
1202
1205
|
switch(_state.label){
|
|
1203
1206
|
case 0:
|
|
@@ -1207,7 +1210,7 @@ var get3 = function(param) {
|
|
|
1207
1210
|
,
|
|
1208
1211
|
14
|
|
1209
1212
|
]);
|
|
1210
|
-
|
|
1213
|
+
models14 = [];
|
|
1211
1214
|
_iteratorAbruptCompletion = false, _didIteratorError = false;
|
|
1212
1215
|
_state.label = 1;
|
|
1213
1216
|
case 1:
|
|
@@ -1232,7 +1235,7 @@ var get3 = function(param) {
|
|
|
1232
1235
|
_value = _step.value;
|
|
1233
1236
|
deployment = _value;
|
|
1234
1237
|
if (deployment.type === "ModelDeployment" && "modelName" in deployment && "modelPublisher" in deployment) {
|
|
1235
|
-
|
|
1238
|
+
models14.push({
|
|
1236
1239
|
id: deployment.modelName,
|
|
1237
1240
|
object: "model",
|
|
1238
1241
|
created: Date.now(),
|
|
@@ -1298,7 +1301,7 @@ var get3 = function(param) {
|
|
|
1298
1301
|
2,
|
|
1299
1302
|
new Response(JSON.stringify({
|
|
1300
1303
|
object: "list",
|
|
1301
|
-
data:
|
|
1304
|
+
data: models14
|
|
1302
1305
|
}), {
|
|
1303
1306
|
status: 200,
|
|
1304
1307
|
headers: {
|
|
@@ -2661,7 +2664,7 @@ var post5 = function(param) {
|
|
|
2661
2664
|
stream = new ReadableStream({
|
|
2662
2665
|
start: function start(controller) {
|
|
2663
2666
|
return _async_to_generator(function() {
|
|
2664
|
-
var blockIndexToToolUseId, toolUseIdToIndex, toolUseIdArgumentBuffer, computerToolUseIds, normalizedComputerCalls, nextToolCallIndex,
|
|
2667
|
+
var blockIndexToToolUseId, toolUseIdToIndex, toolUseIdArgumentBuffer, computerToolUseIds, normalizedComputerCalls, nextToolCallIndex, parseJson3, getOrCreateIndexForToolUseId, assignBlockToToolUse, markComputerToolUse, getToolUseIdFromBlock, emitNormalizedToolCall, getOrCreateIndexForBlock, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, chunk, toolUseId, _toolUseIdArgumentBuffer_get, buffered, parsed, normalized, toolCallIndex, chunkIndex, _toolUseIdArgumentBuffer_get1, buffered1, toolCallIndex1, chunkIndex1, messageDelta, delta, toolUseId1, _toolUseIdArgumentBuffer_get2, _chunk_delta_partial_json, existing, updated, parsed1, normalized1, toolCallIndex2, chunkIndex2, _toolUseIdArgumentBuffer_get3, _chunk_delta_partial_json1, existing1, index, messageDelta1, delta1, toolName, normalizedToolName, index1, index2, _chunk_content_block_content, _getToolUseIdFromBlock, outputPayload, toolCallId, index3, _getToolUseIdFromBlock1, _chunk_content_block_content1, toolCallId1, _chunk_content_block, _toolUseId, _type, _id, rest, index4, outputPayload1, messageDelta2, messageDelta3, err;
|
|
2665
2668
|
return _ts_generator(this, function(_state) {
|
|
2666
2669
|
switch(_state.label){
|
|
2667
2670
|
case 0:
|
|
@@ -2671,7 +2674,7 @@ var post5 = function(param) {
|
|
|
2671
2674
|
computerToolUseIds = /* @__PURE__ */ new Set();
|
|
2672
2675
|
normalizedComputerCalls = /* @__PURE__ */ new Set();
|
|
2673
2676
|
nextToolCallIndex = 0;
|
|
2674
|
-
|
|
2677
|
+
parseJson3 = function(value) {
|
|
2675
2678
|
try {
|
|
2676
2679
|
return JSON.parse(value);
|
|
2677
2680
|
} catch (unused) {
|
|
@@ -2768,7 +2771,7 @@ var post5 = function(param) {
|
|
|
2768
2771
|
if (toolUseId && computerToolUseIds.has(toolUseId) && !normalizedComputerCalls.has(toolUseId)) {
|
|
2769
2772
|
;
|
|
2770
2773
|
buffered = (_toolUseIdArgumentBuffer_get = toolUseIdArgumentBuffer.get(toolUseId)) !== null && _toolUseIdArgumentBuffer_get !== void 0 ? _toolUseIdArgumentBuffer_get : "";
|
|
2771
|
-
parsed = buffered ?
|
|
2774
|
+
parsed = buffered ? parseJson3(buffered) : void 0;
|
|
2772
2775
|
if (parsed !== void 0) {
|
|
2773
2776
|
normalized = normalizeComputerToolCallPayload(parsed);
|
|
2774
2777
|
toolCallIndex = getOrCreateIndexForToolUseId(toolUseId);
|
|
@@ -2833,7 +2836,7 @@ var post5 = function(param) {
|
|
|
2833
2836
|
updated = "".concat(existing).concat((_chunk_delta_partial_json = chunk.delta.partial_json) !== null && _chunk_delta_partial_json !== void 0 ? _chunk_delta_partial_json : "");
|
|
2834
2837
|
toolUseIdArgumentBuffer.set(toolUseId1, updated);
|
|
2835
2838
|
if (!normalizedComputerCalls.has(toolUseId1)) {
|
|
2836
|
-
parsed1 =
|
|
2839
|
+
parsed1 = parseJson3(updated);
|
|
2837
2840
|
if (parsed1 !== void 0) {
|
|
2838
2841
|
normalized1 = normalizeComputerToolCallPayload(parsed1);
|
|
2839
2842
|
toolCallIndex2 = getOrCreateIndexForToolUseId(toolUseId1);
|
|
@@ -4009,10 +4012,874 @@ var post9 = function(param) {
|
|
|
4009
4012
|
stream = new ReadableStream({
|
|
4010
4013
|
start: function start(controller) {
|
|
4011
4014
|
return _async_to_generator(function() {
|
|
4012
|
-
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, chunk, err;
|
|
4015
|
+
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, chunk, err;
|
|
4016
|
+
return _ts_generator(this, function(_state) {
|
|
4017
|
+
switch(_state.label){
|
|
4018
|
+
case 0:
|
|
4019
|
+
_iteratorAbruptCompletion = false, _didIteratorError = false;
|
|
4020
|
+
_state.label = 1;
|
|
4021
|
+
case 1:
|
|
4022
|
+
_state.trys.push([
|
|
4023
|
+
1,
|
|
4024
|
+
6,
|
|
4025
|
+
7,
|
|
4026
|
+
12
|
|
4027
|
+
]);
|
|
4028
|
+
_iterator = _async_iterator(response);
|
|
4029
|
+
_state.label = 2;
|
|
4030
|
+
case 2:
|
|
4031
|
+
return [
|
|
4032
|
+
4,
|
|
4033
|
+
_iterator.next()
|
|
4034
|
+
];
|
|
4035
|
+
case 3:
|
|
4036
|
+
if (!(_iteratorAbruptCompletion = !(_step = _state.sent()).done)) return [
|
|
4037
|
+
3,
|
|
4038
|
+
5
|
|
4039
|
+
];
|
|
4040
|
+
_value = _step.value;
|
|
4041
|
+
chunk = _value;
|
|
4042
|
+
controller.enqueue("data: ".concat(JSON.stringify(chunk), "\n\n"));
|
|
4043
|
+
_state.label = 4;
|
|
4044
|
+
case 4:
|
|
4045
|
+
_iteratorAbruptCompletion = false;
|
|
4046
|
+
return [
|
|
4047
|
+
3,
|
|
4048
|
+
2
|
|
4049
|
+
];
|
|
4050
|
+
case 5:
|
|
4051
|
+
return [
|
|
4052
|
+
3,
|
|
4053
|
+
12
|
|
4054
|
+
];
|
|
4055
|
+
case 6:
|
|
4056
|
+
err = _state.sent();
|
|
4057
|
+
_didIteratorError = true;
|
|
4058
|
+
_iteratorError = err;
|
|
4059
|
+
return [
|
|
4060
|
+
3,
|
|
4061
|
+
12
|
|
4062
|
+
];
|
|
4063
|
+
case 7:
|
|
4064
|
+
_state.trys.push([
|
|
4065
|
+
7,
|
|
4066
|
+
,
|
|
4067
|
+
10,
|
|
4068
|
+
11
|
|
4069
|
+
]);
|
|
4070
|
+
if (!(_iteratorAbruptCompletion && _iterator.return != null)) return [
|
|
4071
|
+
3,
|
|
4072
|
+
9
|
|
4073
|
+
];
|
|
4074
|
+
return [
|
|
4075
|
+
4,
|
|
4076
|
+
_iterator.return()
|
|
4077
|
+
];
|
|
4078
|
+
case 8:
|
|
4079
|
+
_state.sent();
|
|
4080
|
+
_state.label = 9;
|
|
4081
|
+
case 9:
|
|
4082
|
+
return [
|
|
4083
|
+
3,
|
|
4084
|
+
11
|
|
4085
|
+
];
|
|
4086
|
+
case 10:
|
|
4087
|
+
if (_didIteratorError) {
|
|
4088
|
+
throw _iteratorError;
|
|
4089
|
+
}
|
|
4090
|
+
return [
|
|
4091
|
+
7
|
|
4092
|
+
];
|
|
4093
|
+
case 11:
|
|
4094
|
+
return [
|
|
4095
|
+
7
|
|
4096
|
+
];
|
|
4097
|
+
case 12:
|
|
4098
|
+
controller.close();
|
|
4099
|
+
return [
|
|
4100
|
+
2
|
|
4101
|
+
];
|
|
4102
|
+
}
|
|
4103
|
+
});
|
|
4104
|
+
})();
|
|
4105
|
+
}
|
|
4106
|
+
});
|
|
4107
|
+
return [
|
|
4108
|
+
2,
|
|
4109
|
+
new Response(stream, {
|
|
4110
|
+
headers: {
|
|
4111
|
+
"Content-Type": "text/event-stream"
|
|
4112
|
+
}
|
|
4113
|
+
})
|
|
4114
|
+
];
|
|
4115
|
+
case 2:
|
|
4116
|
+
_state.trys.push([
|
|
4117
|
+
2,
|
|
4118
|
+
4,
|
|
4119
|
+
,
|
|
4120
|
+
5
|
|
4121
|
+
]);
|
|
4122
|
+
return [
|
|
4123
|
+
4,
|
|
4124
|
+
ollama.chat.completions.create(body)
|
|
4125
|
+
];
|
|
4126
|
+
case 3:
|
|
4127
|
+
data = _state.sent();
|
|
4128
|
+
return [
|
|
4129
|
+
2,
|
|
4130
|
+
new Response(JSON.stringify({
|
|
4131
|
+
data: data
|
|
4132
|
+
}), {
|
|
4133
|
+
status: 200,
|
|
4134
|
+
headers: {
|
|
4135
|
+
"Content-Type": "application/json"
|
|
4136
|
+
}
|
|
4137
|
+
})
|
|
4138
|
+
];
|
|
4139
|
+
case 4:
|
|
4140
|
+
error = _state.sent();
|
|
4141
|
+
return [
|
|
4142
|
+
2,
|
|
4143
|
+
new Response(JSON.stringify({
|
|
4144
|
+
error: error
|
|
4145
|
+
}), {
|
|
4146
|
+
status: 500,
|
|
4147
|
+
headers: {
|
|
4148
|
+
"Content-Type": "application/json"
|
|
4149
|
+
}
|
|
4150
|
+
})
|
|
4151
|
+
];
|
|
4152
|
+
case 5:
|
|
4153
|
+
return [
|
|
4154
|
+
2
|
|
4155
|
+
];
|
|
4156
|
+
}
|
|
4157
|
+
});
|
|
4158
|
+
})();
|
|
4159
|
+
};
|
|
4160
|
+
};
|
|
4161
|
+
// src/adapters/client/ollamaClientAdapter/completions/index.ts
|
|
4162
|
+
var completions9 = function(param) {
|
|
4163
|
+
var ollama = param.ollama;
|
|
4164
|
+
return {
|
|
4165
|
+
post: post9({
|
|
4166
|
+
ollama: ollama
|
|
4167
|
+
})
|
|
4168
|
+
};
|
|
4169
|
+
};
|
|
4170
|
+
// src/adapters/client/ollamaClientAdapter/index.ts
|
|
4171
|
+
var ollamaClientAdapter = function(param) {
|
|
4172
|
+
var ollama = param.ollama;
|
|
4173
|
+
return {
|
|
4174
|
+
client: ollama,
|
|
4175
|
+
requestHandlers: {
|
|
4176
|
+
"^/v1/models$": models12({
|
|
4177
|
+
ollama: ollama
|
|
4178
|
+
}),
|
|
4179
|
+
"^/(?:v1|/?openai)/chat/completions$": completions9({
|
|
4180
|
+
ollama: ollama
|
|
4181
|
+
})
|
|
4182
|
+
}
|
|
4183
|
+
};
|
|
4184
|
+
};
|
|
4185
|
+
// src/adapters/client/openRouterClientAdapter/models/get.ts
|
|
4186
|
+
var get11 = function(param) {
|
|
4187
|
+
var openRouter = param.openRouter;
|
|
4188
|
+
return function(_url, _options) {
|
|
4189
|
+
return _async_to_generator(function() {
|
|
4190
|
+
var data, error;
|
|
4191
|
+
return _ts_generator(this, function(_state) {
|
|
4192
|
+
switch(_state.label){
|
|
4193
|
+
case 0:
|
|
4194
|
+
_state.trys.push([
|
|
4195
|
+
0,
|
|
4196
|
+
2,
|
|
4197
|
+
,
|
|
4198
|
+
3
|
|
4199
|
+
]);
|
|
4200
|
+
return [
|
|
4201
|
+
4,
|
|
4202
|
+
openRouter.models.list()
|
|
4203
|
+
];
|
|
4204
|
+
case 1:
|
|
4205
|
+
data = _state.sent();
|
|
4206
|
+
return [
|
|
4207
|
+
2,
|
|
4208
|
+
new Response(JSON.stringify(data), {
|
|
4209
|
+
status: 200,
|
|
4210
|
+
headers: {
|
|
4211
|
+
"Content-Type": "application/json"
|
|
4212
|
+
}
|
|
4213
|
+
})
|
|
4214
|
+
];
|
|
4215
|
+
case 2:
|
|
4216
|
+
error = _state.sent();
|
|
4217
|
+
return [
|
|
4218
|
+
2,
|
|
4219
|
+
new Response(JSON.stringify({
|
|
4220
|
+
error: error
|
|
4221
|
+
}), {
|
|
4222
|
+
status: 500,
|
|
4223
|
+
headers: {
|
|
4224
|
+
"Content-Type": "application/json"
|
|
4225
|
+
}
|
|
4226
|
+
})
|
|
4227
|
+
];
|
|
4228
|
+
case 3:
|
|
4229
|
+
return [
|
|
4230
|
+
2
|
|
4231
|
+
];
|
|
4232
|
+
}
|
|
4233
|
+
});
|
|
4234
|
+
})();
|
|
4235
|
+
};
|
|
4236
|
+
};
|
|
4237
|
+
// src/adapters/client/openRouterClientAdapter/models/index.ts
|
|
4238
|
+
var models13 = function(param) {
|
|
4239
|
+
var openRouter = param.openRouter;
|
|
4240
|
+
return {
|
|
4241
|
+
get: get11({
|
|
4242
|
+
openRouter: openRouter
|
|
4243
|
+
})
|
|
4244
|
+
};
|
|
4245
|
+
};
|
|
4246
|
+
// src/adapters/client/openRouterClientAdapter/completions/normalizeComputerCall.ts
|
|
4247
|
+
var MODEL_QUIRKS = {
|
|
4248
|
+
"z-ai/glm-4.6v": {
|
|
4249
|
+
normalizedCoords: true,
|
|
4250
|
+
cleanArtifacts: true
|
|
4251
|
+
},
|
|
4252
|
+
"qwen/": {
|
|
4253
|
+
fuzzyFallback: true
|
|
4254
|
+
}
|
|
4255
|
+
};
|
|
4256
|
+
var getQuirks = function(model) {
|
|
4257
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4258
|
+
try {
|
|
4259
|
+
for(var _iterator = Object.entries(MODEL_QUIRKS)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4260
|
+
var _step_value = _sliced_to_array(_step.value, 2), prefix = _step_value[0], quirks = _step_value[1];
|
|
4261
|
+
if (model.startsWith(prefix)) return quirks;
|
|
4262
|
+
}
|
|
4263
|
+
} catch (err) {
|
|
4264
|
+
_didIteratorError = true;
|
|
4265
|
+
_iteratorError = err;
|
|
4266
|
+
} finally{
|
|
4267
|
+
try {
|
|
4268
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
4269
|
+
_iterator.return();
|
|
4270
|
+
}
|
|
4271
|
+
} finally{
|
|
4272
|
+
if (_didIteratorError) {
|
|
4273
|
+
throw _iteratorError;
|
|
4274
|
+
}
|
|
4275
|
+
}
|
|
4276
|
+
}
|
|
4277
|
+
return {};
|
|
4278
|
+
};
|
|
4279
|
+
var cleanTextArtifacts = function(text) {
|
|
4280
|
+
return text.replace(/<\|begin_of_box\|>/g, "").replace(/<\|end_of_box\|>/g, "").replace(/<arg_key>[^<]*<\/arg_key>/g, "").replace(/<\/arg_value>/g, "").trim();
|
|
4281
|
+
};
|
|
4282
|
+
var KNOWN_ACTION_TYPES = [
|
|
4283
|
+
"double_click",
|
|
4284
|
+
"screenshot",
|
|
4285
|
+
"keypress",
|
|
4286
|
+
"scroll",
|
|
4287
|
+
"click",
|
|
4288
|
+
"move",
|
|
4289
|
+
"type",
|
|
4290
|
+
"drag",
|
|
4291
|
+
"wait"
|
|
4292
|
+
];
|
|
4293
|
+
var splitCoordDigits = function(numStr) {
|
|
4294
|
+
for(var i = 1; i < numStr.length; i++){
|
|
4295
|
+
var x = parseInt(numStr.slice(0, i));
|
|
4296
|
+
var y = parseInt(numStr.slice(i));
|
|
4297
|
+
if (x >= 0 && x <= 1e3 && y >= 0 && y <= 1e3) {
|
|
4298
|
+
return {
|
|
4299
|
+
x: x,
|
|
4300
|
+
y: y
|
|
4301
|
+
};
|
|
4302
|
+
}
|
|
4303
|
+
}
|
|
4304
|
+
return null;
|
|
4305
|
+
};
|
|
4306
|
+
var cleanGlmAction = function(action) {
|
|
4307
|
+
var typeVal = action.type;
|
|
4308
|
+
if (typeof typeVal !== "string") return action;
|
|
4309
|
+
var argValueMatch = typeVal.match(/<arg_value>\s*(\{[\s\S]*\})\s*$/);
|
|
4310
|
+
if (argValueMatch) {
|
|
4311
|
+
var inner = parseJson2(argValueMatch[1]);
|
|
4312
|
+
if (inner && (typeof inner === "undefined" ? "undefined" : _type_of(inner)) === "object") {
|
|
4313
|
+
return inner;
|
|
4314
|
+
}
|
|
4315
|
+
}
|
|
4316
|
+
var cleanedType = typeVal.replace(/<\/?[^>]+>/g, "").replace(/\n/g, "").trim();
|
|
4317
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4318
|
+
try {
|
|
4319
|
+
for(var _iterator = KNOWN_ACTION_TYPES[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4320
|
+
var actionType = _step.value;
|
|
4321
|
+
if (cleanedType.startsWith(actionType) && cleanedType !== actionType) {
|
|
4322
|
+
var rest = cleanedType.slice(actionType.length);
|
|
4323
|
+
var nums = rest.match(/\d+/g);
|
|
4324
|
+
if (nums && nums.length >= 2) {
|
|
4325
|
+
return _object_spread_props(_object_spread({}, action), {
|
|
4326
|
+
type: actionType,
|
|
4327
|
+
x: parseInt(nums[0]),
|
|
4328
|
+
y: parseInt(nums[1])
|
|
4329
|
+
});
|
|
4330
|
+
}
|
|
4331
|
+
if (nums && nums.length === 1 && nums[0].length >= 2) {
|
|
4332
|
+
var coords = splitCoordDigits(nums[0]);
|
|
4333
|
+
if (coords) {
|
|
4334
|
+
return _object_spread(_object_spread_props(_object_spread({}, action), {
|
|
4335
|
+
type: actionType
|
|
4336
|
+
}), coords);
|
|
4337
|
+
}
|
|
4338
|
+
}
|
|
4339
|
+
return _object_spread_props(_object_spread({}, action), {
|
|
4340
|
+
type: actionType
|
|
4341
|
+
});
|
|
4342
|
+
}
|
|
4343
|
+
}
|
|
4344
|
+
} catch (err) {
|
|
4345
|
+
_didIteratorError = true;
|
|
4346
|
+
_iteratorError = err;
|
|
4347
|
+
} finally{
|
|
4348
|
+
try {
|
|
4349
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
4350
|
+
_iterator.return();
|
|
4351
|
+
}
|
|
4352
|
+
} finally{
|
|
4353
|
+
if (_didIteratorError) {
|
|
4354
|
+
throw _iteratorError;
|
|
4355
|
+
}
|
|
4356
|
+
}
|
|
4357
|
+
}
|
|
4358
|
+
if (cleanedType === typeVal) return action;
|
|
4359
|
+
return _object_spread_props(_object_spread({}, action), {
|
|
4360
|
+
type: cleanedType
|
|
4361
|
+
});
|
|
4362
|
+
};
|
|
4363
|
+
var cleanGlmFields = function(action) {
|
|
4364
|
+
var result = _object_spread({}, action);
|
|
4365
|
+
if (typeof result.x === "string") {
|
|
4366
|
+
var nums = result.x.match(/\d+/g);
|
|
4367
|
+
if (nums && nums.length >= 2) {
|
|
4368
|
+
result.x = parseInt(nums[0]);
|
|
4369
|
+
if (result.y === void 0 || typeof result.y === "string") {
|
|
4370
|
+
result.y = parseInt(nums[1]);
|
|
4371
|
+
}
|
|
4372
|
+
} else if (nums && nums.length === 1) {
|
|
4373
|
+
result.x = parseInt(nums[0]);
|
|
4374
|
+
}
|
|
4375
|
+
}
|
|
4376
|
+
if (typeof result.y === "string") {
|
|
4377
|
+
var nums1 = result.y.match(/\d+/g);
|
|
4378
|
+
if (nums1 && nums1.length >= 1) {
|
|
4379
|
+
result.y = parseInt(nums1[0]);
|
|
4380
|
+
}
|
|
4381
|
+
}
|
|
4382
|
+
for(var _i = 0, _iter = [
|
|
4383
|
+
"scroll_x",
|
|
4384
|
+
"scroll_y"
|
|
4385
|
+
]; _i < _iter.length; _i++){
|
|
4386
|
+
var key = _iter[_i];
|
|
4387
|
+
if (typeof result[key] === "string") {
|
|
4388
|
+
var nums2 = result[key].match(/\d+/g);
|
|
4389
|
+
if (nums2) result[key] = parseInt(nums2[0]);
|
|
4390
|
+
}
|
|
4391
|
+
}
|
|
4392
|
+
if (typeof result.type === "string") {
|
|
4393
|
+
result.type = result.type.replace(/<[^>]*>/g, "").replace(/^\{|\}$/g, "").replace(/\n/g, "").trim();
|
|
4394
|
+
}
|
|
4395
|
+
return result;
|
|
4396
|
+
};
|
|
4397
|
+
var applyArtifactCleanup = function(action) {
|
|
4398
|
+
return cleanGlmFields(cleanGlmAction(action));
|
|
4399
|
+
};
|
|
4400
|
+
var parseJson2 = function(text) {
|
|
4401
|
+
try {
|
|
4402
|
+
return JSON.parse(text);
|
|
4403
|
+
} catch (unused) {
|
|
4404
|
+
return void 0;
|
|
4405
|
+
}
|
|
4406
|
+
};
|
|
4407
|
+
var extractJson = function(text) {
|
|
4408
|
+
var direct = parseJson2(text);
|
|
4409
|
+
if (direct) return direct;
|
|
4410
|
+
var codeBlockMatch = text.match(/```(?:json)?\s*([\s\S]*?)```/);
|
|
4411
|
+
if (codeBlockMatch) {
|
|
4412
|
+
var parsed = parseJson2(codeBlockMatch[1].trim());
|
|
4413
|
+
if (parsed) return parsed;
|
|
4414
|
+
}
|
|
4415
|
+
var jsonMatch = text.match(/(\{[\s\S]*\})\s*$/);
|
|
4416
|
+
if (jsonMatch) {
|
|
4417
|
+
var parsed1 = parseJson2(jsonMatch[1].trim());
|
|
4418
|
+
if (parsed1) return parsed1;
|
|
4419
|
+
}
|
|
4420
|
+
return void 0;
|
|
4421
|
+
};
|
|
4422
|
+
var fuzzyExtractJson = function(text) {
|
|
4423
|
+
var clickMatch = text.match(/"action"\s*:\s*"click"\s*,\s*"x"\s*:\s*\[?\s*(\d+)\s*,\s*(\d+)/);
|
|
4424
|
+
if (clickMatch) {
|
|
4425
|
+
return {
|
|
4426
|
+
action: {
|
|
4427
|
+
type: "click",
|
|
4428
|
+
x: parseInt(clickMatch[1]),
|
|
4429
|
+
y: parseInt(clickMatch[2])
|
|
4430
|
+
}
|
|
4431
|
+
};
|
|
4432
|
+
}
|
|
4433
|
+
var actionTypeMatch = text.match(/"type"\s*:\s*"(\w+)"/);
|
|
4434
|
+
if (actionTypeMatch) {
|
|
4435
|
+
var result = {
|
|
4436
|
+
type: actionTypeMatch[1]
|
|
4437
|
+
};
|
|
4438
|
+
var xMatch = text.match(/"x"\s*:\s*\[?\s*(\d+)/);
|
|
4439
|
+
var yMatch = text.match(/"y"\s*:\s*(\d+)/);
|
|
4440
|
+
if (xMatch) result.x = parseInt(xMatch[1]);
|
|
4441
|
+
if (yMatch) {
|
|
4442
|
+
result.y = parseInt(yMatch[1]);
|
|
4443
|
+
} else if (xMatch) {
|
|
4444
|
+
var _xMatch_index;
|
|
4445
|
+
var afterX = text.slice(((_xMatch_index = xMatch.index) !== null && _xMatch_index !== void 0 ? _xMatch_index : 0) + xMatch[0].length);
|
|
4446
|
+
var nextNum = afterX.match(/\s*,?\s*(\d+)/);
|
|
4447
|
+
if (nextNum) result.y = parseInt(nextNum[1]);
|
|
4448
|
+
}
|
|
4449
|
+
var textMatch = text.match(/"text"\s*:\s*"([^"]*)"/);
|
|
4450
|
+
if (textMatch) result.text = textMatch[1];
|
|
4451
|
+
return {
|
|
4452
|
+
action: result
|
|
4453
|
+
};
|
|
4454
|
+
}
|
|
4455
|
+
return void 0;
|
|
4456
|
+
};
|
|
4457
|
+
var denormalize = function(value, dimension) {
|
|
4458
|
+
return Math.round(value / 1e3 * dimension);
|
|
4459
|
+
};
|
|
4460
|
+
var denormalizeAction = function(action, displayWidth, displayHeight) {
|
|
4461
|
+
var result = _object_spread({}, action);
|
|
4462
|
+
if (typeof result.x === "number") {
|
|
4463
|
+
result.x = denormalize(result.x, displayWidth);
|
|
4464
|
+
}
|
|
4465
|
+
if (typeof result.y === "number") {
|
|
4466
|
+
result.y = denormalize(result.y, displayHeight);
|
|
4467
|
+
}
|
|
4468
|
+
if (Array.isArray(result.path)) {
|
|
4469
|
+
result.path = result.path.map(function(point) {
|
|
4470
|
+
if (point && (typeof point === "undefined" ? "undefined" : _type_of(point)) === "object") {
|
|
4471
|
+
return _object_spread({}, point, typeof point.x === "number" ? {
|
|
4472
|
+
x: denormalize(point.x, displayWidth)
|
|
4473
|
+
} : {}, typeof point.y === "number" ? {
|
|
4474
|
+
y: denormalize(point.y, displayHeight)
|
|
4475
|
+
} : {});
|
|
4476
|
+
}
|
|
4477
|
+
return point;
|
|
4478
|
+
});
|
|
4479
|
+
}
|
|
4480
|
+
return result;
|
|
4481
|
+
};
|
|
4482
|
+
var COORD_FIELDS = [
|
|
4483
|
+
"x",
|
|
4484
|
+
"y",
|
|
4485
|
+
"text",
|
|
4486
|
+
"keys",
|
|
4487
|
+
"button",
|
|
4488
|
+
"direction",
|
|
4489
|
+
"scroll_x",
|
|
4490
|
+
"scroll_y",
|
|
4491
|
+
"path"
|
|
4492
|
+
];
|
|
4493
|
+
var normalizeStructure = function(parsed, shouldCleanArtifacts) {
|
|
4494
|
+
var clean = shouldCleanArtifacts ? function(action) {
|
|
4495
|
+
return applyArtifactCleanup(action);
|
|
4496
|
+
} : function(action) {
|
|
4497
|
+
return action;
|
|
4498
|
+
};
|
|
4499
|
+
if (parsed.action && _type_of(parsed.action) === "object") {
|
|
4500
|
+
return _object_spread_props(_object_spread({}, parsed), {
|
|
4501
|
+
action: clean(parsed.action)
|
|
4502
|
+
});
|
|
4503
|
+
}
|
|
4504
|
+
if (typeof parsed.action === "string") {
|
|
4505
|
+
var actionObj = {
|
|
4506
|
+
type: parsed.action
|
|
4507
|
+
};
|
|
4508
|
+
var rest = {};
|
|
4509
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4510
|
+
try {
|
|
4511
|
+
for(var _iterator = Object.entries(parsed)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4512
|
+
var _step_value = _sliced_to_array(_step.value, 2), key = _step_value[0], value = _step_value[1];
|
|
4513
|
+
if (key === "action") continue;
|
|
4514
|
+
if (COORD_FIELDS.includes(key)) {
|
|
4515
|
+
actionObj[key] = value;
|
|
4516
|
+
} else {
|
|
4517
|
+
rest[key] = value;
|
|
4518
|
+
}
|
|
4519
|
+
}
|
|
4520
|
+
} catch (err) {
|
|
4521
|
+
_didIteratorError = true;
|
|
4522
|
+
_iteratorError = err;
|
|
4523
|
+
} finally{
|
|
4524
|
+
try {
|
|
4525
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
4526
|
+
_iterator.return();
|
|
4527
|
+
}
|
|
4528
|
+
} finally{
|
|
4529
|
+
if (_didIteratorError) {
|
|
4530
|
+
throw _iteratorError;
|
|
4531
|
+
}
|
|
4532
|
+
}
|
|
4533
|
+
}
|
|
4534
|
+
return _object_spread_props(_object_spread({}, rest), {
|
|
4535
|
+
action: clean(actionObj)
|
|
4536
|
+
});
|
|
4537
|
+
}
|
|
4538
|
+
if (typeof parsed.type === "string") {
|
|
4539
|
+
var actionObj1 = {};
|
|
4540
|
+
var rest1 = {};
|
|
4541
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
4542
|
+
try {
|
|
4543
|
+
for(var _iterator1 = Object.entries(parsed)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
4544
|
+
var _step_value1 = _sliced_to_array(_step1.value, 2), key1 = _step_value1[0], value1 = _step_value1[1];
|
|
4545
|
+
if (key1 === "type" || COORD_FIELDS.includes(key1)) {
|
|
4546
|
+
actionObj1[key1] = value1;
|
|
4547
|
+
} else {
|
|
4548
|
+
rest1[key1] = value1;
|
|
4549
|
+
}
|
|
4550
|
+
}
|
|
4551
|
+
} catch (err) {
|
|
4552
|
+
_didIteratorError1 = true;
|
|
4553
|
+
_iteratorError1 = err;
|
|
4554
|
+
} finally{
|
|
4555
|
+
try {
|
|
4556
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
4557
|
+
_iterator1.return();
|
|
4558
|
+
}
|
|
4559
|
+
} finally{
|
|
4560
|
+
if (_didIteratorError1) {
|
|
4561
|
+
throw _iteratorError1;
|
|
4562
|
+
}
|
|
4563
|
+
}
|
|
4564
|
+
}
|
|
4565
|
+
return _object_spread_props(_object_spread({}, rest1), {
|
|
4566
|
+
action: clean(actionObj1)
|
|
4567
|
+
});
|
|
4568
|
+
}
|
|
4569
|
+
return parsed;
|
|
4570
|
+
};
|
|
4571
|
+
var denormalizeComputerCallArguments = function(param) {
|
|
4572
|
+
var argumentsText = param.argumentsText, displayWidth = param.displayWidth, displayHeight = param.displayHeight, model = param.model;
|
|
4573
|
+
if ((typeof argumentsText === "undefined" ? "undefined" : _type_of(argumentsText)) === "object" && argumentsText !== null) {
|
|
4574
|
+
argumentsText = JSON.stringify(argumentsText);
|
|
4575
|
+
}
|
|
4576
|
+
var quirks = getQuirks(model);
|
|
4577
|
+
var text = argumentsText;
|
|
4578
|
+
if (quirks.cleanArtifacts) {
|
|
4579
|
+
text = cleanTextArtifacts(text);
|
|
4580
|
+
}
|
|
4581
|
+
var parsed = extractJson(text);
|
|
4582
|
+
if (!parsed && (quirks.cleanArtifacts || quirks.fuzzyFallback)) {
|
|
4583
|
+
parsed = fuzzyExtractJson(text);
|
|
4584
|
+
}
|
|
4585
|
+
if (!parsed || (typeof parsed === "undefined" ? "undefined" : _type_of(parsed)) !== "object") {
|
|
4586
|
+
return argumentsText;
|
|
4587
|
+
}
|
|
4588
|
+
var normalized = normalizeStructure(parsed, !!quirks.cleanArtifacts);
|
|
4589
|
+
if (quirks.normalizedCoords && normalized.action && _type_of(normalized.action) === "object") {
|
|
4590
|
+
return JSON.stringify(_object_spread_props(_object_spread({}, normalized), {
|
|
4591
|
+
action: denormalizeAction(normalized.action, displayWidth, displayHeight)
|
|
4592
|
+
}));
|
|
4593
|
+
}
|
|
4594
|
+
return JSON.stringify(normalized);
|
|
4595
|
+
};
|
|
4596
|
+
// src/adapters/client/openRouterClientAdapter/completions/computerUseTool.ts
|
|
4597
|
+
var buildComputerCallFunction = function(model, displayWidth, displayHeight) {
|
|
4598
|
+
var quirks = getQuirks(model);
|
|
4599
|
+
var coordDesc = quirks.normalizedCoords ? "Coordinates use 0-1000 normalized scale (0,0=top-left, 1000,1000=bottom-right)." : "Coordinates are in pixels (screen is ".concat(displayWidth, "x").concat(displayHeight, ").");
|
|
4600
|
+
var xDesc = quirks.normalizedCoords ? "X coordinate (0-1000 normalized)" : "X coordinate in pixels (0-".concat(displayWidth, ")");
|
|
4601
|
+
var yDesc = quirks.normalizedCoords ? "Y coordinate (0-1000 normalized)" : "Y coordinate in pixels (0-".concat(displayHeight, ")");
|
|
4602
|
+
return {
|
|
4603
|
+
name: "computer_call",
|
|
4604
|
+
description: "Perform a computer action. ".concat(coordDesc),
|
|
4605
|
+
parameters: {
|
|
4606
|
+
type: "object",
|
|
4607
|
+
properties: {
|
|
4608
|
+
action: {
|
|
4609
|
+
type: "object",
|
|
4610
|
+
description: "The action to perform",
|
|
4611
|
+
properties: {
|
|
4612
|
+
type: {
|
|
4613
|
+
type: "string",
|
|
4614
|
+
enum: [
|
|
4615
|
+
"screenshot",
|
|
4616
|
+
"click",
|
|
4617
|
+
"double_click",
|
|
4618
|
+
"type",
|
|
4619
|
+
"keypress",
|
|
4620
|
+
"scroll",
|
|
4621
|
+
"move",
|
|
4622
|
+
"drag",
|
|
4623
|
+
"wait"
|
|
4624
|
+
]
|
|
4625
|
+
},
|
|
4626
|
+
x: {
|
|
4627
|
+
type: "number",
|
|
4628
|
+
description: xDesc
|
|
4629
|
+
},
|
|
4630
|
+
y: {
|
|
4631
|
+
type: "number",
|
|
4632
|
+
description: yDesc
|
|
4633
|
+
},
|
|
4634
|
+
text: {
|
|
4635
|
+
type: "string",
|
|
4636
|
+
description: "Text to type"
|
|
4637
|
+
},
|
|
4638
|
+
keys: {
|
|
4639
|
+
type: "array",
|
|
4640
|
+
items: {
|
|
4641
|
+
type: "string"
|
|
4642
|
+
},
|
|
4643
|
+
description: "Keys to press"
|
|
4644
|
+
},
|
|
4645
|
+
button: {
|
|
4646
|
+
type: "string",
|
|
4647
|
+
enum: [
|
|
4648
|
+
"left",
|
|
4649
|
+
"right",
|
|
4650
|
+
"wheel"
|
|
4651
|
+
]
|
|
4652
|
+
},
|
|
4653
|
+
direction: {
|
|
4654
|
+
type: "string",
|
|
4655
|
+
enum: [
|
|
4656
|
+
"up",
|
|
4657
|
+
"down",
|
|
4658
|
+
"left",
|
|
4659
|
+
"right"
|
|
4660
|
+
]
|
|
4661
|
+
},
|
|
4662
|
+
scroll_x: {
|
|
4663
|
+
type: "number"
|
|
4664
|
+
},
|
|
4665
|
+
scroll_y: {
|
|
4666
|
+
type: "number"
|
|
4667
|
+
},
|
|
4668
|
+
path: {
|
|
4669
|
+
type: "array",
|
|
4670
|
+
items: {
|
|
4671
|
+
type: "object",
|
|
4672
|
+
properties: {
|
|
4673
|
+
x: {
|
|
4674
|
+
type: "number"
|
|
4675
|
+
},
|
|
4676
|
+
y: {
|
|
4677
|
+
type: "number"
|
|
4678
|
+
}
|
|
4679
|
+
}
|
|
4680
|
+
},
|
|
4681
|
+
description: "Path for drag action"
|
|
4682
|
+
}
|
|
4683
|
+
},
|
|
4684
|
+
required: [
|
|
4685
|
+
"type"
|
|
4686
|
+
]
|
|
4687
|
+
},
|
|
4688
|
+
pending_safety_checks: {
|
|
4689
|
+
type: "array",
|
|
4690
|
+
items: {
|
|
4691
|
+
type: "object"
|
|
4692
|
+
}
|
|
4693
|
+
}
|
|
4694
|
+
},
|
|
4695
|
+
required: [
|
|
4696
|
+
"action"
|
|
4697
|
+
]
|
|
4698
|
+
}
|
|
4699
|
+
};
|
|
4700
|
+
};
|
|
4701
|
+
var transformTools = function(tools, model) {
|
|
4702
|
+
if (!tools || tools.length === 0) {
|
|
4703
|
+
return {
|
|
4704
|
+
tools: tools !== null && tools !== void 0 ? tools : [],
|
|
4705
|
+
computerUseConfig: null
|
|
4706
|
+
};
|
|
4707
|
+
}
|
|
4708
|
+
var computerUseConfig = null;
|
|
4709
|
+
var transformed = tools.map(function(tool) {
|
|
4710
|
+
if (tool.type === "computer_use_preview") {
|
|
4711
|
+
var _tool_computer_use_preview, _ref, _config_display_width, _ref1, _config_display_height;
|
|
4712
|
+
var config = (_tool_computer_use_preview = tool.computer_use_preview) !== null && _tool_computer_use_preview !== void 0 ? _tool_computer_use_preview : tool;
|
|
4713
|
+
computerUseConfig = {
|
|
4714
|
+
displayWidth: (_ref = (_config_display_width = config.display_width) !== null && _config_display_width !== void 0 ? _config_display_width : config.display_width_px) !== null && _ref !== void 0 ? _ref : 1280,
|
|
4715
|
+
displayHeight: (_ref1 = (_config_display_height = config.display_height) !== null && _config_display_height !== void 0 ? _config_display_height : config.display_height_px) !== null && _ref1 !== void 0 ? _ref1 : 720
|
|
4716
|
+
};
|
|
4717
|
+
return {
|
|
4718
|
+
type: "function",
|
|
4719
|
+
function: buildComputerCallFunction(model, computerUseConfig.displayWidth, computerUseConfig.displayHeight)
|
|
4720
|
+
};
|
|
4721
|
+
}
|
|
4722
|
+
return tool;
|
|
4723
|
+
});
|
|
4724
|
+
return {
|
|
4725
|
+
tools: transformed,
|
|
4726
|
+
computerUseConfig: computerUseConfig
|
|
4727
|
+
};
|
|
4728
|
+
};
|
|
4729
|
+
// src/adapters/client/openRouterClientAdapter/completions/post.ts
|
|
4730
|
+
var ARTIFACT_TAGS = /<\|begin_of_box\|>|<\|end_of_box\|>/g;
|
|
4731
|
+
var sanitizeContent = function(content) {
|
|
4732
|
+
if (!content) return content;
|
|
4733
|
+
return content.replace(ARTIFACT_TAGS, "").trim();
|
|
4734
|
+
};
|
|
4735
|
+
var post10 = function(param) {
|
|
4736
|
+
var openRouter = param.openRouter;
|
|
4737
|
+
return function(_url, options) {
|
|
4738
|
+
return _async_to_generator(function() {
|
|
4739
|
+
var body, model, _transformTools, transformedTools, computerUseConfig, resultOptions, response, shouldCleanArtifacts, stream2, displayWidth, displayHeight, stream, data, _data_choices, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, choice, _ref, _choice_message, _iteratorNormalCompletion1, _didIteratorError1, _iteratorError1, _iterator1, _step1, tc, fn, _data_choices1, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, choice1, _choice_message1, error;
|
|
4740
|
+
return _ts_generator(this, function(_state) {
|
|
4741
|
+
switch(_state.label){
|
|
4742
|
+
case 0:
|
|
4743
|
+
body = JSON.parse(options.body);
|
|
4744
|
+
model = body.model;
|
|
4745
|
+
_transformTools = transformTools(body.tools, model), transformedTools = _transformTools.tools, computerUseConfig = _transformTools.computerUseConfig;
|
|
4746
|
+
resultOptions = _object_spread({}, body, transformedTools.length > 0 ? {
|
|
4747
|
+
tools: transformedTools
|
|
4748
|
+
} : {});
|
|
4749
|
+
if (!body.stream) return [
|
|
4750
|
+
3,
|
|
4751
|
+
2
|
|
4752
|
+
];
|
|
4753
|
+
return [
|
|
4754
|
+
4,
|
|
4755
|
+
openRouter.chat.completions.create(resultOptions)
|
|
4756
|
+
];
|
|
4757
|
+
case 1:
|
|
4758
|
+
response = _state.sent();
|
|
4759
|
+
shouldCleanArtifacts = getQuirks(model).cleanArtifacts;
|
|
4760
|
+
if (!computerUseConfig) {
|
|
4761
|
+
stream2 = new ReadableStream({
|
|
4762
|
+
start: function start(controller) {
|
|
4763
|
+
return _async_to_generator(function() {
|
|
4764
|
+
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, chunk, _chunk_choices_, _chunk_choices, delta, err;
|
|
4765
|
+
return _ts_generator(this, function(_state) {
|
|
4766
|
+
switch(_state.label){
|
|
4767
|
+
case 0:
|
|
4768
|
+
_iteratorAbruptCompletion = false, _didIteratorError = false;
|
|
4769
|
+
_state.label = 1;
|
|
4770
|
+
case 1:
|
|
4771
|
+
_state.trys.push([
|
|
4772
|
+
1,
|
|
4773
|
+
6,
|
|
4774
|
+
7,
|
|
4775
|
+
12
|
|
4776
|
+
]);
|
|
4777
|
+
_iterator = _async_iterator(response);
|
|
4778
|
+
_state.label = 2;
|
|
4779
|
+
case 2:
|
|
4780
|
+
return [
|
|
4781
|
+
4,
|
|
4782
|
+
_iterator.next()
|
|
4783
|
+
];
|
|
4784
|
+
case 3:
|
|
4785
|
+
if (!(_iteratorAbruptCompletion = !(_step = _state.sent()).done)) return [
|
|
4786
|
+
3,
|
|
4787
|
+
5
|
|
4788
|
+
];
|
|
4789
|
+
_value = _step.value;
|
|
4790
|
+
chunk = _value;
|
|
4791
|
+
if (shouldCleanArtifacts) {
|
|
4792
|
+
;
|
|
4793
|
+
delta = (_chunk_choices = chunk.choices) === null || _chunk_choices === void 0 ? void 0 : (_chunk_choices_ = _chunk_choices[0]) === null || _chunk_choices_ === void 0 ? void 0 : _chunk_choices_.delta;
|
|
4794
|
+
if (delta === null || delta === void 0 ? void 0 : delta.content) {
|
|
4795
|
+
delta.content = sanitizeContent(delta.content);
|
|
4796
|
+
}
|
|
4797
|
+
}
|
|
4798
|
+
controller.enqueue("data: ".concat(JSON.stringify(chunk), "\n\n"));
|
|
4799
|
+
_state.label = 4;
|
|
4800
|
+
case 4:
|
|
4801
|
+
_iteratorAbruptCompletion = false;
|
|
4802
|
+
return [
|
|
4803
|
+
3,
|
|
4804
|
+
2
|
|
4805
|
+
];
|
|
4806
|
+
case 5:
|
|
4807
|
+
return [
|
|
4808
|
+
3,
|
|
4809
|
+
12
|
|
4810
|
+
];
|
|
4811
|
+
case 6:
|
|
4812
|
+
err = _state.sent();
|
|
4813
|
+
_didIteratorError = true;
|
|
4814
|
+
_iteratorError = err;
|
|
4815
|
+
return [
|
|
4816
|
+
3,
|
|
4817
|
+
12
|
|
4818
|
+
];
|
|
4819
|
+
case 7:
|
|
4820
|
+
_state.trys.push([
|
|
4821
|
+
7,
|
|
4822
|
+
,
|
|
4823
|
+
10,
|
|
4824
|
+
11
|
|
4825
|
+
]);
|
|
4826
|
+
if (!(_iteratorAbruptCompletion && _iterator.return != null)) return [
|
|
4827
|
+
3,
|
|
4828
|
+
9
|
|
4829
|
+
];
|
|
4830
|
+
return [
|
|
4831
|
+
4,
|
|
4832
|
+
_iterator.return()
|
|
4833
|
+
];
|
|
4834
|
+
case 8:
|
|
4835
|
+
_state.sent();
|
|
4836
|
+
_state.label = 9;
|
|
4837
|
+
case 9:
|
|
4838
|
+
return [
|
|
4839
|
+
3,
|
|
4840
|
+
11
|
|
4841
|
+
];
|
|
4842
|
+
case 10:
|
|
4843
|
+
if (_didIteratorError) {
|
|
4844
|
+
throw _iteratorError;
|
|
4845
|
+
}
|
|
4846
|
+
return [
|
|
4847
|
+
7
|
|
4848
|
+
];
|
|
4849
|
+
case 11:
|
|
4850
|
+
return [
|
|
4851
|
+
7
|
|
4852
|
+
];
|
|
4853
|
+
case 12:
|
|
4854
|
+
controller.close();
|
|
4855
|
+
return [
|
|
4856
|
+
2
|
|
4857
|
+
];
|
|
4858
|
+
}
|
|
4859
|
+
});
|
|
4860
|
+
})();
|
|
4861
|
+
}
|
|
4862
|
+
});
|
|
4863
|
+
return [
|
|
4864
|
+
2,
|
|
4865
|
+
new Response(stream2, {
|
|
4866
|
+
headers: {
|
|
4867
|
+
"Content-Type": "text/event-stream"
|
|
4868
|
+
}
|
|
4869
|
+
})
|
|
4870
|
+
];
|
|
4871
|
+
}
|
|
4872
|
+
displayWidth = computerUseConfig.displayWidth, displayHeight = computerUseConfig.displayHeight;
|
|
4873
|
+
stream = new ReadableStream({
|
|
4874
|
+
start: function start(controller) {
|
|
4875
|
+
return _async_to_generator(function() {
|
|
4876
|
+
var computerCallIndices, argumentBuffers, emittedIndices, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, _value, chunk, _chunk_choices, _choice_delta, choices, choice, passThrough, _iteratorNormalCompletion, _didIteratorError1, _iteratorError1, _iterator1, _step1, tc, _tc_function, _argumentBuffers_get, _ref, _tc_function1, buf, denormalized, modifiedChunk, err1, _iteratorNormalCompletion1, _didIteratorError2, _iteratorError2, _iterator2, _step2, _step_value, index, buf1, denormalized1, flushChunk;
|
|
4013
4877
|
return _ts_generator(this, function(_state) {
|
|
4014
4878
|
switch(_state.label){
|
|
4015
4879
|
case 0:
|
|
4880
|
+
computerCallIndices = /* @__PURE__ */ new Set();
|
|
4881
|
+
argumentBuffers = /* @__PURE__ */ new Map();
|
|
4882
|
+
emittedIndices = /* @__PURE__ */ new Set();
|
|
4016
4883
|
_iteratorAbruptCompletion = false, _didIteratorError = false;
|
|
4017
4884
|
_state.label = 1;
|
|
4018
4885
|
case 1:
|
|
@@ -4036,7 +4903,84 @@ var post9 = function(param) {
|
|
|
4036
4903
|
];
|
|
4037
4904
|
_value = _step.value;
|
|
4038
4905
|
chunk = _value;
|
|
4039
|
-
|
|
4906
|
+
choices = (_chunk_choices = chunk.choices) !== null && _chunk_choices !== void 0 ? _chunk_choices : [];
|
|
4907
|
+
choice = choices[0];
|
|
4908
|
+
if (!(choice === null || choice === void 0 ? void 0 : (_choice_delta = choice.delta) === null || _choice_delta === void 0 ? void 0 : _choice_delta.tool_calls)) {
|
|
4909
|
+
controller.enqueue("data: ".concat(JSON.stringify(chunk), "\n\n"));
|
|
4910
|
+
return [
|
|
4911
|
+
3,
|
|
4912
|
+
4
|
|
4913
|
+
];
|
|
4914
|
+
}
|
|
4915
|
+
passThrough = [];
|
|
4916
|
+
_iteratorNormalCompletion = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
4917
|
+
try {
|
|
4918
|
+
for(_iterator1 = choice.delta.tool_calls[Symbol.iterator](); !(_iteratorNormalCompletion = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion = true){
|
|
4919
|
+
tc = _step1.value;
|
|
4920
|
+
;
|
|
4921
|
+
if (((_tc_function = tc.function) === null || _tc_function === void 0 ? void 0 : _tc_function.name) === "computer_call") {
|
|
4922
|
+
computerCallIndices.add(tc.index);
|
|
4923
|
+
argumentBuffers.set(tc.index, "");
|
|
4924
|
+
passThrough.push(_object_spread_props(_object_spread({}, tc), {
|
|
4925
|
+
function: _object_spread_props(_object_spread({}, tc.function), {
|
|
4926
|
+
arguments: ""
|
|
4927
|
+
})
|
|
4928
|
+
}));
|
|
4929
|
+
continue;
|
|
4930
|
+
}
|
|
4931
|
+
if (computerCallIndices.has(tc.index)) {
|
|
4932
|
+
;
|
|
4933
|
+
;
|
|
4934
|
+
buf = ((_argumentBuffers_get = argumentBuffers.get(tc.index)) !== null && _argumentBuffers_get !== void 0 ? _argumentBuffers_get : "") + ((_ref = (_tc_function1 = tc.function) === null || _tc_function1 === void 0 ? void 0 : _tc_function1.arguments) !== null && _ref !== void 0 ? _ref : "");
|
|
4935
|
+
argumentBuffers.set(tc.index, buf);
|
|
4936
|
+
if (!emittedIndices.has(tc.index)) {
|
|
4937
|
+
try {
|
|
4938
|
+
JSON.parse(buf);
|
|
4939
|
+
denormalized = denormalizeComputerCallArguments({
|
|
4940
|
+
argumentsText: buf,
|
|
4941
|
+
displayWidth: displayWidth,
|
|
4942
|
+
displayHeight: displayHeight,
|
|
4943
|
+
model: model
|
|
4944
|
+
});
|
|
4945
|
+
passThrough.push({
|
|
4946
|
+
index: tc.index,
|
|
4947
|
+
function: {
|
|
4948
|
+
arguments: denormalized
|
|
4949
|
+
}
|
|
4950
|
+
});
|
|
4951
|
+
emittedIndices.add(tc.index);
|
|
4952
|
+
} catch (unused) {}
|
|
4953
|
+
}
|
|
4954
|
+
continue;
|
|
4955
|
+
}
|
|
4956
|
+
passThrough.push(tc);
|
|
4957
|
+
}
|
|
4958
|
+
} catch (err) {
|
|
4959
|
+
_didIteratorError1 = true;
|
|
4960
|
+
_iteratorError1 = err;
|
|
4961
|
+
} finally{
|
|
4962
|
+
try {
|
|
4963
|
+
if (!_iteratorNormalCompletion && _iterator1.return != null) {
|
|
4964
|
+
_iterator1.return();
|
|
4965
|
+
}
|
|
4966
|
+
} finally{
|
|
4967
|
+
if (_didIteratorError1) {
|
|
4968
|
+
throw _iteratorError1;
|
|
4969
|
+
}
|
|
4970
|
+
}
|
|
4971
|
+
}
|
|
4972
|
+
if (passThrough.length > 0) {
|
|
4973
|
+
modifiedChunk = _object_spread_props(_object_spread({}, chunk), {
|
|
4974
|
+
choices: [
|
|
4975
|
+
_object_spread_props(_object_spread({}, choice), {
|
|
4976
|
+
delta: _object_spread_props(_object_spread({}, choice.delta), {
|
|
4977
|
+
tool_calls: passThrough
|
|
4978
|
+
})
|
|
4979
|
+
})
|
|
4980
|
+
]
|
|
4981
|
+
});
|
|
4982
|
+
controller.enqueue("data: ".concat(JSON.stringify(modifiedChunk), "\n\n"));
|
|
4983
|
+
}
|
|
4040
4984
|
_state.label = 4;
|
|
4041
4985
|
case 4:
|
|
4042
4986
|
_iteratorAbruptCompletion = false;
|
|
@@ -4050,9 +4994,9 @@ var post9 = function(param) {
|
|
|
4050
4994
|
12
|
|
4051
4995
|
];
|
|
4052
4996
|
case 6:
|
|
4053
|
-
|
|
4997
|
+
err1 = _state.sent();
|
|
4054
4998
|
_didIteratorError = true;
|
|
4055
|
-
_iteratorError =
|
|
4999
|
+
_iteratorError = err1;
|
|
4056
5000
|
return [
|
|
4057
5001
|
3,
|
|
4058
5002
|
12
|
|
@@ -4092,6 +5036,52 @@ var post9 = function(param) {
|
|
|
4092
5036
|
7
|
|
4093
5037
|
];
|
|
4094
5038
|
case 12:
|
|
5039
|
+
_iteratorNormalCompletion1 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
|
|
5040
|
+
try {
|
|
5041
|
+
for(_iterator2 = Array.from(argumentBuffers)[Symbol.iterator](); !(_iteratorNormalCompletion1 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion1 = true){
|
|
5042
|
+
_step_value = _sliced_to_array(_step2.value, 2), index = _step_value[0], buf1 = _step_value[1];
|
|
5043
|
+
if (!emittedIndices.has(index) && buf1) {
|
|
5044
|
+
denormalized1 = denormalizeComputerCallArguments({
|
|
5045
|
+
argumentsText: buf1,
|
|
5046
|
+
displayWidth: displayWidth,
|
|
5047
|
+
displayHeight: displayHeight,
|
|
5048
|
+
model: model
|
|
5049
|
+
});
|
|
5050
|
+
flushChunk = {
|
|
5051
|
+
object: "chat.completion.chunk",
|
|
5052
|
+
choices: [
|
|
5053
|
+
{
|
|
5054
|
+
index: 0,
|
|
5055
|
+
delta: {
|
|
5056
|
+
tool_calls: [
|
|
5057
|
+
{
|
|
5058
|
+
index: index,
|
|
5059
|
+
function: {
|
|
5060
|
+
arguments: denormalized1
|
|
5061
|
+
}
|
|
5062
|
+
}
|
|
5063
|
+
]
|
|
5064
|
+
}
|
|
5065
|
+
}
|
|
5066
|
+
]
|
|
5067
|
+
};
|
|
5068
|
+
controller.enqueue("data: ".concat(JSON.stringify(flushChunk), "\n\n"));
|
|
5069
|
+
}
|
|
5070
|
+
}
|
|
5071
|
+
} catch (err) {
|
|
5072
|
+
_didIteratorError2 = true;
|
|
5073
|
+
_iteratorError2 = err;
|
|
5074
|
+
} finally{
|
|
5075
|
+
try {
|
|
5076
|
+
if (!_iteratorNormalCompletion1 && _iterator2.return != null) {
|
|
5077
|
+
_iterator2.return();
|
|
5078
|
+
}
|
|
5079
|
+
} finally{
|
|
5080
|
+
if (_didIteratorError2) {
|
|
5081
|
+
throw _iteratorError2;
|
|
5082
|
+
}
|
|
5083
|
+
}
|
|
5084
|
+
}
|
|
4095
5085
|
controller.close();
|
|
4096
5086
|
return [
|
|
4097
5087
|
2
|
|
@@ -4118,15 +5108,91 @@ var post9 = function(param) {
|
|
|
4118
5108
|
]);
|
|
4119
5109
|
return [
|
|
4120
5110
|
4,
|
|
4121
|
-
|
|
5111
|
+
openRouter.chat.completions.create(resultOptions)
|
|
4122
5112
|
];
|
|
4123
5113
|
case 3:
|
|
4124
5114
|
data = _state.sent();
|
|
5115
|
+
if (computerUseConfig) {
|
|
5116
|
+
;
|
|
5117
|
+
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
5118
|
+
try {
|
|
5119
|
+
for(_iterator = ((_data_choices = data.choices) !== null && _data_choices !== void 0 ? _data_choices : [])[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
5120
|
+
choice = _step.value;
|
|
5121
|
+
;
|
|
5122
|
+
;
|
|
5123
|
+
_iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
5124
|
+
try {
|
|
5125
|
+
for(_iterator1 = ((_ref = (_choice_message = choice.message) === null || _choice_message === void 0 ? void 0 : _choice_message.tool_calls) !== null && _ref !== void 0 ? _ref : [])[Symbol.iterator](); !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
5126
|
+
tc = _step1.value;
|
|
5127
|
+
fn = tc.function;
|
|
5128
|
+
if ((fn === null || fn === void 0 ? void 0 : fn.name) === "computer_call") {
|
|
5129
|
+
fn.arguments = denormalizeComputerCallArguments({
|
|
5130
|
+
argumentsText: fn.arguments,
|
|
5131
|
+
displayWidth: computerUseConfig.displayWidth,
|
|
5132
|
+
displayHeight: computerUseConfig.displayHeight,
|
|
5133
|
+
model: model
|
|
5134
|
+
});
|
|
5135
|
+
}
|
|
5136
|
+
}
|
|
5137
|
+
} catch (err) {
|
|
5138
|
+
_didIteratorError1 = true;
|
|
5139
|
+
_iteratorError1 = err;
|
|
5140
|
+
} finally{
|
|
5141
|
+
try {
|
|
5142
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
5143
|
+
_iterator1.return();
|
|
5144
|
+
}
|
|
5145
|
+
} finally{
|
|
5146
|
+
if (_didIteratorError1) {
|
|
5147
|
+
throw _iteratorError1;
|
|
5148
|
+
}
|
|
5149
|
+
}
|
|
5150
|
+
}
|
|
5151
|
+
}
|
|
5152
|
+
} catch (err) {
|
|
5153
|
+
_didIteratorError = true;
|
|
5154
|
+
_iteratorError = err;
|
|
5155
|
+
} finally{
|
|
5156
|
+
try {
|
|
5157
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
5158
|
+
_iterator.return();
|
|
5159
|
+
}
|
|
5160
|
+
} finally{
|
|
5161
|
+
if (_didIteratorError) {
|
|
5162
|
+
throw _iteratorError;
|
|
5163
|
+
}
|
|
5164
|
+
}
|
|
5165
|
+
}
|
|
5166
|
+
}
|
|
5167
|
+
if (getQuirks(model).cleanArtifacts) {
|
|
5168
|
+
;
|
|
5169
|
+
_iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
|
|
5170
|
+
try {
|
|
5171
|
+
for(_iterator2 = ((_data_choices1 = data.choices) !== null && _data_choices1 !== void 0 ? _data_choices1 : [])[Symbol.iterator](); !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
|
|
5172
|
+
choice1 = _step2.value;
|
|
5173
|
+
;
|
|
5174
|
+
if ((_choice_message1 = choice1.message) === null || _choice_message1 === void 0 ? void 0 : _choice_message1.content) {
|
|
5175
|
+
choice1.message.content = sanitizeContent(choice1.message.content);
|
|
5176
|
+
}
|
|
5177
|
+
}
|
|
5178
|
+
} catch (err) {
|
|
5179
|
+
_didIteratorError2 = true;
|
|
5180
|
+
_iteratorError2 = err;
|
|
5181
|
+
} finally{
|
|
5182
|
+
try {
|
|
5183
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
5184
|
+
_iterator2.return();
|
|
5185
|
+
}
|
|
5186
|
+
} finally{
|
|
5187
|
+
if (_didIteratorError2) {
|
|
5188
|
+
throw _iteratorError2;
|
|
5189
|
+
}
|
|
5190
|
+
}
|
|
5191
|
+
}
|
|
5192
|
+
}
|
|
4125
5193
|
return [
|
|
4126
5194
|
2,
|
|
4127
|
-
new Response(JSON.stringify({
|
|
4128
|
-
data: data
|
|
4129
|
-
}), {
|
|
5195
|
+
new Response(JSON.stringify(data), {
|
|
4130
5196
|
status: 200,
|
|
4131
5197
|
headers: {
|
|
4132
5198
|
"Content-Type": "application/json"
|
|
@@ -4155,26 +5221,26 @@ var post9 = function(param) {
|
|
|
4155
5221
|
})();
|
|
4156
5222
|
};
|
|
4157
5223
|
};
|
|
4158
|
-
// src/adapters/client/
|
|
4159
|
-
var
|
|
4160
|
-
var
|
|
5224
|
+
// src/adapters/client/openRouterClientAdapter/completions/index.ts
|
|
5225
|
+
var completions10 = function(param) {
|
|
5226
|
+
var openRouter = param.openRouter;
|
|
4161
5227
|
return {
|
|
4162
|
-
post:
|
|
4163
|
-
|
|
5228
|
+
post: post10({
|
|
5229
|
+
openRouter: openRouter
|
|
4164
5230
|
})
|
|
4165
5231
|
};
|
|
4166
5232
|
};
|
|
4167
|
-
// src/adapters/client/
|
|
4168
|
-
var
|
|
4169
|
-
var
|
|
5233
|
+
// src/adapters/client/openRouterClientAdapter/index.ts
|
|
5234
|
+
var openRouterClientAdapter = function(param) {
|
|
5235
|
+
var openRouter = param.openRouter;
|
|
4170
5236
|
return {
|
|
4171
|
-
client:
|
|
5237
|
+
client: openRouter,
|
|
4172
5238
|
requestHandlers: {
|
|
4173
|
-
"^/v1/models$":
|
|
4174
|
-
|
|
5239
|
+
"^/v1/models$": models13({
|
|
5240
|
+
openRouter: openRouter
|
|
4175
5241
|
}),
|
|
4176
|
-
"^/(?:v1|/?openai)/chat/completions$":
|
|
4177
|
-
|
|
5242
|
+
"^/(?:v1|/?openai)/chat/completions$": completions10({
|
|
5243
|
+
openRouter: openRouter
|
|
4178
5244
|
})
|
|
4179
5245
|
}
|
|
4180
5246
|
};
|
|
@@ -4821,7 +5887,7 @@ var serializeThread = function(param) {
|
|
|
4821
5887
|
};
|
|
4822
5888
|
};
|
|
4823
5889
|
// src/adapters/storage/prismaStorageAdapter/threads/post.ts
|
|
4824
|
-
var
|
|
5890
|
+
var post11 = function(param) {
|
|
4825
5891
|
var prisma = param.prisma;
|
|
4826
5892
|
return function(_urlString, options) {
|
|
4827
5893
|
return _async_to_generator(function() {
|
|
@@ -4897,7 +5963,7 @@ var post10 = function(param) {
|
|
|
4897
5963
|
var threads = function(param) {
|
|
4898
5964
|
var prisma = param.prisma;
|
|
4899
5965
|
return {
|
|
4900
|
-
post:
|
|
5966
|
+
post: post11({
|
|
4901
5967
|
prisma: prisma
|
|
4902
5968
|
})
|
|
4903
5969
|
};
|
|
@@ -4957,7 +6023,7 @@ var messageContentBlocks = function(param) {
|
|
|
4957
6023
|
}
|
|
4958
6024
|
];
|
|
4959
6025
|
};
|
|
4960
|
-
var
|
|
6026
|
+
var post12 = function(param) {
|
|
4961
6027
|
var prisma = param.prisma;
|
|
4962
6028
|
return function(urlString, options) {
|
|
4963
6029
|
return _async_to_generator(function() {
|
|
@@ -5005,7 +6071,7 @@ var post11 = function(param) {
|
|
|
5005
6071
|
};
|
|
5006
6072
|
// src/adapters/storage/prismaStorageAdapter/threads/messages/get.ts
|
|
5007
6073
|
var import_radash10 = require("radash");
|
|
5008
|
-
var
|
|
6074
|
+
var get12 = function(param) {
|
|
5009
6075
|
var prisma = param.prisma;
|
|
5010
6076
|
return function(urlString) {
|
|
5011
6077
|
return _async_to_generator(function() {
|
|
@@ -5066,10 +6132,10 @@ var get11 = function(param) {
|
|
|
5066
6132
|
var messages2 = function(param) {
|
|
5067
6133
|
var prisma = param.prisma;
|
|
5068
6134
|
return {
|
|
5069
|
-
post:
|
|
6135
|
+
post: post12({
|
|
5070
6136
|
prisma: prisma
|
|
5071
6137
|
}),
|
|
5072
|
-
get:
|
|
6138
|
+
get: get12({
|
|
5073
6139
|
prisma: prisma
|
|
5074
6140
|
})
|
|
5075
6141
|
};
|
|
@@ -5140,7 +6206,7 @@ var mapPrismaRun = function(run4) {
|
|
|
5140
6206
|
};
|
|
5141
6207
|
};
|
|
5142
6208
|
// src/adapters/storage/prismaStorageAdapter/threads/runs/get.ts
|
|
5143
|
-
var
|
|
6209
|
+
var get13 = function(param) {
|
|
5144
6210
|
var prisma = param.prisma;
|
|
5145
6211
|
return function(urlString) {
|
|
5146
6212
|
return _async_to_generator(function() {
|
|
@@ -5587,7 +6653,7 @@ var getMessages = function(param) {
|
|
|
5587
6653
|
};
|
|
5588
6654
|
};
|
|
5589
6655
|
// src/adapters/storage/prismaStorageAdapter/threads/runs/post.ts
|
|
5590
|
-
var
|
|
6656
|
+
var post13 = function(param) {
|
|
5591
6657
|
var prisma = param.prisma, runAdapter = param.runAdapter;
|
|
5592
6658
|
return function(urlString, options) {
|
|
5593
6659
|
return _async_to_generator(function() {
|
|
@@ -5761,17 +6827,17 @@ var post12 = function(param) {
|
|
|
5761
6827
|
var runs = function(param) {
|
|
5762
6828
|
var prisma = param.prisma, runAdapter = param.runAdapter;
|
|
5763
6829
|
return {
|
|
5764
|
-
get:
|
|
6830
|
+
get: get13({
|
|
5765
6831
|
prisma: prisma
|
|
5766
6832
|
}),
|
|
5767
|
-
post:
|
|
6833
|
+
post: post13({
|
|
5768
6834
|
prisma: prisma,
|
|
5769
6835
|
runAdapter: runAdapter
|
|
5770
6836
|
})
|
|
5771
6837
|
};
|
|
5772
6838
|
};
|
|
5773
6839
|
// src/adapters/storage/prismaStorageAdapter/threads/run/get.ts
|
|
5774
|
-
var
|
|
6840
|
+
var get14 = function(param) {
|
|
5775
6841
|
var prisma = param.prisma;
|
|
5776
6842
|
return function(urlString) {
|
|
5777
6843
|
return _async_to_generator(function() {
|
|
@@ -5826,14 +6892,14 @@ var get13 = function(param) {
|
|
|
5826
6892
|
var run = function(param) {
|
|
5827
6893
|
var prisma = param.prisma, runAdapter = param.runAdapter;
|
|
5828
6894
|
return {
|
|
5829
|
-
get:
|
|
6895
|
+
get: get14({
|
|
5830
6896
|
prisma: prisma
|
|
5831
6897
|
})
|
|
5832
6898
|
};
|
|
5833
6899
|
};
|
|
5834
6900
|
// src/adapters/storage/prismaStorageAdapter/threads/runs/steps/get.ts
|
|
5835
6901
|
var import_radash13 = require("radash");
|
|
5836
|
-
var
|
|
6902
|
+
var get15 = function(param) {
|
|
5837
6903
|
var prisma = param.prisma;
|
|
5838
6904
|
return function(urlString) {
|
|
5839
6905
|
return _async_to_generator(function() {
|
|
@@ -5895,7 +6961,7 @@ var get14 = function(param) {
|
|
|
5895
6961
|
var steps = function(param) {
|
|
5896
6962
|
var prisma = param.prisma;
|
|
5897
6963
|
return {
|
|
5898
|
-
get:
|
|
6964
|
+
get: get15({
|
|
5899
6965
|
prisma: prisma
|
|
5900
6966
|
})
|
|
5901
6967
|
};
|
|
@@ -6063,7 +7129,7 @@ var updateRun = function(param) {
|
|
|
6063
7129
|
})();
|
|
6064
7130
|
};
|
|
6065
7131
|
// src/adapters/storage/prismaStorageAdapter/threads/runs/submitToolOutputs/post/index.ts
|
|
6066
|
-
var
|
|
7132
|
+
var post14 = function(param) {
|
|
6067
7133
|
var prisma = param.prisma, runAdapter = param.runAdapter;
|
|
6068
7134
|
return function(urlString, options) {
|
|
6069
7135
|
return _async_to_generator(function() {
|
|
@@ -6231,7 +7297,7 @@ var post13 = function(param) {
|
|
|
6231
7297
|
var submitToolOutputs = function(param) {
|
|
6232
7298
|
var prisma = param.prisma, runAdapter = param.runAdapter;
|
|
6233
7299
|
return {
|
|
6234
|
-
post:
|
|
7300
|
+
post: post14({
|
|
6235
7301
|
prisma: prisma,
|
|
6236
7302
|
// @ts-ignore-next-line
|
|
6237
7303
|
runAdapter: runAdapter
|
|
@@ -6240,7 +7306,7 @@ var submitToolOutputs = function(param) {
|
|
|
6240
7306
|
};
|
|
6241
7307
|
// src/adapters/storage/prismaStorageAdapter/assistants/post.ts
|
|
6242
7308
|
var import_dayjs9 = __toESM(require("dayjs"), 1);
|
|
6243
|
-
var
|
|
7309
|
+
var post15 = function(param) {
|
|
6244
7310
|
var prisma = param.prisma;
|
|
6245
7311
|
return function(_url, options) {
|
|
6246
7312
|
return _async_to_generator(function() {
|
|
@@ -6293,7 +7359,7 @@ var post14 = function(param) {
|
|
|
6293
7359
|
var assistants = function(param) {
|
|
6294
7360
|
var prisma = param.prisma;
|
|
6295
7361
|
return {
|
|
6296
|
-
post:
|
|
7362
|
+
post: post15({
|
|
6297
7363
|
prisma: prisma
|
|
6298
7364
|
})
|
|
6299
7365
|
};
|
|
@@ -6342,7 +7408,7 @@ var serializeThread2 = function(param) {
|
|
|
6342
7408
|
};
|
|
6343
7409
|
};
|
|
6344
7410
|
// src/adapters/storage/responsesStorageAdapter/threads/post.ts
|
|
6345
|
-
var
|
|
7411
|
+
var post16 = function(param) {
|
|
6346
7412
|
var client = param.client, _param_addAnnotations = param.addAnnotations, addAnnotations = _param_addAnnotations === void 0 ? false : _param_addAnnotations;
|
|
6347
7413
|
return function(_urlString, options) {
|
|
6348
7414
|
return _async_to_generator(function() {
|
|
@@ -6463,7 +7529,7 @@ var post15 = function(param) {
|
|
|
6463
7529
|
var threads2 = function(param) {
|
|
6464
7530
|
var client = param.client, _param_addAnnotations = param.addAnnotations, addAnnotations = _param_addAnnotations === void 0 ? false : _param_addAnnotations;
|
|
6465
7531
|
return {
|
|
6466
|
-
post:
|
|
7532
|
+
post: post16({
|
|
6467
7533
|
client: client,
|
|
6468
7534
|
addAnnotations: addAnnotations
|
|
6469
7535
|
})
|
|
@@ -6641,7 +7707,7 @@ var messageContentBlocks2 = function(param) {
|
|
|
6641
7707
|
attachments: attachments
|
|
6642
7708
|
})));
|
|
6643
7709
|
};
|
|
6644
|
-
var
|
|
7710
|
+
var post17 = function(param) {
|
|
6645
7711
|
var runAdapter = param.runAdapter, createResponseItems = param.createResponseItems, _param_addAnnotations = param.addAnnotations, addAnnotations = _param_addAnnotations === void 0 ? false : _param_addAnnotations;
|
|
6646
7712
|
return function(urlString, options) {
|
|
6647
7713
|
return _async_to_generator(function() {
|
|
@@ -6734,7 +7800,7 @@ function responseId(param) {
|
|
|
6734
7800
|
return null;
|
|
6735
7801
|
}
|
|
6736
7802
|
// src/adapters/storage/responsesStorageAdapter/threads/messages/get.ts
|
|
6737
|
-
var
|
|
7803
|
+
var get16 = function(param) {
|
|
6738
7804
|
var client = param.client, runAdapter = param.runAdapter;
|
|
6739
7805
|
return function(urlString) {
|
|
6740
7806
|
return _async_to_generator(function() {
|
|
@@ -6946,19 +8012,19 @@ var assignTimestamps = function(param) {
|
|
|
6946
8012
|
var messages3 = function(param) {
|
|
6947
8013
|
var client = param.client, runAdapter = param.runAdapter, createResponseItems = param.createResponseItems, _param_addAnnotations = param.addAnnotations, addAnnotations = _param_addAnnotations === void 0 ? false : _param_addAnnotations;
|
|
6948
8014
|
return {
|
|
6949
|
-
post:
|
|
8015
|
+
post: post17({
|
|
6950
8016
|
runAdapter: runAdapter,
|
|
6951
8017
|
createResponseItems: createResponseItems,
|
|
6952
8018
|
addAnnotations: addAnnotations
|
|
6953
8019
|
}),
|
|
6954
|
-
get:
|
|
8020
|
+
get: get16({
|
|
6955
8021
|
client: client,
|
|
6956
8022
|
runAdapter: runAdapter
|
|
6957
8023
|
})
|
|
6958
8024
|
};
|
|
6959
8025
|
};
|
|
6960
8026
|
// src/adapters/storage/responsesStorageAdapter/threads/runs/get.ts
|
|
6961
|
-
var
|
|
8027
|
+
var get17 = function() {
|
|
6962
8028
|
return function(urlString) {
|
|
6963
8029
|
return _async_to_generator(function() {
|
|
6964
8030
|
return _ts_generator(this, function(_state) {
|
|
@@ -7459,7 +8525,7 @@ var defaultAssistant = {
|
|
|
7459
8525
|
}
|
|
7460
8526
|
};
|
|
7461
8527
|
// src/adapters/storage/responsesStorageAdapter/threads/runs/post.ts
|
|
7462
|
-
var
|
|
8528
|
+
var post18 = function(param) {
|
|
7463
8529
|
var client = param.client, runAdapter = param.runAdapter, createResponseItems = param.createResponseItems;
|
|
7464
8530
|
return function(urlString, options) {
|
|
7465
8531
|
return _async_to_generator(function() {
|
|
@@ -7638,8 +8704,8 @@ var post17 = function(param) {
|
|
|
7638
8704
|
var runs2 = function(param) {
|
|
7639
8705
|
var client = param.client, runAdapter = param.runAdapter, createResponseItems = param.createResponseItems;
|
|
7640
8706
|
return {
|
|
7641
|
-
get:
|
|
7642
|
-
post:
|
|
8707
|
+
get: get17(),
|
|
8708
|
+
post: post18({
|
|
7643
8709
|
client: client,
|
|
7644
8710
|
createResponseItems: createResponseItems,
|
|
7645
8711
|
runAdapter: runAdapter
|
|
@@ -7647,7 +8713,7 @@ var runs2 = function(param) {
|
|
|
7647
8713
|
};
|
|
7648
8714
|
};
|
|
7649
8715
|
// src/adapters/storage/responsesStorageAdapter/threads/run/get.ts
|
|
7650
|
-
var
|
|
8716
|
+
var get18 = function(param) {
|
|
7651
8717
|
var client = param.client, runAdapter = param.runAdapter;
|
|
7652
8718
|
return function(urlString) {
|
|
7653
8719
|
return _async_to_generator(function() {
|
|
@@ -7697,7 +8763,7 @@ var get17 = function(param) {
|
|
|
7697
8763
|
var run2 = function(param) {
|
|
7698
8764
|
var client = param.client, runAdapter = param.runAdapter;
|
|
7699
8765
|
return {
|
|
7700
|
-
get:
|
|
8766
|
+
get: get18({
|
|
7701
8767
|
client: client,
|
|
7702
8768
|
runAdapter: runAdapter
|
|
7703
8769
|
})
|
|
@@ -8218,7 +9284,7 @@ var serializeItemAsReasoningRunStep = function(param) {
|
|
|
8218
9284
|
};
|
|
8219
9285
|
};
|
|
8220
9286
|
// src/adapters/storage/responsesStorageAdapter/threads/runs/steps/get.ts
|
|
8221
|
-
var
|
|
9287
|
+
var get19 = function(param) {
|
|
8222
9288
|
var client = param.client, runAdapter = param.runAdapter;
|
|
8223
9289
|
return function(urlString) {
|
|
8224
9290
|
return _async_to_generator(function() {
|
|
@@ -8387,7 +9453,7 @@ var get18 = function(param) {
|
|
|
8387
9453
|
var steps2 = function(param) {
|
|
8388
9454
|
var client = param.client, runAdapter = param.runAdapter;
|
|
8389
9455
|
return {
|
|
8390
|
-
get:
|
|
9456
|
+
get: get19({
|
|
8391
9457
|
client: client,
|
|
8392
9458
|
runAdapter: runAdapter
|
|
8393
9459
|
})
|
|
@@ -8469,7 +9535,7 @@ var truncation2 = function(param) {
|
|
|
8469
9535
|
return "auto";
|
|
8470
9536
|
};
|
|
8471
9537
|
// src/adapters/storage/responsesStorageAdapter/threads/runs/submitToolOutputs/post/index.ts
|
|
8472
|
-
var
|
|
9538
|
+
var post19 = function(param) {
|
|
8473
9539
|
var client = param.client, runAdapter = param.runAdapter;
|
|
8474
9540
|
return function(urlString, options) {
|
|
8475
9541
|
return _async_to_generator(function() {
|
|
@@ -8606,14 +9672,14 @@ var post18 = function(param) {
|
|
|
8606
9672
|
var submitToolOutputs2 = function(param) {
|
|
8607
9673
|
var client = param.client, runAdapter = param.runAdapter;
|
|
8608
9674
|
return {
|
|
8609
|
-
post:
|
|
9675
|
+
post: post19({
|
|
8610
9676
|
client: client,
|
|
8611
9677
|
runAdapter: runAdapter
|
|
8612
9678
|
})
|
|
8613
9679
|
};
|
|
8614
9680
|
};
|
|
8615
9681
|
// src/adapters/storage/responsesStorageAdapter/assistants/get.ts
|
|
8616
|
-
var
|
|
9682
|
+
var get20 = function(param) {
|
|
8617
9683
|
var runAdapter = param.runAdapter;
|
|
8618
9684
|
return function(_urlString) {
|
|
8619
9685
|
return _async_to_generator(function() {
|
|
@@ -8662,7 +9728,7 @@ var get19 = function(param) {
|
|
|
8662
9728
|
};
|
|
8663
9729
|
};
|
|
8664
9730
|
// src/adapters/storage/responsesStorageAdapter/assistants/post.ts
|
|
8665
|
-
var
|
|
9731
|
+
var post20 = function() {
|
|
8666
9732
|
return function() {
|
|
8667
9733
|
return _async_to_generator(function() {
|
|
8668
9734
|
return _ts_generator(this, function(_state) {
|
|
@@ -8688,10 +9754,10 @@ var post19 = function() {
|
|
|
8688
9754
|
var assistants2 = function(param) {
|
|
8689
9755
|
var runAdapter = param.runAdapter;
|
|
8690
9756
|
return {
|
|
8691
|
-
get:
|
|
9757
|
+
get: get20({
|
|
8692
9758
|
runAdapter: runAdapter
|
|
8693
9759
|
}),
|
|
8694
|
-
post:
|
|
9760
|
+
post: post20()
|
|
8695
9761
|
};
|
|
8696
9762
|
};
|
|
8697
9763
|
// src/adapters/storage/responsesStorageAdapter/index.ts
|
|
@@ -8735,7 +9801,7 @@ var responseRegexp = "^/(?:v1|/?openai)/responses/([^/]+)$";
|
|
|
8735
9801
|
var import_radash23 = require("radash");
|
|
8736
9802
|
var import_dayjs21 = __toESM(require("dayjs"), 1);
|
|
8737
9803
|
var import_radash24 = require("radash");
|
|
8738
|
-
var
|
|
9804
|
+
var post21 = function(param) {
|
|
8739
9805
|
var client = param.client, runAdapter = param.runAdapter, createResponseItems = param.createResponseItems;
|
|
8740
9806
|
return function(urlString, options) {
|
|
8741
9807
|
return _async_to_generator(function() {
|
|
@@ -8926,8 +9992,8 @@ var post20 = function(param) {
|
|
|
8926
9992
|
var runs3 = function(param) {
|
|
8927
9993
|
var client = param.client, runAdapter = param.runAdapter, createResponseItems = param.createResponseItems;
|
|
8928
9994
|
return {
|
|
8929
|
-
get:
|
|
8930
|
-
post:
|
|
9995
|
+
get: get17(),
|
|
9996
|
+
post: post21({
|
|
8931
9997
|
client: client,
|
|
8932
9998
|
createResponseItems: createResponseItems,
|
|
8933
9999
|
runAdapter: runAdapter
|
|
@@ -8935,7 +10001,7 @@ var runs3 = function(param) {
|
|
|
8935
10001
|
};
|
|
8936
10002
|
};
|
|
8937
10003
|
// src/adapters/storage/azureResponsesStorageAdapter/threads/runs/submitToolOutputs/post/index.ts
|
|
8938
|
-
var
|
|
10004
|
+
var post22 = function(param) {
|
|
8939
10005
|
var client = param.client, runAdapter = param.runAdapter;
|
|
8940
10006
|
return function(urlString, options) {
|
|
8941
10007
|
return _async_to_generator(function() {
|
|
@@ -9081,14 +10147,14 @@ var post21 = function(param) {
|
|
|
9081
10147
|
var submitToolOutputs3 = function(param) {
|
|
9082
10148
|
var client = param.client, runAdapter = param.runAdapter;
|
|
9083
10149
|
return {
|
|
9084
|
-
post:
|
|
10150
|
+
post: post22({
|
|
9085
10151
|
client: client,
|
|
9086
10152
|
runAdapter: runAdapter
|
|
9087
10153
|
})
|
|
9088
10154
|
};
|
|
9089
10155
|
};
|
|
9090
10156
|
// src/adapters/storage/azureResponsesStorageAdapter/responses/get.ts
|
|
9091
|
-
var
|
|
10157
|
+
var get21 = function(param) {
|
|
9092
10158
|
var client = param.client;
|
|
9093
10159
|
return function(urlString) {
|
|
9094
10160
|
return _async_to_generator(function() {
|
|
@@ -9122,7 +10188,7 @@ var get20 = function(param) {
|
|
|
9122
10188
|
var responses = function(param) {
|
|
9123
10189
|
var client = param.client;
|
|
9124
10190
|
return {
|
|
9125
|
-
get:
|
|
10191
|
+
get: get21({
|
|
9126
10192
|
client: client
|
|
9127
10193
|
})
|
|
9128
10194
|
};
|
|
@@ -9333,7 +10399,7 @@ var azureResponsesStorageAdapter = function() {
|
|
|
9333
10399
|
};
|
|
9334
10400
|
// src/adapters/storage/azureAgentsStorageAdapter/threads/post.ts
|
|
9335
10401
|
var import_dayjs22 = __toESM(require("dayjs"), 1);
|
|
9336
|
-
var
|
|
10402
|
+
var post23 = function(param) {
|
|
9337
10403
|
var azureAiProject = param.azureAiProject;
|
|
9338
10404
|
return function(_urlString, options) {
|
|
9339
10405
|
return _async_to_generator(function() {
|
|
@@ -9379,14 +10445,14 @@ var post22 = function(param) {
|
|
|
9379
10445
|
var threads3 = function(param) {
|
|
9380
10446
|
var azureAiProject = param.azureAiProject;
|
|
9381
10447
|
return {
|
|
9382
|
-
post:
|
|
10448
|
+
post: post23({
|
|
9383
10449
|
azureAiProject: azureAiProject
|
|
9384
10450
|
})
|
|
9385
10451
|
};
|
|
9386
10452
|
};
|
|
9387
10453
|
// src/adapters/storage/azureAgentsStorageAdapter/threads/messages/post.ts
|
|
9388
10454
|
var import_dayjs23 = __toESM(require("dayjs"), 1);
|
|
9389
|
-
var
|
|
10455
|
+
var post24 = function(param) {
|
|
9390
10456
|
var azureAiProject = param.azureAiProject, runAdapter = param.runAdapter;
|
|
9391
10457
|
return function(urlString, options) {
|
|
9392
10458
|
return _async_to_generator(function() {
|
|
@@ -9500,7 +10566,7 @@ var post23 = function(param) {
|
|
|
9500
10566
|
};
|
|
9501
10567
|
// src/adapters/storage/azureAgentsStorageAdapter/threads/messages/get.ts
|
|
9502
10568
|
var import_dayjs24 = __toESM(require("dayjs"), 1);
|
|
9503
|
-
var
|
|
10569
|
+
var get22 = function(param) {
|
|
9504
10570
|
var azureAiProject = param.azureAiProject, runAdapter = param.runAdapter;
|
|
9505
10571
|
return function(urlString) {
|
|
9506
10572
|
return _async_to_generator(function() {
|
|
@@ -9688,18 +10754,18 @@ var get21 = function(param) {
|
|
|
9688
10754
|
var messages4 = function(param) {
|
|
9689
10755
|
var azureAiProject = param.azureAiProject, runAdapter = param.runAdapter;
|
|
9690
10756
|
return {
|
|
9691
|
-
post:
|
|
10757
|
+
post: post24({
|
|
9692
10758
|
azureAiProject: azureAiProject,
|
|
9693
10759
|
runAdapter: runAdapter
|
|
9694
10760
|
}),
|
|
9695
|
-
get:
|
|
10761
|
+
get: get22({
|
|
9696
10762
|
azureAiProject: azureAiProject,
|
|
9697
10763
|
runAdapter: runAdapter
|
|
9698
10764
|
})
|
|
9699
10765
|
};
|
|
9700
10766
|
};
|
|
9701
10767
|
// src/adapters/storage/azureAgentsStorageAdapter/threads/runs/get.ts
|
|
9702
|
-
var
|
|
10768
|
+
var get23 = function() {
|
|
9703
10769
|
return function() {
|
|
9704
10770
|
return _async_to_generator(function() {
|
|
9705
10771
|
var response;
|
|
@@ -9726,7 +10792,7 @@ var get22 = function() {
|
|
|
9726
10792
|
// src/adapters/storage/azureAgentsStorageAdapter/threads/runs/post.ts
|
|
9727
10793
|
var import_radash25 = require("radash");
|
|
9728
10794
|
var import_dayjs25 = __toESM(require("dayjs"), 1);
|
|
9729
|
-
var
|
|
10795
|
+
var post25 = function(param) {
|
|
9730
10796
|
var azureAiProject = param.azureAiProject, runAdapter = param.runAdapter;
|
|
9731
10797
|
return function(urlString, options) {
|
|
9732
10798
|
return _async_to_generator(function() {
|
|
@@ -9995,8 +11061,8 @@ var post24 = function(param) {
|
|
|
9995
11061
|
var runs4 = function(param) {
|
|
9996
11062
|
var azureAiProject = param.azureAiProject, runAdapter = param.runAdapter;
|
|
9997
11063
|
return {
|
|
9998
|
-
get:
|
|
9999
|
-
post:
|
|
11064
|
+
get: get23(),
|
|
11065
|
+
post: post25({
|
|
10000
11066
|
azureAiProject: azureAiProject,
|
|
10001
11067
|
runAdapter: runAdapter
|
|
10002
11068
|
})
|
|
@@ -10004,7 +11070,7 @@ var runs4 = function(param) {
|
|
|
10004
11070
|
};
|
|
10005
11071
|
// src/adapters/storage/azureAgentsStorageAdapter/threads/run/get.ts
|
|
10006
11072
|
var import_dayjs26 = __toESM(require("dayjs"), 1);
|
|
10007
|
-
var
|
|
11073
|
+
var get24 = function(param) {
|
|
10008
11074
|
var azureAiProject = param.azureAiProject, runAdapter = param.runAdapter;
|
|
10009
11075
|
return function(urlString) {
|
|
10010
11076
|
return _async_to_generator(function() {
|
|
@@ -10088,7 +11154,7 @@ var get23 = function(param) {
|
|
|
10088
11154
|
var run3 = function(param) {
|
|
10089
11155
|
var azureAiProject = param.azureAiProject, runAdapter = param.runAdapter;
|
|
10090
11156
|
return {
|
|
10091
|
-
get:
|
|
11157
|
+
get: get24({
|
|
10092
11158
|
azureAiProject: azureAiProject,
|
|
10093
11159
|
runAdapter: runAdapter
|
|
10094
11160
|
})
|
|
@@ -10096,7 +11162,7 @@ var run3 = function(param) {
|
|
|
10096
11162
|
};
|
|
10097
11163
|
// src/adapters/storage/azureAgentsStorageAdapter/threads/runs/steps/get.ts
|
|
10098
11164
|
var import_dayjs27 = __toESM(require("dayjs"), 1);
|
|
10099
|
-
var
|
|
11165
|
+
var get25 = function(param) {
|
|
10100
11166
|
var azureAiProject = param.azureAiProject, runAdapter = param.runAdapter, prisma = param.prisma;
|
|
10101
11167
|
return function(urlString) {
|
|
10102
11168
|
return _async_to_generator(function() {
|
|
@@ -10307,7 +11373,7 @@ var get24 = function(param) {
|
|
|
10307
11373
|
var steps3 = function(param) {
|
|
10308
11374
|
var azureAiProject = param.azureAiProject, runAdapter = param.runAdapter, prisma = param.prisma;
|
|
10309
11375
|
return {
|
|
10310
|
-
get:
|
|
11376
|
+
get: get25({
|
|
10311
11377
|
azureAiProject: azureAiProject,
|
|
10312
11378
|
runAdapter: runAdapter,
|
|
10313
11379
|
prisma: prisma
|
|
@@ -10635,7 +11701,7 @@ function convertAzureEventToOpenAI(azureEvent, assistantId, outputsMap) {
|
|
|
10635
11701
|
}
|
|
10636
11702
|
return null;
|
|
10637
11703
|
}
|
|
10638
|
-
var
|
|
11704
|
+
var post26 = function(param) {
|
|
10639
11705
|
var azureAiProject = param.azureAiProject, runAdapter = param.runAdapter, prisma = param.prisma;
|
|
10640
11706
|
return function(urlString, options) {
|
|
10641
11707
|
return _async_to_generator(function() {
|
|
@@ -10948,7 +12014,7 @@ var post25 = function(param) {
|
|
|
10948
12014
|
var submitToolOutputs4 = function(param) {
|
|
10949
12015
|
var azureAiProject = param.azureAiProject, runAdapter = param.runAdapter, prisma = param.prisma;
|
|
10950
12016
|
return {
|
|
10951
|
-
post:
|
|
12017
|
+
post: post26({
|
|
10952
12018
|
azureAiProject: azureAiProject,
|
|
10953
12019
|
runAdapter: runAdapter,
|
|
10954
12020
|
prisma: prisma
|
|
@@ -10956,7 +12022,7 @@ var submitToolOutputs4 = function(param) {
|
|
|
10956
12022
|
};
|
|
10957
12023
|
};
|
|
10958
12024
|
// src/adapters/storage/azureAgentsStorageAdapter/assistants/post.ts
|
|
10959
|
-
var
|
|
12025
|
+
var post27 = function(param) {
|
|
10960
12026
|
var runAdapter = param.runAdapter;
|
|
10961
12027
|
return function(_urlString, options) {
|
|
10962
12028
|
return _async_to_generator(function() {
|
|
@@ -10998,7 +12064,7 @@ var post26 = function(param) {
|
|
|
10998
12064
|
var assistants3 = function(param) {
|
|
10999
12065
|
var runAdapter = param.runAdapter;
|
|
11000
12066
|
return {
|
|
11001
|
-
post:
|
|
12067
|
+
post: post27({
|
|
11002
12068
|
runAdapter: runAdapter
|
|
11003
12069
|
})
|
|
11004
12070
|
};
|
|
@@ -13929,6 +14995,7 @@ var azureAgentsRunAdapter = function(param) {
|
|
|
13929
14995
|
humirisClientAdapter: humirisClientAdapter,
|
|
13930
14996
|
mistralClientAdapter: mistralClientAdapter,
|
|
13931
14997
|
ollamaClientAdapter: ollamaClientAdapter,
|
|
14998
|
+
openRouterClientAdapter: openRouterClientAdapter,
|
|
13932
14999
|
openaiClientAdapter: openaiClientAdapter,
|
|
13933
15000
|
perplexityClientAdapter: perplexityClientAdapter,
|
|
13934
15001
|
prismaStorageAdapter: prismaStorageAdapter,
|