@corenel/sidecar 0.8.5 → 0.8.6
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/cli.js +156 -114
- package/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -21221,7 +21221,7 @@ var require_lib3 = __commonJS({
|
|
|
21221
21221
|
}
|
|
21222
21222
|
var INTERNALS$1 = Symbol("Response internals");
|
|
21223
21223
|
var STATUS_CODES = http.STATUS_CODES;
|
|
21224
|
-
var
|
|
21224
|
+
var Response4 = class _Response {
|
|
21225
21225
|
constructor() {
|
|
21226
21226
|
let body2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
21227
21227
|
let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -21279,8 +21279,8 @@ var require_lib3 = __commonJS({
|
|
|
21279
21279
|
});
|
|
21280
21280
|
}
|
|
21281
21281
|
};
|
|
21282
|
-
Body.mixIn(
|
|
21283
|
-
Object.defineProperties(
|
|
21282
|
+
Body.mixIn(Response4.prototype);
|
|
21283
|
+
Object.defineProperties(Response4.prototype, {
|
|
21284
21284
|
url: { enumerable: true },
|
|
21285
21285
|
status: { enumerable: true },
|
|
21286
21286
|
ok: { enumerable: true },
|
|
@@ -21289,7 +21289,7 @@ var require_lib3 = __commonJS({
|
|
|
21289
21289
|
headers: { enumerable: true },
|
|
21290
21290
|
clone: { enumerable: true }
|
|
21291
21291
|
});
|
|
21292
|
-
Object.defineProperty(
|
|
21292
|
+
Object.defineProperty(Response4.prototype, Symbol.toStringTag, {
|
|
21293
21293
|
value: "Response",
|
|
21294
21294
|
writable: false,
|
|
21295
21295
|
enumerable: false,
|
|
@@ -21623,7 +21623,7 @@ var require_lib3 = __commonJS({
|
|
|
21623
21623
|
};
|
|
21624
21624
|
const codings = headers.get("Content-Encoding");
|
|
21625
21625
|
if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
|
|
21626
|
-
response = new
|
|
21626
|
+
response = new Response4(body2, response_options);
|
|
21627
21627
|
resolve14(response);
|
|
21628
21628
|
return;
|
|
21629
21629
|
}
|
|
@@ -21633,7 +21633,7 @@ var require_lib3 = __commonJS({
|
|
|
21633
21633
|
};
|
|
21634
21634
|
if (codings == "gzip" || codings == "x-gzip") {
|
|
21635
21635
|
body2 = body2.pipe(zlib.createGunzip(zlibOptions));
|
|
21636
|
-
response = new
|
|
21636
|
+
response = new Response4(body2, response_options);
|
|
21637
21637
|
resolve14(response);
|
|
21638
21638
|
return;
|
|
21639
21639
|
}
|
|
@@ -21645,12 +21645,12 @@ var require_lib3 = __commonJS({
|
|
|
21645
21645
|
} else {
|
|
21646
21646
|
body2 = body2.pipe(zlib.createInflateRaw());
|
|
21647
21647
|
}
|
|
21648
|
-
response = new
|
|
21648
|
+
response = new Response4(body2, response_options);
|
|
21649
21649
|
resolve14(response);
|
|
21650
21650
|
});
|
|
21651
21651
|
raw.on("end", function() {
|
|
21652
21652
|
if (!response) {
|
|
21653
|
-
response = new
|
|
21653
|
+
response = new Response4(body2, response_options);
|
|
21654
21654
|
resolve14(response);
|
|
21655
21655
|
}
|
|
21656
21656
|
});
|
|
@@ -21658,11 +21658,11 @@ var require_lib3 = __commonJS({
|
|
|
21658
21658
|
}
|
|
21659
21659
|
if (codings == "br" && typeof zlib.createBrotliDecompress === "function") {
|
|
21660
21660
|
body2 = body2.pipe(zlib.createBrotliDecompress());
|
|
21661
|
-
response = new
|
|
21661
|
+
response = new Response4(body2, response_options);
|
|
21662
21662
|
resolve14(response);
|
|
21663
21663
|
return;
|
|
21664
21664
|
}
|
|
21665
|
-
response = new
|
|
21665
|
+
response = new Response4(body2, response_options);
|
|
21666
21666
|
resolve14(response);
|
|
21667
21667
|
});
|
|
21668
21668
|
writeToStream(req, request);
|
|
@@ -21704,7 +21704,7 @@ var require_lib3 = __commonJS({
|
|
|
21704
21704
|
exports.default = exports;
|
|
21705
21705
|
exports.Headers = Headers4;
|
|
21706
21706
|
exports.Request = Request3;
|
|
21707
|
-
exports.Response =
|
|
21707
|
+
exports.Response = Response4;
|
|
21708
21708
|
exports.FetchError = FetchError;
|
|
21709
21709
|
exports.AbortError = AbortError;
|
|
21710
21710
|
}
|
|
@@ -28250,6 +28250,36 @@ function nodeFsTools(roots) {
|
|
|
28250
28250
|
return (await fs7.readFile(abs)).toString("base64");
|
|
28251
28251
|
}
|
|
28252
28252
|
},
|
|
28253
|
+
{
|
|
28254
|
+
name: "sidecar_fs_write_bytes",
|
|
28255
|
+
// NOT roomSafe, unlike its read sibling: this is a write, and write-class
|
|
28256
|
+
// fs tools are already excluded from room contexts (sidecar_fs_write_file
|
|
28257
|
+
// has no roomSafe either).
|
|
28258
|
+
means: "create or overwrite a binary file on this machine",
|
|
28259
|
+
description: "Write a binary file on the sidecar machine from base64, relative to a pre-approved root. Use this for bytes (images, PDFs, Office files) that the UTF-8 text write would corrupt.",
|
|
28260
|
+
parameters: {
|
|
28261
|
+
type: "object",
|
|
28262
|
+
properties: {
|
|
28263
|
+
path: { type: "string", description: "path relative to the chosen root" },
|
|
28264
|
+
content: { type: "string", description: "the file contents, base64-encoded" },
|
|
28265
|
+
root: ROOT_PARAM
|
|
28266
|
+
},
|
|
28267
|
+
required: ["path", "content"]
|
|
28268
|
+
},
|
|
28269
|
+
namespace: "sidecar",
|
|
28270
|
+
mutates: true,
|
|
28271
|
+
async run(args) {
|
|
28272
|
+
const abs = confine(roots, args.root, String(args.path ?? ""));
|
|
28273
|
+
const bytes = Buffer.from(String(args.content ?? ""), "base64");
|
|
28274
|
+
if (bytes.byteLength > MAX_READ_BYTES) {
|
|
28275
|
+
throw new Error(`file too large to write (${bytes.byteLength} bytes; max ${MAX_READ_BYTES})`);
|
|
28276
|
+
}
|
|
28277
|
+
await fs7.mkdir(dirname3(abs), { recursive: true });
|
|
28278
|
+
await assertRealWithinRoot(roots, abs);
|
|
28279
|
+
await fs7.writeFile(abs, bytes);
|
|
28280
|
+
return `wrote ${args.path} (${bytes.byteLength} bytes)`;
|
|
28281
|
+
}
|
|
28282
|
+
},
|
|
28253
28283
|
{
|
|
28254
28284
|
name: "sidecar_fs_list_dir",
|
|
28255
28285
|
roomSafe: true,
|
|
@@ -29148,6 +29178,7 @@ var READ_ONLY_POLICY = {
|
|
|
29148
29178
|
// future fs mutator with the explicit deny (reads address fs:sidecar_fs_read_file,
|
|
29149
29179
|
// but mutating fs tools are caught here AND by mutatingDefault below).
|
|
29150
29180
|
"fs:sidecar_fs_write_file",
|
|
29181
|
+
"fs:sidecar_fs_write_bytes",
|
|
29151
29182
|
// Shell execution (sidecar_shell_exec, address shell:sidecar_shell_exec) is a
|
|
29152
29183
|
// side effect — denied outright under read-only, regardless of its own permission.
|
|
29153
29184
|
"shell:*",
|
|
@@ -35004,7 +35035,7 @@ function nodeCrewLocation(stateDir, scope, workspaceRoot) {
|
|
|
35004
35035
|
return { files: new NodeFileService(wsRoot), root: `${stateDirName()}/crew` };
|
|
35005
35036
|
}
|
|
35006
35037
|
|
|
35007
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35038
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/internal/qs/formats.mjs
|
|
35008
35039
|
var default_format = "RFC3986";
|
|
35009
35040
|
var formatters = {
|
|
35010
35041
|
RFC1738: (v2) => String(v2).replace(/%20/g, "+"),
|
|
@@ -35012,7 +35043,7 @@ var formatters = {
|
|
|
35012
35043
|
};
|
|
35013
35044
|
var RFC1738 = "RFC1738";
|
|
35014
35045
|
|
|
35015
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35046
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/internal/qs/utils.mjs
|
|
35016
35047
|
var is_array = Array.isArray;
|
|
35017
35048
|
var hex_table = (() => {
|
|
35018
35049
|
const array = [];
|
|
@@ -35091,7 +35122,7 @@ function maybe_map(val, fn) {
|
|
|
35091
35122
|
return fn(val);
|
|
35092
35123
|
}
|
|
35093
35124
|
|
|
35094
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35125
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/internal/qs/stringify.mjs
|
|
35095
35126
|
var has = Object.prototype.hasOwnProperty;
|
|
35096
35127
|
var array_prefix_generators = {
|
|
35097
35128
|
brackets(prefix) {
|
|
@@ -35372,15 +35403,15 @@ function stringify3(object, opts = {}) {
|
|
|
35372
35403
|
return joined.length > 0 ? prefix + joined : "";
|
|
35373
35404
|
}
|
|
35374
35405
|
|
|
35375
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35406
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/version.mjs
|
|
35376
35407
|
var VERSION = "4.104.0";
|
|
35377
35408
|
|
|
35378
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35409
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/registry.mjs
|
|
35379
35410
|
var auto = false;
|
|
35380
35411
|
var kind = void 0;
|
|
35381
35412
|
var fetch2 = void 0;
|
|
35382
35413
|
var Request = void 0;
|
|
35383
|
-
var
|
|
35414
|
+
var Response2 = void 0;
|
|
35384
35415
|
var Headers2 = void 0;
|
|
35385
35416
|
var FormData = void 0;
|
|
35386
35417
|
var Blob = void 0;
|
|
@@ -35401,7 +35432,7 @@ function setShims(shims, options = { auto: false }) {
|
|
|
35401
35432
|
kind = shims.kind;
|
|
35402
35433
|
fetch2 = shims.fetch;
|
|
35403
35434
|
Request = shims.Request;
|
|
35404
|
-
|
|
35435
|
+
Response2 = shims.Response;
|
|
35405
35436
|
Headers2 = shims.Headers;
|
|
35406
35437
|
FormData = shims.FormData;
|
|
35407
35438
|
Blob = shims.Blob;
|
|
@@ -35413,7 +35444,7 @@ function setShims(shims, options = { auto: false }) {
|
|
|
35413
35444
|
isFsReadStream = shims.isFsReadStream;
|
|
35414
35445
|
}
|
|
35415
35446
|
|
|
35416
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35447
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/node-runtime.mjs
|
|
35417
35448
|
var nf = __toESM(require_lib3(), 1);
|
|
35418
35449
|
|
|
35419
35450
|
// ../../node_modules/.pnpm/formdata-node@4.4.1/node_modules/formdata-node/lib/esm/FormData.js
|
|
@@ -35559,7 +35590,7 @@ var FormData2 = class {
|
|
|
35559
35590
|
init_Blob();
|
|
35560
35591
|
init_File();
|
|
35561
35592
|
|
|
35562
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35593
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/node-runtime.mjs
|
|
35563
35594
|
var import_agentkeepalive = __toESM(require_agentkeepalive(), 1);
|
|
35564
35595
|
var import_abort_controller = __toESM(require_abort_controller(), 1);
|
|
35565
35596
|
import { ReadStream as FsReadStream } from "node:fs";
|
|
@@ -35735,10 +35766,10 @@ var FormDataEncoder = class {
|
|
|
35735
35766
|
}
|
|
35736
35767
|
};
|
|
35737
35768
|
|
|
35738
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35769
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/node-runtime.mjs
|
|
35739
35770
|
import { Readable } from "node:stream";
|
|
35740
35771
|
|
|
35741
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35772
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/MultipartBody.mjs
|
|
35742
35773
|
var MultipartBody = class {
|
|
35743
35774
|
constructor(body2) {
|
|
35744
35775
|
this.body = body2;
|
|
@@ -35748,7 +35779,7 @@ var MultipartBody = class {
|
|
|
35748
35779
|
}
|
|
35749
35780
|
};
|
|
35750
35781
|
|
|
35751
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35782
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/node-runtime.mjs
|
|
35752
35783
|
import { ReadableStream as ReadableStream3 } from "node:stream/web";
|
|
35753
35784
|
var fileFromPathWarned = false;
|
|
35754
35785
|
async function fileFromPath3(path, ...args) {
|
|
@@ -35793,13 +35824,13 @@ function getRuntime() {
|
|
|
35793
35824
|
};
|
|
35794
35825
|
}
|
|
35795
35826
|
|
|
35796
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35827
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/index.mjs
|
|
35797
35828
|
var init = () => {
|
|
35798
35829
|
if (!kind) setShims(getRuntime(), { auto: true });
|
|
35799
35830
|
};
|
|
35800
35831
|
init();
|
|
35801
35832
|
|
|
35802
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35833
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/error.mjs
|
|
35803
35834
|
var OpenAIError = class extends Error {
|
|
35804
35835
|
};
|
|
35805
35836
|
var APIError = class _APIError extends OpenAIError {
|
|
@@ -35903,7 +35934,7 @@ var ContentFilterFinishReasonError = class extends OpenAIError {
|
|
|
35903
35934
|
}
|
|
35904
35935
|
};
|
|
35905
35936
|
|
|
35906
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35937
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/internal/decoders/line.mjs
|
|
35907
35938
|
var __classPrivateFieldSet5 = function(receiver, state, value, kind2, f2) {
|
|
35908
35939
|
if (kind2 === "m") throw new TypeError("Private method is not writable");
|
|
35909
35940
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -36015,7 +36046,7 @@ function findDoubleNewlineIndex(buffer) {
|
|
|
36015
36046
|
return -1;
|
|
36016
36047
|
}
|
|
36017
36048
|
|
|
36018
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
36049
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/internal/stream-utils.mjs
|
|
36019
36050
|
function ReadableStreamToAsyncIterable(stream) {
|
|
36020
36051
|
if (stream[Symbol.asyncIterator])
|
|
36021
36052
|
return stream;
|
|
@@ -36044,7 +36075,7 @@ function ReadableStreamToAsyncIterable(stream) {
|
|
|
36044
36075
|
};
|
|
36045
36076
|
}
|
|
36046
36077
|
|
|
36047
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
36078
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/streaming.mjs
|
|
36048
36079
|
var Stream = class _Stream {
|
|
36049
36080
|
constructor(iterator, controller) {
|
|
36050
36081
|
this.iterator = iterator;
|
|
@@ -36296,7 +36327,7 @@ function partition(str10, delimiter) {
|
|
|
36296
36327
|
return [str10, "", ""];
|
|
36297
36328
|
}
|
|
36298
36329
|
|
|
36299
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
36330
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/uploads.mjs
|
|
36300
36331
|
var isResponseLike = (value) => value != null && typeof value === "object" && typeof value.url === "string" && typeof value.blob === "function";
|
|
36301
36332
|
var isFileLike2 = (value) => value != null && typeof value === "object" && typeof value.name === "string" && typeof value.lastModified === "number" && isBlobLike(value);
|
|
36302
36333
|
var isBlobLike = (value) => value != null && typeof value === "object" && typeof value.size === "number" && typeof value.type === "string" && typeof value.text === "function" && typeof value.slice === "function" && typeof value.arrayBuffer === "function";
|
|
@@ -36386,7 +36417,7 @@ var addFormValue = async (form, key, value) => {
|
|
|
36386
36417
|
}
|
|
36387
36418
|
};
|
|
36388
36419
|
|
|
36389
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
36420
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/core.mjs
|
|
36390
36421
|
var __classPrivateFieldSet6 = function(receiver, state, value, kind2, f2) {
|
|
36391
36422
|
if (kind2 === "m") throw new TypeError("Private method is not writable");
|
|
36392
36423
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -37157,7 +37188,7 @@ function isObj(obj) {
|
|
|
37157
37188
|
return obj != null && typeof obj === "object" && !Array.isArray(obj);
|
|
37158
37189
|
}
|
|
37159
37190
|
|
|
37160
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37191
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/pagination.mjs
|
|
37161
37192
|
var Page = class extends AbstractPage {
|
|
37162
37193
|
constructor(client, response, body2, options) {
|
|
37163
37194
|
super(client, response, body2, options);
|
|
@@ -37219,14 +37250,14 @@ var CursorPage = class extends AbstractPage {
|
|
|
37219
37250
|
}
|
|
37220
37251
|
};
|
|
37221
37252
|
|
|
37222
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37253
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resource.mjs
|
|
37223
37254
|
var APIResource = class {
|
|
37224
37255
|
constructor(client) {
|
|
37225
37256
|
this._client = client;
|
|
37226
37257
|
}
|
|
37227
37258
|
};
|
|
37228
37259
|
|
|
37229
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37260
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/chat/completions/messages.mjs
|
|
37230
37261
|
var Messages = class extends APIResource {
|
|
37231
37262
|
list(completionId, query = {}, options) {
|
|
37232
37263
|
if (isRequestOptions(query)) {
|
|
@@ -37236,7 +37267,7 @@ var Messages = class extends APIResource {
|
|
|
37236
37267
|
}
|
|
37237
37268
|
};
|
|
37238
37269
|
|
|
37239
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37270
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/chat/completions/completions.mjs
|
|
37240
37271
|
var Completions = class extends APIResource {
|
|
37241
37272
|
constructor() {
|
|
37242
37273
|
super(...arguments);
|
|
@@ -37301,7 +37332,7 @@ var ChatCompletionStoreMessagesPage = class extends CursorPage {
|
|
|
37301
37332
|
Completions.ChatCompletionsPage = ChatCompletionsPage;
|
|
37302
37333
|
Completions.Messages = Messages;
|
|
37303
37334
|
|
|
37304
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37335
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/chat/chat.mjs
|
|
37305
37336
|
var Chat = class extends APIResource {
|
|
37306
37337
|
constructor() {
|
|
37307
37338
|
super(...arguments);
|
|
@@ -37311,7 +37342,7 @@ var Chat = class extends APIResource {
|
|
|
37311
37342
|
Chat.Completions = Completions;
|
|
37312
37343
|
Chat.ChatCompletionsPage = ChatCompletionsPage;
|
|
37313
37344
|
|
|
37314
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37345
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/audio/speech.mjs
|
|
37315
37346
|
var Speech = class extends APIResource {
|
|
37316
37347
|
/**
|
|
37317
37348
|
* Generates audio from the input text.
|
|
@@ -37338,7 +37369,7 @@ var Speech = class extends APIResource {
|
|
|
37338
37369
|
}
|
|
37339
37370
|
};
|
|
37340
37371
|
|
|
37341
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37372
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/audio/transcriptions.mjs
|
|
37342
37373
|
var Transcriptions = class extends APIResource {
|
|
37343
37374
|
create(body2, options) {
|
|
37344
37375
|
return this._client.post("/audio/transcriptions", multipartFormRequestOptions({
|
|
@@ -37350,14 +37381,14 @@ var Transcriptions = class extends APIResource {
|
|
|
37350
37381
|
}
|
|
37351
37382
|
};
|
|
37352
37383
|
|
|
37353
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37384
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/audio/translations.mjs
|
|
37354
37385
|
var Translations = class extends APIResource {
|
|
37355
37386
|
create(body2, options) {
|
|
37356
37387
|
return this._client.post("/audio/translations", multipartFormRequestOptions({ body: body2, ...options, __metadata: { model: body2.model } }));
|
|
37357
37388
|
}
|
|
37358
37389
|
};
|
|
37359
37390
|
|
|
37360
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37391
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/audio/audio.mjs
|
|
37361
37392
|
var Audio = class extends APIResource {
|
|
37362
37393
|
constructor() {
|
|
37363
37394
|
super(...arguments);
|
|
@@ -37370,7 +37401,7 @@ Audio.Transcriptions = Transcriptions;
|
|
|
37370
37401
|
Audio.Translations = Translations;
|
|
37371
37402
|
Audio.Speech = Speech;
|
|
37372
37403
|
|
|
37373
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37404
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/batches.mjs
|
|
37374
37405
|
var Batches = class extends APIResource {
|
|
37375
37406
|
/**
|
|
37376
37407
|
* Creates and executes a batch from an uploaded file of requests
|
|
@@ -37403,7 +37434,7 @@ var BatchesPage = class extends CursorPage {
|
|
|
37403
37434
|
};
|
|
37404
37435
|
Batches.BatchesPage = BatchesPage;
|
|
37405
37436
|
|
|
37406
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37437
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/EventStream.mjs
|
|
37407
37438
|
var __classPrivateFieldSet7 = function(receiver, state, value, kind2, f2) {
|
|
37408
37439
|
if (kind2 === "m") throw new TypeError("Private method is not writable");
|
|
37409
37440
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -37603,7 +37634,7 @@ _EventStream_connectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_reso
|
|
|
37603
37634
|
return this._emit("error", new OpenAIError(String(error)));
|
|
37604
37635
|
};
|
|
37605
37636
|
|
|
37606
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37637
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/AssistantStream.mjs
|
|
37607
37638
|
var __classPrivateFieldGet9 = function(receiver, state, kind2, f2) {
|
|
37608
37639
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a getter");
|
|
37609
37640
|
if (typeof state === "function" ? receiver !== state || !f2 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
@@ -38151,7 +38182,7 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) {
|
|
|
38151
38182
|
function assertNever(_x) {
|
|
38152
38183
|
}
|
|
38153
38184
|
|
|
38154
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38185
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/assistants.mjs
|
|
38155
38186
|
var Assistants = class extends APIResource {
|
|
38156
38187
|
/**
|
|
38157
38188
|
* Create an assistant with a model and instructions.
|
|
@@ -38234,12 +38265,12 @@ var AssistantsPage = class extends CursorPage {
|
|
|
38234
38265
|
};
|
|
38235
38266
|
Assistants.AssistantsPage = AssistantsPage;
|
|
38236
38267
|
|
|
38237
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38268
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/RunnableFunction.mjs
|
|
38238
38269
|
function isRunnableFunctionWithParse(fn) {
|
|
38239
38270
|
return typeof fn.parse === "function";
|
|
38240
38271
|
}
|
|
38241
38272
|
|
|
38242
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38273
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/chatCompletionUtils.mjs
|
|
38243
38274
|
var isAssistantMessage = (message) => {
|
|
38244
38275
|
return message?.role === "assistant";
|
|
38245
38276
|
};
|
|
@@ -38250,7 +38281,7 @@ var isToolMessage = (message) => {
|
|
|
38250
38281
|
return message?.role === "tool";
|
|
38251
38282
|
};
|
|
38252
38283
|
|
|
38253
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38284
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/parser.mjs
|
|
38254
38285
|
function isAutoParsableResponseFormat(response_format) {
|
|
38255
38286
|
return response_format?.["$brand"] === "auto-parseable-response-format";
|
|
38256
38287
|
}
|
|
@@ -38343,7 +38374,7 @@ function validateInputTools(tools) {
|
|
|
38343
38374
|
}
|
|
38344
38375
|
}
|
|
38345
38376
|
|
|
38346
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38377
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/AbstractChatCompletionRunner.mjs
|
|
38347
38378
|
var __classPrivateFieldGet10 = function(receiver, state, kind2, f2) {
|
|
38348
38379
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a getter");
|
|
38349
38380
|
if (typeof state === "function" ? receiver !== state || !f2 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
@@ -38689,7 +38720,7 @@ _AbstractChatCompletionRunner_instances = /* @__PURE__ */ new WeakSet(), _Abstra
|
|
|
38689
38720
|
return typeof rawContent === "string" ? rawContent : rawContent === void 0 ? "undefined" : JSON.stringify(rawContent);
|
|
38690
38721
|
};
|
|
38691
38722
|
|
|
38692
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38723
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/ChatCompletionRunner.mjs
|
|
38693
38724
|
var ChatCompletionRunner = class _ChatCompletionRunner extends AbstractChatCompletionRunner {
|
|
38694
38725
|
/** @deprecated - please use `runTools` instead. */
|
|
38695
38726
|
static runFunctions(client, params, options) {
|
|
@@ -38718,7 +38749,7 @@ var ChatCompletionRunner = class _ChatCompletionRunner extends AbstractChatCompl
|
|
|
38718
38749
|
}
|
|
38719
38750
|
};
|
|
38720
38751
|
|
|
38721
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38752
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_vendor/partial-json-parser/parser.mjs
|
|
38722
38753
|
var STR = 1;
|
|
38723
38754
|
var NUM = 2;
|
|
38724
38755
|
var ARR = 4;
|
|
@@ -38930,7 +38961,7 @@ var _parseJSON = (jsonString, allow) => {
|
|
|
38930
38961
|
};
|
|
38931
38962
|
var partialParse = (input) => parseJSON(input, Allow.ALL ^ Allow.NUM);
|
|
38932
38963
|
|
|
38933
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38964
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/ChatCompletionStream.mjs
|
|
38934
38965
|
var __classPrivateFieldSet9 = function(receiver, state, value, kind2, f2) {
|
|
38935
38966
|
if (kind2 === "m") throw new TypeError("Private method is not writable");
|
|
38936
38967
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -39421,7 +39452,7 @@ function assertIsEmpty(obj) {
|
|
|
39421
39452
|
function assertNever2(_x) {
|
|
39422
39453
|
}
|
|
39423
39454
|
|
|
39424
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39455
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs
|
|
39425
39456
|
var ChatCompletionStreamingRunner = class _ChatCompletionStreamingRunner extends ChatCompletionStream {
|
|
39426
39457
|
static fromReadableStream(stream) {
|
|
39427
39458
|
const runner = new _ChatCompletionStreamingRunner(null);
|
|
@@ -39452,7 +39483,7 @@ var ChatCompletionStreamingRunner = class _ChatCompletionStreamingRunner extends
|
|
|
39452
39483
|
}
|
|
39453
39484
|
};
|
|
39454
39485
|
|
|
39455
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39486
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/chat/completions.mjs
|
|
39456
39487
|
var Completions2 = class extends APIResource {
|
|
39457
39488
|
parse(body2, options) {
|
|
39458
39489
|
validateInputTools(body2.tools);
|
|
@@ -39484,7 +39515,7 @@ var Completions2 = class extends APIResource {
|
|
|
39484
39515
|
}
|
|
39485
39516
|
};
|
|
39486
39517
|
|
|
39487
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39518
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/chat/chat.mjs
|
|
39488
39519
|
var Chat2 = class extends APIResource {
|
|
39489
39520
|
constructor() {
|
|
39490
39521
|
super(...arguments);
|
|
@@ -39495,7 +39526,7 @@ var Chat2 = class extends APIResource {
|
|
|
39495
39526
|
Chat3.Completions = Completions2;
|
|
39496
39527
|
})(Chat2 || (Chat2 = {}));
|
|
39497
39528
|
|
|
39498
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39529
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/realtime/sessions.mjs
|
|
39499
39530
|
var Sessions = class extends APIResource {
|
|
39500
39531
|
/**
|
|
39501
39532
|
* Create an ephemeral API token for use in client-side applications with the
|
|
@@ -39521,7 +39552,7 @@ var Sessions = class extends APIResource {
|
|
|
39521
39552
|
}
|
|
39522
39553
|
};
|
|
39523
39554
|
|
|
39524
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39555
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/realtime/transcription-sessions.mjs
|
|
39525
39556
|
var TranscriptionSessions = class extends APIResource {
|
|
39526
39557
|
/**
|
|
39527
39558
|
* Create an ephemeral API token for use in client-side applications with the
|
|
@@ -39547,7 +39578,7 @@ var TranscriptionSessions = class extends APIResource {
|
|
|
39547
39578
|
}
|
|
39548
39579
|
};
|
|
39549
39580
|
|
|
39550
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39581
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/realtime/realtime.mjs
|
|
39551
39582
|
var Realtime = class extends APIResource {
|
|
39552
39583
|
constructor() {
|
|
39553
39584
|
super(...arguments);
|
|
@@ -39558,7 +39589,7 @@ var Realtime = class extends APIResource {
|
|
|
39558
39589
|
Realtime.Sessions = Sessions;
|
|
39559
39590
|
Realtime.TranscriptionSessions = TranscriptionSessions;
|
|
39560
39591
|
|
|
39561
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39592
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/threads/messages.mjs
|
|
39562
39593
|
var Messages2 = class extends APIResource {
|
|
39563
39594
|
/**
|
|
39564
39595
|
* Create a message.
|
|
@@ -39621,7 +39652,7 @@ var MessagesPage = class extends CursorPage {
|
|
|
39621
39652
|
};
|
|
39622
39653
|
Messages2.MessagesPage = MessagesPage;
|
|
39623
39654
|
|
|
39624
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39655
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/threads/runs/steps.mjs
|
|
39625
39656
|
var Steps = class extends APIResource {
|
|
39626
39657
|
retrieve(threadId, runId, stepId, query = {}, options) {
|
|
39627
39658
|
if (isRequestOptions(query)) {
|
|
@@ -39648,7 +39679,7 @@ var RunStepsPage = class extends CursorPage {
|
|
|
39648
39679
|
};
|
|
39649
39680
|
Steps.RunStepsPage = RunStepsPage;
|
|
39650
39681
|
|
|
39651
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39682
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/threads/runs/runs.mjs
|
|
39652
39683
|
var Runs = class extends APIResource {
|
|
39653
39684
|
constructor() {
|
|
39654
39685
|
super(...arguments);
|
|
@@ -39806,7 +39837,7 @@ Runs.RunsPage = RunsPage;
|
|
|
39806
39837
|
Runs.Steps = Steps;
|
|
39807
39838
|
Runs.RunStepsPage = RunStepsPage;
|
|
39808
39839
|
|
|
39809
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39840
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/threads/threads.mjs
|
|
39810
39841
|
var Threads = class extends APIResource {
|
|
39811
39842
|
constructor() {
|
|
39812
39843
|
super(...arguments);
|
|
@@ -39886,7 +39917,7 @@ Threads.RunsPage = RunsPage;
|
|
|
39886
39917
|
Threads.Messages = Messages2;
|
|
39887
39918
|
Threads.MessagesPage = MessagesPage;
|
|
39888
39919
|
|
|
39889
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39920
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/beta.mjs
|
|
39890
39921
|
var Beta = class extends APIResource {
|
|
39891
39922
|
constructor() {
|
|
39892
39923
|
super(...arguments);
|
|
@@ -39901,14 +39932,14 @@ Beta.Assistants = Assistants;
|
|
|
39901
39932
|
Beta.AssistantsPage = AssistantsPage;
|
|
39902
39933
|
Beta.Threads = Threads;
|
|
39903
39934
|
|
|
39904
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39935
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/completions.mjs
|
|
39905
39936
|
var Completions3 = class extends APIResource {
|
|
39906
39937
|
create(body2, options) {
|
|
39907
39938
|
return this._client.post("/completions", { body: body2, ...options, stream: body2.stream ?? false });
|
|
39908
39939
|
}
|
|
39909
39940
|
};
|
|
39910
39941
|
|
|
39911
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39942
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/containers/files/content.mjs
|
|
39912
39943
|
var Content = class extends APIResource {
|
|
39913
39944
|
/**
|
|
39914
39945
|
* Retrieve Container File Content
|
|
@@ -39922,7 +39953,7 @@ var Content = class extends APIResource {
|
|
|
39922
39953
|
}
|
|
39923
39954
|
};
|
|
39924
39955
|
|
|
39925
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39956
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/containers/files/files.mjs
|
|
39926
39957
|
var Files = class extends APIResource {
|
|
39927
39958
|
constructor() {
|
|
39928
39959
|
super(...arguments);
|
|
@@ -39967,7 +39998,7 @@ var FileListResponsesPage = class extends CursorPage {
|
|
|
39967
39998
|
Files.FileListResponsesPage = FileListResponsesPage;
|
|
39968
39999
|
Files.Content = Content;
|
|
39969
40000
|
|
|
39970
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40001
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/containers/containers.mjs
|
|
39971
40002
|
var Containers = class extends APIResource {
|
|
39972
40003
|
constructor() {
|
|
39973
40004
|
super(...arguments);
|
|
@@ -40007,7 +40038,7 @@ Containers.ContainerListResponsesPage = ContainerListResponsesPage;
|
|
|
40007
40038
|
Containers.Files = Files;
|
|
40008
40039
|
Containers.FileListResponsesPage = FileListResponsesPage;
|
|
40009
40040
|
|
|
40010
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40041
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/embeddings.mjs
|
|
40011
40042
|
var Embeddings = class extends APIResource {
|
|
40012
40043
|
/**
|
|
40013
40044
|
* Creates an embedding vector representing the input text.
|
|
@@ -40050,7 +40081,7 @@ var Embeddings = class extends APIResource {
|
|
|
40050
40081
|
}
|
|
40051
40082
|
};
|
|
40052
40083
|
|
|
40053
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40084
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/evals/runs/output-items.mjs
|
|
40054
40085
|
var OutputItems = class extends APIResource {
|
|
40055
40086
|
/**
|
|
40056
40087
|
* Get an evaluation run output item by ID.
|
|
@@ -40069,7 +40100,7 @@ var OutputItemListResponsesPage = class extends CursorPage {
|
|
|
40069
40100
|
};
|
|
40070
40101
|
OutputItems.OutputItemListResponsesPage = OutputItemListResponsesPage;
|
|
40071
40102
|
|
|
40072
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40103
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/evals/runs/runs.mjs
|
|
40073
40104
|
var Runs2 = class extends APIResource {
|
|
40074
40105
|
constructor() {
|
|
40075
40106
|
super(...arguments);
|
|
@@ -40114,7 +40145,7 @@ Runs2.RunListResponsesPage = RunListResponsesPage;
|
|
|
40114
40145
|
Runs2.OutputItems = OutputItems;
|
|
40115
40146
|
Runs2.OutputItemListResponsesPage = OutputItemListResponsesPage;
|
|
40116
40147
|
|
|
40117
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40148
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/evals/evals.mjs
|
|
40118
40149
|
var Evals = class extends APIResource {
|
|
40119
40150
|
constructor() {
|
|
40120
40151
|
super(...arguments);
|
|
@@ -40162,7 +40193,7 @@ Evals.EvalListResponsesPage = EvalListResponsesPage;
|
|
|
40162
40193
|
Evals.Runs = Runs2;
|
|
40163
40194
|
Evals.RunListResponsesPage = RunListResponsesPage;
|
|
40164
40195
|
|
|
40165
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40196
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/files.mjs
|
|
40166
40197
|
var Files2 = class extends APIResource {
|
|
40167
40198
|
/**
|
|
40168
40199
|
* Upload a file that can be used across various endpoints. Individual files can be
|
|
@@ -40249,11 +40280,11 @@ var FileObjectsPage = class extends CursorPage {
|
|
|
40249
40280
|
};
|
|
40250
40281
|
Files2.FileObjectsPage = FileObjectsPage;
|
|
40251
40282
|
|
|
40252
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40283
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/methods.mjs
|
|
40253
40284
|
var Methods = class extends APIResource {
|
|
40254
40285
|
};
|
|
40255
40286
|
|
|
40256
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40287
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/alpha/graders.mjs
|
|
40257
40288
|
var Graders = class extends APIResource {
|
|
40258
40289
|
/**
|
|
40259
40290
|
* Run a grader.
|
|
@@ -40298,7 +40329,7 @@ var Graders = class extends APIResource {
|
|
|
40298
40329
|
}
|
|
40299
40330
|
};
|
|
40300
40331
|
|
|
40301
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40332
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/alpha/alpha.mjs
|
|
40302
40333
|
var Alpha = class extends APIResource {
|
|
40303
40334
|
constructor() {
|
|
40304
40335
|
super(...arguments);
|
|
@@ -40307,7 +40338,7 @@ var Alpha = class extends APIResource {
|
|
|
40307
40338
|
};
|
|
40308
40339
|
Alpha.Graders = Graders;
|
|
40309
40340
|
|
|
40310
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40341
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/checkpoints/permissions.mjs
|
|
40311
40342
|
var Permissions = class extends APIResource {
|
|
40312
40343
|
/**
|
|
40313
40344
|
* **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
|
|
@@ -40361,7 +40392,7 @@ var PermissionCreateResponsesPage = class extends Page {
|
|
|
40361
40392
|
};
|
|
40362
40393
|
Permissions.PermissionCreateResponsesPage = PermissionCreateResponsesPage;
|
|
40363
40394
|
|
|
40364
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40395
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.mjs
|
|
40365
40396
|
var Checkpoints = class extends APIResource {
|
|
40366
40397
|
constructor() {
|
|
40367
40398
|
super(...arguments);
|
|
@@ -40371,7 +40402,7 @@ var Checkpoints = class extends APIResource {
|
|
|
40371
40402
|
Checkpoints.Permissions = Permissions;
|
|
40372
40403
|
Checkpoints.PermissionCreateResponsesPage = PermissionCreateResponsesPage;
|
|
40373
40404
|
|
|
40374
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40405
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs
|
|
40375
40406
|
var Checkpoints2 = class extends APIResource {
|
|
40376
40407
|
list(fineTuningJobId, query = {}, options) {
|
|
40377
40408
|
if (isRequestOptions(query)) {
|
|
@@ -40384,7 +40415,7 @@ var FineTuningJobCheckpointsPage = class extends CursorPage {
|
|
|
40384
40415
|
};
|
|
40385
40416
|
Checkpoints2.FineTuningJobCheckpointsPage = FineTuningJobCheckpointsPage;
|
|
40386
40417
|
|
|
40387
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40418
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs
|
|
40388
40419
|
var Jobs = class extends APIResource {
|
|
40389
40420
|
constructor() {
|
|
40390
40421
|
super(...arguments);
|
|
@@ -40489,7 +40520,7 @@ Jobs.FineTuningJobEventsPage = FineTuningJobEventsPage;
|
|
|
40489
40520
|
Jobs.Checkpoints = Checkpoints2;
|
|
40490
40521
|
Jobs.FineTuningJobCheckpointsPage = FineTuningJobCheckpointsPage;
|
|
40491
40522
|
|
|
40492
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40523
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/fine-tuning.mjs
|
|
40493
40524
|
var FineTuning = class extends APIResource {
|
|
40494
40525
|
constructor() {
|
|
40495
40526
|
super(...arguments);
|
|
@@ -40506,11 +40537,11 @@ FineTuning.FineTuningJobEventsPage = FineTuningJobEventsPage;
|
|
|
40506
40537
|
FineTuning.Checkpoints = Checkpoints;
|
|
40507
40538
|
FineTuning.Alpha = Alpha;
|
|
40508
40539
|
|
|
40509
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40540
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/graders/grader-models.mjs
|
|
40510
40541
|
var GraderModels = class extends APIResource {
|
|
40511
40542
|
};
|
|
40512
40543
|
|
|
40513
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40544
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/graders/graders.mjs
|
|
40514
40545
|
var Graders2 = class extends APIResource {
|
|
40515
40546
|
constructor() {
|
|
40516
40547
|
super(...arguments);
|
|
@@ -40519,7 +40550,7 @@ var Graders2 = class extends APIResource {
|
|
|
40519
40550
|
};
|
|
40520
40551
|
Graders2.GraderModels = GraderModels;
|
|
40521
40552
|
|
|
40522
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40553
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/images.mjs
|
|
40523
40554
|
var Images = class extends APIResource {
|
|
40524
40555
|
/**
|
|
40525
40556
|
* Creates a variation of a given image. This endpoint only supports `dall-e-2`.
|
|
@@ -40565,7 +40596,7 @@ var Images = class extends APIResource {
|
|
|
40565
40596
|
}
|
|
40566
40597
|
};
|
|
40567
40598
|
|
|
40568
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40599
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/models.mjs
|
|
40569
40600
|
var Models = class extends APIResource {
|
|
40570
40601
|
/**
|
|
40571
40602
|
* Retrieves a model instance, providing basic information about the model such as
|
|
@@ -40593,7 +40624,7 @@ var ModelsPage = class extends Page {
|
|
|
40593
40624
|
};
|
|
40594
40625
|
Models.ModelsPage = ModelsPage;
|
|
40595
40626
|
|
|
40596
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40627
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/moderations.mjs
|
|
40597
40628
|
var Moderations = class extends APIResource {
|
|
40598
40629
|
/**
|
|
40599
40630
|
* Classifies if text and/or image inputs are potentially harmful. Learn more in
|
|
@@ -40604,7 +40635,7 @@ var Moderations = class extends APIResource {
|
|
|
40604
40635
|
}
|
|
40605
40636
|
};
|
|
40606
40637
|
|
|
40607
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40638
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/ResponsesParser.mjs
|
|
40608
40639
|
function maybeParseResponse(response, params) {
|
|
40609
40640
|
if (!params || !hasAutoParseableInput2(params)) {
|
|
40610
40641
|
return {
|
|
@@ -40725,7 +40756,7 @@ function addOutputText(rsp) {
|
|
|
40725
40756
|
rsp.output_text = texts.join("");
|
|
40726
40757
|
}
|
|
40727
40758
|
|
|
40728
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40759
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/responses/input-items.mjs
|
|
40729
40760
|
var InputItems = class extends APIResource {
|
|
40730
40761
|
list(responseId, query = {}, options) {
|
|
40731
40762
|
if (isRequestOptions(query)) {
|
|
@@ -40738,7 +40769,7 @@ var InputItems = class extends APIResource {
|
|
|
40738
40769
|
}
|
|
40739
40770
|
};
|
|
40740
40771
|
|
|
40741
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40772
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/responses/ResponseStream.mjs
|
|
40742
40773
|
var __classPrivateFieldSet10 = function(receiver, state, value, kind2, f2) {
|
|
40743
40774
|
if (kind2 === "m") throw new TypeError("Private method is not writable");
|
|
40744
40775
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -40987,7 +41018,7 @@ function finalizeResponse(snapshot, params) {
|
|
|
40987
41018
|
return maybeParseResponse(snapshot, params);
|
|
40988
41019
|
}
|
|
40989
41020
|
|
|
40990
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41021
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/responses/responses.mjs
|
|
40991
41022
|
var Responses = class extends APIResource {
|
|
40992
41023
|
constructor() {
|
|
40993
41024
|
super(...arguments);
|
|
@@ -41056,7 +41087,7 @@ var ResponseItemsPage = class extends CursorPage {
|
|
|
41056
41087
|
};
|
|
41057
41088
|
Responses.InputItems = InputItems;
|
|
41058
41089
|
|
|
41059
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41090
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/uploads/parts.mjs
|
|
41060
41091
|
var Parts = class extends APIResource {
|
|
41061
41092
|
/**
|
|
41062
41093
|
* Adds a
|
|
@@ -41076,7 +41107,7 @@ var Parts = class extends APIResource {
|
|
|
41076
41107
|
}
|
|
41077
41108
|
};
|
|
41078
41109
|
|
|
41079
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41110
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/uploads/uploads.mjs
|
|
41080
41111
|
var Uploads = class extends APIResource {
|
|
41081
41112
|
constructor() {
|
|
41082
41113
|
super(...arguments);
|
|
@@ -41133,7 +41164,7 @@ var Uploads = class extends APIResource {
|
|
|
41133
41164
|
};
|
|
41134
41165
|
Uploads.Parts = Parts;
|
|
41135
41166
|
|
|
41136
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41167
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/Util.mjs
|
|
41137
41168
|
var allSettledWithThrow = async (promises) => {
|
|
41138
41169
|
const results = await Promise.allSettled(promises);
|
|
41139
41170
|
const rejected = results.filter((result) => result.status === "rejected");
|
|
@@ -41152,7 +41183,7 @@ var allSettledWithThrow = async (promises) => {
|
|
|
41152
41183
|
return values;
|
|
41153
41184
|
};
|
|
41154
41185
|
|
|
41155
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41186
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/vector-stores/files.mjs
|
|
41156
41187
|
var Files3 = class extends APIResource {
|
|
41157
41188
|
/**
|
|
41158
41189
|
* Create a vector store file by attaching a
|
|
@@ -41284,7 +41315,7 @@ var FileContentResponsesPage = class extends Page {
|
|
|
41284
41315
|
Files3.VectorStoreFilesPage = VectorStoreFilesPage;
|
|
41285
41316
|
Files3.FileContentResponsesPage = FileContentResponsesPage;
|
|
41286
41317
|
|
|
41287
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41318
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/vector-stores/file-batches.mjs
|
|
41288
41319
|
var FileBatches = class extends APIResource {
|
|
41289
41320
|
/**
|
|
41290
41321
|
* Create a vector store file batch.
|
|
@@ -41395,7 +41426,7 @@ var FileBatches = class extends APIResource {
|
|
|
41395
41426
|
}
|
|
41396
41427
|
};
|
|
41397
41428
|
|
|
41398
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41429
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/vector-stores/vector-stores.mjs
|
|
41399
41430
|
var VectorStores = class extends APIResource {
|
|
41400
41431
|
constructor() {
|
|
41401
41432
|
super(...arguments);
|
|
@@ -41474,7 +41505,7 @@ VectorStores.VectorStoreFilesPage = VectorStoreFilesPage;
|
|
|
41474
41505
|
VectorStores.FileContentResponsesPage = FileContentResponsesPage;
|
|
41475
41506
|
VectorStores.FileBatches = FileBatches;
|
|
41476
41507
|
|
|
41477
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41508
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/index.mjs
|
|
41478
41509
|
var _a;
|
|
41479
41510
|
var OpenAI = class extends APIClient {
|
|
41480
41511
|
/**
|
|
@@ -41659,7 +41690,7 @@ async function streamCompletion(client, params, signal, onText) {
|
|
|
41659
41690
|
const detail = redactSecrets(
|
|
41660
41691
|
String((typeof raw === "string" ? raw : raw?.error || raw?.message) || err?.message || String(e2))
|
|
41661
41692
|
);
|
|
41662
|
-
const msg = typeof err?.status === "number" ?
|
|
41693
|
+
const msg = typeof err?.status === "number" ? `${statusPrefix(err.status, err.code)}: ${detail}` : detail;
|
|
41663
41694
|
alog("stream:create-error", msg);
|
|
41664
41695
|
throw new Error(msg);
|
|
41665
41696
|
}
|
|
@@ -41695,30 +41726,40 @@ async function streamCompletion(client, params, signal, onText) {
|
|
|
41695
41726
|
alog("stream:end", { chunks: chunkN, contentLen: content.length, toolCalls: toolCalls.length, finishReason, usage });
|
|
41696
41727
|
return { content, toolCalls, usage, finishReason };
|
|
41697
41728
|
}
|
|
41729
|
+
var LOCAL_FAILURE = {
|
|
41730
|
+
refused: "model_route_refused",
|
|
41731
|
+
unreachable: "custom_provider_unreachable"
|
|
41732
|
+
};
|
|
41733
|
+
function statusPrefix(status, code2) {
|
|
41734
|
+
if (code2 === LOCAL_FAILURE.refused) return `Status ${status} (refused locally, nothing was sent)`;
|
|
41735
|
+
if (code2 === LOCAL_FAILURE.unreachable) return `Status ${status} (custom provider unreachable)`;
|
|
41736
|
+
return `Gateway ${status}`;
|
|
41737
|
+
}
|
|
41738
|
+
async function gatewayRequest(auth, opts, url, init2) {
|
|
41739
|
+
const headers = new Headers(init2?.headers);
|
|
41740
|
+
alog("gateway:token-wait");
|
|
41741
|
+
const token = await auth.getToken().catch(() => null);
|
|
41742
|
+
if (token) headers.set("Authorization", `Bearer ${token}`);
|
|
41743
|
+
else headers.delete("Authorization");
|
|
41744
|
+
if (opts.origin) headers.set("X-Prompd-Origin", opts.origin);
|
|
41745
|
+
alog("gateway:fetch", { url, hasToken: !!token });
|
|
41746
|
+
try {
|
|
41747
|
+
const res = await fetch(url, { ...init2, headers });
|
|
41748
|
+
alog("gateway:status", res.status, res.statusText);
|
|
41749
|
+
return res;
|
|
41750
|
+
} catch (e2) {
|
|
41751
|
+
alog("gateway:fetch-error", String(e2?.message || e2));
|
|
41752
|
+
throw e2;
|
|
41753
|
+
}
|
|
41754
|
+
}
|
|
41698
41755
|
function createChatClient(auth, opts = {}) {
|
|
41699
41756
|
return new openai_default({
|
|
41700
41757
|
baseURL: gatewayBaseURL(),
|
|
41701
41758
|
// Real key lives server-side; this placeholder is replaced per-request by the
|
|
41702
|
-
// Clerk token in
|
|
41759
|
+
// Clerk token in gatewayRequest. The SDK requires a non-empty value.
|
|
41703
41760
|
apiKey: "prompd-gateway",
|
|
41704
41761
|
dangerouslyAllowBrowser: true,
|
|
41705
|
-
fetch:
|
|
41706
|
-
const headers = new Headers(init2?.headers);
|
|
41707
|
-
alog("gateway:token-wait");
|
|
41708
|
-
const token = await auth.getToken().catch(() => null);
|
|
41709
|
-
if (token) headers.set("Authorization", `Bearer ${token}`);
|
|
41710
|
-
else headers.delete("Authorization");
|
|
41711
|
-
if (opts.origin) headers.set("X-Prompd-Origin", opts.origin);
|
|
41712
|
-
alog("gateway:fetch", { url: String(url), hasToken: !!token });
|
|
41713
|
-
try {
|
|
41714
|
-
const res = await fetch(url, { ...init2, headers });
|
|
41715
|
-
alog("gateway:status", res.status, res.statusText);
|
|
41716
|
-
return res;
|
|
41717
|
-
} catch (e2) {
|
|
41718
|
-
alog("gateway:fetch-error", String(e2?.message || e2));
|
|
41719
|
-
throw e2;
|
|
41720
|
-
}
|
|
41721
|
-
}
|
|
41762
|
+
fetch: (url, init2) => gatewayRequest(auth, opts, String(url), init2)
|
|
41722
41763
|
});
|
|
41723
41764
|
}
|
|
41724
41765
|
|
|
@@ -41875,6 +41916,7 @@ var BUILTIN_NAMESPACES = {
|
|
|
41875
41916
|
sidecar_fs_read_file: "sidecar",
|
|
41876
41917
|
sidecar_fs_write_file: "sidecar",
|
|
41877
41918
|
sidecar_fs_read_bytes: "sidecar",
|
|
41919
|
+
sidecar_fs_write_bytes: "sidecar",
|
|
41878
41920
|
sidecar_fs_list_dir: "sidecar",
|
|
41879
41921
|
sidecar_fs_delete: "sidecar",
|
|
41880
41922
|
sidecar_shell_exec: "sidecar",
|
|
@@ -46522,7 +46564,7 @@ var FLAG_TO_KEY = {
|
|
|
46522
46564
|
"--default-model": "defaultModel",
|
|
46523
46565
|
"--name": "name"
|
|
46524
46566
|
};
|
|
46525
|
-
var DEFAULT_GUEST_IMAGE2 = "prompd/corenel-sandbox:0.8.
|
|
46567
|
+
var DEFAULT_GUEST_IMAGE2 = "prompd/corenel-sandbox:0.8.6";
|
|
46526
46568
|
function parseArgsWithProvenance(argv) {
|
|
46527
46569
|
const explicit = /* @__PURE__ */ new Set();
|
|
46528
46570
|
for (const a2 of argv) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corenel/sidecar",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"description": "Prompd sidecar — a local capability server. Run it next to Prompd (prompd.app) so the browser app can reach your machine: local LLMs (Ollama/LM Studio/vLLM) without CORS, your filesystem, and (opt-in) shell.",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"esbuild": "^0.21.5",
|
|
37
37
|
"tsx": "^4.19.2",
|
|
38
38
|
"typescript": "^5.9.3",
|
|
39
|
-
"@corenel/
|
|
40
|
-
"@corenel/
|
|
39
|
+
"@corenel/tools-node": "0.3.6",
|
|
40
|
+
"@corenel/protocol": "0.7.3",
|
|
41
41
|
"@corenel/crew": "0.0.0",
|
|
42
|
-
"@corenel/harness": "0.7.
|
|
42
|
+
"@corenel/harness": "0.7.4"
|
|
43
43
|
},
|
|
44
44
|
"repository": {
|
|
45
45
|
"type": "git",
|