scream-code 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,21 +9,21 @@ import { C as join$1, D as resolve$1, E as relative$1, S as isAbsolute$1, T as p
|
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
10
|
import { createHash, randomBytes, randomInt, randomUUID } from "node:crypto";
|
|
11
11
|
import Jn, { access, appendFile, chmod, copyFile, cp, lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, rmdir, stat, unlink, writeFile } from "node:fs/promises";
|
|
12
|
-
import
|
|
12
|
+
import I, { createWriteStream } from "fs";
|
|
13
13
|
import Vr, { EventEmitter } from "events";
|
|
14
14
|
import * as path$1$1 from "path";
|
|
15
|
-
import
|
|
15
|
+
import Xs, { dirname, parse } from "path";
|
|
16
16
|
import { Buffer as Buffer$1 } from "buffer";
|
|
17
|
-
import * as fs$
|
|
17
|
+
import * as fs$10 from "fs/promises";
|
|
18
18
|
import { writeFile as writeFile$1 } from "fs/promises";
|
|
19
19
|
import Ds, { PassThrough, Readable } from "node:stream";
|
|
20
20
|
import { finished, pipeline as pipeline$1 } from "node:stream/promises";
|
|
21
21
|
import * as vs from "zlib";
|
|
22
22
|
import Qr from "zlib";
|
|
23
|
-
import * as fs$
|
|
23
|
+
import * as fs$9 from "node:fs";
|
|
24
24
|
import Vt, { appendFileSync, chmodSync, closeSync, constants, createReadStream, createWriteStream as createWriteStream$1, existsSync, fsyncSync, mkdirSync, openSync, promises, readFileSync, readSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
|
|
25
|
-
import * as path$
|
|
26
|
-
import path
|
|
25
|
+
import * as path$8 from "node:path";
|
|
26
|
+
import path, { basename, dirname as dirname$1, extname, isAbsolute, join, posix, relative, resolve, sep, win32 } from "node:path";
|
|
27
27
|
import { z } from "zod";
|
|
28
28
|
import { DatabaseSync } from "node:sqlite";
|
|
29
29
|
import * as nodeOs from "node:os";
|
|
@@ -2993,7 +2993,7 @@ const createPathTagFunction$2 = (pathEncoder = encodeURIPath$2) => function path
|
|
|
2993
2993
|
/**
|
|
2994
2994
|
* URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced.
|
|
2995
2995
|
*/
|
|
2996
|
-
const path$
|
|
2996
|
+
const path$14 = /* @__PURE__ */ createPathTagFunction$2(encodeURIPath$2);
|
|
2997
2997
|
//#endregion
|
|
2998
2998
|
//#region ../../node_modules/.pnpm/@anthropic-ai+sdk@0.95.2_zod@4.4.3/node_modules/@anthropic-ai/sdk/resources/beta/environments.mjs
|
|
2999
2999
|
var Environments = class extends APIResource$2 {
|
|
@@ -3029,7 +3029,7 @@ var Environments = class extends APIResource$2 {
|
|
|
3029
3029
|
*/
|
|
3030
3030
|
retrieve(environmentID, params = {}, options) {
|
|
3031
3031
|
const { betas } = params ?? {};
|
|
3032
|
-
return this._client.get(path$
|
|
3032
|
+
return this._client.get(path$14`/v1/environments/${environmentID}?beta=true`, {
|
|
3033
3033
|
...options,
|
|
3034
3034
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
3035
3035
|
});
|
|
@@ -3047,7 +3047,7 @@ var Environments = class extends APIResource$2 {
|
|
|
3047
3047
|
*/
|
|
3048
3048
|
update(environmentID, params, options) {
|
|
3049
3049
|
const { betas, ...body } = params;
|
|
3050
|
-
return this._client.post(path$
|
|
3050
|
+
return this._client.post(path$14`/v1/environments/${environmentID}?beta=true`, {
|
|
3051
3051
|
body,
|
|
3052
3052
|
...options,
|
|
3053
3053
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -3085,7 +3085,7 @@ var Environments = class extends APIResource$2 {
|
|
|
3085
3085
|
*/
|
|
3086
3086
|
delete(environmentID, params = {}, options) {
|
|
3087
3087
|
const { betas } = params ?? {};
|
|
3088
|
-
return this._client.delete(path$
|
|
3088
|
+
return this._client.delete(path$14`/v1/environments/${environmentID}?beta=true`, {
|
|
3089
3089
|
...options,
|
|
3090
3090
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
3091
3091
|
});
|
|
@@ -3104,7 +3104,7 @@ var Environments = class extends APIResource$2 {
|
|
|
3104
3104
|
*/
|
|
3105
3105
|
archive(environmentID, params = {}, options) {
|
|
3106
3106
|
const { betas } = params ?? {};
|
|
3107
|
-
return this._client.post(path$
|
|
3107
|
+
return this._client.post(path$14`/v1/environments/${environmentID}/archive?beta=true`, {
|
|
3108
3108
|
...options,
|
|
3109
3109
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
3110
3110
|
});
|
|
@@ -3191,7 +3191,7 @@ var Files$4 = class extends APIResource$2 {
|
|
|
3191
3191
|
*/
|
|
3192
3192
|
delete(fileID, params = {}, options) {
|
|
3193
3193
|
const { betas } = params ?? {};
|
|
3194
|
-
return this._client.delete(path$
|
|
3194
|
+
return this._client.delete(path$14`/v1/files/${fileID}?beta=true`, {
|
|
3195
3195
|
...options,
|
|
3196
3196
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "files-api-2025-04-14"].toString() }, options?.headers])
|
|
3197
3197
|
});
|
|
@@ -3211,7 +3211,7 @@ var Files$4 = class extends APIResource$2 {
|
|
|
3211
3211
|
*/
|
|
3212
3212
|
download(fileID, params = {}, options) {
|
|
3213
3213
|
const { betas } = params ?? {};
|
|
3214
|
-
return this._client.get(path$
|
|
3214
|
+
return this._client.get(path$14`/v1/files/${fileID}/content?beta=true`, {
|
|
3215
3215
|
...options,
|
|
3216
3216
|
headers: buildHeaders$2([{
|
|
3217
3217
|
"anthropic-beta": [...betas ?? [], "files-api-2025-04-14"].toString(),
|
|
@@ -3231,7 +3231,7 @@ var Files$4 = class extends APIResource$2 {
|
|
|
3231
3231
|
*/
|
|
3232
3232
|
retrieveMetadata(fileID, params = {}, options) {
|
|
3233
3233
|
const { betas } = params ?? {};
|
|
3234
|
-
return this._client.get(path$
|
|
3234
|
+
return this._client.get(path$14`/v1/files/${fileID}?beta=true`, {
|
|
3235
3235
|
...options,
|
|
3236
3236
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "files-api-2025-04-14"].toString() }, options?.headers])
|
|
3237
3237
|
});
|
|
@@ -3277,7 +3277,7 @@ var Models$3 = class extends APIResource$2 {
|
|
|
3277
3277
|
*/
|
|
3278
3278
|
retrieve(modelID, params = {}, options) {
|
|
3279
3279
|
const { betas } = params ?? {};
|
|
3280
|
-
return this._client.get(path$
|
|
3280
|
+
return this._client.get(path$14`/v1/models/${modelID}?beta=true`, {
|
|
3281
3281
|
...options,
|
|
3282
3282
|
headers: buildHeaders$2([{ ...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : void 0 }, options?.headers])
|
|
3283
3283
|
});
|
|
@@ -3338,7 +3338,7 @@ var UserProfiles = class extends APIResource$2 {
|
|
|
3338
3338
|
*/
|
|
3339
3339
|
retrieve(userProfileID, params = {}, options) {
|
|
3340
3340
|
const { betas } = params ?? {};
|
|
3341
|
-
return this._client.get(path$
|
|
3341
|
+
return this._client.get(path$14`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
3342
3342
|
...options,
|
|
3343
3343
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "user-profiles-2026-03-24"].toString() }, options?.headers])
|
|
3344
3344
|
});
|
|
@@ -3356,7 +3356,7 @@ var UserProfiles = class extends APIResource$2 {
|
|
|
3356
3356
|
*/
|
|
3357
3357
|
update(userProfileID, params, options) {
|
|
3358
3358
|
const { betas, ...body } = params;
|
|
3359
|
-
return this._client.post(path$
|
|
3359
|
+
return this._client.post(path$14`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
3360
3360
|
body,
|
|
3361
3361
|
...options,
|
|
3362
3362
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "user-profiles-2026-03-24"].toString() }, options?.headers])
|
|
@@ -3394,7 +3394,7 @@ var UserProfiles = class extends APIResource$2 {
|
|
|
3394
3394
|
*/
|
|
3395
3395
|
createEnrollmentURL(userProfileID, params = {}, options) {
|
|
3396
3396
|
const { betas } = params ?? {};
|
|
3397
|
-
return this._client.post(path$
|
|
3397
|
+
return this._client.post(path$14`/v1/user_profiles/${userProfileID}/enrollment_url?beta=true`, {
|
|
3398
3398
|
...options,
|
|
3399
3399
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "user-profiles-2026-03-24"].toString() }, options?.headers])
|
|
3400
3400
|
});
|
|
@@ -4086,7 +4086,7 @@ var Versions$2 = class extends APIResource$2 {
|
|
|
4086
4086
|
*/
|
|
4087
4087
|
list(agentID, params = {}, options) {
|
|
4088
4088
|
const { betas, ...query } = params ?? {};
|
|
4089
|
-
return this._client.getAPIList(path$
|
|
4089
|
+
return this._client.getAPIList(path$14`/v1/agents/${agentID}/versions?beta=true`, PageCursor, {
|
|
4090
4090
|
query,
|
|
4091
4091
|
...options,
|
|
4092
4092
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4133,7 +4133,7 @@ var Agents = class extends APIResource$2 {
|
|
|
4133
4133
|
*/
|
|
4134
4134
|
retrieve(agentID, params = {}, options) {
|
|
4135
4135
|
const { betas, ...query } = params ?? {};
|
|
4136
|
-
return this._client.get(path$
|
|
4136
|
+
return this._client.get(path$14`/v1/agents/${agentID}?beta=true`, {
|
|
4137
4137
|
query,
|
|
4138
4138
|
...options,
|
|
4139
4139
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4153,7 +4153,7 @@ var Agents = class extends APIResource$2 {
|
|
|
4153
4153
|
*/
|
|
4154
4154
|
update(agentID, params, options) {
|
|
4155
4155
|
const { betas, ...body } = params;
|
|
4156
|
-
return this._client.post(path$
|
|
4156
|
+
return this._client.post(path$14`/v1/agents/${agentID}?beta=true`, {
|
|
4157
4157
|
body,
|
|
4158
4158
|
...options,
|
|
4159
4159
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4191,7 +4191,7 @@ var Agents = class extends APIResource$2 {
|
|
|
4191
4191
|
*/
|
|
4192
4192
|
archive(agentID, params = {}, options) {
|
|
4193
4193
|
const { betas } = params ?? {};
|
|
4194
|
-
return this._client.post(path$
|
|
4194
|
+
return this._client.post(path$14`/v1/agents/${agentID}/archive?beta=true`, {
|
|
4195
4195
|
...options,
|
|
4196
4196
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
4197
4197
|
});
|
|
@@ -4215,7 +4215,7 @@ var Memories = class extends APIResource$2 {
|
|
|
4215
4215
|
*/
|
|
4216
4216
|
create(memoryStoreID, params, options) {
|
|
4217
4217
|
const { view, betas, ...body } = params;
|
|
4218
|
-
return this._client.post(path$
|
|
4218
|
+
return this._client.post(path$14`/v1/memory_stores/${memoryStoreID}/memories?beta=true`, {
|
|
4219
4219
|
query: { view },
|
|
4220
4220
|
body,
|
|
4221
4221
|
...options,
|
|
@@ -4236,7 +4236,7 @@ var Memories = class extends APIResource$2 {
|
|
|
4236
4236
|
*/
|
|
4237
4237
|
retrieve(memoryID, params, options) {
|
|
4238
4238
|
const { memory_store_id, betas, ...query } = params;
|
|
4239
|
-
return this._client.get(path$
|
|
4239
|
+
return this._client.get(path$14`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
|
|
4240
4240
|
query,
|
|
4241
4241
|
...options,
|
|
4242
4242
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4256,7 +4256,7 @@ var Memories = class extends APIResource$2 {
|
|
|
4256
4256
|
*/
|
|
4257
4257
|
update(memoryID, params, options) {
|
|
4258
4258
|
const { memory_store_id, view, betas, ...body } = params;
|
|
4259
|
-
return this._client.post(path$
|
|
4259
|
+
return this._client.post(path$14`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
|
|
4260
4260
|
query: { view },
|
|
4261
4261
|
body,
|
|
4262
4262
|
...options,
|
|
@@ -4278,7 +4278,7 @@ var Memories = class extends APIResource$2 {
|
|
|
4278
4278
|
*/
|
|
4279
4279
|
list(memoryStoreID, params = {}, options) {
|
|
4280
4280
|
const { betas, ...query } = params ?? {};
|
|
4281
|
-
return this._client.getAPIList(path$
|
|
4281
|
+
return this._client.getAPIList(path$14`/v1/memory_stores/${memoryStoreID}/memories?beta=true`, PageCursor, {
|
|
4282
4282
|
query,
|
|
4283
4283
|
...options,
|
|
4284
4284
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4298,7 +4298,7 @@ var Memories = class extends APIResource$2 {
|
|
|
4298
4298
|
*/
|
|
4299
4299
|
delete(memoryID, params, options) {
|
|
4300
4300
|
const { memory_store_id, expected_content_sha256, betas } = params;
|
|
4301
|
-
return this._client.delete(path$
|
|
4301
|
+
return this._client.delete(path$14`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
|
|
4302
4302
|
query: { expected_content_sha256 },
|
|
4303
4303
|
...options,
|
|
4304
4304
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4322,7 +4322,7 @@ var MemoryVersions = class extends APIResource$2 {
|
|
|
4322
4322
|
*/
|
|
4323
4323
|
retrieve(memoryVersionID, params, options) {
|
|
4324
4324
|
const { memory_store_id, betas, ...query } = params;
|
|
4325
|
-
return this._client.get(path$
|
|
4325
|
+
return this._client.get(path$14`/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}?beta=true`, {
|
|
4326
4326
|
query,
|
|
4327
4327
|
...options,
|
|
4328
4328
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4343,7 +4343,7 @@ var MemoryVersions = class extends APIResource$2 {
|
|
|
4343
4343
|
*/
|
|
4344
4344
|
list(memoryStoreID, params = {}, options) {
|
|
4345
4345
|
const { betas, ...query } = params ?? {};
|
|
4346
|
-
return this._client.getAPIList(path$
|
|
4346
|
+
return this._client.getAPIList(path$14`/v1/memory_stores/${memoryStoreID}/memory_versions?beta=true`, PageCursor, {
|
|
4347
4347
|
query,
|
|
4348
4348
|
...options,
|
|
4349
4349
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4363,7 +4363,7 @@ var MemoryVersions = class extends APIResource$2 {
|
|
|
4363
4363
|
*/
|
|
4364
4364
|
redact(memoryVersionID, params, options) {
|
|
4365
4365
|
const { memory_store_id, betas } = params;
|
|
4366
|
-
return this._client.post(path$
|
|
4366
|
+
return this._client.post(path$14`/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}/redact?beta=true`, {
|
|
4367
4367
|
...options,
|
|
4368
4368
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
4369
4369
|
});
|
|
@@ -4407,7 +4407,7 @@ var MemoryStores = class extends APIResource$2 {
|
|
|
4407
4407
|
*/
|
|
4408
4408
|
retrieve(memoryStoreID, params = {}, options) {
|
|
4409
4409
|
const { betas } = params ?? {};
|
|
4410
|
-
return this._client.get(path$
|
|
4410
|
+
return this._client.get(path$14`/v1/memory_stores/${memoryStoreID}?beta=true`, {
|
|
4411
4411
|
...options,
|
|
4412
4412
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
4413
4413
|
});
|
|
@@ -4423,7 +4423,7 @@ var MemoryStores = class extends APIResource$2 {
|
|
|
4423
4423
|
*/
|
|
4424
4424
|
update(memoryStoreID, params, options) {
|
|
4425
4425
|
const { betas, ...body } = params;
|
|
4426
|
-
return this._client.post(path$
|
|
4426
|
+
return this._client.post(path$14`/v1/memory_stores/${memoryStoreID}?beta=true`, {
|
|
4427
4427
|
body,
|
|
4428
4428
|
...options,
|
|
4429
4429
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4459,7 +4459,7 @@ var MemoryStores = class extends APIResource$2 {
|
|
|
4459
4459
|
*/
|
|
4460
4460
|
delete(memoryStoreID, params = {}, options) {
|
|
4461
4461
|
const { betas } = params ?? {};
|
|
4462
|
-
return this._client.delete(path$
|
|
4462
|
+
return this._client.delete(path$14`/v1/memory_stores/${memoryStoreID}?beta=true`, {
|
|
4463
4463
|
...options,
|
|
4464
4464
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
4465
4465
|
});
|
|
@@ -4475,7 +4475,7 @@ var MemoryStores = class extends APIResource$2 {
|
|
|
4475
4475
|
*/
|
|
4476
4476
|
archive(memoryStoreID, params = {}, options) {
|
|
4477
4477
|
const { betas } = params ?? {};
|
|
4478
|
-
return this._client.post(path$
|
|
4478
|
+
return this._client.post(path$14`/v1/memory_stores/${memoryStoreID}/archive?beta=true`, {
|
|
4479
4479
|
...options,
|
|
4480
4480
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
4481
4481
|
});
|
|
@@ -4565,7 +4565,7 @@ var Batches$3 = class extends APIResource$2 {
|
|
|
4565
4565
|
*/
|
|
4566
4566
|
retrieve(messageBatchID, params = {}, options) {
|
|
4567
4567
|
const { betas } = params ?? {};
|
|
4568
|
-
return this._client.get(path$
|
|
4568
|
+
return this._client.get(path$14`/v1/messages/batches/${messageBatchID}?beta=true`, {
|
|
4569
4569
|
...options,
|
|
4570
4570
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() }, options?.headers])
|
|
4571
4571
|
});
|
|
@@ -4612,7 +4612,7 @@ var Batches$3 = class extends APIResource$2 {
|
|
|
4612
4612
|
*/
|
|
4613
4613
|
delete(messageBatchID, params = {}, options) {
|
|
4614
4614
|
const { betas } = params ?? {};
|
|
4615
|
-
return this._client.delete(path$
|
|
4615
|
+
return this._client.delete(path$14`/v1/messages/batches/${messageBatchID}?beta=true`, {
|
|
4616
4616
|
...options,
|
|
4617
4617
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() }, options?.headers])
|
|
4618
4618
|
});
|
|
@@ -4641,7 +4641,7 @@ var Batches$3 = class extends APIResource$2 {
|
|
|
4641
4641
|
*/
|
|
4642
4642
|
cancel(messageBatchID, params = {}, options) {
|
|
4643
4643
|
const { betas } = params ?? {};
|
|
4644
|
-
return this._client.post(path$
|
|
4644
|
+
return this._client.post(path$14`/v1/messages/batches/${messageBatchID}/cancel?beta=true`, {
|
|
4645
4645
|
...options,
|
|
4646
4646
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() }, options?.headers])
|
|
4647
4647
|
});
|
|
@@ -5958,7 +5958,7 @@ var Events$1 = class extends APIResource$2 {
|
|
|
5958
5958
|
*/
|
|
5959
5959
|
list(sessionID, params = {}, options) {
|
|
5960
5960
|
const { betas, ...query } = params ?? {};
|
|
5961
|
-
return this._client.getAPIList(path$
|
|
5961
|
+
return this._client.getAPIList(path$14`/v1/sessions/${sessionID}/events?beta=true`, PageCursor, {
|
|
5962
5962
|
query,
|
|
5963
5963
|
...options,
|
|
5964
5964
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -5990,7 +5990,7 @@ var Events$1 = class extends APIResource$2 {
|
|
|
5990
5990
|
*/
|
|
5991
5991
|
send(sessionID, params, options) {
|
|
5992
5992
|
const { betas, ...body } = params;
|
|
5993
|
-
return this._client.post(path$
|
|
5993
|
+
return this._client.post(path$14`/v1/sessions/${sessionID}/events?beta=true`, {
|
|
5994
5994
|
body,
|
|
5995
5995
|
...options,
|
|
5996
5996
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6009,7 +6009,7 @@ var Events$1 = class extends APIResource$2 {
|
|
|
6009
6009
|
*/
|
|
6010
6010
|
stream(sessionID, params = {}, options) {
|
|
6011
6011
|
const { betas } = params ?? {};
|
|
6012
|
-
return this._client.get(path$
|
|
6012
|
+
return this._client.get(path$14`/v1/sessions/${sessionID}/events/stream?beta=true`, {
|
|
6013
6013
|
...options,
|
|
6014
6014
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers]),
|
|
6015
6015
|
stream: true
|
|
@@ -6033,7 +6033,7 @@ var Resources = class extends APIResource$2 {
|
|
|
6033
6033
|
*/
|
|
6034
6034
|
retrieve(resourceID, params, options) {
|
|
6035
6035
|
const { session_id, betas } = params;
|
|
6036
|
-
return this._client.get(path$
|
|
6036
|
+
return this._client.get(path$14`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
|
|
6037
6037
|
...options,
|
|
6038
6038
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6039
6039
|
});
|
|
@@ -6055,7 +6055,7 @@ var Resources = class extends APIResource$2 {
|
|
|
6055
6055
|
*/
|
|
6056
6056
|
update(resourceID, params, options) {
|
|
6057
6057
|
const { session_id, betas, ...body } = params;
|
|
6058
|
-
return this._client.post(path$
|
|
6058
|
+
return this._client.post(path$14`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
|
|
6059
6059
|
body,
|
|
6060
6060
|
...options,
|
|
6061
6061
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6076,7 +6076,7 @@ var Resources = class extends APIResource$2 {
|
|
|
6076
6076
|
*/
|
|
6077
6077
|
list(sessionID, params = {}, options) {
|
|
6078
6078
|
const { betas, ...query } = params ?? {};
|
|
6079
|
-
return this._client.getAPIList(path$
|
|
6079
|
+
return this._client.getAPIList(path$14`/v1/sessions/${sessionID}/resources?beta=true`, PageCursor, {
|
|
6080
6080
|
query,
|
|
6081
6081
|
...options,
|
|
6082
6082
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6096,7 +6096,7 @@ var Resources = class extends APIResource$2 {
|
|
|
6096
6096
|
*/
|
|
6097
6097
|
delete(resourceID, params, options) {
|
|
6098
6098
|
const { session_id, betas } = params;
|
|
6099
|
-
return this._client.delete(path$
|
|
6099
|
+
return this._client.delete(path$14`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
|
|
6100
6100
|
...options,
|
|
6101
6101
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6102
6102
|
});
|
|
@@ -6118,7 +6118,7 @@ var Resources = class extends APIResource$2 {
|
|
|
6118
6118
|
*/
|
|
6119
6119
|
add(sessionID, params, options) {
|
|
6120
6120
|
const { betas, ...body } = params;
|
|
6121
|
-
return this._client.post(path$
|
|
6121
|
+
return this._client.post(path$14`/v1/sessions/${sessionID}/resources?beta=true`, {
|
|
6122
6122
|
body,
|
|
6123
6123
|
...options,
|
|
6124
6124
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6144,7 +6144,7 @@ var Events = class extends APIResource$2 {
|
|
|
6144
6144
|
*/
|
|
6145
6145
|
list(threadID, params, options) {
|
|
6146
6146
|
const { session_id, betas, ...query } = params;
|
|
6147
|
-
return this._client.getAPIList(path$
|
|
6147
|
+
return this._client.getAPIList(path$14`/v1/sessions/${session_id}/threads/${threadID}/events?beta=true`, PageCursor, {
|
|
6148
6148
|
query,
|
|
6149
6149
|
...options,
|
|
6150
6150
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6164,7 +6164,7 @@ var Events = class extends APIResource$2 {
|
|
|
6164
6164
|
*/
|
|
6165
6165
|
stream(threadID, params, options) {
|
|
6166
6166
|
const { session_id, betas } = params;
|
|
6167
|
-
return this._client.get(path$
|
|
6167
|
+
return this._client.get(path$14`/v1/sessions/${session_id}/threads/${threadID}/stream?beta=true`, {
|
|
6168
6168
|
...options,
|
|
6169
6169
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers]),
|
|
6170
6170
|
stream: true
|
|
@@ -6192,7 +6192,7 @@ var Threads$2 = class extends APIResource$2 {
|
|
|
6192
6192
|
*/
|
|
6193
6193
|
retrieve(threadID, params, options) {
|
|
6194
6194
|
const { session_id, betas } = params;
|
|
6195
|
-
return this._client.get(path$
|
|
6195
|
+
return this._client.get(path$14`/v1/sessions/${session_id}/threads/${threadID}?beta=true`, {
|
|
6196
6196
|
...options,
|
|
6197
6197
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6198
6198
|
});
|
|
@@ -6212,7 +6212,7 @@ var Threads$2 = class extends APIResource$2 {
|
|
|
6212
6212
|
*/
|
|
6213
6213
|
list(sessionID, params = {}, options) {
|
|
6214
6214
|
const { betas, ...query } = params ?? {};
|
|
6215
|
-
return this._client.getAPIList(path$
|
|
6215
|
+
return this._client.getAPIList(path$14`/v1/sessions/${sessionID}/threads?beta=true`, PageCursor, {
|
|
6216
6216
|
query,
|
|
6217
6217
|
...options,
|
|
6218
6218
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6232,7 +6232,7 @@ var Threads$2 = class extends APIResource$2 {
|
|
|
6232
6232
|
*/
|
|
6233
6233
|
archive(threadID, params, options) {
|
|
6234
6234
|
const { session_id, betas } = params;
|
|
6235
|
-
return this._client.post(path$
|
|
6235
|
+
return this._client.post(path$14`/v1/sessions/${session_id}/threads/${threadID}/archive?beta=true`, {
|
|
6236
6236
|
...options,
|
|
6237
6237
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6238
6238
|
});
|
|
@@ -6281,7 +6281,7 @@ var Sessions$2 = class extends APIResource$2 {
|
|
|
6281
6281
|
*/
|
|
6282
6282
|
retrieve(sessionID, params = {}, options) {
|
|
6283
6283
|
const { betas } = params ?? {};
|
|
6284
|
-
return this._client.get(path$
|
|
6284
|
+
return this._client.get(path$14`/v1/sessions/${sessionID}?beta=true`, {
|
|
6285
6285
|
...options,
|
|
6286
6286
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6287
6287
|
});
|
|
@@ -6299,7 +6299,7 @@ var Sessions$2 = class extends APIResource$2 {
|
|
|
6299
6299
|
*/
|
|
6300
6300
|
update(sessionID, params, options) {
|
|
6301
6301
|
const { betas, ...body } = params;
|
|
6302
|
-
return this._client.post(path$
|
|
6302
|
+
return this._client.post(path$14`/v1/sessions/${sessionID}?beta=true`, {
|
|
6303
6303
|
body,
|
|
6304
6304
|
...options,
|
|
6305
6305
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6337,7 +6337,7 @@ var Sessions$2 = class extends APIResource$2 {
|
|
|
6337
6337
|
*/
|
|
6338
6338
|
delete(sessionID, params = {}, options) {
|
|
6339
6339
|
const { betas } = params ?? {};
|
|
6340
|
-
return this._client.delete(path$
|
|
6340
|
+
return this._client.delete(path$14`/v1/sessions/${sessionID}?beta=true`, {
|
|
6341
6341
|
...options,
|
|
6342
6342
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6343
6343
|
});
|
|
@@ -6355,7 +6355,7 @@ var Sessions$2 = class extends APIResource$2 {
|
|
|
6355
6355
|
*/
|
|
6356
6356
|
archive(sessionID, params = {}, options) {
|
|
6357
6357
|
const { betas } = params ?? {};
|
|
6358
|
-
return this._client.post(path$
|
|
6358
|
+
return this._client.post(path$14`/v1/sessions/${sessionID}/archive?beta=true`, {
|
|
6359
6359
|
...options,
|
|
6360
6360
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6361
6361
|
});
|
|
@@ -6379,7 +6379,7 @@ var Versions$1 = class extends APIResource$2 {
|
|
|
6379
6379
|
*/
|
|
6380
6380
|
create(skillID, params = {}, options) {
|
|
6381
6381
|
const { betas, ...body } = params ?? {};
|
|
6382
|
-
return this._client.post(path$
|
|
6382
|
+
return this._client.post(path$14`/v1/skills/${skillID}/versions?beta=true`, multipartFormRequestOptions$1({
|
|
6383
6383
|
body,
|
|
6384
6384
|
...options,
|
|
6385
6385
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() }, options?.headers])
|
|
@@ -6398,7 +6398,7 @@ var Versions$1 = class extends APIResource$2 {
|
|
|
6398
6398
|
*/
|
|
6399
6399
|
retrieve(version, params, options) {
|
|
6400
6400
|
const { skill_id, betas } = params;
|
|
6401
|
-
return this._client.get(path$
|
|
6401
|
+
return this._client.get(path$14`/v1/skills/${skill_id}/versions/${version}?beta=true`, {
|
|
6402
6402
|
...options,
|
|
6403
6403
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() }, options?.headers])
|
|
6404
6404
|
});
|
|
@@ -6418,7 +6418,7 @@ var Versions$1 = class extends APIResource$2 {
|
|
|
6418
6418
|
*/
|
|
6419
6419
|
list(skillID, params = {}, options) {
|
|
6420
6420
|
const { betas, ...query } = params ?? {};
|
|
6421
|
-
return this._client.getAPIList(path$
|
|
6421
|
+
return this._client.getAPIList(path$14`/v1/skills/${skillID}/versions?beta=true`, PageCursor, {
|
|
6422
6422
|
query,
|
|
6423
6423
|
...options,
|
|
6424
6424
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() }, options?.headers])
|
|
@@ -6437,7 +6437,7 @@ var Versions$1 = class extends APIResource$2 {
|
|
|
6437
6437
|
*/
|
|
6438
6438
|
delete(version, params, options) {
|
|
6439
6439
|
const { skill_id, betas } = params;
|
|
6440
|
-
return this._client.delete(path$
|
|
6440
|
+
return this._client.delete(path$14`/v1/skills/${skill_id}/versions/${version}?beta=true`, {
|
|
6441
6441
|
...options,
|
|
6442
6442
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() }, options?.headers])
|
|
6443
6443
|
});
|
|
@@ -6476,7 +6476,7 @@ var Skills$1 = class extends APIResource$2 {
|
|
|
6476
6476
|
*/
|
|
6477
6477
|
retrieve(skillID, params = {}, options) {
|
|
6478
6478
|
const { betas } = params ?? {};
|
|
6479
|
-
return this._client.get(path$
|
|
6479
|
+
return this._client.get(path$14`/v1/skills/${skillID}?beta=true`, {
|
|
6480
6480
|
...options,
|
|
6481
6481
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() }, options?.headers])
|
|
6482
6482
|
});
|
|
@@ -6510,7 +6510,7 @@ var Skills$1 = class extends APIResource$2 {
|
|
|
6510
6510
|
*/
|
|
6511
6511
|
delete(skillID, params = {}, options) {
|
|
6512
6512
|
const { betas } = params ?? {};
|
|
6513
|
-
return this._client.delete(path$
|
|
6513
|
+
return this._client.delete(path$14`/v1/skills/${skillID}?beta=true`, {
|
|
6514
6514
|
...options,
|
|
6515
6515
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() }, options?.headers])
|
|
6516
6516
|
});
|
|
@@ -6541,7 +6541,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6541
6541
|
*/
|
|
6542
6542
|
create(vaultID, params, options) {
|
|
6543
6543
|
const { betas, ...body } = params;
|
|
6544
|
-
return this._client.post(path$
|
|
6544
|
+
return this._client.post(path$14`/v1/vaults/${vaultID}/credentials?beta=true`, {
|
|
6545
6545
|
body,
|
|
6546
6546
|
...options,
|
|
6547
6547
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6561,7 +6561,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6561
6561
|
*/
|
|
6562
6562
|
retrieve(credentialID, params, options) {
|
|
6563
6563
|
const { vault_id, betas } = params;
|
|
6564
|
-
return this._client.get(path$
|
|
6564
|
+
return this._client.get(path$14`/v1/vaults/${vault_id}/credentials/${credentialID}?beta=true`, {
|
|
6565
6565
|
...options,
|
|
6566
6566
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6567
6567
|
});
|
|
@@ -6580,7 +6580,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6580
6580
|
*/
|
|
6581
6581
|
update(credentialID, params, options) {
|
|
6582
6582
|
const { vault_id, betas, ...body } = params;
|
|
6583
|
-
return this._client.post(path$
|
|
6583
|
+
return this._client.post(path$14`/v1/vaults/${vault_id}/credentials/${credentialID}?beta=true`, {
|
|
6584
6584
|
body,
|
|
6585
6585
|
...options,
|
|
6586
6586
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6601,7 +6601,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6601
6601
|
*/
|
|
6602
6602
|
list(vaultID, params = {}, options) {
|
|
6603
6603
|
const { betas, ...query } = params ?? {};
|
|
6604
|
-
return this._client.getAPIList(path$
|
|
6604
|
+
return this._client.getAPIList(path$14`/v1/vaults/${vaultID}/credentials?beta=true`, PageCursor, {
|
|
6605
6605
|
query,
|
|
6606
6606
|
...options,
|
|
6607
6607
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6621,7 +6621,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6621
6621
|
*/
|
|
6622
6622
|
delete(credentialID, params, options) {
|
|
6623
6623
|
const { vault_id, betas } = params;
|
|
6624
|
-
return this._client.delete(path$
|
|
6624
|
+
return this._client.delete(path$14`/v1/vaults/${vault_id}/credentials/${credentialID}?beta=true`, {
|
|
6625
6625
|
...options,
|
|
6626
6626
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6627
6627
|
});
|
|
@@ -6640,7 +6640,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6640
6640
|
*/
|
|
6641
6641
|
archive(credentialID, params, options) {
|
|
6642
6642
|
const { vault_id, betas } = params;
|
|
6643
|
-
return this._client.post(path$
|
|
6643
|
+
return this._client.post(path$14`/v1/vaults/${vault_id}/credentials/${credentialID}/archive?beta=true`, {
|
|
6644
6644
|
...options,
|
|
6645
6645
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6646
6646
|
});
|
|
@@ -6659,7 +6659,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6659
6659
|
*/
|
|
6660
6660
|
mcpOAuthValidate(credentialID, params, options) {
|
|
6661
6661
|
const { vault_id, betas } = params;
|
|
6662
|
-
return this._client.post(path$
|
|
6662
|
+
return this._client.post(path$14`/v1/vaults/${vault_id}/credentials/${credentialID}/mcp_oauth_validate?beta=true`, {
|
|
6663
6663
|
...options,
|
|
6664
6664
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6665
6665
|
});
|
|
@@ -6704,7 +6704,7 @@ var Vaults = class extends APIResource$2 {
|
|
|
6704
6704
|
*/
|
|
6705
6705
|
retrieve(vaultID, params = {}, options) {
|
|
6706
6706
|
const { betas } = params ?? {};
|
|
6707
|
-
return this._client.get(path$
|
|
6707
|
+
return this._client.get(path$14`/v1/vaults/${vaultID}?beta=true`, {
|
|
6708
6708
|
...options,
|
|
6709
6709
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6710
6710
|
});
|
|
@@ -6722,7 +6722,7 @@ var Vaults = class extends APIResource$2 {
|
|
|
6722
6722
|
*/
|
|
6723
6723
|
update(vaultID, params, options) {
|
|
6724
6724
|
const { betas, ...body } = params;
|
|
6725
|
-
return this._client.post(path$
|
|
6725
|
+
return this._client.post(path$14`/v1/vaults/${vaultID}?beta=true`, {
|
|
6726
6726
|
body,
|
|
6727
6727
|
...options,
|
|
6728
6728
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6760,7 +6760,7 @@ var Vaults = class extends APIResource$2 {
|
|
|
6760
6760
|
*/
|
|
6761
6761
|
delete(vaultID, params = {}, options) {
|
|
6762
6762
|
const { betas } = params ?? {};
|
|
6763
|
-
return this._client.delete(path$
|
|
6763
|
+
return this._client.delete(path$14`/v1/vaults/${vaultID}?beta=true`, {
|
|
6764
6764
|
...options,
|
|
6765
6765
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6766
6766
|
});
|
|
@@ -6778,7 +6778,7 @@ var Vaults = class extends APIResource$2 {
|
|
|
6778
6778
|
*/
|
|
6779
6779
|
archive(vaultID, params = {}, options) {
|
|
6780
6780
|
const { betas } = params ?? {};
|
|
6781
|
-
return this._client.post(path$
|
|
6781
|
+
return this._client.post(path$14`/v1/vaults/${vaultID}/archive?beta=true`, {
|
|
6782
6782
|
...options,
|
|
6783
6783
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6784
6784
|
});
|
|
@@ -7415,7 +7415,7 @@ var Batches$2 = class extends APIResource$2 {
|
|
|
7415
7415
|
* ```
|
|
7416
7416
|
*/
|
|
7417
7417
|
retrieve(messageBatchID, options) {
|
|
7418
|
-
return this._client.get(path$
|
|
7418
|
+
return this._client.get(path$14`/v1/messages/batches/${messageBatchID}`, options);
|
|
7419
7419
|
}
|
|
7420
7420
|
/**
|
|
7421
7421
|
* List all Message Batches within a Workspace. Most recently created batches are
|
|
@@ -7454,7 +7454,7 @@ var Batches$2 = class extends APIResource$2 {
|
|
|
7454
7454
|
* ```
|
|
7455
7455
|
*/
|
|
7456
7456
|
delete(messageBatchID, options) {
|
|
7457
|
-
return this._client.delete(path$
|
|
7457
|
+
return this._client.delete(path$14`/v1/messages/batches/${messageBatchID}`, options);
|
|
7458
7458
|
}
|
|
7459
7459
|
/**
|
|
7460
7460
|
* Batches may be canceled any time before processing ends. Once cancellation is
|
|
@@ -7478,7 +7478,7 @@ var Batches$2 = class extends APIResource$2 {
|
|
|
7478
7478
|
* ```
|
|
7479
7479
|
*/
|
|
7480
7480
|
cancel(messageBatchID, options) {
|
|
7481
|
-
return this._client.post(path$
|
|
7481
|
+
return this._client.post(path$14`/v1/messages/batches/${messageBatchID}/cancel`, options);
|
|
7482
7482
|
}
|
|
7483
7483
|
/**
|
|
7484
7484
|
* Streams the results of a Message Batch as a `.jsonl` file.
|
|
@@ -7633,7 +7633,7 @@ var Models$2 = class extends APIResource$2 {
|
|
|
7633
7633
|
*/
|
|
7634
7634
|
retrieve(modelID, params = {}, options) {
|
|
7635
7635
|
const { betas } = params ?? {};
|
|
7636
|
-
return this._client.get(path$
|
|
7636
|
+
return this._client.get(path$14`/v1/models/${modelID}`, {
|
|
7637
7637
|
...options,
|
|
7638
7638
|
headers: buildHeaders$2([{ ...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : void 0 }, options?.headers])
|
|
7639
7639
|
});
|
|
@@ -13206,9 +13206,9 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13206
13206
|
exports.removeUndefinedValuesInObject = removeUndefinedValuesInObject;
|
|
13207
13207
|
exports.isValidFile = isValidFile;
|
|
13208
13208
|
exports.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
|
|
13209
|
-
const fs$
|
|
13209
|
+
const fs$16 = __require("fs");
|
|
13210
13210
|
const os$2 = __require("os");
|
|
13211
|
-
const path$
|
|
13211
|
+
const path$13 = __require("path");
|
|
13212
13212
|
const WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
|
|
13213
13213
|
const CLOUDSDK_CONFIG_DIRECTORY = "gcloud";
|
|
13214
13214
|
/**
|
|
@@ -13326,7 +13326,7 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13326
13326
|
*/
|
|
13327
13327
|
async function isValidFile(filePath) {
|
|
13328
13328
|
try {
|
|
13329
|
-
return (await fs$
|
|
13329
|
+
return (await fs$16.promises.lstat(filePath)).isFile();
|
|
13330
13330
|
} catch (e) {
|
|
13331
13331
|
return false;
|
|
13332
13332
|
}
|
|
@@ -13337,8 +13337,8 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13337
13337
|
* @internal
|
|
13338
13338
|
*/
|
|
13339
13339
|
function getWellKnownCertificateConfigFileLocation() {
|
|
13340
|
-
const configDir = process.env.CLOUDSDK_CONFIG || (_isWindows() ? path$
|
|
13341
|
-
return path$
|
|
13340
|
+
const configDir = process.env.CLOUDSDK_CONFIG || (_isWindows() ? path$13.join(process.env.APPDATA || "", CLOUDSDK_CONFIG_DIRECTORY) : path$13.join(process.env.HOME || "", ".config", CLOUDSDK_CONFIG_DIRECTORY));
|
|
13341
|
+
return path$13.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE);
|
|
13342
13342
|
}
|
|
13343
13343
|
/**
|
|
13344
13344
|
* Checks if the current operating system is Windows.
|
|
@@ -15039,11 +15039,11 @@ var require_errorWithCode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15039
15039
|
var require_getCredentials = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15040
15040
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15041
15041
|
exports.getCredentials = getCredentials;
|
|
15042
|
-
const path$
|
|
15043
|
-
const fs$
|
|
15042
|
+
const path$12 = __require("path");
|
|
15043
|
+
const fs$15 = __require("fs");
|
|
15044
15044
|
const util_1$1 = __require("util");
|
|
15045
15045
|
const errorWithCode_1 = require_errorWithCode();
|
|
15046
|
-
const readFile = fs$
|
|
15046
|
+
const readFile = fs$15.readFile ? (0, util_1$1.promisify)(fs$15.readFile) : async () => {
|
|
15047
15047
|
throw new errorWithCode_1.ErrorWithCode("use key rather than keyFile.", "MISSING_CREDENTIALS");
|
|
15048
15048
|
};
|
|
15049
15049
|
var ExtensionFiles;
|
|
@@ -15122,7 +15122,7 @@ var require_getCredentials = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15122
15122
|
* @returns An instance of a class that implements ICredentialsProvider.
|
|
15123
15123
|
*/
|
|
15124
15124
|
static create(keyFilePath) {
|
|
15125
|
-
switch (path$
|
|
15125
|
+
switch (path$12.extname(keyFilePath)) {
|
|
15126
15126
|
case ExtensionFiles.JSON: return new JsonCredentialsProvider(keyFilePath);
|
|
15127
15127
|
case ExtensionFiles.DER:
|
|
15128
15128
|
case ExtensionFiles.CRT:
|
|
@@ -16591,10 +16591,10 @@ var require_filesubjecttokensupplier = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
16591
16591
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16592
16592
|
exports.FileSubjectTokenSupplier = void 0;
|
|
16593
16593
|
const util_1 = __require("util");
|
|
16594
|
-
const fs$
|
|
16595
|
-
const readFile = (0, util_1.promisify)(fs$
|
|
16596
|
-
const realpath = (0, util_1.promisify)(fs$
|
|
16597
|
-
const lstat = (0, util_1.promisify)(fs$
|
|
16594
|
+
const fs$14 = __require("fs");
|
|
16595
|
+
const readFile = (0, util_1.promisify)(fs$14.readFile ?? (() => {}));
|
|
16596
|
+
const realpath = (0, util_1.promisify)(fs$14.realpath ?? (() => {}));
|
|
16597
|
+
const lstat = (0, util_1.promisify)(fs$14.lstat ?? (() => {}));
|
|
16598
16598
|
/**
|
|
16599
16599
|
* Internal subject token supplier implementation used when a file location
|
|
16600
16600
|
* is configured in the credential configuration used to build an {@link IdentityPoolClient}
|
|
@@ -16696,7 +16696,7 @@ var require_certificatesubjecttokensupplier = /* @__PURE__ */ __commonJSMin(((ex
|
|
|
16696
16696
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16697
16697
|
exports.CertificateSubjectTokenSupplier = exports.InvalidConfigurationError = exports.CertificateSourceUnavailableError = exports.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = void 0;
|
|
16698
16698
|
const util_1 = require_util$1();
|
|
16699
|
-
const fs$
|
|
16699
|
+
const fs$13 = __require("fs");
|
|
16700
16700
|
const crypto_1 = __require("crypto");
|
|
16701
16701
|
const https$1 = __require("https");
|
|
16702
16702
|
exports.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = "GOOGLE_API_CERTIFICATE_CONFIG";
|
|
@@ -16791,7 +16791,7 @@ var require_certificatesubjecttokensupplier = /* @__PURE__ */ __commonJSMin(((ex
|
|
|
16791
16791
|
const configPath = this.certificateConfigPath;
|
|
16792
16792
|
let fileContents;
|
|
16793
16793
|
try {
|
|
16794
|
-
fileContents = await fs$
|
|
16794
|
+
fileContents = await fs$13.promises.readFile(configPath, "utf8");
|
|
16795
16795
|
} catch (err) {
|
|
16796
16796
|
throw new CertificateSourceUnavailableError(`Failed to read certificate config file at: ${configPath}`);
|
|
16797
16797
|
}
|
|
@@ -16816,13 +16816,13 @@ var require_certificatesubjecttokensupplier = /* @__PURE__ */ __commonJSMin(((ex
|
|
|
16816
16816
|
async #getKeyAndCert(certPath, keyPath) {
|
|
16817
16817
|
let cert, key;
|
|
16818
16818
|
try {
|
|
16819
|
-
cert = await fs$
|
|
16819
|
+
cert = await fs$13.promises.readFile(certPath);
|
|
16820
16820
|
new crypto_1.X509Certificate(cert);
|
|
16821
16821
|
} catch (err) {
|
|
16822
16822
|
throw new CertificateSourceUnavailableError(`Failed to read certificate file at ${certPath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
16823
16823
|
}
|
|
16824
16824
|
try {
|
|
16825
|
-
key = await fs$
|
|
16825
|
+
key = await fs$13.promises.readFile(keyPath);
|
|
16826
16826
|
(0, crypto_1.createPrivateKey)(key);
|
|
16827
16827
|
} catch (err) {
|
|
16828
16828
|
throw new CertificateSourceUnavailableError(`Failed to read private key file at ${keyPath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -16841,7 +16841,7 @@ var require_certificatesubjecttokensupplier = /* @__PURE__ */ __commonJSMin(((ex
|
|
|
16841
16841
|
const leafCert = new crypto_1.X509Certificate(leafCertBuffer);
|
|
16842
16842
|
if (!this.trustChainPath) return JSON.stringify([leafCert.raw.toString("base64")]);
|
|
16843
16843
|
try {
|
|
16844
|
-
const chainCerts = ((await fs$
|
|
16844
|
+
const chainCerts = ((await fs$13.promises.readFile(this.trustChainPath, "utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g) ?? []).map((pem, index) => {
|
|
16845
16845
|
try {
|
|
16846
16846
|
return new crypto_1.X509Certificate(pem);
|
|
16847
16847
|
} catch (err) {
|
|
@@ -17502,7 +17502,7 @@ var require_pluggable_auth_handler = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
17502
17502
|
exports.PluggableAuthHandler = exports.ExecutableError = void 0;
|
|
17503
17503
|
const executable_response_1 = require_executable_response();
|
|
17504
17504
|
const childProcess = __require("child_process");
|
|
17505
|
-
const fs$
|
|
17505
|
+
const fs$12 = __require("fs");
|
|
17506
17506
|
/**
|
|
17507
17507
|
* Error thrown from the executable run by PluggableAuthClient.
|
|
17508
17508
|
*/
|
|
@@ -17579,12 +17579,12 @@ var require_pluggable_auth_handler = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
17579
17579
|
if (!this.outputFile || this.outputFile.length === 0) return;
|
|
17580
17580
|
let filePath;
|
|
17581
17581
|
try {
|
|
17582
|
-
filePath = await fs$
|
|
17582
|
+
filePath = await fs$12.promises.realpath(this.outputFile);
|
|
17583
17583
|
} catch {
|
|
17584
17584
|
return;
|
|
17585
17585
|
}
|
|
17586
|
-
if (!(await fs$
|
|
17587
|
-
const responseString = await fs$
|
|
17586
|
+
if (!(await fs$12.promises.lstat(filePath)).isFile()) return;
|
|
17587
|
+
const responseString = await fs$12.promises.readFile(filePath, { encoding: "utf8" });
|
|
17588
17588
|
if (responseString === "") return;
|
|
17589
17589
|
try {
|
|
17590
17590
|
const responseJson = JSON.parse(responseString);
|
|
@@ -18006,11 +18006,11 @@ var require_googleauth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18006
18006
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18007
18007
|
exports.GoogleAuth = exports.GoogleAuthExceptionMessages = void 0;
|
|
18008
18008
|
const child_process_1 = __require("child_process");
|
|
18009
|
-
const fs$
|
|
18009
|
+
const fs$11 = __require("fs");
|
|
18010
18010
|
const gaxios_1 = require_src$3();
|
|
18011
18011
|
const gcpMetadata = require_src$1();
|
|
18012
18012
|
const os$1 = __require("os");
|
|
18013
|
-
const path$
|
|
18013
|
+
const path$11 = __require("path");
|
|
18014
18014
|
const crypto_1 = require_crypto();
|
|
18015
18015
|
const computeclient_1 = require_computeclient();
|
|
18016
18016
|
const idtokenclient_1 = require_idtokenclient();
|
|
@@ -18250,11 +18250,11 @@ var require_googleauth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18250
18250
|
if (this._isWindows()) location = process.env["APPDATA"];
|
|
18251
18251
|
else {
|
|
18252
18252
|
const home = process.env["HOME"];
|
|
18253
|
-
if (home) location = path$
|
|
18253
|
+
if (home) location = path$11.join(home, ".config");
|
|
18254
18254
|
}
|
|
18255
18255
|
if (location) {
|
|
18256
|
-
location = path$
|
|
18257
|
-
if (!fs$
|
|
18256
|
+
location = path$11.join(location, "gcloud", "application_default_credentials.json");
|
|
18257
|
+
if (!fs$11.existsSync(location)) location = null;
|
|
18258
18258
|
}
|
|
18259
18259
|
if (!location) return null;
|
|
18260
18260
|
return await this._getApplicationCredentialsFromFilePath(location, options);
|
|
@@ -18268,13 +18268,13 @@ var require_googleauth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18268
18268
|
async _getApplicationCredentialsFromFilePath(filePath, options = {}) {
|
|
18269
18269
|
if (!filePath || filePath.length === 0) throw new Error("The file path is invalid.");
|
|
18270
18270
|
try {
|
|
18271
|
-
filePath = fs$
|
|
18272
|
-
if (!fs$
|
|
18271
|
+
filePath = fs$11.realpathSync(filePath);
|
|
18272
|
+
if (!fs$11.lstatSync(filePath).isFile()) throw new Error();
|
|
18273
18273
|
} catch (err) {
|
|
18274
18274
|
if (err instanceof Error) err.message = `The file at ${filePath} does not exist, or it is not a file. ${err.message}`;
|
|
18275
18275
|
throw err;
|
|
18276
18276
|
}
|
|
18277
|
-
const readStream = fs$
|
|
18277
|
+
const readStream = fs$11.createReadStream(filePath);
|
|
18278
18278
|
return this.fromStream(readStream, options);
|
|
18279
18279
|
}
|
|
18280
18280
|
/**
|
|
@@ -18540,8 +18540,8 @@ var require_googleauth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18540
18540
|
async #determineClient() {
|
|
18541
18541
|
if (this.jsonContent) return this._cacheClientFromJSON(this.jsonContent, this.clientOptions);
|
|
18542
18542
|
else if (this.keyFilename) {
|
|
18543
|
-
const filePath = path$
|
|
18544
|
-
const stream = fs$
|
|
18543
|
+
const filePath = path$11.resolve(this.keyFilename);
|
|
18544
|
+
const stream = fs$11.createReadStream(filePath);
|
|
18545
18545
|
return await this.fromStreamAsync(stream, this.clientOptions);
|
|
18546
18546
|
} else if (this.apiKey) {
|
|
18547
18547
|
const client = await this.fromAPIKey(this.apiKey, this.clientOptions);
|
|
@@ -35159,7 +35159,7 @@ const createPathTagFunction$1 = (pathEncoder = encodeURIPath$1) => (function pat
|
|
|
35159
35159
|
/**
|
|
35160
35160
|
* URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced.
|
|
35161
35161
|
*/
|
|
35162
|
-
const path$
|
|
35162
|
+
const path$10 = /* @__PURE__ */ createPathTagFunction$1(encodeURIPath$1);
|
|
35163
35163
|
/**
|
|
35164
35164
|
* @license
|
|
35165
35165
|
* Copyright 2025 Google LLC
|
|
@@ -35171,7 +35171,7 @@ var BaseInteractions = class extends APIResource$1 {
|
|
|
35171
35171
|
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
35172
35172
|
if ("model" in body && "agent_config" in body) throw new GeminiNextGenAPIClientError(`Invalid request: specified \`model\` and \`agent_config\`. If specifying \`model\`, use \`generation_config\`.`);
|
|
35173
35173
|
if ("agent" in body && "generation_config" in body) throw new GeminiNextGenAPIClientError(`Invalid request: specified \`agent\` and \`generation_config\`. If specifying \`agent\`, use \`agent_config\`.`);
|
|
35174
|
-
return this._client.post(path$
|
|
35174
|
+
return this._client.post(path$10`/${api_version}/interactions`, Object.assign(Object.assign({ body }, options), { stream: (_a = params.stream) !== null && _a !== void 0 ? _a : false }));
|
|
35175
35175
|
}
|
|
35176
35176
|
/**
|
|
35177
35177
|
* Deletes the interaction by id.
|
|
@@ -35185,7 +35185,7 @@ var BaseInteractions = class extends APIResource$1 {
|
|
|
35185
35185
|
*/
|
|
35186
35186
|
delete(id, params = {}, options) {
|
|
35187
35187
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
35188
|
-
return this._client.delete(path$
|
|
35188
|
+
return this._client.delete(path$10`/${api_version}/interactions/${id}`, options);
|
|
35189
35189
|
}
|
|
35190
35190
|
/**
|
|
35191
35191
|
* Cancels an interaction by id. This only applies to background interactions that
|
|
@@ -35200,12 +35200,12 @@ var BaseInteractions = class extends APIResource$1 {
|
|
|
35200
35200
|
*/
|
|
35201
35201
|
cancel(id, params = {}, options) {
|
|
35202
35202
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
35203
|
-
return this._client.post(path$
|
|
35203
|
+
return this._client.post(path$10`/${api_version}/interactions/${id}/cancel`, options);
|
|
35204
35204
|
}
|
|
35205
35205
|
get(id, params = {}, options) {
|
|
35206
35206
|
var _a;
|
|
35207
35207
|
const _b = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _b, query = __rest(_b, ["api_version"]);
|
|
35208
|
-
return this._client.get(path$
|
|
35208
|
+
return this._client.get(path$10`/${api_version}/interactions/${id}`, Object.assign(Object.assign({ query }, options), { stream: (_a = params === null || params === void 0 ? void 0 : params.stream) !== null && _a !== void 0 ? _a : false }));
|
|
35209
35209
|
}
|
|
35210
35210
|
};
|
|
35211
35211
|
BaseInteractions._key = Object.freeze(["interactions"]);
|
|
@@ -35221,14 +35221,14 @@ var BaseWebhooks = class extends APIResource$1 {
|
|
|
35221
35221
|
*/
|
|
35222
35222
|
create(params, options) {
|
|
35223
35223
|
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
35224
|
-
return this._client.post(path$
|
|
35224
|
+
return this._client.post(path$10`/${api_version}/webhooks`, Object.assign({ body }, options));
|
|
35225
35225
|
}
|
|
35226
35226
|
/**
|
|
35227
35227
|
* Updates an existing Webhook.
|
|
35228
35228
|
*/
|
|
35229
35229
|
update(id, params = {}, options) {
|
|
35230
35230
|
const _a = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion, update_mask } = _a, body = __rest(_a, ["api_version", "update_mask"]);
|
|
35231
|
-
return this._client.patch(path$
|
|
35231
|
+
return this._client.patch(path$10`/${api_version}/webhooks/${id}`, Object.assign({
|
|
35232
35232
|
query: { update_mask },
|
|
35233
35233
|
body
|
|
35234
35234
|
}, options));
|
|
@@ -35238,35 +35238,35 @@ var BaseWebhooks = class extends APIResource$1 {
|
|
|
35238
35238
|
*/
|
|
35239
35239
|
list(params = {}, options) {
|
|
35240
35240
|
const _a = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a, query = __rest(_a, ["api_version"]);
|
|
35241
|
-
return this._client.get(path$
|
|
35241
|
+
return this._client.get(path$10`/${api_version}/webhooks`, Object.assign({ query }, options));
|
|
35242
35242
|
}
|
|
35243
35243
|
/**
|
|
35244
35244
|
* Deletes a Webhook.
|
|
35245
35245
|
*/
|
|
35246
35246
|
delete(id, params = {}, options) {
|
|
35247
35247
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
35248
|
-
return this._client.delete(path$
|
|
35248
|
+
return this._client.delete(path$10`/${api_version}/webhooks/${id}`, options);
|
|
35249
35249
|
}
|
|
35250
35250
|
/**
|
|
35251
35251
|
* Gets a specific Webhook.
|
|
35252
35252
|
*/
|
|
35253
35253
|
get(id, params = {}, options) {
|
|
35254
35254
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
35255
|
-
return this._client.get(path$
|
|
35255
|
+
return this._client.get(path$10`/${api_version}/webhooks/${id}`, options);
|
|
35256
35256
|
}
|
|
35257
35257
|
/**
|
|
35258
35258
|
* Sends a ping event to a Webhook.
|
|
35259
35259
|
*/
|
|
35260
35260
|
ping(id, params = void 0, options) {
|
|
35261
35261
|
const { api_version = this._client.apiVersion, body } = params !== null && params !== void 0 ? params : {};
|
|
35262
|
-
return this._client.post(path$
|
|
35262
|
+
return this._client.post(path$10`/${api_version}/webhooks/${id}:ping`, Object.assign({ body }, options));
|
|
35263
35263
|
}
|
|
35264
35264
|
/**
|
|
35265
35265
|
* Generates a new signing secret for a Webhook.
|
|
35266
35266
|
*/
|
|
35267
35267
|
rotateSigningSecret(id, params = {}, options) {
|
|
35268
35268
|
const _a = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a, body = __rest(_a, ["api_version"]);
|
|
35269
|
-
return this._client.post(path$
|
|
35269
|
+
return this._client.post(path$10`/${api_version}/webhooks/${id}:rotateSigningSecret`, Object.assign({ body }, options));
|
|
35270
35270
|
}
|
|
35271
35271
|
};
|
|
35272
35272
|
BaseWebhooks._key = Object.freeze(["webhooks"]);
|
|
@@ -37286,7 +37286,7 @@ var NodeUploader = class {
|
|
|
37286
37286
|
type: void 0
|
|
37287
37287
|
};
|
|
37288
37288
|
if (typeof file === "string") {
|
|
37289
|
-
fileStat.size = (await fs$
|
|
37289
|
+
fileStat.size = (await fs$10.stat(file)).size;
|
|
37290
37290
|
fileStat.type = this.inferMimeType(file);
|
|
37291
37291
|
return fileStat;
|
|
37292
37292
|
} else return await getBlobStat(file);
|
|
@@ -37418,7 +37418,7 @@ var NodeUploader = class {
|
|
|
37418
37418
|
let fileHandle;
|
|
37419
37419
|
const fileName = path$1$1.basename(file);
|
|
37420
37420
|
try {
|
|
37421
|
-
fileHandle = await fs$
|
|
37421
|
+
fileHandle = await fs$10.open(file, "r");
|
|
37422
37422
|
if (!fileHandle) throw new Error(`Failed to open file`);
|
|
37423
37423
|
fileSize = (await fileHandle.stat()).size;
|
|
37424
37424
|
while (offset < fileSize) {
|
|
@@ -40139,7 +40139,7 @@ const createPathTagFunction = (pathEncoder = encodeURIPath) => function path(sta
|
|
|
40139
40139
|
/**
|
|
40140
40140
|
* URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced.
|
|
40141
40141
|
*/
|
|
40142
|
-
const path$
|
|
40142
|
+
const path$9 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
40143
40143
|
//#endregion
|
|
40144
40144
|
//#region ../../node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@4.4.3/node_modules/openai/resources/chat/completions/messages.mjs
|
|
40145
40145
|
/**
|
|
@@ -40161,7 +40161,7 @@ var Messages$1 = class extends APIResource {
|
|
|
40161
40161
|
* ```
|
|
40162
40162
|
*/
|
|
40163
40163
|
list(completionID, query = {}, options) {
|
|
40164
|
-
return this._client.getAPIList(path$
|
|
40164
|
+
return this._client.getAPIList(path$9`/chat/completions/${completionID}/messages`, CursorPage, {
|
|
40165
40165
|
query,
|
|
40166
40166
|
...options,
|
|
40167
40167
|
__security: { bearerAuth: true }
|
|
@@ -41317,7 +41317,7 @@ var Completions$1 = class extends APIResource {
|
|
|
41317
41317
|
* ```
|
|
41318
41318
|
*/
|
|
41319
41319
|
retrieve(completionID, options) {
|
|
41320
|
-
return this._client.get(path$
|
|
41320
|
+
return this._client.get(path$9`/chat/completions/${completionID}`, {
|
|
41321
41321
|
...options,
|
|
41322
41322
|
__security: { bearerAuth: true }
|
|
41323
41323
|
});
|
|
@@ -41336,7 +41336,7 @@ var Completions$1 = class extends APIResource {
|
|
|
41336
41336
|
* ```
|
|
41337
41337
|
*/
|
|
41338
41338
|
update(completionID, body, options) {
|
|
41339
|
-
return this._client.post(path$
|
|
41339
|
+
return this._client.post(path$9`/chat/completions/${completionID}`, {
|
|
41340
41340
|
body,
|
|
41341
41341
|
...options,
|
|
41342
41342
|
__security: { bearerAuth: true }
|
|
@@ -41372,7 +41372,7 @@ var Completions$1 = class extends APIResource {
|
|
|
41372
41372
|
* ```
|
|
41373
41373
|
*/
|
|
41374
41374
|
delete(completionID, options) {
|
|
41375
|
-
return this._client.delete(path$
|
|
41375
|
+
return this._client.delete(path$9`/chat/completions/${completionID}`, {
|
|
41376
41376
|
...options,
|
|
41377
41377
|
__security: { bearerAuth: true }
|
|
41378
41378
|
});
|
|
@@ -41441,7 +41441,7 @@ var AdminAPIKeys = class extends APIResource {
|
|
|
41441
41441
|
* ```
|
|
41442
41442
|
*/
|
|
41443
41443
|
retrieve(keyID, options) {
|
|
41444
|
-
return this._client.get(path$
|
|
41444
|
+
return this._client.get(path$9`/organization/admin_api_keys/${keyID}`, {
|
|
41445
41445
|
...options,
|
|
41446
41446
|
__security: { adminAPIKeyAuth: true }
|
|
41447
41447
|
});
|
|
@@ -41476,7 +41476,7 @@ var AdminAPIKeys = class extends APIResource {
|
|
|
41476
41476
|
* ```
|
|
41477
41477
|
*/
|
|
41478
41478
|
delete(keyID, options) {
|
|
41479
|
-
return this._client.delete(path$
|
|
41479
|
+
return this._client.delete(path$9`/organization/admin_api_keys/${keyID}`, {
|
|
41480
41480
|
...options,
|
|
41481
41481
|
__security: { adminAPIKeyAuth: true }
|
|
41482
41482
|
});
|
|
@@ -41545,7 +41545,7 @@ var Certificates$1 = class extends APIResource {
|
|
|
41545
41545
|
* ```
|
|
41546
41546
|
*/
|
|
41547
41547
|
retrieve(certificateID, query = {}, options) {
|
|
41548
|
-
return this._client.get(path$
|
|
41548
|
+
return this._client.get(path$9`/organization/certificates/${certificateID}`, {
|
|
41549
41549
|
query,
|
|
41550
41550
|
...options,
|
|
41551
41551
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -41563,7 +41563,7 @@ var Certificates$1 = class extends APIResource {
|
|
|
41563
41563
|
* ```
|
|
41564
41564
|
*/
|
|
41565
41565
|
update(certificateID, body, options) {
|
|
41566
|
-
return this._client.post(path$
|
|
41566
|
+
return this._client.post(path$9`/organization/certificates/${certificateID}`, {
|
|
41567
41567
|
body,
|
|
41568
41568
|
...options,
|
|
41569
41569
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -41601,7 +41601,7 @@ var Certificates$1 = class extends APIResource {
|
|
|
41601
41601
|
* ```
|
|
41602
41602
|
*/
|
|
41603
41603
|
delete(certificateID, options) {
|
|
41604
|
-
return this._client.delete(path$
|
|
41604
|
+
return this._client.delete(path$9`/organization/certificates/${certificateID}`, {
|
|
41605
41605
|
...options,
|
|
41606
41606
|
__security: { adminAPIKeyAuth: true }
|
|
41607
41607
|
});
|
|
@@ -41725,7 +41725,7 @@ var Invites = class extends APIResource {
|
|
|
41725
41725
|
* ```
|
|
41726
41726
|
*/
|
|
41727
41727
|
retrieve(inviteID, options) {
|
|
41728
|
-
return this._client.get(path$
|
|
41728
|
+
return this._client.get(path$9`/organization/invites/${inviteID}`, {
|
|
41729
41729
|
...options,
|
|
41730
41730
|
__security: { adminAPIKeyAuth: true }
|
|
41731
41731
|
});
|
|
@@ -41760,7 +41760,7 @@ var Invites = class extends APIResource {
|
|
|
41760
41760
|
* ```
|
|
41761
41761
|
*/
|
|
41762
41762
|
delete(inviteID, options) {
|
|
41763
|
-
return this._client.delete(path$
|
|
41763
|
+
return this._client.delete(path$9`/organization/invites/${inviteID}`, {
|
|
41764
41764
|
...options,
|
|
41765
41765
|
__security: { adminAPIKeyAuth: true }
|
|
41766
41766
|
});
|
|
@@ -41798,7 +41798,7 @@ var Roles$5 = class extends APIResource {
|
|
|
41798
41798
|
* ```
|
|
41799
41799
|
*/
|
|
41800
41800
|
retrieve(roleID, options) {
|
|
41801
|
-
return this._client.get(path$
|
|
41801
|
+
return this._client.get(path$9`/organization/roles/${roleID}`, {
|
|
41802
41802
|
...options,
|
|
41803
41803
|
__security: { adminAPIKeyAuth: true }
|
|
41804
41804
|
});
|
|
@@ -41814,7 +41814,7 @@ var Roles$5 = class extends APIResource {
|
|
|
41814
41814
|
* ```
|
|
41815
41815
|
*/
|
|
41816
41816
|
update(roleID, body, options) {
|
|
41817
|
-
return this._client.post(path$
|
|
41817
|
+
return this._client.post(path$9`/organization/roles/${roleID}`, {
|
|
41818
41818
|
body,
|
|
41819
41819
|
...options,
|
|
41820
41820
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -41849,7 +41849,7 @@ var Roles$5 = class extends APIResource {
|
|
|
41849
41849
|
* ```
|
|
41850
41850
|
*/
|
|
41851
41851
|
delete(roleID, options) {
|
|
41852
|
-
return this._client.delete(path$
|
|
41852
|
+
return this._client.delete(path$9`/organization/roles/${roleID}`, {
|
|
41853
41853
|
...options,
|
|
41854
41854
|
__security: { adminAPIKeyAuth: true }
|
|
41855
41855
|
});
|
|
@@ -41903,7 +41903,7 @@ var SpendAlerts$1 = class extends APIResource {
|
|
|
41903
41903
|
* ```
|
|
41904
41904
|
*/
|
|
41905
41905
|
update(alertID, body, options) {
|
|
41906
|
-
return this._client.post(path$
|
|
41906
|
+
return this._client.post(path$9`/organization/spend_alerts/${alertID}`, {
|
|
41907
41907
|
body,
|
|
41908
41908
|
...options,
|
|
41909
41909
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -41939,7 +41939,7 @@ var SpendAlerts$1 = class extends APIResource {
|
|
|
41939
41939
|
* ```
|
|
41940
41940
|
*/
|
|
41941
41941
|
delete(alertID, options) {
|
|
41942
|
-
return this._client.delete(path$
|
|
41942
|
+
return this._client.delete(path$9`/organization/spend_alerts/${alertID}`, {
|
|
41943
41943
|
...options,
|
|
41944
41944
|
__security: { adminAPIKeyAuth: true }
|
|
41945
41945
|
});
|
|
@@ -42163,7 +42163,7 @@ var Roles$4 = class extends APIResource {
|
|
|
42163
42163
|
* ```
|
|
42164
42164
|
*/
|
|
42165
42165
|
create(groupID, body, options) {
|
|
42166
|
-
return this._client.post(path$
|
|
42166
|
+
return this._client.post(path$9`/organization/groups/${groupID}/roles`, {
|
|
42167
42167
|
body,
|
|
42168
42168
|
...options,
|
|
42169
42169
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42183,7 +42183,7 @@ var Roles$4 = class extends APIResource {
|
|
|
42183
42183
|
*/
|
|
42184
42184
|
retrieve(roleID, params, options) {
|
|
42185
42185
|
const { group_id } = params;
|
|
42186
|
-
return this._client.get(path$
|
|
42186
|
+
return this._client.get(path$9`/organization/groups/${group_id}/roles/${roleID}`, {
|
|
42187
42187
|
...options,
|
|
42188
42188
|
__security: { adminAPIKeyAuth: true }
|
|
42189
42189
|
});
|
|
@@ -42202,7 +42202,7 @@ var Roles$4 = class extends APIResource {
|
|
|
42202
42202
|
* ```
|
|
42203
42203
|
*/
|
|
42204
42204
|
list(groupID, query = {}, options) {
|
|
42205
|
-
return this._client.getAPIList(path$
|
|
42205
|
+
return this._client.getAPIList(path$9`/organization/groups/${groupID}/roles`, NextCursorPage, {
|
|
42206
42206
|
query,
|
|
42207
42207
|
...options,
|
|
42208
42208
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42222,7 +42222,7 @@ var Roles$4 = class extends APIResource {
|
|
|
42222
42222
|
*/
|
|
42223
42223
|
delete(roleID, params, options) {
|
|
42224
42224
|
const { group_id } = params;
|
|
42225
|
-
return this._client.delete(path$
|
|
42225
|
+
return this._client.delete(path$9`/organization/groups/${group_id}/roles/${roleID}`, {
|
|
42226
42226
|
...options,
|
|
42227
42227
|
__security: { adminAPIKeyAuth: true }
|
|
42228
42228
|
});
|
|
@@ -42244,7 +42244,7 @@ var Users$2 = class extends APIResource {
|
|
|
42244
42244
|
* ```
|
|
42245
42245
|
*/
|
|
42246
42246
|
create(groupID, body, options) {
|
|
42247
|
-
return this._client.post(path$
|
|
42247
|
+
return this._client.post(path$9`/organization/groups/${groupID}/users`, {
|
|
42248
42248
|
body,
|
|
42249
42249
|
...options,
|
|
42250
42250
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42264,7 +42264,7 @@ var Users$2 = class extends APIResource {
|
|
|
42264
42264
|
*/
|
|
42265
42265
|
retrieve(userID, params, options) {
|
|
42266
42266
|
const { group_id } = params;
|
|
42267
|
-
return this._client.get(path$
|
|
42267
|
+
return this._client.get(path$9`/organization/groups/${group_id}/users/${userID}`, {
|
|
42268
42268
|
...options,
|
|
42269
42269
|
__security: { adminAPIKeyAuth: true }
|
|
42270
42270
|
});
|
|
@@ -42283,7 +42283,7 @@ var Users$2 = class extends APIResource {
|
|
|
42283
42283
|
* ```
|
|
42284
42284
|
*/
|
|
42285
42285
|
list(groupID, query = {}, options) {
|
|
42286
|
-
return this._client.getAPIList(path$
|
|
42286
|
+
return this._client.getAPIList(path$9`/organization/groups/${groupID}/users`, NextCursorPage, {
|
|
42287
42287
|
query,
|
|
42288
42288
|
...options,
|
|
42289
42289
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42303,7 +42303,7 @@ var Users$2 = class extends APIResource {
|
|
|
42303
42303
|
*/
|
|
42304
42304
|
delete(userID, params, options) {
|
|
42305
42305
|
const { group_id } = params;
|
|
42306
|
-
return this._client.delete(path$
|
|
42306
|
+
return this._client.delete(path$9`/organization/groups/${group_id}/users/${userID}`, {
|
|
42307
42307
|
...options,
|
|
42308
42308
|
__security: { adminAPIKeyAuth: true }
|
|
42309
42309
|
});
|
|
@@ -42346,7 +42346,7 @@ var Groups$1 = class extends APIResource {
|
|
|
42346
42346
|
* ```
|
|
42347
42347
|
*/
|
|
42348
42348
|
retrieve(groupID, options) {
|
|
42349
|
-
return this._client.get(path$
|
|
42349
|
+
return this._client.get(path$9`/organization/groups/${groupID}`, {
|
|
42350
42350
|
...options,
|
|
42351
42351
|
__security: { adminAPIKeyAuth: true }
|
|
42352
42352
|
});
|
|
@@ -42363,7 +42363,7 @@ var Groups$1 = class extends APIResource {
|
|
|
42363
42363
|
* ```
|
|
42364
42364
|
*/
|
|
42365
42365
|
update(groupID, body, options) {
|
|
42366
|
-
return this._client.post(path$
|
|
42366
|
+
return this._client.post(path$9`/organization/groups/${groupID}`, {
|
|
42367
42367
|
body,
|
|
42368
42368
|
...options,
|
|
42369
42369
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42398,7 +42398,7 @@ var Groups$1 = class extends APIResource {
|
|
|
42398
42398
|
* ```
|
|
42399
42399
|
*/
|
|
42400
42400
|
delete(groupID, options) {
|
|
42401
|
-
return this._client.delete(path$
|
|
42401
|
+
return this._client.delete(path$9`/organization/groups/${groupID}`, {
|
|
42402
42402
|
...options,
|
|
42403
42403
|
__security: { adminAPIKeyAuth: true }
|
|
42404
42404
|
});
|
|
@@ -42423,7 +42423,7 @@ var APIKeys = class extends APIResource {
|
|
|
42423
42423
|
*/
|
|
42424
42424
|
retrieve(apiKeyID, params, options) {
|
|
42425
42425
|
const { project_id } = params;
|
|
42426
|
-
return this._client.get(path$
|
|
42426
|
+
return this._client.get(path$9`/organization/projects/${project_id}/api_keys/${apiKeyID}`, {
|
|
42427
42427
|
...options,
|
|
42428
42428
|
__security: { adminAPIKeyAuth: true }
|
|
42429
42429
|
});
|
|
@@ -42442,7 +42442,7 @@ var APIKeys = class extends APIResource {
|
|
|
42442
42442
|
* ```
|
|
42443
42443
|
*/
|
|
42444
42444
|
list(projectID, query = {}, options) {
|
|
42445
|
-
return this._client.getAPIList(path$
|
|
42445
|
+
return this._client.getAPIList(path$9`/organization/projects/${projectID}/api_keys`, ConversationCursorPage, {
|
|
42446
42446
|
query,
|
|
42447
42447
|
...options,
|
|
42448
42448
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42465,7 +42465,7 @@ var APIKeys = class extends APIResource {
|
|
|
42465
42465
|
*/
|
|
42466
42466
|
delete(apiKeyID, params, options) {
|
|
42467
42467
|
const { project_id } = params;
|
|
42468
|
-
return this._client.delete(path$
|
|
42468
|
+
return this._client.delete(path$9`/organization/projects/${project_id}/api_keys/${apiKeyID}`, {
|
|
42469
42469
|
...options,
|
|
42470
42470
|
__security: { adminAPIKeyAuth: true }
|
|
42471
42471
|
});
|
|
@@ -42488,7 +42488,7 @@ var Certificates = class extends APIResource {
|
|
|
42488
42488
|
* ```
|
|
42489
42489
|
*/
|
|
42490
42490
|
list(projectID, query = {}, options) {
|
|
42491
|
-
return this._client.getAPIList(path$
|
|
42491
|
+
return this._client.getAPIList(path$9`/organization/projects/${projectID}/certificates`, ConversationCursorPage, {
|
|
42492
42492
|
query,
|
|
42493
42493
|
...options,
|
|
42494
42494
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42511,7 +42511,7 @@ var Certificates = class extends APIResource {
|
|
|
42511
42511
|
* ```
|
|
42512
42512
|
*/
|
|
42513
42513
|
activate(projectID, body, options) {
|
|
42514
|
-
return this._client.getAPIList(path$
|
|
42514
|
+
return this._client.getAPIList(path$9`/organization/projects/${projectID}/certificates/activate`, Page, {
|
|
42515
42515
|
body,
|
|
42516
42516
|
method: "post",
|
|
42517
42517
|
...options,
|
|
@@ -42534,7 +42534,7 @@ var Certificates = class extends APIResource {
|
|
|
42534
42534
|
* ```
|
|
42535
42535
|
*/
|
|
42536
42536
|
deactivate(projectID, body, options) {
|
|
42537
|
-
return this._client.getAPIList(path$
|
|
42537
|
+
return this._client.getAPIList(path$9`/organization/projects/${projectID}/certificates/deactivate`, Page, {
|
|
42538
42538
|
body,
|
|
42539
42539
|
method: "post",
|
|
42540
42540
|
...options,
|
|
@@ -42557,7 +42557,7 @@ var DataRetention = class extends APIResource {
|
|
|
42557
42557
|
* ```
|
|
42558
42558
|
*/
|
|
42559
42559
|
retrieve(projectID, options) {
|
|
42560
|
-
return this._client.get(path$
|
|
42560
|
+
return this._client.get(path$9`/organization/projects/${projectID}/data_retention`, {
|
|
42561
42561
|
...options,
|
|
42562
42562
|
__security: { adminAPIKeyAuth: true }
|
|
42563
42563
|
});
|
|
@@ -42575,7 +42575,7 @@ var DataRetention = class extends APIResource {
|
|
|
42575
42575
|
* ```
|
|
42576
42576
|
*/
|
|
42577
42577
|
update(projectID, body, options) {
|
|
42578
|
-
return this._client.post(path$
|
|
42578
|
+
return this._client.post(path$9`/organization/projects/${projectID}/data_retention`, {
|
|
42579
42579
|
body,
|
|
42580
42580
|
...options,
|
|
42581
42581
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42597,7 +42597,7 @@ var HostedToolPermissions = class extends APIResource {
|
|
|
42597
42597
|
* ```
|
|
42598
42598
|
*/
|
|
42599
42599
|
retrieve(projectID, options) {
|
|
42600
|
-
return this._client.get(path$
|
|
42600
|
+
return this._client.get(path$9`/organization/projects/${projectID}/hosted_tool_permissions`, {
|
|
42601
42601
|
...options,
|
|
42602
42602
|
__security: { adminAPIKeyAuth: true }
|
|
42603
42603
|
});
|
|
@@ -42614,7 +42614,7 @@ var HostedToolPermissions = class extends APIResource {
|
|
|
42614
42614
|
* ```
|
|
42615
42615
|
*/
|
|
42616
42616
|
update(projectID, body, options) {
|
|
42617
|
-
return this._client.post(path$
|
|
42617
|
+
return this._client.post(path$9`/organization/projects/${projectID}/hosted_tool_permissions`, {
|
|
42618
42618
|
body,
|
|
42619
42619
|
...options,
|
|
42620
42620
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42636,7 +42636,7 @@ var ModelPermissions = class extends APIResource {
|
|
|
42636
42636
|
* ```
|
|
42637
42637
|
*/
|
|
42638
42638
|
retrieve(projectID, options) {
|
|
42639
|
-
return this._client.get(path$
|
|
42639
|
+
return this._client.get(path$9`/organization/projects/${projectID}/model_permissions`, {
|
|
42640
42640
|
...options,
|
|
42641
42641
|
__security: { adminAPIKeyAuth: true }
|
|
42642
42642
|
});
|
|
@@ -42654,7 +42654,7 @@ var ModelPermissions = class extends APIResource {
|
|
|
42654
42654
|
* ```
|
|
42655
42655
|
*/
|
|
42656
42656
|
update(projectID, body, options) {
|
|
42657
|
-
return this._client.post(path$
|
|
42657
|
+
return this._client.post(path$9`/organization/projects/${projectID}/model_permissions`, {
|
|
42658
42658
|
body,
|
|
42659
42659
|
...options,
|
|
42660
42660
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42672,7 +42672,7 @@ var ModelPermissions = class extends APIResource {
|
|
|
42672
42672
|
* ```
|
|
42673
42673
|
*/
|
|
42674
42674
|
delete(projectID, options) {
|
|
42675
|
-
return this._client.delete(path$
|
|
42675
|
+
return this._client.delete(path$9`/organization/projects/${projectID}/model_permissions`, {
|
|
42676
42676
|
...options,
|
|
42677
42677
|
__security: { adminAPIKeyAuth: true }
|
|
42678
42678
|
});
|
|
@@ -42695,7 +42695,7 @@ var RateLimits = class extends APIResource {
|
|
|
42695
42695
|
* ```
|
|
42696
42696
|
*/
|
|
42697
42697
|
listRateLimits(projectID, query = {}, options) {
|
|
42698
|
-
return this._client.getAPIList(path$
|
|
42698
|
+
return this._client.getAPIList(path$9`/organization/projects/${projectID}/rate_limits`, ConversationCursorPage, {
|
|
42699
42699
|
query,
|
|
42700
42700
|
...options,
|
|
42701
42701
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42715,7 +42715,7 @@ var RateLimits = class extends APIResource {
|
|
|
42715
42715
|
*/
|
|
42716
42716
|
updateRateLimit(rateLimitID, params, options) {
|
|
42717
42717
|
const { project_id, ...body } = params;
|
|
42718
|
-
return this._client.post(path$
|
|
42718
|
+
return this._client.post(path$9`/organization/projects/${project_id}/rate_limits/${rateLimitID}`, {
|
|
42719
42719
|
body,
|
|
42720
42720
|
...options,
|
|
42721
42721
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42738,7 +42738,7 @@ var Roles$3 = class extends APIResource {
|
|
|
42738
42738
|
* ```
|
|
42739
42739
|
*/
|
|
42740
42740
|
create(projectID, body, options) {
|
|
42741
|
-
return this._client.post(path$
|
|
42741
|
+
return this._client.post(path$9`/projects/${projectID}/roles`, {
|
|
42742
42742
|
body,
|
|
42743
42743
|
...options,
|
|
42744
42744
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42758,7 +42758,7 @@ var Roles$3 = class extends APIResource {
|
|
|
42758
42758
|
*/
|
|
42759
42759
|
retrieve(roleID, params, options) {
|
|
42760
42760
|
const { project_id } = params;
|
|
42761
|
-
return this._client.get(path$
|
|
42761
|
+
return this._client.get(path$9`/projects/${project_id}/roles/${roleID}`, {
|
|
42762
42762
|
...options,
|
|
42763
42763
|
__security: { adminAPIKeyAuth: true }
|
|
42764
42764
|
});
|
|
@@ -42777,7 +42777,7 @@ var Roles$3 = class extends APIResource {
|
|
|
42777
42777
|
*/
|
|
42778
42778
|
update(roleID, params, options) {
|
|
42779
42779
|
const { project_id, ...body } = params;
|
|
42780
|
-
return this._client.post(path$
|
|
42780
|
+
return this._client.post(path$9`/projects/${project_id}/roles/${roleID}`, {
|
|
42781
42781
|
body,
|
|
42782
42782
|
...options,
|
|
42783
42783
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42797,7 +42797,7 @@ var Roles$3 = class extends APIResource {
|
|
|
42797
42797
|
* ```
|
|
42798
42798
|
*/
|
|
42799
42799
|
list(projectID, query = {}, options) {
|
|
42800
|
-
return this._client.getAPIList(path$
|
|
42800
|
+
return this._client.getAPIList(path$9`/projects/${projectID}/roles`, NextCursorPage, {
|
|
42801
42801
|
query,
|
|
42802
42802
|
...options,
|
|
42803
42803
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42817,7 +42817,7 @@ var Roles$3 = class extends APIResource {
|
|
|
42817
42817
|
*/
|
|
42818
42818
|
delete(roleID, params, options) {
|
|
42819
42819
|
const { project_id } = params;
|
|
42820
|
-
return this._client.delete(path$
|
|
42820
|
+
return this._client.delete(path$9`/projects/${project_id}/roles/${roleID}`, {
|
|
42821
42821
|
...options,
|
|
42822
42822
|
__security: { adminAPIKeyAuth: true }
|
|
42823
42823
|
});
|
|
@@ -42840,7 +42840,7 @@ var ServiceAccounts = class extends APIResource {
|
|
|
42840
42840
|
* ```
|
|
42841
42841
|
*/
|
|
42842
42842
|
create(projectID, body, options) {
|
|
42843
|
-
return this._client.post(path$
|
|
42843
|
+
return this._client.post(path$9`/organization/projects/${projectID}/service_accounts`, {
|
|
42844
42844
|
body,
|
|
42845
42845
|
...options,
|
|
42846
42846
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42860,7 +42860,7 @@ var ServiceAccounts = class extends APIResource {
|
|
|
42860
42860
|
*/
|
|
42861
42861
|
retrieve(serviceAccountID, params, options) {
|
|
42862
42862
|
const { project_id } = params;
|
|
42863
|
-
return this._client.get(path$
|
|
42863
|
+
return this._client.get(path$9`/organization/projects/${project_id}/service_accounts/${serviceAccountID}`, {
|
|
42864
42864
|
...options,
|
|
42865
42865
|
__security: { adminAPIKeyAuth: true }
|
|
42866
42866
|
});
|
|
@@ -42879,7 +42879,7 @@ var ServiceAccounts = class extends APIResource {
|
|
|
42879
42879
|
*/
|
|
42880
42880
|
update(serviceAccountID, params, options) {
|
|
42881
42881
|
const { project_id, ...body } = params;
|
|
42882
|
-
return this._client.post(path$
|
|
42882
|
+
return this._client.post(path$9`/organization/projects/${project_id}/service_accounts/${serviceAccountID}`, {
|
|
42883
42883
|
body,
|
|
42884
42884
|
...options,
|
|
42885
42885
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42899,7 +42899,7 @@ var ServiceAccounts = class extends APIResource {
|
|
|
42899
42899
|
* ```
|
|
42900
42900
|
*/
|
|
42901
42901
|
list(projectID, query = {}, options) {
|
|
42902
|
-
return this._client.getAPIList(path$
|
|
42902
|
+
return this._client.getAPIList(path$9`/organization/projects/${projectID}/service_accounts`, ConversationCursorPage, {
|
|
42903
42903
|
query,
|
|
42904
42904
|
...options,
|
|
42905
42905
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42922,7 +42922,7 @@ var ServiceAccounts = class extends APIResource {
|
|
|
42922
42922
|
*/
|
|
42923
42923
|
delete(serviceAccountID, params, options) {
|
|
42924
42924
|
const { project_id } = params;
|
|
42925
|
-
return this._client.delete(path$
|
|
42925
|
+
return this._client.delete(path$9`/organization/projects/${project_id}/service_accounts/${serviceAccountID}`, {
|
|
42926
42926
|
...options,
|
|
42927
42927
|
__security: { adminAPIKeyAuth: true }
|
|
42928
42928
|
});
|
|
@@ -42952,7 +42952,7 @@ var SpendAlerts = class extends APIResource {
|
|
|
42952
42952
|
* ```
|
|
42953
42953
|
*/
|
|
42954
42954
|
create(projectID, body, options) {
|
|
42955
|
-
return this._client.post(path$
|
|
42955
|
+
return this._client.post(path$9`/organization/projects/${projectID}/spend_alerts`, {
|
|
42956
42956
|
body,
|
|
42957
42957
|
...options,
|
|
42958
42958
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42981,7 +42981,7 @@ var SpendAlerts = class extends APIResource {
|
|
|
42981
42981
|
*/
|
|
42982
42982
|
update(alertID, params, options) {
|
|
42983
42983
|
const { project_id, ...body } = params;
|
|
42984
|
-
return this._client.post(path$
|
|
42984
|
+
return this._client.post(path$9`/organization/projects/${project_id}/spend_alerts/${alertID}`, {
|
|
42985
42985
|
body,
|
|
42986
42986
|
...options,
|
|
42987
42987
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43001,7 +43001,7 @@ var SpendAlerts = class extends APIResource {
|
|
|
43001
43001
|
* ```
|
|
43002
43002
|
*/
|
|
43003
43003
|
list(projectID, query = {}, options) {
|
|
43004
|
-
return this._client.getAPIList(path$
|
|
43004
|
+
return this._client.getAPIList(path$9`/organization/projects/${projectID}/spend_alerts`, ConversationCursorPage, {
|
|
43005
43005
|
query,
|
|
43006
43006
|
...options,
|
|
43007
43007
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43021,7 +43021,7 @@ var SpendAlerts = class extends APIResource {
|
|
|
43021
43021
|
*/
|
|
43022
43022
|
delete(alertID, params, options) {
|
|
43023
43023
|
const { project_id } = params;
|
|
43024
|
-
return this._client.delete(path$
|
|
43024
|
+
return this._client.delete(path$9`/organization/projects/${project_id}/spend_alerts/${alertID}`, {
|
|
43025
43025
|
...options,
|
|
43026
43026
|
__security: { adminAPIKeyAuth: true }
|
|
43027
43027
|
});
|
|
@@ -43044,7 +43044,7 @@ var Roles$2 = class extends APIResource {
|
|
|
43044
43044
|
*/
|
|
43045
43045
|
create(groupID, params, options) {
|
|
43046
43046
|
const { project_id, ...body } = params;
|
|
43047
|
-
return this._client.post(path$
|
|
43047
|
+
return this._client.post(path$9`/projects/${project_id}/groups/${groupID}/roles`, {
|
|
43048
43048
|
body,
|
|
43049
43049
|
...options,
|
|
43050
43050
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43064,7 +43064,7 @@ var Roles$2 = class extends APIResource {
|
|
|
43064
43064
|
*/
|
|
43065
43065
|
retrieve(roleID, params, options) {
|
|
43066
43066
|
const { project_id, group_id } = params;
|
|
43067
|
-
return this._client.get(path$
|
|
43067
|
+
return this._client.get(path$9`/projects/${project_id}/groups/${group_id}/roles/${roleID}`, {
|
|
43068
43068
|
...options,
|
|
43069
43069
|
__security: { adminAPIKeyAuth: true }
|
|
43070
43070
|
});
|
|
@@ -43085,7 +43085,7 @@ var Roles$2 = class extends APIResource {
|
|
|
43085
43085
|
*/
|
|
43086
43086
|
list(groupID, params, options) {
|
|
43087
43087
|
const { project_id, ...query } = params;
|
|
43088
|
-
return this._client.getAPIList(path$
|
|
43088
|
+
return this._client.getAPIList(path$9`/projects/${project_id}/groups/${groupID}/roles`, NextCursorPage, {
|
|
43089
43089
|
query,
|
|
43090
43090
|
...options,
|
|
43091
43091
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43105,7 +43105,7 @@ var Roles$2 = class extends APIResource {
|
|
|
43105
43105
|
*/
|
|
43106
43106
|
delete(roleID, params, options) {
|
|
43107
43107
|
const { project_id, group_id } = params;
|
|
43108
|
-
return this._client.delete(path$
|
|
43108
|
+
return this._client.delete(path$9`/projects/${project_id}/groups/${group_id}/roles/${roleID}`, {
|
|
43109
43109
|
...options,
|
|
43110
43110
|
__security: { adminAPIKeyAuth: true }
|
|
43111
43111
|
});
|
|
@@ -43131,7 +43131,7 @@ var Groups = class extends APIResource {
|
|
|
43131
43131
|
* ```
|
|
43132
43132
|
*/
|
|
43133
43133
|
create(projectID, body, options) {
|
|
43134
|
-
return this._client.post(path$
|
|
43134
|
+
return this._client.post(path$9`/organization/projects/${projectID}/groups`, {
|
|
43135
43135
|
body,
|
|
43136
43136
|
...options,
|
|
43137
43137
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43151,7 +43151,7 @@ var Groups = class extends APIResource {
|
|
|
43151
43151
|
*/
|
|
43152
43152
|
retrieve(groupID, params, options) {
|
|
43153
43153
|
const { project_id, ...query } = params;
|
|
43154
|
-
return this._client.get(path$
|
|
43154
|
+
return this._client.get(path$9`/organization/projects/${project_id}/groups/${groupID}`, {
|
|
43155
43155
|
query,
|
|
43156
43156
|
...options,
|
|
43157
43157
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43171,7 +43171,7 @@ var Groups = class extends APIResource {
|
|
|
43171
43171
|
* ```
|
|
43172
43172
|
*/
|
|
43173
43173
|
list(projectID, query = {}, options) {
|
|
43174
|
-
return this._client.getAPIList(path$
|
|
43174
|
+
return this._client.getAPIList(path$9`/organization/projects/${projectID}/groups`, NextCursorPage, {
|
|
43175
43175
|
query,
|
|
43176
43176
|
...options,
|
|
43177
43177
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43191,7 +43191,7 @@ var Groups = class extends APIResource {
|
|
|
43191
43191
|
*/
|
|
43192
43192
|
delete(groupID, params, options) {
|
|
43193
43193
|
const { project_id } = params;
|
|
43194
|
-
return this._client.delete(path$
|
|
43194
|
+
return this._client.delete(path$9`/organization/projects/${project_id}/groups/${groupID}`, {
|
|
43195
43195
|
...options,
|
|
43196
43196
|
__security: { adminAPIKeyAuth: true }
|
|
43197
43197
|
});
|
|
@@ -43215,7 +43215,7 @@ var Roles$1 = class extends APIResource {
|
|
|
43215
43215
|
*/
|
|
43216
43216
|
create(userID, params, options) {
|
|
43217
43217
|
const { project_id, ...body } = params;
|
|
43218
|
-
return this._client.post(path$
|
|
43218
|
+
return this._client.post(path$9`/projects/${project_id}/users/${userID}/roles`, {
|
|
43219
43219
|
body,
|
|
43220
43220
|
...options,
|
|
43221
43221
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43235,7 +43235,7 @@ var Roles$1 = class extends APIResource {
|
|
|
43235
43235
|
*/
|
|
43236
43236
|
retrieve(roleID, params, options) {
|
|
43237
43237
|
const { project_id, user_id } = params;
|
|
43238
|
-
return this._client.get(path$
|
|
43238
|
+
return this._client.get(path$9`/projects/${project_id}/users/${user_id}/roles/${roleID}`, {
|
|
43239
43239
|
...options,
|
|
43240
43240
|
__security: { adminAPIKeyAuth: true }
|
|
43241
43241
|
});
|
|
@@ -43256,7 +43256,7 @@ var Roles$1 = class extends APIResource {
|
|
|
43256
43256
|
*/
|
|
43257
43257
|
list(userID, params, options) {
|
|
43258
43258
|
const { project_id, ...query } = params;
|
|
43259
|
-
return this._client.getAPIList(path$
|
|
43259
|
+
return this._client.getAPIList(path$9`/projects/${project_id}/users/${userID}/roles`, NextCursorPage, {
|
|
43260
43260
|
query,
|
|
43261
43261
|
...options,
|
|
43262
43262
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43276,7 +43276,7 @@ var Roles$1 = class extends APIResource {
|
|
|
43276
43276
|
*/
|
|
43277
43277
|
delete(roleID, params, options) {
|
|
43278
43278
|
const { project_id, user_id } = params;
|
|
43279
|
-
return this._client.delete(path$
|
|
43279
|
+
return this._client.delete(path$9`/projects/${project_id}/users/${user_id}/roles/${roleID}`, {
|
|
43280
43280
|
...options,
|
|
43281
43281
|
__security: { adminAPIKeyAuth: true }
|
|
43282
43282
|
});
|
|
@@ -43303,7 +43303,7 @@ var Users$1 = class extends APIResource {
|
|
|
43303
43303
|
* ```
|
|
43304
43304
|
*/
|
|
43305
43305
|
create(projectID, body, options) {
|
|
43306
|
-
return this._client.post(path$
|
|
43306
|
+
return this._client.post(path$9`/organization/projects/${projectID}/users`, {
|
|
43307
43307
|
body,
|
|
43308
43308
|
...options,
|
|
43309
43309
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43323,7 +43323,7 @@ var Users$1 = class extends APIResource {
|
|
|
43323
43323
|
*/
|
|
43324
43324
|
retrieve(userID, params, options) {
|
|
43325
43325
|
const { project_id } = params;
|
|
43326
|
-
return this._client.get(path$
|
|
43326
|
+
return this._client.get(path$9`/organization/projects/${project_id}/users/${userID}`, {
|
|
43327
43327
|
...options,
|
|
43328
43328
|
__security: { adminAPIKeyAuth: true }
|
|
43329
43329
|
});
|
|
@@ -43342,7 +43342,7 @@ var Users$1 = class extends APIResource {
|
|
|
43342
43342
|
*/
|
|
43343
43343
|
update(userID, params, options) {
|
|
43344
43344
|
const { project_id, ...body } = params;
|
|
43345
|
-
return this._client.post(path$
|
|
43345
|
+
return this._client.post(path$9`/organization/projects/${project_id}/users/${userID}`, {
|
|
43346
43346
|
body,
|
|
43347
43347
|
...options,
|
|
43348
43348
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43362,7 +43362,7 @@ var Users$1 = class extends APIResource {
|
|
|
43362
43362
|
* ```
|
|
43363
43363
|
*/
|
|
43364
43364
|
list(projectID, query = {}, options) {
|
|
43365
|
-
return this._client.getAPIList(path$
|
|
43365
|
+
return this._client.getAPIList(path$9`/organization/projects/${projectID}/users`, ConversationCursorPage, {
|
|
43366
43366
|
query,
|
|
43367
43367
|
...options,
|
|
43368
43368
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43385,7 +43385,7 @@ var Users$1 = class extends APIResource {
|
|
|
43385
43385
|
*/
|
|
43386
43386
|
delete(userID, params, options) {
|
|
43387
43387
|
const { project_id } = params;
|
|
43388
|
-
return this._client.delete(path$
|
|
43388
|
+
return this._client.delete(path$9`/organization/projects/${project_id}/users/${userID}`, {
|
|
43389
43389
|
...options,
|
|
43390
43390
|
__security: { adminAPIKeyAuth: true }
|
|
43391
43391
|
});
|
|
@@ -43440,7 +43440,7 @@ var Projects = class extends APIResource {
|
|
|
43440
43440
|
* ```
|
|
43441
43441
|
*/
|
|
43442
43442
|
retrieve(projectID, options) {
|
|
43443
|
-
return this._client.get(path$
|
|
43443
|
+
return this._client.get(path$9`/organization/projects/${projectID}`, {
|
|
43444
43444
|
...options,
|
|
43445
43445
|
__security: { adminAPIKeyAuth: true }
|
|
43446
43446
|
});
|
|
@@ -43457,7 +43457,7 @@ var Projects = class extends APIResource {
|
|
|
43457
43457
|
* ```
|
|
43458
43458
|
*/
|
|
43459
43459
|
update(projectID, body, options) {
|
|
43460
|
-
return this._client.post(path$
|
|
43460
|
+
return this._client.post(path$9`/organization/projects/${projectID}`, {
|
|
43461
43461
|
body,
|
|
43462
43462
|
...options,
|
|
43463
43463
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43494,7 +43494,7 @@ var Projects = class extends APIResource {
|
|
|
43494
43494
|
* ```
|
|
43495
43495
|
*/
|
|
43496
43496
|
archive(projectID, options) {
|
|
43497
|
-
return this._client.post(path$
|
|
43497
|
+
return this._client.post(path$9`/organization/projects/${projectID}/archive`, {
|
|
43498
43498
|
...options,
|
|
43499
43499
|
__security: { adminAPIKeyAuth: true }
|
|
43500
43500
|
});
|
|
@@ -43527,7 +43527,7 @@ var Roles = class extends APIResource {
|
|
|
43527
43527
|
* ```
|
|
43528
43528
|
*/
|
|
43529
43529
|
create(userID, body, options) {
|
|
43530
|
-
return this._client.post(path$
|
|
43530
|
+
return this._client.post(path$9`/organization/users/${userID}/roles`, {
|
|
43531
43531
|
body,
|
|
43532
43532
|
...options,
|
|
43533
43533
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43547,7 +43547,7 @@ var Roles = class extends APIResource {
|
|
|
43547
43547
|
*/
|
|
43548
43548
|
retrieve(roleID, params, options) {
|
|
43549
43549
|
const { user_id } = params;
|
|
43550
|
-
return this._client.get(path$
|
|
43550
|
+
return this._client.get(path$9`/organization/users/${user_id}/roles/${roleID}`, {
|
|
43551
43551
|
...options,
|
|
43552
43552
|
__security: { adminAPIKeyAuth: true }
|
|
43553
43553
|
});
|
|
@@ -43566,7 +43566,7 @@ var Roles = class extends APIResource {
|
|
|
43566
43566
|
* ```
|
|
43567
43567
|
*/
|
|
43568
43568
|
list(userID, query = {}, options) {
|
|
43569
|
-
return this._client.getAPIList(path$
|
|
43569
|
+
return this._client.getAPIList(path$9`/organization/users/${userID}/roles`, NextCursorPage, {
|
|
43570
43570
|
query,
|
|
43571
43571
|
...options,
|
|
43572
43572
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43586,7 +43586,7 @@ var Roles = class extends APIResource {
|
|
|
43586
43586
|
*/
|
|
43587
43587
|
delete(roleID, params, options) {
|
|
43588
43588
|
const { user_id } = params;
|
|
43589
|
-
return this._client.delete(path$
|
|
43589
|
+
return this._client.delete(path$9`/organization/users/${user_id}/roles/${roleID}`, {
|
|
43590
43590
|
...options,
|
|
43591
43591
|
__security: { adminAPIKeyAuth: true }
|
|
43592
43592
|
});
|
|
@@ -43609,7 +43609,7 @@ var Users = class extends APIResource {
|
|
|
43609
43609
|
* ```
|
|
43610
43610
|
*/
|
|
43611
43611
|
retrieve(userID, options) {
|
|
43612
|
-
return this._client.get(path$
|
|
43612
|
+
return this._client.get(path$9`/organization/users/${userID}`, {
|
|
43613
43613
|
...options,
|
|
43614
43614
|
__security: { adminAPIKeyAuth: true }
|
|
43615
43615
|
});
|
|
@@ -43624,7 +43624,7 @@ var Users = class extends APIResource {
|
|
|
43624
43624
|
* ```
|
|
43625
43625
|
*/
|
|
43626
43626
|
update(userID, body, options) {
|
|
43627
|
-
return this._client.post(path$
|
|
43627
|
+
return this._client.post(path$9`/organization/users/${userID}`, {
|
|
43628
43628
|
body,
|
|
43629
43629
|
...options,
|
|
43630
43630
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43659,7 +43659,7 @@ var Users = class extends APIResource {
|
|
|
43659
43659
|
* ```
|
|
43660
43660
|
*/
|
|
43661
43661
|
delete(userID, options) {
|
|
43662
|
-
return this._client.delete(path$
|
|
43662
|
+
return this._client.delete(path$9`/organization/users/${userID}`, {
|
|
43663
43663
|
...options,
|
|
43664
43664
|
__security: { adminAPIKeyAuth: true }
|
|
43665
43665
|
});
|
|
@@ -43861,7 +43861,7 @@ var Batches = class extends APIResource {
|
|
|
43861
43861
|
* Retrieves a batch.
|
|
43862
43862
|
*/
|
|
43863
43863
|
retrieve(batchID, options) {
|
|
43864
|
-
return this._client.get(path$
|
|
43864
|
+
return this._client.get(path$9`/batches/${batchID}`, {
|
|
43865
43865
|
...options,
|
|
43866
43866
|
__security: { bearerAuth: true }
|
|
43867
43867
|
});
|
|
@@ -43882,7 +43882,7 @@ var Batches = class extends APIResource {
|
|
|
43882
43882
|
* (if any) available in the output file.
|
|
43883
43883
|
*/
|
|
43884
43884
|
cancel(batchID, options) {
|
|
43885
|
-
return this._client.post(path$
|
|
43885
|
+
return this._client.post(path$9`/batches/${batchID}/cancel`, {
|
|
43886
43886
|
...options,
|
|
43887
43887
|
__security: { bearerAuth: true }
|
|
43888
43888
|
});
|
|
@@ -43913,7 +43913,7 @@ var Assistants = class extends APIResource {
|
|
|
43913
43913
|
* @deprecated
|
|
43914
43914
|
*/
|
|
43915
43915
|
retrieve(assistantID, options) {
|
|
43916
|
-
return this._client.get(path$
|
|
43916
|
+
return this._client.get(path$9`/assistants/${assistantID}`, {
|
|
43917
43917
|
...options,
|
|
43918
43918
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
43919
43919
|
__security: { bearerAuth: true }
|
|
@@ -43925,7 +43925,7 @@ var Assistants = class extends APIResource {
|
|
|
43925
43925
|
* @deprecated
|
|
43926
43926
|
*/
|
|
43927
43927
|
update(assistantID, body, options) {
|
|
43928
|
-
return this._client.post(path$
|
|
43928
|
+
return this._client.post(path$9`/assistants/${assistantID}`, {
|
|
43929
43929
|
body,
|
|
43930
43930
|
...options,
|
|
43931
43931
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -43951,7 +43951,7 @@ var Assistants = class extends APIResource {
|
|
|
43951
43951
|
* @deprecated
|
|
43952
43952
|
*/
|
|
43953
43953
|
delete(assistantID, options) {
|
|
43954
|
-
return this._client.delete(path$
|
|
43954
|
+
return this._client.delete(path$9`/assistants/${assistantID}`, {
|
|
43955
43955
|
...options,
|
|
43956
43956
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
43957
43957
|
__security: { bearerAuth: true }
|
|
@@ -44061,7 +44061,7 @@ var Sessions = class extends APIResource {
|
|
|
44061
44061
|
* ```
|
|
44062
44062
|
*/
|
|
44063
44063
|
cancel(sessionID, options) {
|
|
44064
|
-
return this._client.post(path$
|
|
44064
|
+
return this._client.post(path$9`/chatkit/sessions/${sessionID}/cancel`, {
|
|
44065
44065
|
...options,
|
|
44066
44066
|
headers: buildHeaders([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers]),
|
|
44067
44067
|
__security: { bearerAuth: true }
|
|
@@ -44081,7 +44081,7 @@ var Threads$1 = class extends APIResource {
|
|
|
44081
44081
|
* ```
|
|
44082
44082
|
*/
|
|
44083
44083
|
retrieve(threadID, options) {
|
|
44084
|
-
return this._client.get(path$
|
|
44084
|
+
return this._client.get(path$9`/chatkit/threads/${threadID}`, {
|
|
44085
44085
|
...options,
|
|
44086
44086
|
headers: buildHeaders([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers]),
|
|
44087
44087
|
__security: { bearerAuth: true }
|
|
@@ -44117,7 +44117,7 @@ var Threads$1 = class extends APIResource {
|
|
|
44117
44117
|
* ```
|
|
44118
44118
|
*/
|
|
44119
44119
|
delete(threadID, options) {
|
|
44120
|
-
return this._client.delete(path$
|
|
44120
|
+
return this._client.delete(path$9`/chatkit/threads/${threadID}`, {
|
|
44121
44121
|
...options,
|
|
44122
44122
|
headers: buildHeaders([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers]),
|
|
44123
44123
|
__security: { bearerAuth: true }
|
|
@@ -44137,7 +44137,7 @@ var Threads$1 = class extends APIResource {
|
|
|
44137
44137
|
* ```
|
|
44138
44138
|
*/
|
|
44139
44139
|
listItems(threadID, query = {}, options) {
|
|
44140
|
-
return this._client.getAPIList(path$
|
|
44140
|
+
return this._client.getAPIList(path$9`/chatkit/threads/${threadID}/items`, ConversationCursorPage, {
|
|
44141
44141
|
query,
|
|
44142
44142
|
...options,
|
|
44143
44143
|
headers: buildHeaders([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers]),
|
|
@@ -44170,7 +44170,7 @@ var Messages = class extends APIResource {
|
|
|
44170
44170
|
* @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
44171
44171
|
*/
|
|
44172
44172
|
create(threadID, body, options) {
|
|
44173
|
-
return this._client.post(path$
|
|
44173
|
+
return this._client.post(path$9`/threads/${threadID}/messages`, {
|
|
44174
44174
|
body,
|
|
44175
44175
|
...options,
|
|
44176
44176
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44184,7 +44184,7 @@ var Messages = class extends APIResource {
|
|
|
44184
44184
|
*/
|
|
44185
44185
|
retrieve(messageID, params, options) {
|
|
44186
44186
|
const { thread_id } = params;
|
|
44187
|
-
return this._client.get(path$
|
|
44187
|
+
return this._client.get(path$9`/threads/${thread_id}/messages/${messageID}`, {
|
|
44188
44188
|
...options,
|
|
44189
44189
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
44190
44190
|
__security: { bearerAuth: true }
|
|
@@ -44197,7 +44197,7 @@ var Messages = class extends APIResource {
|
|
|
44197
44197
|
*/
|
|
44198
44198
|
update(messageID, params, options) {
|
|
44199
44199
|
const { thread_id, ...body } = params;
|
|
44200
|
-
return this._client.post(path$
|
|
44200
|
+
return this._client.post(path$9`/threads/${thread_id}/messages/${messageID}`, {
|
|
44201
44201
|
body,
|
|
44202
44202
|
...options,
|
|
44203
44203
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44210,7 +44210,7 @@ var Messages = class extends APIResource {
|
|
|
44210
44210
|
* @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
44211
44211
|
*/
|
|
44212
44212
|
list(threadID, query = {}, options) {
|
|
44213
|
-
return this._client.getAPIList(path$
|
|
44213
|
+
return this._client.getAPIList(path$9`/threads/${threadID}/messages`, CursorPage, {
|
|
44214
44214
|
query,
|
|
44215
44215
|
...options,
|
|
44216
44216
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44224,7 +44224,7 @@ var Messages = class extends APIResource {
|
|
|
44224
44224
|
*/
|
|
44225
44225
|
delete(messageID, params, options) {
|
|
44226
44226
|
const { thread_id } = params;
|
|
44227
|
-
return this._client.delete(path$
|
|
44227
|
+
return this._client.delete(path$9`/threads/${thread_id}/messages/${messageID}`, {
|
|
44228
44228
|
...options,
|
|
44229
44229
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
44230
44230
|
__security: { bearerAuth: true }
|
|
@@ -44246,7 +44246,7 @@ var Steps = class extends APIResource {
|
|
|
44246
44246
|
*/
|
|
44247
44247
|
retrieve(stepID, params, options) {
|
|
44248
44248
|
const { thread_id, run_id, ...query } = params;
|
|
44249
|
-
return this._client.get(path$
|
|
44249
|
+
return this._client.get(path$9`/threads/${thread_id}/runs/${run_id}/steps/${stepID}`, {
|
|
44250
44250
|
query,
|
|
44251
44251
|
...options,
|
|
44252
44252
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44260,7 +44260,7 @@ var Steps = class extends APIResource {
|
|
|
44260
44260
|
*/
|
|
44261
44261
|
list(runID, params, options) {
|
|
44262
44262
|
const { thread_id, ...query } = params;
|
|
44263
|
-
return this._client.getAPIList(path$
|
|
44263
|
+
return this._client.getAPIList(path$9`/threads/${thread_id}/runs/${runID}/steps`, CursorPage, {
|
|
44264
44264
|
query,
|
|
44265
44265
|
...options,
|
|
44266
44266
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44776,7 +44776,7 @@ var Runs$1 = class extends APIResource {
|
|
|
44776
44776
|
}
|
|
44777
44777
|
create(threadID, params, options) {
|
|
44778
44778
|
const { include, ...body } = params;
|
|
44779
|
-
return this._client.post(path$
|
|
44779
|
+
return this._client.post(path$9`/threads/${threadID}/runs`, {
|
|
44780
44780
|
query: { include },
|
|
44781
44781
|
body,
|
|
44782
44782
|
...options,
|
|
@@ -44793,7 +44793,7 @@ var Runs$1 = class extends APIResource {
|
|
|
44793
44793
|
*/
|
|
44794
44794
|
retrieve(runID, params, options) {
|
|
44795
44795
|
const { thread_id } = params;
|
|
44796
|
-
return this._client.get(path$
|
|
44796
|
+
return this._client.get(path$9`/threads/${thread_id}/runs/${runID}`, {
|
|
44797
44797
|
...options,
|
|
44798
44798
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
44799
44799
|
__security: { bearerAuth: true }
|
|
@@ -44806,7 +44806,7 @@ var Runs$1 = class extends APIResource {
|
|
|
44806
44806
|
*/
|
|
44807
44807
|
update(runID, params, options) {
|
|
44808
44808
|
const { thread_id, ...body } = params;
|
|
44809
|
-
return this._client.post(path$
|
|
44809
|
+
return this._client.post(path$9`/threads/${thread_id}/runs/${runID}`, {
|
|
44810
44810
|
body,
|
|
44811
44811
|
...options,
|
|
44812
44812
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44819,7 +44819,7 @@ var Runs$1 = class extends APIResource {
|
|
|
44819
44819
|
* @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
44820
44820
|
*/
|
|
44821
44821
|
list(threadID, query = {}, options) {
|
|
44822
|
-
return this._client.getAPIList(path$
|
|
44822
|
+
return this._client.getAPIList(path$9`/threads/${threadID}/runs`, CursorPage, {
|
|
44823
44823
|
query,
|
|
44824
44824
|
...options,
|
|
44825
44825
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44833,7 +44833,7 @@ var Runs$1 = class extends APIResource {
|
|
|
44833
44833
|
*/
|
|
44834
44834
|
cancel(runID, params, options) {
|
|
44835
44835
|
const { thread_id } = params;
|
|
44836
|
-
return this._client.post(path$
|
|
44836
|
+
return this._client.post(path$9`/threads/${thread_id}/runs/${runID}/cancel`, {
|
|
44837
44837
|
...options,
|
|
44838
44838
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
44839
44839
|
__security: { bearerAuth: true }
|
|
@@ -44906,7 +44906,7 @@ var Runs$1 = class extends APIResource {
|
|
|
44906
44906
|
}
|
|
44907
44907
|
submitToolOutputs(runID, params, options) {
|
|
44908
44908
|
const { thread_id, ...body } = params;
|
|
44909
|
-
return this._client.post(path$
|
|
44909
|
+
return this._client.post(path$9`/threads/${thread_id}/runs/${runID}/submit_tool_outputs`, {
|
|
44910
44910
|
body,
|
|
44911
44911
|
...options,
|
|
44912
44912
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44966,7 +44966,7 @@ var Threads = class extends APIResource {
|
|
|
44966
44966
|
* @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
44967
44967
|
*/
|
|
44968
44968
|
retrieve(threadID, options) {
|
|
44969
|
-
return this._client.get(path$
|
|
44969
|
+
return this._client.get(path$9`/threads/${threadID}`, {
|
|
44970
44970
|
...options,
|
|
44971
44971
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
44972
44972
|
__security: { bearerAuth: true }
|
|
@@ -44978,7 +44978,7 @@ var Threads = class extends APIResource {
|
|
|
44978
44978
|
* @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
44979
44979
|
*/
|
|
44980
44980
|
update(threadID, body, options) {
|
|
44981
|
-
return this._client.post(path$
|
|
44981
|
+
return this._client.post(path$9`/threads/${threadID}`, {
|
|
44982
44982
|
body,
|
|
44983
44983
|
...options,
|
|
44984
44984
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44991,7 +44991,7 @@ var Threads = class extends APIResource {
|
|
|
44991
44991
|
* @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
44992
44992
|
*/
|
|
44993
44993
|
delete(threadID, options) {
|
|
44994
|
-
return this._client.delete(path$
|
|
44994
|
+
return this._client.delete(path$9`/threads/${threadID}`, {
|
|
44995
44995
|
...options,
|
|
44996
44996
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
44997
44997
|
__security: { bearerAuth: true }
|
|
@@ -45063,7 +45063,7 @@ var Content$2 = class extends APIResource {
|
|
|
45063
45063
|
*/
|
|
45064
45064
|
retrieve(fileID, params, options) {
|
|
45065
45065
|
const { container_id } = params;
|
|
45066
|
-
return this._client.get(path$
|
|
45066
|
+
return this._client.get(path$9`/containers/${container_id}/files/${fileID}/content`, {
|
|
45067
45067
|
...options,
|
|
45068
45068
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
45069
45069
|
__security: { bearerAuth: true },
|
|
@@ -45085,7 +45085,7 @@ var Files$2 = class extends APIResource {
|
|
|
45085
45085
|
* a JSON request with a file ID.
|
|
45086
45086
|
*/
|
|
45087
45087
|
create(containerID, body, options) {
|
|
45088
|
-
return this._client.post(path$
|
|
45088
|
+
return this._client.post(path$9`/containers/${containerID}/files`, maybeMultipartFormRequestOptions({
|
|
45089
45089
|
body,
|
|
45090
45090
|
...options,
|
|
45091
45091
|
__security: { bearerAuth: true }
|
|
@@ -45096,7 +45096,7 @@ var Files$2 = class extends APIResource {
|
|
|
45096
45096
|
*/
|
|
45097
45097
|
retrieve(fileID, params, options) {
|
|
45098
45098
|
const { container_id } = params;
|
|
45099
|
-
return this._client.get(path$
|
|
45099
|
+
return this._client.get(path$9`/containers/${container_id}/files/${fileID}`, {
|
|
45100
45100
|
...options,
|
|
45101
45101
|
__security: { bearerAuth: true }
|
|
45102
45102
|
});
|
|
@@ -45105,7 +45105,7 @@ var Files$2 = class extends APIResource {
|
|
|
45105
45105
|
* List Container files
|
|
45106
45106
|
*/
|
|
45107
45107
|
list(containerID, query = {}, options) {
|
|
45108
|
-
return this._client.getAPIList(path$
|
|
45108
|
+
return this._client.getAPIList(path$9`/containers/${containerID}/files`, CursorPage, {
|
|
45109
45109
|
query,
|
|
45110
45110
|
...options,
|
|
45111
45111
|
__security: { bearerAuth: true }
|
|
@@ -45116,7 +45116,7 @@ var Files$2 = class extends APIResource {
|
|
|
45116
45116
|
*/
|
|
45117
45117
|
delete(fileID, params, options) {
|
|
45118
45118
|
const { container_id } = params;
|
|
45119
|
-
return this._client.delete(path$
|
|
45119
|
+
return this._client.delete(path$9`/containers/${container_id}/files/${fileID}`, {
|
|
45120
45120
|
...options,
|
|
45121
45121
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
45122
45122
|
__security: { bearerAuth: true }
|
|
@@ -45145,7 +45145,7 @@ var Containers = class extends APIResource {
|
|
|
45145
45145
|
* Retrieve Container
|
|
45146
45146
|
*/
|
|
45147
45147
|
retrieve(containerID, options) {
|
|
45148
|
-
return this._client.get(path$
|
|
45148
|
+
return this._client.get(path$9`/containers/${containerID}`, {
|
|
45149
45149
|
...options,
|
|
45150
45150
|
__security: { bearerAuth: true }
|
|
45151
45151
|
});
|
|
@@ -45164,7 +45164,7 @@ var Containers = class extends APIResource {
|
|
|
45164
45164
|
* Delete Container
|
|
45165
45165
|
*/
|
|
45166
45166
|
delete(containerID, options) {
|
|
45167
|
-
return this._client.delete(path$
|
|
45167
|
+
return this._client.delete(path$9`/containers/${containerID}`, {
|
|
45168
45168
|
...options,
|
|
45169
45169
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
45170
45170
|
__security: { bearerAuth: true }
|
|
@@ -45183,7 +45183,7 @@ var Items = class extends APIResource {
|
|
|
45183
45183
|
*/
|
|
45184
45184
|
create(conversationID, params, options) {
|
|
45185
45185
|
const { include, ...body } = params;
|
|
45186
|
-
return this._client.post(path$
|
|
45186
|
+
return this._client.post(path$9`/conversations/${conversationID}/items`, {
|
|
45187
45187
|
query: { include },
|
|
45188
45188
|
body,
|
|
45189
45189
|
...options,
|
|
@@ -45195,7 +45195,7 @@ var Items = class extends APIResource {
|
|
|
45195
45195
|
*/
|
|
45196
45196
|
retrieve(itemID, params, options) {
|
|
45197
45197
|
const { conversation_id, ...query } = params;
|
|
45198
|
-
return this._client.get(path$
|
|
45198
|
+
return this._client.get(path$9`/conversations/${conversation_id}/items/${itemID}`, {
|
|
45199
45199
|
query,
|
|
45200
45200
|
...options,
|
|
45201
45201
|
__security: { bearerAuth: true }
|
|
@@ -45205,7 +45205,7 @@ var Items = class extends APIResource {
|
|
|
45205
45205
|
* List all items for a conversation with the given ID.
|
|
45206
45206
|
*/
|
|
45207
45207
|
list(conversationID, query = {}, options) {
|
|
45208
|
-
return this._client.getAPIList(path$
|
|
45208
|
+
return this._client.getAPIList(path$9`/conversations/${conversationID}/items`, ConversationCursorPage, {
|
|
45209
45209
|
query,
|
|
45210
45210
|
...options,
|
|
45211
45211
|
__security: { bearerAuth: true }
|
|
@@ -45216,7 +45216,7 @@ var Items = class extends APIResource {
|
|
|
45216
45216
|
*/
|
|
45217
45217
|
delete(itemID, params, options) {
|
|
45218
45218
|
const { conversation_id } = params;
|
|
45219
|
-
return this._client.delete(path$
|
|
45219
|
+
return this._client.delete(path$9`/conversations/${conversation_id}/items/${itemID}`, {
|
|
45220
45220
|
...options,
|
|
45221
45221
|
__security: { bearerAuth: true }
|
|
45222
45222
|
});
|
|
@@ -45246,7 +45246,7 @@ var Conversations = class extends APIResource {
|
|
|
45246
45246
|
* Get a conversation
|
|
45247
45247
|
*/
|
|
45248
45248
|
retrieve(conversationID, options) {
|
|
45249
|
-
return this._client.get(path$
|
|
45249
|
+
return this._client.get(path$9`/conversations/${conversationID}`, {
|
|
45250
45250
|
...options,
|
|
45251
45251
|
__security: { bearerAuth: true }
|
|
45252
45252
|
});
|
|
@@ -45255,7 +45255,7 @@ var Conversations = class extends APIResource {
|
|
|
45255
45255
|
* Update a conversation
|
|
45256
45256
|
*/
|
|
45257
45257
|
update(conversationID, body, options) {
|
|
45258
|
-
return this._client.post(path$
|
|
45258
|
+
return this._client.post(path$9`/conversations/${conversationID}`, {
|
|
45259
45259
|
body,
|
|
45260
45260
|
...options,
|
|
45261
45261
|
__security: { bearerAuth: true }
|
|
@@ -45265,7 +45265,7 @@ var Conversations = class extends APIResource {
|
|
|
45265
45265
|
* Delete a conversation. Items in the conversation will not be deleted.
|
|
45266
45266
|
*/
|
|
45267
45267
|
delete(conversationID, options) {
|
|
45268
|
-
return this._client.delete(path$
|
|
45268
|
+
return this._client.delete(path$9`/conversations/${conversationID}`, {
|
|
45269
45269
|
...options,
|
|
45270
45270
|
__security: { bearerAuth: true }
|
|
45271
45271
|
});
|
|
@@ -45324,7 +45324,7 @@ var OutputItems = class extends APIResource {
|
|
|
45324
45324
|
*/
|
|
45325
45325
|
retrieve(outputItemID, params, options) {
|
|
45326
45326
|
const { eval_id, run_id } = params;
|
|
45327
|
-
return this._client.get(path$
|
|
45327
|
+
return this._client.get(path$9`/evals/${eval_id}/runs/${run_id}/output_items/${outputItemID}`, {
|
|
45328
45328
|
...options,
|
|
45329
45329
|
__security: { bearerAuth: true }
|
|
45330
45330
|
});
|
|
@@ -45334,7 +45334,7 @@ var OutputItems = class extends APIResource {
|
|
|
45334
45334
|
*/
|
|
45335
45335
|
list(runID, params, options) {
|
|
45336
45336
|
const { eval_id, ...query } = params;
|
|
45337
|
-
return this._client.getAPIList(path$
|
|
45337
|
+
return this._client.getAPIList(path$9`/evals/${eval_id}/runs/${runID}/output_items`, CursorPage, {
|
|
45338
45338
|
query,
|
|
45339
45339
|
...options,
|
|
45340
45340
|
__security: { bearerAuth: true }
|
|
@@ -45357,7 +45357,7 @@ var Runs = class extends APIResource {
|
|
|
45357
45357
|
* schema specified in the config of the evaluation.
|
|
45358
45358
|
*/
|
|
45359
45359
|
create(evalID, body, options) {
|
|
45360
|
-
return this._client.post(path$
|
|
45360
|
+
return this._client.post(path$9`/evals/${evalID}/runs`, {
|
|
45361
45361
|
body,
|
|
45362
45362
|
...options,
|
|
45363
45363
|
__security: { bearerAuth: true }
|
|
@@ -45368,7 +45368,7 @@ var Runs = class extends APIResource {
|
|
|
45368
45368
|
*/
|
|
45369
45369
|
retrieve(runID, params, options) {
|
|
45370
45370
|
const { eval_id } = params;
|
|
45371
|
-
return this._client.get(path$
|
|
45371
|
+
return this._client.get(path$9`/evals/${eval_id}/runs/${runID}`, {
|
|
45372
45372
|
...options,
|
|
45373
45373
|
__security: { bearerAuth: true }
|
|
45374
45374
|
});
|
|
@@ -45377,7 +45377,7 @@ var Runs = class extends APIResource {
|
|
|
45377
45377
|
* Get a list of runs for an evaluation.
|
|
45378
45378
|
*/
|
|
45379
45379
|
list(evalID, query = {}, options) {
|
|
45380
|
-
return this._client.getAPIList(path$
|
|
45380
|
+
return this._client.getAPIList(path$9`/evals/${evalID}/runs`, CursorPage, {
|
|
45381
45381
|
query,
|
|
45382
45382
|
...options,
|
|
45383
45383
|
__security: { bearerAuth: true }
|
|
@@ -45388,7 +45388,7 @@ var Runs = class extends APIResource {
|
|
|
45388
45388
|
*/
|
|
45389
45389
|
delete(runID, params, options) {
|
|
45390
45390
|
const { eval_id } = params;
|
|
45391
|
-
return this._client.delete(path$
|
|
45391
|
+
return this._client.delete(path$9`/evals/${eval_id}/runs/${runID}`, {
|
|
45392
45392
|
...options,
|
|
45393
45393
|
__security: { bearerAuth: true }
|
|
45394
45394
|
});
|
|
@@ -45398,7 +45398,7 @@ var Runs = class extends APIResource {
|
|
|
45398
45398
|
*/
|
|
45399
45399
|
cancel(runID, params, options) {
|
|
45400
45400
|
const { eval_id } = params;
|
|
45401
|
-
return this._client.post(path$
|
|
45401
|
+
return this._client.post(path$9`/evals/${eval_id}/runs/${runID}`, {
|
|
45402
45402
|
...options,
|
|
45403
45403
|
__security: { bearerAuth: true }
|
|
45404
45404
|
});
|
|
@@ -45434,7 +45434,7 @@ var Evals = class extends APIResource {
|
|
|
45434
45434
|
* Get an evaluation by ID.
|
|
45435
45435
|
*/
|
|
45436
45436
|
retrieve(evalID, options) {
|
|
45437
|
-
return this._client.get(path$
|
|
45437
|
+
return this._client.get(path$9`/evals/${evalID}`, {
|
|
45438
45438
|
...options,
|
|
45439
45439
|
__security: { bearerAuth: true }
|
|
45440
45440
|
});
|
|
@@ -45443,7 +45443,7 @@ var Evals = class extends APIResource {
|
|
|
45443
45443
|
* Update certain properties of an evaluation.
|
|
45444
45444
|
*/
|
|
45445
45445
|
update(evalID, body, options) {
|
|
45446
|
-
return this._client.post(path$
|
|
45446
|
+
return this._client.post(path$9`/evals/${evalID}`, {
|
|
45447
45447
|
body,
|
|
45448
45448
|
...options,
|
|
45449
45449
|
__security: { bearerAuth: true }
|
|
@@ -45463,7 +45463,7 @@ var Evals = class extends APIResource {
|
|
|
45463
45463
|
* Delete an evaluation.
|
|
45464
45464
|
*/
|
|
45465
45465
|
delete(evalID, options) {
|
|
45466
|
-
return this._client.delete(path$
|
|
45466
|
+
return this._client.delete(path$9`/evals/${evalID}`, {
|
|
45467
45467
|
...options,
|
|
45468
45468
|
__security: { bearerAuth: true }
|
|
45469
45469
|
});
|
|
@@ -45516,7 +45516,7 @@ var Files$1 = class extends APIResource {
|
|
|
45516
45516
|
* Returns information about a specific file.
|
|
45517
45517
|
*/
|
|
45518
45518
|
retrieve(fileID, options) {
|
|
45519
|
-
return this._client.get(path$
|
|
45519
|
+
return this._client.get(path$9`/files/${fileID}`, {
|
|
45520
45520
|
...options,
|
|
45521
45521
|
__security: { bearerAuth: true }
|
|
45522
45522
|
});
|
|
@@ -45535,7 +45535,7 @@ var Files$1 = class extends APIResource {
|
|
|
45535
45535
|
* Delete a file and remove it from all vector stores.
|
|
45536
45536
|
*/
|
|
45537
45537
|
delete(fileID, options) {
|
|
45538
|
-
return this._client.delete(path$
|
|
45538
|
+
return this._client.delete(path$9`/files/${fileID}`, {
|
|
45539
45539
|
...options,
|
|
45540
45540
|
__security: { bearerAuth: true }
|
|
45541
45541
|
});
|
|
@@ -45544,7 +45544,7 @@ var Files$1 = class extends APIResource {
|
|
|
45544
45544
|
* Returns the contents of the specified file.
|
|
45545
45545
|
*/
|
|
45546
45546
|
content(fileID, options) {
|
|
45547
|
-
return this._client.get(path$
|
|
45547
|
+
return this._client.get(path$9`/files/${fileID}/content`, {
|
|
45548
45548
|
...options,
|
|
45549
45549
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
45550
45550
|
__security: { bearerAuth: true },
|
|
@@ -45661,7 +45661,7 @@ var Permissions = class extends APIResource {
|
|
|
45661
45661
|
* ```
|
|
45662
45662
|
*/
|
|
45663
45663
|
create(fineTunedModelCheckpoint, body, options) {
|
|
45664
|
-
return this._client.getAPIList(path$
|
|
45664
|
+
return this._client.getAPIList(path$9`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, Page, {
|
|
45665
45665
|
body,
|
|
45666
45666
|
method: "post",
|
|
45667
45667
|
...options,
|
|
@@ -45677,7 +45677,7 @@ var Permissions = class extends APIResource {
|
|
|
45677
45677
|
* @deprecated Retrieve is deprecated. Please swap to the paginated list method instead.
|
|
45678
45678
|
*/
|
|
45679
45679
|
retrieve(fineTunedModelCheckpoint, query = {}, options) {
|
|
45680
|
-
return this._client.get(path$
|
|
45680
|
+
return this._client.get(path$9`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, {
|
|
45681
45681
|
query,
|
|
45682
45682
|
...options,
|
|
45683
45683
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -45700,7 +45700,7 @@ var Permissions = class extends APIResource {
|
|
|
45700
45700
|
* ```
|
|
45701
45701
|
*/
|
|
45702
45702
|
list(fineTunedModelCheckpoint, query = {}, options) {
|
|
45703
|
-
return this._client.getAPIList(path$
|
|
45703
|
+
return this._client.getAPIList(path$9`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, ConversationCursorPage, {
|
|
45704
45704
|
query,
|
|
45705
45705
|
...options,
|
|
45706
45706
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -45726,7 +45726,7 @@ var Permissions = class extends APIResource {
|
|
|
45726
45726
|
*/
|
|
45727
45727
|
delete(permissionID, params, options) {
|
|
45728
45728
|
const { fine_tuned_model_checkpoint } = params;
|
|
45729
|
-
return this._client.delete(path$
|
|
45729
|
+
return this._client.delete(path$9`/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, {
|
|
45730
45730
|
...options,
|
|
45731
45731
|
__security: { adminAPIKeyAuth: true }
|
|
45732
45732
|
});
|
|
@@ -45761,7 +45761,7 @@ var Checkpoints = class extends APIResource {
|
|
|
45761
45761
|
* ```
|
|
45762
45762
|
*/
|
|
45763
45763
|
list(fineTuningJobID, query = {}, options) {
|
|
45764
|
-
return this._client.getAPIList(path$
|
|
45764
|
+
return this._client.getAPIList(path$9`/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, CursorPage, {
|
|
45765
45765
|
query,
|
|
45766
45766
|
...options,
|
|
45767
45767
|
__security: { bearerAuth: true }
|
|
@@ -45815,7 +45815,7 @@ var Jobs = class extends APIResource {
|
|
|
45815
45815
|
* ```
|
|
45816
45816
|
*/
|
|
45817
45817
|
retrieve(fineTuningJobID, options) {
|
|
45818
|
-
return this._client.get(path$
|
|
45818
|
+
return this._client.get(path$9`/fine_tuning/jobs/${fineTuningJobID}`, {
|
|
45819
45819
|
...options,
|
|
45820
45820
|
__security: { bearerAuth: true }
|
|
45821
45821
|
});
|
|
@@ -45849,7 +45849,7 @@ var Jobs = class extends APIResource {
|
|
|
45849
45849
|
* ```
|
|
45850
45850
|
*/
|
|
45851
45851
|
cancel(fineTuningJobID, options) {
|
|
45852
|
-
return this._client.post(path$
|
|
45852
|
+
return this._client.post(path$9`/fine_tuning/jobs/${fineTuningJobID}/cancel`, {
|
|
45853
45853
|
...options,
|
|
45854
45854
|
__security: { bearerAuth: true }
|
|
45855
45855
|
});
|
|
@@ -45868,7 +45868,7 @@ var Jobs = class extends APIResource {
|
|
|
45868
45868
|
* ```
|
|
45869
45869
|
*/
|
|
45870
45870
|
listEvents(fineTuningJobID, query = {}, options) {
|
|
45871
|
-
return this._client.getAPIList(path$
|
|
45871
|
+
return this._client.getAPIList(path$9`/fine_tuning/jobs/${fineTuningJobID}/events`, CursorPage, {
|
|
45872
45872
|
query,
|
|
45873
45873
|
...options,
|
|
45874
45874
|
__security: { bearerAuth: true }
|
|
@@ -45885,7 +45885,7 @@ var Jobs = class extends APIResource {
|
|
|
45885
45885
|
* ```
|
|
45886
45886
|
*/
|
|
45887
45887
|
pause(fineTuningJobID, options) {
|
|
45888
|
-
return this._client.post(path$
|
|
45888
|
+
return this._client.post(path$9`/fine_tuning/jobs/${fineTuningJobID}/pause`, {
|
|
45889
45889
|
...options,
|
|
45890
45890
|
__security: { bearerAuth: true }
|
|
45891
45891
|
});
|
|
@@ -45901,7 +45901,7 @@ var Jobs = class extends APIResource {
|
|
|
45901
45901
|
* ```
|
|
45902
45902
|
*/
|
|
45903
45903
|
resume(fineTuningJobID, options) {
|
|
45904
|
-
return this._client.post(path$
|
|
45904
|
+
return this._client.post(path$9`/fine_tuning/jobs/${fineTuningJobID}/resume`, {
|
|
45905
45905
|
...options,
|
|
45906
45906
|
__security: { bearerAuth: true }
|
|
45907
45907
|
});
|
|
@@ -45986,7 +45986,7 @@ var Models = class extends APIResource {
|
|
|
45986
45986
|
* the owner and permissioning.
|
|
45987
45987
|
*/
|
|
45988
45988
|
retrieve(model, options) {
|
|
45989
|
-
return this._client.get(path$
|
|
45989
|
+
return this._client.get(path$9`/models/${model}`, {
|
|
45990
45990
|
...options,
|
|
45991
45991
|
__security: { bearerAuth: true }
|
|
45992
45992
|
});
|
|
@@ -46006,7 +46006,7 @@ var Models = class extends APIResource {
|
|
|
46006
46006
|
* delete a model.
|
|
46007
46007
|
*/
|
|
46008
46008
|
delete(model, options) {
|
|
46009
|
-
return this._client.delete(path$
|
|
46009
|
+
return this._client.delete(path$9`/models/${model}`, {
|
|
46010
46010
|
...options,
|
|
46011
46011
|
__security: { bearerAuth: true }
|
|
46012
46012
|
});
|
|
@@ -46045,7 +46045,7 @@ var Calls = class extends APIResource {
|
|
|
46045
46045
|
* ```
|
|
46046
46046
|
*/
|
|
46047
46047
|
accept(callID, body, options) {
|
|
46048
|
-
return this._client.post(path$
|
|
46048
|
+
return this._client.post(path$9`/realtime/calls/${callID}/accept`, {
|
|
46049
46049
|
body,
|
|
46050
46050
|
...options,
|
|
46051
46051
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
@@ -46061,7 +46061,7 @@ var Calls = class extends APIResource {
|
|
|
46061
46061
|
* ```
|
|
46062
46062
|
*/
|
|
46063
46063
|
hangup(callID, options) {
|
|
46064
|
-
return this._client.post(path$
|
|
46064
|
+
return this._client.post(path$9`/realtime/calls/${callID}/hangup`, {
|
|
46065
46065
|
...options,
|
|
46066
46066
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
46067
46067
|
__security: { bearerAuth: true }
|
|
@@ -46078,7 +46078,7 @@ var Calls = class extends APIResource {
|
|
|
46078
46078
|
* ```
|
|
46079
46079
|
*/
|
|
46080
46080
|
refer(callID, body, options) {
|
|
46081
|
-
return this._client.post(path$
|
|
46081
|
+
return this._client.post(path$9`/realtime/calls/${callID}/refer`, {
|
|
46082
46082
|
body,
|
|
46083
46083
|
...options,
|
|
46084
46084
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
@@ -46094,7 +46094,7 @@ var Calls = class extends APIResource {
|
|
|
46094
46094
|
* ```
|
|
46095
46095
|
*/
|
|
46096
46096
|
reject(callID, body = {}, options) {
|
|
46097
|
-
return this._client.post(path$
|
|
46097
|
+
return this._client.post(path$9`/realtime/calls/${callID}/reject`, {
|
|
46098
46098
|
body,
|
|
46099
46099
|
...options,
|
|
46100
46100
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
@@ -46476,7 +46476,7 @@ var InputItems = class extends APIResource {
|
|
|
46476
46476
|
* ```
|
|
46477
46477
|
*/
|
|
46478
46478
|
list(responseID, query = {}, options) {
|
|
46479
|
-
return this._client.getAPIList(path$
|
|
46479
|
+
return this._client.getAPIList(path$9`/responses/${responseID}/input_items`, CursorPage, {
|
|
46480
46480
|
query,
|
|
46481
46481
|
...options,
|
|
46482
46482
|
__security: { bearerAuth: true }
|
|
@@ -46525,7 +46525,7 @@ var Responses = class extends APIResource {
|
|
|
46525
46525
|
});
|
|
46526
46526
|
}
|
|
46527
46527
|
retrieve(responseID, query = {}, options) {
|
|
46528
|
-
return this._client.get(path$
|
|
46528
|
+
return this._client.get(path$9`/responses/${responseID}`, {
|
|
46529
46529
|
query,
|
|
46530
46530
|
...options,
|
|
46531
46531
|
stream: query?.stream ?? false,
|
|
@@ -46546,7 +46546,7 @@ var Responses = class extends APIResource {
|
|
|
46546
46546
|
* ```
|
|
46547
46547
|
*/
|
|
46548
46548
|
delete(responseID, options) {
|
|
46549
|
-
return this._client.delete(path$
|
|
46549
|
+
return this._client.delete(path$9`/responses/${responseID}`, {
|
|
46550
46550
|
...options,
|
|
46551
46551
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
46552
46552
|
__security: { bearerAuth: true }
|
|
@@ -46574,7 +46574,7 @@ var Responses = class extends APIResource {
|
|
|
46574
46574
|
* ```
|
|
46575
46575
|
*/
|
|
46576
46576
|
cancel(responseID, options) {
|
|
46577
|
-
return this._client.post(path$
|
|
46577
|
+
return this._client.post(path$9`/responses/${responseID}/cancel`, {
|
|
46578
46578
|
...options,
|
|
46579
46579
|
__security: { bearerAuth: true }
|
|
46580
46580
|
});
|
|
@@ -46611,7 +46611,7 @@ var Content$1 = class extends APIResource {
|
|
|
46611
46611
|
* Download a skill zip bundle by its ID.
|
|
46612
46612
|
*/
|
|
46613
46613
|
retrieve(skillID, options) {
|
|
46614
|
-
return this._client.get(path$
|
|
46614
|
+
return this._client.get(path$9`/skills/${skillID}/content`, {
|
|
46615
46615
|
...options,
|
|
46616
46616
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
46617
46617
|
__security: { bearerAuth: true },
|
|
@@ -46627,7 +46627,7 @@ var Content = class extends APIResource {
|
|
|
46627
46627
|
*/
|
|
46628
46628
|
retrieve(version, params, options) {
|
|
46629
46629
|
const { skill_id } = params;
|
|
46630
|
-
return this._client.get(path$
|
|
46630
|
+
return this._client.get(path$9`/skills/${skill_id}/versions/${version}/content`, {
|
|
46631
46631
|
...options,
|
|
46632
46632
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
46633
46633
|
__security: { bearerAuth: true },
|
|
@@ -46646,7 +46646,7 @@ var Versions = class extends APIResource {
|
|
|
46646
46646
|
* Create a new immutable skill version.
|
|
46647
46647
|
*/
|
|
46648
46648
|
create(skillID, body = {}, options) {
|
|
46649
|
-
return this._client.post(path$
|
|
46649
|
+
return this._client.post(path$9`/skills/${skillID}/versions`, maybeMultipartFormRequestOptions({
|
|
46650
46650
|
body,
|
|
46651
46651
|
...options,
|
|
46652
46652
|
__security: { bearerAuth: true }
|
|
@@ -46657,7 +46657,7 @@ var Versions = class extends APIResource {
|
|
|
46657
46657
|
*/
|
|
46658
46658
|
retrieve(version, params, options) {
|
|
46659
46659
|
const { skill_id } = params;
|
|
46660
|
-
return this._client.get(path$
|
|
46660
|
+
return this._client.get(path$9`/skills/${skill_id}/versions/${version}`, {
|
|
46661
46661
|
...options,
|
|
46662
46662
|
__security: { bearerAuth: true }
|
|
46663
46663
|
});
|
|
@@ -46666,7 +46666,7 @@ var Versions = class extends APIResource {
|
|
|
46666
46666
|
* List skill versions for a skill.
|
|
46667
46667
|
*/
|
|
46668
46668
|
list(skillID, query = {}, options) {
|
|
46669
|
-
return this._client.getAPIList(path$
|
|
46669
|
+
return this._client.getAPIList(path$9`/skills/${skillID}/versions`, CursorPage, {
|
|
46670
46670
|
query,
|
|
46671
46671
|
...options,
|
|
46672
46672
|
__security: { bearerAuth: true }
|
|
@@ -46677,7 +46677,7 @@ var Versions = class extends APIResource {
|
|
|
46677
46677
|
*/
|
|
46678
46678
|
delete(version, params, options) {
|
|
46679
46679
|
const { skill_id } = params;
|
|
46680
|
-
return this._client.delete(path$
|
|
46680
|
+
return this._client.delete(path$9`/skills/${skill_id}/versions/${version}`, {
|
|
46681
46681
|
...options,
|
|
46682
46682
|
__security: { bearerAuth: true }
|
|
46683
46683
|
});
|
|
@@ -46706,7 +46706,7 @@ var Skills = class extends APIResource {
|
|
|
46706
46706
|
* Get a skill by its ID.
|
|
46707
46707
|
*/
|
|
46708
46708
|
retrieve(skillID, options) {
|
|
46709
|
-
return this._client.get(path$
|
|
46709
|
+
return this._client.get(path$9`/skills/${skillID}`, {
|
|
46710
46710
|
...options,
|
|
46711
46711
|
__security: { bearerAuth: true }
|
|
46712
46712
|
});
|
|
@@ -46715,7 +46715,7 @@ var Skills = class extends APIResource {
|
|
|
46715
46715
|
* Update the default version pointer for a skill.
|
|
46716
46716
|
*/
|
|
46717
46717
|
update(skillID, body, options) {
|
|
46718
|
-
return this._client.post(path$
|
|
46718
|
+
return this._client.post(path$9`/skills/${skillID}`, {
|
|
46719
46719
|
body,
|
|
46720
46720
|
...options,
|
|
46721
46721
|
__security: { bearerAuth: true }
|
|
@@ -46735,7 +46735,7 @@ var Skills = class extends APIResource {
|
|
|
46735
46735
|
* Delete a skill by its ID.
|
|
46736
46736
|
*/
|
|
46737
46737
|
delete(skillID, options) {
|
|
46738
|
-
return this._client.delete(path$
|
|
46738
|
+
return this._client.delete(path$9`/skills/${skillID}`, {
|
|
46739
46739
|
...options,
|
|
46740
46740
|
__security: { bearerAuth: true }
|
|
46741
46741
|
});
|
|
@@ -46763,7 +46763,7 @@ var Parts = class extends APIResource {
|
|
|
46763
46763
|
* [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).
|
|
46764
46764
|
*/
|
|
46765
46765
|
create(uploadID, body, options) {
|
|
46766
|
-
return this._client.post(path$
|
|
46766
|
+
return this._client.post(path$9`/uploads/${uploadID}/parts`, multipartFormRequestOptions({
|
|
46767
46767
|
body,
|
|
46768
46768
|
...options,
|
|
46769
46769
|
__security: { bearerAuth: true }
|
|
@@ -46816,7 +46816,7 @@ var Uploads = class extends APIResource {
|
|
|
46816
46816
|
* Returns the Upload object with status `cancelled`.
|
|
46817
46817
|
*/
|
|
46818
46818
|
cancel(uploadID, options) {
|
|
46819
|
-
return this._client.post(path$
|
|
46819
|
+
return this._client.post(path$9`/uploads/${uploadID}/cancel`, {
|
|
46820
46820
|
...options,
|
|
46821
46821
|
__security: { bearerAuth: true }
|
|
46822
46822
|
});
|
|
@@ -46839,7 +46839,7 @@ var Uploads = class extends APIResource {
|
|
|
46839
46839
|
* object.
|
|
46840
46840
|
*/
|
|
46841
46841
|
complete(uploadID, body, options) {
|
|
46842
|
-
return this._client.post(path$
|
|
46842
|
+
return this._client.post(path$9`/uploads/${uploadID}/complete`, {
|
|
46843
46843
|
body,
|
|
46844
46844
|
...options,
|
|
46845
46845
|
__security: { bearerAuth: true }
|
|
@@ -46870,7 +46870,7 @@ var FileBatches = class extends APIResource {
|
|
|
46870
46870
|
* Create a vector store file batch.
|
|
46871
46871
|
*/
|
|
46872
46872
|
create(vectorStoreID, body, options) {
|
|
46873
|
-
return this._client.post(path$
|
|
46873
|
+
return this._client.post(path$9`/vector_stores/${vectorStoreID}/file_batches`, {
|
|
46874
46874
|
body,
|
|
46875
46875
|
...options,
|
|
46876
46876
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -46882,7 +46882,7 @@ var FileBatches = class extends APIResource {
|
|
|
46882
46882
|
*/
|
|
46883
46883
|
retrieve(batchID, params, options) {
|
|
46884
46884
|
const { vector_store_id } = params;
|
|
46885
|
-
return this._client.get(path$
|
|
46885
|
+
return this._client.get(path$9`/vector_stores/${vector_store_id}/file_batches/${batchID}`, {
|
|
46886
46886
|
...options,
|
|
46887
46887
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
46888
46888
|
__security: { bearerAuth: true }
|
|
@@ -46894,7 +46894,7 @@ var FileBatches = class extends APIResource {
|
|
|
46894
46894
|
*/
|
|
46895
46895
|
cancel(batchID, params, options) {
|
|
46896
46896
|
const { vector_store_id } = params;
|
|
46897
|
-
return this._client.post(path$
|
|
46897
|
+
return this._client.post(path$9`/vector_stores/${vector_store_id}/file_batches/${batchID}/cancel`, {
|
|
46898
46898
|
...options,
|
|
46899
46899
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
46900
46900
|
__security: { bearerAuth: true }
|
|
@@ -46912,7 +46912,7 @@ var FileBatches = class extends APIResource {
|
|
|
46912
46912
|
*/
|
|
46913
46913
|
listFiles(batchID, params, options) {
|
|
46914
46914
|
const { vector_store_id, ...query } = params;
|
|
46915
|
-
return this._client.getAPIList(path$
|
|
46915
|
+
return this._client.getAPIList(path$9`/vector_stores/${vector_store_id}/file_batches/${batchID}/files`, CursorPage, {
|
|
46916
46916
|
query,
|
|
46917
46917
|
...options,
|
|
46918
46918
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -46988,7 +46988,7 @@ var Files = class extends APIResource {
|
|
|
46988
46988
|
* [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object).
|
|
46989
46989
|
*/
|
|
46990
46990
|
create(vectorStoreID, body, options) {
|
|
46991
|
-
return this._client.post(path$
|
|
46991
|
+
return this._client.post(path$9`/vector_stores/${vectorStoreID}/files`, {
|
|
46992
46992
|
body,
|
|
46993
46993
|
...options,
|
|
46994
46994
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -47000,7 +47000,7 @@ var Files = class extends APIResource {
|
|
|
47000
47000
|
*/
|
|
47001
47001
|
retrieve(fileID, params, options) {
|
|
47002
47002
|
const { vector_store_id } = params;
|
|
47003
|
-
return this._client.get(path$
|
|
47003
|
+
return this._client.get(path$9`/vector_stores/${vector_store_id}/files/${fileID}`, {
|
|
47004
47004
|
...options,
|
|
47005
47005
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
47006
47006
|
__security: { bearerAuth: true }
|
|
@@ -47011,7 +47011,7 @@ var Files = class extends APIResource {
|
|
|
47011
47011
|
*/
|
|
47012
47012
|
update(fileID, params, options) {
|
|
47013
47013
|
const { vector_store_id, ...body } = params;
|
|
47014
|
-
return this._client.post(path$
|
|
47014
|
+
return this._client.post(path$9`/vector_stores/${vector_store_id}/files/${fileID}`, {
|
|
47015
47015
|
body,
|
|
47016
47016
|
...options,
|
|
47017
47017
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -47022,7 +47022,7 @@ var Files = class extends APIResource {
|
|
|
47022
47022
|
* Returns a list of vector store files.
|
|
47023
47023
|
*/
|
|
47024
47024
|
list(vectorStoreID, query = {}, options) {
|
|
47025
|
-
return this._client.getAPIList(path$
|
|
47025
|
+
return this._client.getAPIList(path$9`/vector_stores/${vectorStoreID}/files`, CursorPage, {
|
|
47026
47026
|
query,
|
|
47027
47027
|
...options,
|
|
47028
47028
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -47037,7 +47037,7 @@ var Files = class extends APIResource {
|
|
|
47037
47037
|
*/
|
|
47038
47038
|
delete(fileID, params, options) {
|
|
47039
47039
|
const { vector_store_id } = params;
|
|
47040
|
-
return this._client.delete(path$
|
|
47040
|
+
return this._client.delete(path$9`/vector_stores/${vector_store_id}/files/${fileID}`, {
|
|
47041
47041
|
...options,
|
|
47042
47042
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
47043
47043
|
__security: { bearerAuth: true }
|
|
@@ -47110,7 +47110,7 @@ var Files = class extends APIResource {
|
|
|
47110
47110
|
*/
|
|
47111
47111
|
content(fileID, params, options) {
|
|
47112
47112
|
const { vector_store_id } = params;
|
|
47113
|
-
return this._client.getAPIList(path$
|
|
47113
|
+
return this._client.getAPIList(path$9`/vector_stores/${vector_store_id}/files/${fileID}/content`, Page, {
|
|
47114
47114
|
...options,
|
|
47115
47115
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
47116
47116
|
__security: { bearerAuth: true }
|
|
@@ -47140,7 +47140,7 @@ var VectorStores = class extends APIResource {
|
|
|
47140
47140
|
* Retrieves a vector store.
|
|
47141
47141
|
*/
|
|
47142
47142
|
retrieve(vectorStoreID, options) {
|
|
47143
|
-
return this._client.get(path$
|
|
47143
|
+
return this._client.get(path$9`/vector_stores/${vectorStoreID}`, {
|
|
47144
47144
|
...options,
|
|
47145
47145
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
47146
47146
|
__security: { bearerAuth: true }
|
|
@@ -47150,7 +47150,7 @@ var VectorStores = class extends APIResource {
|
|
|
47150
47150
|
* Modifies a vector store.
|
|
47151
47151
|
*/
|
|
47152
47152
|
update(vectorStoreID, body, options) {
|
|
47153
|
-
return this._client.post(path$
|
|
47153
|
+
return this._client.post(path$9`/vector_stores/${vectorStoreID}`, {
|
|
47154
47154
|
body,
|
|
47155
47155
|
...options,
|
|
47156
47156
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -47172,7 +47172,7 @@ var VectorStores = class extends APIResource {
|
|
|
47172
47172
|
* Delete a vector store.
|
|
47173
47173
|
*/
|
|
47174
47174
|
delete(vectorStoreID, options) {
|
|
47175
|
-
return this._client.delete(path$
|
|
47175
|
+
return this._client.delete(path$9`/vector_stores/${vectorStoreID}`, {
|
|
47176
47176
|
...options,
|
|
47177
47177
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
47178
47178
|
__security: { bearerAuth: true }
|
|
@@ -47183,7 +47183,7 @@ var VectorStores = class extends APIResource {
|
|
|
47183
47183
|
* filter.
|
|
47184
47184
|
*/
|
|
47185
47185
|
search(vectorStoreID, body, options) {
|
|
47186
|
-
return this._client.getAPIList(path$
|
|
47186
|
+
return this._client.getAPIList(path$9`/vector_stores/${vectorStoreID}/search`, Page, {
|
|
47187
47187
|
body,
|
|
47188
47188
|
method: "post",
|
|
47189
47189
|
...options,
|
|
@@ -47211,7 +47211,7 @@ var Videos = class extends APIResource {
|
|
|
47211
47211
|
* Fetch the latest metadata for a generated video.
|
|
47212
47212
|
*/
|
|
47213
47213
|
retrieve(videoID, options) {
|
|
47214
|
-
return this._client.get(path$
|
|
47214
|
+
return this._client.get(path$9`/videos/${videoID}`, {
|
|
47215
47215
|
...options,
|
|
47216
47216
|
__security: { bearerAuth: true }
|
|
47217
47217
|
});
|
|
@@ -47230,7 +47230,7 @@ var Videos = class extends APIResource {
|
|
|
47230
47230
|
* Permanently delete a completed or failed video and its stored assets.
|
|
47231
47231
|
*/
|
|
47232
47232
|
delete(videoID, options) {
|
|
47233
|
-
return this._client.delete(path$
|
|
47233
|
+
return this._client.delete(path$9`/videos/${videoID}`, {
|
|
47234
47234
|
...options,
|
|
47235
47235
|
__security: { bearerAuth: true }
|
|
47236
47236
|
});
|
|
@@ -47251,7 +47251,7 @@ var Videos = class extends APIResource {
|
|
|
47251
47251
|
* Streams the rendered video content for the specified video job.
|
|
47252
47252
|
*/
|
|
47253
47253
|
downloadContent(videoID, query = {}, options) {
|
|
47254
|
-
return this._client.get(path$
|
|
47254
|
+
return this._client.get(path$9`/videos/${videoID}/content`, {
|
|
47255
47255
|
query,
|
|
47256
47256
|
...options,
|
|
47257
47257
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
@@ -47284,7 +47284,7 @@ var Videos = class extends APIResource {
|
|
|
47284
47284
|
* Fetch a character.
|
|
47285
47285
|
*/
|
|
47286
47286
|
getCharacter(characterID, options) {
|
|
47287
|
-
return this._client.get(path$
|
|
47287
|
+
return this._client.get(path$9`/videos/characters/${characterID}`, {
|
|
47288
47288
|
...options,
|
|
47289
47289
|
__security: { bearerAuth: true }
|
|
47290
47290
|
});
|
|
@@ -47293,7 +47293,7 @@ var Videos = class extends APIResource {
|
|
|
47293
47293
|
* Create a remix of a completed video using a refreshed prompt.
|
|
47294
47294
|
*/
|
|
47295
47295
|
remix(videoID, body, options) {
|
|
47296
|
-
return this._client.post(path$
|
|
47296
|
+
return this._client.post(path$9`/videos/${videoID}/remix`, maybeMultipartFormRequestOptions({
|
|
47297
47297
|
body,
|
|
47298
47298
|
...options,
|
|
47299
47299
|
__security: { bearerAuth: true }
|
|
@@ -48184,11 +48184,11 @@ var ScreamFiles = class {
|
|
|
48184
48184
|
async uploadVideo(input, options) {
|
|
48185
48185
|
let file;
|
|
48186
48186
|
if (typeof input === "string") {
|
|
48187
|
-
if (!fs$
|
|
48188
|
-
const filename = path$
|
|
48187
|
+
if (!fs$9.existsSync(input)) throw new ChatProviderError(`Video file not found: ${input}`);
|
|
48188
|
+
const filename = path$8.basename(input);
|
|
48189
48189
|
const mimeType = guessMimeTypeFromExt(filename);
|
|
48190
48190
|
if (mimeType === void 0 || !mimeType.startsWith("video/")) throw new ChatProviderError(`ScreamFiles.uploadVideo: file extension does not indicate a video type: ${filename}`);
|
|
48191
|
-
const data = await fs$
|
|
48191
|
+
const data = await fs$9.promises.readFile(input);
|
|
48192
48192
|
const blob = new Blob([new Uint8Array(data)], { type: mimeType });
|
|
48193
48193
|
file = new File([blob], filename, { type: mimeType });
|
|
48194
48194
|
} else {
|
|
@@ -50291,7 +50291,7 @@ async function syncDir(dirPath) {
|
|
|
50291
50291
|
*/
|
|
50292
50292
|
function syncFd(fd) {
|
|
50293
50293
|
return new Promise((resolve, reject) => {
|
|
50294
|
-
fs$
|
|
50294
|
+
fs$9.fsync(fd, (err) => {
|
|
50295
50295
|
if (err) {
|
|
50296
50296
|
reject(err);
|
|
50297
50297
|
return;
|
|
@@ -56734,7 +56734,7 @@ function createFastEmbedEngineImpl(cacheDir) {
|
|
|
56734
56734
|
};
|
|
56735
56735
|
}
|
|
56736
56736
|
async function loadEmbedder(cacheDir) {
|
|
56737
|
-
const { FlagEmbedding, EmbeddingModel } = await import("
|
|
56737
|
+
const { FlagEmbedding, EmbeddingModel } = await import("fastembed");
|
|
56738
56738
|
if (cacheDir !== void 0) mkdirSync(cacheDir, { recursive: true });
|
|
56739
56739
|
const model = EmbeddingModel.BGESmallZH;
|
|
56740
56740
|
const initOpts = cacheDir !== void 0 ? {
|
|
@@ -56746,8 +56746,8 @@ async function loadEmbedder(cacheDir) {
|
|
|
56746
56746
|
} catch (initError) {
|
|
56747
56747
|
const msg = initError instanceof Error ? initError.message : "";
|
|
56748
56748
|
if (!/Config file not found|Tokenizer file not found|Tokens map file not found/iu.test(msg)) throw initError;
|
|
56749
|
-
await ensureFastembedModelSidecars(
|
|
56750
|
-
return
|
|
56749
|
+
await ensureFastembedModelSidecars(model, cacheDir);
|
|
56750
|
+
return FlagEmbedding.init(initOpts);
|
|
56751
56751
|
}
|
|
56752
56752
|
}
|
|
56753
56753
|
/**
|
|
@@ -66774,7 +66774,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66774
66774
|
};
|
|
66775
66775
|
return _setPrototypeOf(o, p);
|
|
66776
66776
|
}
|
|
66777
|
-
var path$
|
|
66777
|
+
var path$7 = __require("path");
|
|
66778
66778
|
module.exports = /*#__PURE__*/ function(_EmitterObj) {
|
|
66779
66779
|
_inheritsLoose(Loader, _EmitterObj);
|
|
66780
66780
|
function Loader() {
|
|
@@ -66782,7 +66782,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66782
66782
|
}
|
|
66783
66783
|
var _proto = Loader.prototype;
|
|
66784
66784
|
_proto.resolve = function resolve(from, to) {
|
|
66785
|
-
return path$
|
|
66785
|
+
return path$7.resolve(path$7.dirname(from), to);
|
|
66786
66786
|
};
|
|
66787
66787
|
_proto.isRelative = function isRelative(filename) {
|
|
66788
66788
|
return filename.indexOf("./") === 0 || filename.indexOf("../") === 0;
|
|
@@ -66841,8 +66841,8 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66841
66841
|
};
|
|
66842
66842
|
return _setPrototypeOf(o, p);
|
|
66843
66843
|
}
|
|
66844
|
-
var fs$
|
|
66845
|
-
var path$
|
|
66844
|
+
var fs$8 = __require("fs");
|
|
66845
|
+
var path$6 = __require("path");
|
|
66846
66846
|
var Loader = require_loader();
|
|
66847
66847
|
var PrecompiledLoader = require_precompiled_loader().PrecompiledLoader;
|
|
66848
66848
|
var chokidar;
|
|
@@ -66857,7 +66857,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66857
66857
|
_this.noCache = !!opts.noCache;
|
|
66858
66858
|
if (searchPaths) {
|
|
66859
66859
|
searchPaths = Array.isArray(searchPaths) ? searchPaths : [searchPaths];
|
|
66860
|
-
_this.searchPaths = searchPaths.map(path$
|
|
66860
|
+
_this.searchPaths = searchPaths.map(path$6.normalize);
|
|
66861
66861
|
} else _this.searchPaths = ["."];
|
|
66862
66862
|
if (opts.watch) {
|
|
66863
66863
|
try {
|
|
@@ -66865,10 +66865,10 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66865
66865
|
} catch (e) {
|
|
66866
66866
|
throw new Error("watch requires chokidar to be installed");
|
|
66867
66867
|
}
|
|
66868
|
-
var paths = _this.searchPaths.filter(fs$
|
|
66868
|
+
var paths = _this.searchPaths.filter(fs$8.existsSync);
|
|
66869
66869
|
var watcher = chokidar.watch(paths);
|
|
66870
66870
|
watcher.on("all", function(event, fullname) {
|
|
66871
|
-
fullname = path$
|
|
66871
|
+
fullname = path$6.resolve(fullname);
|
|
66872
66872
|
if (event === "change" && fullname in _this.pathsToNames) _this.emit("update", _this.pathsToNames[fullname], fullname);
|
|
66873
66873
|
});
|
|
66874
66874
|
watcher.on("error", function(error) {
|
|
@@ -66882,9 +66882,9 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66882
66882
|
var fullpath = null;
|
|
66883
66883
|
var paths = this.searchPaths;
|
|
66884
66884
|
for (var i = 0; i < paths.length; i++) {
|
|
66885
|
-
var basePath = path$
|
|
66886
|
-
var p = path$
|
|
66887
|
-
if (p.indexOf(basePath) === 0 && fs$
|
|
66885
|
+
var basePath = path$6.resolve(paths[i]);
|
|
66886
|
+
var p = path$6.resolve(paths[i], name);
|
|
66887
|
+
if (p.indexOf(basePath) === 0 && fs$8.existsSync(p)) {
|
|
66888
66888
|
fullpath = p;
|
|
66889
66889
|
break;
|
|
66890
66890
|
}
|
|
@@ -66892,7 +66892,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66892
66892
|
if (!fullpath) return null;
|
|
66893
66893
|
this.pathsToNames[fullpath] = name;
|
|
66894
66894
|
var source = {
|
|
66895
|
-
src: fs$
|
|
66895
|
+
src: fs$8.readFileSync(fullpath, "utf-8"),
|
|
66896
66896
|
path: fullpath,
|
|
66897
66897
|
noCache: this.noCache
|
|
66898
66898
|
};
|
|
@@ -66940,7 +66940,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66940
66940
|
}
|
|
66941
66941
|
this.pathsToNames[fullpath] = name;
|
|
66942
66942
|
var source = {
|
|
66943
|
-
src: fs$
|
|
66943
|
+
src: fs$8.readFileSync(fullpath, "utf-8"),
|
|
66944
66944
|
path: fullpath,
|
|
66945
66945
|
noCache: this.noCache
|
|
66946
66946
|
};
|
|
@@ -67242,13 +67242,13 @@ var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
67242
67242
|
//#endregion
|
|
67243
67243
|
//#region ../../node_modules/.pnpm/nunjucks@3.2.4/node_modules/nunjucks/src/express-app.js
|
|
67244
67244
|
var require_express_app = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
67245
|
-
var path$
|
|
67245
|
+
var path$5 = __require("path");
|
|
67246
67246
|
module.exports = function express(env, app) {
|
|
67247
67247
|
function NunjucksView(name, opts) {
|
|
67248
67248
|
this.name = name;
|
|
67249
67249
|
this.path = name;
|
|
67250
67250
|
this.defaultEngine = opts.defaultEngine;
|
|
67251
|
-
this.ext = path$
|
|
67251
|
+
this.ext = path$5.extname(name);
|
|
67252
67252
|
if (!this.ext && !this.defaultEngine) throw new Error("No default engine was specified and no extension was provided.");
|
|
67253
67253
|
if (!this.ext) this.name += this.ext = (this.defaultEngine[0] !== "." ? "." : "") + this.defaultEngine;
|
|
67254
67254
|
}
|
|
@@ -67684,8 +67684,8 @@ var require_precompile_global = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
67684
67684
|
//#endregion
|
|
67685
67685
|
//#region ../../node_modules/.pnpm/nunjucks@3.2.4/node_modules/nunjucks/src/precompile.js
|
|
67686
67686
|
var require_precompile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
67687
|
-
var fs$
|
|
67688
|
-
var path$
|
|
67687
|
+
var fs$7 = __require("fs");
|
|
67688
|
+
var path$4 = __require("path");
|
|
67689
67689
|
var _prettifyError = require_lib$1()._prettifyError;
|
|
67690
67690
|
var compiler = require_compiler();
|
|
67691
67691
|
var Environment = require_environment().Environment;
|
|
@@ -67709,27 +67709,27 @@ var require_precompile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
67709
67709
|
var env = opts.env || new Environment([]);
|
|
67710
67710
|
var wrapper = opts.wrapper || precompileGlobal;
|
|
67711
67711
|
if (opts.isString) return precompileString(input, opts);
|
|
67712
|
-
var pathStats = fs$
|
|
67712
|
+
var pathStats = fs$7.existsSync(input) && fs$7.statSync(input);
|
|
67713
67713
|
var precompiled = [];
|
|
67714
67714
|
var templates = [];
|
|
67715
67715
|
function addTemplates(dir) {
|
|
67716
|
-
fs$
|
|
67717
|
-
var filepath = path$
|
|
67718
|
-
var subpath = filepath.substr(path$
|
|
67719
|
-
var stat = fs$
|
|
67716
|
+
fs$7.readdirSync(dir).forEach(function(file) {
|
|
67717
|
+
var filepath = path$4.join(dir, file);
|
|
67718
|
+
var subpath = filepath.substr(path$4.join(input, "/").length);
|
|
67719
|
+
var stat = fs$7.statSync(filepath);
|
|
67720
67720
|
if (stat && stat.isDirectory()) {
|
|
67721
67721
|
subpath += "/";
|
|
67722
67722
|
if (!match(subpath, opts.exclude)) addTemplates(filepath);
|
|
67723
67723
|
} else if (match(subpath, opts.include)) templates.push(filepath);
|
|
67724
67724
|
});
|
|
67725
67725
|
}
|
|
67726
|
-
if (pathStats.isFile()) precompiled.push(_precompile(fs$
|
|
67726
|
+
if (pathStats.isFile()) precompiled.push(_precompile(fs$7.readFileSync(input, "utf-8"), opts.name || input, env));
|
|
67727
67727
|
else if (pathStats.isDirectory()) {
|
|
67728
67728
|
addTemplates(input);
|
|
67729
67729
|
for (var i = 0; i < templates.length; i++) {
|
|
67730
|
-
var name = templates[i].replace(path$
|
|
67730
|
+
var name = templates[i].replace(path$4.join(input, "/"), "");
|
|
67731
67731
|
try {
|
|
67732
|
-
precompiled.push(_precompile(fs$
|
|
67732
|
+
precompiled.push(_precompile(fs$7.readFileSync(templates[i], "utf-8"), name, env));
|
|
67733
67733
|
} catch (e) {
|
|
67734
67734
|
if (opts.force) console.error(e);
|
|
67735
67735
|
else throw e;
|
|
@@ -68205,7 +68205,7 @@ var require_pend = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
68205
68205
|
//#endregion
|
|
68206
68206
|
//#region ../../node_modules/.pnpm/yauzl@3.3.1/node_modules/yauzl/fd-slicer.js
|
|
68207
68207
|
var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
68208
|
-
var fs$
|
|
68208
|
+
var fs$6 = __require("fs");
|
|
68209
68209
|
var util$2 = __require("util");
|
|
68210
68210
|
var stream = __require("stream");
|
|
68211
68211
|
var Readable = stream.Readable;
|
|
@@ -68225,7 +68225,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68225
68225
|
FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
|
|
68226
68226
|
var self = this;
|
|
68227
68227
|
self.pend.go(function(cb) {
|
|
68228
|
-
fs$
|
|
68228
|
+
fs$6.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer) {
|
|
68229
68229
|
cb();
|
|
68230
68230
|
callback(err, bytesRead, buffer);
|
|
68231
68231
|
});
|
|
@@ -68242,7 +68242,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68242
68242
|
self.refCount -= 1;
|
|
68243
68243
|
if (self.refCount < 0) throw new Error("invalid unref");
|
|
68244
68244
|
if (self.refCount > 0) return;
|
|
68245
|
-
fs$
|
|
68245
|
+
fs$6.close(self.fd, onCloseDone);
|
|
68246
68246
|
function onCloseDone(err) {
|
|
68247
68247
|
if (err) self.emit("error", err);
|
|
68248
68248
|
else self.emit("close");
|
|
@@ -68269,7 +68269,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
68269
68269
|
}
|
|
68270
68270
|
self.context.pend.go(function(cb) {
|
|
68271
68271
|
var buffer = Buffer.allocUnsafe(toRead);
|
|
68272
|
-
fs$
|
|
68272
|
+
fs$6.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
|
|
68273
68273
|
if (err) self.destroy(err);
|
|
68274
68274
|
else if (bytesRead === 0) {
|
|
68275
68275
|
self.push(null);
|
|
@@ -69249,7 +69249,7 @@ async function downloadZip(url, signal) {
|
|
|
69249
69249
|
}
|
|
69250
69250
|
async function extractZip(buffer, destDir) {
|
|
69251
69251
|
await mkdir(destDir, { recursive: true });
|
|
69252
|
-
const destDirResolved = path
|
|
69252
|
+
const destDirResolved = path.resolve(destDir);
|
|
69253
69253
|
let settled = false;
|
|
69254
69254
|
await new Promise((resolve, reject) => {
|
|
69255
69255
|
(0, import_yauzl.fromBuffer)(buffer, { lazyEntries: true }, (openErr, zipfile) => {
|
|
@@ -69259,8 +69259,8 @@ async function extractZip(buffer, destDir) {
|
|
|
69259
69259
|
}
|
|
69260
69260
|
const onEntry = (entry) => {
|
|
69261
69261
|
const fileName = entry.fileName;
|
|
69262
|
-
const destPath = path
|
|
69263
|
-
if (destPath !== destDirResolved && !destPath.startsWith(destDirResolved + path
|
|
69262
|
+
const destPath = path.resolve(destDir, fileName);
|
|
69263
|
+
if (destPath !== destDirResolved && !destPath.startsWith(destDirResolved + path.sep)) {
|
|
69264
69264
|
if (!settled) {
|
|
69265
69265
|
settled = true;
|
|
69266
69266
|
reject(/* @__PURE__ */ new Error(`Path traversal detected in zip entry: ${fileName}`));
|
|
@@ -69289,7 +69289,7 @@ async function extractZip(buffer, destDir) {
|
|
|
69289
69289
|
zipfile.close();
|
|
69290
69290
|
return;
|
|
69291
69291
|
}
|
|
69292
|
-
mkdir(path
|
|
69292
|
+
mkdir(path.dirname(destPath), { recursive: true }).then(() => pipeline$1(stream, createWriteStream$1(destPath))).then(() => restoreFilePermissions(destPath, entry)).then(() => {
|
|
69293
69293
|
zipfile.readEntry();
|
|
69294
69294
|
}).catch((error) => {
|
|
69295
69295
|
if (!settled) {
|
|
@@ -69330,16 +69330,16 @@ async function detectPluginRoot(dir) {
|
|
|
69330
69330
|
const childDirs = (await readdir(dir, { withFileTypes: true })).filter((entry) => entry.isDirectory());
|
|
69331
69331
|
const childDir = childDirs.length === 1 ? childDirs[0] : void 0;
|
|
69332
69332
|
if (childDir !== void 0) {
|
|
69333
|
-
const child = path
|
|
69333
|
+
const child = path.join(dir, childDir.name);
|
|
69334
69334
|
if (await hasManifest(child)) return child;
|
|
69335
69335
|
}
|
|
69336
69336
|
return dir;
|
|
69337
69337
|
}
|
|
69338
69338
|
async function hasManifest(dir) {
|
|
69339
|
-
const rootManifest = path
|
|
69340
|
-
const dirManifest = path
|
|
69341
|
-
const claudeDirManifest = path
|
|
69342
|
-
const skillMd = path
|
|
69339
|
+
const rootManifest = path.join(dir, "scream.plugin.json");
|
|
69340
|
+
const dirManifest = path.join(dir, ".scream-plugin", "plugin.json");
|
|
69341
|
+
const claudeDirManifest = path.join(dir, ".claude-plugin", "plugin.json");
|
|
69342
|
+
const skillMd = path.join(dir, "SKILL.md");
|
|
69343
69343
|
return await isFile$2(rootManifest) || await isFile$2(dirManifest) || await isFile$2(claudeDirManifest) || await isFile$2(skillMd);
|
|
69344
69344
|
}
|
|
69345
69345
|
async function isFile$2(p) {
|
|
@@ -69797,17 +69797,17 @@ const UNSUPPORTED_RUNTIME_FIELDS = [
|
|
|
69797
69797
|
"bootstrap"
|
|
69798
69798
|
];
|
|
69799
69799
|
async function parseManifest(pluginRoot) {
|
|
69800
|
-
const rootJsonPath = path
|
|
69801
|
-
const dirJsonPath = path
|
|
69802
|
-
const claudeDirJsonPath = path
|
|
69800
|
+
const rootJsonPath = path.join(pluginRoot, SCREAM_PLUGIN_ROOT_PATH);
|
|
69801
|
+
const dirJsonPath = path.join(pluginRoot, SCREAM_PLUGIN_DIR_PATH);
|
|
69802
|
+
const claudeDirJsonPath = path.join(pluginRoot, CLAUDE_PLUGIN_DIR_PATH);
|
|
69803
69803
|
const rootJsonExists = await isFile$1(rootJsonPath);
|
|
69804
69804
|
const dirJsonExists = await isFile$1(dirJsonPath);
|
|
69805
69805
|
const claudeDirJsonExists = await isFile$1(claudeDirJsonPath);
|
|
69806
69806
|
if (!rootJsonExists && !dirJsonExists && !claudeDirJsonExists) {
|
|
69807
|
-
const skillMdPath = path
|
|
69807
|
+
const skillMdPath = path.join(pluginRoot, BARE_SKILL_PATH);
|
|
69808
69808
|
if (await isFile$1(skillMdPath)) return {
|
|
69809
69809
|
manifest: {
|
|
69810
|
-
name: path
|
|
69810
|
+
name: path.basename(pluginRoot),
|
|
69811
69811
|
skills: [pluginRoot]
|
|
69812
69812
|
},
|
|
69813
69813
|
manifestKind: "bare-skill",
|
|
@@ -69817,11 +69817,11 @@ async function parseManifest(pluginRoot) {
|
|
|
69817
69817
|
const discoveredSkillDirs = await discoverSkillDirs(pluginRoot, 3);
|
|
69818
69818
|
if (discoveredSkillDirs.length > 0) return {
|
|
69819
69819
|
manifest: {
|
|
69820
|
-
name: path
|
|
69820
|
+
name: path.basename(pluginRoot),
|
|
69821
69821
|
skills: discoveredSkillDirs
|
|
69822
69822
|
},
|
|
69823
69823
|
manifestKind: "bare-skill",
|
|
69824
|
-
manifestPath: path
|
|
69824
|
+
manifestPath: path.join(discoveredSkillDirs[0], BARE_SKILL_PATH),
|
|
69825
69825
|
diagnostics: []
|
|
69826
69826
|
};
|
|
69827
69827
|
return { diagnostics: [{
|
|
@@ -69842,7 +69842,7 @@ async function parseManifest(pluginRoot) {
|
|
|
69842
69842
|
shadowedManifestPath,
|
|
69843
69843
|
diagnostics: [{
|
|
69844
69844
|
severity: "error",
|
|
69845
|
-
message: `Failed to parse ${path
|
|
69845
|
+
message: `Failed to parse ${path.relative(pluginRoot, manifestPath)}: ${error.message}`
|
|
69846
69846
|
}]
|
|
69847
69847
|
};
|
|
69848
69848
|
}
|
|
@@ -69883,7 +69883,7 @@ async function parseManifest(pluginRoot) {
|
|
|
69883
69883
|
}
|
|
69884
69884
|
let skills = await resolveSkillsField(pluginRoot, raw["skills"], diagnostics);
|
|
69885
69885
|
if (raw["skills"] === void 0) {
|
|
69886
|
-
if (await isFile$1(path
|
|
69886
|
+
if (await isFile$1(path.join(pluginRoot, "SKILL.md"))) skills = [pluginRoot];
|
|
69887
69887
|
}
|
|
69888
69888
|
const skillInstructions = typeof raw["skillInstructions"] === "string" ? raw["skillInstructions"] : void 0;
|
|
69889
69889
|
recordUnsupportedRuntimeFields(raw, diagnostics);
|
|
@@ -69938,7 +69938,7 @@ async function resolveSkillsField(pluginRoot, raw, diagnostics) {
|
|
|
69938
69938
|
});
|
|
69939
69939
|
continue;
|
|
69940
69940
|
}
|
|
69941
|
-
const absolute = path
|
|
69941
|
+
const absolute = path.resolve(pluginRoot, entry);
|
|
69942
69942
|
let real;
|
|
69943
69943
|
try {
|
|
69944
69944
|
real = await realpath(absolute);
|
|
@@ -69972,7 +69972,7 @@ async function resolvePluginPathField(input) {
|
|
|
69972
69972
|
});
|
|
69973
69973
|
return;
|
|
69974
69974
|
}
|
|
69975
|
-
const absolute = path
|
|
69975
|
+
const absolute = path.resolve(input.pluginRoot, input.value);
|
|
69976
69976
|
let real;
|
|
69977
69977
|
try {
|
|
69978
69978
|
real = await realpath(absolute);
|
|
@@ -70058,7 +70058,7 @@ async function normalizePluginMcpServer(input) {
|
|
|
70058
70058
|
});
|
|
70059
70059
|
if (resolvedCommand === void 0) return void 0;
|
|
70060
70060
|
command = resolvedCommand;
|
|
70061
|
-
} else if (command.includes("/") || path
|
|
70061
|
+
} else if (command.includes("/") || path.isAbsolute(command)) {
|
|
70062
70062
|
input.diagnostics.push({
|
|
70063
70063
|
severity: "warn",
|
|
70064
70064
|
message: `"mcpServers.${input.name}.command" must be a PATH command or start with "./"`
|
|
@@ -70119,8 +70119,8 @@ function isObject(value) {
|
|
|
70119
70119
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
70120
70120
|
}
|
|
70121
70121
|
function isWithin$1(child, parent) {
|
|
70122
|
-
const relative = path
|
|
70123
|
-
return relative === "" || !relative.startsWith("..") && !path
|
|
70122
|
+
const relative = path.relative(parent, child);
|
|
70123
|
+
return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
70124
70124
|
}
|
|
70125
70125
|
/**
|
|
70126
70126
|
* Recursively scan for `SKILL.md` files up to `maxDepth` levels below `root`.
|
|
@@ -70139,15 +70139,15 @@ async function discoverSkillDirs(root, maxDepth) {
|
|
|
70139
70139
|
}
|
|
70140
70140
|
for (const entry of entries) {
|
|
70141
70141
|
if (!entry.isDirectory()) continue;
|
|
70142
|
-
const child = path
|
|
70143
|
-
if (await isFile$1(path
|
|
70142
|
+
const child = path.join(dir, entry.name);
|
|
70143
|
+
if (await isFile$1(path.join(child, BARE_SKILL_PATH))) found.push(child);
|
|
70144
70144
|
await walk(child, depth + 1);
|
|
70145
70145
|
}
|
|
70146
70146
|
}
|
|
70147
70147
|
await walk(root, 1);
|
|
70148
70148
|
const sorted = found.toSorted((a, b) => a.length - b.length);
|
|
70149
70149
|
const result = [];
|
|
70150
|
-
for (const dir of sorted) if (!result.some((parent) => dir.startsWith(parent + path
|
|
70150
|
+
for (const dir of sorted) if (!result.some((parent) => dir.startsWith(parent + path.sep))) result.push(dir);
|
|
70151
70151
|
return result;
|
|
70152
70152
|
}
|
|
70153
70153
|
async function isFile$1(p) {
|
|
@@ -70166,14 +70166,14 @@ async function isDir(p) {
|
|
|
70166
70166
|
}
|
|
70167
70167
|
//#endregion
|
|
70168
70168
|
//#region ../../packages/agent-core/src/plugin/store.ts
|
|
70169
|
-
const PLUGINS_DIR_REL = path
|
|
70170
|
-
const INSTALLED_REL = path
|
|
70169
|
+
const PLUGINS_DIR_REL = path.join("plugins");
|
|
70170
|
+
const INSTALLED_REL = path.join(PLUGINS_DIR_REL, "installed.json");
|
|
70171
70171
|
const EMPTY = {
|
|
70172
70172
|
version: 1,
|
|
70173
70173
|
plugins: []
|
|
70174
70174
|
};
|
|
70175
70175
|
async function readInstalled(screamHomeDir) {
|
|
70176
|
-
const filePath = path
|
|
70176
|
+
const filePath = path.join(screamHomeDir, INSTALLED_REL);
|
|
70177
70177
|
let text;
|
|
70178
70178
|
try {
|
|
70179
70179
|
text = await readFile(filePath, "utf8");
|
|
@@ -70219,7 +70219,7 @@ async function migrateInstalledRecord(screamHomeDir, raw) {
|
|
|
70219
70219
|
isLegacyPath = true;
|
|
70220
70220
|
}
|
|
70221
70221
|
if (root === void 0) return void 0;
|
|
70222
|
-
if (isLegacyPath && !path
|
|
70222
|
+
if (isLegacyPath && !path.isAbsolute(root)) root = path.join(screamHomeDir, PLUGINS_DIR_REL, root);
|
|
70223
70223
|
if (isLegacyPath) try {
|
|
70224
70224
|
if (!(await stat(root)).isDirectory()) return void 0;
|
|
70225
70225
|
} catch {
|
|
@@ -70247,9 +70247,9 @@ function isGithubMetadata(value) {
|
|
|
70247
70247
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
70248
70248
|
}
|
|
70249
70249
|
async function writeInstalled(screamHomeDir, data) {
|
|
70250
|
-
const dir = path
|
|
70250
|
+
const dir = path.join(screamHomeDir, PLUGINS_DIR_REL);
|
|
70251
70251
|
await mkdir(dir, { recursive: true });
|
|
70252
|
-
const final = path
|
|
70252
|
+
const final = path.join(dir, "installed.json");
|
|
70253
70253
|
const tmp = `${final}.tmp`;
|
|
70254
70254
|
await writeFile(tmp, JSON.stringify(data, null, 2), "utf8");
|
|
70255
70255
|
await rename(tmp, final);
|
|
@@ -70266,7 +70266,7 @@ function resolveInstallSource(source) {
|
|
|
70266
70266
|
kind: "zip-url",
|
|
70267
70267
|
path: trimmed
|
|
70268
70268
|
};
|
|
70269
|
-
if (!path
|
|
70269
|
+
if (!path.isAbsolute(trimmed)) throw new Error(`Plugin root must be an absolute path (got "${source}")`);
|
|
70270
70270
|
return {
|
|
70271
70271
|
kind: "local-path",
|
|
70272
70272
|
path: trimmed
|
|
@@ -70432,7 +70432,7 @@ var PluginManager = class {
|
|
|
70432
70432
|
sourceType = "zip-url";
|
|
70433
70433
|
}
|
|
70434
70434
|
const buffer = await downloadZip(zipUrl);
|
|
70435
|
-
const tmpDir = await mkdtemp(path
|
|
70435
|
+
const tmpDir = await mkdtemp(path.join(tmpdir(), "scream-plugin-zip-"));
|
|
70436
70436
|
try {
|
|
70437
70437
|
const detectedRoot = await extractZip(buffer, tmpDir);
|
|
70438
70438
|
parsed = await parseManifest(detectedRoot);
|
|
@@ -70616,7 +70616,7 @@ var PluginManager = class {
|
|
|
70616
70616
|
};
|
|
70617
70617
|
async function normalizeInstallRoot(rootPath) {
|
|
70618
70618
|
const trimmed = rootPath.trim();
|
|
70619
|
-
if (!path
|
|
70619
|
+
if (!path.isAbsolute(trimmed)) throw new Error(`Plugin root must be an absolute path (got "${rootPath}")`);
|
|
70620
70620
|
let resolved;
|
|
70621
70621
|
try {
|
|
70622
70622
|
resolved = await realpath(trimmed);
|
|
@@ -70627,10 +70627,10 @@ async function normalizeInstallRoot(rootPath) {
|
|
|
70627
70627
|
return resolved;
|
|
70628
70628
|
}
|
|
70629
70629
|
async function copyPluginToManagedRoot(screamHomeDir, id, sourceRoot) {
|
|
70630
|
-
const managedRoot = path
|
|
70631
|
-
const managedDir = path
|
|
70630
|
+
const managedRoot = path.join(screamHomeDir, "plugins", "managed", id);
|
|
70631
|
+
const managedDir = path.dirname(managedRoot);
|
|
70632
70632
|
await mkdir(managedDir, { recursive: true });
|
|
70633
|
-
const stagingRoot = await mkdtemp(path
|
|
70633
|
+
const stagingRoot = await mkdtemp(path.join(managedDir, `${id}-`));
|
|
70634
70634
|
try {
|
|
70635
70635
|
await cp(sourceRoot, stagingRoot, { recursive: true });
|
|
70636
70636
|
await rm(managedRoot, {
|
|
@@ -70774,7 +70774,7 @@ function withPluginMcpRuntime(config, pluginRoot, screamHomeDir) {
|
|
|
70774
70774
|
};
|
|
70775
70775
|
}
|
|
70776
70776
|
function isScreamNativeBinary() {
|
|
70777
|
-
return !path
|
|
70777
|
+
return !path.basename(process.execPath).toLowerCase().startsWith("node");
|
|
70778
70778
|
}
|
|
70779
70779
|
//#endregion
|
|
70780
70780
|
//#region ../../packages/agent-core/src/tools/builtin/skill/plugin-skill-package-writer.ts
|
|
@@ -72329,7 +72329,7 @@ while (this[Ls](this[Ie]()) && this[b].length);
|
|
|
72329
72329
|
return Pr;
|
|
72330
72330
|
}
|
|
72331
72331
|
};
|
|
72332
|
-
var $r =
|
|
72332
|
+
var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol("_ended"), m = Symbol("_fd"), Ni = Symbol("_finished"), j = Symbol("_flags"), Di = Symbol("_flush"), ki = Symbol("_handleChunk"), Fi = Symbol("_makeBuf"), se = Symbol("_mode"), Fe = Symbol("_needDrain"), Ut = Symbol("_onerror"), Ht = Symbol("_onopen"), Ai = Symbol("_onread"), Pt = Symbol("_onwrite"), ht = Symbol("_open"), U = Symbol("_path"), nt = Symbol("_pos"), Y = Symbol("_queue"), zt = Symbol("_read"), Ii = Symbol("_readSize"), J = Symbol("_reading"), ie = Symbol("_remain"), Ci = Symbol("_size"), ve = Symbol("_write"), gt$1 = Symbol("_writing"), Me = Symbol("_defaultFlag"), bt = Symbol("_errored"), _t = class extends A {
|
|
72333
72333
|
[bt] = !1;
|
|
72334
72334
|
[m];
|
|
72335
72335
|
[U];
|
|
@@ -72355,7 +72355,7 @@ var $r = fs.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol
|
|
|
72355
72355
|
throw new TypeError("this is a readable stream");
|
|
72356
72356
|
}
|
|
72357
72357
|
[ht]() {
|
|
72358
|
-
|
|
72358
|
+
I.open(this[U], "r", (t, e) => this[Ht](t, e));
|
|
72359
72359
|
}
|
|
72360
72360
|
[Ht](t, e) {
|
|
72361
72361
|
t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
|
|
@@ -72368,7 +72368,7 @@ var $r = fs.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol
|
|
|
72368
72368
|
this[J] = !0;
|
|
72369
72369
|
let t = this[Fi]();
|
|
72370
72370
|
if (t.length === 0) return process.nextTick(() => this[Ai](null, 0, t));
|
|
72371
|
-
|
|
72371
|
+
I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ai](e, i, r));
|
|
72372
72372
|
}
|
|
72373
72373
|
}
|
|
72374
72374
|
[Ai](t, e, i) {
|
|
@@ -72377,7 +72377,7 @@ var $r = fs.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol
|
|
|
72377
72377
|
[H]() {
|
|
72378
72378
|
if (this[ot] && typeof this[m] == "number") {
|
|
72379
72379
|
let t = this[m];
|
|
72380
|
-
this[m] = void 0,
|
|
72380
|
+
this[m] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
72381
72381
|
}
|
|
72382
72382
|
}
|
|
72383
72383
|
[Ut](t) {
|
|
@@ -72400,7 +72400,7 @@ var $r = fs.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol
|
|
|
72400
72400
|
[ht]() {
|
|
72401
72401
|
let t = !0;
|
|
72402
72402
|
try {
|
|
72403
|
-
this[Ht](null,
|
|
72403
|
+
this[Ht](null, I.openSync(this[U], "r")), t = !1;
|
|
72404
72404
|
} finally {
|
|
72405
72405
|
t && this[H]();
|
|
72406
72406
|
}
|
|
@@ -72411,7 +72411,7 @@ var $r = fs.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol
|
|
|
72411
72411
|
if (!this[J]) {
|
|
72412
72412
|
this[J] = !0;
|
|
72413
72413
|
do {
|
|
72414
|
-
let e = this[Fi](), i = e.length === 0 ? 0 :
|
|
72414
|
+
let e = this[Fi](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
|
|
72415
72415
|
if (!this[ki](i, e)) break;
|
|
72416
72416
|
} while (!0);
|
|
72417
72417
|
this[J] = !1;
|
|
@@ -72424,7 +72424,7 @@ var $r = fs.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol
|
|
|
72424
72424
|
[H]() {
|
|
72425
72425
|
if (this[ot] && typeof this[m] == "number") {
|
|
72426
72426
|
let t = this[m];
|
|
72427
|
-
this[m] = void 0,
|
|
72427
|
+
this[m] = void 0, I.closeSync(t), this.emit("close");
|
|
72428
72428
|
}
|
|
72429
72429
|
}
|
|
72430
72430
|
}, tt = class extends Vr {
|
|
@@ -72465,7 +72465,7 @@ var $r = fs.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol
|
|
|
72465
72465
|
this[H](), this[gt$1] = !0, this.emit("error", t);
|
|
72466
72466
|
}
|
|
72467
72467
|
[ht]() {
|
|
72468
|
-
|
|
72468
|
+
I.open(this[U], this[j], this[se], (t, e) => this[Ht](t, e));
|
|
72469
72469
|
}
|
|
72470
72470
|
[Ht](t, e) {
|
|
72471
72471
|
this[Me] && this[j] === "r+" && t && t.code === "ENOENT" ? (this[j] = "w", this[ht]()) : t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[gt$1] || this[Di]());
|
|
@@ -72477,7 +72477,7 @@ var $r = fs.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol
|
|
|
72477
72477
|
return typeof t == "string" && (t = Buffer.from(t, e)), this[ee] ? (this.emit("error", /* @__PURE__ */ new Error("write() after end()")), !1) : this[m] === void 0 || this[gt$1] || this[Y].length ? (this[Y].push(t), this[Fe] = !0, !1) : (this[gt$1] = !0, this[ve](t), !0);
|
|
72478
72478
|
}
|
|
72479
72479
|
[ve](t) {
|
|
72480
|
-
|
|
72480
|
+
I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
|
|
72481
72481
|
}
|
|
72482
72482
|
[Pt](t, e) {
|
|
72483
72483
|
t ? this[Ut](t) : (this[nt] !== void 0 && typeof e == "number" && (this[nt] += e), this[Y].length ? this[Di]() : (this[gt$1] = !1, this[ee] && !this[Ni] ? (this[Ni] = !0, this[H](), this.emit("finish")) : this[Fe] && (this[Fe] = !1, this.emit("drain"))));
|
|
@@ -72493,31 +72493,31 @@ var $r = fs.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol
|
|
|
72493
72493
|
[H]() {
|
|
72494
72494
|
if (this[ot] && typeof this[m] == "number") {
|
|
72495
72495
|
let t = this[m];
|
|
72496
|
-
this[m] = void 0,
|
|
72496
|
+
this[m] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
72497
72497
|
}
|
|
72498
72498
|
}
|
|
72499
72499
|
}, Wt = class extends tt {
|
|
72500
72500
|
[ht]() {
|
|
72501
72501
|
let t;
|
|
72502
72502
|
if (this[Me] && this[j] === "r+") try {
|
|
72503
|
-
t =
|
|
72503
|
+
t = I.openSync(this[U], this[j], this[se]);
|
|
72504
72504
|
} catch (e) {
|
|
72505
72505
|
if (e?.code === "ENOENT") return this[j] = "w", this[ht]();
|
|
72506
72506
|
throw e;
|
|
72507
72507
|
}
|
|
72508
|
-
else t =
|
|
72508
|
+
else t = I.openSync(this[U], this[j], this[se]);
|
|
72509
72509
|
this[Ht](null, t);
|
|
72510
72510
|
}
|
|
72511
72511
|
[H]() {
|
|
72512
72512
|
if (this[ot] && typeof this[m] == "number") {
|
|
72513
72513
|
let t = this[m];
|
|
72514
|
-
this[m] = void 0,
|
|
72514
|
+
this[m] = void 0, I.closeSync(t), this.emit("close");
|
|
72515
72515
|
}
|
|
72516
72516
|
}
|
|
72517
72517
|
[ve](t) {
|
|
72518
72518
|
let e = !0;
|
|
72519
72519
|
try {
|
|
72520
|
-
this[Pt](null,
|
|
72520
|
+
this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = !1;
|
|
72521
72521
|
} finally {
|
|
72522
72522
|
if (e) try {
|
|
72523
72523
|
this[H]();
|
|
@@ -73466,7 +73466,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
73466
73466
|
let [o, h] = ce(this.path);
|
|
73467
73467
|
o && typeof h == "string" && (this.path = h, r = o);
|
|
73468
73468
|
}
|
|
73469
|
-
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Vs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute ||
|
|
73469
|
+
this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Vs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || Xs.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, {
|
|
73470
73470
|
entry: this,
|
|
73471
73471
|
path: r + this.path
|
|
73472
73472
|
});
|
|
@@ -73480,7 +73480,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
73480
73480
|
return t === "error" && (this.#t = !0), super.emit(t, ...e);
|
|
73481
73481
|
}
|
|
73482
73482
|
[ts]() {
|
|
73483
|
-
|
|
73483
|
+
I.lstat(this.absolute, (t, e) => {
|
|
73484
73484
|
if (t) return this.emit("error", t);
|
|
73485
73485
|
this[ii](e);
|
|
73486
73486
|
});
|
|
@@ -73539,7 +73539,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
73539
73539
|
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
|
|
73540
73540
|
}
|
|
73541
73541
|
[ji]() {
|
|
73542
|
-
|
|
73542
|
+
I.readlink(this.absolute, (t, e) => {
|
|
73543
73543
|
if (t) return this.emit("error", t);
|
|
73544
73544
|
this[is$2](e);
|
|
73545
73545
|
});
|
|
@@ -73549,7 +73549,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
73549
73549
|
}
|
|
73550
73550
|
[js](t) {
|
|
73551
73551
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
73552
|
-
this.type = "Link", this.linkpath = f(
|
|
73552
|
+
this.type = "Link", this.linkpath = f(Xs.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
|
|
73553
73553
|
}
|
|
73554
73554
|
[Qs]() {
|
|
73555
73555
|
if (!this.stat) throw new Error("cannot create file entry without stat");
|
|
@@ -73562,7 +73562,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
73562
73562
|
this[ss]();
|
|
73563
73563
|
}
|
|
73564
73564
|
[ss]() {
|
|
73565
|
-
|
|
73565
|
+
I.open(this.absolute, "r", (t, e) => {
|
|
73566
73566
|
if (t) return this.emit("error", t);
|
|
73567
73567
|
this[rs](e);
|
|
73568
73568
|
});
|
|
@@ -73577,13 +73577,13 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
73577
73577
|
[ei]() {
|
|
73578
73578
|
let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
|
|
73579
73579
|
if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
|
|
73580
|
-
|
|
73580
|
+
I.read(t, e, i, r, n, (o, h) => {
|
|
73581
73581
|
if (o) return this[pt](() => this.emit("error", o));
|
|
73582
73582
|
this[es](h);
|
|
73583
73583
|
});
|
|
73584
73584
|
}
|
|
73585
73585
|
[pt](t = () => {}) {
|
|
73586
|
-
this.fd !== void 0 &&
|
|
73586
|
+
this.fd !== void 0 && I.close(this.fd, t);
|
|
73587
73587
|
}
|
|
73588
73588
|
[es](t) {
|
|
73589
73589
|
if (t <= 0 && this.remain > 0) {
|
|
@@ -73625,20 +73625,20 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
73625
73625
|
}, ri = class extends de {
|
|
73626
73626
|
sync = !0;
|
|
73627
73627
|
[ts]() {
|
|
73628
|
-
this[ii](
|
|
73628
|
+
this[ii](I.lstatSync(this.absolute));
|
|
73629
73629
|
}
|
|
73630
73630
|
[ji]() {
|
|
73631
|
-
this[is$2](
|
|
73631
|
+
this[is$2](I.readlinkSync(this.absolute));
|
|
73632
73632
|
}
|
|
73633
73633
|
[ss]() {
|
|
73634
|
-
this[rs](
|
|
73634
|
+
this[rs](I.openSync(this.absolute, "r"));
|
|
73635
73635
|
}
|
|
73636
73636
|
[ei]() {
|
|
73637
73637
|
let t = !0;
|
|
73638
73638
|
try {
|
|
73639
73639
|
let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
|
|
73640
73640
|
if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
|
|
73641
|
-
let h =
|
|
73641
|
+
let h = I.readSync(e, i, r, n, o);
|
|
73642
73642
|
this[es](h), t = !1;
|
|
73643
73643
|
} finally {
|
|
73644
73644
|
if (t) try {
|
|
@@ -73650,7 +73650,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
73650
73650
|
t();
|
|
73651
73651
|
}
|
|
73652
73652
|
[pt](t = () => {}) {
|
|
73653
|
-
this.fd !== void 0 &&
|
|
73653
|
+
this.fd !== void 0 && I.closeSync(this.fd), t();
|
|
73654
73654
|
}
|
|
73655
73655
|
}, ni = class extends A {
|
|
73656
73656
|
blockLen = 0;
|
|
@@ -73969,7 +73969,7 @@ var mi = class {
|
|
|
73969
73969
|
return t instanceof Yt ? this[ir](t) : this[li](t), this.flowing;
|
|
73970
73970
|
}
|
|
73971
73971
|
[ir](t) {
|
|
73972
|
-
let e = f(
|
|
73972
|
+
let e = f(Xs.resolve(this.cwd, t.path));
|
|
73973
73973
|
if (!this.filter(t.path, t)) t.resume();
|
|
73974
73974
|
else {
|
|
73975
73975
|
let i = new mi(t.path, e);
|
|
@@ -73978,12 +73978,12 @@ var mi = class {
|
|
|
73978
73978
|
this[kt]();
|
|
73979
73979
|
}
|
|
73980
73980
|
[li](t) {
|
|
73981
|
-
let e = f(
|
|
73981
|
+
let e = f(Xs.resolve(this.cwd, t));
|
|
73982
73982
|
this[W].push(new mi(t, e)), this[kt]();
|
|
73983
73983
|
}
|
|
73984
73984
|
[ls](t) {
|
|
73985
73985
|
t.pending = !0, this[G] += 1;
|
|
73986
|
-
|
|
73986
|
+
I[this.follow ? "stat" : "lstat"](t.absolute, (i, r) => {
|
|
73987
73987
|
t.pending = !1, this[G] -= 1, i ? this.emit("error", i) : this[ai](t, r);
|
|
73988
73988
|
});
|
|
73989
73989
|
}
|
|
@@ -73997,7 +73997,7 @@ var mi = class {
|
|
|
73997
73997
|
this[kt]();
|
|
73998
73998
|
}
|
|
73999
73999
|
[cs](t) {
|
|
74000
|
-
t.pending = !0, this[G] += 1,
|
|
74000
|
+
t.pending = !0, this[G] += 1, I.readdir(t.absolute, (e, i) => {
|
|
74001
74001
|
if (t.pending = !1, this[G] -= 1, e) return this.emit("error", e);
|
|
74002
74002
|
this[ci](t, i);
|
|
74003
74003
|
});
|
|
@@ -74110,10 +74110,10 @@ var mi = class {
|
|
|
74110
74110
|
resume() {}
|
|
74111
74111
|
[ls](t) {
|
|
74112
74112
|
let e = this.follow ? "statSync" : "lstatSync";
|
|
74113
|
-
this[ai](t,
|
|
74113
|
+
this[ai](t, I[e](t.absolute));
|
|
74114
74114
|
}
|
|
74115
74115
|
[cs](t) {
|
|
74116
|
-
this[ci](t,
|
|
74116
|
+
this[ci](t, I.readdirSync(t.absolute));
|
|
74117
74117
|
}
|
|
74118
74118
|
[fi](t) {
|
|
74119
74119
|
let e = t.entry, i = this.zip;
|
|
@@ -74140,7 +74140,7 @@ var mi = class {
|
|
|
74140
74140
|
}, hr = (s, t) => {
|
|
74141
74141
|
t.forEach((e) => {
|
|
74142
74142
|
e.charAt(0) === "@" ? Ct({
|
|
74143
|
-
file: path
|
|
74143
|
+
file: path.resolve(s.cwd, e.slice(1)),
|
|
74144
74144
|
sync: !0,
|
|
74145
74145
|
noResume: !0,
|
|
74146
74146
|
onReadEntry: (i) => s.add(i)
|
|
@@ -74148,7 +74148,7 @@ var mi = class {
|
|
|
74148
74148
|
}), s.end();
|
|
74149
74149
|
}, ar = async (s, t) => {
|
|
74150
74150
|
for (let e of t) e.charAt(0) === "@" ? await Ct({
|
|
74151
|
-
file: path
|
|
74151
|
+
file: path.resolve(String(s.cwd), e.slice(1)),
|
|
74152
74152
|
noResume: !0,
|
|
74153
74153
|
onReadEntry: (i) => {
|
|
74154
74154
|
s.add(i);
|
|
@@ -74165,7 +74165,7 @@ var mi = class {
|
|
|
74165
74165
|
K(Hn, Wn, Gn, Zn, (s, t) => {
|
|
74166
74166
|
if (!t?.length) throw new TypeError("no paths specified to add to archive");
|
|
74167
74167
|
});
|
|
74168
|
-
var dr = (process.env.__FAKE_PLATFORM__ || process.platform) === "win32", { O_CREAT: ur, O_NOFOLLOW: lr, O_TRUNC: mr, O_WRONLY: pr } =
|
|
74168
|
+
var dr = (process.env.__FAKE_PLATFORM__ || process.platform) === "win32", { O_CREAT: ur, O_NOFOLLOW: lr, O_TRUNC: mr, O_WRONLY: pr } = I.constants, Er = Number(process.env.__FAKE_FS_O_FILENAME__) || I.constants.UV_FS_O_FILEMAP || 0, Vn = dr && !!Er, $n = 512 * 1024, Xn = Er | mr | ur | pr, cr = !dr && typeof lr == "number" ? lr | mr | ur | pr : null, fs$4 = cr !== null ? () => cr : Vn ? (s) => s < $n ? Xn : "w" : () => "w";
|
|
74169
74169
|
var ds = (s, t, e) => {
|
|
74170
74170
|
try {
|
|
74171
74171
|
return Vt.lchownSync(s, t, e);
|
|
@@ -74177,11 +74177,11 @@ var ds = (s, t, e) => {
|
|
|
74177
74177
|
i(r && r?.code !== "ENOENT" ? r : null);
|
|
74178
74178
|
});
|
|
74179
74179
|
}, qn = (s, t, e, i, r) => {
|
|
74180
|
-
if (t.isDirectory()) us(path
|
|
74180
|
+
if (t.isDirectory()) us(path.resolve(s, t.name), e, i, (n) => {
|
|
74181
74181
|
if (n) return r(n);
|
|
74182
|
-
pi(path
|
|
74182
|
+
pi(path.resolve(s, t.name), e, i, r);
|
|
74183
74183
|
});
|
|
74184
|
-
else pi(path
|
|
74184
|
+
else pi(path.resolve(s, t.name), e, i, r);
|
|
74185
74185
|
}, us = (s, t, e, i) => {
|
|
74186
74186
|
Vt.readdir(s, { withFileTypes: !0 }, (r, n) => {
|
|
74187
74187
|
if (r) {
|
|
@@ -74198,7 +74198,7 @@ var ds = (s, t, e) => {
|
|
|
74198
74198
|
for (let l of n) qn(s, l, t, e, a);
|
|
74199
74199
|
});
|
|
74200
74200
|
}, Qn = (s, t, e, i) => {
|
|
74201
|
-
t.isDirectory() && ms(path
|
|
74201
|
+
t.isDirectory() && ms(path.resolve(s, t.name), e, i), ds(path.resolve(s, t.name), e, i);
|
|
74202
74202
|
}, ms = (s, t, e) => {
|
|
74203
74203
|
let i;
|
|
74204
74204
|
try {
|
|
@@ -74249,10 +74249,10 @@ var jn = (s, t) => {
|
|
|
74249
74249
|
mode: r,
|
|
74250
74250
|
recursive: !0
|
|
74251
74251
|
}).then((E) => S(null, E ?? void 0), S);
|
|
74252
|
-
ps(d, f(path
|
|
74252
|
+
ps(d, f(path.relative(d, s)).split("/"), r, c, d, void 0, S);
|
|
74253
74253
|
}, ps = (s, t, e, i, r, n, o) => {
|
|
74254
74254
|
if (t.length === 0) return o(null, n);
|
|
74255
|
-
let h = t.shift(), a = f(path
|
|
74255
|
+
let h = t.shift(), a = f(path.resolve(s + "/" + h));
|
|
74256
74256
|
Vt.mkdir(a, e, Sr(a, t, e, i, r, n, o));
|
|
74257
74257
|
}, Sr = (s, t, e, i, r, n, o) => (h) => {
|
|
74258
74258
|
h ? Vt.lstat(s, (a, l) => {
|
|
@@ -74286,9 +74286,9 @@ var jn = (s, t) => {
|
|
|
74286
74286
|
mode: i,
|
|
74287
74287
|
recursive: !0
|
|
74288
74288
|
}) ?? void 0);
|
|
74289
|
-
let T = f(path
|
|
74289
|
+
let T = f(path.relative(c, s)).split("/"), N;
|
|
74290
74290
|
for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
|
|
74291
|
-
x = f(path
|
|
74291
|
+
x = f(path.resolve(x));
|
|
74292
74292
|
try {
|
|
74293
74293
|
Vt.mkdirSync(x, i), N = N || x;
|
|
74294
74294
|
} catch {
|
|
@@ -74432,7 +74432,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74432
74432
|
if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
74433
74433
|
this.uid = t.uid, this.gid = t.gid, this.setOwner = !0;
|
|
74434
74434
|
} else this.uid = void 0, this.gid = void 0, this.setOwner = !1;
|
|
74435
|
-
this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : oo, this.forceChown = t.forceChown === !0, this.win32 = !!t.win32 || Te, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(path
|
|
74435
|
+
this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : oo, this.forceChown = t.forceChown === !0, this.win32 = !!t.win32 || Te, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(path.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[Or](e));
|
|
74436
74436
|
}
|
|
74437
74437
|
warn(t, e, i = {}) {
|
|
74438
74438
|
return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = !1), super.warn(t, e, i);
|
|
@@ -74449,7 +74449,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74449
74449
|
entry: t,
|
|
74450
74450
|
[e]: i
|
|
74451
74451
|
}), !1;
|
|
74452
|
-
let a = path
|
|
74452
|
+
let a = path.posix.dirname(t.path), l = path.posix.normalize(path.posix.join(a, h.join("/")));
|
|
74453
74453
|
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, {
|
|
74454
74454
|
entry: t,
|
|
74455
74455
|
[e]: i
|
|
@@ -74478,7 +74478,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74478
74478
|
maxDepth: this.maxDepth
|
|
74479
74479
|
}), !1;
|
|
74480
74480
|
if (!this[ws](t, "path") || !this[ws](t, "linkpath")) return !1;
|
|
74481
|
-
if (t.absolute = path
|
|
74481
|
+
if (t.absolute = path.isAbsolute(t.path) ? f(path.resolve(t.path)) : f(path.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
|
|
74482
74482
|
entry: t,
|
|
74483
74483
|
path: f(t.path),
|
|
74484
74484
|
resolvedPath: t.absolute,
|
|
@@ -74486,9 +74486,9 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74486
74486
|
}), !1;
|
|
74487
74487
|
if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return !1;
|
|
74488
74488
|
if (this.win32) {
|
|
74489
|
-
let { root: r } = path
|
|
74489
|
+
let { root: r } = path.win32.parse(String(t.absolute));
|
|
74490
74490
|
t.absolute = r + Qi(String(t.absolute).slice(r.length));
|
|
74491
|
-
let { root: n } = path
|
|
74491
|
+
let { root: n } = path.win32.parse(t.path);
|
|
74492
74492
|
t.path = n + Qi(t.path.slice(n.length));
|
|
74493
74493
|
}
|
|
74494
74494
|
return !0;
|
|
@@ -74533,7 +74533,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74533
74533
|
}
|
|
74534
74534
|
[bs](t, e) {
|
|
74535
74535
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), {
|
|
74536
|
-
flags: fs$
|
|
74536
|
+
flags: fs$4(t.size),
|
|
74537
74537
|
mode: i,
|
|
74538
74538
|
autoClose: !1
|
|
74539
74539
|
});
|
|
@@ -74585,13 +74585,13 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74585
74585
|
t.unsupported = !0, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
|
|
74586
74586
|
}
|
|
74587
74587
|
[xr](t, e) {
|
|
74588
|
-
let i = f(path
|
|
74588
|
+
let i = f(path.relative(this.cwd, path.resolve(path.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
|
|
74589
74589
|
this[Re](t, this.cwd, i, () => this[Ri](t, String(t.linkpath), "symlink", e), (r) => {
|
|
74590
74590
|
this[O](r, t), e();
|
|
74591
74591
|
});
|
|
74592
74592
|
}
|
|
74593
74593
|
[Lr](t, e) {
|
|
74594
|
-
let i = f(path
|
|
74594
|
+
let i = f(path.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
|
|
74595
74595
|
this[Re](t, this.cwd, r, () => this[Ri](t, i, "link", e), (n) => {
|
|
74596
74596
|
this[O](n, t), e();
|
|
74597
74597
|
});
|
|
@@ -74599,10 +74599,10 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74599
74599
|
[Re](t, e, i, r, n) {
|
|
74600
74600
|
let o = i.shift();
|
|
74601
74601
|
if (this.preservePaths || o === void 0) return r();
|
|
74602
|
-
let h = path
|
|
74602
|
+
let h = path.resolve(e, o);
|
|
74603
74603
|
Vt.lstat(h, (a, l) => {
|
|
74604
74604
|
if (a) return r();
|
|
74605
|
-
if (l?.isSymbolicLink()) return n(new St(h, path
|
|
74605
|
+
if (l?.isSymbolicLink()) return n(new St(h, path.resolve(h, i.join("/"))));
|
|
74606
74606
|
this[Re](t, h, i, r, n);
|
|
74607
74607
|
});
|
|
74608
74608
|
}
|
|
@@ -74636,7 +74636,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74636
74636
|
});
|
|
74637
74637
|
}, n = () => {
|
|
74638
74638
|
if (t.absolute !== this.cwd) {
|
|
74639
|
-
let h = f(path
|
|
74639
|
+
let h = f(path.dirname(String(t.absolute)));
|
|
74640
74640
|
if (h !== this.cwd) return this[yt](h, this.dmode, (a) => {
|
|
74641
74641
|
if (a) {
|
|
74642
74642
|
this[O](a, t), i();
|
|
@@ -74704,7 +74704,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74704
74704
|
this[Oe] = !0;
|
|
74705
74705
|
}
|
|
74706
74706
|
if (t.absolute !== this.cwd) {
|
|
74707
|
-
let n = f(path
|
|
74707
|
+
let n = f(path.dirname(String(t.absolute)));
|
|
74708
74708
|
if (n !== this.cwd) {
|
|
74709
74709
|
let o = this[yt](n, this.dmode);
|
|
74710
74710
|
if (o) return this[O](o, t);
|
|
@@ -74737,7 +74737,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74737
74737
|
(h || a) && this[O](h || a, t), e();
|
|
74738
74738
|
}, n;
|
|
74739
74739
|
try {
|
|
74740
|
-
n = Vt.openSync(String(t.absolute), fs$
|
|
74740
|
+
n = Vt.openSync(String(t.absolute), fs$4(t.size), i);
|
|
74741
74741
|
} catch (h) {
|
|
74742
74742
|
return r(h);
|
|
74743
74743
|
}
|
|
@@ -74812,10 +74812,10 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
74812
74812
|
if (this.preservePaths || i.length === 0) return r();
|
|
74813
74813
|
let o = e;
|
|
74814
74814
|
for (let h of i) {
|
|
74815
|
-
o = path
|
|
74815
|
+
o = path.resolve(o, h);
|
|
74816
74816
|
let [a, l] = ye(() => Vt.lstatSync(o));
|
|
74817
74817
|
if (a) return r();
|
|
74818
|
-
if (l.isSymbolicLink()) return n(new St(o, path
|
|
74818
|
+
if (l.isSymbolicLink()) return n(new St(o, path.resolve(e, i.join("/"))));
|
|
74819
74819
|
}
|
|
74820
74820
|
r();
|
|
74821
74821
|
}
|
|
@@ -74926,7 +74926,7 @@ var uo = (s, t) => {
|
|
|
74926
74926
|
}, Eo = (s, t) => {
|
|
74927
74927
|
t.forEach((e) => {
|
|
74928
74928
|
e.charAt(0) === "@" ? Ct({
|
|
74929
|
-
file: path
|
|
74929
|
+
file: path.resolve(s.cwd, e.slice(1)),
|
|
74930
74930
|
sync: !0,
|
|
74931
74931
|
noResume: !0,
|
|
74932
74932
|
onReadEntry: (i) => s.add(i)
|
|
@@ -74934,7 +74934,7 @@ var uo = (s, t) => {
|
|
|
74934
74934
|
}), s.end();
|
|
74935
74935
|
}, wo = async (s, t) => {
|
|
74936
74936
|
for (let e of t) e.charAt(0) === "@" ? await Ct({
|
|
74937
|
-
file: path
|
|
74937
|
+
file: path.resolve(String(s.cwd), e.slice(1)),
|
|
74938
74938
|
noResume: !0,
|
|
74939
74939
|
onReadEntry: (i) => s.add(i)
|
|
74940
74940
|
}) : s.add(e);
|
|
@@ -102357,7 +102357,7 @@ function buildMcpHttpHeaders(config, envLookup) {
|
|
|
102357
102357
|
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
102358
102358
|
module.exports = isexe;
|
|
102359
102359
|
isexe.sync = sync;
|
|
102360
|
-
var fs$
|
|
102360
|
+
var fs$3 = __require("fs");
|
|
102361
102361
|
function checkPathExt(path, options) {
|
|
102362
102362
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
102363
102363
|
if (!pathext) return true;
|
|
@@ -102374,12 +102374,12 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102374
102374
|
return checkPathExt(path, options);
|
|
102375
102375
|
}
|
|
102376
102376
|
function isexe(path, options, cb) {
|
|
102377
|
-
fs$
|
|
102377
|
+
fs$3.stat(path, function(er, stat) {
|
|
102378
102378
|
cb(er, er ? false : checkStat(stat, path, options));
|
|
102379
102379
|
});
|
|
102380
102380
|
}
|
|
102381
102381
|
function sync(path, options) {
|
|
102382
|
-
return checkStat(fs$
|
|
102382
|
+
return checkStat(fs$3.statSync(path), path, options);
|
|
102383
102383
|
}
|
|
102384
102384
|
}));
|
|
102385
102385
|
//#endregion
|
|
@@ -102387,14 +102387,14 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102387
102387
|
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
102388
102388
|
module.exports = isexe;
|
|
102389
102389
|
isexe.sync = sync;
|
|
102390
|
-
var fs$
|
|
102390
|
+
var fs$2 = __require("fs");
|
|
102391
102391
|
function isexe(path, options, cb) {
|
|
102392
|
-
fs$
|
|
102392
|
+
fs$2.stat(path, function(er, stat) {
|
|
102393
102393
|
cb(er, er ? false : checkStat(stat, options));
|
|
102394
102394
|
});
|
|
102395
102395
|
}
|
|
102396
102396
|
function sync(path, options) {
|
|
102397
|
-
return checkStat(fs$
|
|
102397
|
+
return checkStat(fs$2.statSync(path), options);
|
|
102398
102398
|
}
|
|
102399
102399
|
function checkStat(stat, options) {
|
|
102400
102400
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -102458,7 +102458,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102458
102458
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
102459
102459
|
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
102460
102460
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
102461
|
-
const path$
|
|
102461
|
+
const path$3 = __require("path");
|
|
102462
102462
|
const COLON = isWindows ? ";" : ":";
|
|
102463
102463
|
const isexe = require_isexe();
|
|
102464
102464
|
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -102488,7 +102488,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102488
102488
|
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
102489
102489
|
const ppRaw = pathEnv[i];
|
|
102490
102490
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
102491
|
-
const pCmd = path$
|
|
102491
|
+
const pCmd = path$3.join(pathPart, cmd);
|
|
102492
102492
|
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
|
|
102493
102493
|
});
|
|
102494
102494
|
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
@@ -102509,7 +102509,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102509
102509
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
102510
102510
|
const ppRaw = pathEnv[i];
|
|
102511
102511
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
102512
|
-
const pCmd = path$
|
|
102512
|
+
const pCmd = path$3.join(pathPart, cmd);
|
|
102513
102513
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
102514
102514
|
for (let j = 0; j < pathExt.length; j++) {
|
|
102515
102515
|
const cur = p + pathExt[j];
|
|
@@ -102540,7 +102540,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102540
102540
|
//#endregion
|
|
102541
102541
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
102542
102542
|
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
102543
|
-
const path$
|
|
102543
|
+
const path$2 = __require("path");
|
|
102544
102544
|
const which = require_which();
|
|
102545
102545
|
const getPathKey = require_path_key();
|
|
102546
102546
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -102555,12 +102555,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
102555
102555
|
try {
|
|
102556
102556
|
resolved = which.sync(parsed.command, {
|
|
102557
102557
|
path: env[getPathKey({ env })],
|
|
102558
|
-
pathExt: withoutPathExt ? path$
|
|
102558
|
+
pathExt: withoutPathExt ? path$2.delimiter : void 0
|
|
102559
102559
|
});
|
|
102560
102560
|
} catch (e) {} finally {
|
|
102561
102561
|
if (shouldSwitchCwd) process.chdir(cwd);
|
|
102562
102562
|
}
|
|
102563
|
-
if (resolved) resolved = path$
|
|
102563
|
+
if (resolved) resolved = path$2.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
102564
102564
|
return resolved;
|
|
102565
102565
|
}
|
|
102566
102566
|
function resolveCommand(parsed) {
|
|
@@ -102609,16 +102609,16 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
102609
102609
|
//#endregion
|
|
102610
102610
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
102611
102611
|
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
102612
|
-
const fs$
|
|
102612
|
+
const fs$1 = __require("fs");
|
|
102613
102613
|
const shebangCommand = require_shebang_command();
|
|
102614
102614
|
function readShebang(command) {
|
|
102615
102615
|
const size = 150;
|
|
102616
102616
|
const buffer = Buffer.alloc(size);
|
|
102617
102617
|
let fd;
|
|
102618
102618
|
try {
|
|
102619
|
-
fd = fs$
|
|
102620
|
-
fs$
|
|
102621
|
-
fs$
|
|
102619
|
+
fd = fs$1.openSync(command, "r");
|
|
102620
|
+
fs$1.readSync(fd, buffer, 0, size, 0);
|
|
102621
|
+
fs$1.closeSync(fd);
|
|
102622
102622
|
} catch (e) {}
|
|
102623
102623
|
return shebangCommand(buffer.toString());
|
|
102624
102624
|
}
|
|
@@ -102627,7 +102627,7 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102627
102627
|
//#endregion
|
|
102628
102628
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
102629
102629
|
var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
102630
|
-
const path$
|
|
102630
|
+
const path$1 = __require("path");
|
|
102631
102631
|
const resolveCommand = require_resolveCommand();
|
|
102632
102632
|
const escape = require_escape();
|
|
102633
102633
|
const readShebang = require_readShebang();
|
|
@@ -102650,7 +102650,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
102650
102650
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
102651
102651
|
if (parsed.options.forceShell || needsShell) {
|
|
102652
102652
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
102653
|
-
parsed.command = path$
|
|
102653
|
+
parsed.command = path$1.normalize(parsed.command);
|
|
102654
102654
|
parsed.command = escape.command(parsed.command);
|
|
102655
102655
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
102656
102656
|
parsed.args = [
|
|
@@ -118007,7 +118007,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
118007
118007
|
//#endregion
|
|
118008
118008
|
//#region ../../packages/agent-core/src/session/export/zip.ts
|
|
118009
118009
|
var import_yazl = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
118010
|
-
var fs
|
|
118010
|
+
var fs = __require("fs");
|
|
118011
118011
|
var Transform = __require("stream").Transform;
|
|
118012
118012
|
var PassThrough$1 = __require("stream").PassThrough;
|
|
118013
118013
|
var zlib = __require("zlib");
|
|
@@ -118036,14 +118036,14 @@ var import_yazl = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
118036
118036
|
if (shouldIgnoreAdding(self)) return;
|
|
118037
118037
|
var entry = new Entry(metadataPath, false, options);
|
|
118038
118038
|
self.entries.push(entry);
|
|
118039
|
-
fs
|
|
118039
|
+
fs.stat(realPath, function(err, stats) {
|
|
118040
118040
|
if (err) return self.emit("error", err);
|
|
118041
118041
|
if (!stats.isFile()) return self.emit("error", /* @__PURE__ */ new Error("not a file: " + realPath));
|
|
118042
118042
|
entry.uncompressedSize = stats.size;
|
|
118043
118043
|
if (options.mtime == null) entry.setLastModDate(stats.mtime);
|
|
118044
118044
|
if (options.mode == null) entry.setFileAttributesMode(stats.mode);
|
|
118045
118045
|
entry.setFileDataPumpFunction(function() {
|
|
118046
|
-
var readStream = fs
|
|
118046
|
+
var readStream = fs.createReadStream(realPath);
|
|
118047
118047
|
entry.state = Entry.FILE_DATA_IN_PROGRESS;
|
|
118048
118048
|
readStream.on("error", function(err) {
|
|
118049
118049
|
self.emit("error", err);
|
|
@@ -124851,7 +124851,7 @@ function optionalBuildString(value) {
|
|
|
124851
124851
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
124852
124852
|
}
|
|
124853
124853
|
const SCREAM_BUILD_INFO = {
|
|
124854
|
-
version: optionalBuildString("0.9.
|
|
124854
|
+
version: optionalBuildString("0.9.1"),
|
|
124855
124855
|
channel: optionalBuildString(""),
|
|
124856
124856
|
commit: optionalBuildString(""),
|
|
124857
124857
|
buildTarget: optionalBuildString("darwin-arm64")
|
|
@@ -131801,9 +131801,9 @@ var PlanBoxComponent = class {
|
|
|
131801
131801
|
const fallbackTitle = visibleWidth(fallbackWithStatus) <= budget ? fallbackWithStatus : fallback;
|
|
131802
131802
|
const planPath = this.planPath;
|
|
131803
131803
|
if (planPath === void 0 || planPath.length === 0) return fallbackTitle;
|
|
131804
|
-
const basename = path
|
|
131804
|
+
const basename = path.basename(planPath);
|
|
131805
131805
|
if (basename.length === 0) return fallbackTitle;
|
|
131806
|
-
const linked = path
|
|
131806
|
+
const linked = path.isAbsolute(planPath) ? toTerminalHyperlink(basename, pathToFileURL(planPath).href) : basename;
|
|
131807
131807
|
const title = getTitlePrefix() + linked + statusSuffix + TITLE_SUFFIX;
|
|
131808
131808
|
if (visibleWidth(title) > budget) return fallbackTitle;
|
|
131809
131809
|
return title;
|
|
@@ -145392,10 +145392,10 @@ var PlanModeBannerComponent = class {
|
|
|
145392
145392
|
const tone = this.mode === "fusionplan" ? this.colors.fusionPlanMode : this.colors.planMode;
|
|
145393
145393
|
const label = getPlanLabel(this.mode);
|
|
145394
145394
|
const prefix = `${chalk.hex(tone)(STATUS_BULLET)}${chalk.hex(tone).bold(label)}`;
|
|
145395
|
-
const basename = this.planPath !== void 0 && this.planPath.length > 0 ? path
|
|
145395
|
+
const basename = this.planPath !== void 0 && this.planPath.length > 0 ? path.basename(this.planPath) : void 0;
|
|
145396
145396
|
if (basename === void 0 || basename.length === 0) return [truncateToWidth(prefix, width)];
|
|
145397
145397
|
const sep = chalk.hex(this.colors.textDim)(" · ");
|
|
145398
|
-
const line = `${prefix}${sep}${path
|
|
145398
|
+
const line = `${prefix}${sep}${path.isAbsolute(this.planPath) ? toTerminalHyperlink(chalk.hex(this.colors.text)(basename), pathToFileURL(this.planPath).href) : chalk.hex(this.colors.text)(basename)}`;
|
|
145399
145399
|
if (visibleWidth(line) <= width) return [line];
|
|
145400
145400
|
const fixedWidth = visibleWidth(prefix) + visibleWidth(sep);
|
|
145401
145401
|
const budget = Math.max(0, width - fixedWidth);
|
|
@@ -147473,7 +147473,7 @@ function sourceLabel(source) {
|
|
|
147473
147473
|
}
|
|
147474
147474
|
function formatProject(memo) {
|
|
147475
147475
|
if (memo.projectDir.length === 0) return "";
|
|
147476
|
-
return path$
|
|
147476
|
+
return path$8.basename(memo.projectDir);
|
|
147477
147477
|
}
|
|
147478
147478
|
function formatTags(memo) {
|
|
147479
147479
|
if (memo.tags === void 0 || memo.tags.length === 0) return "";
|
|
@@ -150527,8 +150527,8 @@ async function runPluginNodeEntry(entry, args) {
|
|
|
150527
150527
|
await import(pathToFileURL(entryReal).href);
|
|
150528
150528
|
}
|
|
150529
150529
|
function isWithin(candidate, root) {
|
|
150530
|
-
const relative = path
|
|
150531
|
-
return relative === "" || !relative.startsWith("..") && !path
|
|
150530
|
+
const relative = path.relative(root, candidate);
|
|
150531
|
+
return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
150532
150532
|
}
|
|
150533
150533
|
//#endregion
|
|
150534
150534
|
//#region src/utils/process/proctitle.ts
|