scream-code 0.5.10 → 0.5.11
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.
|
@@ -8,21 +8,21 @@ import "./suppress-sqlite-warning-C2VB0doZ.mjs";
|
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
import { createHash, randomBytes, randomInt, randomUUID } from "node:crypto";
|
|
10
10
|
import Jn, { access, appendFile, chmod, copyFile, cp, lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, rmdir, stat, unlink, writeFile } from "node:fs/promises";
|
|
11
|
-
import
|
|
11
|
+
import fs, { createWriteStream } from "fs";
|
|
12
12
|
import Vr, { EventEmitter } from "events";
|
|
13
13
|
import * as path$1$1 from "path";
|
|
14
|
-
import
|
|
14
|
+
import path, { dirname, parse } from "path";
|
|
15
15
|
import { Buffer as Buffer$1 } from "buffer";
|
|
16
|
-
import * as fs$
|
|
16
|
+
import * as fs$11 from "fs/promises";
|
|
17
17
|
import { writeFile as writeFile$1 } from "fs/promises";
|
|
18
18
|
import Ds, { PassThrough, Readable } from "node:stream";
|
|
19
19
|
import { finished, pipeline as pipeline$1 } from "node:stream/promises";
|
|
20
20
|
import * as vs from "zlib";
|
|
21
21
|
import Qr from "zlib";
|
|
22
|
-
import * as fs$
|
|
22
|
+
import * as fs$10 from "node:fs";
|
|
23
23
|
import Vt, { appendFileSync, chmodSync, closeSync, constants, createReadStream, createWriteStream as createWriteStream$1, existsSync, fsyncSync, mkdirSync, openSync, promises, readFileSync, readSync, readdirSync, renameSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
|
|
24
|
-
import * as path$
|
|
25
|
-
import path, { basename, dirname as dirname$1, extname, isAbsolute, join, posix, relative, resolve, sep, win32 } from "node:path";
|
|
24
|
+
import * as path$9 from "node:path";
|
|
25
|
+
import path$1, { basename, dirname as dirname$1, extname, isAbsolute, join, posix, relative, resolve, sep, win32 } from "node:path";
|
|
26
26
|
import { z } from "zod";
|
|
27
27
|
import { DatabaseSync } from "node:sqlite";
|
|
28
28
|
import * as nodeOs from "node:os";
|
|
@@ -3088,7 +3088,7 @@ const createPathTagFunction$2 = (pathEncoder = encodeURIPath$2) => function path
|
|
|
3088
3088
|
/**
|
|
3089
3089
|
* URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced.
|
|
3090
3090
|
*/
|
|
3091
|
-
const path$
|
|
3091
|
+
const path$15 = /* @__PURE__ */ createPathTagFunction$2(encodeURIPath$2);
|
|
3092
3092
|
//#endregion
|
|
3093
3093
|
//#region ../../node_modules/.pnpm/@anthropic-ai+sdk@0.95.2_zod@4.4.3/node_modules/@anthropic-ai/sdk/resources/beta/environments.mjs
|
|
3094
3094
|
var Environments = class extends APIResource$2 {
|
|
@@ -3124,7 +3124,7 @@ var Environments = class extends APIResource$2 {
|
|
|
3124
3124
|
*/
|
|
3125
3125
|
retrieve(environmentID, params = {}, options) {
|
|
3126
3126
|
const { betas } = params ?? {};
|
|
3127
|
-
return this._client.get(path$
|
|
3127
|
+
return this._client.get(path$15`/v1/environments/${environmentID}?beta=true`, {
|
|
3128
3128
|
...options,
|
|
3129
3129
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
3130
3130
|
});
|
|
@@ -3142,7 +3142,7 @@ var Environments = class extends APIResource$2 {
|
|
|
3142
3142
|
*/
|
|
3143
3143
|
update(environmentID, params, options) {
|
|
3144
3144
|
const { betas, ...body } = params;
|
|
3145
|
-
return this._client.post(path$
|
|
3145
|
+
return this._client.post(path$15`/v1/environments/${environmentID}?beta=true`, {
|
|
3146
3146
|
body,
|
|
3147
3147
|
...options,
|
|
3148
3148
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -3180,7 +3180,7 @@ var Environments = class extends APIResource$2 {
|
|
|
3180
3180
|
*/
|
|
3181
3181
|
delete(environmentID, params = {}, options) {
|
|
3182
3182
|
const { betas } = params ?? {};
|
|
3183
|
-
return this._client.delete(path$
|
|
3183
|
+
return this._client.delete(path$15`/v1/environments/${environmentID}?beta=true`, {
|
|
3184
3184
|
...options,
|
|
3185
3185
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
3186
3186
|
});
|
|
@@ -3199,7 +3199,7 @@ var Environments = class extends APIResource$2 {
|
|
|
3199
3199
|
*/
|
|
3200
3200
|
archive(environmentID, params = {}, options) {
|
|
3201
3201
|
const { betas } = params ?? {};
|
|
3202
|
-
return this._client.post(path$
|
|
3202
|
+
return this._client.post(path$15`/v1/environments/${environmentID}/archive?beta=true`, {
|
|
3203
3203
|
...options,
|
|
3204
3204
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
3205
3205
|
});
|
|
@@ -3286,7 +3286,7 @@ var Files$4 = class extends APIResource$2 {
|
|
|
3286
3286
|
*/
|
|
3287
3287
|
delete(fileID, params = {}, options) {
|
|
3288
3288
|
const { betas } = params ?? {};
|
|
3289
|
-
return this._client.delete(path$
|
|
3289
|
+
return this._client.delete(path$15`/v1/files/${fileID}?beta=true`, {
|
|
3290
3290
|
...options,
|
|
3291
3291
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "files-api-2025-04-14"].toString() }, options?.headers])
|
|
3292
3292
|
});
|
|
@@ -3306,7 +3306,7 @@ var Files$4 = class extends APIResource$2 {
|
|
|
3306
3306
|
*/
|
|
3307
3307
|
download(fileID, params = {}, options) {
|
|
3308
3308
|
const { betas } = params ?? {};
|
|
3309
|
-
return this._client.get(path$
|
|
3309
|
+
return this._client.get(path$15`/v1/files/${fileID}/content?beta=true`, {
|
|
3310
3310
|
...options,
|
|
3311
3311
|
headers: buildHeaders$2([{
|
|
3312
3312
|
"anthropic-beta": [...betas ?? [], "files-api-2025-04-14"].toString(),
|
|
@@ -3326,7 +3326,7 @@ var Files$4 = class extends APIResource$2 {
|
|
|
3326
3326
|
*/
|
|
3327
3327
|
retrieveMetadata(fileID, params = {}, options) {
|
|
3328
3328
|
const { betas } = params ?? {};
|
|
3329
|
-
return this._client.get(path$
|
|
3329
|
+
return this._client.get(path$15`/v1/files/${fileID}?beta=true`, {
|
|
3330
3330
|
...options,
|
|
3331
3331
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "files-api-2025-04-14"].toString() }, options?.headers])
|
|
3332
3332
|
});
|
|
@@ -3372,7 +3372,7 @@ var Models$3 = class extends APIResource$2 {
|
|
|
3372
3372
|
*/
|
|
3373
3373
|
retrieve(modelID, params = {}, options) {
|
|
3374
3374
|
const { betas } = params ?? {};
|
|
3375
|
-
return this._client.get(path$
|
|
3375
|
+
return this._client.get(path$15`/v1/models/${modelID}?beta=true`, {
|
|
3376
3376
|
...options,
|
|
3377
3377
|
headers: buildHeaders$2([{ ...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : void 0 }, options?.headers])
|
|
3378
3378
|
});
|
|
@@ -3433,7 +3433,7 @@ var UserProfiles = class extends APIResource$2 {
|
|
|
3433
3433
|
*/
|
|
3434
3434
|
retrieve(userProfileID, params = {}, options) {
|
|
3435
3435
|
const { betas } = params ?? {};
|
|
3436
|
-
return this._client.get(path$
|
|
3436
|
+
return this._client.get(path$15`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
3437
3437
|
...options,
|
|
3438
3438
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "user-profiles-2026-03-24"].toString() }, options?.headers])
|
|
3439
3439
|
});
|
|
@@ -3451,7 +3451,7 @@ var UserProfiles = class extends APIResource$2 {
|
|
|
3451
3451
|
*/
|
|
3452
3452
|
update(userProfileID, params, options) {
|
|
3453
3453
|
const { betas, ...body } = params;
|
|
3454
|
-
return this._client.post(path$
|
|
3454
|
+
return this._client.post(path$15`/v1/user_profiles/${userProfileID}?beta=true`, {
|
|
3455
3455
|
body,
|
|
3456
3456
|
...options,
|
|
3457
3457
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "user-profiles-2026-03-24"].toString() }, options?.headers])
|
|
@@ -3489,7 +3489,7 @@ var UserProfiles = class extends APIResource$2 {
|
|
|
3489
3489
|
*/
|
|
3490
3490
|
createEnrollmentURL(userProfileID, params = {}, options) {
|
|
3491
3491
|
const { betas } = params ?? {};
|
|
3492
|
-
return this._client.post(path$
|
|
3492
|
+
return this._client.post(path$15`/v1/user_profiles/${userProfileID}/enrollment_url?beta=true`, {
|
|
3493
3493
|
...options,
|
|
3494
3494
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "user-profiles-2026-03-24"].toString() }, options?.headers])
|
|
3495
3495
|
});
|
|
@@ -4181,7 +4181,7 @@ var Versions$2 = class extends APIResource$2 {
|
|
|
4181
4181
|
*/
|
|
4182
4182
|
list(agentID, params = {}, options) {
|
|
4183
4183
|
const { betas, ...query } = params ?? {};
|
|
4184
|
-
return this._client.getAPIList(path$
|
|
4184
|
+
return this._client.getAPIList(path$15`/v1/agents/${agentID}/versions?beta=true`, PageCursor, {
|
|
4185
4185
|
query,
|
|
4186
4186
|
...options,
|
|
4187
4187
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4228,7 +4228,7 @@ var Agents = class extends APIResource$2 {
|
|
|
4228
4228
|
*/
|
|
4229
4229
|
retrieve(agentID, params = {}, options) {
|
|
4230
4230
|
const { betas, ...query } = params ?? {};
|
|
4231
|
-
return this._client.get(path$
|
|
4231
|
+
return this._client.get(path$15`/v1/agents/${agentID}?beta=true`, {
|
|
4232
4232
|
query,
|
|
4233
4233
|
...options,
|
|
4234
4234
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4248,7 +4248,7 @@ var Agents = class extends APIResource$2 {
|
|
|
4248
4248
|
*/
|
|
4249
4249
|
update(agentID, params, options) {
|
|
4250
4250
|
const { betas, ...body } = params;
|
|
4251
|
-
return this._client.post(path$
|
|
4251
|
+
return this._client.post(path$15`/v1/agents/${agentID}?beta=true`, {
|
|
4252
4252
|
body,
|
|
4253
4253
|
...options,
|
|
4254
4254
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4286,7 +4286,7 @@ var Agents = class extends APIResource$2 {
|
|
|
4286
4286
|
*/
|
|
4287
4287
|
archive(agentID, params = {}, options) {
|
|
4288
4288
|
const { betas } = params ?? {};
|
|
4289
|
-
return this._client.post(path$
|
|
4289
|
+
return this._client.post(path$15`/v1/agents/${agentID}/archive?beta=true`, {
|
|
4290
4290
|
...options,
|
|
4291
4291
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
4292
4292
|
});
|
|
@@ -4310,7 +4310,7 @@ var Memories = class extends APIResource$2 {
|
|
|
4310
4310
|
*/
|
|
4311
4311
|
create(memoryStoreID, params, options) {
|
|
4312
4312
|
const { view, betas, ...body } = params;
|
|
4313
|
-
return this._client.post(path$
|
|
4313
|
+
return this._client.post(path$15`/v1/memory_stores/${memoryStoreID}/memories?beta=true`, {
|
|
4314
4314
|
query: { view },
|
|
4315
4315
|
body,
|
|
4316
4316
|
...options,
|
|
@@ -4331,7 +4331,7 @@ var Memories = class extends APIResource$2 {
|
|
|
4331
4331
|
*/
|
|
4332
4332
|
retrieve(memoryID, params, options) {
|
|
4333
4333
|
const { memory_store_id, betas, ...query } = params;
|
|
4334
|
-
return this._client.get(path$
|
|
4334
|
+
return this._client.get(path$15`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
|
|
4335
4335
|
query,
|
|
4336
4336
|
...options,
|
|
4337
4337
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4351,7 +4351,7 @@ var Memories = class extends APIResource$2 {
|
|
|
4351
4351
|
*/
|
|
4352
4352
|
update(memoryID, params, options) {
|
|
4353
4353
|
const { memory_store_id, view, betas, ...body } = params;
|
|
4354
|
-
return this._client.post(path$
|
|
4354
|
+
return this._client.post(path$15`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
|
|
4355
4355
|
query: { view },
|
|
4356
4356
|
body,
|
|
4357
4357
|
...options,
|
|
@@ -4373,7 +4373,7 @@ var Memories = class extends APIResource$2 {
|
|
|
4373
4373
|
*/
|
|
4374
4374
|
list(memoryStoreID, params = {}, options) {
|
|
4375
4375
|
const { betas, ...query } = params ?? {};
|
|
4376
|
-
return this._client.getAPIList(path$
|
|
4376
|
+
return this._client.getAPIList(path$15`/v1/memory_stores/${memoryStoreID}/memories?beta=true`, PageCursor, {
|
|
4377
4377
|
query,
|
|
4378
4378
|
...options,
|
|
4379
4379
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4393,7 +4393,7 @@ var Memories = class extends APIResource$2 {
|
|
|
4393
4393
|
*/
|
|
4394
4394
|
delete(memoryID, params, options) {
|
|
4395
4395
|
const { memory_store_id, expected_content_sha256, betas } = params;
|
|
4396
|
-
return this._client.delete(path$
|
|
4396
|
+
return this._client.delete(path$15`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
|
|
4397
4397
|
query: { expected_content_sha256 },
|
|
4398
4398
|
...options,
|
|
4399
4399
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4417,7 +4417,7 @@ var MemoryVersions = class extends APIResource$2 {
|
|
|
4417
4417
|
*/
|
|
4418
4418
|
retrieve(memoryVersionID, params, options) {
|
|
4419
4419
|
const { memory_store_id, betas, ...query } = params;
|
|
4420
|
-
return this._client.get(path$
|
|
4420
|
+
return this._client.get(path$15`/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}?beta=true`, {
|
|
4421
4421
|
query,
|
|
4422
4422
|
...options,
|
|
4423
4423
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4438,7 +4438,7 @@ var MemoryVersions = class extends APIResource$2 {
|
|
|
4438
4438
|
*/
|
|
4439
4439
|
list(memoryStoreID, params = {}, options) {
|
|
4440
4440
|
const { betas, ...query } = params ?? {};
|
|
4441
|
-
return this._client.getAPIList(path$
|
|
4441
|
+
return this._client.getAPIList(path$15`/v1/memory_stores/${memoryStoreID}/memory_versions?beta=true`, PageCursor, {
|
|
4442
4442
|
query,
|
|
4443
4443
|
...options,
|
|
4444
4444
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4458,7 +4458,7 @@ var MemoryVersions = class extends APIResource$2 {
|
|
|
4458
4458
|
*/
|
|
4459
4459
|
redact(memoryVersionID, params, options) {
|
|
4460
4460
|
const { memory_store_id, betas } = params;
|
|
4461
|
-
return this._client.post(path$
|
|
4461
|
+
return this._client.post(path$15`/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}/redact?beta=true`, {
|
|
4462
4462
|
...options,
|
|
4463
4463
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
4464
4464
|
});
|
|
@@ -4502,7 +4502,7 @@ var MemoryStores = class extends APIResource$2 {
|
|
|
4502
4502
|
*/
|
|
4503
4503
|
retrieve(memoryStoreID, params = {}, options) {
|
|
4504
4504
|
const { betas } = params ?? {};
|
|
4505
|
-
return this._client.get(path$
|
|
4505
|
+
return this._client.get(path$15`/v1/memory_stores/${memoryStoreID}?beta=true`, {
|
|
4506
4506
|
...options,
|
|
4507
4507
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
4508
4508
|
});
|
|
@@ -4518,7 +4518,7 @@ var MemoryStores = class extends APIResource$2 {
|
|
|
4518
4518
|
*/
|
|
4519
4519
|
update(memoryStoreID, params, options) {
|
|
4520
4520
|
const { betas, ...body } = params;
|
|
4521
|
-
return this._client.post(path$
|
|
4521
|
+
return this._client.post(path$15`/v1/memory_stores/${memoryStoreID}?beta=true`, {
|
|
4522
4522
|
body,
|
|
4523
4523
|
...options,
|
|
4524
4524
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -4554,7 +4554,7 @@ var MemoryStores = class extends APIResource$2 {
|
|
|
4554
4554
|
*/
|
|
4555
4555
|
delete(memoryStoreID, params = {}, options) {
|
|
4556
4556
|
const { betas } = params ?? {};
|
|
4557
|
-
return this._client.delete(path$
|
|
4557
|
+
return this._client.delete(path$15`/v1/memory_stores/${memoryStoreID}?beta=true`, {
|
|
4558
4558
|
...options,
|
|
4559
4559
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
4560
4560
|
});
|
|
@@ -4570,7 +4570,7 @@ var MemoryStores = class extends APIResource$2 {
|
|
|
4570
4570
|
*/
|
|
4571
4571
|
archive(memoryStoreID, params = {}, options) {
|
|
4572
4572
|
const { betas } = params ?? {};
|
|
4573
|
-
return this._client.post(path$
|
|
4573
|
+
return this._client.post(path$15`/v1/memory_stores/${memoryStoreID}/archive?beta=true`, {
|
|
4574
4574
|
...options,
|
|
4575
4575
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
4576
4576
|
});
|
|
@@ -4660,7 +4660,7 @@ var Batches$3 = class extends APIResource$2 {
|
|
|
4660
4660
|
*/
|
|
4661
4661
|
retrieve(messageBatchID, params = {}, options) {
|
|
4662
4662
|
const { betas } = params ?? {};
|
|
4663
|
-
return this._client.get(path$
|
|
4663
|
+
return this._client.get(path$15`/v1/messages/batches/${messageBatchID}?beta=true`, {
|
|
4664
4664
|
...options,
|
|
4665
4665
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() }, options?.headers])
|
|
4666
4666
|
});
|
|
@@ -4707,7 +4707,7 @@ var Batches$3 = class extends APIResource$2 {
|
|
|
4707
4707
|
*/
|
|
4708
4708
|
delete(messageBatchID, params = {}, options) {
|
|
4709
4709
|
const { betas } = params ?? {};
|
|
4710
|
-
return this._client.delete(path$
|
|
4710
|
+
return this._client.delete(path$15`/v1/messages/batches/${messageBatchID}?beta=true`, {
|
|
4711
4711
|
...options,
|
|
4712
4712
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() }, options?.headers])
|
|
4713
4713
|
});
|
|
@@ -4736,7 +4736,7 @@ var Batches$3 = class extends APIResource$2 {
|
|
|
4736
4736
|
*/
|
|
4737
4737
|
cancel(messageBatchID, params = {}, options) {
|
|
4738
4738
|
const { betas } = params ?? {};
|
|
4739
|
-
return this._client.post(path$
|
|
4739
|
+
return this._client.post(path$15`/v1/messages/batches/${messageBatchID}/cancel?beta=true`, {
|
|
4740
4740
|
...options,
|
|
4741
4741
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() }, options?.headers])
|
|
4742
4742
|
});
|
|
@@ -6053,7 +6053,7 @@ var Events$1 = class extends APIResource$2 {
|
|
|
6053
6053
|
*/
|
|
6054
6054
|
list(sessionID, params = {}, options) {
|
|
6055
6055
|
const { betas, ...query } = params ?? {};
|
|
6056
|
-
return this._client.getAPIList(path$
|
|
6056
|
+
return this._client.getAPIList(path$15`/v1/sessions/${sessionID}/events?beta=true`, PageCursor, {
|
|
6057
6057
|
query,
|
|
6058
6058
|
...options,
|
|
6059
6059
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6085,7 +6085,7 @@ var Events$1 = class extends APIResource$2 {
|
|
|
6085
6085
|
*/
|
|
6086
6086
|
send(sessionID, params, options) {
|
|
6087
6087
|
const { betas, ...body } = params;
|
|
6088
|
-
return this._client.post(path$
|
|
6088
|
+
return this._client.post(path$15`/v1/sessions/${sessionID}/events?beta=true`, {
|
|
6089
6089
|
body,
|
|
6090
6090
|
...options,
|
|
6091
6091
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6104,7 +6104,7 @@ var Events$1 = class extends APIResource$2 {
|
|
|
6104
6104
|
*/
|
|
6105
6105
|
stream(sessionID, params = {}, options) {
|
|
6106
6106
|
const { betas } = params ?? {};
|
|
6107
|
-
return this._client.get(path$
|
|
6107
|
+
return this._client.get(path$15`/v1/sessions/${sessionID}/events/stream?beta=true`, {
|
|
6108
6108
|
...options,
|
|
6109
6109
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers]),
|
|
6110
6110
|
stream: true
|
|
@@ -6128,7 +6128,7 @@ var Resources = class extends APIResource$2 {
|
|
|
6128
6128
|
*/
|
|
6129
6129
|
retrieve(resourceID, params, options) {
|
|
6130
6130
|
const { session_id, betas } = params;
|
|
6131
|
-
return this._client.get(path$
|
|
6131
|
+
return this._client.get(path$15`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
|
|
6132
6132
|
...options,
|
|
6133
6133
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6134
6134
|
});
|
|
@@ -6150,7 +6150,7 @@ var Resources = class extends APIResource$2 {
|
|
|
6150
6150
|
*/
|
|
6151
6151
|
update(resourceID, params, options) {
|
|
6152
6152
|
const { session_id, betas, ...body } = params;
|
|
6153
|
-
return this._client.post(path$
|
|
6153
|
+
return this._client.post(path$15`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
|
|
6154
6154
|
body,
|
|
6155
6155
|
...options,
|
|
6156
6156
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6171,7 +6171,7 @@ var Resources = class extends APIResource$2 {
|
|
|
6171
6171
|
*/
|
|
6172
6172
|
list(sessionID, params = {}, options) {
|
|
6173
6173
|
const { betas, ...query } = params ?? {};
|
|
6174
|
-
return this._client.getAPIList(path$
|
|
6174
|
+
return this._client.getAPIList(path$15`/v1/sessions/${sessionID}/resources?beta=true`, PageCursor, {
|
|
6175
6175
|
query,
|
|
6176
6176
|
...options,
|
|
6177
6177
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6191,7 +6191,7 @@ var Resources = class extends APIResource$2 {
|
|
|
6191
6191
|
*/
|
|
6192
6192
|
delete(resourceID, params, options) {
|
|
6193
6193
|
const { session_id, betas } = params;
|
|
6194
|
-
return this._client.delete(path$
|
|
6194
|
+
return this._client.delete(path$15`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
|
|
6195
6195
|
...options,
|
|
6196
6196
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6197
6197
|
});
|
|
@@ -6213,7 +6213,7 @@ var Resources = class extends APIResource$2 {
|
|
|
6213
6213
|
*/
|
|
6214
6214
|
add(sessionID, params, options) {
|
|
6215
6215
|
const { betas, ...body } = params;
|
|
6216
|
-
return this._client.post(path$
|
|
6216
|
+
return this._client.post(path$15`/v1/sessions/${sessionID}/resources?beta=true`, {
|
|
6217
6217
|
body,
|
|
6218
6218
|
...options,
|
|
6219
6219
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6239,7 +6239,7 @@ var Events = class extends APIResource$2 {
|
|
|
6239
6239
|
*/
|
|
6240
6240
|
list(threadID, params, options) {
|
|
6241
6241
|
const { session_id, betas, ...query } = params;
|
|
6242
|
-
return this._client.getAPIList(path$
|
|
6242
|
+
return this._client.getAPIList(path$15`/v1/sessions/${session_id}/threads/${threadID}/events?beta=true`, PageCursor, {
|
|
6243
6243
|
query,
|
|
6244
6244
|
...options,
|
|
6245
6245
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6259,7 +6259,7 @@ var Events = class extends APIResource$2 {
|
|
|
6259
6259
|
*/
|
|
6260
6260
|
stream(threadID, params, options) {
|
|
6261
6261
|
const { session_id, betas } = params;
|
|
6262
|
-
return this._client.get(path$
|
|
6262
|
+
return this._client.get(path$15`/v1/sessions/${session_id}/threads/${threadID}/stream?beta=true`, {
|
|
6263
6263
|
...options,
|
|
6264
6264
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers]),
|
|
6265
6265
|
stream: true
|
|
@@ -6287,7 +6287,7 @@ var Threads$2 = class extends APIResource$2 {
|
|
|
6287
6287
|
*/
|
|
6288
6288
|
retrieve(threadID, params, options) {
|
|
6289
6289
|
const { session_id, betas } = params;
|
|
6290
|
-
return this._client.get(path$
|
|
6290
|
+
return this._client.get(path$15`/v1/sessions/${session_id}/threads/${threadID}?beta=true`, {
|
|
6291
6291
|
...options,
|
|
6292
6292
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6293
6293
|
});
|
|
@@ -6307,7 +6307,7 @@ var Threads$2 = class extends APIResource$2 {
|
|
|
6307
6307
|
*/
|
|
6308
6308
|
list(sessionID, params = {}, options) {
|
|
6309
6309
|
const { betas, ...query } = params ?? {};
|
|
6310
|
-
return this._client.getAPIList(path$
|
|
6310
|
+
return this._client.getAPIList(path$15`/v1/sessions/${sessionID}/threads?beta=true`, PageCursor, {
|
|
6311
6311
|
query,
|
|
6312
6312
|
...options,
|
|
6313
6313
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6327,7 +6327,7 @@ var Threads$2 = class extends APIResource$2 {
|
|
|
6327
6327
|
*/
|
|
6328
6328
|
archive(threadID, params, options) {
|
|
6329
6329
|
const { session_id, betas } = params;
|
|
6330
|
-
return this._client.post(path$
|
|
6330
|
+
return this._client.post(path$15`/v1/sessions/${session_id}/threads/${threadID}/archive?beta=true`, {
|
|
6331
6331
|
...options,
|
|
6332
6332
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6333
6333
|
});
|
|
@@ -6376,7 +6376,7 @@ var Sessions$2 = class extends APIResource$2 {
|
|
|
6376
6376
|
*/
|
|
6377
6377
|
retrieve(sessionID, params = {}, options) {
|
|
6378
6378
|
const { betas } = params ?? {};
|
|
6379
|
-
return this._client.get(path$
|
|
6379
|
+
return this._client.get(path$15`/v1/sessions/${sessionID}?beta=true`, {
|
|
6380
6380
|
...options,
|
|
6381
6381
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6382
6382
|
});
|
|
@@ -6394,7 +6394,7 @@ var Sessions$2 = class extends APIResource$2 {
|
|
|
6394
6394
|
*/
|
|
6395
6395
|
update(sessionID, params, options) {
|
|
6396
6396
|
const { betas, ...body } = params;
|
|
6397
|
-
return this._client.post(path$
|
|
6397
|
+
return this._client.post(path$15`/v1/sessions/${sessionID}?beta=true`, {
|
|
6398
6398
|
body,
|
|
6399
6399
|
...options,
|
|
6400
6400
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6432,7 +6432,7 @@ var Sessions$2 = class extends APIResource$2 {
|
|
|
6432
6432
|
*/
|
|
6433
6433
|
delete(sessionID, params = {}, options) {
|
|
6434
6434
|
const { betas } = params ?? {};
|
|
6435
|
-
return this._client.delete(path$
|
|
6435
|
+
return this._client.delete(path$15`/v1/sessions/${sessionID}?beta=true`, {
|
|
6436
6436
|
...options,
|
|
6437
6437
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6438
6438
|
});
|
|
@@ -6450,7 +6450,7 @@ var Sessions$2 = class extends APIResource$2 {
|
|
|
6450
6450
|
*/
|
|
6451
6451
|
archive(sessionID, params = {}, options) {
|
|
6452
6452
|
const { betas } = params ?? {};
|
|
6453
|
-
return this._client.post(path$
|
|
6453
|
+
return this._client.post(path$15`/v1/sessions/${sessionID}/archive?beta=true`, {
|
|
6454
6454
|
...options,
|
|
6455
6455
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6456
6456
|
});
|
|
@@ -6474,7 +6474,7 @@ var Versions$1 = class extends APIResource$2 {
|
|
|
6474
6474
|
*/
|
|
6475
6475
|
create(skillID, params = {}, options) {
|
|
6476
6476
|
const { betas, ...body } = params ?? {};
|
|
6477
|
-
return this._client.post(path$
|
|
6477
|
+
return this._client.post(path$15`/v1/skills/${skillID}/versions?beta=true`, multipartFormRequestOptions$1({
|
|
6478
6478
|
body,
|
|
6479
6479
|
...options,
|
|
6480
6480
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() }, options?.headers])
|
|
@@ -6493,7 +6493,7 @@ var Versions$1 = class extends APIResource$2 {
|
|
|
6493
6493
|
*/
|
|
6494
6494
|
retrieve(version, params, options) {
|
|
6495
6495
|
const { skill_id, betas } = params;
|
|
6496
|
-
return this._client.get(path$
|
|
6496
|
+
return this._client.get(path$15`/v1/skills/${skill_id}/versions/${version}?beta=true`, {
|
|
6497
6497
|
...options,
|
|
6498
6498
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() }, options?.headers])
|
|
6499
6499
|
});
|
|
@@ -6513,7 +6513,7 @@ var Versions$1 = class extends APIResource$2 {
|
|
|
6513
6513
|
*/
|
|
6514
6514
|
list(skillID, params = {}, options) {
|
|
6515
6515
|
const { betas, ...query } = params ?? {};
|
|
6516
|
-
return this._client.getAPIList(path$
|
|
6516
|
+
return this._client.getAPIList(path$15`/v1/skills/${skillID}/versions?beta=true`, PageCursor, {
|
|
6517
6517
|
query,
|
|
6518
6518
|
...options,
|
|
6519
6519
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() }, options?.headers])
|
|
@@ -6532,7 +6532,7 @@ var Versions$1 = class extends APIResource$2 {
|
|
|
6532
6532
|
*/
|
|
6533
6533
|
delete(version, params, options) {
|
|
6534
6534
|
const { skill_id, betas } = params;
|
|
6535
|
-
return this._client.delete(path$
|
|
6535
|
+
return this._client.delete(path$15`/v1/skills/${skill_id}/versions/${version}?beta=true`, {
|
|
6536
6536
|
...options,
|
|
6537
6537
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() }, options?.headers])
|
|
6538
6538
|
});
|
|
@@ -6571,7 +6571,7 @@ var Skills$1 = class extends APIResource$2 {
|
|
|
6571
6571
|
*/
|
|
6572
6572
|
retrieve(skillID, params = {}, options) {
|
|
6573
6573
|
const { betas } = params ?? {};
|
|
6574
|
-
return this._client.get(path$
|
|
6574
|
+
return this._client.get(path$15`/v1/skills/${skillID}?beta=true`, {
|
|
6575
6575
|
...options,
|
|
6576
6576
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() }, options?.headers])
|
|
6577
6577
|
});
|
|
@@ -6605,7 +6605,7 @@ var Skills$1 = class extends APIResource$2 {
|
|
|
6605
6605
|
*/
|
|
6606
6606
|
delete(skillID, params = {}, options) {
|
|
6607
6607
|
const { betas } = params ?? {};
|
|
6608
|
-
return this._client.delete(path$
|
|
6608
|
+
return this._client.delete(path$15`/v1/skills/${skillID}?beta=true`, {
|
|
6609
6609
|
...options,
|
|
6610
6610
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() }, options?.headers])
|
|
6611
6611
|
});
|
|
@@ -6636,7 +6636,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6636
6636
|
*/
|
|
6637
6637
|
create(vaultID, params, options) {
|
|
6638
6638
|
const { betas, ...body } = params;
|
|
6639
|
-
return this._client.post(path$
|
|
6639
|
+
return this._client.post(path$15`/v1/vaults/${vaultID}/credentials?beta=true`, {
|
|
6640
6640
|
body,
|
|
6641
6641
|
...options,
|
|
6642
6642
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6656,7 +6656,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6656
6656
|
*/
|
|
6657
6657
|
retrieve(credentialID, params, options) {
|
|
6658
6658
|
const { vault_id, betas } = params;
|
|
6659
|
-
return this._client.get(path$
|
|
6659
|
+
return this._client.get(path$15`/v1/vaults/${vault_id}/credentials/${credentialID}?beta=true`, {
|
|
6660
6660
|
...options,
|
|
6661
6661
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6662
6662
|
});
|
|
@@ -6675,7 +6675,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6675
6675
|
*/
|
|
6676
6676
|
update(credentialID, params, options) {
|
|
6677
6677
|
const { vault_id, betas, ...body } = params;
|
|
6678
|
-
return this._client.post(path$
|
|
6678
|
+
return this._client.post(path$15`/v1/vaults/${vault_id}/credentials/${credentialID}?beta=true`, {
|
|
6679
6679
|
body,
|
|
6680
6680
|
...options,
|
|
6681
6681
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6696,7 +6696,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6696
6696
|
*/
|
|
6697
6697
|
list(vaultID, params = {}, options) {
|
|
6698
6698
|
const { betas, ...query } = params ?? {};
|
|
6699
|
-
return this._client.getAPIList(path$
|
|
6699
|
+
return this._client.getAPIList(path$15`/v1/vaults/${vaultID}/credentials?beta=true`, PageCursor, {
|
|
6700
6700
|
query,
|
|
6701
6701
|
...options,
|
|
6702
6702
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6716,7 +6716,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6716
6716
|
*/
|
|
6717
6717
|
delete(credentialID, params, options) {
|
|
6718
6718
|
const { vault_id, betas } = params;
|
|
6719
|
-
return this._client.delete(path$
|
|
6719
|
+
return this._client.delete(path$15`/v1/vaults/${vault_id}/credentials/${credentialID}?beta=true`, {
|
|
6720
6720
|
...options,
|
|
6721
6721
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6722
6722
|
});
|
|
@@ -6735,7 +6735,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6735
6735
|
*/
|
|
6736
6736
|
archive(credentialID, params, options) {
|
|
6737
6737
|
const { vault_id, betas } = params;
|
|
6738
|
-
return this._client.post(path$
|
|
6738
|
+
return this._client.post(path$15`/v1/vaults/${vault_id}/credentials/${credentialID}/archive?beta=true`, {
|
|
6739
6739
|
...options,
|
|
6740
6740
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6741
6741
|
});
|
|
@@ -6754,7 +6754,7 @@ var Credentials = class extends APIResource$2 {
|
|
|
6754
6754
|
*/
|
|
6755
6755
|
mcpOAuthValidate(credentialID, params, options) {
|
|
6756
6756
|
const { vault_id, betas } = params;
|
|
6757
|
-
return this._client.post(path$
|
|
6757
|
+
return this._client.post(path$15`/v1/vaults/${vault_id}/credentials/${credentialID}/mcp_oauth_validate?beta=true`, {
|
|
6758
6758
|
...options,
|
|
6759
6759
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6760
6760
|
});
|
|
@@ -6799,7 +6799,7 @@ var Vaults = class extends APIResource$2 {
|
|
|
6799
6799
|
*/
|
|
6800
6800
|
retrieve(vaultID, params = {}, options) {
|
|
6801
6801
|
const { betas } = params ?? {};
|
|
6802
|
-
return this._client.get(path$
|
|
6802
|
+
return this._client.get(path$15`/v1/vaults/${vaultID}?beta=true`, {
|
|
6803
6803
|
...options,
|
|
6804
6804
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6805
6805
|
});
|
|
@@ -6817,7 +6817,7 @@ var Vaults = class extends APIResource$2 {
|
|
|
6817
6817
|
*/
|
|
6818
6818
|
update(vaultID, params, options) {
|
|
6819
6819
|
const { betas, ...body } = params;
|
|
6820
|
-
return this._client.post(path$
|
|
6820
|
+
return this._client.post(path$15`/v1/vaults/${vaultID}?beta=true`, {
|
|
6821
6821
|
body,
|
|
6822
6822
|
...options,
|
|
6823
6823
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
@@ -6855,7 +6855,7 @@ var Vaults = class extends APIResource$2 {
|
|
|
6855
6855
|
*/
|
|
6856
6856
|
delete(vaultID, params = {}, options) {
|
|
6857
6857
|
const { betas } = params ?? {};
|
|
6858
|
-
return this._client.delete(path$
|
|
6858
|
+
return this._client.delete(path$15`/v1/vaults/${vaultID}?beta=true`, {
|
|
6859
6859
|
...options,
|
|
6860
6860
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6861
6861
|
});
|
|
@@ -6873,7 +6873,7 @@ var Vaults = class extends APIResource$2 {
|
|
|
6873
6873
|
*/
|
|
6874
6874
|
archive(vaultID, params = {}, options) {
|
|
6875
6875
|
const { betas } = params ?? {};
|
|
6876
|
-
return this._client.post(path$
|
|
6876
|
+
return this._client.post(path$15`/v1/vaults/${vaultID}/archive?beta=true`, {
|
|
6877
6877
|
...options,
|
|
6878
6878
|
headers: buildHeaders$2([{ "anthropic-beta": [...betas ?? [], "managed-agents-2026-04-01"].toString() }, options?.headers])
|
|
6879
6879
|
});
|
|
@@ -7510,7 +7510,7 @@ var Batches$2 = class extends APIResource$2 {
|
|
|
7510
7510
|
* ```
|
|
7511
7511
|
*/
|
|
7512
7512
|
retrieve(messageBatchID, options) {
|
|
7513
|
-
return this._client.get(path$
|
|
7513
|
+
return this._client.get(path$15`/v1/messages/batches/${messageBatchID}`, options);
|
|
7514
7514
|
}
|
|
7515
7515
|
/**
|
|
7516
7516
|
* List all Message Batches within a Workspace. Most recently created batches are
|
|
@@ -7549,7 +7549,7 @@ var Batches$2 = class extends APIResource$2 {
|
|
|
7549
7549
|
* ```
|
|
7550
7550
|
*/
|
|
7551
7551
|
delete(messageBatchID, options) {
|
|
7552
|
-
return this._client.delete(path$
|
|
7552
|
+
return this._client.delete(path$15`/v1/messages/batches/${messageBatchID}`, options);
|
|
7553
7553
|
}
|
|
7554
7554
|
/**
|
|
7555
7555
|
* Batches may be canceled any time before processing ends. Once cancellation is
|
|
@@ -7573,7 +7573,7 @@ var Batches$2 = class extends APIResource$2 {
|
|
|
7573
7573
|
* ```
|
|
7574
7574
|
*/
|
|
7575
7575
|
cancel(messageBatchID, options) {
|
|
7576
|
-
return this._client.post(path$
|
|
7576
|
+
return this._client.post(path$15`/v1/messages/batches/${messageBatchID}/cancel`, options);
|
|
7577
7577
|
}
|
|
7578
7578
|
/**
|
|
7579
7579
|
* Streams the results of a Message Batch as a `.jsonl` file.
|
|
@@ -7728,7 +7728,7 @@ var Models$2 = class extends APIResource$2 {
|
|
|
7728
7728
|
*/
|
|
7729
7729
|
retrieve(modelID, params = {}, options) {
|
|
7730
7730
|
const { betas } = params ?? {};
|
|
7731
|
-
return this._client.get(path$
|
|
7731
|
+
return this._client.get(path$15`/v1/models/${modelID}`, {
|
|
7732
7732
|
...options,
|
|
7733
7733
|
headers: buildHeaders$2([{ ...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : void 0 }, options?.headers])
|
|
7734
7734
|
});
|
|
@@ -13291,9 +13291,9 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13291
13291
|
exports.removeUndefinedValuesInObject = removeUndefinedValuesInObject;
|
|
13292
13292
|
exports.isValidFile = isValidFile;
|
|
13293
13293
|
exports.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
|
|
13294
|
-
const fs$
|
|
13294
|
+
const fs$17 = __require("fs");
|
|
13295
13295
|
const os$2 = __require("os");
|
|
13296
|
-
const path$
|
|
13296
|
+
const path$14 = __require("path");
|
|
13297
13297
|
const WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
|
|
13298
13298
|
const CLOUDSDK_CONFIG_DIRECTORY = "gcloud";
|
|
13299
13299
|
/**
|
|
@@ -13411,7 +13411,7 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13411
13411
|
*/
|
|
13412
13412
|
async function isValidFile(filePath) {
|
|
13413
13413
|
try {
|
|
13414
|
-
return (await fs$
|
|
13414
|
+
return (await fs$17.promises.lstat(filePath)).isFile();
|
|
13415
13415
|
} catch (e) {
|
|
13416
13416
|
return false;
|
|
13417
13417
|
}
|
|
@@ -13422,8 +13422,8 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13422
13422
|
* @internal
|
|
13423
13423
|
*/
|
|
13424
13424
|
function getWellKnownCertificateConfigFileLocation() {
|
|
13425
|
-
const configDir = process.env.CLOUDSDK_CONFIG || (_isWindows() ? path$
|
|
13426
|
-
return path$
|
|
13425
|
+
const configDir = process.env.CLOUDSDK_CONFIG || (_isWindows() ? path$14.join(process.env.APPDATA || "", CLOUDSDK_CONFIG_DIRECTORY) : path$14.join(process.env.HOME || "", ".config", CLOUDSDK_CONFIG_DIRECTORY));
|
|
13426
|
+
return path$14.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE);
|
|
13427
13427
|
}
|
|
13428
13428
|
/**
|
|
13429
13429
|
* Checks if the current operating system is Windows.
|
|
@@ -15124,11 +15124,11 @@ var require_errorWithCode = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15124
15124
|
var require_getCredentials = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
15125
15125
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15126
15126
|
exports.getCredentials = getCredentials;
|
|
15127
|
-
const path$
|
|
15128
|
-
const fs$
|
|
15127
|
+
const path$13 = __require("path");
|
|
15128
|
+
const fs$16 = __require("fs");
|
|
15129
15129
|
const util_1$1 = __require("util");
|
|
15130
15130
|
const errorWithCode_1 = require_errorWithCode();
|
|
15131
|
-
const readFile = fs$
|
|
15131
|
+
const readFile = fs$16.readFile ? (0, util_1$1.promisify)(fs$16.readFile) : async () => {
|
|
15132
15132
|
throw new errorWithCode_1.ErrorWithCode("use key rather than keyFile.", "MISSING_CREDENTIALS");
|
|
15133
15133
|
};
|
|
15134
15134
|
var ExtensionFiles;
|
|
@@ -15207,7 +15207,7 @@ var require_getCredentials = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15207
15207
|
* @returns An instance of a class that implements ICredentialsProvider.
|
|
15208
15208
|
*/
|
|
15209
15209
|
static create(keyFilePath) {
|
|
15210
|
-
switch (path$
|
|
15210
|
+
switch (path$13.extname(keyFilePath)) {
|
|
15211
15211
|
case ExtensionFiles.JSON: return new JsonCredentialsProvider(keyFilePath);
|
|
15212
15212
|
case ExtensionFiles.DER:
|
|
15213
15213
|
case ExtensionFiles.CRT:
|
|
@@ -16676,10 +16676,10 @@ var require_filesubjecttokensupplier = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
16676
16676
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16677
16677
|
exports.FileSubjectTokenSupplier = void 0;
|
|
16678
16678
|
const util_1 = __require("util");
|
|
16679
|
-
const fs$
|
|
16680
|
-
const readFile = (0, util_1.promisify)(fs$
|
|
16681
|
-
const realpath = (0, util_1.promisify)(fs$
|
|
16682
|
-
const lstat = (0, util_1.promisify)(fs$
|
|
16679
|
+
const fs$15 = __require("fs");
|
|
16680
|
+
const readFile = (0, util_1.promisify)(fs$15.readFile ?? (() => {}));
|
|
16681
|
+
const realpath = (0, util_1.promisify)(fs$15.realpath ?? (() => {}));
|
|
16682
|
+
const lstat = (0, util_1.promisify)(fs$15.lstat ?? (() => {}));
|
|
16683
16683
|
/**
|
|
16684
16684
|
* Internal subject token supplier implementation used when a file location
|
|
16685
16685
|
* is configured in the credential configuration used to build an {@link IdentityPoolClient}
|
|
@@ -16781,7 +16781,7 @@ var require_certificatesubjecttokensupplier = /* @__PURE__ */ __commonJSMin(((ex
|
|
|
16781
16781
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16782
16782
|
exports.CertificateSubjectTokenSupplier = exports.InvalidConfigurationError = exports.CertificateSourceUnavailableError = exports.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = void 0;
|
|
16783
16783
|
const util_1 = require_util$1();
|
|
16784
|
-
const fs$
|
|
16784
|
+
const fs$14 = __require("fs");
|
|
16785
16785
|
const crypto_1 = __require("crypto");
|
|
16786
16786
|
const https$1 = __require("https");
|
|
16787
16787
|
exports.CERTIFICATE_CONFIGURATION_ENV_VARIABLE = "GOOGLE_API_CERTIFICATE_CONFIG";
|
|
@@ -16876,7 +16876,7 @@ var require_certificatesubjecttokensupplier = /* @__PURE__ */ __commonJSMin(((ex
|
|
|
16876
16876
|
const configPath = this.certificateConfigPath;
|
|
16877
16877
|
let fileContents;
|
|
16878
16878
|
try {
|
|
16879
|
-
fileContents = await fs$
|
|
16879
|
+
fileContents = await fs$14.promises.readFile(configPath, "utf8");
|
|
16880
16880
|
} catch (err) {
|
|
16881
16881
|
throw new CertificateSourceUnavailableError(`Failed to read certificate config file at: ${configPath}`);
|
|
16882
16882
|
}
|
|
@@ -16901,13 +16901,13 @@ var require_certificatesubjecttokensupplier = /* @__PURE__ */ __commonJSMin(((ex
|
|
|
16901
16901
|
async #getKeyAndCert(certPath, keyPath) {
|
|
16902
16902
|
let cert, key;
|
|
16903
16903
|
try {
|
|
16904
|
-
cert = await fs$
|
|
16904
|
+
cert = await fs$14.promises.readFile(certPath);
|
|
16905
16905
|
new crypto_1.X509Certificate(cert);
|
|
16906
16906
|
} catch (err) {
|
|
16907
16907
|
throw new CertificateSourceUnavailableError(`Failed to read certificate file at ${certPath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
16908
16908
|
}
|
|
16909
16909
|
try {
|
|
16910
|
-
key = await fs$
|
|
16910
|
+
key = await fs$14.promises.readFile(keyPath);
|
|
16911
16911
|
(0, crypto_1.createPrivateKey)(key);
|
|
16912
16912
|
} catch (err) {
|
|
16913
16913
|
throw new CertificateSourceUnavailableError(`Failed to read private key file at ${keyPath}: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -16926,7 +16926,7 @@ var require_certificatesubjecttokensupplier = /* @__PURE__ */ __commonJSMin(((ex
|
|
|
16926
16926
|
const leafCert = new crypto_1.X509Certificate(leafCertBuffer);
|
|
16927
16927
|
if (!this.trustChainPath) return JSON.stringify([leafCert.raw.toString("base64")]);
|
|
16928
16928
|
try {
|
|
16929
|
-
const chainCerts = ((await fs$
|
|
16929
|
+
const chainCerts = ((await fs$14.promises.readFile(this.trustChainPath, "utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g) ?? []).map((pem, index) => {
|
|
16930
16930
|
try {
|
|
16931
16931
|
return new crypto_1.X509Certificate(pem);
|
|
16932
16932
|
} catch (err) {
|
|
@@ -17587,7 +17587,7 @@ var require_pluggable_auth_handler = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
17587
17587
|
exports.PluggableAuthHandler = exports.ExecutableError = void 0;
|
|
17588
17588
|
const executable_response_1 = require_executable_response();
|
|
17589
17589
|
const childProcess = __require("child_process");
|
|
17590
|
-
const fs$
|
|
17590
|
+
const fs$13 = __require("fs");
|
|
17591
17591
|
/**
|
|
17592
17592
|
* Error thrown from the executable run by PluggableAuthClient.
|
|
17593
17593
|
*/
|
|
@@ -17664,12 +17664,12 @@ var require_pluggable_auth_handler = /* @__PURE__ */ __commonJSMin(((exports) =>
|
|
|
17664
17664
|
if (!this.outputFile || this.outputFile.length === 0) return;
|
|
17665
17665
|
let filePath;
|
|
17666
17666
|
try {
|
|
17667
|
-
filePath = await fs$
|
|
17667
|
+
filePath = await fs$13.promises.realpath(this.outputFile);
|
|
17668
17668
|
} catch {
|
|
17669
17669
|
return;
|
|
17670
17670
|
}
|
|
17671
|
-
if (!(await fs$
|
|
17672
|
-
const responseString = await fs$
|
|
17671
|
+
if (!(await fs$13.promises.lstat(filePath)).isFile()) return;
|
|
17672
|
+
const responseString = await fs$13.promises.readFile(filePath, { encoding: "utf8" });
|
|
17673
17673
|
if (responseString === "") return;
|
|
17674
17674
|
try {
|
|
17675
17675
|
const responseJson = JSON.parse(responseString);
|
|
@@ -18091,11 +18091,11 @@ var require_googleauth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18091
18091
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18092
18092
|
exports.GoogleAuth = exports.GoogleAuthExceptionMessages = void 0;
|
|
18093
18093
|
const child_process_1 = __require("child_process");
|
|
18094
|
-
const fs$
|
|
18094
|
+
const fs$12 = __require("fs");
|
|
18095
18095
|
const gaxios_1 = require_src$3();
|
|
18096
18096
|
const gcpMetadata = require_src$1();
|
|
18097
18097
|
const os$1 = __require("os");
|
|
18098
|
-
const path$
|
|
18098
|
+
const path$12 = __require("path");
|
|
18099
18099
|
const crypto_1 = require_crypto();
|
|
18100
18100
|
const computeclient_1 = require_computeclient();
|
|
18101
18101
|
const idtokenclient_1 = require_idtokenclient();
|
|
@@ -18335,11 +18335,11 @@ var require_googleauth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18335
18335
|
if (this._isWindows()) location = process.env["APPDATA"];
|
|
18336
18336
|
else {
|
|
18337
18337
|
const home = process.env["HOME"];
|
|
18338
|
-
if (home) location = path$
|
|
18338
|
+
if (home) location = path$12.join(home, ".config");
|
|
18339
18339
|
}
|
|
18340
18340
|
if (location) {
|
|
18341
|
-
location = path$
|
|
18342
|
-
if (!fs$
|
|
18341
|
+
location = path$12.join(location, "gcloud", "application_default_credentials.json");
|
|
18342
|
+
if (!fs$12.existsSync(location)) location = null;
|
|
18343
18343
|
}
|
|
18344
18344
|
if (!location) return null;
|
|
18345
18345
|
return await this._getApplicationCredentialsFromFilePath(location, options);
|
|
@@ -18353,13 +18353,13 @@ var require_googleauth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18353
18353
|
async _getApplicationCredentialsFromFilePath(filePath, options = {}) {
|
|
18354
18354
|
if (!filePath || filePath.length === 0) throw new Error("The file path is invalid.");
|
|
18355
18355
|
try {
|
|
18356
|
-
filePath = fs$
|
|
18357
|
-
if (!fs$
|
|
18356
|
+
filePath = fs$12.realpathSync(filePath);
|
|
18357
|
+
if (!fs$12.lstatSync(filePath).isFile()) throw new Error();
|
|
18358
18358
|
} catch (err) {
|
|
18359
18359
|
if (err instanceof Error) err.message = `The file at ${filePath} does not exist, or it is not a file. ${err.message}`;
|
|
18360
18360
|
throw err;
|
|
18361
18361
|
}
|
|
18362
|
-
const readStream = fs$
|
|
18362
|
+
const readStream = fs$12.createReadStream(filePath);
|
|
18363
18363
|
return this.fromStream(readStream, options);
|
|
18364
18364
|
}
|
|
18365
18365
|
/**
|
|
@@ -18625,8 +18625,8 @@ var require_googleauth = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18625
18625
|
async #determineClient() {
|
|
18626
18626
|
if (this.jsonContent) return this._cacheClientFromJSON(this.jsonContent, this.clientOptions);
|
|
18627
18627
|
else if (this.keyFilename) {
|
|
18628
|
-
const filePath = path$
|
|
18629
|
-
const stream = fs$
|
|
18628
|
+
const filePath = path$12.resolve(this.keyFilename);
|
|
18629
|
+
const stream = fs$12.createReadStream(filePath);
|
|
18630
18630
|
return await this.fromStreamAsync(stream, this.clientOptions);
|
|
18631
18631
|
} else if (this.apiKey) {
|
|
18632
18632
|
const client = await this.fromAPIKey(this.apiKey, this.clientOptions);
|
|
@@ -35244,7 +35244,7 @@ const createPathTagFunction$1 = (pathEncoder = encodeURIPath$1) => (function pat
|
|
|
35244
35244
|
/**
|
|
35245
35245
|
* URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced.
|
|
35246
35246
|
*/
|
|
35247
|
-
const path$
|
|
35247
|
+
const path$11 = /* @__PURE__ */ createPathTagFunction$1(encodeURIPath$1);
|
|
35248
35248
|
/**
|
|
35249
35249
|
* @license
|
|
35250
35250
|
* Copyright 2025 Google LLC
|
|
@@ -35256,7 +35256,7 @@ var BaseInteractions = class extends APIResource$1 {
|
|
|
35256
35256
|
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
35257
35257
|
if ("model" in body && "agent_config" in body) throw new GeminiNextGenAPIClientError(`Invalid request: specified \`model\` and \`agent_config\`. If specifying \`model\`, use \`generation_config\`.`);
|
|
35258
35258
|
if ("agent" in body && "generation_config" in body) throw new GeminiNextGenAPIClientError(`Invalid request: specified \`agent\` and \`generation_config\`. If specifying \`agent\`, use \`agent_config\`.`);
|
|
35259
|
-
return this._client.post(path$
|
|
35259
|
+
return this._client.post(path$11`/${api_version}/interactions`, Object.assign(Object.assign({ body }, options), { stream: (_a = params.stream) !== null && _a !== void 0 ? _a : false }));
|
|
35260
35260
|
}
|
|
35261
35261
|
/**
|
|
35262
35262
|
* Deletes the interaction by id.
|
|
@@ -35270,7 +35270,7 @@ var BaseInteractions = class extends APIResource$1 {
|
|
|
35270
35270
|
*/
|
|
35271
35271
|
delete(id, params = {}, options) {
|
|
35272
35272
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
35273
|
-
return this._client.delete(path$
|
|
35273
|
+
return this._client.delete(path$11`/${api_version}/interactions/${id}`, options);
|
|
35274
35274
|
}
|
|
35275
35275
|
/**
|
|
35276
35276
|
* Cancels an interaction by id. This only applies to background interactions that
|
|
@@ -35285,12 +35285,12 @@ var BaseInteractions = class extends APIResource$1 {
|
|
|
35285
35285
|
*/
|
|
35286
35286
|
cancel(id, params = {}, options) {
|
|
35287
35287
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
35288
|
-
return this._client.post(path$
|
|
35288
|
+
return this._client.post(path$11`/${api_version}/interactions/${id}/cancel`, options);
|
|
35289
35289
|
}
|
|
35290
35290
|
get(id, params = {}, options) {
|
|
35291
35291
|
var _a;
|
|
35292
35292
|
const _b = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _b, query = __rest(_b, ["api_version"]);
|
|
35293
|
-
return this._client.get(path$
|
|
35293
|
+
return this._client.get(path$11`/${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 }));
|
|
35294
35294
|
}
|
|
35295
35295
|
};
|
|
35296
35296
|
BaseInteractions._key = Object.freeze(["interactions"]);
|
|
@@ -35306,14 +35306,14 @@ var BaseWebhooks = class extends APIResource$1 {
|
|
|
35306
35306
|
*/
|
|
35307
35307
|
create(params, options) {
|
|
35308
35308
|
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
35309
|
-
return this._client.post(path$
|
|
35309
|
+
return this._client.post(path$11`/${api_version}/webhooks`, Object.assign({ body }, options));
|
|
35310
35310
|
}
|
|
35311
35311
|
/**
|
|
35312
35312
|
* Updates an existing Webhook.
|
|
35313
35313
|
*/
|
|
35314
35314
|
update(id, params = {}, options) {
|
|
35315
35315
|
const _a = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion, update_mask } = _a, body = __rest(_a, ["api_version", "update_mask"]);
|
|
35316
|
-
return this._client.patch(path$
|
|
35316
|
+
return this._client.patch(path$11`/${api_version}/webhooks/${id}`, Object.assign({
|
|
35317
35317
|
query: { update_mask },
|
|
35318
35318
|
body
|
|
35319
35319
|
}, options));
|
|
@@ -35323,35 +35323,35 @@ var BaseWebhooks = class extends APIResource$1 {
|
|
|
35323
35323
|
*/
|
|
35324
35324
|
list(params = {}, options) {
|
|
35325
35325
|
const _a = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a, query = __rest(_a, ["api_version"]);
|
|
35326
|
-
return this._client.get(path$
|
|
35326
|
+
return this._client.get(path$11`/${api_version}/webhooks`, Object.assign({ query }, options));
|
|
35327
35327
|
}
|
|
35328
35328
|
/**
|
|
35329
35329
|
* Deletes a Webhook.
|
|
35330
35330
|
*/
|
|
35331
35331
|
delete(id, params = {}, options) {
|
|
35332
35332
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
35333
|
-
return this._client.delete(path$
|
|
35333
|
+
return this._client.delete(path$11`/${api_version}/webhooks/${id}`, options);
|
|
35334
35334
|
}
|
|
35335
35335
|
/**
|
|
35336
35336
|
* Gets a specific Webhook.
|
|
35337
35337
|
*/
|
|
35338
35338
|
get(id, params = {}, options) {
|
|
35339
35339
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
35340
|
-
return this._client.get(path$
|
|
35340
|
+
return this._client.get(path$11`/${api_version}/webhooks/${id}`, options);
|
|
35341
35341
|
}
|
|
35342
35342
|
/**
|
|
35343
35343
|
* Sends a ping event to a Webhook.
|
|
35344
35344
|
*/
|
|
35345
35345
|
ping(id, params = void 0, options) {
|
|
35346
35346
|
const { api_version = this._client.apiVersion, body } = params !== null && params !== void 0 ? params : {};
|
|
35347
|
-
return this._client.post(path$
|
|
35347
|
+
return this._client.post(path$11`/${api_version}/webhooks/${id}:ping`, Object.assign({ body }, options));
|
|
35348
35348
|
}
|
|
35349
35349
|
/**
|
|
35350
35350
|
* Generates a new signing secret for a Webhook.
|
|
35351
35351
|
*/
|
|
35352
35352
|
rotateSigningSecret(id, params = {}, options) {
|
|
35353
35353
|
const _a = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a, body = __rest(_a, ["api_version"]);
|
|
35354
|
-
return this._client.post(path$
|
|
35354
|
+
return this._client.post(path$11`/${api_version}/webhooks/${id}:rotateSigningSecret`, Object.assign({ body }, options));
|
|
35355
35355
|
}
|
|
35356
35356
|
};
|
|
35357
35357
|
BaseWebhooks._key = Object.freeze(["webhooks"]);
|
|
@@ -37371,7 +37371,7 @@ var NodeUploader = class {
|
|
|
37371
37371
|
type: void 0
|
|
37372
37372
|
};
|
|
37373
37373
|
if (typeof file === "string") {
|
|
37374
|
-
fileStat.size = (await fs$
|
|
37374
|
+
fileStat.size = (await fs$11.stat(file)).size;
|
|
37375
37375
|
fileStat.type = this.inferMimeType(file);
|
|
37376
37376
|
return fileStat;
|
|
37377
37377
|
} else return await getBlobStat(file);
|
|
@@ -37503,7 +37503,7 @@ var NodeUploader = class {
|
|
|
37503
37503
|
let fileHandle;
|
|
37504
37504
|
const fileName = path$1$1.basename(file);
|
|
37505
37505
|
try {
|
|
37506
|
-
fileHandle = await fs$
|
|
37506
|
+
fileHandle = await fs$11.open(file, "r");
|
|
37507
37507
|
if (!fileHandle) throw new Error(`Failed to open file`);
|
|
37508
37508
|
fileSize = (await fileHandle.stat()).size;
|
|
37509
37509
|
while (offset < fileSize) {
|
|
@@ -40224,7 +40224,7 @@ const createPathTagFunction = (pathEncoder = encodeURIPath) => function path(sta
|
|
|
40224
40224
|
/**
|
|
40225
40225
|
* URI-encodes path params and ensures no unsafe /./ or /../ path segments are introduced.
|
|
40226
40226
|
*/
|
|
40227
|
-
const path$
|
|
40227
|
+
const path$10 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
40228
40228
|
//#endregion
|
|
40229
40229
|
//#region ../../node_modules/.pnpm/openai@6.39.1_ws@8.21.0_zod@4.4.3/node_modules/openai/resources/chat/completions/messages.mjs
|
|
40230
40230
|
/**
|
|
@@ -40246,7 +40246,7 @@ var Messages$1 = class extends APIResource {
|
|
|
40246
40246
|
* ```
|
|
40247
40247
|
*/
|
|
40248
40248
|
list(completionID, query = {}, options) {
|
|
40249
|
-
return this._client.getAPIList(path$
|
|
40249
|
+
return this._client.getAPIList(path$10`/chat/completions/${completionID}/messages`, CursorPage, {
|
|
40250
40250
|
query,
|
|
40251
40251
|
...options,
|
|
40252
40252
|
__security: { bearerAuth: true }
|
|
@@ -41402,7 +41402,7 @@ var Completions$1 = class extends APIResource {
|
|
|
41402
41402
|
* ```
|
|
41403
41403
|
*/
|
|
41404
41404
|
retrieve(completionID, options) {
|
|
41405
|
-
return this._client.get(path$
|
|
41405
|
+
return this._client.get(path$10`/chat/completions/${completionID}`, {
|
|
41406
41406
|
...options,
|
|
41407
41407
|
__security: { bearerAuth: true }
|
|
41408
41408
|
});
|
|
@@ -41421,7 +41421,7 @@ var Completions$1 = class extends APIResource {
|
|
|
41421
41421
|
* ```
|
|
41422
41422
|
*/
|
|
41423
41423
|
update(completionID, body, options) {
|
|
41424
|
-
return this._client.post(path$
|
|
41424
|
+
return this._client.post(path$10`/chat/completions/${completionID}`, {
|
|
41425
41425
|
body,
|
|
41426
41426
|
...options,
|
|
41427
41427
|
__security: { bearerAuth: true }
|
|
@@ -41457,7 +41457,7 @@ var Completions$1 = class extends APIResource {
|
|
|
41457
41457
|
* ```
|
|
41458
41458
|
*/
|
|
41459
41459
|
delete(completionID, options) {
|
|
41460
|
-
return this._client.delete(path$
|
|
41460
|
+
return this._client.delete(path$10`/chat/completions/${completionID}`, {
|
|
41461
41461
|
...options,
|
|
41462
41462
|
__security: { bearerAuth: true }
|
|
41463
41463
|
});
|
|
@@ -41526,7 +41526,7 @@ var AdminAPIKeys = class extends APIResource {
|
|
|
41526
41526
|
* ```
|
|
41527
41527
|
*/
|
|
41528
41528
|
retrieve(keyID, options) {
|
|
41529
|
-
return this._client.get(path$
|
|
41529
|
+
return this._client.get(path$10`/organization/admin_api_keys/${keyID}`, {
|
|
41530
41530
|
...options,
|
|
41531
41531
|
__security: { adminAPIKeyAuth: true }
|
|
41532
41532
|
});
|
|
@@ -41561,7 +41561,7 @@ var AdminAPIKeys = class extends APIResource {
|
|
|
41561
41561
|
* ```
|
|
41562
41562
|
*/
|
|
41563
41563
|
delete(keyID, options) {
|
|
41564
|
-
return this._client.delete(path$
|
|
41564
|
+
return this._client.delete(path$10`/organization/admin_api_keys/${keyID}`, {
|
|
41565
41565
|
...options,
|
|
41566
41566
|
__security: { adminAPIKeyAuth: true }
|
|
41567
41567
|
});
|
|
@@ -41630,7 +41630,7 @@ var Certificates$1 = class extends APIResource {
|
|
|
41630
41630
|
* ```
|
|
41631
41631
|
*/
|
|
41632
41632
|
retrieve(certificateID, query = {}, options) {
|
|
41633
|
-
return this._client.get(path$
|
|
41633
|
+
return this._client.get(path$10`/organization/certificates/${certificateID}`, {
|
|
41634
41634
|
query,
|
|
41635
41635
|
...options,
|
|
41636
41636
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -41648,7 +41648,7 @@ var Certificates$1 = class extends APIResource {
|
|
|
41648
41648
|
* ```
|
|
41649
41649
|
*/
|
|
41650
41650
|
update(certificateID, body, options) {
|
|
41651
|
-
return this._client.post(path$
|
|
41651
|
+
return this._client.post(path$10`/organization/certificates/${certificateID}`, {
|
|
41652
41652
|
body,
|
|
41653
41653
|
...options,
|
|
41654
41654
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -41686,7 +41686,7 @@ var Certificates$1 = class extends APIResource {
|
|
|
41686
41686
|
* ```
|
|
41687
41687
|
*/
|
|
41688
41688
|
delete(certificateID, options) {
|
|
41689
|
-
return this._client.delete(path$
|
|
41689
|
+
return this._client.delete(path$10`/organization/certificates/${certificateID}`, {
|
|
41690
41690
|
...options,
|
|
41691
41691
|
__security: { adminAPIKeyAuth: true }
|
|
41692
41692
|
});
|
|
@@ -41810,7 +41810,7 @@ var Invites = class extends APIResource {
|
|
|
41810
41810
|
* ```
|
|
41811
41811
|
*/
|
|
41812
41812
|
retrieve(inviteID, options) {
|
|
41813
|
-
return this._client.get(path$
|
|
41813
|
+
return this._client.get(path$10`/organization/invites/${inviteID}`, {
|
|
41814
41814
|
...options,
|
|
41815
41815
|
__security: { adminAPIKeyAuth: true }
|
|
41816
41816
|
});
|
|
@@ -41845,7 +41845,7 @@ var Invites = class extends APIResource {
|
|
|
41845
41845
|
* ```
|
|
41846
41846
|
*/
|
|
41847
41847
|
delete(inviteID, options) {
|
|
41848
|
-
return this._client.delete(path$
|
|
41848
|
+
return this._client.delete(path$10`/organization/invites/${inviteID}`, {
|
|
41849
41849
|
...options,
|
|
41850
41850
|
__security: { adminAPIKeyAuth: true }
|
|
41851
41851
|
});
|
|
@@ -41883,7 +41883,7 @@ var Roles$5 = class extends APIResource {
|
|
|
41883
41883
|
* ```
|
|
41884
41884
|
*/
|
|
41885
41885
|
retrieve(roleID, options) {
|
|
41886
|
-
return this._client.get(path$
|
|
41886
|
+
return this._client.get(path$10`/organization/roles/${roleID}`, {
|
|
41887
41887
|
...options,
|
|
41888
41888
|
__security: { adminAPIKeyAuth: true }
|
|
41889
41889
|
});
|
|
@@ -41899,7 +41899,7 @@ var Roles$5 = class extends APIResource {
|
|
|
41899
41899
|
* ```
|
|
41900
41900
|
*/
|
|
41901
41901
|
update(roleID, body, options) {
|
|
41902
|
-
return this._client.post(path$
|
|
41902
|
+
return this._client.post(path$10`/organization/roles/${roleID}`, {
|
|
41903
41903
|
body,
|
|
41904
41904
|
...options,
|
|
41905
41905
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -41934,7 +41934,7 @@ var Roles$5 = class extends APIResource {
|
|
|
41934
41934
|
* ```
|
|
41935
41935
|
*/
|
|
41936
41936
|
delete(roleID, options) {
|
|
41937
|
-
return this._client.delete(path$
|
|
41937
|
+
return this._client.delete(path$10`/organization/roles/${roleID}`, {
|
|
41938
41938
|
...options,
|
|
41939
41939
|
__security: { adminAPIKeyAuth: true }
|
|
41940
41940
|
});
|
|
@@ -41988,7 +41988,7 @@ var SpendAlerts$1 = class extends APIResource {
|
|
|
41988
41988
|
* ```
|
|
41989
41989
|
*/
|
|
41990
41990
|
update(alertID, body, options) {
|
|
41991
|
-
return this._client.post(path$
|
|
41991
|
+
return this._client.post(path$10`/organization/spend_alerts/${alertID}`, {
|
|
41992
41992
|
body,
|
|
41993
41993
|
...options,
|
|
41994
41994
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42024,7 +42024,7 @@ var SpendAlerts$1 = class extends APIResource {
|
|
|
42024
42024
|
* ```
|
|
42025
42025
|
*/
|
|
42026
42026
|
delete(alertID, options) {
|
|
42027
|
-
return this._client.delete(path$
|
|
42027
|
+
return this._client.delete(path$10`/organization/spend_alerts/${alertID}`, {
|
|
42028
42028
|
...options,
|
|
42029
42029
|
__security: { adminAPIKeyAuth: true }
|
|
42030
42030
|
});
|
|
@@ -42248,7 +42248,7 @@ var Roles$4 = class extends APIResource {
|
|
|
42248
42248
|
* ```
|
|
42249
42249
|
*/
|
|
42250
42250
|
create(groupID, body, options) {
|
|
42251
|
-
return this._client.post(path$
|
|
42251
|
+
return this._client.post(path$10`/organization/groups/${groupID}/roles`, {
|
|
42252
42252
|
body,
|
|
42253
42253
|
...options,
|
|
42254
42254
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42268,7 +42268,7 @@ var Roles$4 = class extends APIResource {
|
|
|
42268
42268
|
*/
|
|
42269
42269
|
retrieve(roleID, params, options) {
|
|
42270
42270
|
const { group_id } = params;
|
|
42271
|
-
return this._client.get(path$
|
|
42271
|
+
return this._client.get(path$10`/organization/groups/${group_id}/roles/${roleID}`, {
|
|
42272
42272
|
...options,
|
|
42273
42273
|
__security: { adminAPIKeyAuth: true }
|
|
42274
42274
|
});
|
|
@@ -42287,7 +42287,7 @@ var Roles$4 = class extends APIResource {
|
|
|
42287
42287
|
* ```
|
|
42288
42288
|
*/
|
|
42289
42289
|
list(groupID, query = {}, options) {
|
|
42290
|
-
return this._client.getAPIList(path$
|
|
42290
|
+
return this._client.getAPIList(path$10`/organization/groups/${groupID}/roles`, NextCursorPage, {
|
|
42291
42291
|
query,
|
|
42292
42292
|
...options,
|
|
42293
42293
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42307,7 +42307,7 @@ var Roles$4 = class extends APIResource {
|
|
|
42307
42307
|
*/
|
|
42308
42308
|
delete(roleID, params, options) {
|
|
42309
42309
|
const { group_id } = params;
|
|
42310
|
-
return this._client.delete(path$
|
|
42310
|
+
return this._client.delete(path$10`/organization/groups/${group_id}/roles/${roleID}`, {
|
|
42311
42311
|
...options,
|
|
42312
42312
|
__security: { adminAPIKeyAuth: true }
|
|
42313
42313
|
});
|
|
@@ -42329,7 +42329,7 @@ var Users$2 = class extends APIResource {
|
|
|
42329
42329
|
* ```
|
|
42330
42330
|
*/
|
|
42331
42331
|
create(groupID, body, options) {
|
|
42332
|
-
return this._client.post(path$
|
|
42332
|
+
return this._client.post(path$10`/organization/groups/${groupID}/users`, {
|
|
42333
42333
|
body,
|
|
42334
42334
|
...options,
|
|
42335
42335
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42349,7 +42349,7 @@ var Users$2 = class extends APIResource {
|
|
|
42349
42349
|
*/
|
|
42350
42350
|
retrieve(userID, params, options) {
|
|
42351
42351
|
const { group_id } = params;
|
|
42352
|
-
return this._client.get(path$
|
|
42352
|
+
return this._client.get(path$10`/organization/groups/${group_id}/users/${userID}`, {
|
|
42353
42353
|
...options,
|
|
42354
42354
|
__security: { adminAPIKeyAuth: true }
|
|
42355
42355
|
});
|
|
@@ -42368,7 +42368,7 @@ var Users$2 = class extends APIResource {
|
|
|
42368
42368
|
* ```
|
|
42369
42369
|
*/
|
|
42370
42370
|
list(groupID, query = {}, options) {
|
|
42371
|
-
return this._client.getAPIList(path$
|
|
42371
|
+
return this._client.getAPIList(path$10`/organization/groups/${groupID}/users`, NextCursorPage, {
|
|
42372
42372
|
query,
|
|
42373
42373
|
...options,
|
|
42374
42374
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42388,7 +42388,7 @@ var Users$2 = class extends APIResource {
|
|
|
42388
42388
|
*/
|
|
42389
42389
|
delete(userID, params, options) {
|
|
42390
42390
|
const { group_id } = params;
|
|
42391
|
-
return this._client.delete(path$
|
|
42391
|
+
return this._client.delete(path$10`/organization/groups/${group_id}/users/${userID}`, {
|
|
42392
42392
|
...options,
|
|
42393
42393
|
__security: { adminAPIKeyAuth: true }
|
|
42394
42394
|
});
|
|
@@ -42431,7 +42431,7 @@ var Groups$1 = class extends APIResource {
|
|
|
42431
42431
|
* ```
|
|
42432
42432
|
*/
|
|
42433
42433
|
retrieve(groupID, options) {
|
|
42434
|
-
return this._client.get(path$
|
|
42434
|
+
return this._client.get(path$10`/organization/groups/${groupID}`, {
|
|
42435
42435
|
...options,
|
|
42436
42436
|
__security: { adminAPIKeyAuth: true }
|
|
42437
42437
|
});
|
|
@@ -42448,7 +42448,7 @@ var Groups$1 = class extends APIResource {
|
|
|
42448
42448
|
* ```
|
|
42449
42449
|
*/
|
|
42450
42450
|
update(groupID, body, options) {
|
|
42451
|
-
return this._client.post(path$
|
|
42451
|
+
return this._client.post(path$10`/organization/groups/${groupID}`, {
|
|
42452
42452
|
body,
|
|
42453
42453
|
...options,
|
|
42454
42454
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42483,7 +42483,7 @@ var Groups$1 = class extends APIResource {
|
|
|
42483
42483
|
* ```
|
|
42484
42484
|
*/
|
|
42485
42485
|
delete(groupID, options) {
|
|
42486
|
-
return this._client.delete(path$
|
|
42486
|
+
return this._client.delete(path$10`/organization/groups/${groupID}`, {
|
|
42487
42487
|
...options,
|
|
42488
42488
|
__security: { adminAPIKeyAuth: true }
|
|
42489
42489
|
});
|
|
@@ -42508,7 +42508,7 @@ var APIKeys = class extends APIResource {
|
|
|
42508
42508
|
*/
|
|
42509
42509
|
retrieve(apiKeyID, params, options) {
|
|
42510
42510
|
const { project_id } = params;
|
|
42511
|
-
return this._client.get(path$
|
|
42511
|
+
return this._client.get(path$10`/organization/projects/${project_id}/api_keys/${apiKeyID}`, {
|
|
42512
42512
|
...options,
|
|
42513
42513
|
__security: { adminAPIKeyAuth: true }
|
|
42514
42514
|
});
|
|
@@ -42527,7 +42527,7 @@ var APIKeys = class extends APIResource {
|
|
|
42527
42527
|
* ```
|
|
42528
42528
|
*/
|
|
42529
42529
|
list(projectID, query = {}, options) {
|
|
42530
|
-
return this._client.getAPIList(path$
|
|
42530
|
+
return this._client.getAPIList(path$10`/organization/projects/${projectID}/api_keys`, ConversationCursorPage, {
|
|
42531
42531
|
query,
|
|
42532
42532
|
...options,
|
|
42533
42533
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42550,7 +42550,7 @@ var APIKeys = class extends APIResource {
|
|
|
42550
42550
|
*/
|
|
42551
42551
|
delete(apiKeyID, params, options) {
|
|
42552
42552
|
const { project_id } = params;
|
|
42553
|
-
return this._client.delete(path$
|
|
42553
|
+
return this._client.delete(path$10`/organization/projects/${project_id}/api_keys/${apiKeyID}`, {
|
|
42554
42554
|
...options,
|
|
42555
42555
|
__security: { adminAPIKeyAuth: true }
|
|
42556
42556
|
});
|
|
@@ -42573,7 +42573,7 @@ var Certificates = class extends APIResource {
|
|
|
42573
42573
|
* ```
|
|
42574
42574
|
*/
|
|
42575
42575
|
list(projectID, query = {}, options) {
|
|
42576
|
-
return this._client.getAPIList(path$
|
|
42576
|
+
return this._client.getAPIList(path$10`/organization/projects/${projectID}/certificates`, ConversationCursorPage, {
|
|
42577
42577
|
query,
|
|
42578
42578
|
...options,
|
|
42579
42579
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42596,7 +42596,7 @@ var Certificates = class extends APIResource {
|
|
|
42596
42596
|
* ```
|
|
42597
42597
|
*/
|
|
42598
42598
|
activate(projectID, body, options) {
|
|
42599
|
-
return this._client.getAPIList(path$
|
|
42599
|
+
return this._client.getAPIList(path$10`/organization/projects/${projectID}/certificates/activate`, Page, {
|
|
42600
42600
|
body,
|
|
42601
42601
|
method: "post",
|
|
42602
42602
|
...options,
|
|
@@ -42619,7 +42619,7 @@ var Certificates = class extends APIResource {
|
|
|
42619
42619
|
* ```
|
|
42620
42620
|
*/
|
|
42621
42621
|
deactivate(projectID, body, options) {
|
|
42622
|
-
return this._client.getAPIList(path$
|
|
42622
|
+
return this._client.getAPIList(path$10`/organization/projects/${projectID}/certificates/deactivate`, Page, {
|
|
42623
42623
|
body,
|
|
42624
42624
|
method: "post",
|
|
42625
42625
|
...options,
|
|
@@ -42642,7 +42642,7 @@ var DataRetention = class extends APIResource {
|
|
|
42642
42642
|
* ```
|
|
42643
42643
|
*/
|
|
42644
42644
|
retrieve(projectID, options) {
|
|
42645
|
-
return this._client.get(path$
|
|
42645
|
+
return this._client.get(path$10`/organization/projects/${projectID}/data_retention`, {
|
|
42646
42646
|
...options,
|
|
42647
42647
|
__security: { adminAPIKeyAuth: true }
|
|
42648
42648
|
});
|
|
@@ -42660,7 +42660,7 @@ var DataRetention = class extends APIResource {
|
|
|
42660
42660
|
* ```
|
|
42661
42661
|
*/
|
|
42662
42662
|
update(projectID, body, options) {
|
|
42663
|
-
return this._client.post(path$
|
|
42663
|
+
return this._client.post(path$10`/organization/projects/${projectID}/data_retention`, {
|
|
42664
42664
|
body,
|
|
42665
42665
|
...options,
|
|
42666
42666
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42682,7 +42682,7 @@ var HostedToolPermissions = class extends APIResource {
|
|
|
42682
42682
|
* ```
|
|
42683
42683
|
*/
|
|
42684
42684
|
retrieve(projectID, options) {
|
|
42685
|
-
return this._client.get(path$
|
|
42685
|
+
return this._client.get(path$10`/organization/projects/${projectID}/hosted_tool_permissions`, {
|
|
42686
42686
|
...options,
|
|
42687
42687
|
__security: { adminAPIKeyAuth: true }
|
|
42688
42688
|
});
|
|
@@ -42699,7 +42699,7 @@ var HostedToolPermissions = class extends APIResource {
|
|
|
42699
42699
|
* ```
|
|
42700
42700
|
*/
|
|
42701
42701
|
update(projectID, body, options) {
|
|
42702
|
-
return this._client.post(path$
|
|
42702
|
+
return this._client.post(path$10`/organization/projects/${projectID}/hosted_tool_permissions`, {
|
|
42703
42703
|
body,
|
|
42704
42704
|
...options,
|
|
42705
42705
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42721,7 +42721,7 @@ var ModelPermissions = class extends APIResource {
|
|
|
42721
42721
|
* ```
|
|
42722
42722
|
*/
|
|
42723
42723
|
retrieve(projectID, options) {
|
|
42724
|
-
return this._client.get(path$
|
|
42724
|
+
return this._client.get(path$10`/organization/projects/${projectID}/model_permissions`, {
|
|
42725
42725
|
...options,
|
|
42726
42726
|
__security: { adminAPIKeyAuth: true }
|
|
42727
42727
|
});
|
|
@@ -42739,7 +42739,7 @@ var ModelPermissions = class extends APIResource {
|
|
|
42739
42739
|
* ```
|
|
42740
42740
|
*/
|
|
42741
42741
|
update(projectID, body, options) {
|
|
42742
|
-
return this._client.post(path$
|
|
42742
|
+
return this._client.post(path$10`/organization/projects/${projectID}/model_permissions`, {
|
|
42743
42743
|
body,
|
|
42744
42744
|
...options,
|
|
42745
42745
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42757,7 +42757,7 @@ var ModelPermissions = class extends APIResource {
|
|
|
42757
42757
|
* ```
|
|
42758
42758
|
*/
|
|
42759
42759
|
delete(projectID, options) {
|
|
42760
|
-
return this._client.delete(path$
|
|
42760
|
+
return this._client.delete(path$10`/organization/projects/${projectID}/model_permissions`, {
|
|
42761
42761
|
...options,
|
|
42762
42762
|
__security: { adminAPIKeyAuth: true }
|
|
42763
42763
|
});
|
|
@@ -42780,7 +42780,7 @@ var RateLimits = class extends APIResource {
|
|
|
42780
42780
|
* ```
|
|
42781
42781
|
*/
|
|
42782
42782
|
listRateLimits(projectID, query = {}, options) {
|
|
42783
|
-
return this._client.getAPIList(path$
|
|
42783
|
+
return this._client.getAPIList(path$10`/organization/projects/${projectID}/rate_limits`, ConversationCursorPage, {
|
|
42784
42784
|
query,
|
|
42785
42785
|
...options,
|
|
42786
42786
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42800,7 +42800,7 @@ var RateLimits = class extends APIResource {
|
|
|
42800
42800
|
*/
|
|
42801
42801
|
updateRateLimit(rateLimitID, params, options) {
|
|
42802
42802
|
const { project_id, ...body } = params;
|
|
42803
|
-
return this._client.post(path$
|
|
42803
|
+
return this._client.post(path$10`/organization/projects/${project_id}/rate_limits/${rateLimitID}`, {
|
|
42804
42804
|
body,
|
|
42805
42805
|
...options,
|
|
42806
42806
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42823,7 +42823,7 @@ var Roles$3 = class extends APIResource {
|
|
|
42823
42823
|
* ```
|
|
42824
42824
|
*/
|
|
42825
42825
|
create(projectID, body, options) {
|
|
42826
|
-
return this._client.post(path$
|
|
42826
|
+
return this._client.post(path$10`/projects/${projectID}/roles`, {
|
|
42827
42827
|
body,
|
|
42828
42828
|
...options,
|
|
42829
42829
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42843,7 +42843,7 @@ var Roles$3 = class extends APIResource {
|
|
|
42843
42843
|
*/
|
|
42844
42844
|
retrieve(roleID, params, options) {
|
|
42845
42845
|
const { project_id } = params;
|
|
42846
|
-
return this._client.get(path$
|
|
42846
|
+
return this._client.get(path$10`/projects/${project_id}/roles/${roleID}`, {
|
|
42847
42847
|
...options,
|
|
42848
42848
|
__security: { adminAPIKeyAuth: true }
|
|
42849
42849
|
});
|
|
@@ -42862,7 +42862,7 @@ var Roles$3 = class extends APIResource {
|
|
|
42862
42862
|
*/
|
|
42863
42863
|
update(roleID, params, options) {
|
|
42864
42864
|
const { project_id, ...body } = params;
|
|
42865
|
-
return this._client.post(path$
|
|
42865
|
+
return this._client.post(path$10`/projects/${project_id}/roles/${roleID}`, {
|
|
42866
42866
|
body,
|
|
42867
42867
|
...options,
|
|
42868
42868
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42882,7 +42882,7 @@ var Roles$3 = class extends APIResource {
|
|
|
42882
42882
|
* ```
|
|
42883
42883
|
*/
|
|
42884
42884
|
list(projectID, query = {}, options) {
|
|
42885
|
-
return this._client.getAPIList(path$
|
|
42885
|
+
return this._client.getAPIList(path$10`/projects/${projectID}/roles`, NextCursorPage, {
|
|
42886
42886
|
query,
|
|
42887
42887
|
...options,
|
|
42888
42888
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42902,7 +42902,7 @@ var Roles$3 = class extends APIResource {
|
|
|
42902
42902
|
*/
|
|
42903
42903
|
delete(roleID, params, options) {
|
|
42904
42904
|
const { project_id } = params;
|
|
42905
|
-
return this._client.delete(path$
|
|
42905
|
+
return this._client.delete(path$10`/projects/${project_id}/roles/${roleID}`, {
|
|
42906
42906
|
...options,
|
|
42907
42907
|
__security: { adminAPIKeyAuth: true }
|
|
42908
42908
|
});
|
|
@@ -42925,7 +42925,7 @@ var ServiceAccounts = class extends APIResource {
|
|
|
42925
42925
|
* ```
|
|
42926
42926
|
*/
|
|
42927
42927
|
create(projectID, body, options) {
|
|
42928
|
-
return this._client.post(path$
|
|
42928
|
+
return this._client.post(path$10`/organization/projects/${projectID}/service_accounts`, {
|
|
42929
42929
|
body,
|
|
42930
42930
|
...options,
|
|
42931
42931
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42945,7 +42945,7 @@ var ServiceAccounts = class extends APIResource {
|
|
|
42945
42945
|
*/
|
|
42946
42946
|
retrieve(serviceAccountID, params, options) {
|
|
42947
42947
|
const { project_id } = params;
|
|
42948
|
-
return this._client.get(path$
|
|
42948
|
+
return this._client.get(path$10`/organization/projects/${project_id}/service_accounts/${serviceAccountID}`, {
|
|
42949
42949
|
...options,
|
|
42950
42950
|
__security: { adminAPIKeyAuth: true }
|
|
42951
42951
|
});
|
|
@@ -42964,7 +42964,7 @@ var ServiceAccounts = class extends APIResource {
|
|
|
42964
42964
|
*/
|
|
42965
42965
|
update(serviceAccountID, params, options) {
|
|
42966
42966
|
const { project_id, ...body } = params;
|
|
42967
|
-
return this._client.post(path$
|
|
42967
|
+
return this._client.post(path$10`/organization/projects/${project_id}/service_accounts/${serviceAccountID}`, {
|
|
42968
42968
|
body,
|
|
42969
42969
|
...options,
|
|
42970
42970
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -42984,7 +42984,7 @@ var ServiceAccounts = class extends APIResource {
|
|
|
42984
42984
|
* ```
|
|
42985
42985
|
*/
|
|
42986
42986
|
list(projectID, query = {}, options) {
|
|
42987
|
-
return this._client.getAPIList(path$
|
|
42987
|
+
return this._client.getAPIList(path$10`/organization/projects/${projectID}/service_accounts`, ConversationCursorPage, {
|
|
42988
42988
|
query,
|
|
42989
42989
|
...options,
|
|
42990
42990
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43007,7 +43007,7 @@ var ServiceAccounts = class extends APIResource {
|
|
|
43007
43007
|
*/
|
|
43008
43008
|
delete(serviceAccountID, params, options) {
|
|
43009
43009
|
const { project_id } = params;
|
|
43010
|
-
return this._client.delete(path$
|
|
43010
|
+
return this._client.delete(path$10`/organization/projects/${project_id}/service_accounts/${serviceAccountID}`, {
|
|
43011
43011
|
...options,
|
|
43012
43012
|
__security: { adminAPIKeyAuth: true }
|
|
43013
43013
|
});
|
|
@@ -43037,7 +43037,7 @@ var SpendAlerts = class extends APIResource {
|
|
|
43037
43037
|
* ```
|
|
43038
43038
|
*/
|
|
43039
43039
|
create(projectID, body, options) {
|
|
43040
|
-
return this._client.post(path$
|
|
43040
|
+
return this._client.post(path$10`/organization/projects/${projectID}/spend_alerts`, {
|
|
43041
43041
|
body,
|
|
43042
43042
|
...options,
|
|
43043
43043
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43066,7 +43066,7 @@ var SpendAlerts = class extends APIResource {
|
|
|
43066
43066
|
*/
|
|
43067
43067
|
update(alertID, params, options) {
|
|
43068
43068
|
const { project_id, ...body } = params;
|
|
43069
|
-
return this._client.post(path$
|
|
43069
|
+
return this._client.post(path$10`/organization/projects/${project_id}/spend_alerts/${alertID}`, {
|
|
43070
43070
|
body,
|
|
43071
43071
|
...options,
|
|
43072
43072
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43086,7 +43086,7 @@ var SpendAlerts = class extends APIResource {
|
|
|
43086
43086
|
* ```
|
|
43087
43087
|
*/
|
|
43088
43088
|
list(projectID, query = {}, options) {
|
|
43089
|
-
return this._client.getAPIList(path$
|
|
43089
|
+
return this._client.getAPIList(path$10`/organization/projects/${projectID}/spend_alerts`, ConversationCursorPage, {
|
|
43090
43090
|
query,
|
|
43091
43091
|
...options,
|
|
43092
43092
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43106,7 +43106,7 @@ var SpendAlerts = class extends APIResource {
|
|
|
43106
43106
|
*/
|
|
43107
43107
|
delete(alertID, params, options) {
|
|
43108
43108
|
const { project_id } = params;
|
|
43109
|
-
return this._client.delete(path$
|
|
43109
|
+
return this._client.delete(path$10`/organization/projects/${project_id}/spend_alerts/${alertID}`, {
|
|
43110
43110
|
...options,
|
|
43111
43111
|
__security: { adminAPIKeyAuth: true }
|
|
43112
43112
|
});
|
|
@@ -43129,7 +43129,7 @@ var Roles$2 = class extends APIResource {
|
|
|
43129
43129
|
*/
|
|
43130
43130
|
create(groupID, params, options) {
|
|
43131
43131
|
const { project_id, ...body } = params;
|
|
43132
|
-
return this._client.post(path$
|
|
43132
|
+
return this._client.post(path$10`/projects/${project_id}/groups/${groupID}/roles`, {
|
|
43133
43133
|
body,
|
|
43134
43134
|
...options,
|
|
43135
43135
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43149,7 +43149,7 @@ var Roles$2 = class extends APIResource {
|
|
|
43149
43149
|
*/
|
|
43150
43150
|
retrieve(roleID, params, options) {
|
|
43151
43151
|
const { project_id, group_id } = params;
|
|
43152
|
-
return this._client.get(path$
|
|
43152
|
+
return this._client.get(path$10`/projects/${project_id}/groups/${group_id}/roles/${roleID}`, {
|
|
43153
43153
|
...options,
|
|
43154
43154
|
__security: { adminAPIKeyAuth: true }
|
|
43155
43155
|
});
|
|
@@ -43170,7 +43170,7 @@ var Roles$2 = class extends APIResource {
|
|
|
43170
43170
|
*/
|
|
43171
43171
|
list(groupID, params, options) {
|
|
43172
43172
|
const { project_id, ...query } = params;
|
|
43173
|
-
return this._client.getAPIList(path$
|
|
43173
|
+
return this._client.getAPIList(path$10`/projects/${project_id}/groups/${groupID}/roles`, NextCursorPage, {
|
|
43174
43174
|
query,
|
|
43175
43175
|
...options,
|
|
43176
43176
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43190,7 +43190,7 @@ var Roles$2 = class extends APIResource {
|
|
|
43190
43190
|
*/
|
|
43191
43191
|
delete(roleID, params, options) {
|
|
43192
43192
|
const { project_id, group_id } = params;
|
|
43193
|
-
return this._client.delete(path$
|
|
43193
|
+
return this._client.delete(path$10`/projects/${project_id}/groups/${group_id}/roles/${roleID}`, {
|
|
43194
43194
|
...options,
|
|
43195
43195
|
__security: { adminAPIKeyAuth: true }
|
|
43196
43196
|
});
|
|
@@ -43216,7 +43216,7 @@ var Groups = class extends APIResource {
|
|
|
43216
43216
|
* ```
|
|
43217
43217
|
*/
|
|
43218
43218
|
create(projectID, body, options) {
|
|
43219
|
-
return this._client.post(path$
|
|
43219
|
+
return this._client.post(path$10`/organization/projects/${projectID}/groups`, {
|
|
43220
43220
|
body,
|
|
43221
43221
|
...options,
|
|
43222
43222
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43236,7 +43236,7 @@ var Groups = class extends APIResource {
|
|
|
43236
43236
|
*/
|
|
43237
43237
|
retrieve(groupID, params, options) {
|
|
43238
43238
|
const { project_id, ...query } = params;
|
|
43239
|
-
return this._client.get(path$
|
|
43239
|
+
return this._client.get(path$10`/organization/projects/${project_id}/groups/${groupID}`, {
|
|
43240
43240
|
query,
|
|
43241
43241
|
...options,
|
|
43242
43242
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43256,7 +43256,7 @@ var Groups = class extends APIResource {
|
|
|
43256
43256
|
* ```
|
|
43257
43257
|
*/
|
|
43258
43258
|
list(projectID, query = {}, options) {
|
|
43259
|
-
return this._client.getAPIList(path$
|
|
43259
|
+
return this._client.getAPIList(path$10`/organization/projects/${projectID}/groups`, NextCursorPage, {
|
|
43260
43260
|
query,
|
|
43261
43261
|
...options,
|
|
43262
43262
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43276,7 +43276,7 @@ var Groups = class extends APIResource {
|
|
|
43276
43276
|
*/
|
|
43277
43277
|
delete(groupID, params, options) {
|
|
43278
43278
|
const { project_id } = params;
|
|
43279
|
-
return this._client.delete(path$
|
|
43279
|
+
return this._client.delete(path$10`/organization/projects/${project_id}/groups/${groupID}`, {
|
|
43280
43280
|
...options,
|
|
43281
43281
|
__security: { adminAPIKeyAuth: true }
|
|
43282
43282
|
});
|
|
@@ -43300,7 +43300,7 @@ var Roles$1 = class extends APIResource {
|
|
|
43300
43300
|
*/
|
|
43301
43301
|
create(userID, params, options) {
|
|
43302
43302
|
const { project_id, ...body } = params;
|
|
43303
|
-
return this._client.post(path$
|
|
43303
|
+
return this._client.post(path$10`/projects/${project_id}/users/${userID}/roles`, {
|
|
43304
43304
|
body,
|
|
43305
43305
|
...options,
|
|
43306
43306
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43320,7 +43320,7 @@ var Roles$1 = class extends APIResource {
|
|
|
43320
43320
|
*/
|
|
43321
43321
|
retrieve(roleID, params, options) {
|
|
43322
43322
|
const { project_id, user_id } = params;
|
|
43323
|
-
return this._client.get(path$
|
|
43323
|
+
return this._client.get(path$10`/projects/${project_id}/users/${user_id}/roles/${roleID}`, {
|
|
43324
43324
|
...options,
|
|
43325
43325
|
__security: { adminAPIKeyAuth: true }
|
|
43326
43326
|
});
|
|
@@ -43341,7 +43341,7 @@ var Roles$1 = class extends APIResource {
|
|
|
43341
43341
|
*/
|
|
43342
43342
|
list(userID, params, options) {
|
|
43343
43343
|
const { project_id, ...query } = params;
|
|
43344
|
-
return this._client.getAPIList(path$
|
|
43344
|
+
return this._client.getAPIList(path$10`/projects/${project_id}/users/${userID}/roles`, NextCursorPage, {
|
|
43345
43345
|
query,
|
|
43346
43346
|
...options,
|
|
43347
43347
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43361,7 +43361,7 @@ var Roles$1 = class extends APIResource {
|
|
|
43361
43361
|
*/
|
|
43362
43362
|
delete(roleID, params, options) {
|
|
43363
43363
|
const { project_id, user_id } = params;
|
|
43364
|
-
return this._client.delete(path$
|
|
43364
|
+
return this._client.delete(path$10`/projects/${project_id}/users/${user_id}/roles/${roleID}`, {
|
|
43365
43365
|
...options,
|
|
43366
43366
|
__security: { adminAPIKeyAuth: true }
|
|
43367
43367
|
});
|
|
@@ -43388,7 +43388,7 @@ var Users$1 = class extends APIResource {
|
|
|
43388
43388
|
* ```
|
|
43389
43389
|
*/
|
|
43390
43390
|
create(projectID, body, options) {
|
|
43391
|
-
return this._client.post(path$
|
|
43391
|
+
return this._client.post(path$10`/organization/projects/${projectID}/users`, {
|
|
43392
43392
|
body,
|
|
43393
43393
|
...options,
|
|
43394
43394
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43408,7 +43408,7 @@ var Users$1 = class extends APIResource {
|
|
|
43408
43408
|
*/
|
|
43409
43409
|
retrieve(userID, params, options) {
|
|
43410
43410
|
const { project_id } = params;
|
|
43411
|
-
return this._client.get(path$
|
|
43411
|
+
return this._client.get(path$10`/organization/projects/${project_id}/users/${userID}`, {
|
|
43412
43412
|
...options,
|
|
43413
43413
|
__security: { adminAPIKeyAuth: true }
|
|
43414
43414
|
});
|
|
@@ -43427,7 +43427,7 @@ var Users$1 = class extends APIResource {
|
|
|
43427
43427
|
*/
|
|
43428
43428
|
update(userID, params, options) {
|
|
43429
43429
|
const { project_id, ...body } = params;
|
|
43430
|
-
return this._client.post(path$
|
|
43430
|
+
return this._client.post(path$10`/organization/projects/${project_id}/users/${userID}`, {
|
|
43431
43431
|
body,
|
|
43432
43432
|
...options,
|
|
43433
43433
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43447,7 +43447,7 @@ var Users$1 = class extends APIResource {
|
|
|
43447
43447
|
* ```
|
|
43448
43448
|
*/
|
|
43449
43449
|
list(projectID, query = {}, options) {
|
|
43450
|
-
return this._client.getAPIList(path$
|
|
43450
|
+
return this._client.getAPIList(path$10`/organization/projects/${projectID}/users`, ConversationCursorPage, {
|
|
43451
43451
|
query,
|
|
43452
43452
|
...options,
|
|
43453
43453
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43470,7 +43470,7 @@ var Users$1 = class extends APIResource {
|
|
|
43470
43470
|
*/
|
|
43471
43471
|
delete(userID, params, options) {
|
|
43472
43472
|
const { project_id } = params;
|
|
43473
|
-
return this._client.delete(path$
|
|
43473
|
+
return this._client.delete(path$10`/organization/projects/${project_id}/users/${userID}`, {
|
|
43474
43474
|
...options,
|
|
43475
43475
|
__security: { adminAPIKeyAuth: true }
|
|
43476
43476
|
});
|
|
@@ -43525,7 +43525,7 @@ var Projects = class extends APIResource {
|
|
|
43525
43525
|
* ```
|
|
43526
43526
|
*/
|
|
43527
43527
|
retrieve(projectID, options) {
|
|
43528
|
-
return this._client.get(path$
|
|
43528
|
+
return this._client.get(path$10`/organization/projects/${projectID}`, {
|
|
43529
43529
|
...options,
|
|
43530
43530
|
__security: { adminAPIKeyAuth: true }
|
|
43531
43531
|
});
|
|
@@ -43542,7 +43542,7 @@ var Projects = class extends APIResource {
|
|
|
43542
43542
|
* ```
|
|
43543
43543
|
*/
|
|
43544
43544
|
update(projectID, body, options) {
|
|
43545
|
-
return this._client.post(path$
|
|
43545
|
+
return this._client.post(path$10`/organization/projects/${projectID}`, {
|
|
43546
43546
|
body,
|
|
43547
43547
|
...options,
|
|
43548
43548
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43579,7 +43579,7 @@ var Projects = class extends APIResource {
|
|
|
43579
43579
|
* ```
|
|
43580
43580
|
*/
|
|
43581
43581
|
archive(projectID, options) {
|
|
43582
|
-
return this._client.post(path$
|
|
43582
|
+
return this._client.post(path$10`/organization/projects/${projectID}/archive`, {
|
|
43583
43583
|
...options,
|
|
43584
43584
|
__security: { adminAPIKeyAuth: true }
|
|
43585
43585
|
});
|
|
@@ -43612,7 +43612,7 @@ var Roles = class extends APIResource {
|
|
|
43612
43612
|
* ```
|
|
43613
43613
|
*/
|
|
43614
43614
|
create(userID, body, options) {
|
|
43615
|
-
return this._client.post(path$
|
|
43615
|
+
return this._client.post(path$10`/organization/users/${userID}/roles`, {
|
|
43616
43616
|
body,
|
|
43617
43617
|
...options,
|
|
43618
43618
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43632,7 +43632,7 @@ var Roles = class extends APIResource {
|
|
|
43632
43632
|
*/
|
|
43633
43633
|
retrieve(roleID, params, options) {
|
|
43634
43634
|
const { user_id } = params;
|
|
43635
|
-
return this._client.get(path$
|
|
43635
|
+
return this._client.get(path$10`/organization/users/${user_id}/roles/${roleID}`, {
|
|
43636
43636
|
...options,
|
|
43637
43637
|
__security: { adminAPIKeyAuth: true }
|
|
43638
43638
|
});
|
|
@@ -43651,7 +43651,7 @@ var Roles = class extends APIResource {
|
|
|
43651
43651
|
* ```
|
|
43652
43652
|
*/
|
|
43653
43653
|
list(userID, query = {}, options) {
|
|
43654
|
-
return this._client.getAPIList(path$
|
|
43654
|
+
return this._client.getAPIList(path$10`/organization/users/${userID}/roles`, NextCursorPage, {
|
|
43655
43655
|
query,
|
|
43656
43656
|
...options,
|
|
43657
43657
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43671,7 +43671,7 @@ var Roles = class extends APIResource {
|
|
|
43671
43671
|
*/
|
|
43672
43672
|
delete(roleID, params, options) {
|
|
43673
43673
|
const { user_id } = params;
|
|
43674
|
-
return this._client.delete(path$
|
|
43674
|
+
return this._client.delete(path$10`/organization/users/${user_id}/roles/${roleID}`, {
|
|
43675
43675
|
...options,
|
|
43676
43676
|
__security: { adminAPIKeyAuth: true }
|
|
43677
43677
|
});
|
|
@@ -43694,7 +43694,7 @@ var Users = class extends APIResource {
|
|
|
43694
43694
|
* ```
|
|
43695
43695
|
*/
|
|
43696
43696
|
retrieve(userID, options) {
|
|
43697
|
-
return this._client.get(path$
|
|
43697
|
+
return this._client.get(path$10`/organization/users/${userID}`, {
|
|
43698
43698
|
...options,
|
|
43699
43699
|
__security: { adminAPIKeyAuth: true }
|
|
43700
43700
|
});
|
|
@@ -43709,7 +43709,7 @@ var Users = class extends APIResource {
|
|
|
43709
43709
|
* ```
|
|
43710
43710
|
*/
|
|
43711
43711
|
update(userID, body, options) {
|
|
43712
|
-
return this._client.post(path$
|
|
43712
|
+
return this._client.post(path$10`/organization/users/${userID}`, {
|
|
43713
43713
|
body,
|
|
43714
43714
|
...options,
|
|
43715
43715
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -43744,7 +43744,7 @@ var Users = class extends APIResource {
|
|
|
43744
43744
|
* ```
|
|
43745
43745
|
*/
|
|
43746
43746
|
delete(userID, options) {
|
|
43747
|
-
return this._client.delete(path$
|
|
43747
|
+
return this._client.delete(path$10`/organization/users/${userID}`, {
|
|
43748
43748
|
...options,
|
|
43749
43749
|
__security: { adminAPIKeyAuth: true }
|
|
43750
43750
|
});
|
|
@@ -43946,7 +43946,7 @@ var Batches = class extends APIResource {
|
|
|
43946
43946
|
* Retrieves a batch.
|
|
43947
43947
|
*/
|
|
43948
43948
|
retrieve(batchID, options) {
|
|
43949
|
-
return this._client.get(path$
|
|
43949
|
+
return this._client.get(path$10`/batches/${batchID}`, {
|
|
43950
43950
|
...options,
|
|
43951
43951
|
__security: { bearerAuth: true }
|
|
43952
43952
|
});
|
|
@@ -43967,7 +43967,7 @@ var Batches = class extends APIResource {
|
|
|
43967
43967
|
* (if any) available in the output file.
|
|
43968
43968
|
*/
|
|
43969
43969
|
cancel(batchID, options) {
|
|
43970
|
-
return this._client.post(path$
|
|
43970
|
+
return this._client.post(path$10`/batches/${batchID}/cancel`, {
|
|
43971
43971
|
...options,
|
|
43972
43972
|
__security: { bearerAuth: true }
|
|
43973
43973
|
});
|
|
@@ -43998,7 +43998,7 @@ var Assistants = class extends APIResource {
|
|
|
43998
43998
|
* @deprecated
|
|
43999
43999
|
*/
|
|
44000
44000
|
retrieve(assistantID, options) {
|
|
44001
|
-
return this._client.get(path$
|
|
44001
|
+
return this._client.get(path$10`/assistants/${assistantID}`, {
|
|
44002
44002
|
...options,
|
|
44003
44003
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
44004
44004
|
__security: { bearerAuth: true }
|
|
@@ -44010,7 +44010,7 @@ var Assistants = class extends APIResource {
|
|
|
44010
44010
|
* @deprecated
|
|
44011
44011
|
*/
|
|
44012
44012
|
update(assistantID, body, options) {
|
|
44013
|
-
return this._client.post(path$
|
|
44013
|
+
return this._client.post(path$10`/assistants/${assistantID}`, {
|
|
44014
44014
|
body,
|
|
44015
44015
|
...options,
|
|
44016
44016
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44036,7 +44036,7 @@ var Assistants = class extends APIResource {
|
|
|
44036
44036
|
* @deprecated
|
|
44037
44037
|
*/
|
|
44038
44038
|
delete(assistantID, options) {
|
|
44039
|
-
return this._client.delete(path$
|
|
44039
|
+
return this._client.delete(path$10`/assistants/${assistantID}`, {
|
|
44040
44040
|
...options,
|
|
44041
44041
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
44042
44042
|
__security: { bearerAuth: true }
|
|
@@ -44146,7 +44146,7 @@ var Sessions = class extends APIResource {
|
|
|
44146
44146
|
* ```
|
|
44147
44147
|
*/
|
|
44148
44148
|
cancel(sessionID, options) {
|
|
44149
|
-
return this._client.post(path$
|
|
44149
|
+
return this._client.post(path$10`/chatkit/sessions/${sessionID}/cancel`, {
|
|
44150
44150
|
...options,
|
|
44151
44151
|
headers: buildHeaders([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers]),
|
|
44152
44152
|
__security: { bearerAuth: true }
|
|
@@ -44166,7 +44166,7 @@ var Threads$1 = class extends APIResource {
|
|
|
44166
44166
|
* ```
|
|
44167
44167
|
*/
|
|
44168
44168
|
retrieve(threadID, options) {
|
|
44169
|
-
return this._client.get(path$
|
|
44169
|
+
return this._client.get(path$10`/chatkit/threads/${threadID}`, {
|
|
44170
44170
|
...options,
|
|
44171
44171
|
headers: buildHeaders([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers]),
|
|
44172
44172
|
__security: { bearerAuth: true }
|
|
@@ -44202,7 +44202,7 @@ var Threads$1 = class extends APIResource {
|
|
|
44202
44202
|
* ```
|
|
44203
44203
|
*/
|
|
44204
44204
|
delete(threadID, options) {
|
|
44205
|
-
return this._client.delete(path$
|
|
44205
|
+
return this._client.delete(path$10`/chatkit/threads/${threadID}`, {
|
|
44206
44206
|
...options,
|
|
44207
44207
|
headers: buildHeaders([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers]),
|
|
44208
44208
|
__security: { bearerAuth: true }
|
|
@@ -44222,7 +44222,7 @@ var Threads$1 = class extends APIResource {
|
|
|
44222
44222
|
* ```
|
|
44223
44223
|
*/
|
|
44224
44224
|
listItems(threadID, query = {}, options) {
|
|
44225
|
-
return this._client.getAPIList(path$
|
|
44225
|
+
return this._client.getAPIList(path$10`/chatkit/threads/${threadID}/items`, ConversationCursorPage, {
|
|
44226
44226
|
query,
|
|
44227
44227
|
...options,
|
|
44228
44228
|
headers: buildHeaders([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers]),
|
|
@@ -44255,7 +44255,7 @@ var Messages = class extends APIResource {
|
|
|
44255
44255
|
* @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
44256
44256
|
*/
|
|
44257
44257
|
create(threadID, body, options) {
|
|
44258
|
-
return this._client.post(path$
|
|
44258
|
+
return this._client.post(path$10`/threads/${threadID}/messages`, {
|
|
44259
44259
|
body,
|
|
44260
44260
|
...options,
|
|
44261
44261
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44269,7 +44269,7 @@ var Messages = class extends APIResource {
|
|
|
44269
44269
|
*/
|
|
44270
44270
|
retrieve(messageID, params, options) {
|
|
44271
44271
|
const { thread_id } = params;
|
|
44272
|
-
return this._client.get(path$
|
|
44272
|
+
return this._client.get(path$10`/threads/${thread_id}/messages/${messageID}`, {
|
|
44273
44273
|
...options,
|
|
44274
44274
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
44275
44275
|
__security: { bearerAuth: true }
|
|
@@ -44282,7 +44282,7 @@ var Messages = class extends APIResource {
|
|
|
44282
44282
|
*/
|
|
44283
44283
|
update(messageID, params, options) {
|
|
44284
44284
|
const { thread_id, ...body } = params;
|
|
44285
|
-
return this._client.post(path$
|
|
44285
|
+
return this._client.post(path$10`/threads/${thread_id}/messages/${messageID}`, {
|
|
44286
44286
|
body,
|
|
44287
44287
|
...options,
|
|
44288
44288
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44295,7 +44295,7 @@ var Messages = class extends APIResource {
|
|
|
44295
44295
|
* @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
44296
44296
|
*/
|
|
44297
44297
|
list(threadID, query = {}, options) {
|
|
44298
|
-
return this._client.getAPIList(path$
|
|
44298
|
+
return this._client.getAPIList(path$10`/threads/${threadID}/messages`, CursorPage, {
|
|
44299
44299
|
query,
|
|
44300
44300
|
...options,
|
|
44301
44301
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44309,7 +44309,7 @@ var Messages = class extends APIResource {
|
|
|
44309
44309
|
*/
|
|
44310
44310
|
delete(messageID, params, options) {
|
|
44311
44311
|
const { thread_id } = params;
|
|
44312
|
-
return this._client.delete(path$
|
|
44312
|
+
return this._client.delete(path$10`/threads/${thread_id}/messages/${messageID}`, {
|
|
44313
44313
|
...options,
|
|
44314
44314
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
44315
44315
|
__security: { bearerAuth: true }
|
|
@@ -44331,7 +44331,7 @@ var Steps = class extends APIResource {
|
|
|
44331
44331
|
*/
|
|
44332
44332
|
retrieve(stepID, params, options) {
|
|
44333
44333
|
const { thread_id, run_id, ...query } = params;
|
|
44334
|
-
return this._client.get(path$
|
|
44334
|
+
return this._client.get(path$10`/threads/${thread_id}/runs/${run_id}/steps/${stepID}`, {
|
|
44335
44335
|
query,
|
|
44336
44336
|
...options,
|
|
44337
44337
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44345,7 +44345,7 @@ var Steps = class extends APIResource {
|
|
|
44345
44345
|
*/
|
|
44346
44346
|
list(runID, params, options) {
|
|
44347
44347
|
const { thread_id, ...query } = params;
|
|
44348
|
-
return this._client.getAPIList(path$
|
|
44348
|
+
return this._client.getAPIList(path$10`/threads/${thread_id}/runs/${runID}/steps`, CursorPage, {
|
|
44349
44349
|
query,
|
|
44350
44350
|
...options,
|
|
44351
44351
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44861,7 +44861,7 @@ var Runs$1 = class extends APIResource {
|
|
|
44861
44861
|
}
|
|
44862
44862
|
create(threadID, params, options) {
|
|
44863
44863
|
const { include, ...body } = params;
|
|
44864
|
-
return this._client.post(path$
|
|
44864
|
+
return this._client.post(path$10`/threads/${threadID}/runs`, {
|
|
44865
44865
|
query: { include },
|
|
44866
44866
|
body,
|
|
44867
44867
|
...options,
|
|
@@ -44878,7 +44878,7 @@ var Runs$1 = class extends APIResource {
|
|
|
44878
44878
|
*/
|
|
44879
44879
|
retrieve(runID, params, options) {
|
|
44880
44880
|
const { thread_id } = params;
|
|
44881
|
-
return this._client.get(path$
|
|
44881
|
+
return this._client.get(path$10`/threads/${thread_id}/runs/${runID}`, {
|
|
44882
44882
|
...options,
|
|
44883
44883
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
44884
44884
|
__security: { bearerAuth: true }
|
|
@@ -44891,7 +44891,7 @@ var Runs$1 = class extends APIResource {
|
|
|
44891
44891
|
*/
|
|
44892
44892
|
update(runID, params, options) {
|
|
44893
44893
|
const { thread_id, ...body } = params;
|
|
44894
|
-
return this._client.post(path$
|
|
44894
|
+
return this._client.post(path$10`/threads/${thread_id}/runs/${runID}`, {
|
|
44895
44895
|
body,
|
|
44896
44896
|
...options,
|
|
44897
44897
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44904,7 +44904,7 @@ var Runs$1 = class extends APIResource {
|
|
|
44904
44904
|
* @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
44905
44905
|
*/
|
|
44906
44906
|
list(threadID, query = {}, options) {
|
|
44907
|
-
return this._client.getAPIList(path$
|
|
44907
|
+
return this._client.getAPIList(path$10`/threads/${threadID}/runs`, CursorPage, {
|
|
44908
44908
|
query,
|
|
44909
44909
|
...options,
|
|
44910
44910
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -44918,7 +44918,7 @@ var Runs$1 = class extends APIResource {
|
|
|
44918
44918
|
*/
|
|
44919
44919
|
cancel(runID, params, options) {
|
|
44920
44920
|
const { thread_id } = params;
|
|
44921
|
-
return this._client.post(path$
|
|
44921
|
+
return this._client.post(path$10`/threads/${thread_id}/runs/${runID}/cancel`, {
|
|
44922
44922
|
...options,
|
|
44923
44923
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
44924
44924
|
__security: { bearerAuth: true }
|
|
@@ -44991,7 +44991,7 @@ var Runs$1 = class extends APIResource {
|
|
|
44991
44991
|
}
|
|
44992
44992
|
submitToolOutputs(runID, params, options) {
|
|
44993
44993
|
const { thread_id, ...body } = params;
|
|
44994
|
-
return this._client.post(path$
|
|
44994
|
+
return this._client.post(path$10`/threads/${thread_id}/runs/${runID}/submit_tool_outputs`, {
|
|
44995
44995
|
body,
|
|
44996
44996
|
...options,
|
|
44997
44997
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -45051,7 +45051,7 @@ var Threads = class extends APIResource {
|
|
|
45051
45051
|
* @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
45052
45052
|
*/
|
|
45053
45053
|
retrieve(threadID, options) {
|
|
45054
|
-
return this._client.get(path$
|
|
45054
|
+
return this._client.get(path$10`/threads/${threadID}`, {
|
|
45055
45055
|
...options,
|
|
45056
45056
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
45057
45057
|
__security: { bearerAuth: true }
|
|
@@ -45063,7 +45063,7 @@ var Threads = class extends APIResource {
|
|
|
45063
45063
|
* @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
45064
45064
|
*/
|
|
45065
45065
|
update(threadID, body, options) {
|
|
45066
|
-
return this._client.post(path$
|
|
45066
|
+
return this._client.post(path$10`/threads/${threadID}`, {
|
|
45067
45067
|
body,
|
|
45068
45068
|
...options,
|
|
45069
45069
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -45076,7 +45076,7 @@ var Threads = class extends APIResource {
|
|
|
45076
45076
|
* @deprecated The Assistants API is deprecated in favor of the Responses API
|
|
45077
45077
|
*/
|
|
45078
45078
|
delete(threadID, options) {
|
|
45079
|
-
return this._client.delete(path$
|
|
45079
|
+
return this._client.delete(path$10`/threads/${threadID}`, {
|
|
45080
45080
|
...options,
|
|
45081
45081
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
45082
45082
|
__security: { bearerAuth: true }
|
|
@@ -45148,7 +45148,7 @@ var Content$2 = class extends APIResource {
|
|
|
45148
45148
|
*/
|
|
45149
45149
|
retrieve(fileID, params, options) {
|
|
45150
45150
|
const { container_id } = params;
|
|
45151
|
-
return this._client.get(path$
|
|
45151
|
+
return this._client.get(path$10`/containers/${container_id}/files/${fileID}/content`, {
|
|
45152
45152
|
...options,
|
|
45153
45153
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
45154
45154
|
__security: { bearerAuth: true },
|
|
@@ -45170,7 +45170,7 @@ var Files$2 = class extends APIResource {
|
|
|
45170
45170
|
* a JSON request with a file ID.
|
|
45171
45171
|
*/
|
|
45172
45172
|
create(containerID, body, options) {
|
|
45173
|
-
return this._client.post(path$
|
|
45173
|
+
return this._client.post(path$10`/containers/${containerID}/files`, maybeMultipartFormRequestOptions({
|
|
45174
45174
|
body,
|
|
45175
45175
|
...options,
|
|
45176
45176
|
__security: { bearerAuth: true }
|
|
@@ -45181,7 +45181,7 @@ var Files$2 = class extends APIResource {
|
|
|
45181
45181
|
*/
|
|
45182
45182
|
retrieve(fileID, params, options) {
|
|
45183
45183
|
const { container_id } = params;
|
|
45184
|
-
return this._client.get(path$
|
|
45184
|
+
return this._client.get(path$10`/containers/${container_id}/files/${fileID}`, {
|
|
45185
45185
|
...options,
|
|
45186
45186
|
__security: { bearerAuth: true }
|
|
45187
45187
|
});
|
|
@@ -45190,7 +45190,7 @@ var Files$2 = class extends APIResource {
|
|
|
45190
45190
|
* List Container files
|
|
45191
45191
|
*/
|
|
45192
45192
|
list(containerID, query = {}, options) {
|
|
45193
|
-
return this._client.getAPIList(path$
|
|
45193
|
+
return this._client.getAPIList(path$10`/containers/${containerID}/files`, CursorPage, {
|
|
45194
45194
|
query,
|
|
45195
45195
|
...options,
|
|
45196
45196
|
__security: { bearerAuth: true }
|
|
@@ -45201,7 +45201,7 @@ var Files$2 = class extends APIResource {
|
|
|
45201
45201
|
*/
|
|
45202
45202
|
delete(fileID, params, options) {
|
|
45203
45203
|
const { container_id } = params;
|
|
45204
|
-
return this._client.delete(path$
|
|
45204
|
+
return this._client.delete(path$10`/containers/${container_id}/files/${fileID}`, {
|
|
45205
45205
|
...options,
|
|
45206
45206
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
45207
45207
|
__security: { bearerAuth: true }
|
|
@@ -45230,7 +45230,7 @@ var Containers = class extends APIResource {
|
|
|
45230
45230
|
* Retrieve Container
|
|
45231
45231
|
*/
|
|
45232
45232
|
retrieve(containerID, options) {
|
|
45233
|
-
return this._client.get(path$
|
|
45233
|
+
return this._client.get(path$10`/containers/${containerID}`, {
|
|
45234
45234
|
...options,
|
|
45235
45235
|
__security: { bearerAuth: true }
|
|
45236
45236
|
});
|
|
@@ -45249,7 +45249,7 @@ var Containers = class extends APIResource {
|
|
|
45249
45249
|
* Delete Container
|
|
45250
45250
|
*/
|
|
45251
45251
|
delete(containerID, options) {
|
|
45252
|
-
return this._client.delete(path$
|
|
45252
|
+
return this._client.delete(path$10`/containers/${containerID}`, {
|
|
45253
45253
|
...options,
|
|
45254
45254
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
45255
45255
|
__security: { bearerAuth: true }
|
|
@@ -45268,7 +45268,7 @@ var Items = class extends APIResource {
|
|
|
45268
45268
|
*/
|
|
45269
45269
|
create(conversationID, params, options) {
|
|
45270
45270
|
const { include, ...body } = params;
|
|
45271
|
-
return this._client.post(path$
|
|
45271
|
+
return this._client.post(path$10`/conversations/${conversationID}/items`, {
|
|
45272
45272
|
query: { include },
|
|
45273
45273
|
body,
|
|
45274
45274
|
...options,
|
|
@@ -45280,7 +45280,7 @@ var Items = class extends APIResource {
|
|
|
45280
45280
|
*/
|
|
45281
45281
|
retrieve(itemID, params, options) {
|
|
45282
45282
|
const { conversation_id, ...query } = params;
|
|
45283
|
-
return this._client.get(path$
|
|
45283
|
+
return this._client.get(path$10`/conversations/${conversation_id}/items/${itemID}`, {
|
|
45284
45284
|
query,
|
|
45285
45285
|
...options,
|
|
45286
45286
|
__security: { bearerAuth: true }
|
|
@@ -45290,7 +45290,7 @@ var Items = class extends APIResource {
|
|
|
45290
45290
|
* List all items for a conversation with the given ID.
|
|
45291
45291
|
*/
|
|
45292
45292
|
list(conversationID, query = {}, options) {
|
|
45293
|
-
return this._client.getAPIList(path$
|
|
45293
|
+
return this._client.getAPIList(path$10`/conversations/${conversationID}/items`, ConversationCursorPage, {
|
|
45294
45294
|
query,
|
|
45295
45295
|
...options,
|
|
45296
45296
|
__security: { bearerAuth: true }
|
|
@@ -45301,7 +45301,7 @@ var Items = class extends APIResource {
|
|
|
45301
45301
|
*/
|
|
45302
45302
|
delete(itemID, params, options) {
|
|
45303
45303
|
const { conversation_id } = params;
|
|
45304
|
-
return this._client.delete(path$
|
|
45304
|
+
return this._client.delete(path$10`/conversations/${conversation_id}/items/${itemID}`, {
|
|
45305
45305
|
...options,
|
|
45306
45306
|
__security: { bearerAuth: true }
|
|
45307
45307
|
});
|
|
@@ -45331,7 +45331,7 @@ var Conversations = class extends APIResource {
|
|
|
45331
45331
|
* Get a conversation
|
|
45332
45332
|
*/
|
|
45333
45333
|
retrieve(conversationID, options) {
|
|
45334
|
-
return this._client.get(path$
|
|
45334
|
+
return this._client.get(path$10`/conversations/${conversationID}`, {
|
|
45335
45335
|
...options,
|
|
45336
45336
|
__security: { bearerAuth: true }
|
|
45337
45337
|
});
|
|
@@ -45340,7 +45340,7 @@ var Conversations = class extends APIResource {
|
|
|
45340
45340
|
* Update a conversation
|
|
45341
45341
|
*/
|
|
45342
45342
|
update(conversationID, body, options) {
|
|
45343
|
-
return this._client.post(path$
|
|
45343
|
+
return this._client.post(path$10`/conversations/${conversationID}`, {
|
|
45344
45344
|
body,
|
|
45345
45345
|
...options,
|
|
45346
45346
|
__security: { bearerAuth: true }
|
|
@@ -45350,7 +45350,7 @@ var Conversations = class extends APIResource {
|
|
|
45350
45350
|
* Delete a conversation. Items in the conversation will not be deleted.
|
|
45351
45351
|
*/
|
|
45352
45352
|
delete(conversationID, options) {
|
|
45353
|
-
return this._client.delete(path$
|
|
45353
|
+
return this._client.delete(path$10`/conversations/${conversationID}`, {
|
|
45354
45354
|
...options,
|
|
45355
45355
|
__security: { bearerAuth: true }
|
|
45356
45356
|
});
|
|
@@ -45409,7 +45409,7 @@ var OutputItems = class extends APIResource {
|
|
|
45409
45409
|
*/
|
|
45410
45410
|
retrieve(outputItemID, params, options) {
|
|
45411
45411
|
const { eval_id, run_id } = params;
|
|
45412
|
-
return this._client.get(path$
|
|
45412
|
+
return this._client.get(path$10`/evals/${eval_id}/runs/${run_id}/output_items/${outputItemID}`, {
|
|
45413
45413
|
...options,
|
|
45414
45414
|
__security: { bearerAuth: true }
|
|
45415
45415
|
});
|
|
@@ -45419,7 +45419,7 @@ var OutputItems = class extends APIResource {
|
|
|
45419
45419
|
*/
|
|
45420
45420
|
list(runID, params, options) {
|
|
45421
45421
|
const { eval_id, ...query } = params;
|
|
45422
|
-
return this._client.getAPIList(path$
|
|
45422
|
+
return this._client.getAPIList(path$10`/evals/${eval_id}/runs/${runID}/output_items`, CursorPage, {
|
|
45423
45423
|
query,
|
|
45424
45424
|
...options,
|
|
45425
45425
|
__security: { bearerAuth: true }
|
|
@@ -45442,7 +45442,7 @@ var Runs = class extends APIResource {
|
|
|
45442
45442
|
* schema specified in the config of the evaluation.
|
|
45443
45443
|
*/
|
|
45444
45444
|
create(evalID, body, options) {
|
|
45445
|
-
return this._client.post(path$
|
|
45445
|
+
return this._client.post(path$10`/evals/${evalID}/runs`, {
|
|
45446
45446
|
body,
|
|
45447
45447
|
...options,
|
|
45448
45448
|
__security: { bearerAuth: true }
|
|
@@ -45453,7 +45453,7 @@ var Runs = class extends APIResource {
|
|
|
45453
45453
|
*/
|
|
45454
45454
|
retrieve(runID, params, options) {
|
|
45455
45455
|
const { eval_id } = params;
|
|
45456
|
-
return this._client.get(path$
|
|
45456
|
+
return this._client.get(path$10`/evals/${eval_id}/runs/${runID}`, {
|
|
45457
45457
|
...options,
|
|
45458
45458
|
__security: { bearerAuth: true }
|
|
45459
45459
|
});
|
|
@@ -45462,7 +45462,7 @@ var Runs = class extends APIResource {
|
|
|
45462
45462
|
* Get a list of runs for an evaluation.
|
|
45463
45463
|
*/
|
|
45464
45464
|
list(evalID, query = {}, options) {
|
|
45465
|
-
return this._client.getAPIList(path$
|
|
45465
|
+
return this._client.getAPIList(path$10`/evals/${evalID}/runs`, CursorPage, {
|
|
45466
45466
|
query,
|
|
45467
45467
|
...options,
|
|
45468
45468
|
__security: { bearerAuth: true }
|
|
@@ -45473,7 +45473,7 @@ var Runs = class extends APIResource {
|
|
|
45473
45473
|
*/
|
|
45474
45474
|
delete(runID, params, options) {
|
|
45475
45475
|
const { eval_id } = params;
|
|
45476
|
-
return this._client.delete(path$
|
|
45476
|
+
return this._client.delete(path$10`/evals/${eval_id}/runs/${runID}`, {
|
|
45477
45477
|
...options,
|
|
45478
45478
|
__security: { bearerAuth: true }
|
|
45479
45479
|
});
|
|
@@ -45483,7 +45483,7 @@ var Runs = class extends APIResource {
|
|
|
45483
45483
|
*/
|
|
45484
45484
|
cancel(runID, params, options) {
|
|
45485
45485
|
const { eval_id } = params;
|
|
45486
|
-
return this._client.post(path$
|
|
45486
|
+
return this._client.post(path$10`/evals/${eval_id}/runs/${runID}`, {
|
|
45487
45487
|
...options,
|
|
45488
45488
|
__security: { bearerAuth: true }
|
|
45489
45489
|
});
|
|
@@ -45519,7 +45519,7 @@ var Evals = class extends APIResource {
|
|
|
45519
45519
|
* Get an evaluation by ID.
|
|
45520
45520
|
*/
|
|
45521
45521
|
retrieve(evalID, options) {
|
|
45522
|
-
return this._client.get(path$
|
|
45522
|
+
return this._client.get(path$10`/evals/${evalID}`, {
|
|
45523
45523
|
...options,
|
|
45524
45524
|
__security: { bearerAuth: true }
|
|
45525
45525
|
});
|
|
@@ -45528,7 +45528,7 @@ var Evals = class extends APIResource {
|
|
|
45528
45528
|
* Update certain properties of an evaluation.
|
|
45529
45529
|
*/
|
|
45530
45530
|
update(evalID, body, options) {
|
|
45531
|
-
return this._client.post(path$
|
|
45531
|
+
return this._client.post(path$10`/evals/${evalID}`, {
|
|
45532
45532
|
body,
|
|
45533
45533
|
...options,
|
|
45534
45534
|
__security: { bearerAuth: true }
|
|
@@ -45548,7 +45548,7 @@ var Evals = class extends APIResource {
|
|
|
45548
45548
|
* Delete an evaluation.
|
|
45549
45549
|
*/
|
|
45550
45550
|
delete(evalID, options) {
|
|
45551
|
-
return this._client.delete(path$
|
|
45551
|
+
return this._client.delete(path$10`/evals/${evalID}`, {
|
|
45552
45552
|
...options,
|
|
45553
45553
|
__security: { bearerAuth: true }
|
|
45554
45554
|
});
|
|
@@ -45601,7 +45601,7 @@ var Files$1 = class extends APIResource {
|
|
|
45601
45601
|
* Returns information about a specific file.
|
|
45602
45602
|
*/
|
|
45603
45603
|
retrieve(fileID, options) {
|
|
45604
|
-
return this._client.get(path$
|
|
45604
|
+
return this._client.get(path$10`/files/${fileID}`, {
|
|
45605
45605
|
...options,
|
|
45606
45606
|
__security: { bearerAuth: true }
|
|
45607
45607
|
});
|
|
@@ -45620,7 +45620,7 @@ var Files$1 = class extends APIResource {
|
|
|
45620
45620
|
* Delete a file and remove it from all vector stores.
|
|
45621
45621
|
*/
|
|
45622
45622
|
delete(fileID, options) {
|
|
45623
|
-
return this._client.delete(path$
|
|
45623
|
+
return this._client.delete(path$10`/files/${fileID}`, {
|
|
45624
45624
|
...options,
|
|
45625
45625
|
__security: { bearerAuth: true }
|
|
45626
45626
|
});
|
|
@@ -45629,7 +45629,7 @@ var Files$1 = class extends APIResource {
|
|
|
45629
45629
|
* Returns the contents of the specified file.
|
|
45630
45630
|
*/
|
|
45631
45631
|
content(fileID, options) {
|
|
45632
|
-
return this._client.get(path$
|
|
45632
|
+
return this._client.get(path$10`/files/${fileID}/content`, {
|
|
45633
45633
|
...options,
|
|
45634
45634
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
45635
45635
|
__security: { bearerAuth: true },
|
|
@@ -45746,7 +45746,7 @@ var Permissions = class extends APIResource {
|
|
|
45746
45746
|
* ```
|
|
45747
45747
|
*/
|
|
45748
45748
|
create(fineTunedModelCheckpoint, body, options) {
|
|
45749
|
-
return this._client.getAPIList(path$
|
|
45749
|
+
return this._client.getAPIList(path$10`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, Page, {
|
|
45750
45750
|
body,
|
|
45751
45751
|
method: "post",
|
|
45752
45752
|
...options,
|
|
@@ -45762,7 +45762,7 @@ var Permissions = class extends APIResource {
|
|
|
45762
45762
|
* @deprecated Retrieve is deprecated. Please swap to the paginated list method instead.
|
|
45763
45763
|
*/
|
|
45764
45764
|
retrieve(fineTunedModelCheckpoint, query = {}, options) {
|
|
45765
|
-
return this._client.get(path$
|
|
45765
|
+
return this._client.get(path$10`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, {
|
|
45766
45766
|
query,
|
|
45767
45767
|
...options,
|
|
45768
45768
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -45785,7 +45785,7 @@ var Permissions = class extends APIResource {
|
|
|
45785
45785
|
* ```
|
|
45786
45786
|
*/
|
|
45787
45787
|
list(fineTunedModelCheckpoint, query = {}, options) {
|
|
45788
|
-
return this._client.getAPIList(path$
|
|
45788
|
+
return this._client.getAPIList(path$10`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, ConversationCursorPage, {
|
|
45789
45789
|
query,
|
|
45790
45790
|
...options,
|
|
45791
45791
|
__security: { adminAPIKeyAuth: true }
|
|
@@ -45811,7 +45811,7 @@ var Permissions = class extends APIResource {
|
|
|
45811
45811
|
*/
|
|
45812
45812
|
delete(permissionID, params, options) {
|
|
45813
45813
|
const { fine_tuned_model_checkpoint } = params;
|
|
45814
|
-
return this._client.delete(path$
|
|
45814
|
+
return this._client.delete(path$10`/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, {
|
|
45815
45815
|
...options,
|
|
45816
45816
|
__security: { adminAPIKeyAuth: true }
|
|
45817
45817
|
});
|
|
@@ -45846,7 +45846,7 @@ var Checkpoints = class extends APIResource {
|
|
|
45846
45846
|
* ```
|
|
45847
45847
|
*/
|
|
45848
45848
|
list(fineTuningJobID, query = {}, options) {
|
|
45849
|
-
return this._client.getAPIList(path$
|
|
45849
|
+
return this._client.getAPIList(path$10`/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, CursorPage, {
|
|
45850
45850
|
query,
|
|
45851
45851
|
...options,
|
|
45852
45852
|
__security: { bearerAuth: true }
|
|
@@ -45900,7 +45900,7 @@ var Jobs = class extends APIResource {
|
|
|
45900
45900
|
* ```
|
|
45901
45901
|
*/
|
|
45902
45902
|
retrieve(fineTuningJobID, options) {
|
|
45903
|
-
return this._client.get(path$
|
|
45903
|
+
return this._client.get(path$10`/fine_tuning/jobs/${fineTuningJobID}`, {
|
|
45904
45904
|
...options,
|
|
45905
45905
|
__security: { bearerAuth: true }
|
|
45906
45906
|
});
|
|
@@ -45934,7 +45934,7 @@ var Jobs = class extends APIResource {
|
|
|
45934
45934
|
* ```
|
|
45935
45935
|
*/
|
|
45936
45936
|
cancel(fineTuningJobID, options) {
|
|
45937
|
-
return this._client.post(path$
|
|
45937
|
+
return this._client.post(path$10`/fine_tuning/jobs/${fineTuningJobID}/cancel`, {
|
|
45938
45938
|
...options,
|
|
45939
45939
|
__security: { bearerAuth: true }
|
|
45940
45940
|
});
|
|
@@ -45953,7 +45953,7 @@ var Jobs = class extends APIResource {
|
|
|
45953
45953
|
* ```
|
|
45954
45954
|
*/
|
|
45955
45955
|
listEvents(fineTuningJobID, query = {}, options) {
|
|
45956
|
-
return this._client.getAPIList(path$
|
|
45956
|
+
return this._client.getAPIList(path$10`/fine_tuning/jobs/${fineTuningJobID}/events`, CursorPage, {
|
|
45957
45957
|
query,
|
|
45958
45958
|
...options,
|
|
45959
45959
|
__security: { bearerAuth: true }
|
|
@@ -45970,7 +45970,7 @@ var Jobs = class extends APIResource {
|
|
|
45970
45970
|
* ```
|
|
45971
45971
|
*/
|
|
45972
45972
|
pause(fineTuningJobID, options) {
|
|
45973
|
-
return this._client.post(path$
|
|
45973
|
+
return this._client.post(path$10`/fine_tuning/jobs/${fineTuningJobID}/pause`, {
|
|
45974
45974
|
...options,
|
|
45975
45975
|
__security: { bearerAuth: true }
|
|
45976
45976
|
});
|
|
@@ -45986,7 +45986,7 @@ var Jobs = class extends APIResource {
|
|
|
45986
45986
|
* ```
|
|
45987
45987
|
*/
|
|
45988
45988
|
resume(fineTuningJobID, options) {
|
|
45989
|
-
return this._client.post(path$
|
|
45989
|
+
return this._client.post(path$10`/fine_tuning/jobs/${fineTuningJobID}/resume`, {
|
|
45990
45990
|
...options,
|
|
45991
45991
|
__security: { bearerAuth: true }
|
|
45992
45992
|
});
|
|
@@ -46071,7 +46071,7 @@ var Models = class extends APIResource {
|
|
|
46071
46071
|
* the owner and permissioning.
|
|
46072
46072
|
*/
|
|
46073
46073
|
retrieve(model, options) {
|
|
46074
|
-
return this._client.get(path$
|
|
46074
|
+
return this._client.get(path$10`/models/${model}`, {
|
|
46075
46075
|
...options,
|
|
46076
46076
|
__security: { bearerAuth: true }
|
|
46077
46077
|
});
|
|
@@ -46091,7 +46091,7 @@ var Models = class extends APIResource {
|
|
|
46091
46091
|
* delete a model.
|
|
46092
46092
|
*/
|
|
46093
46093
|
delete(model, options) {
|
|
46094
|
-
return this._client.delete(path$
|
|
46094
|
+
return this._client.delete(path$10`/models/${model}`, {
|
|
46095
46095
|
...options,
|
|
46096
46096
|
__security: { bearerAuth: true }
|
|
46097
46097
|
});
|
|
@@ -46130,7 +46130,7 @@ var Calls = class extends APIResource {
|
|
|
46130
46130
|
* ```
|
|
46131
46131
|
*/
|
|
46132
46132
|
accept(callID, body, options) {
|
|
46133
|
-
return this._client.post(path$
|
|
46133
|
+
return this._client.post(path$10`/realtime/calls/${callID}/accept`, {
|
|
46134
46134
|
body,
|
|
46135
46135
|
...options,
|
|
46136
46136
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
@@ -46146,7 +46146,7 @@ var Calls = class extends APIResource {
|
|
|
46146
46146
|
* ```
|
|
46147
46147
|
*/
|
|
46148
46148
|
hangup(callID, options) {
|
|
46149
|
-
return this._client.post(path$
|
|
46149
|
+
return this._client.post(path$10`/realtime/calls/${callID}/hangup`, {
|
|
46150
46150
|
...options,
|
|
46151
46151
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
46152
46152
|
__security: { bearerAuth: true }
|
|
@@ -46163,7 +46163,7 @@ var Calls = class extends APIResource {
|
|
|
46163
46163
|
* ```
|
|
46164
46164
|
*/
|
|
46165
46165
|
refer(callID, body, options) {
|
|
46166
|
-
return this._client.post(path$
|
|
46166
|
+
return this._client.post(path$10`/realtime/calls/${callID}/refer`, {
|
|
46167
46167
|
body,
|
|
46168
46168
|
...options,
|
|
46169
46169
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
@@ -46179,7 +46179,7 @@ var Calls = class extends APIResource {
|
|
|
46179
46179
|
* ```
|
|
46180
46180
|
*/
|
|
46181
46181
|
reject(callID, body = {}, options) {
|
|
46182
|
-
return this._client.post(path$
|
|
46182
|
+
return this._client.post(path$10`/realtime/calls/${callID}/reject`, {
|
|
46183
46183
|
body,
|
|
46184
46184
|
...options,
|
|
46185
46185
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
@@ -46561,7 +46561,7 @@ var InputItems = class extends APIResource {
|
|
|
46561
46561
|
* ```
|
|
46562
46562
|
*/
|
|
46563
46563
|
list(responseID, query = {}, options) {
|
|
46564
|
-
return this._client.getAPIList(path$
|
|
46564
|
+
return this._client.getAPIList(path$10`/responses/${responseID}/input_items`, CursorPage, {
|
|
46565
46565
|
query,
|
|
46566
46566
|
...options,
|
|
46567
46567
|
__security: { bearerAuth: true }
|
|
@@ -46610,7 +46610,7 @@ var Responses = class extends APIResource {
|
|
|
46610
46610
|
});
|
|
46611
46611
|
}
|
|
46612
46612
|
retrieve(responseID, query = {}, options) {
|
|
46613
|
-
return this._client.get(path$
|
|
46613
|
+
return this._client.get(path$10`/responses/${responseID}`, {
|
|
46614
46614
|
query,
|
|
46615
46615
|
...options,
|
|
46616
46616
|
stream: query?.stream ?? false,
|
|
@@ -46631,7 +46631,7 @@ var Responses = class extends APIResource {
|
|
|
46631
46631
|
* ```
|
|
46632
46632
|
*/
|
|
46633
46633
|
delete(responseID, options) {
|
|
46634
|
-
return this._client.delete(path$
|
|
46634
|
+
return this._client.delete(path$10`/responses/${responseID}`, {
|
|
46635
46635
|
...options,
|
|
46636
46636
|
headers: buildHeaders([{ Accept: "*/*" }, options?.headers]),
|
|
46637
46637
|
__security: { bearerAuth: true }
|
|
@@ -46659,7 +46659,7 @@ var Responses = class extends APIResource {
|
|
|
46659
46659
|
* ```
|
|
46660
46660
|
*/
|
|
46661
46661
|
cancel(responseID, options) {
|
|
46662
|
-
return this._client.post(path$
|
|
46662
|
+
return this._client.post(path$10`/responses/${responseID}/cancel`, {
|
|
46663
46663
|
...options,
|
|
46664
46664
|
__security: { bearerAuth: true }
|
|
46665
46665
|
});
|
|
@@ -46696,7 +46696,7 @@ var Content$1 = class extends APIResource {
|
|
|
46696
46696
|
* Download a skill zip bundle by its ID.
|
|
46697
46697
|
*/
|
|
46698
46698
|
retrieve(skillID, options) {
|
|
46699
|
-
return this._client.get(path$
|
|
46699
|
+
return this._client.get(path$10`/skills/${skillID}/content`, {
|
|
46700
46700
|
...options,
|
|
46701
46701
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
46702
46702
|
__security: { bearerAuth: true },
|
|
@@ -46712,7 +46712,7 @@ var Content = class extends APIResource {
|
|
|
46712
46712
|
*/
|
|
46713
46713
|
retrieve(version, params, options) {
|
|
46714
46714
|
const { skill_id } = params;
|
|
46715
|
-
return this._client.get(path$
|
|
46715
|
+
return this._client.get(path$10`/skills/${skill_id}/versions/${version}/content`, {
|
|
46716
46716
|
...options,
|
|
46717
46717
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
46718
46718
|
__security: { bearerAuth: true },
|
|
@@ -46731,7 +46731,7 @@ var Versions = class extends APIResource {
|
|
|
46731
46731
|
* Create a new immutable skill version.
|
|
46732
46732
|
*/
|
|
46733
46733
|
create(skillID, body = {}, options) {
|
|
46734
|
-
return this._client.post(path$
|
|
46734
|
+
return this._client.post(path$10`/skills/${skillID}/versions`, maybeMultipartFormRequestOptions({
|
|
46735
46735
|
body,
|
|
46736
46736
|
...options,
|
|
46737
46737
|
__security: { bearerAuth: true }
|
|
@@ -46742,7 +46742,7 @@ var Versions = class extends APIResource {
|
|
|
46742
46742
|
*/
|
|
46743
46743
|
retrieve(version, params, options) {
|
|
46744
46744
|
const { skill_id } = params;
|
|
46745
|
-
return this._client.get(path$
|
|
46745
|
+
return this._client.get(path$10`/skills/${skill_id}/versions/${version}`, {
|
|
46746
46746
|
...options,
|
|
46747
46747
|
__security: { bearerAuth: true }
|
|
46748
46748
|
});
|
|
@@ -46751,7 +46751,7 @@ var Versions = class extends APIResource {
|
|
|
46751
46751
|
* List skill versions for a skill.
|
|
46752
46752
|
*/
|
|
46753
46753
|
list(skillID, query = {}, options) {
|
|
46754
|
-
return this._client.getAPIList(path$
|
|
46754
|
+
return this._client.getAPIList(path$10`/skills/${skillID}/versions`, CursorPage, {
|
|
46755
46755
|
query,
|
|
46756
46756
|
...options,
|
|
46757
46757
|
__security: { bearerAuth: true }
|
|
@@ -46762,7 +46762,7 @@ var Versions = class extends APIResource {
|
|
|
46762
46762
|
*/
|
|
46763
46763
|
delete(version, params, options) {
|
|
46764
46764
|
const { skill_id } = params;
|
|
46765
|
-
return this._client.delete(path$
|
|
46765
|
+
return this._client.delete(path$10`/skills/${skill_id}/versions/${version}`, {
|
|
46766
46766
|
...options,
|
|
46767
46767
|
__security: { bearerAuth: true }
|
|
46768
46768
|
});
|
|
@@ -46791,7 +46791,7 @@ var Skills = class extends APIResource {
|
|
|
46791
46791
|
* Get a skill by its ID.
|
|
46792
46792
|
*/
|
|
46793
46793
|
retrieve(skillID, options) {
|
|
46794
|
-
return this._client.get(path$
|
|
46794
|
+
return this._client.get(path$10`/skills/${skillID}`, {
|
|
46795
46795
|
...options,
|
|
46796
46796
|
__security: { bearerAuth: true }
|
|
46797
46797
|
});
|
|
@@ -46800,7 +46800,7 @@ var Skills = class extends APIResource {
|
|
|
46800
46800
|
* Update the default version pointer for a skill.
|
|
46801
46801
|
*/
|
|
46802
46802
|
update(skillID, body, options) {
|
|
46803
|
-
return this._client.post(path$
|
|
46803
|
+
return this._client.post(path$10`/skills/${skillID}`, {
|
|
46804
46804
|
body,
|
|
46805
46805
|
...options,
|
|
46806
46806
|
__security: { bearerAuth: true }
|
|
@@ -46820,7 +46820,7 @@ var Skills = class extends APIResource {
|
|
|
46820
46820
|
* Delete a skill by its ID.
|
|
46821
46821
|
*/
|
|
46822
46822
|
delete(skillID, options) {
|
|
46823
|
-
return this._client.delete(path$
|
|
46823
|
+
return this._client.delete(path$10`/skills/${skillID}`, {
|
|
46824
46824
|
...options,
|
|
46825
46825
|
__security: { bearerAuth: true }
|
|
46826
46826
|
});
|
|
@@ -46848,7 +46848,7 @@ var Parts = class extends APIResource {
|
|
|
46848
46848
|
* [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).
|
|
46849
46849
|
*/
|
|
46850
46850
|
create(uploadID, body, options) {
|
|
46851
|
-
return this._client.post(path$
|
|
46851
|
+
return this._client.post(path$10`/uploads/${uploadID}/parts`, multipartFormRequestOptions({
|
|
46852
46852
|
body,
|
|
46853
46853
|
...options,
|
|
46854
46854
|
__security: { bearerAuth: true }
|
|
@@ -46901,7 +46901,7 @@ var Uploads = class extends APIResource {
|
|
|
46901
46901
|
* Returns the Upload object with status `cancelled`.
|
|
46902
46902
|
*/
|
|
46903
46903
|
cancel(uploadID, options) {
|
|
46904
|
-
return this._client.post(path$
|
|
46904
|
+
return this._client.post(path$10`/uploads/${uploadID}/cancel`, {
|
|
46905
46905
|
...options,
|
|
46906
46906
|
__security: { bearerAuth: true }
|
|
46907
46907
|
});
|
|
@@ -46924,7 +46924,7 @@ var Uploads = class extends APIResource {
|
|
|
46924
46924
|
* object.
|
|
46925
46925
|
*/
|
|
46926
46926
|
complete(uploadID, body, options) {
|
|
46927
|
-
return this._client.post(path$
|
|
46927
|
+
return this._client.post(path$10`/uploads/${uploadID}/complete`, {
|
|
46928
46928
|
body,
|
|
46929
46929
|
...options,
|
|
46930
46930
|
__security: { bearerAuth: true }
|
|
@@ -46955,7 +46955,7 @@ var FileBatches = class extends APIResource {
|
|
|
46955
46955
|
* Create a vector store file batch.
|
|
46956
46956
|
*/
|
|
46957
46957
|
create(vectorStoreID, body, options) {
|
|
46958
|
-
return this._client.post(path$
|
|
46958
|
+
return this._client.post(path$10`/vector_stores/${vectorStoreID}/file_batches`, {
|
|
46959
46959
|
body,
|
|
46960
46960
|
...options,
|
|
46961
46961
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -46967,7 +46967,7 @@ var FileBatches = class extends APIResource {
|
|
|
46967
46967
|
*/
|
|
46968
46968
|
retrieve(batchID, params, options) {
|
|
46969
46969
|
const { vector_store_id } = params;
|
|
46970
|
-
return this._client.get(path$
|
|
46970
|
+
return this._client.get(path$10`/vector_stores/${vector_store_id}/file_batches/${batchID}`, {
|
|
46971
46971
|
...options,
|
|
46972
46972
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
46973
46973
|
__security: { bearerAuth: true }
|
|
@@ -46979,7 +46979,7 @@ var FileBatches = class extends APIResource {
|
|
|
46979
46979
|
*/
|
|
46980
46980
|
cancel(batchID, params, options) {
|
|
46981
46981
|
const { vector_store_id } = params;
|
|
46982
|
-
return this._client.post(path$
|
|
46982
|
+
return this._client.post(path$10`/vector_stores/${vector_store_id}/file_batches/${batchID}/cancel`, {
|
|
46983
46983
|
...options,
|
|
46984
46984
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
46985
46985
|
__security: { bearerAuth: true }
|
|
@@ -46997,7 +46997,7 @@ var FileBatches = class extends APIResource {
|
|
|
46997
46997
|
*/
|
|
46998
46998
|
listFiles(batchID, params, options) {
|
|
46999
46999
|
const { vector_store_id, ...query } = params;
|
|
47000
|
-
return this._client.getAPIList(path$
|
|
47000
|
+
return this._client.getAPIList(path$10`/vector_stores/${vector_store_id}/file_batches/${batchID}/files`, CursorPage, {
|
|
47001
47001
|
query,
|
|
47002
47002
|
...options,
|
|
47003
47003
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -47073,7 +47073,7 @@ var Files = class extends APIResource {
|
|
|
47073
47073
|
* [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object).
|
|
47074
47074
|
*/
|
|
47075
47075
|
create(vectorStoreID, body, options) {
|
|
47076
|
-
return this._client.post(path$
|
|
47076
|
+
return this._client.post(path$10`/vector_stores/${vectorStoreID}/files`, {
|
|
47077
47077
|
body,
|
|
47078
47078
|
...options,
|
|
47079
47079
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -47085,7 +47085,7 @@ var Files = class extends APIResource {
|
|
|
47085
47085
|
*/
|
|
47086
47086
|
retrieve(fileID, params, options) {
|
|
47087
47087
|
const { vector_store_id } = params;
|
|
47088
|
-
return this._client.get(path$
|
|
47088
|
+
return this._client.get(path$10`/vector_stores/${vector_store_id}/files/${fileID}`, {
|
|
47089
47089
|
...options,
|
|
47090
47090
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
47091
47091
|
__security: { bearerAuth: true }
|
|
@@ -47096,7 +47096,7 @@ var Files = class extends APIResource {
|
|
|
47096
47096
|
*/
|
|
47097
47097
|
update(fileID, params, options) {
|
|
47098
47098
|
const { vector_store_id, ...body } = params;
|
|
47099
|
-
return this._client.post(path$
|
|
47099
|
+
return this._client.post(path$10`/vector_stores/${vector_store_id}/files/${fileID}`, {
|
|
47100
47100
|
body,
|
|
47101
47101
|
...options,
|
|
47102
47102
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -47107,7 +47107,7 @@ var Files = class extends APIResource {
|
|
|
47107
47107
|
* Returns a list of vector store files.
|
|
47108
47108
|
*/
|
|
47109
47109
|
list(vectorStoreID, query = {}, options) {
|
|
47110
|
-
return this._client.getAPIList(path$
|
|
47110
|
+
return this._client.getAPIList(path$10`/vector_stores/${vectorStoreID}/files`, CursorPage, {
|
|
47111
47111
|
query,
|
|
47112
47112
|
...options,
|
|
47113
47113
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -47122,7 +47122,7 @@ var Files = class extends APIResource {
|
|
|
47122
47122
|
*/
|
|
47123
47123
|
delete(fileID, params, options) {
|
|
47124
47124
|
const { vector_store_id } = params;
|
|
47125
|
-
return this._client.delete(path$
|
|
47125
|
+
return this._client.delete(path$10`/vector_stores/${vector_store_id}/files/${fileID}`, {
|
|
47126
47126
|
...options,
|
|
47127
47127
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
47128
47128
|
__security: { bearerAuth: true }
|
|
@@ -47195,7 +47195,7 @@ var Files = class extends APIResource {
|
|
|
47195
47195
|
*/
|
|
47196
47196
|
content(fileID, params, options) {
|
|
47197
47197
|
const { vector_store_id } = params;
|
|
47198
|
-
return this._client.getAPIList(path$
|
|
47198
|
+
return this._client.getAPIList(path$10`/vector_stores/${vector_store_id}/files/${fileID}/content`, Page, {
|
|
47199
47199
|
...options,
|
|
47200
47200
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
47201
47201
|
__security: { bearerAuth: true }
|
|
@@ -47225,7 +47225,7 @@ var VectorStores = class extends APIResource {
|
|
|
47225
47225
|
* Retrieves a vector store.
|
|
47226
47226
|
*/
|
|
47227
47227
|
retrieve(vectorStoreID, options) {
|
|
47228
|
-
return this._client.get(path$
|
|
47228
|
+
return this._client.get(path$10`/vector_stores/${vectorStoreID}`, {
|
|
47229
47229
|
...options,
|
|
47230
47230
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
47231
47231
|
__security: { bearerAuth: true }
|
|
@@ -47235,7 +47235,7 @@ var VectorStores = class extends APIResource {
|
|
|
47235
47235
|
* Modifies a vector store.
|
|
47236
47236
|
*/
|
|
47237
47237
|
update(vectorStoreID, body, options) {
|
|
47238
|
-
return this._client.post(path$
|
|
47238
|
+
return this._client.post(path$10`/vector_stores/${vectorStoreID}`, {
|
|
47239
47239
|
body,
|
|
47240
47240
|
...options,
|
|
47241
47241
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
@@ -47257,7 +47257,7 @@ var VectorStores = class extends APIResource {
|
|
|
47257
47257
|
* Delete a vector store.
|
|
47258
47258
|
*/
|
|
47259
47259
|
delete(vectorStoreID, options) {
|
|
47260
|
-
return this._client.delete(path$
|
|
47260
|
+
return this._client.delete(path$10`/vector_stores/${vectorStoreID}`, {
|
|
47261
47261
|
...options,
|
|
47262
47262
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
|
|
47263
47263
|
__security: { bearerAuth: true }
|
|
@@ -47268,7 +47268,7 @@ var VectorStores = class extends APIResource {
|
|
|
47268
47268
|
* filter.
|
|
47269
47269
|
*/
|
|
47270
47270
|
search(vectorStoreID, body, options) {
|
|
47271
|
-
return this._client.getAPIList(path$
|
|
47271
|
+
return this._client.getAPIList(path$10`/vector_stores/${vectorStoreID}/search`, Page, {
|
|
47272
47272
|
body,
|
|
47273
47273
|
method: "post",
|
|
47274
47274
|
...options,
|
|
@@ -47296,7 +47296,7 @@ var Videos = class extends APIResource {
|
|
|
47296
47296
|
* Fetch the latest metadata for a generated video.
|
|
47297
47297
|
*/
|
|
47298
47298
|
retrieve(videoID, options) {
|
|
47299
|
-
return this._client.get(path$
|
|
47299
|
+
return this._client.get(path$10`/videos/${videoID}`, {
|
|
47300
47300
|
...options,
|
|
47301
47301
|
__security: { bearerAuth: true }
|
|
47302
47302
|
});
|
|
@@ -47315,7 +47315,7 @@ var Videos = class extends APIResource {
|
|
|
47315
47315
|
* Permanently delete a completed or failed video and its stored assets.
|
|
47316
47316
|
*/
|
|
47317
47317
|
delete(videoID, options) {
|
|
47318
|
-
return this._client.delete(path$
|
|
47318
|
+
return this._client.delete(path$10`/videos/${videoID}`, {
|
|
47319
47319
|
...options,
|
|
47320
47320
|
__security: { bearerAuth: true }
|
|
47321
47321
|
});
|
|
@@ -47336,7 +47336,7 @@ var Videos = class extends APIResource {
|
|
|
47336
47336
|
* Streams the rendered video content for the specified video job.
|
|
47337
47337
|
*/
|
|
47338
47338
|
downloadContent(videoID, query = {}, options) {
|
|
47339
|
-
return this._client.get(path$
|
|
47339
|
+
return this._client.get(path$10`/videos/${videoID}/content`, {
|
|
47340
47340
|
query,
|
|
47341
47341
|
...options,
|
|
47342
47342
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
@@ -47369,7 +47369,7 @@ var Videos = class extends APIResource {
|
|
|
47369
47369
|
* Fetch a character.
|
|
47370
47370
|
*/
|
|
47371
47371
|
getCharacter(characterID, options) {
|
|
47372
|
-
return this._client.get(path$
|
|
47372
|
+
return this._client.get(path$10`/videos/characters/${characterID}`, {
|
|
47373
47373
|
...options,
|
|
47374
47374
|
__security: { bearerAuth: true }
|
|
47375
47375
|
});
|
|
@@ -47378,7 +47378,7 @@ var Videos = class extends APIResource {
|
|
|
47378
47378
|
* Create a remix of a completed video using a refreshed prompt.
|
|
47379
47379
|
*/
|
|
47380
47380
|
remix(videoID, body, options) {
|
|
47381
|
-
return this._client.post(path$
|
|
47381
|
+
return this._client.post(path$10`/videos/${videoID}/remix`, maybeMultipartFormRequestOptions({
|
|
47382
47382
|
body,
|
|
47383
47383
|
...options,
|
|
47384
47384
|
__security: { bearerAuth: true }
|
|
@@ -48268,11 +48268,11 @@ var ScreamFiles = class {
|
|
|
48268
48268
|
async uploadVideo(input, options) {
|
|
48269
48269
|
let file;
|
|
48270
48270
|
if (typeof input === "string") {
|
|
48271
|
-
if (!fs$
|
|
48272
|
-
const filename = path$
|
|
48271
|
+
if (!fs$10.existsSync(input)) throw new ChatProviderError(`Video file not found: ${input}`);
|
|
48272
|
+
const filename = path$9.basename(input);
|
|
48273
48273
|
const mimeType = guessMimeTypeFromExt(filename);
|
|
48274
48274
|
if (mimeType === void 0 || !mimeType.startsWith("video/")) throw new ChatProviderError(`ScreamFiles.uploadVideo: file extension does not indicate a video type: ${filename}`);
|
|
48275
|
-
const data = await fs$
|
|
48275
|
+
const data = await fs$10.promises.readFile(input);
|
|
48276
48276
|
const blob = new Blob([new Uint8Array(data)], { type: mimeType });
|
|
48277
48277
|
file = new File([blob], filename, { type: mimeType });
|
|
48278
48278
|
} else {
|
|
@@ -50146,7 +50146,7 @@ async function syncDir(dirPath) {
|
|
|
50146
50146
|
*/
|
|
50147
50147
|
function syncFd(fd) {
|
|
50148
50148
|
return new Promise((resolve, reject) => {
|
|
50149
|
-
fs$
|
|
50149
|
+
fs$10.fsync(fd, (err) => {
|
|
50150
50150
|
if (err) {
|
|
50151
50151
|
reject(err);
|
|
50152
50152
|
return;
|
|
@@ -56089,11 +56089,41 @@ var WriteGoalNoteTool = class {
|
|
|
56089
56089
|
};
|
|
56090
56090
|
//#endregion
|
|
56091
56091
|
//#region ../../packages/memory/src/scoring.ts
|
|
56092
|
+
const TEMPORAL_STRONG = /昨天|今天|上周|本周|本月|最近|之前|以前|上次|刚刚|刚刚才|刚才|前天|大前天|前几天|这几天|这几天来|近.*[天周月年]/;
|
|
56093
|
+
const TEMPORAL_WEAK = /什么时候|何时|多久|几时|哪天|哪一天|多长.*时间/;
|
|
56094
|
+
const TEMPORAL_ACTION = /做了|干了|处理了|解决了|修复了|完成了|改了|写了|加了|删了|移除了|部署了|发布了/;
|
|
56095
|
+
const CODE_SIGNAL = /[`'"#]|[{}()[\]]|\.(ts|js|tsx|jsx|py|rs|go|java|cpp|c|h)\b|function |const |import |export |class |async |await |type |interface /;
|
|
56096
|
+
/**
|
|
56097
|
+
* Lightweight regex-based query intent detection.
|
|
56098
|
+
* Zero LLM cost — classifies into temporal vs factual bias to adjust scoring weights.
|
|
56099
|
+
*/
|
|
56100
|
+
function detectQueryIntent(query) {
|
|
56101
|
+
const q = query.trim();
|
|
56102
|
+
if (q.length === 0) return {
|
|
56103
|
+
temporalBias: .3,
|
|
56104
|
+
factualBias: .6
|
|
56105
|
+
};
|
|
56106
|
+
let temporalBias = .3;
|
|
56107
|
+
let factualBias = .6;
|
|
56108
|
+
if (TEMPORAL_STRONG.test(q)) temporalBias = 1;
|
|
56109
|
+
else if (TEMPORAL_WEAK.test(q)) temporalBias = .8;
|
|
56110
|
+
else if (TEMPORAL_ACTION.test(q)) temporalBias = .6;
|
|
56111
|
+
if (CODE_SIGNAL.test(q) && !TEMPORAL_STRONG.test(q) && !TEMPORAL_WEAK.test(q)) factualBias = 1;
|
|
56112
|
+
return {
|
|
56113
|
+
temporalBias,
|
|
56114
|
+
factualBias
|
|
56115
|
+
};
|
|
56116
|
+
}
|
|
56092
56117
|
/**
|
|
56093
56118
|
* Multi-factor relevance score for a memory memo against a query.
|
|
56094
56119
|
* Pure deterministic scoring — no LLM call, no network.
|
|
56120
|
+
*
|
|
56121
|
+
* When `intent` is provided, keyword weight increases for factual queries
|
|
56122
|
+
* and recency weight increases for temporal queries.
|
|
56095
56123
|
*/
|
|
56096
|
-
function computeRelevanceScore(memo, query, usageCount = 0, currentProjectDir, projectTagCloud) {
|
|
56124
|
+
function computeRelevanceScore(memo, query, usageCount = 0, currentProjectDir, projectTagCloud, intent) {
|
|
56125
|
+
const ti = intent?.temporalBias ?? .3;
|
|
56126
|
+
const fi = intent?.factualBias ?? .6;
|
|
56097
56127
|
const factors = {
|
|
56098
56128
|
keywordOverlap: computeKeywordSimilarity(memo, query),
|
|
56099
56129
|
recency: computeRecency(memo.recordedAt),
|
|
@@ -56101,17 +56131,29 @@ function computeRelevanceScore(memo, query, usageCount = 0, currentProjectDir, p
|
|
|
56101
56131
|
projectBoost: computeProjectBoost(memo.projectDir, currentProjectDir),
|
|
56102
56132
|
tagOverlap: computeTagOverlap(memo.tags, projectTagCloud)
|
|
56103
56133
|
};
|
|
56104
|
-
|
|
56134
|
+
const kwWeight = .45 * (1 + (fi - .6) * .5);
|
|
56135
|
+
const recencyWeight = .25 * (1 + (ti - .3) * .571);
|
|
56136
|
+
const usageWeight = .15;
|
|
56137
|
+
const projectWeight = .1;
|
|
56138
|
+
const tagWeight = .05;
|
|
56139
|
+
const total = kwWeight + recencyWeight + usageWeight + projectWeight + tagWeight;
|
|
56140
|
+
return factors.keywordOverlap * (kwWeight / total) + factors.recency * (recencyWeight / total) + factors.usageBoost * (usageWeight / total) + factors.projectBoost * (projectWeight / total) + factors.tagOverlap * (tagWeight / total);
|
|
56105
56141
|
}
|
|
56106
56142
|
/**
|
|
56107
56143
|
* Score multiple memos against a query, returning sorted results.
|
|
56108
56144
|
*/
|
|
56109
56145
|
function rankMemos(memos, query, options = {}) {
|
|
56110
|
-
const { minScore = .3, maxResults = 3, currentProjectDir, projectTagCloud } = options;
|
|
56111
|
-
|
|
56112
|
-
|
|
56113
|
-
|
|
56114
|
-
|
|
56146
|
+
const { minScore = .3, maxResults = 3, currentProjectDir, projectTagCloud, vectorScores } = options;
|
|
56147
|
+
const intent = detectQueryIntent(query);
|
|
56148
|
+
const hasVectorScores = vectorScores !== void 0 && vectorScores.size > 0;
|
|
56149
|
+
return memos.map((memo) => {
|
|
56150
|
+
const keywordScore = computeRelevanceScore(memo, query, 0, currentProjectDir, projectTagCloud, intent);
|
|
56151
|
+
const vectorScore = vectorScores?.get(memo.id) ?? 0;
|
|
56152
|
+
return {
|
|
56153
|
+
memo,
|
|
56154
|
+
score: hasVectorScores ? keywordScore * .6 + vectorScore * .4 : keywordScore
|
|
56155
|
+
};
|
|
56156
|
+
}).filter((s) => s.score >= minScore).toSorted((a, b) => b.score - a.score).slice(0, maxResults);
|
|
56115
56157
|
}
|
|
56116
56158
|
/**
|
|
56117
56159
|
* Build a tag cloud from memos that belong to the current project.
|
|
@@ -56361,6 +56403,71 @@ function toSummary(memo) {
|
|
|
56361
56403
|
};
|
|
56362
56404
|
}
|
|
56363
56405
|
//#endregion
|
|
56406
|
+
//#region ../../packages/memory/src/embeddings.ts
|
|
56407
|
+
/**
|
|
56408
|
+
* Text used to generate embeddings for a memo.
|
|
56409
|
+
* Combines the most semantically meaningful fields.
|
|
56410
|
+
*/
|
|
56411
|
+
function buildEmbeddingText(memo) {
|
|
56412
|
+
return `${memo.userNeed} ${memo.approach} ${memo.whatWorked}`;
|
|
56413
|
+
}
|
|
56414
|
+
/**
|
|
56415
|
+
* Create an embedding engine backed by fastembed.
|
|
56416
|
+
* Lazily loads the model on first use so startup is not blocked.
|
|
56417
|
+
*/
|
|
56418
|
+
function createFastEmbedEngine() {
|
|
56419
|
+
let embedder = null;
|
|
56420
|
+
let initPromise = null;
|
|
56421
|
+
let loadFailed = false;
|
|
56422
|
+
return {
|
|
56423
|
+
get available() {
|
|
56424
|
+
return !loadFailed;
|
|
56425
|
+
},
|
|
56426
|
+
async embedBatch(texts) {
|
|
56427
|
+
if (loadFailed) return null;
|
|
56428
|
+
if (texts.length === 0) return [];
|
|
56429
|
+
try {
|
|
56430
|
+
if (embedder === null) {
|
|
56431
|
+
if (initPromise === null) initPromise = loadEmbedder();
|
|
56432
|
+
embedder = await initPromise;
|
|
56433
|
+
if (embedder === null) {
|
|
56434
|
+
loadFailed = true;
|
|
56435
|
+
return null;
|
|
56436
|
+
}
|
|
56437
|
+
}
|
|
56438
|
+
const generator = embedder.embed(texts);
|
|
56439
|
+
const vectors = [];
|
|
56440
|
+
for await (const batch of generator) for (const vec of batch) vectors.push(new Float32Array(vec));
|
|
56441
|
+
return vectors.length > 0 ? vectors : null;
|
|
56442
|
+
} catch {
|
|
56443
|
+
loadFailed = true;
|
|
56444
|
+
return null;
|
|
56445
|
+
}
|
|
56446
|
+
},
|
|
56447
|
+
cosineSimilarity(a, b) {
|
|
56448
|
+
if (a.length !== b.length || a.length === 0) return 0;
|
|
56449
|
+
let dot = 0;
|
|
56450
|
+
let normA = 0;
|
|
56451
|
+
let normB = 0;
|
|
56452
|
+
for (let i = 0; i < a.length; i++) {
|
|
56453
|
+
dot += a[i] * b[i];
|
|
56454
|
+
normA += a[i] * a[i];
|
|
56455
|
+
normB += b[i] * b[i];
|
|
56456
|
+
}
|
|
56457
|
+
const denom = Math.sqrt(normA) * Math.sqrt(normB);
|
|
56458
|
+
return denom === 0 ? 0 : dot / denom;
|
|
56459
|
+
}
|
|
56460
|
+
};
|
|
56461
|
+
}
|
|
56462
|
+
async function loadEmbedder() {
|
|
56463
|
+
try {
|
|
56464
|
+
const { FlagEmbedding, EmbeddingModel } = await import("./esm-Du2MwXei.mjs");
|
|
56465
|
+
return await FlagEmbedding.init({ model: EmbeddingModel.BGESmallZH });
|
|
56466
|
+
} catch {
|
|
56467
|
+
return null;
|
|
56468
|
+
}
|
|
56469
|
+
}
|
|
56470
|
+
//#endregion
|
|
56364
56471
|
//#region ../../packages/memory/src/store.ts
|
|
56365
56472
|
const FILE_NAME = "entries.jsonl";
|
|
56366
56473
|
const MIGRATION_MARKER = ".migrated";
|
|
@@ -56372,6 +56479,10 @@ var MemoryMemoStore = class MemoryMemoStore {
|
|
|
56372
56479
|
db;
|
|
56373
56480
|
initialized = false;
|
|
56374
56481
|
writeLock = Promise.resolve();
|
|
56482
|
+
embeddingEngine;
|
|
56483
|
+
embeddingQueue = /* @__PURE__ */ new Set();
|
|
56484
|
+
embeddingTimer;
|
|
56485
|
+
embeddingFlushing = false;
|
|
56375
56486
|
constructor(projectDir) {
|
|
56376
56487
|
this.projectDir = projectDir;
|
|
56377
56488
|
this.jsonlPath = join$1(projectDir, "memory", FILE_NAME);
|
|
@@ -56580,6 +56691,13 @@ var MemoryMemoStore = class MemoryMemoStore {
|
|
|
56580
56691
|
source_session_title,
|
|
56581
56692
|
content=''
|
|
56582
56693
|
);
|
|
56694
|
+
|
|
56695
|
+
CREATE TABLE IF NOT EXISTS memory_embeddings (
|
|
56696
|
+
memory_id TEXT PRIMARY KEY REFERENCES memos(id) ON DELETE CASCADE,
|
|
56697
|
+
embedding_json TEXT NOT NULL,
|
|
56698
|
+
model TEXT NOT NULL DEFAULT 'bge-small-zh-v1.5',
|
|
56699
|
+
created_at INTEGER NOT NULL
|
|
56700
|
+
);
|
|
56583
56701
|
`);
|
|
56584
56702
|
this.migrateSchema();
|
|
56585
56703
|
}
|
|
@@ -56659,6 +56777,7 @@ var MemoryMemoStore = class MemoryMemoStore {
|
|
|
56659
56777
|
const row = insert.get(entry.id, entry.sourceSessionId, entry.sourceSessionTitle ?? null, entry.userNeed, entry.approach, entry.outcome, entry.whatFailed, entry.whatWorked, entry.extractionSource, entry.recordedAt, entry.projectDir ?? "", JSON.stringify(entry.tags ?? []));
|
|
56660
56778
|
insertFts.run(row.rowid, toFtsText(entry.userNeed), toFtsText(entry.approach), toFtsText(entry.whatFailed), toFtsText(entry.whatWorked), toFtsText(entry.sourceSessionTitle ?? ""));
|
|
56661
56779
|
this.db.exec("COMMIT");
|
|
56780
|
+
this.scheduleEmbedding(entry);
|
|
56662
56781
|
} catch {
|
|
56663
56782
|
this.db.exec("ROLLBACK");
|
|
56664
56783
|
throw new Error("Failed to append memo");
|
|
@@ -56736,6 +56855,100 @@ var MemoryMemoStore = class MemoryMemoStore {
|
|
|
56736
56855
|
throw new Error("Failed to delete memo");
|
|
56737
56856
|
}
|
|
56738
56857
|
}
|
|
56858
|
+
/** Set the embedding engine. Call once after construction, before any writes. */
|
|
56859
|
+
setEmbeddingEngine(engine) {
|
|
56860
|
+
this.embeddingEngine = engine;
|
|
56861
|
+
}
|
|
56862
|
+
/** Check whether the store has any vector embeddings. */
|
|
56863
|
+
hasEmbeddings() {
|
|
56864
|
+
if (this.db === void 0) return false;
|
|
56865
|
+
return (this.db.prepare("SELECT COUNT(*) as count FROM memory_embeddings").get()?.count ?? 0) > 0;
|
|
56866
|
+
}
|
|
56867
|
+
/** Access the embedding engine (may be undefined if not configured). */
|
|
56868
|
+
getEmbeddingEngine() {
|
|
56869
|
+
return this.embeddingEngine;
|
|
56870
|
+
}
|
|
56871
|
+
/**
|
|
56872
|
+
* Search memos by vector similarity. Returns memos sorted by cosine
|
|
56873
|
+
* similarity (highest first). Falls back to empty if no embeddings exist.
|
|
56874
|
+
*/
|
|
56875
|
+
async searchByVector(queryEmbedding, options) {
|
|
56876
|
+
await this.init();
|
|
56877
|
+
if (this.db === void 0) return [];
|
|
56878
|
+
const rows = this.db.prepare("SELECT memory_id, embedding_json FROM memory_embeddings ORDER BY created_at DESC").all();
|
|
56879
|
+
if (rows.length === 0) return [];
|
|
56880
|
+
const limit = options?.candidateLimit ?? 200;
|
|
56881
|
+
const projectDir = options?.projectDir;
|
|
56882
|
+
const scored = [];
|
|
56883
|
+
for (const row of rows) try {
|
|
56884
|
+
const vec = new Float32Array(JSON.parse(row.embedding_json));
|
|
56885
|
+
const similarity = this.embeddingEngine?.cosineSimilarity(queryEmbedding, vec) ?? 0;
|
|
56886
|
+
if (similarity > 0) scored.push({
|
|
56887
|
+
id: row.memory_id,
|
|
56888
|
+
score: similarity
|
|
56889
|
+
});
|
|
56890
|
+
} catch {}
|
|
56891
|
+
scored.sort((a, b) => b.score - a.score);
|
|
56892
|
+
const topScored = scored.slice(0, limit);
|
|
56893
|
+
const results = [];
|
|
56894
|
+
for (const { id, score } of topScored) {
|
|
56895
|
+
const row = this.db.prepare("SELECT * FROM memos WHERE id = ?").get(id);
|
|
56896
|
+
if (row !== void 0) {
|
|
56897
|
+
if (projectDir !== void 0 && row["project_dir"] !== projectDir && row["project_dir"] !== "") continue;
|
|
56898
|
+
results.push({
|
|
56899
|
+
memo: rowToMemo(row),
|
|
56900
|
+
score
|
|
56901
|
+
});
|
|
56902
|
+
}
|
|
56903
|
+
}
|
|
56904
|
+
return results;
|
|
56905
|
+
}
|
|
56906
|
+
/**
|
|
56907
|
+
* Schedule async embedding generation for a memo. Debounced — the actual
|
|
56908
|
+
* batch flush runs after a short quiet period. Never blocks the caller.
|
|
56909
|
+
*/
|
|
56910
|
+
scheduleEmbedding(memo) {
|
|
56911
|
+
if (this.embeddingEngine === void 0 || !this.embeddingEngine.available) return;
|
|
56912
|
+
this.embeddingQueue.add(memo.id);
|
|
56913
|
+
if (this.embeddingTimer !== void 0) clearTimeout(this.embeddingTimer);
|
|
56914
|
+
this.embeddingTimer = setTimeout(() => {
|
|
56915
|
+
this.flushEmbeddings();
|
|
56916
|
+
}, 2e3);
|
|
56917
|
+
}
|
|
56918
|
+
async flushEmbeddings() {
|
|
56919
|
+
if (this.embeddingFlushing || this.embeddingEngine === void 0 || !this.embeddingEngine.available) return;
|
|
56920
|
+
const ids = [...this.embeddingQueue];
|
|
56921
|
+
this.embeddingQueue.clear();
|
|
56922
|
+
if (ids.length === 0) return;
|
|
56923
|
+
this.embeddingFlushing = true;
|
|
56924
|
+
try {
|
|
56925
|
+
await this.init();
|
|
56926
|
+
if (this.db === void 0) return;
|
|
56927
|
+
const pending = [];
|
|
56928
|
+
for (const id of ids) {
|
|
56929
|
+
if (this.db.prepare("SELECT id FROM memory_embeddings WHERE memory_id = ?").get(id) !== void 0) continue;
|
|
56930
|
+
const memo = await this.get(id);
|
|
56931
|
+
if (memo !== void 0) pending.push({
|
|
56932
|
+
id,
|
|
56933
|
+
text: buildEmbeddingText(memo)
|
|
56934
|
+
});
|
|
56935
|
+
}
|
|
56936
|
+
if (pending.length === 0) return;
|
|
56937
|
+
const vectors = await this.embeddingEngine.embedBatch(pending.map((p) => p.text));
|
|
56938
|
+
if (vectors === null || vectors.length !== pending.length) return;
|
|
56939
|
+
const insert = this.db.prepare("INSERT OR REPLACE INTO memory_embeddings (memory_id, embedding_json, model, created_at) VALUES (?, ?, ?, ?)");
|
|
56940
|
+
const now = Date.now();
|
|
56941
|
+
this.db.exec("BEGIN TRANSACTION");
|
|
56942
|
+
try {
|
|
56943
|
+
for (let i = 0; i < pending.length; i++) insert.run(pending[i].id, JSON.stringify([...vectors[i]]), "bge-small-zh-v1.5", now);
|
|
56944
|
+
this.db.exec("COMMIT");
|
|
56945
|
+
} catch {
|
|
56946
|
+
this.db.exec("ROLLBACK");
|
|
56947
|
+
}
|
|
56948
|
+
} catch {} finally {
|
|
56949
|
+
this.embeddingFlushing = false;
|
|
56950
|
+
}
|
|
56951
|
+
}
|
|
56739
56952
|
listAll(limit, offset, projectDir) {
|
|
56740
56953
|
if (this.db === void 0) return {
|
|
56741
56954
|
rows: [],
|
|
@@ -56991,10 +57204,55 @@ function findDuplicateGroups(memos) {
|
|
|
56991
57204
|
}
|
|
56992
57205
|
return groups;
|
|
56993
57206
|
}
|
|
57207
|
+
/**
|
|
57208
|
+
* Split a whatFailed / whatWorked field into individual claims.
|
|
57209
|
+
* Handles both `;` and `;` separators.
|
|
57210
|
+
*/
|
|
57211
|
+
function splitClaims(text) {
|
|
57212
|
+
if (!text || text === "none" || text === "无") return [];
|
|
57213
|
+
return text.split(/[;;]/).map((s) => s.trim()).filter((s) => s.length > 0);
|
|
57214
|
+
}
|
|
57215
|
+
/**
|
|
57216
|
+
* Extract significant words for contradiction detection:
|
|
57217
|
+
* ASCII words >= 3 chars + CJK 2-grams.
|
|
57218
|
+
*/
|
|
57219
|
+
function extractSignificantWords(text) {
|
|
57220
|
+
const words = [];
|
|
57221
|
+
const lower = text.toLowerCase();
|
|
57222
|
+
for (const m of lower.matchAll(/[a-z0-9]+/g)) if (m[0].length >= 3) words.push(m[0]);
|
|
57223
|
+
for (const m of lower.matchAll(/[一-鿿]+/g)) {
|
|
57224
|
+
const run = m[0];
|
|
57225
|
+
for (let i = 0; i < run.length - 1; i++) words.push(run.slice(i, i + 2));
|
|
57226
|
+
}
|
|
57227
|
+
return words;
|
|
57228
|
+
}
|
|
57229
|
+
/**
|
|
57230
|
+
* Check whether `claim` overlaps with any claim in `against`.
|
|
57231
|
+
* 2+ shared significant words = overlap; 1 word is enough for single-word claims.
|
|
57232
|
+
*/
|
|
57233
|
+
function claimsOverlap(claim, against) {
|
|
57234
|
+
const words = extractSignificantWords(claim);
|
|
57235
|
+
if (words.length === 0) return false;
|
|
57236
|
+
for (const other of against) {
|
|
57237
|
+
const otherLower = other.toLowerCase();
|
|
57238
|
+
const matched = words.filter((w) => otherLower.includes(w)).length;
|
|
57239
|
+
if (matched >= 2 || matched >= 1 && words.length === 1) return true;
|
|
57240
|
+
}
|
|
57241
|
+
return false;
|
|
57242
|
+
}
|
|
56994
57243
|
function buildDuplicateGroup(cluster) {
|
|
56995
|
-
const
|
|
56996
|
-
const
|
|
56997
|
-
const
|
|
57244
|
+
const sorted = [...cluster].toSorted((a, b) => b.recordedAt - a.recordedAt);
|
|
57245
|
+
const newest = sorted[0];
|
|
57246
|
+
const mid = Math.ceil(sorted.length / 2);
|
|
57247
|
+
const newer = sorted.slice(0, mid);
|
|
57248
|
+
const newerFailedClaims = new Set(newer.flatMap((m) => splitClaims(m.whatFailed)));
|
|
57249
|
+
const newerWorkedClaims = new Set(newer.flatMap((m) => splitClaims(m.whatWorked)));
|
|
57250
|
+
const failures = /* @__PURE__ */ new Set();
|
|
57251
|
+
const successes = /* @__PURE__ */ new Set();
|
|
57252
|
+
for (const memo of cluster) {
|
|
57253
|
+
for (const claim of splitClaims(memo.whatFailed)) if (!claimsOverlap(claim, newerWorkedClaims)) failures.add(claim);
|
|
57254
|
+
for (const claim of splitClaims(memo.whatWorked)) if (!claimsOverlap(claim, newerFailedClaims)) successes.add(claim);
|
|
57255
|
+
}
|
|
56998
57256
|
const bestOutcome = cluster.map((m) => m.outcome).some((o) => o.includes("完成") || o.toLowerCase().includes("done")) ? "完成" : newest.outcome;
|
|
56999
57257
|
return {
|
|
57000
57258
|
memos: cluster,
|
|
@@ -57410,16 +57668,31 @@ var MemoryLookupTool = class {
|
|
|
57410
57668
|
});
|
|
57411
57669
|
if (candidates.length === 0) for await (const memo of store.read({ projectDir })) candidates.push(memo);
|
|
57412
57670
|
const all = candidates.map(toSummary);
|
|
57413
|
-
|
|
57414
|
-
|
|
57415
|
-
|
|
57416
|
-
|
|
57671
|
+
let vectorScores;
|
|
57672
|
+
const engine = store.getEmbeddingEngine();
|
|
57673
|
+
if (engine?.available && store.hasEmbeddings()) try {
|
|
57674
|
+
const queryVecs = await engine.embedBatch([query]);
|
|
57675
|
+
if (queryVecs !== null && queryVecs.length > 0) {
|
|
57676
|
+
const vectorResults = await store.searchByVector(queryVecs[0], {
|
|
57677
|
+
candidateLimit,
|
|
57678
|
+
projectDir
|
|
57679
|
+
});
|
|
57680
|
+
if (vectorResults.length > 0) vectorScores = new Map(vectorResults.map((r) => [r.memo.id, r.score]));
|
|
57681
|
+
}
|
|
57682
|
+
} catch {}
|
|
57683
|
+
if (all.length === 0) {
|
|
57684
|
+
if (vectorScores === void 0 || vectorScores.size === 0) return {
|
|
57685
|
+
isError: false,
|
|
57686
|
+
output: "No memory memos found. The experience store is empty."
|
|
57687
|
+
};
|
|
57688
|
+
}
|
|
57417
57689
|
const currentProjectDir = this.agent.config.cwd;
|
|
57418
57690
|
const ranked = rankMemos(all, query, {
|
|
57419
57691
|
minScore,
|
|
57420
57692
|
maxResults: limit,
|
|
57421
57693
|
currentProjectDir,
|
|
57422
|
-
projectTagCloud: scope === "global" ? buildProjectTagCloud(all, currentProjectDir) : void 0
|
|
57694
|
+
projectTagCloud: scope === "global" ? buildProjectTagCloud(all, currentProjectDir) : void 0,
|
|
57695
|
+
vectorScores
|
|
57423
57696
|
});
|
|
57424
57697
|
if (ranked.length === 0) return {
|
|
57425
57698
|
isError: false,
|
|
@@ -65555,7 +65828,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65555
65828
|
};
|
|
65556
65829
|
return _setPrototypeOf(o, p);
|
|
65557
65830
|
}
|
|
65558
|
-
var path$
|
|
65831
|
+
var path$8 = __require("path");
|
|
65559
65832
|
module.exports = /*#__PURE__*/ function(_EmitterObj) {
|
|
65560
65833
|
_inheritsLoose(Loader, _EmitterObj);
|
|
65561
65834
|
function Loader() {
|
|
@@ -65563,7 +65836,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65563
65836
|
}
|
|
65564
65837
|
var _proto = Loader.prototype;
|
|
65565
65838
|
_proto.resolve = function resolve(from, to) {
|
|
65566
|
-
return path$
|
|
65839
|
+
return path$8.resolve(path$8.dirname(from), to);
|
|
65567
65840
|
};
|
|
65568
65841
|
_proto.isRelative = function isRelative(filename) {
|
|
65569
65842
|
return filename.indexOf("./") === 0 || filename.indexOf("../") === 0;
|
|
@@ -65622,8 +65895,8 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65622
65895
|
};
|
|
65623
65896
|
return _setPrototypeOf(o, p);
|
|
65624
65897
|
}
|
|
65625
|
-
var fs$
|
|
65626
|
-
var path$
|
|
65898
|
+
var fs$9 = __require("fs");
|
|
65899
|
+
var path$7 = __require("path");
|
|
65627
65900
|
var Loader = require_loader();
|
|
65628
65901
|
var PrecompiledLoader = require_precompiled_loader().PrecompiledLoader;
|
|
65629
65902
|
var chokidar;
|
|
@@ -65638,7 +65911,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65638
65911
|
_this.noCache = !!opts.noCache;
|
|
65639
65912
|
if (searchPaths) {
|
|
65640
65913
|
searchPaths = Array.isArray(searchPaths) ? searchPaths : [searchPaths];
|
|
65641
|
-
_this.searchPaths = searchPaths.map(path$
|
|
65914
|
+
_this.searchPaths = searchPaths.map(path$7.normalize);
|
|
65642
65915
|
} else _this.searchPaths = ["."];
|
|
65643
65916
|
if (opts.watch) {
|
|
65644
65917
|
try {
|
|
@@ -65646,10 +65919,10 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65646
65919
|
} catch (e) {
|
|
65647
65920
|
throw new Error("watch requires chokidar to be installed");
|
|
65648
65921
|
}
|
|
65649
|
-
var paths = _this.searchPaths.filter(fs$
|
|
65922
|
+
var paths = _this.searchPaths.filter(fs$9.existsSync);
|
|
65650
65923
|
var watcher = chokidar.watch(paths);
|
|
65651
65924
|
watcher.on("all", function(event, fullname) {
|
|
65652
|
-
fullname = path$
|
|
65925
|
+
fullname = path$7.resolve(fullname);
|
|
65653
65926
|
if (event === "change" && fullname in _this.pathsToNames) _this.emit("update", _this.pathsToNames[fullname], fullname);
|
|
65654
65927
|
});
|
|
65655
65928
|
watcher.on("error", function(error) {
|
|
@@ -65663,9 +65936,9 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65663
65936
|
var fullpath = null;
|
|
65664
65937
|
var paths = this.searchPaths;
|
|
65665
65938
|
for (var i = 0; i < paths.length; i++) {
|
|
65666
|
-
var basePath = path$
|
|
65667
|
-
var p = path$
|
|
65668
|
-
if (p.indexOf(basePath) === 0 && fs$
|
|
65939
|
+
var basePath = path$7.resolve(paths[i]);
|
|
65940
|
+
var p = path$7.resolve(paths[i], name);
|
|
65941
|
+
if (p.indexOf(basePath) === 0 && fs$9.existsSync(p)) {
|
|
65669
65942
|
fullpath = p;
|
|
65670
65943
|
break;
|
|
65671
65944
|
}
|
|
@@ -65673,7 +65946,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65673
65946
|
if (!fullpath) return null;
|
|
65674
65947
|
this.pathsToNames[fullpath] = name;
|
|
65675
65948
|
var source = {
|
|
65676
|
-
src: fs$
|
|
65949
|
+
src: fs$9.readFileSync(fullpath, "utf-8"),
|
|
65677
65950
|
path: fullpath,
|
|
65678
65951
|
noCache: this.noCache
|
|
65679
65952
|
};
|
|
@@ -65721,7 +65994,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
65721
65994
|
}
|
|
65722
65995
|
this.pathsToNames[fullpath] = name;
|
|
65723
65996
|
var source = {
|
|
65724
|
-
src: fs$
|
|
65997
|
+
src: fs$9.readFileSync(fullpath, "utf-8"),
|
|
65725
65998
|
path: fullpath,
|
|
65726
65999
|
noCache: this.noCache
|
|
65727
66000
|
};
|
|
@@ -66023,13 +66296,13 @@ var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66023
66296
|
//#endregion
|
|
66024
66297
|
//#region ../../node_modules/.pnpm/nunjucks@3.2.4/node_modules/nunjucks/src/express-app.js
|
|
66025
66298
|
var require_express_app = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
66026
|
-
var path$
|
|
66299
|
+
var path$6 = __require("path");
|
|
66027
66300
|
module.exports = function express(env, app) {
|
|
66028
66301
|
function NunjucksView(name, opts) {
|
|
66029
66302
|
this.name = name;
|
|
66030
66303
|
this.path = name;
|
|
66031
66304
|
this.defaultEngine = opts.defaultEngine;
|
|
66032
|
-
this.ext = path$
|
|
66305
|
+
this.ext = path$6.extname(name);
|
|
66033
66306
|
if (!this.ext && !this.defaultEngine) throw new Error("No default engine was specified and no extension was provided.");
|
|
66034
66307
|
if (!this.ext) this.name += this.ext = (this.defaultEngine[0] !== "." ? "." : "") + this.defaultEngine;
|
|
66035
66308
|
}
|
|
@@ -66465,8 +66738,8 @@ var require_precompile_global = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
66465
66738
|
//#endregion
|
|
66466
66739
|
//#region ../../node_modules/.pnpm/nunjucks@3.2.4/node_modules/nunjucks/src/precompile.js
|
|
66467
66740
|
var require_precompile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
66468
|
-
var fs$
|
|
66469
|
-
var path$
|
|
66741
|
+
var fs$8 = __require("fs");
|
|
66742
|
+
var path$5 = __require("path");
|
|
66470
66743
|
var _prettifyError = require_lib$1()._prettifyError;
|
|
66471
66744
|
var compiler = require_compiler();
|
|
66472
66745
|
var Environment = require_environment().Environment;
|
|
@@ -66490,27 +66763,27 @@ var require_precompile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
66490
66763
|
var env = opts.env || new Environment([]);
|
|
66491
66764
|
var wrapper = opts.wrapper || precompileGlobal;
|
|
66492
66765
|
if (opts.isString) return precompileString(input, opts);
|
|
66493
|
-
var pathStats = fs$
|
|
66766
|
+
var pathStats = fs$8.existsSync(input) && fs$8.statSync(input);
|
|
66494
66767
|
var precompiled = [];
|
|
66495
66768
|
var templates = [];
|
|
66496
66769
|
function addTemplates(dir) {
|
|
66497
|
-
fs$
|
|
66498
|
-
var filepath = path$
|
|
66499
|
-
var subpath = filepath.substr(path$
|
|
66500
|
-
var stat = fs$
|
|
66770
|
+
fs$8.readdirSync(dir).forEach(function(file) {
|
|
66771
|
+
var filepath = path$5.join(dir, file);
|
|
66772
|
+
var subpath = filepath.substr(path$5.join(input, "/").length);
|
|
66773
|
+
var stat = fs$8.statSync(filepath);
|
|
66501
66774
|
if (stat && stat.isDirectory()) {
|
|
66502
66775
|
subpath += "/";
|
|
66503
66776
|
if (!match(subpath, opts.exclude)) addTemplates(filepath);
|
|
66504
66777
|
} else if (match(subpath, opts.include)) templates.push(filepath);
|
|
66505
66778
|
});
|
|
66506
66779
|
}
|
|
66507
|
-
if (pathStats.isFile()) precompiled.push(_precompile(fs$
|
|
66780
|
+
if (pathStats.isFile()) precompiled.push(_precompile(fs$8.readFileSync(input, "utf-8"), opts.name || input, env));
|
|
66508
66781
|
else if (pathStats.isDirectory()) {
|
|
66509
66782
|
addTemplates(input);
|
|
66510
66783
|
for (var i = 0; i < templates.length; i++) {
|
|
66511
|
-
var name = templates[i].replace(path$
|
|
66784
|
+
var name = templates[i].replace(path$5.join(input, "/"), "");
|
|
66512
66785
|
try {
|
|
66513
|
-
precompiled.push(_precompile(fs$
|
|
66786
|
+
precompiled.push(_precompile(fs$8.readFileSync(templates[i], "utf-8"), name, env));
|
|
66514
66787
|
} catch (e) {
|
|
66515
66788
|
if (opts.force) console.error(e);
|
|
66516
66789
|
else throw e;
|
|
@@ -67842,7 +68115,7 @@ while (this[Ls](this[Ie]()) && this[b].length);
|
|
|
67842
68115
|
return Pr;
|
|
67843
68116
|
}
|
|
67844
68117
|
};
|
|
67845
|
-
var $r =
|
|
68118
|
+
var $r = fs.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 {
|
|
67846
68119
|
[bt] = !1;
|
|
67847
68120
|
[m];
|
|
67848
68121
|
[U];
|
|
@@ -67868,7 +68141,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
|
|
|
67868
68141
|
throw new TypeError("this is a readable stream");
|
|
67869
68142
|
}
|
|
67870
68143
|
[ht]() {
|
|
67871
|
-
|
|
68144
|
+
fs.open(this[U], "r", (t, e) => this[Ht](t, e));
|
|
67872
68145
|
}
|
|
67873
68146
|
[Ht](t, e) {
|
|
67874
68147
|
t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
|
|
@@ -67881,7 +68154,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
|
|
|
67881
68154
|
this[J] = !0;
|
|
67882
68155
|
let t = this[Fi]();
|
|
67883
68156
|
if (t.length === 0) return process.nextTick(() => this[Ai](null, 0, t));
|
|
67884
|
-
|
|
68157
|
+
fs.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ai](e, i, r));
|
|
67885
68158
|
}
|
|
67886
68159
|
}
|
|
67887
68160
|
[Ai](t, e, i) {
|
|
@@ -67890,7 +68163,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
|
|
|
67890
68163
|
[H]() {
|
|
67891
68164
|
if (this[ot] && typeof this[m] == "number") {
|
|
67892
68165
|
let t = this[m];
|
|
67893
|
-
this[m] = void 0,
|
|
68166
|
+
this[m] = void 0, fs.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
67894
68167
|
}
|
|
67895
68168
|
}
|
|
67896
68169
|
[Ut](t) {
|
|
@@ -67913,7 +68186,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
|
|
|
67913
68186
|
[ht]() {
|
|
67914
68187
|
let t = !0;
|
|
67915
68188
|
try {
|
|
67916
|
-
this[Ht](null,
|
|
68189
|
+
this[Ht](null, fs.openSync(this[U], "r")), t = !1;
|
|
67917
68190
|
} finally {
|
|
67918
68191
|
t && this[H]();
|
|
67919
68192
|
}
|
|
@@ -67924,7 +68197,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
|
|
|
67924
68197
|
if (!this[J]) {
|
|
67925
68198
|
this[J] = !0;
|
|
67926
68199
|
do {
|
|
67927
|
-
let e = this[Fi](), i = e.length === 0 ? 0 :
|
|
68200
|
+
let e = this[Fi](), i = e.length === 0 ? 0 : fs.readSync(this[m], e, 0, e.length, null);
|
|
67928
68201
|
if (!this[ki](i, e)) break;
|
|
67929
68202
|
} while (!0);
|
|
67930
68203
|
this[J] = !1;
|
|
@@ -67937,7 +68210,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
|
|
|
67937
68210
|
[H]() {
|
|
67938
68211
|
if (this[ot] && typeof this[m] == "number") {
|
|
67939
68212
|
let t = this[m];
|
|
67940
|
-
this[m] = void 0,
|
|
68213
|
+
this[m] = void 0, fs.closeSync(t), this.emit("close");
|
|
67941
68214
|
}
|
|
67942
68215
|
}
|
|
67943
68216
|
}, tt = class extends Vr {
|
|
@@ -67978,7 +68251,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
|
|
|
67978
68251
|
this[H](), this[gt$1] = !0, this.emit("error", t);
|
|
67979
68252
|
}
|
|
67980
68253
|
[ht]() {
|
|
67981
|
-
|
|
68254
|
+
fs.open(this[U], this[j], this[se], (t, e) => this[Ht](t, e));
|
|
67982
68255
|
}
|
|
67983
68256
|
[Ht](t, e) {
|
|
67984
68257
|
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]());
|
|
@@ -67990,7 +68263,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
|
|
|
67990
68263
|
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);
|
|
67991
68264
|
}
|
|
67992
68265
|
[ve](t) {
|
|
67993
|
-
|
|
68266
|
+
fs.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
|
|
67994
68267
|
}
|
|
67995
68268
|
[Pt](t, e) {
|
|
67996
68269
|
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"))));
|
|
@@ -68006,31 +68279,31 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
|
|
|
68006
68279
|
[H]() {
|
|
68007
68280
|
if (this[ot] && typeof this[m] == "number") {
|
|
68008
68281
|
let t = this[m];
|
|
68009
|
-
this[m] = void 0,
|
|
68282
|
+
this[m] = void 0, fs.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
|
|
68010
68283
|
}
|
|
68011
68284
|
}
|
|
68012
68285
|
}, Wt = class extends tt {
|
|
68013
68286
|
[ht]() {
|
|
68014
68287
|
let t;
|
|
68015
68288
|
if (this[Me] && this[j] === "r+") try {
|
|
68016
|
-
t =
|
|
68289
|
+
t = fs.openSync(this[U], this[j], this[se]);
|
|
68017
68290
|
} catch (e) {
|
|
68018
68291
|
if (e?.code === "ENOENT") return this[j] = "w", this[ht]();
|
|
68019
68292
|
throw e;
|
|
68020
68293
|
}
|
|
68021
|
-
else t =
|
|
68294
|
+
else t = fs.openSync(this[U], this[j], this[se]);
|
|
68022
68295
|
this[Ht](null, t);
|
|
68023
68296
|
}
|
|
68024
68297
|
[H]() {
|
|
68025
68298
|
if (this[ot] && typeof this[m] == "number") {
|
|
68026
68299
|
let t = this[m];
|
|
68027
|
-
this[m] = void 0,
|
|
68300
|
+
this[m] = void 0, fs.closeSync(t), this.emit("close");
|
|
68028
68301
|
}
|
|
68029
68302
|
}
|
|
68030
68303
|
[ve](t) {
|
|
68031
68304
|
let e = !0;
|
|
68032
68305
|
try {
|
|
68033
|
-
this[Pt](null,
|
|
68306
|
+
this[Pt](null, fs.writeSync(this[m], t, 0, t.length, this[nt])), e = !1;
|
|
68034
68307
|
} finally {
|
|
68035
68308
|
if (e) try {
|
|
68036
68309
|
this[H]();
|
|
@@ -68979,7 +69252,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
68979
69252
|
let [o, h] = ce(this.path);
|
|
68980
69253
|
o && typeof h == "string" && (this.path = h, r = o);
|
|
68981
69254
|
}
|
|
68982
|
-
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 ||
|
|
69255
|
+
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 || path.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, {
|
|
68983
69256
|
entry: this,
|
|
68984
69257
|
path: r + this.path
|
|
68985
69258
|
});
|
|
@@ -68993,7 +69266,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
68993
69266
|
return t === "error" && (this.#t = !0), super.emit(t, ...e);
|
|
68994
69267
|
}
|
|
68995
69268
|
[ts]() {
|
|
68996
|
-
|
|
69269
|
+
fs.lstat(this.absolute, (t, e) => {
|
|
68997
69270
|
if (t) return this.emit("error", t);
|
|
68998
69271
|
this[ii](e);
|
|
68999
69272
|
});
|
|
@@ -69052,7 +69325,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
69052
69325
|
this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
|
|
69053
69326
|
}
|
|
69054
69327
|
[ji]() {
|
|
69055
|
-
|
|
69328
|
+
fs.readlink(this.absolute, (t, e) => {
|
|
69056
69329
|
if (t) return this.emit("error", t);
|
|
69057
69330
|
this[is$2](e);
|
|
69058
69331
|
});
|
|
@@ -69062,7 +69335,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
69062
69335
|
}
|
|
69063
69336
|
[js](t) {
|
|
69064
69337
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
69065
|
-
this.type = "Link", this.linkpath = f(
|
|
69338
|
+
this.type = "Link", this.linkpath = f(path.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
|
|
69066
69339
|
}
|
|
69067
69340
|
[Qs]() {
|
|
69068
69341
|
if (!this.stat) throw new Error("cannot create file entry without stat");
|
|
@@ -69075,7 +69348,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
69075
69348
|
this[ss]();
|
|
69076
69349
|
}
|
|
69077
69350
|
[ss]() {
|
|
69078
|
-
|
|
69351
|
+
fs.open(this.absolute, "r", (t, e) => {
|
|
69079
69352
|
if (t) return this.emit("error", t);
|
|
69080
69353
|
this[rs](e);
|
|
69081
69354
|
});
|
|
@@ -69090,13 +69363,13 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
69090
69363
|
[ei]() {
|
|
69091
69364
|
let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
|
|
69092
69365
|
if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
|
|
69093
|
-
|
|
69366
|
+
fs.read(t, e, i, r, n, (o, h) => {
|
|
69094
69367
|
if (o) return this[pt](() => this.emit("error", o));
|
|
69095
69368
|
this[es](h);
|
|
69096
69369
|
});
|
|
69097
69370
|
}
|
|
69098
69371
|
[pt](t = () => {}) {
|
|
69099
|
-
this.fd !== void 0 &&
|
|
69372
|
+
this.fd !== void 0 && fs.close(this.fd, t);
|
|
69100
69373
|
}
|
|
69101
69374
|
[es](t) {
|
|
69102
69375
|
if (t <= 0 && this.remain > 0) {
|
|
@@ -69138,20 +69411,20 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
69138
69411
|
}, ri = class extends de {
|
|
69139
69412
|
sync = !0;
|
|
69140
69413
|
[ts]() {
|
|
69141
|
-
this[ii](
|
|
69414
|
+
this[ii](fs.lstatSync(this.absolute));
|
|
69142
69415
|
}
|
|
69143
69416
|
[ji]() {
|
|
69144
|
-
this[is$2](
|
|
69417
|
+
this[is$2](fs.readlinkSync(this.absolute));
|
|
69145
69418
|
}
|
|
69146
69419
|
[ss]() {
|
|
69147
|
-
this[rs](
|
|
69420
|
+
this[rs](fs.openSync(this.absolute, "r"));
|
|
69148
69421
|
}
|
|
69149
69422
|
[ei]() {
|
|
69150
69423
|
let t = !0;
|
|
69151
69424
|
try {
|
|
69152
69425
|
let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
|
|
69153
69426
|
if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
|
|
69154
|
-
let h =
|
|
69427
|
+
let h = fs.readSync(e, i, r, n, o);
|
|
69155
69428
|
this[es](h), t = !1;
|
|
69156
69429
|
} finally {
|
|
69157
69430
|
if (t) try {
|
|
@@ -69163,7 +69436,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
|
|
|
69163
69436
|
t();
|
|
69164
69437
|
}
|
|
69165
69438
|
[pt](t = () => {}) {
|
|
69166
|
-
this.fd !== void 0 &&
|
|
69439
|
+
this.fd !== void 0 && fs.closeSync(this.fd), t();
|
|
69167
69440
|
}
|
|
69168
69441
|
}, ni = class extends A {
|
|
69169
69442
|
blockLen = 0;
|
|
@@ -69482,7 +69755,7 @@ var mi = class {
|
|
|
69482
69755
|
return t instanceof Yt ? this[ir](t) : this[li](t), this.flowing;
|
|
69483
69756
|
}
|
|
69484
69757
|
[ir](t) {
|
|
69485
|
-
let e = f(
|
|
69758
|
+
let e = f(path.resolve(this.cwd, t.path));
|
|
69486
69759
|
if (!this.filter(t.path, t)) t.resume();
|
|
69487
69760
|
else {
|
|
69488
69761
|
let i = new mi(t.path, e);
|
|
@@ -69491,12 +69764,12 @@ var mi = class {
|
|
|
69491
69764
|
this[kt]();
|
|
69492
69765
|
}
|
|
69493
69766
|
[li](t) {
|
|
69494
|
-
let e = f(
|
|
69767
|
+
let e = f(path.resolve(this.cwd, t));
|
|
69495
69768
|
this[W].push(new mi(t, e)), this[kt]();
|
|
69496
69769
|
}
|
|
69497
69770
|
[ls](t) {
|
|
69498
69771
|
t.pending = !0, this[G] += 1;
|
|
69499
|
-
|
|
69772
|
+
fs[this.follow ? "stat" : "lstat"](t.absolute, (i, r) => {
|
|
69500
69773
|
t.pending = !1, this[G] -= 1, i ? this.emit("error", i) : this[ai](t, r);
|
|
69501
69774
|
});
|
|
69502
69775
|
}
|
|
@@ -69510,7 +69783,7 @@ var mi = class {
|
|
|
69510
69783
|
this[kt]();
|
|
69511
69784
|
}
|
|
69512
69785
|
[cs](t) {
|
|
69513
|
-
t.pending = !0, this[G] += 1,
|
|
69786
|
+
t.pending = !0, this[G] += 1, fs.readdir(t.absolute, (e, i) => {
|
|
69514
69787
|
if (t.pending = !1, this[G] -= 1, e) return this.emit("error", e);
|
|
69515
69788
|
this[ci](t, i);
|
|
69516
69789
|
});
|
|
@@ -69623,10 +69896,10 @@ var mi = class {
|
|
|
69623
69896
|
resume() {}
|
|
69624
69897
|
[ls](t) {
|
|
69625
69898
|
let e = this.follow ? "statSync" : "lstatSync";
|
|
69626
|
-
this[ai](t,
|
|
69899
|
+
this[ai](t, fs[e](t.absolute));
|
|
69627
69900
|
}
|
|
69628
69901
|
[cs](t) {
|
|
69629
|
-
this[ci](t,
|
|
69902
|
+
this[ci](t, fs.readdirSync(t.absolute));
|
|
69630
69903
|
}
|
|
69631
69904
|
[fi](t) {
|
|
69632
69905
|
let e = t.entry, i = this.zip;
|
|
@@ -69653,7 +69926,7 @@ var mi = class {
|
|
|
69653
69926
|
}, hr = (s, t) => {
|
|
69654
69927
|
t.forEach((e) => {
|
|
69655
69928
|
e.charAt(0) === "@" ? Ct({
|
|
69656
|
-
file: path.resolve(s.cwd, e.slice(1)),
|
|
69929
|
+
file: path$1.resolve(s.cwd, e.slice(1)),
|
|
69657
69930
|
sync: !0,
|
|
69658
69931
|
noResume: !0,
|
|
69659
69932
|
onReadEntry: (i) => s.add(i)
|
|
@@ -69661,7 +69934,7 @@ var mi = class {
|
|
|
69661
69934
|
}), s.end();
|
|
69662
69935
|
}, ar = async (s, t) => {
|
|
69663
69936
|
for (let e of t) e.charAt(0) === "@" ? await Ct({
|
|
69664
|
-
file: path.resolve(String(s.cwd), e.slice(1)),
|
|
69937
|
+
file: path$1.resolve(String(s.cwd), e.slice(1)),
|
|
69665
69938
|
noResume: !0,
|
|
69666
69939
|
onReadEntry: (i) => {
|
|
69667
69940
|
s.add(i);
|
|
@@ -69678,7 +69951,7 @@ var mi = class {
|
|
|
69678
69951
|
K(Hn, Wn, Gn, Zn, (s, t) => {
|
|
69679
69952
|
if (!t?.length) throw new TypeError("no paths specified to add to archive");
|
|
69680
69953
|
});
|
|
69681
|
-
var dr = (process.env.__FAKE_PLATFORM__ || process.platform) === "win32", { O_CREAT: ur, O_NOFOLLOW: lr, O_TRUNC: mr, O_WRONLY: pr } =
|
|
69954
|
+
var dr = (process.env.__FAKE_PLATFORM__ || process.platform) === "win32", { O_CREAT: ur, O_NOFOLLOW: lr, O_TRUNC: mr, O_WRONLY: pr } = fs.constants, Er = Number(process.env.__FAKE_FS_O_FILENAME__) || fs.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$7 = cr !== null ? () => cr : Vn ? (s) => s < $n ? Xn : "w" : () => "w";
|
|
69682
69955
|
var ds = (s, t, e) => {
|
|
69683
69956
|
try {
|
|
69684
69957
|
return Vt.lchownSync(s, t, e);
|
|
@@ -69690,11 +69963,11 @@ var ds = (s, t, e) => {
|
|
|
69690
69963
|
i(r && r?.code !== "ENOENT" ? r : null);
|
|
69691
69964
|
});
|
|
69692
69965
|
}, qn = (s, t, e, i, r) => {
|
|
69693
|
-
if (t.isDirectory()) us(path.resolve(s, t.name), e, i, (n) => {
|
|
69966
|
+
if (t.isDirectory()) us(path$1.resolve(s, t.name), e, i, (n) => {
|
|
69694
69967
|
if (n) return r(n);
|
|
69695
|
-
pi(path.resolve(s, t.name), e, i, r);
|
|
69968
|
+
pi(path$1.resolve(s, t.name), e, i, r);
|
|
69696
69969
|
});
|
|
69697
|
-
else pi(path.resolve(s, t.name), e, i, r);
|
|
69970
|
+
else pi(path$1.resolve(s, t.name), e, i, r);
|
|
69698
69971
|
}, us = (s, t, e, i) => {
|
|
69699
69972
|
Vt.readdir(s, { withFileTypes: !0 }, (r, n) => {
|
|
69700
69973
|
if (r) {
|
|
@@ -69711,7 +69984,7 @@ var ds = (s, t, e) => {
|
|
|
69711
69984
|
for (let l of n) qn(s, l, t, e, a);
|
|
69712
69985
|
});
|
|
69713
69986
|
}, Qn = (s, t, e, i) => {
|
|
69714
|
-
t.isDirectory() && ms(path.resolve(s, t.name), e, i), ds(path.resolve(s, t.name), e, i);
|
|
69987
|
+
t.isDirectory() && ms(path$1.resolve(s, t.name), e, i), ds(path$1.resolve(s, t.name), e, i);
|
|
69715
69988
|
}, ms = (s, t, e) => {
|
|
69716
69989
|
let i;
|
|
69717
69990
|
try {
|
|
@@ -69762,10 +70035,10 @@ var jn = (s, t) => {
|
|
|
69762
70035
|
mode: r,
|
|
69763
70036
|
recursive: !0
|
|
69764
70037
|
}).then((E) => S(null, E ?? void 0), S);
|
|
69765
|
-
ps(d, f(path.relative(d, s)).split("/"), r, c, d, void 0, S);
|
|
70038
|
+
ps(d, f(path$1.relative(d, s)).split("/"), r, c, d, void 0, S);
|
|
69766
70039
|
}, ps = (s, t, e, i, r, n, o) => {
|
|
69767
70040
|
if (t.length === 0) return o(null, n);
|
|
69768
|
-
let h = t.shift(), a = f(path.resolve(s + "/" + h));
|
|
70041
|
+
let h = t.shift(), a = f(path$1.resolve(s + "/" + h));
|
|
69769
70042
|
Vt.mkdir(a, e, Sr(a, t, e, i, r, n, o));
|
|
69770
70043
|
}, Sr = (s, t, e, i, r, n, o) => (h) => {
|
|
69771
70044
|
h ? Vt.lstat(s, (a, l) => {
|
|
@@ -69799,9 +70072,9 @@ var jn = (s, t) => {
|
|
|
69799
70072
|
mode: i,
|
|
69800
70073
|
recursive: !0
|
|
69801
70074
|
}) ?? void 0);
|
|
69802
|
-
let T = f(path.relative(c, s)).split("/"), N;
|
|
70075
|
+
let T = f(path$1.relative(c, s)).split("/"), N;
|
|
69803
70076
|
for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
|
|
69804
|
-
x = f(path.resolve(x));
|
|
70077
|
+
x = f(path$1.resolve(x));
|
|
69805
70078
|
try {
|
|
69806
70079
|
Vt.mkdirSync(x, i), N = N || x;
|
|
69807
70080
|
} catch {
|
|
@@ -69945,7 +70218,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
69945
70218
|
if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
|
|
69946
70219
|
this.uid = t.uid, this.gid = t.gid, this.setOwner = !0;
|
|
69947
70220
|
} else this.uid = void 0, this.gid = void 0, this.setOwner = !1;
|
|
69948
|
-
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));
|
|
70221
|
+
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$1.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));
|
|
69949
70222
|
}
|
|
69950
70223
|
warn(t, e, i = {}) {
|
|
69951
70224
|
return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = !1), super.warn(t, e, i);
|
|
@@ -69962,7 +70235,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
69962
70235
|
entry: t,
|
|
69963
70236
|
[e]: i
|
|
69964
70237
|
}), !1;
|
|
69965
|
-
let a = path.posix.dirname(t.path), l = path.posix.normalize(path.posix.join(a, h.join("/")));
|
|
70238
|
+
let a = path$1.posix.dirname(t.path), l = path$1.posix.normalize(path$1.posix.join(a, h.join("/")));
|
|
69966
70239
|
if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, {
|
|
69967
70240
|
entry: t,
|
|
69968
70241
|
[e]: i
|
|
@@ -69991,7 +70264,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
69991
70264
|
maxDepth: this.maxDepth
|
|
69992
70265
|
}), !1;
|
|
69993
70266
|
if (!this[ws](t, "path") || !this[ws](t, "linkpath")) return !1;
|
|
69994
|
-
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", {
|
|
70267
|
+
if (t.absolute = path$1.isAbsolute(t.path) ? f(path$1.resolve(t.path)) : f(path$1.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", {
|
|
69995
70268
|
entry: t,
|
|
69996
70269
|
path: f(t.path),
|
|
69997
70270
|
resolvedPath: t.absolute,
|
|
@@ -69999,9 +70272,9 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
69999
70272
|
}), !1;
|
|
70000
70273
|
if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return !1;
|
|
70001
70274
|
if (this.win32) {
|
|
70002
|
-
let { root: r } = path.win32.parse(String(t.absolute));
|
|
70275
|
+
let { root: r } = path$1.win32.parse(String(t.absolute));
|
|
70003
70276
|
t.absolute = r + Qi(String(t.absolute).slice(r.length));
|
|
70004
|
-
let { root: n } = path.win32.parse(t.path);
|
|
70277
|
+
let { root: n } = path$1.win32.parse(t.path);
|
|
70005
70278
|
t.path = n + Qi(t.path.slice(n.length));
|
|
70006
70279
|
}
|
|
70007
70280
|
return !0;
|
|
@@ -70046,7 +70319,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
70046
70319
|
}
|
|
70047
70320
|
[bs](t, e) {
|
|
70048
70321
|
let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), {
|
|
70049
|
-
flags: fs$
|
|
70322
|
+
flags: fs$7(t.size),
|
|
70050
70323
|
mode: i,
|
|
70051
70324
|
autoClose: !1
|
|
70052
70325
|
});
|
|
@@ -70098,13 +70371,13 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
70098
70371
|
t.unsupported = !0, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
|
|
70099
70372
|
}
|
|
70100
70373
|
[xr](t, e) {
|
|
70101
|
-
let i = f(path.relative(this.cwd, path.resolve(path.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
|
|
70374
|
+
let i = f(path$1.relative(this.cwd, path$1.resolve(path$1.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
|
|
70102
70375
|
this[Re](t, this.cwd, i, () => this[Ri](t, String(t.linkpath), "symlink", e), (r) => {
|
|
70103
70376
|
this[O](r, t), e();
|
|
70104
70377
|
});
|
|
70105
70378
|
}
|
|
70106
70379
|
[Lr](t, e) {
|
|
70107
|
-
let i = f(path.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
|
|
70380
|
+
let i = f(path$1.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
|
|
70108
70381
|
this[Re](t, this.cwd, r, () => this[Ri](t, i, "link", e), (n) => {
|
|
70109
70382
|
this[O](n, t), e();
|
|
70110
70383
|
});
|
|
@@ -70112,10 +70385,10 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
70112
70385
|
[Re](t, e, i, r, n) {
|
|
70113
70386
|
let o = i.shift();
|
|
70114
70387
|
if (this.preservePaths || o === void 0) return r();
|
|
70115
|
-
let h = path.resolve(e, o);
|
|
70388
|
+
let h = path$1.resolve(e, o);
|
|
70116
70389
|
Vt.lstat(h, (a, l) => {
|
|
70117
70390
|
if (a) return r();
|
|
70118
|
-
if (l?.isSymbolicLink()) return n(new St(h, path.resolve(h, i.join("/"))));
|
|
70391
|
+
if (l?.isSymbolicLink()) return n(new St(h, path$1.resolve(h, i.join("/"))));
|
|
70119
70392
|
this[Re](t, h, i, r, n);
|
|
70120
70393
|
});
|
|
70121
70394
|
}
|
|
@@ -70149,7 +70422,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
70149
70422
|
});
|
|
70150
70423
|
}, n = () => {
|
|
70151
70424
|
if (t.absolute !== this.cwd) {
|
|
70152
|
-
let h = f(path.dirname(String(t.absolute)));
|
|
70425
|
+
let h = f(path$1.dirname(String(t.absolute)));
|
|
70153
70426
|
if (h !== this.cwd) return this[yt](h, this.dmode, (a) => {
|
|
70154
70427
|
if (a) {
|
|
70155
70428
|
this[O](a, t), i();
|
|
@@ -70217,7 +70490,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
70217
70490
|
this[Oe] = !0;
|
|
70218
70491
|
}
|
|
70219
70492
|
if (t.absolute !== this.cwd) {
|
|
70220
|
-
let n = f(path.dirname(String(t.absolute)));
|
|
70493
|
+
let n = f(path$1.dirname(String(t.absolute)));
|
|
70221
70494
|
if (n !== this.cwd) {
|
|
70222
70495
|
let o = this[yt](n, this.dmode);
|
|
70223
70496
|
if (o) return this[O](o, t);
|
|
@@ -70250,7 +70523,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
70250
70523
|
(h || a) && this[O](h || a, t), e();
|
|
70251
70524
|
}, n;
|
|
70252
70525
|
try {
|
|
70253
|
-
n = Vt.openSync(String(t.absolute), fs$
|
|
70526
|
+
n = Vt.openSync(String(t.absolute), fs$7(t.size), i);
|
|
70254
70527
|
} catch (h) {
|
|
70255
70528
|
return r(h);
|
|
70256
70529
|
}
|
|
@@ -70325,10 +70598,10 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
|
|
|
70325
70598
|
if (this.preservePaths || i.length === 0) return r();
|
|
70326
70599
|
let o = e;
|
|
70327
70600
|
for (let h of i) {
|
|
70328
|
-
o = path.resolve(o, h);
|
|
70601
|
+
o = path$1.resolve(o, h);
|
|
70329
70602
|
let [a, l] = ye(() => Vt.lstatSync(o));
|
|
70330
70603
|
if (a) return r();
|
|
70331
|
-
if (l.isSymbolicLink()) return n(new St(o, path.resolve(e, i.join("/"))));
|
|
70604
|
+
if (l.isSymbolicLink()) return n(new St(o, path$1.resolve(e, i.join("/"))));
|
|
70332
70605
|
}
|
|
70333
70606
|
r();
|
|
70334
70607
|
}
|
|
@@ -70439,7 +70712,7 @@ var uo = (s, t) => {
|
|
|
70439
70712
|
}, Eo = (s, t) => {
|
|
70440
70713
|
t.forEach((e) => {
|
|
70441
70714
|
e.charAt(0) === "@" ? Ct({
|
|
70442
|
-
file: path.resolve(s.cwd, e.slice(1)),
|
|
70715
|
+
file: path$1.resolve(s.cwd, e.slice(1)),
|
|
70443
70716
|
sync: !0,
|
|
70444
70717
|
noResume: !0,
|
|
70445
70718
|
onReadEntry: (i) => s.add(i)
|
|
@@ -70447,7 +70720,7 @@ var uo = (s, t) => {
|
|
|
70447
70720
|
}), s.end();
|
|
70448
70721
|
}, wo = async (s, t) => {
|
|
70449
70722
|
for (let e of t) e.charAt(0) === "@" ? await Ct({
|
|
70450
|
-
file: path.resolve(String(s.cwd), e.slice(1)),
|
|
70723
|
+
file: path$1.resolve(String(s.cwd), e.slice(1)),
|
|
70451
70724
|
noResume: !0,
|
|
70452
70725
|
onReadEntry: (i) => s.add(i)
|
|
70453
70726
|
}) : s.add(e);
|
|
@@ -70517,7 +70790,7 @@ var require_pend = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
70517
70790
|
//#endregion
|
|
70518
70791
|
//#region ../../node_modules/.pnpm/yauzl@3.3.1/node_modules/yauzl/fd-slicer.js
|
|
70519
70792
|
var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
70520
|
-
var fs$
|
|
70793
|
+
var fs$6 = __require("fs");
|
|
70521
70794
|
var util$2 = __require("util");
|
|
70522
70795
|
var stream = __require("stream");
|
|
70523
70796
|
var Readable = stream.Readable;
|
|
@@ -70537,7 +70810,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70537
70810
|
FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
|
|
70538
70811
|
var self = this;
|
|
70539
70812
|
self.pend.go(function(cb) {
|
|
70540
|
-
fs$
|
|
70813
|
+
fs$6.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer) {
|
|
70541
70814
|
cb();
|
|
70542
70815
|
callback(err, bytesRead, buffer);
|
|
70543
70816
|
});
|
|
@@ -70554,7 +70827,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70554
70827
|
self.refCount -= 1;
|
|
70555
70828
|
if (self.refCount < 0) throw new Error("invalid unref");
|
|
70556
70829
|
if (self.refCount > 0) return;
|
|
70557
|
-
fs$
|
|
70830
|
+
fs$6.close(self.fd, onCloseDone);
|
|
70558
70831
|
function onCloseDone(err) {
|
|
70559
70832
|
if (err) self.emit("error", err);
|
|
70560
70833
|
else self.emit("close");
|
|
@@ -70581,7 +70854,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
70581
70854
|
}
|
|
70582
70855
|
self.context.pend.go(function(cb) {
|
|
70583
70856
|
var buffer = Buffer.allocUnsafe(toRead);
|
|
70584
|
-
fs$
|
|
70857
|
+
fs$6.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
|
|
70585
70858
|
if (err) self.destroy(err);
|
|
70586
70859
|
else if (bytesRead === 0) {
|
|
70587
70860
|
self.push(null);
|
|
@@ -75220,6 +75493,35 @@ const DEFAULT_CONFIG = {
|
|
|
75220
75493
|
truncatedMarker: "[Old tool result content cleared]"
|
|
75221
75494
|
};
|
|
75222
75495
|
/**
|
|
75496
|
+
* Walk the message list and find Read tool calls whose file paths were
|
|
75497
|
+
* superseded by a later Read of the same path. Returns a map from the
|
|
75498
|
+
* superseded tool call's ID to the file path (for the marker text).
|
|
75499
|
+
*
|
|
75500
|
+
* Only considers tool results before the cutoff line — newer reads are
|
|
75501
|
+
* protected and their results are kept verbatim.
|
|
75502
|
+
*/
|
|
75503
|
+
function findSupersededPaths(messages, cutoff) {
|
|
75504
|
+
const superseded = /* @__PURE__ */ new Map();
|
|
75505
|
+
const readCalls = /* @__PURE__ */ new Map();
|
|
75506
|
+
for (let i = 0; i < messages.length; i++) {
|
|
75507
|
+
const msg = messages[i];
|
|
75508
|
+
if (msg === void 0) continue;
|
|
75509
|
+
if (msg.role === "assistant" && msg.toolCalls.length > 0) {
|
|
75510
|
+
for (const tc of msg.toolCalls) if (tc.name === "Read" && tc.id !== void 0 && tc.arguments !== void 0) {
|
|
75511
|
+
const filePath = typeof tc.arguments === "object" && tc.arguments !== null ? tc.arguments["file_path"] : void 0;
|
|
75512
|
+
if (filePath !== void 0) {
|
|
75513
|
+
for (const [prevId, prev] of readCalls) if (prev.filePath === filePath && prev.index < cutoff) superseded.set(prevId, filePath);
|
|
75514
|
+
readCalls.set(tc.id, {
|
|
75515
|
+
filePath,
|
|
75516
|
+
index: i
|
|
75517
|
+
});
|
|
75518
|
+
}
|
|
75519
|
+
}
|
|
75520
|
+
}
|
|
75521
|
+
}
|
|
75522
|
+
return superseded;
|
|
75523
|
+
}
|
|
75524
|
+
/**
|
|
75223
75525
|
* Lightweight compaction that truncates old tool results without an LLM call.
|
|
75224
75526
|
*
|
|
75225
75527
|
* When the context window is filling up (>= 50% by default), old tool result
|
|
@@ -75275,21 +75577,26 @@ var MicroCompaction = class {
|
|
|
75275
75577
|
}
|
|
75276
75578
|
/**
|
|
75277
75579
|
* Apply micro-compaction to a message list: replace old tool results
|
|
75278
|
-
* before the cutoff line with
|
|
75580
|
+
* before the cutoff line with truncated markers. Read results for files
|
|
75581
|
+
* that were re-read later get a supersede marker so the model knows
|
|
75582
|
+
* the old content is stale.
|
|
75279
75583
|
*/
|
|
75280
75584
|
compact(messages) {
|
|
75281
75585
|
const config = this.config;
|
|
75586
|
+
const superseded = findSupersededPaths(messages, this.cutoff);
|
|
75282
75587
|
const result = [];
|
|
75283
75588
|
let i = 0;
|
|
75284
75589
|
for (const msg of messages) {
|
|
75285
|
-
if (i < this.cutoff && msg.role === "tool" && msg.toolCallId !== void 0 && estimateTokensForMessages([msg]) >= config.minContentTokens)
|
|
75286
|
-
|
|
75287
|
-
|
|
75288
|
-
|
|
75289
|
-
|
|
75290
|
-
|
|
75291
|
-
|
|
75292
|
-
|
|
75590
|
+
if (i < this.cutoff && msg.role === "tool" && msg.toolCallId !== void 0 && estimateTokensForMessages([msg]) >= config.minContentTokens) {
|
|
75591
|
+
const marker = msg.toolCallId !== void 0 && superseded.has(msg.toolCallId) ? `[Superseded by a newer read of ${superseded.get(msg.toolCallId)}]` : config.truncatedMarker;
|
|
75592
|
+
result.push({
|
|
75593
|
+
...msg,
|
|
75594
|
+
content: [{
|
|
75595
|
+
type: "text",
|
|
75596
|
+
text: marker
|
|
75597
|
+
}]
|
|
75598
|
+
});
|
|
75599
|
+
} else result.push(msg);
|
|
75293
75600
|
i++;
|
|
75294
75601
|
}
|
|
75295
75602
|
return result;
|
|
@@ -93992,6 +94299,9 @@ var Agent = class {
|
|
|
93992
94299
|
if (this.memoStore !== void 0 && screamHomeDir !== void 0) {
|
|
93993
94300
|
this.memoStore.init();
|
|
93994
94301
|
MemoryMemoStore.migrateLegacyStores(screamHomeDir);
|
|
94302
|
+
try {
|
|
94303
|
+
this.memoStore.setEmbeddingEngine(createFastEmbedEngine());
|
|
94304
|
+
} catch {}
|
|
93995
94305
|
}
|
|
93996
94306
|
this.sessionMemory = new SessionMemory(this);
|
|
93997
94307
|
this.workingSet = new WorkingSet();
|
|
@@ -97513,7 +97823,7 @@ function buildMcpHttpHeaders(config, envLookup) {
|
|
|
97513
97823
|
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
97514
97824
|
module.exports = isexe;
|
|
97515
97825
|
isexe.sync = sync;
|
|
97516
|
-
var fs$
|
|
97826
|
+
var fs$4 = __require("fs");
|
|
97517
97827
|
function checkPathExt(path, options) {
|
|
97518
97828
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
97519
97829
|
if (!pathext) return true;
|
|
@@ -97530,12 +97840,12 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
97530
97840
|
return checkPathExt(path, options);
|
|
97531
97841
|
}
|
|
97532
97842
|
function isexe(path, options, cb) {
|
|
97533
|
-
fs$
|
|
97843
|
+
fs$4.stat(path, function(er, stat) {
|
|
97534
97844
|
cb(er, er ? false : checkStat(stat, path, options));
|
|
97535
97845
|
});
|
|
97536
97846
|
}
|
|
97537
97847
|
function sync(path, options) {
|
|
97538
|
-
return checkStat(fs$
|
|
97848
|
+
return checkStat(fs$4.statSync(path), path, options);
|
|
97539
97849
|
}
|
|
97540
97850
|
}));
|
|
97541
97851
|
//#endregion
|
|
@@ -97543,14 +97853,14 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
97543
97853
|
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
97544
97854
|
module.exports = isexe;
|
|
97545
97855
|
isexe.sync = sync;
|
|
97546
|
-
var fs$
|
|
97856
|
+
var fs$3 = __require("fs");
|
|
97547
97857
|
function isexe(path, options, cb) {
|
|
97548
|
-
fs$
|
|
97858
|
+
fs$3.stat(path, function(er, stat) {
|
|
97549
97859
|
cb(er, er ? false : checkStat(stat, options));
|
|
97550
97860
|
});
|
|
97551
97861
|
}
|
|
97552
97862
|
function sync(path, options) {
|
|
97553
|
-
return checkStat(fs$
|
|
97863
|
+
return checkStat(fs$3.statSync(path), options);
|
|
97554
97864
|
}
|
|
97555
97865
|
function checkStat(stat, options) {
|
|
97556
97866
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -97614,7 +97924,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
97614
97924
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
97615
97925
|
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
97616
97926
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
97617
|
-
const path$
|
|
97927
|
+
const path$4 = __require("path");
|
|
97618
97928
|
const COLON = isWindows ? ";" : ":";
|
|
97619
97929
|
const isexe = require_isexe();
|
|
97620
97930
|
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -97644,7 +97954,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
97644
97954
|
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
97645
97955
|
const ppRaw = pathEnv[i];
|
|
97646
97956
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
97647
|
-
const pCmd = path$
|
|
97957
|
+
const pCmd = path$4.join(pathPart, cmd);
|
|
97648
97958
|
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
|
|
97649
97959
|
});
|
|
97650
97960
|
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
@@ -97665,7 +97975,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
97665
97975
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
97666
97976
|
const ppRaw = pathEnv[i];
|
|
97667
97977
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
97668
|
-
const pCmd = path$
|
|
97978
|
+
const pCmd = path$4.join(pathPart, cmd);
|
|
97669
97979
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
97670
97980
|
for (let j = 0; j < pathExt.length; j++) {
|
|
97671
97981
|
const cur = p + pathExt[j];
|
|
@@ -97696,7 +98006,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
97696
98006
|
//#endregion
|
|
97697
98007
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
97698
98008
|
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
97699
|
-
const path$
|
|
98009
|
+
const path$3 = __require("path");
|
|
97700
98010
|
const which = require_which();
|
|
97701
98011
|
const getPathKey = require_path_key();
|
|
97702
98012
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -97711,12 +98021,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
97711
98021
|
try {
|
|
97712
98022
|
resolved = which.sync(parsed.command, {
|
|
97713
98023
|
path: env[getPathKey({ env })],
|
|
97714
|
-
pathExt: withoutPathExt ? path$
|
|
98024
|
+
pathExt: withoutPathExt ? path$3.delimiter : void 0
|
|
97715
98025
|
});
|
|
97716
98026
|
} catch (e) {} finally {
|
|
97717
98027
|
if (shouldSwitchCwd) process.chdir(cwd);
|
|
97718
98028
|
}
|
|
97719
|
-
if (resolved) resolved = path$
|
|
98029
|
+
if (resolved) resolved = path$3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
97720
98030
|
return resolved;
|
|
97721
98031
|
}
|
|
97722
98032
|
function resolveCommand(parsed) {
|
|
@@ -97765,16 +98075,16 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
97765
98075
|
//#endregion
|
|
97766
98076
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
97767
98077
|
var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
97768
|
-
const fs$
|
|
98078
|
+
const fs$2 = __require("fs");
|
|
97769
98079
|
const shebangCommand = require_shebang_command();
|
|
97770
98080
|
function readShebang(command) {
|
|
97771
98081
|
const size = 150;
|
|
97772
98082
|
const buffer = Buffer.alloc(size);
|
|
97773
98083
|
let fd;
|
|
97774
98084
|
try {
|
|
97775
|
-
fd = fs$
|
|
97776
|
-
fs$
|
|
97777
|
-
fs$
|
|
98085
|
+
fd = fs$2.openSync(command, "r");
|
|
98086
|
+
fs$2.readSync(fd, buffer, 0, size, 0);
|
|
98087
|
+
fs$2.closeSync(fd);
|
|
97778
98088
|
} catch (e) {}
|
|
97779
98089
|
return shebangCommand(buffer.toString());
|
|
97780
98090
|
}
|
|
@@ -97783,7 +98093,7 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
97783
98093
|
//#endregion
|
|
97784
98094
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
97785
98095
|
var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
97786
|
-
const path$
|
|
98096
|
+
const path$2 = __require("path");
|
|
97787
98097
|
const resolveCommand = require_resolveCommand();
|
|
97788
98098
|
const escape = require_escape();
|
|
97789
98099
|
const readShebang = require_readShebang();
|
|
@@ -97806,7 +98116,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
97806
98116
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
97807
98117
|
if (parsed.options.forceShell || needsShell) {
|
|
97808
98118
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
97809
|
-
parsed.command = path$
|
|
98119
|
+
parsed.command = path$2.normalize(parsed.command);
|
|
97810
98120
|
parsed.command = escape.command(parsed.command);
|
|
97811
98121
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
97812
98122
|
parsed.args = [
|
|
@@ -99506,17 +99816,17 @@ const UNSUPPORTED_RUNTIME_FIELDS = [
|
|
|
99506
99816
|
"bootstrap"
|
|
99507
99817
|
];
|
|
99508
99818
|
async function parseManifest(pluginRoot) {
|
|
99509
|
-
const rootJsonPath = path.join(pluginRoot, SCREAM_PLUGIN_ROOT_PATH);
|
|
99510
|
-
const dirJsonPath = path.join(pluginRoot, SCREAM_PLUGIN_DIR_PATH);
|
|
99511
|
-
const claudeDirJsonPath = path.join(pluginRoot, CLAUDE_PLUGIN_DIR_PATH);
|
|
99819
|
+
const rootJsonPath = path$1.join(pluginRoot, SCREAM_PLUGIN_ROOT_PATH);
|
|
99820
|
+
const dirJsonPath = path$1.join(pluginRoot, SCREAM_PLUGIN_DIR_PATH);
|
|
99821
|
+
const claudeDirJsonPath = path$1.join(pluginRoot, CLAUDE_PLUGIN_DIR_PATH);
|
|
99512
99822
|
const rootJsonExists = await isFile$1(rootJsonPath);
|
|
99513
99823
|
const dirJsonExists = await isFile$1(dirJsonPath);
|
|
99514
99824
|
const claudeDirJsonExists = await isFile$1(claudeDirJsonPath);
|
|
99515
99825
|
if (!rootJsonExists && !dirJsonExists && !claudeDirJsonExists) {
|
|
99516
|
-
const skillMdPath = path.join(pluginRoot, BARE_SKILL_PATH);
|
|
99826
|
+
const skillMdPath = path$1.join(pluginRoot, BARE_SKILL_PATH);
|
|
99517
99827
|
if (await isFile$1(skillMdPath)) return {
|
|
99518
99828
|
manifest: {
|
|
99519
|
-
name: path.basename(pluginRoot),
|
|
99829
|
+
name: path$1.basename(pluginRoot),
|
|
99520
99830
|
skills: [pluginRoot]
|
|
99521
99831
|
},
|
|
99522
99832
|
manifestKind: "bare-skill",
|
|
@@ -99526,11 +99836,11 @@ async function parseManifest(pluginRoot) {
|
|
|
99526
99836
|
const discoveredSkillDirs = await discoverSkillDirs(pluginRoot, 3);
|
|
99527
99837
|
if (discoveredSkillDirs.length > 0) return {
|
|
99528
99838
|
manifest: {
|
|
99529
|
-
name: path.basename(pluginRoot),
|
|
99839
|
+
name: path$1.basename(pluginRoot),
|
|
99530
99840
|
skills: discoveredSkillDirs
|
|
99531
99841
|
},
|
|
99532
99842
|
manifestKind: "bare-skill",
|
|
99533
|
-
manifestPath: path.join(discoveredSkillDirs[0], BARE_SKILL_PATH),
|
|
99843
|
+
manifestPath: path$1.join(discoveredSkillDirs[0], BARE_SKILL_PATH),
|
|
99534
99844
|
diagnostics: []
|
|
99535
99845
|
};
|
|
99536
99846
|
return { diagnostics: [{
|
|
@@ -99551,7 +99861,7 @@ async function parseManifest(pluginRoot) {
|
|
|
99551
99861
|
shadowedManifestPath,
|
|
99552
99862
|
diagnostics: [{
|
|
99553
99863
|
severity: "error",
|
|
99554
|
-
message: `Failed to parse ${path.relative(pluginRoot, manifestPath)}: ${error.message}`
|
|
99864
|
+
message: `Failed to parse ${path$1.relative(pluginRoot, manifestPath)}: ${error.message}`
|
|
99555
99865
|
}]
|
|
99556
99866
|
};
|
|
99557
99867
|
}
|
|
@@ -99592,7 +99902,7 @@ async function parseManifest(pluginRoot) {
|
|
|
99592
99902
|
}
|
|
99593
99903
|
let skills = await resolveSkillsField(pluginRoot, raw["skills"], diagnostics);
|
|
99594
99904
|
if (raw["skills"] === void 0) {
|
|
99595
|
-
if (await isFile$1(path.join(pluginRoot, "SKILL.md"))) skills = [pluginRoot];
|
|
99905
|
+
if (await isFile$1(path$1.join(pluginRoot, "SKILL.md"))) skills = [pluginRoot];
|
|
99596
99906
|
}
|
|
99597
99907
|
const skillInstructions = typeof raw["skillInstructions"] === "string" ? raw["skillInstructions"] : void 0;
|
|
99598
99908
|
recordUnsupportedRuntimeFields(raw, diagnostics);
|
|
@@ -99647,7 +99957,7 @@ async function resolveSkillsField(pluginRoot, raw, diagnostics) {
|
|
|
99647
99957
|
});
|
|
99648
99958
|
continue;
|
|
99649
99959
|
}
|
|
99650
|
-
const absolute = path.resolve(pluginRoot, entry);
|
|
99960
|
+
const absolute = path$1.resolve(pluginRoot, entry);
|
|
99651
99961
|
let real;
|
|
99652
99962
|
try {
|
|
99653
99963
|
real = await realpath(absolute);
|
|
@@ -99681,7 +99991,7 @@ async function resolvePluginPathField(input) {
|
|
|
99681
99991
|
});
|
|
99682
99992
|
return;
|
|
99683
99993
|
}
|
|
99684
|
-
const absolute = path.resolve(input.pluginRoot, input.value);
|
|
99994
|
+
const absolute = path$1.resolve(input.pluginRoot, input.value);
|
|
99685
99995
|
let real;
|
|
99686
99996
|
try {
|
|
99687
99997
|
real = await realpath(absolute);
|
|
@@ -99767,7 +100077,7 @@ async function normalizePluginMcpServer(input) {
|
|
|
99767
100077
|
});
|
|
99768
100078
|
if (resolvedCommand === void 0) return void 0;
|
|
99769
100079
|
command = resolvedCommand;
|
|
99770
|
-
} else if (command.includes("/") || path.isAbsolute(command)) {
|
|
100080
|
+
} else if (command.includes("/") || path$1.isAbsolute(command)) {
|
|
99771
100081
|
input.diagnostics.push({
|
|
99772
100082
|
severity: "warn",
|
|
99773
100083
|
message: `"mcpServers.${input.name}.command" must be a PATH command or start with "./"`
|
|
@@ -99828,8 +100138,8 @@ function isObject(value) {
|
|
|
99828
100138
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
99829
100139
|
}
|
|
99830
100140
|
function isWithin$1(child, parent) {
|
|
99831
|
-
const relative = path.relative(parent, child);
|
|
99832
|
-
return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
100141
|
+
const relative = path$1.relative(parent, child);
|
|
100142
|
+
return relative === "" || !relative.startsWith("..") && !path$1.isAbsolute(relative);
|
|
99833
100143
|
}
|
|
99834
100144
|
/**
|
|
99835
100145
|
* Recursively scan for `SKILL.md` files up to `maxDepth` levels below `root`.
|
|
@@ -99848,15 +100158,15 @@ async function discoverSkillDirs(root, maxDepth) {
|
|
|
99848
100158
|
}
|
|
99849
100159
|
for (const entry of entries) {
|
|
99850
100160
|
if (!entry.isDirectory()) continue;
|
|
99851
|
-
const child = path.join(dir, entry.name);
|
|
99852
|
-
if (await isFile$1(path.join(child, BARE_SKILL_PATH))) found.push(child);
|
|
100161
|
+
const child = path$1.join(dir, entry.name);
|
|
100162
|
+
if (await isFile$1(path$1.join(child, BARE_SKILL_PATH))) found.push(child);
|
|
99853
100163
|
await walk(child, depth + 1);
|
|
99854
100164
|
}
|
|
99855
100165
|
}
|
|
99856
100166
|
await walk(root, 1);
|
|
99857
100167
|
const sorted = found.sort((a, b) => a.length - b.length);
|
|
99858
100168
|
const result = [];
|
|
99859
|
-
for (const dir of sorted) if (!result.some((parent) => dir.startsWith(parent + path.sep))) result.push(dir);
|
|
100169
|
+
for (const dir of sorted) if (!result.some((parent) => dir.startsWith(parent + path$1.sep))) result.push(dir);
|
|
99860
100170
|
return result;
|
|
99861
100171
|
}
|
|
99862
100172
|
async function isFile$1(p) {
|
|
@@ -99875,13 +100185,13 @@ async function isDir(p) {
|
|
|
99875
100185
|
}
|
|
99876
100186
|
//#endregion
|
|
99877
100187
|
//#region ../../packages/agent-core/src/plugin/store.ts
|
|
99878
|
-
const INSTALLED_REL = path.join("plugins", "installed.json");
|
|
100188
|
+
const INSTALLED_REL = path$1.join("plugins", "installed.json");
|
|
99879
100189
|
const EMPTY = {
|
|
99880
100190
|
version: 1,
|
|
99881
100191
|
plugins: []
|
|
99882
100192
|
};
|
|
99883
100193
|
async function readInstalled(screamHomeDir) {
|
|
99884
|
-
const filePath = path.join(screamHomeDir, INSTALLED_REL);
|
|
100194
|
+
const filePath = path$1.join(screamHomeDir, INSTALLED_REL);
|
|
99885
100195
|
let text;
|
|
99886
100196
|
try {
|
|
99887
100197
|
text = await readFile(filePath, "utf8");
|
|
@@ -99898,9 +100208,9 @@ async function readInstalled(screamHomeDir) {
|
|
|
99898
100208
|
}
|
|
99899
100209
|
}
|
|
99900
100210
|
async function writeInstalled(screamHomeDir, data) {
|
|
99901
|
-
const dir = path.join(screamHomeDir, "plugins");
|
|
100211
|
+
const dir = path$1.join(screamHomeDir, "plugins");
|
|
99902
100212
|
await mkdir(dir, { recursive: true });
|
|
99903
|
-
const final = path.join(dir, "installed.json");
|
|
100213
|
+
const final = path$1.join(dir, "installed.json");
|
|
99904
100214
|
const tmp = `${final}.tmp`;
|
|
99905
100215
|
await writeFile(tmp, JSON.stringify(data, null, 2), "utf8");
|
|
99906
100216
|
await rename(tmp, final);
|
|
@@ -99922,7 +100232,7 @@ async function downloadZip(url, signal) {
|
|
|
99922
100232
|
}
|
|
99923
100233
|
async function extractZip(buffer, destDir) {
|
|
99924
100234
|
await mkdir(destDir, { recursive: true });
|
|
99925
|
-
const destDirResolved = path.resolve(destDir);
|
|
100235
|
+
const destDirResolved = path$1.resolve(destDir);
|
|
99926
100236
|
let settled = false;
|
|
99927
100237
|
await new Promise((resolve, reject) => {
|
|
99928
100238
|
(0, import_yauzl.fromBuffer)(buffer, { lazyEntries: true }, (openErr, zipfile) => {
|
|
@@ -99932,8 +100242,8 @@ async function extractZip(buffer, destDir) {
|
|
|
99932
100242
|
}
|
|
99933
100243
|
const onEntry = (entry) => {
|
|
99934
100244
|
const fileName = entry.fileName;
|
|
99935
|
-
const destPath = path.resolve(destDir, fileName);
|
|
99936
|
-
if (destPath !== destDirResolved && !destPath.startsWith(destDirResolved + path.sep)) {
|
|
100245
|
+
const destPath = path$1.resolve(destDir, fileName);
|
|
100246
|
+
if (destPath !== destDirResolved && !destPath.startsWith(destDirResolved + path$1.sep)) {
|
|
99937
100247
|
if (!settled) {
|
|
99938
100248
|
settled = true;
|
|
99939
100249
|
reject(/* @__PURE__ */ new Error(`Path traversal detected in zip entry: ${fileName}`));
|
|
@@ -99962,7 +100272,7 @@ async function extractZip(buffer, destDir) {
|
|
|
99962
100272
|
zipfile.close();
|
|
99963
100273
|
return;
|
|
99964
100274
|
}
|
|
99965
|
-
mkdir(path.dirname(destPath), { recursive: true }).then(() => pipeline$1(stream, createWriteStream$1(destPath))).then(() => restoreFilePermissions(destPath, entry)).then(() => {
|
|
100275
|
+
mkdir(path$1.dirname(destPath), { recursive: true }).then(() => pipeline$1(stream, createWriteStream$1(destPath))).then(() => restoreFilePermissions(destPath, entry)).then(() => {
|
|
99966
100276
|
zipfile.readEntry();
|
|
99967
100277
|
}).catch((error) => {
|
|
99968
100278
|
if (!settled) {
|
|
@@ -100003,16 +100313,16 @@ async function detectPluginRoot(dir) {
|
|
|
100003
100313
|
const childDirs = (await readdir(dir, { withFileTypes: true })).filter((entry) => entry.isDirectory());
|
|
100004
100314
|
const childDir = childDirs.length === 1 ? childDirs[0] : void 0;
|
|
100005
100315
|
if (childDir !== void 0) {
|
|
100006
|
-
const child = path.join(dir, childDir.name);
|
|
100316
|
+
const child = path$1.join(dir, childDir.name);
|
|
100007
100317
|
if (await hasManifest(child)) return child;
|
|
100008
100318
|
}
|
|
100009
100319
|
return dir;
|
|
100010
100320
|
}
|
|
100011
100321
|
async function hasManifest(dir) {
|
|
100012
|
-
const rootManifest = path.join(dir, "scream.plugin.json");
|
|
100013
|
-
const dirManifest = path.join(dir, ".scream-plugin", "plugin.json");
|
|
100014
|
-
const claudeDirManifest = path.join(dir, ".claude-plugin", "plugin.json");
|
|
100015
|
-
const skillMd = path.join(dir, "SKILL.md");
|
|
100322
|
+
const rootManifest = path$1.join(dir, "scream.plugin.json");
|
|
100323
|
+
const dirManifest = path$1.join(dir, ".scream-plugin", "plugin.json");
|
|
100324
|
+
const claudeDirManifest = path$1.join(dir, ".claude-plugin", "plugin.json");
|
|
100325
|
+
const skillMd = path$1.join(dir, "SKILL.md");
|
|
100016
100326
|
return await isFile(rootManifest) || await isFile(dirManifest) || await isFile(claudeDirManifest) || await isFile(skillMd);
|
|
100017
100327
|
}
|
|
100018
100328
|
async function isFile(p) {
|
|
@@ -100161,7 +100471,7 @@ function resolveInstallSource(source) {
|
|
|
100161
100471
|
kind: "zip-url",
|
|
100162
100472
|
path: trimmed
|
|
100163
100473
|
};
|
|
100164
|
-
if (!path.isAbsolute(trimmed)) throw new Error(`Plugin root must be an absolute path (got "${source}")`);
|
|
100474
|
+
if (!path$1.isAbsolute(trimmed)) throw new Error(`Plugin root must be an absolute path (got "${source}")`);
|
|
100165
100475
|
return {
|
|
100166
100476
|
kind: "local-path",
|
|
100167
100477
|
path: trimmed
|
|
@@ -100299,7 +100609,7 @@ var PluginManager = class {
|
|
|
100299
100609
|
sourceType = "zip-url";
|
|
100300
100610
|
}
|
|
100301
100611
|
const buffer = await downloadZip(zipUrl);
|
|
100302
|
-
const tmpDir = await mkdtemp(path.join(tmpdir(), "scream-plugin-zip-"));
|
|
100612
|
+
const tmpDir = await mkdtemp(path$1.join(tmpdir(), "scream-plugin-zip-"));
|
|
100303
100613
|
try {
|
|
100304
100614
|
const detectedRoot = await extractZip(buffer, tmpDir);
|
|
100305
100615
|
parsed = await parseManifest(detectedRoot);
|
|
@@ -100483,7 +100793,7 @@ var PluginManager = class {
|
|
|
100483
100793
|
};
|
|
100484
100794
|
async function normalizeInstallRoot(rootPath) {
|
|
100485
100795
|
const trimmed = rootPath.trim();
|
|
100486
|
-
if (!path.isAbsolute(trimmed)) throw new Error(`Plugin root must be an absolute path (got "${rootPath}")`);
|
|
100796
|
+
if (!path$1.isAbsolute(trimmed)) throw new Error(`Plugin root must be an absolute path (got "${rootPath}")`);
|
|
100487
100797
|
let resolved;
|
|
100488
100798
|
try {
|
|
100489
100799
|
resolved = await realpath(trimmed);
|
|
@@ -100494,10 +100804,10 @@ async function normalizeInstallRoot(rootPath) {
|
|
|
100494
100804
|
return resolved;
|
|
100495
100805
|
}
|
|
100496
100806
|
async function copyPluginToManagedRoot(screamHomeDir, id, sourceRoot) {
|
|
100497
|
-
const managedRoot = path.join(screamHomeDir, "plugins", "managed", id);
|
|
100498
|
-
const managedDir = path.dirname(managedRoot);
|
|
100807
|
+
const managedRoot = path$1.join(screamHomeDir, "plugins", "managed", id);
|
|
100808
|
+
const managedDir = path$1.dirname(managedRoot);
|
|
100499
100809
|
await mkdir(managedDir, { recursive: true });
|
|
100500
|
-
const stagingRoot = await mkdtemp(path.join(managedDir, `${id}-`));
|
|
100810
|
+
const stagingRoot = await mkdtemp(path$1.join(managedDir, `${id}-`));
|
|
100501
100811
|
try {
|
|
100502
100812
|
await cp(sourceRoot, stagingRoot, { recursive: true });
|
|
100503
100813
|
await rm(managedRoot, {
|
|
@@ -100641,7 +100951,7 @@ function withPluginMcpRuntime(config, pluginRoot, screamHomeDir) {
|
|
|
100641
100951
|
};
|
|
100642
100952
|
}
|
|
100643
100953
|
function isScreamNativeBinary() {
|
|
100644
|
-
return !path.basename(process.execPath).toLowerCase().startsWith("node");
|
|
100954
|
+
return !path$1.basename(process.execPath).toLowerCase().startsWith("node");
|
|
100645
100955
|
}
|
|
100646
100956
|
//#endregion
|
|
100647
100957
|
//#region ../../node_modules/.pnpm/@mozilla+readability@0.6.0/node_modules/@mozilla/readability/Readability.js
|
|
@@ -114173,7 +114483,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
114173
114483
|
//#endregion
|
|
114174
114484
|
//#region ../../packages/agent-core/src/session/export/zip.ts
|
|
114175
114485
|
var import_yazl = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
114176
|
-
var fs = __require("fs");
|
|
114486
|
+
var fs$1 = __require("fs");
|
|
114177
114487
|
var Transform = __require("stream").Transform;
|
|
114178
114488
|
var PassThrough$1 = __require("stream").PassThrough;
|
|
114179
114489
|
var zlib = __require("zlib");
|
|
@@ -114202,14 +114512,14 @@ var import_yazl = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
114202
114512
|
if (shouldIgnoreAdding(self)) return;
|
|
114203
114513
|
var entry = new Entry(metadataPath, false, options);
|
|
114204
114514
|
self.entries.push(entry);
|
|
114205
|
-
fs.stat(realPath, function(err, stats) {
|
|
114515
|
+
fs$1.stat(realPath, function(err, stats) {
|
|
114206
114516
|
if (err) return self.emit("error", err);
|
|
114207
114517
|
if (!stats.isFile()) return self.emit("error", /* @__PURE__ */ new Error("not a file: " + realPath));
|
|
114208
114518
|
entry.uncompressedSize = stats.size;
|
|
114209
114519
|
if (options.mtime == null) entry.setLastModDate(stats.mtime);
|
|
114210
114520
|
if (options.mode == null) entry.setFileAttributesMode(stats.mode);
|
|
114211
114521
|
entry.setFileDataPumpFunction(function() {
|
|
114212
|
-
var readStream = fs.createReadStream(realPath);
|
|
114522
|
+
var readStream = fs$1.createReadStream(realPath);
|
|
114213
114523
|
entry.state = Entry.FILE_DATA_IN_PROGRESS;
|
|
114214
114524
|
readStream.on("error", function(err) {
|
|
114215
114525
|
self.emit("error", err);
|
|
@@ -124535,9 +124845,9 @@ var PlanBoxComponent = class {
|
|
|
124535
124845
|
const fallbackTitle = visibleWidth(fallbackWithStatus) <= budget ? fallbackWithStatus : fallback;
|
|
124536
124846
|
const planPath = this.planPath;
|
|
124537
124847
|
if (planPath === void 0 || planPath.length === 0) return fallbackTitle;
|
|
124538
|
-
const basename = path.basename(planPath);
|
|
124848
|
+
const basename = path$1.basename(planPath);
|
|
124539
124849
|
if (basename.length === 0) return fallbackTitle;
|
|
124540
|
-
const title = TITLE_PREFIX + (path.isAbsolute(planPath) ? toTerminalHyperlink$1(basename, pathToFileURL(planPath).href) : basename) + statusSuffix + TITLE_SUFFIX;
|
|
124850
|
+
const title = TITLE_PREFIX + (path$1.isAbsolute(planPath) ? toTerminalHyperlink$1(basename, pathToFileURL(planPath).href) : basename) + statusSuffix + TITLE_SUFFIX;
|
|
124541
124851
|
if (visibleWidth(title) > budget) return fallbackTitle;
|
|
124542
124852
|
return title;
|
|
124543
124853
|
}
|
|
@@ -136931,7 +137241,7 @@ function sourceLabel(source) {
|
|
|
136931
137241
|
}
|
|
136932
137242
|
function formatProject(memo) {
|
|
136933
137243
|
if (memo.projectDir.length === 0) return "";
|
|
136934
|
-
return path$
|
|
137244
|
+
return path$9.basename(memo.projectDir);
|
|
136935
137245
|
}
|
|
136936
137246
|
function formatTags(memo) {
|
|
136937
137247
|
if (memo.tags === void 0 || memo.tags.length === 0) return "";
|
|
@@ -139860,8 +140170,8 @@ async function runPluginNodeEntry(entry, args) {
|
|
|
139860
140170
|
await import(pathToFileURL(entryReal).href);
|
|
139861
140171
|
}
|
|
139862
140172
|
function isWithin(candidate, root) {
|
|
139863
|
-
const relative = path.relative(root, candidate);
|
|
139864
|
-
return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
140173
|
+
const relative = path$1.relative(root, candidate);
|
|
140174
|
+
return relative === "" || !relative.startsWith("..") && !path$1.isAbsolute(relative);
|
|
139865
140175
|
}
|
|
139866
140176
|
//#endregion
|
|
139867
140177
|
//#region src/utils/process/proctitle.ts
|