scream-code 0.5.9 → 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 I, { createWriteStream } from "fs";
11
+ import fs, { createWriteStream } from "fs";
12
12
  import Vr, { EventEmitter } from "events";
13
13
  import * as path$1$1 from "path";
14
- import Xs, { dirname, parse } from "path";
14
+ import path, { dirname, parse } from "path";
15
15
  import { Buffer as Buffer$1 } from "buffer";
16
- import * as fs$10 from "fs/promises";
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$9 from "node: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$8 from "node: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$14 = /* @__PURE__ */ createPathTagFunction$2(encodeURIPath$2);
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$14`/v1/environments/${environmentID}?beta=true`, {
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$14`/v1/environments/${environmentID}?beta=true`, {
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$14`/v1/environments/${environmentID}?beta=true`, {
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$14`/v1/environments/${environmentID}/archive?beta=true`, {
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$14`/v1/files/${fileID}?beta=true`, {
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$14`/v1/files/${fileID}/content?beta=true`, {
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$14`/v1/files/${fileID}?beta=true`, {
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$14`/v1/models/${modelID}?beta=true`, {
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$14`/v1/user_profiles/${userProfileID}?beta=true`, {
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$14`/v1/user_profiles/${userProfileID}?beta=true`, {
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$14`/v1/user_profiles/${userProfileID}/enrollment_url?beta=true`, {
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$14`/v1/agents/${agentID}/versions?beta=true`, PageCursor, {
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$14`/v1/agents/${agentID}?beta=true`, {
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$14`/v1/agents/${agentID}?beta=true`, {
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$14`/v1/agents/${agentID}/archive?beta=true`, {
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$14`/v1/memory_stores/${memoryStoreID}/memories?beta=true`, {
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$14`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
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$14`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
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$14`/v1/memory_stores/${memoryStoreID}/memories?beta=true`, PageCursor, {
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$14`/v1/memory_stores/${memory_store_id}/memories/${memoryID}?beta=true`, {
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$14`/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}?beta=true`, {
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$14`/v1/memory_stores/${memoryStoreID}/memory_versions?beta=true`, PageCursor, {
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$14`/v1/memory_stores/${memory_store_id}/memory_versions/${memoryVersionID}/redact?beta=true`, {
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$14`/v1/memory_stores/${memoryStoreID}?beta=true`, {
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$14`/v1/memory_stores/${memoryStoreID}?beta=true`, {
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$14`/v1/memory_stores/${memoryStoreID}?beta=true`, {
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$14`/v1/memory_stores/${memoryStoreID}/archive?beta=true`, {
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$14`/v1/messages/batches/${messageBatchID}?beta=true`, {
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$14`/v1/messages/batches/${messageBatchID}?beta=true`, {
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$14`/v1/messages/batches/${messageBatchID}/cancel?beta=true`, {
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$14`/v1/sessions/${sessionID}/events?beta=true`, PageCursor, {
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$14`/v1/sessions/${sessionID}/events?beta=true`, {
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$14`/v1/sessions/${sessionID}/events/stream?beta=true`, {
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$14`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
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$14`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
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$14`/v1/sessions/${sessionID}/resources?beta=true`, PageCursor, {
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$14`/v1/sessions/${session_id}/resources/${resourceID}?beta=true`, {
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$14`/v1/sessions/${sessionID}/resources?beta=true`, {
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$14`/v1/sessions/${session_id}/threads/${threadID}/events?beta=true`, PageCursor, {
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$14`/v1/sessions/${session_id}/threads/${threadID}/stream?beta=true`, {
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$14`/v1/sessions/${session_id}/threads/${threadID}?beta=true`, {
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$14`/v1/sessions/${sessionID}/threads?beta=true`, PageCursor, {
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$14`/v1/sessions/${session_id}/threads/${threadID}/archive?beta=true`, {
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$14`/v1/sessions/${sessionID}?beta=true`, {
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$14`/v1/sessions/${sessionID}?beta=true`, {
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$14`/v1/sessions/${sessionID}?beta=true`, {
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$14`/v1/sessions/${sessionID}/archive?beta=true`, {
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$14`/v1/skills/${skillID}/versions?beta=true`, multipartFormRequestOptions$1({
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$14`/v1/skills/${skill_id}/versions/${version}?beta=true`, {
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$14`/v1/skills/${skillID}/versions?beta=true`, PageCursor, {
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$14`/v1/skills/${skill_id}/versions/${version}?beta=true`, {
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$14`/v1/skills/${skillID}?beta=true`, {
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$14`/v1/skills/${skillID}?beta=true`, {
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$14`/v1/vaults/${vaultID}/credentials?beta=true`, {
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$14`/v1/vaults/${vault_id}/credentials/${credentialID}?beta=true`, {
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$14`/v1/vaults/${vault_id}/credentials/${credentialID}?beta=true`, {
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$14`/v1/vaults/${vaultID}/credentials?beta=true`, PageCursor, {
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$14`/v1/vaults/${vault_id}/credentials/${credentialID}?beta=true`, {
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$14`/v1/vaults/${vault_id}/credentials/${credentialID}/archive?beta=true`, {
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$14`/v1/vaults/${vault_id}/credentials/${credentialID}/mcp_oauth_validate?beta=true`, {
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$14`/v1/vaults/${vaultID}?beta=true`, {
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$14`/v1/vaults/${vaultID}?beta=true`, {
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$14`/v1/vaults/${vaultID}?beta=true`, {
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$14`/v1/vaults/${vaultID}/archive?beta=true`, {
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$14`/v1/messages/batches/${messageBatchID}`, options);
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$14`/v1/messages/batches/${messageBatchID}`, options);
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$14`/v1/messages/batches/${messageBatchID}/cancel`, options);
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$14`/v1/models/${modelID}`, {
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$16 = __require("fs");
13294
+ const fs$17 = __require("fs");
13295
13295
  const os$2 = __require("os");
13296
- const path$13 = __require("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$16.promises.lstat(filePath)).isFile();
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$13.join(process.env.APPDATA || "", CLOUDSDK_CONFIG_DIRECTORY) : path$13.join(process.env.HOME || "", ".config", CLOUDSDK_CONFIG_DIRECTORY));
13426
- return path$13.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE);
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$12 = __require("path");
15128
- const fs$15 = __require("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$15.readFile ? (0, util_1$1.promisify)(fs$15.readFile) : async () => {
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$12.extname(keyFilePath)) {
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$14 = __require("fs");
16680
- const readFile = (0, util_1.promisify)(fs$14.readFile ?? (() => {}));
16681
- const realpath = (0, util_1.promisify)(fs$14.realpath ?? (() => {}));
16682
- const lstat = (0, util_1.promisify)(fs$14.lstat ?? (() => {}));
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$13 = __require("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$13.promises.readFile(configPath, "utf8");
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$13.promises.readFile(certPath);
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$13.promises.readFile(keyPath);
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$13.promises.readFile(this.trustChainPath, "utf8")).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g) ?? []).map((pem, index) => {
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$12 = __require("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$12.promises.realpath(this.outputFile);
17667
+ filePath = await fs$13.promises.realpath(this.outputFile);
17668
17668
  } catch {
17669
17669
  return;
17670
17670
  }
17671
- if (!(await fs$12.promises.lstat(filePath)).isFile()) return;
17672
- const responseString = await fs$12.promises.readFile(filePath, { encoding: "utf8" });
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$11 = __require("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$11 = __require("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$11.join(home, ".config");
18338
+ if (home) location = path$12.join(home, ".config");
18339
18339
  }
18340
18340
  if (location) {
18341
- location = path$11.join(location, "gcloud", "application_default_credentials.json");
18342
- if (!fs$11.existsSync(location)) location = null;
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$11.realpathSync(filePath);
18357
- if (!fs$11.lstatSync(filePath).isFile()) throw new Error();
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$11.createReadStream(filePath);
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$11.resolve(this.keyFilename);
18629
- const stream = fs$11.createReadStream(filePath);
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$10 = /* @__PURE__ */ createPathTagFunction$1(encodeURIPath$1);
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$10`/${api_version}/interactions`, Object.assign(Object.assign({ body }, options), { stream: (_a = params.stream) !== null && _a !== void 0 ? _a : false }));
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$10`/${api_version}/interactions/${id}`, options);
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$10`/${api_version}/interactions/${id}/cancel`, options);
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$10`/${api_version}/interactions/${id}`, Object.assign(Object.assign({ query }, options), { stream: (_a = params === null || params === void 0 ? void 0 : params.stream) !== null && _a !== void 0 ? _a : false }));
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$10`/${api_version}/webhooks`, Object.assign({ body }, options));
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$10`/${api_version}/webhooks/${id}`, Object.assign({
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$10`/${api_version}/webhooks`, Object.assign({ query }, options));
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$10`/${api_version}/webhooks/${id}`, options);
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$10`/${api_version}/webhooks/${id}`, options);
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$10`/${api_version}/webhooks/${id}:ping`, Object.assign({ body }, options));
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$10`/${api_version}/webhooks/${id}:rotateSigningSecret`, Object.assign({ body }, options));
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$10.stat(file)).size;
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$10.open(file, "r");
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$9 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
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$9`/chat/completions/${completionID}/messages`, CursorPage, {
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$9`/chat/completions/${completionID}`, {
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$9`/chat/completions/${completionID}`, {
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$9`/chat/completions/${completionID}`, {
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$9`/organization/admin_api_keys/${keyID}`, {
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$9`/organization/admin_api_keys/${keyID}`, {
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$9`/organization/certificates/${certificateID}`, {
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$9`/organization/certificates/${certificateID}`, {
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$9`/organization/certificates/${certificateID}`, {
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$9`/organization/invites/${inviteID}`, {
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$9`/organization/invites/${inviteID}`, {
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$9`/organization/roles/${roleID}`, {
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$9`/organization/roles/${roleID}`, {
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$9`/organization/roles/${roleID}`, {
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$9`/organization/spend_alerts/${alertID}`, {
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$9`/organization/spend_alerts/${alertID}`, {
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$9`/organization/groups/${groupID}/roles`, {
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$9`/organization/groups/${group_id}/roles/${roleID}`, {
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$9`/organization/groups/${groupID}/roles`, NextCursorPage, {
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$9`/organization/groups/${group_id}/roles/${roleID}`, {
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$9`/organization/groups/${groupID}/users`, {
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$9`/organization/groups/${group_id}/users/${userID}`, {
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$9`/organization/groups/${groupID}/users`, NextCursorPage, {
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$9`/organization/groups/${group_id}/users/${userID}`, {
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$9`/organization/groups/${groupID}`, {
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$9`/organization/groups/${groupID}`, {
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$9`/organization/groups/${groupID}`, {
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$9`/organization/projects/${project_id}/api_keys/${apiKeyID}`, {
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$9`/organization/projects/${projectID}/api_keys`, ConversationCursorPage, {
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$9`/organization/projects/${project_id}/api_keys/${apiKeyID}`, {
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$9`/organization/projects/${projectID}/certificates`, ConversationCursorPage, {
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$9`/organization/projects/${projectID}/certificates/activate`, Page, {
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$9`/organization/projects/${projectID}/certificates/deactivate`, Page, {
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$9`/organization/projects/${projectID}/data_retention`, {
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$9`/organization/projects/${projectID}/data_retention`, {
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$9`/organization/projects/${projectID}/hosted_tool_permissions`, {
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$9`/organization/projects/${projectID}/hosted_tool_permissions`, {
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$9`/organization/projects/${projectID}/model_permissions`, {
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$9`/organization/projects/${projectID}/model_permissions`, {
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$9`/organization/projects/${projectID}/model_permissions`, {
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$9`/organization/projects/${projectID}/rate_limits`, ConversationCursorPage, {
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$9`/organization/projects/${project_id}/rate_limits/${rateLimitID}`, {
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$9`/projects/${projectID}/roles`, {
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$9`/projects/${project_id}/roles/${roleID}`, {
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$9`/projects/${project_id}/roles/${roleID}`, {
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$9`/projects/${projectID}/roles`, NextCursorPage, {
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$9`/projects/${project_id}/roles/${roleID}`, {
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$9`/organization/projects/${projectID}/service_accounts`, {
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$9`/organization/projects/${project_id}/service_accounts/${serviceAccountID}`, {
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$9`/organization/projects/${project_id}/service_accounts/${serviceAccountID}`, {
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$9`/organization/projects/${projectID}/service_accounts`, ConversationCursorPage, {
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$9`/organization/projects/${project_id}/service_accounts/${serviceAccountID}`, {
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$9`/organization/projects/${projectID}/spend_alerts`, {
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$9`/organization/projects/${project_id}/spend_alerts/${alertID}`, {
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$9`/organization/projects/${projectID}/spend_alerts`, ConversationCursorPage, {
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$9`/organization/projects/${project_id}/spend_alerts/${alertID}`, {
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$9`/projects/${project_id}/groups/${groupID}/roles`, {
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$9`/projects/${project_id}/groups/${group_id}/roles/${roleID}`, {
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$9`/projects/${project_id}/groups/${groupID}/roles`, NextCursorPage, {
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$9`/projects/${project_id}/groups/${group_id}/roles/${roleID}`, {
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$9`/organization/projects/${projectID}/groups`, {
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$9`/organization/projects/${project_id}/groups/${groupID}`, {
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$9`/organization/projects/${projectID}/groups`, NextCursorPage, {
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$9`/organization/projects/${project_id}/groups/${groupID}`, {
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$9`/projects/${project_id}/users/${userID}/roles`, {
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$9`/projects/${project_id}/users/${user_id}/roles/${roleID}`, {
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$9`/projects/${project_id}/users/${userID}/roles`, NextCursorPage, {
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$9`/projects/${project_id}/users/${user_id}/roles/${roleID}`, {
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$9`/organization/projects/${projectID}/users`, {
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$9`/organization/projects/${project_id}/users/${userID}`, {
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$9`/organization/projects/${project_id}/users/${userID}`, {
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$9`/organization/projects/${projectID}/users`, ConversationCursorPage, {
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$9`/organization/projects/${project_id}/users/${userID}`, {
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$9`/organization/projects/${projectID}`, {
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$9`/organization/projects/${projectID}`, {
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$9`/organization/projects/${projectID}/archive`, {
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$9`/organization/users/${userID}/roles`, {
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$9`/organization/users/${user_id}/roles/${roleID}`, {
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$9`/organization/users/${userID}/roles`, NextCursorPage, {
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$9`/organization/users/${user_id}/roles/${roleID}`, {
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$9`/organization/users/${userID}`, {
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$9`/organization/users/${userID}`, {
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$9`/organization/users/${userID}`, {
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$9`/batches/${batchID}`, {
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$9`/batches/${batchID}/cancel`, {
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$9`/assistants/${assistantID}`, {
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$9`/assistants/${assistantID}`, {
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$9`/assistants/${assistantID}`, {
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$9`/chatkit/sessions/${sessionID}/cancel`, {
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$9`/chatkit/threads/${threadID}`, {
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$9`/chatkit/threads/${threadID}`, {
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$9`/chatkit/threads/${threadID}/items`, ConversationCursorPage, {
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$9`/threads/${threadID}/messages`, {
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$9`/threads/${thread_id}/messages/${messageID}`, {
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$9`/threads/${thread_id}/messages/${messageID}`, {
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$9`/threads/${threadID}/messages`, CursorPage, {
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$9`/threads/${thread_id}/messages/${messageID}`, {
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$9`/threads/${thread_id}/runs/${run_id}/steps/${stepID}`, {
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$9`/threads/${thread_id}/runs/${runID}/steps`, CursorPage, {
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$9`/threads/${threadID}/runs`, {
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$9`/threads/${thread_id}/runs/${runID}`, {
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$9`/threads/${thread_id}/runs/${runID}`, {
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$9`/threads/${threadID}/runs`, CursorPage, {
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$9`/threads/${thread_id}/runs/${runID}/cancel`, {
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$9`/threads/${thread_id}/runs/${runID}/submit_tool_outputs`, {
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$9`/threads/${threadID}`, {
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$9`/threads/${threadID}`, {
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$9`/threads/${threadID}`, {
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$9`/containers/${container_id}/files/${fileID}/content`, {
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$9`/containers/${containerID}/files`, maybeMultipartFormRequestOptions({
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$9`/containers/${container_id}/files/${fileID}`, {
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$9`/containers/${containerID}/files`, CursorPage, {
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$9`/containers/${container_id}/files/${fileID}`, {
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$9`/containers/${containerID}`, {
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$9`/containers/${containerID}`, {
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$9`/conversations/${conversationID}/items`, {
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$9`/conversations/${conversation_id}/items/${itemID}`, {
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$9`/conversations/${conversationID}/items`, ConversationCursorPage, {
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$9`/conversations/${conversation_id}/items/${itemID}`, {
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$9`/conversations/${conversationID}`, {
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$9`/conversations/${conversationID}`, {
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$9`/conversations/${conversationID}`, {
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$9`/evals/${eval_id}/runs/${run_id}/output_items/${outputItemID}`, {
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$9`/evals/${eval_id}/runs/${runID}/output_items`, CursorPage, {
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$9`/evals/${evalID}/runs`, {
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$9`/evals/${eval_id}/runs/${runID}`, {
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$9`/evals/${evalID}/runs`, CursorPage, {
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$9`/evals/${eval_id}/runs/${runID}`, {
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$9`/evals/${eval_id}/runs/${runID}`, {
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$9`/evals/${evalID}`, {
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$9`/evals/${evalID}`, {
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$9`/evals/${evalID}`, {
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$9`/files/${fileID}`, {
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$9`/files/${fileID}`, {
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$9`/files/${fileID}/content`, {
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$9`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, Page, {
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$9`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, {
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$9`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, ConversationCursorPage, {
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$9`/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, {
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$9`/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, CursorPage, {
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$9`/fine_tuning/jobs/${fineTuningJobID}`, {
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$9`/fine_tuning/jobs/${fineTuningJobID}/cancel`, {
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$9`/fine_tuning/jobs/${fineTuningJobID}/events`, CursorPage, {
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$9`/fine_tuning/jobs/${fineTuningJobID}/pause`, {
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$9`/fine_tuning/jobs/${fineTuningJobID}/resume`, {
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$9`/models/${model}`, {
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$9`/models/${model}`, {
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$9`/realtime/calls/${callID}/accept`, {
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$9`/realtime/calls/${callID}/hangup`, {
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$9`/realtime/calls/${callID}/refer`, {
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$9`/realtime/calls/${callID}/reject`, {
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$9`/responses/${responseID}/input_items`, CursorPage, {
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$9`/responses/${responseID}`, {
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$9`/responses/${responseID}`, {
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$9`/responses/${responseID}/cancel`, {
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$9`/skills/${skillID}/content`, {
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$9`/skills/${skill_id}/versions/${version}/content`, {
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$9`/skills/${skillID}/versions`, maybeMultipartFormRequestOptions({
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$9`/skills/${skill_id}/versions/${version}`, {
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$9`/skills/${skillID}/versions`, CursorPage, {
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$9`/skills/${skill_id}/versions/${version}`, {
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$9`/skills/${skillID}`, {
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$9`/skills/${skillID}`, {
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$9`/skills/${skillID}`, {
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$9`/uploads/${uploadID}/parts`, multipartFormRequestOptions({
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$9`/uploads/${uploadID}/cancel`, {
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$9`/uploads/${uploadID}/complete`, {
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$9`/vector_stores/${vectorStoreID}/file_batches`, {
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$9`/vector_stores/${vector_store_id}/file_batches/${batchID}`, {
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$9`/vector_stores/${vector_store_id}/file_batches/${batchID}/cancel`, {
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$9`/vector_stores/${vector_store_id}/file_batches/${batchID}/files`, CursorPage, {
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$9`/vector_stores/${vectorStoreID}/files`, {
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$9`/vector_stores/${vector_store_id}/files/${fileID}`, {
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$9`/vector_stores/${vector_store_id}/files/${fileID}`, {
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$9`/vector_stores/${vectorStoreID}/files`, CursorPage, {
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$9`/vector_stores/${vector_store_id}/files/${fileID}`, {
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$9`/vector_stores/${vector_store_id}/files/${fileID}/content`, Page, {
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$9`/vector_stores/${vectorStoreID}`, {
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$9`/vector_stores/${vectorStoreID}`, {
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$9`/vector_stores/${vectorStoreID}`, {
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$9`/vector_stores/${vectorStoreID}/search`, Page, {
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$9`/videos/${videoID}`, {
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$9`/videos/${videoID}`, {
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$9`/videos/${videoID}/content`, {
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$9`/videos/characters/${characterID}`, {
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$9`/videos/${videoID}/remix`, maybeMultipartFormRequestOptions({
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$9.existsSync(input)) throw new ChatProviderError(`Video file not found: ${input}`);
48272
- const filename = path$8.basename(input);
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$9.promises.readFile(input);
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$9.fsync(fd, (err) => {
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
- return factors.keywordOverlap * .45 + factors.recency * .25 + factors.usageBoost * .15 + factors.projectBoost * .1 + factors.tagOverlap * .05;
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
- return memos.map((memo) => ({
56112
- memo,
56113
- score: computeRelevanceScore(memo, query, 0, currentProjectDir, projectTagCloud)
56114
- })).filter((s) => s.score >= minScore).toSorted((a, b) => b.score - a.score).slice(0, maxResults);
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 newest = [...cluster].toSorted((a, b) => b.recordedAt - a.recordedAt)[0];
56996
- const failures = new Set(cluster.map((m) => m.whatFailed).filter((p) => p && p !== "none" && p !== "无"));
56997
- const successes = new Set(cluster.map((m) => m.whatWorked).filter((w) => w && w !== "none" && w !== "无"));
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
- if (all.length === 0) return {
57414
- isError: false,
57415
- output: "No memory memos found. The experience store is empty."
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,
@@ -57507,6 +57780,7 @@ const SEVERITY_LABELS = [
57507
57780
  "Information",
57508
57781
  "Hint"
57509
57782
  ];
57783
+ const DEFAULT_REQUEST_TIMEOUT_MS$1 = 12e4;
57510
57784
  var LspClient = class {
57511
57785
  command;
57512
57786
  workspaceRoot;
@@ -57546,6 +57820,11 @@ var LspClient = class {
57546
57820
  this.notify("initialized", {});
57547
57821
  }
57548
57822
  async stop() {
57823
+ for (const { reject, timer } of this.pending.values()) {
57824
+ clearTimeout(timer);
57825
+ reject(/* @__PURE__ */ new Error("LSP client stopped"));
57826
+ }
57827
+ this.pending.clear();
57549
57828
  if (this.process === void 0) return;
57550
57829
  try {
57551
57830
  this.notify("shutdown", {});
@@ -57603,9 +57882,14 @@ var LspClient = class {
57603
57882
  request(method, params) {
57604
57883
  const id = this.nextId++;
57605
57884
  return new Promise((resolve, reject) => {
57885
+ const timer = setTimeout(() => {
57886
+ this.pending.delete(id);
57887
+ reject(/* @__PURE__ */ new Error(`LSP request '${method}' timed out after ${DEFAULT_REQUEST_TIMEOUT_MS$1}ms`));
57888
+ }, DEFAULT_REQUEST_TIMEOUT_MS$1);
57606
57889
  this.pending.set(id, {
57607
57890
  resolve,
57608
- reject
57891
+ reject,
57892
+ timer
57609
57893
  });
57610
57894
  this.send({
57611
57895
  id,
@@ -57651,6 +57935,7 @@ var LspClient = class {
57651
57935
  if (message.id !== void 0) {
57652
57936
  const pending = this.pending.get(message.id);
57653
57937
  if (pending === void 0) return;
57938
+ clearTimeout(pending.timer);
57654
57939
  this.pending.delete(message.id);
57655
57940
  if (message.error !== void 0) pending.reject(new Error(message.error.message));
57656
57941
  else pending.resolve(message.result);
@@ -57664,6 +57949,12 @@ var LspClient = class {
57664
57949
  };
57665
57950
  function pathToUri(path) {
57666
57951
  if (path.startsWith("file://")) return path;
57952
+ const windowsDriveMatch = /^([A-Za-z]):[\\/]/.exec(path);
57953
+ if (windowsDriveMatch !== null) {
57954
+ const drive = windowsDriveMatch[1].toUpperCase();
57955
+ const rest = path.slice(windowsDriveMatch[0].length).replaceAll("\\", "/");
57956
+ return `file:///${drive}:${rest.startsWith("/") ? rest : `/${rest}`}`;
57957
+ }
57667
57958
  return `file://${path.startsWith("/") ? path : `/${path}`}`;
57668
57959
  }
57669
57960
  function sleep$1(ms) {
@@ -65537,7 +65828,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
65537
65828
  };
65538
65829
  return _setPrototypeOf(o, p);
65539
65830
  }
65540
- var path$7 = __require("path");
65831
+ var path$8 = __require("path");
65541
65832
  module.exports = /*#__PURE__*/ function(_EmitterObj) {
65542
65833
  _inheritsLoose(Loader, _EmitterObj);
65543
65834
  function Loader() {
@@ -65545,7 +65836,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
65545
65836
  }
65546
65837
  var _proto = Loader.prototype;
65547
65838
  _proto.resolve = function resolve(from, to) {
65548
- return path$7.resolve(path$7.dirname(from), to);
65839
+ return path$8.resolve(path$8.dirname(from), to);
65549
65840
  };
65550
65841
  _proto.isRelative = function isRelative(filename) {
65551
65842
  return filename.indexOf("./") === 0 || filename.indexOf("../") === 0;
@@ -65604,8 +65895,8 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
65604
65895
  };
65605
65896
  return _setPrototypeOf(o, p);
65606
65897
  }
65607
- var fs$8 = __require("fs");
65608
- var path$6 = __require("path");
65898
+ var fs$9 = __require("fs");
65899
+ var path$7 = __require("path");
65609
65900
  var Loader = require_loader();
65610
65901
  var PrecompiledLoader = require_precompiled_loader().PrecompiledLoader;
65611
65902
  var chokidar;
@@ -65620,7 +65911,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
65620
65911
  _this.noCache = !!opts.noCache;
65621
65912
  if (searchPaths) {
65622
65913
  searchPaths = Array.isArray(searchPaths) ? searchPaths : [searchPaths];
65623
- _this.searchPaths = searchPaths.map(path$6.normalize);
65914
+ _this.searchPaths = searchPaths.map(path$7.normalize);
65624
65915
  } else _this.searchPaths = ["."];
65625
65916
  if (opts.watch) {
65626
65917
  try {
@@ -65628,10 +65919,10 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
65628
65919
  } catch (e) {
65629
65920
  throw new Error("watch requires chokidar to be installed");
65630
65921
  }
65631
- var paths = _this.searchPaths.filter(fs$8.existsSync);
65922
+ var paths = _this.searchPaths.filter(fs$9.existsSync);
65632
65923
  var watcher = chokidar.watch(paths);
65633
65924
  watcher.on("all", function(event, fullname) {
65634
- fullname = path$6.resolve(fullname);
65925
+ fullname = path$7.resolve(fullname);
65635
65926
  if (event === "change" && fullname in _this.pathsToNames) _this.emit("update", _this.pathsToNames[fullname], fullname);
65636
65927
  });
65637
65928
  watcher.on("error", function(error) {
@@ -65645,9 +65936,9 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
65645
65936
  var fullpath = null;
65646
65937
  var paths = this.searchPaths;
65647
65938
  for (var i = 0; i < paths.length; i++) {
65648
- var basePath = path$6.resolve(paths[i]);
65649
- var p = path$6.resolve(paths[i], name);
65650
- if (p.indexOf(basePath) === 0 && fs$8.existsSync(p)) {
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)) {
65651
65942
  fullpath = p;
65652
65943
  break;
65653
65944
  }
@@ -65655,7 +65946,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
65655
65946
  if (!fullpath) return null;
65656
65947
  this.pathsToNames[fullpath] = name;
65657
65948
  var source = {
65658
- src: fs$8.readFileSync(fullpath, "utf-8"),
65949
+ src: fs$9.readFileSync(fullpath, "utf-8"),
65659
65950
  path: fullpath,
65660
65951
  noCache: this.noCache
65661
65952
  };
@@ -65703,7 +65994,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
65703
65994
  }
65704
65995
  this.pathsToNames[fullpath] = name;
65705
65996
  var source = {
65706
- src: fs$8.readFileSync(fullpath, "utf-8"),
65997
+ src: fs$9.readFileSync(fullpath, "utf-8"),
65707
65998
  path: fullpath,
65708
65999
  noCache: this.noCache
65709
66000
  };
@@ -66005,13 +66296,13 @@ var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
66005
66296
  //#endregion
66006
66297
  //#region ../../node_modules/.pnpm/nunjucks@3.2.4/node_modules/nunjucks/src/express-app.js
66007
66298
  var require_express_app = /* @__PURE__ */ __commonJSMin(((exports, module) => {
66008
- var path$5 = __require("path");
66299
+ var path$6 = __require("path");
66009
66300
  module.exports = function express(env, app) {
66010
66301
  function NunjucksView(name, opts) {
66011
66302
  this.name = name;
66012
66303
  this.path = name;
66013
66304
  this.defaultEngine = opts.defaultEngine;
66014
- this.ext = path$5.extname(name);
66305
+ this.ext = path$6.extname(name);
66015
66306
  if (!this.ext && !this.defaultEngine) throw new Error("No default engine was specified and no extension was provided.");
66016
66307
  if (!this.ext) this.name += this.ext = (this.defaultEngine[0] !== "." ? "." : "") + this.defaultEngine;
66017
66308
  }
@@ -66447,8 +66738,8 @@ var require_precompile_global = /* @__PURE__ */ __commonJSMin(((exports, module)
66447
66738
  //#endregion
66448
66739
  //#region ../../node_modules/.pnpm/nunjucks@3.2.4/node_modules/nunjucks/src/precompile.js
66449
66740
  var require_precompile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
66450
- var fs$7 = __require("fs");
66451
- var path$4 = __require("path");
66741
+ var fs$8 = __require("fs");
66742
+ var path$5 = __require("path");
66452
66743
  var _prettifyError = require_lib$1()._prettifyError;
66453
66744
  var compiler = require_compiler();
66454
66745
  var Environment = require_environment().Environment;
@@ -66472,27 +66763,27 @@ var require_precompile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
66472
66763
  var env = opts.env || new Environment([]);
66473
66764
  var wrapper = opts.wrapper || precompileGlobal;
66474
66765
  if (opts.isString) return precompileString(input, opts);
66475
- var pathStats = fs$7.existsSync(input) && fs$7.statSync(input);
66766
+ var pathStats = fs$8.existsSync(input) && fs$8.statSync(input);
66476
66767
  var precompiled = [];
66477
66768
  var templates = [];
66478
66769
  function addTemplates(dir) {
66479
- fs$7.readdirSync(dir).forEach(function(file) {
66480
- var filepath = path$4.join(dir, file);
66481
- var subpath = filepath.substr(path$4.join(input, "/").length);
66482
- var stat = fs$7.statSync(filepath);
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);
66483
66774
  if (stat && stat.isDirectory()) {
66484
66775
  subpath += "/";
66485
66776
  if (!match(subpath, opts.exclude)) addTemplates(filepath);
66486
66777
  } else if (match(subpath, opts.include)) templates.push(filepath);
66487
66778
  });
66488
66779
  }
66489
- if (pathStats.isFile()) precompiled.push(_precompile(fs$7.readFileSync(input, "utf-8"), opts.name || input, env));
66780
+ if (pathStats.isFile()) precompiled.push(_precompile(fs$8.readFileSync(input, "utf-8"), opts.name || input, env));
66490
66781
  else if (pathStats.isDirectory()) {
66491
66782
  addTemplates(input);
66492
66783
  for (var i = 0; i < templates.length; i++) {
66493
- var name = templates[i].replace(path$4.join(input, "/"), "");
66784
+ var name = templates[i].replace(path$5.join(input, "/"), "");
66494
66785
  try {
66495
- precompiled.push(_precompile(fs$7.readFileSync(templates[i], "utf-8"), name, env));
66786
+ precompiled.push(_precompile(fs$8.readFileSync(templates[i], "utf-8"), name, env));
66496
66787
  } catch (e) {
66497
66788
  if (opts.force) console.error(e);
66498
66789
  else throw e;
@@ -67824,7 +68115,7 @@ while (this[Ls](this[Ie]()) && this[b].length);
67824
68115
  return Pr;
67825
68116
  }
67826
68117
  };
67827
- var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol("_ended"), m = Symbol("_fd"), Ni = Symbol("_finished"), j = Symbol("_flags"), Di = Symbol("_flush"), ki = Symbol("_handleChunk"), Fi = Symbol("_makeBuf"), se = Symbol("_mode"), Fe = Symbol("_needDrain"), Ut = Symbol("_onerror"), Ht = Symbol("_onopen"), Ai = Symbol("_onread"), Pt = Symbol("_onwrite"), ht = Symbol("_open"), U = Symbol("_path"), nt = Symbol("_pos"), Y = Symbol("_queue"), zt = Symbol("_read"), Ii = Symbol("_readSize"), J = Symbol("_reading"), ie = Symbol("_remain"), Ci = Symbol("_size"), ve = Symbol("_write"), gt$1 = Symbol("_writing"), Me = Symbol("_defaultFlag"), bt = Symbol("_errored"), _t = class extends A {
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 {
67828
68119
  [bt] = !1;
67829
68120
  [m];
67830
68121
  [U];
@@ -67850,7 +68141,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
67850
68141
  throw new TypeError("this is a readable stream");
67851
68142
  }
67852
68143
  [ht]() {
67853
- I.open(this[U], "r", (t, e) => this[Ht](t, e));
68144
+ fs.open(this[U], "r", (t, e) => this[Ht](t, e));
67854
68145
  }
67855
68146
  [Ht](t, e) {
67856
68147
  t ? this[Ut](t) : (this[m] = e, this.emit("open", e), this[zt]());
@@ -67863,7 +68154,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
67863
68154
  this[J] = !0;
67864
68155
  let t = this[Fi]();
67865
68156
  if (t.length === 0) return process.nextTick(() => this[Ai](null, 0, t));
67866
- I.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ai](e, i, r));
68157
+ fs.read(this[m], t, 0, t.length, null, (e, i, r) => this[Ai](e, i, r));
67867
68158
  }
67868
68159
  }
67869
68160
  [Ai](t, e, i) {
@@ -67872,7 +68163,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
67872
68163
  [H]() {
67873
68164
  if (this[ot] && typeof this[m] == "number") {
67874
68165
  let t = this[m];
67875
- this[m] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
68166
+ this[m] = void 0, fs.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
67876
68167
  }
67877
68168
  }
67878
68169
  [Ut](t) {
@@ -67895,7 +68186,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
67895
68186
  [ht]() {
67896
68187
  let t = !0;
67897
68188
  try {
67898
- this[Ht](null, I.openSync(this[U], "r")), t = !1;
68189
+ this[Ht](null, fs.openSync(this[U], "r")), t = !1;
67899
68190
  } finally {
67900
68191
  t && this[H]();
67901
68192
  }
@@ -67906,7 +68197,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
67906
68197
  if (!this[J]) {
67907
68198
  this[J] = !0;
67908
68199
  do {
67909
- let e = this[Fi](), i = e.length === 0 ? 0 : I.readSync(this[m], e, 0, e.length, null);
68200
+ let e = this[Fi](), i = e.length === 0 ? 0 : fs.readSync(this[m], e, 0, e.length, null);
67910
68201
  if (!this[ki](i, e)) break;
67911
68202
  } while (!0);
67912
68203
  this[J] = !1;
@@ -67919,7 +68210,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
67919
68210
  [H]() {
67920
68211
  if (this[ot] && typeof this[m] == "number") {
67921
68212
  let t = this[m];
67922
- this[m] = void 0, I.closeSync(t), this.emit("close");
68213
+ this[m] = void 0, fs.closeSync(t), this.emit("close");
67923
68214
  }
67924
68215
  }
67925
68216
  }, tt = class extends Vr {
@@ -67960,7 +68251,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
67960
68251
  this[H](), this[gt$1] = !0, this.emit("error", t);
67961
68252
  }
67962
68253
  [ht]() {
67963
- I.open(this[U], this[j], this[se], (t, e) => this[Ht](t, e));
68254
+ fs.open(this[U], this[j], this[se], (t, e) => this[Ht](t, e));
67964
68255
  }
67965
68256
  [Ht](t, e) {
67966
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]());
@@ -67972,7 +68263,7 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
67972
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);
67973
68264
  }
67974
68265
  [ve](t) {
67975
- I.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
68266
+ fs.write(this[m], t, 0, t.length, this[nt], (e, i) => this[Pt](e, i));
67976
68267
  }
67977
68268
  [Pt](t, e) {
67978
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"))));
@@ -67988,31 +68279,31 @@ var $r = I.writev, ot = Symbol("_autoClose"), H = Symbol("_close"), ee = Symbol(
67988
68279
  [H]() {
67989
68280
  if (this[ot] && typeof this[m] == "number") {
67990
68281
  let t = this[m];
67991
- this[m] = void 0, I.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
68282
+ this[m] = void 0, fs.close(t, (e) => e ? this.emit("error", e) : this.emit("close"));
67992
68283
  }
67993
68284
  }
67994
68285
  }, Wt = class extends tt {
67995
68286
  [ht]() {
67996
68287
  let t;
67997
68288
  if (this[Me] && this[j] === "r+") try {
67998
- t = I.openSync(this[U], this[j], this[se]);
68289
+ t = fs.openSync(this[U], this[j], this[se]);
67999
68290
  } catch (e) {
68000
68291
  if (e?.code === "ENOENT") return this[j] = "w", this[ht]();
68001
68292
  throw e;
68002
68293
  }
68003
- else t = I.openSync(this[U], this[j], this[se]);
68294
+ else t = fs.openSync(this[U], this[j], this[se]);
68004
68295
  this[Ht](null, t);
68005
68296
  }
68006
68297
  [H]() {
68007
68298
  if (this[ot] && typeof this[m] == "number") {
68008
68299
  let t = this[m];
68009
- this[m] = void 0, I.closeSync(t), this.emit("close");
68300
+ this[m] = void 0, fs.closeSync(t), this.emit("close");
68010
68301
  }
68011
68302
  }
68012
68303
  [ve](t) {
68013
68304
  let e = !0;
68014
68305
  try {
68015
- this[Pt](null, I.writeSync(this[m], t, 0, t.length, this[nt])), e = !1;
68306
+ this[Pt](null, fs.writeSync(this[m], t, 0, t.length, this[nt])), e = !1;
68016
68307
  } finally {
68017
68308
  if (e) try {
68018
68309
  this[H]();
@@ -68961,7 +69252,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
68961
69252
  let [o, h] = ce(this.path);
68962
69253
  o && typeof h == "string" && (this.path = h, r = o);
68963
69254
  }
68964
- this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Vs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || Xs.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, {
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`, {
68965
69256
  entry: this,
68966
69257
  path: r + this.path
68967
69258
  });
@@ -68975,7 +69266,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
68975
69266
  return t === "error" && (this.#t = !0), super.emit(t, ...e);
68976
69267
  }
68977
69268
  [ts]() {
68978
- I.lstat(this.absolute, (t, e) => {
69269
+ fs.lstat(this.absolute, (t, e) => {
68979
69270
  if (t) return this.emit("error", t);
68980
69271
  this[ii](e);
68981
69272
  });
@@ -69034,7 +69325,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
69034
69325
  this.path.slice(-1) !== "/" && (this.path += "/"), this.stat.size = 0, this[fe](), this.end();
69035
69326
  }
69036
69327
  [ji]() {
69037
- I.readlink(this.absolute, (t, e) => {
69328
+ fs.readlink(this.absolute, (t, e) => {
69038
69329
  if (t) return this.emit("error", t);
69039
69330
  this[is$2](e);
69040
69331
  });
@@ -69044,7 +69335,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
69044
69335
  }
69045
69336
  [js](t) {
69046
69337
  if (!this.stat) throw new Error("cannot create link entry without stat");
69047
- this.type = "Link", this.linkpath = f(Xs.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
69338
+ this.type = "Link", this.linkpath = f(path.relative(this.cwd, t)), this.stat.size = 0, this[fe](), this.end();
69048
69339
  }
69049
69340
  [Qs]() {
69050
69341
  if (!this.stat) throw new Error("cannot create file entry without stat");
@@ -69057,7 +69348,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
69057
69348
  this[ss]();
69058
69349
  }
69059
69350
  [ss]() {
69060
- I.open(this.absolute, "r", (t, e) => {
69351
+ fs.open(this.absolute, "r", (t, e) => {
69061
69352
  if (t) return this.emit("error", t);
69062
69353
  this[rs](e);
69063
69354
  });
@@ -69072,13 +69363,13 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
69072
69363
  [ei]() {
69073
69364
  let { fd: t, buf: e, offset: i, length: r, pos: n } = this;
69074
69365
  if (t === void 0 || e === void 0) throw new Error("cannot read file without first opening");
69075
- I.read(t, e, i, r, n, (o, h) => {
69366
+ fs.read(t, e, i, r, n, (o, h) => {
69076
69367
  if (o) return this[pt](() => this.emit("error", o));
69077
69368
  this[es](h);
69078
69369
  });
69079
69370
  }
69080
69371
  [pt](t = () => {}) {
69081
- this.fd !== void 0 && I.close(this.fd, t);
69372
+ this.fd !== void 0 && fs.close(this.fd, t);
69082
69373
  }
69083
69374
  [es](t) {
69084
69375
  if (t <= 0 && this.remain > 0) {
@@ -69120,20 +69411,20 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
69120
69411
  }, ri = class extends de {
69121
69412
  sync = !0;
69122
69413
  [ts]() {
69123
- this[ii](I.lstatSync(this.absolute));
69414
+ this[ii](fs.lstatSync(this.absolute));
69124
69415
  }
69125
69416
  [ji]() {
69126
- this[is$2](I.readlinkSync(this.absolute));
69417
+ this[is$2](fs.readlinkSync(this.absolute));
69127
69418
  }
69128
69419
  [ss]() {
69129
- this[rs](I.openSync(this.absolute, "r"));
69420
+ this[rs](fs.openSync(this.absolute, "r"));
69130
69421
  }
69131
69422
  [ei]() {
69132
69423
  let t = !0;
69133
69424
  try {
69134
69425
  let { fd: e, buf: i, offset: r, length: n, pos: o } = this;
69135
69426
  if (e === void 0 || i === void 0) throw new Error("fd and buf must be set in READ method");
69136
- let h = I.readSync(e, i, r, n, o);
69427
+ let h = fs.readSync(e, i, r, n, o);
69137
69428
  this[es](h), t = !1;
69138
69429
  } finally {
69139
69430
  if (t) try {
@@ -69145,7 +69436,7 @@ var tr = (s, t) => t ? (s = f(s).replace(/^\.(\/|$)/, ""), mt(t) + "/" + s) : f(
69145
69436
  t();
69146
69437
  }
69147
69438
  [pt](t = () => {}) {
69148
- this.fd !== void 0 && I.closeSync(this.fd), t();
69439
+ this.fd !== void 0 && fs.closeSync(this.fd), t();
69149
69440
  }
69150
69441
  }, ni = class extends A {
69151
69442
  blockLen = 0;
@@ -69464,7 +69755,7 @@ var mi = class {
69464
69755
  return t instanceof Yt ? this[ir](t) : this[li](t), this.flowing;
69465
69756
  }
69466
69757
  [ir](t) {
69467
- let e = f(Xs.resolve(this.cwd, t.path));
69758
+ let e = f(path.resolve(this.cwd, t.path));
69468
69759
  if (!this.filter(t.path, t)) t.resume();
69469
69760
  else {
69470
69761
  let i = new mi(t.path, e);
@@ -69473,12 +69764,12 @@ var mi = class {
69473
69764
  this[kt]();
69474
69765
  }
69475
69766
  [li](t) {
69476
- let e = f(Xs.resolve(this.cwd, t));
69767
+ let e = f(path.resolve(this.cwd, t));
69477
69768
  this[W].push(new mi(t, e)), this[kt]();
69478
69769
  }
69479
69770
  [ls](t) {
69480
69771
  t.pending = !0, this[G] += 1;
69481
- I[this.follow ? "stat" : "lstat"](t.absolute, (i, r) => {
69772
+ fs[this.follow ? "stat" : "lstat"](t.absolute, (i, r) => {
69482
69773
  t.pending = !1, this[G] -= 1, i ? this.emit("error", i) : this[ai](t, r);
69483
69774
  });
69484
69775
  }
@@ -69492,7 +69783,7 @@ var mi = class {
69492
69783
  this[kt]();
69493
69784
  }
69494
69785
  [cs](t) {
69495
- t.pending = !0, this[G] += 1, I.readdir(t.absolute, (e, i) => {
69786
+ t.pending = !0, this[G] += 1, fs.readdir(t.absolute, (e, i) => {
69496
69787
  if (t.pending = !1, this[G] -= 1, e) return this.emit("error", e);
69497
69788
  this[ci](t, i);
69498
69789
  });
@@ -69605,10 +69896,10 @@ var mi = class {
69605
69896
  resume() {}
69606
69897
  [ls](t) {
69607
69898
  let e = this.follow ? "statSync" : "lstatSync";
69608
- this[ai](t, I[e](t.absolute));
69899
+ this[ai](t, fs[e](t.absolute));
69609
69900
  }
69610
69901
  [cs](t) {
69611
- this[ci](t, I.readdirSync(t.absolute));
69902
+ this[ci](t, fs.readdirSync(t.absolute));
69612
69903
  }
69613
69904
  [fi](t) {
69614
69905
  let e = t.entry, i = this.zip;
@@ -69635,7 +69926,7 @@ var mi = class {
69635
69926
  }, hr = (s, t) => {
69636
69927
  t.forEach((e) => {
69637
69928
  e.charAt(0) === "@" ? Ct({
69638
- file: path.resolve(s.cwd, e.slice(1)),
69929
+ file: path$1.resolve(s.cwd, e.slice(1)),
69639
69930
  sync: !0,
69640
69931
  noResume: !0,
69641
69932
  onReadEntry: (i) => s.add(i)
@@ -69643,7 +69934,7 @@ var mi = class {
69643
69934
  }), s.end();
69644
69935
  }, ar = async (s, t) => {
69645
69936
  for (let e of t) e.charAt(0) === "@" ? await Ct({
69646
- file: path.resolve(String(s.cwd), e.slice(1)),
69937
+ file: path$1.resolve(String(s.cwd), e.slice(1)),
69647
69938
  noResume: !0,
69648
69939
  onReadEntry: (i) => {
69649
69940
  s.add(i);
@@ -69660,7 +69951,7 @@ var mi = class {
69660
69951
  K(Hn, Wn, Gn, Zn, (s, t) => {
69661
69952
  if (!t?.length) throw new TypeError("no paths specified to add to archive");
69662
69953
  });
69663
- var dr = (process.env.__FAKE_PLATFORM__ || process.platform) === "win32", { O_CREAT: ur, O_NOFOLLOW: lr, O_TRUNC: mr, O_WRONLY: pr } = I.constants, Er = Number(process.env.__FAKE_FS_O_FILENAME__) || I.constants.UV_FS_O_FILEMAP || 0, Vn = dr && !!Er, $n = 512 * 1024, Xn = Er | mr | ur | pr, cr = !dr && typeof lr == "number" ? lr | mr | ur | pr : null, fs$6 = cr !== null ? () => cr : Vn ? (s) => s < $n ? Xn : "w" : () => "w";
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";
69664
69955
  var ds = (s, t, e) => {
69665
69956
  try {
69666
69957
  return Vt.lchownSync(s, t, e);
@@ -69672,11 +69963,11 @@ var ds = (s, t, e) => {
69672
69963
  i(r && r?.code !== "ENOENT" ? r : null);
69673
69964
  });
69674
69965
  }, qn = (s, t, e, i, r) => {
69675
- 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) => {
69676
69967
  if (n) return r(n);
69677
- pi(path.resolve(s, t.name), e, i, r);
69968
+ pi(path$1.resolve(s, t.name), e, i, r);
69678
69969
  });
69679
- else pi(path.resolve(s, t.name), e, i, r);
69970
+ else pi(path$1.resolve(s, t.name), e, i, r);
69680
69971
  }, us = (s, t, e, i) => {
69681
69972
  Vt.readdir(s, { withFileTypes: !0 }, (r, n) => {
69682
69973
  if (r) {
@@ -69693,7 +69984,7 @@ var ds = (s, t, e) => {
69693
69984
  for (let l of n) qn(s, l, t, e, a);
69694
69985
  });
69695
69986
  }, Qn = (s, t, e, i) => {
69696
- 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);
69697
69988
  }, ms = (s, t, e) => {
69698
69989
  let i;
69699
69990
  try {
@@ -69744,10 +70035,10 @@ var jn = (s, t) => {
69744
70035
  mode: r,
69745
70036
  recursive: !0
69746
70037
  }).then((E) => S(null, E ?? void 0), S);
69747
- 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);
69748
70039
  }, ps = (s, t, e, i, r, n, o) => {
69749
70040
  if (t.length === 0) return o(null, n);
69750
- let h = t.shift(), a = f(path.resolve(s + "/" + h));
70041
+ let h = t.shift(), a = f(path$1.resolve(s + "/" + h));
69751
70042
  Vt.mkdir(a, e, Sr(a, t, e, i, r, n, o));
69752
70043
  }, Sr = (s, t, e, i, r, n, o) => (h) => {
69753
70044
  h ? Vt.lstat(s, (a, l) => {
@@ -69781,9 +70072,9 @@ var jn = (s, t) => {
69781
70072
  mode: i,
69782
70073
  recursive: !0
69783
70074
  }) ?? void 0);
69784
- let T = f(path.relative(c, s)).split("/"), N;
70075
+ let T = f(path$1.relative(c, s)).split("/"), N;
69785
70076
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
69786
- x = f(path.resolve(x));
70077
+ x = f(path$1.resolve(x));
69787
70078
  try {
69788
70079
  Vt.mkdirSync(x, i), N = N || x;
69789
70080
  } catch {
@@ -69927,7 +70218,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
69927
70218
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
69928
70219
  this.uid = t.uid, this.gid = t.gid, this.setOwner = !0;
69929
70220
  } else this.uid = void 0, this.gid = void 0, this.setOwner = !1;
69930
- 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));
69931
70222
  }
69932
70223
  warn(t, e, i = {}) {
69933
70224
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i.recoverable = !1), super.warn(t, e, i);
@@ -69944,7 +70235,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
69944
70235
  entry: t,
69945
70236
  [e]: i
69946
70237
  }), !1;
69947
- 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("/")));
69948
70239
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, {
69949
70240
  entry: t,
69950
70241
  [e]: i
@@ -69973,7 +70264,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
69973
70264
  maxDepth: this.maxDepth
69974
70265
  }), !1;
69975
70266
  if (!this[ws](t, "path") || !this[ws](t, "linkpath")) return !1;
69976
- 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", {
69977
70268
  entry: t,
69978
70269
  path: f(t.path),
69979
70270
  resolvedPath: t.absolute,
@@ -69981,9 +70272,9 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
69981
70272
  }), !1;
69982
70273
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return !1;
69983
70274
  if (this.win32) {
69984
- let { root: r } = path.win32.parse(String(t.absolute));
70275
+ let { root: r } = path$1.win32.parse(String(t.absolute));
69985
70276
  t.absolute = r + Qi(String(t.absolute).slice(r.length));
69986
- let { root: n } = path.win32.parse(t.path);
70277
+ let { root: n } = path$1.win32.parse(t.path);
69987
70278
  t.path = n + Qi(t.path.slice(n.length));
69988
70279
  }
69989
70280
  return !0;
@@ -70028,7 +70319,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
70028
70319
  }
70029
70320
  [bs](t, e) {
70030
70321
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), {
70031
- flags: fs$6(t.size),
70322
+ flags: fs$7(t.size),
70032
70323
  mode: i,
70033
70324
  autoClose: !1
70034
70325
  });
@@ -70080,13 +70371,13 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
70080
70371
  t.unsupported = !0, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
70081
70372
  }
70082
70373
  [xr](t, e) {
70083
- 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("/");
70084
70375
  this[Re](t, this.cwd, i, () => this[Ri](t, String(t.linkpath), "symlink", e), (r) => {
70085
70376
  this[O](r, t), e();
70086
70377
  });
70087
70378
  }
70088
70379
  [Lr](t, e) {
70089
- 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("/");
70090
70381
  this[Re](t, this.cwd, r, () => this[Ri](t, i, "link", e), (n) => {
70091
70382
  this[O](n, t), e();
70092
70383
  });
@@ -70094,10 +70385,10 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
70094
70385
  [Re](t, e, i, r, n) {
70095
70386
  let o = i.shift();
70096
70387
  if (this.preservePaths || o === void 0) return r();
70097
- let h = path.resolve(e, o);
70388
+ let h = path$1.resolve(e, o);
70098
70389
  Vt.lstat(h, (a, l) => {
70099
70390
  if (a) return r();
70100
- 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("/"))));
70101
70392
  this[Re](t, h, i, r, n);
70102
70393
  });
70103
70394
  }
@@ -70131,7 +70422,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
70131
70422
  });
70132
70423
  }, n = () => {
70133
70424
  if (t.absolute !== this.cwd) {
70134
- let h = f(path.dirname(String(t.absolute)));
70425
+ let h = f(path$1.dirname(String(t.absolute)));
70135
70426
  if (h !== this.cwd) return this[yt](h, this.dmode, (a) => {
70136
70427
  if (a) {
70137
70428
  this[O](a, t), i();
@@ -70199,7 +70490,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
70199
70490
  this[Oe] = !0;
70200
70491
  }
70201
70492
  if (t.absolute !== this.cwd) {
70202
- let n = f(path.dirname(String(t.absolute)));
70493
+ let n = f(path$1.dirname(String(t.absolute)));
70203
70494
  if (n !== this.cwd) {
70204
70495
  let o = this[yt](n, this.dmode);
70205
70496
  if (o) return this[O](o, t);
@@ -70232,7 +70523,7 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
70232
70523
  (h || a) && this[O](h || a, t), e();
70233
70524
  }, n;
70234
70525
  try {
70235
- n = Vt.openSync(String(t.absolute), fs$6(t.size), i);
70526
+ n = Vt.openSync(String(t.absolute), fs$7(t.size), i);
70236
70527
  } catch (h) {
70237
70528
  return r(h);
70238
70529
  }
@@ -70307,10 +70598,10 @@ var Or = Symbol("onEntry"), Rs = Symbol("checkFs"), Tr = Symbol("checkFs2"), gs
70307
70598
  if (this.preservePaths || i.length === 0) return r();
70308
70599
  let o = e;
70309
70600
  for (let h of i) {
70310
- o = path.resolve(o, h);
70601
+ o = path$1.resolve(o, h);
70311
70602
  let [a, l] = ye(() => Vt.lstatSync(o));
70312
70603
  if (a) return r();
70313
- 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("/"))));
70314
70605
  }
70315
70606
  r();
70316
70607
  }
@@ -70421,7 +70712,7 @@ var uo = (s, t) => {
70421
70712
  }, Eo = (s, t) => {
70422
70713
  t.forEach((e) => {
70423
70714
  e.charAt(0) === "@" ? Ct({
70424
- file: path.resolve(s.cwd, e.slice(1)),
70715
+ file: path$1.resolve(s.cwd, e.slice(1)),
70425
70716
  sync: !0,
70426
70717
  noResume: !0,
70427
70718
  onReadEntry: (i) => s.add(i)
@@ -70429,7 +70720,7 @@ var uo = (s, t) => {
70429
70720
  }), s.end();
70430
70721
  }, wo = async (s, t) => {
70431
70722
  for (let e of t) e.charAt(0) === "@" ? await Ct({
70432
- file: path.resolve(String(s.cwd), e.slice(1)),
70723
+ file: path$1.resolve(String(s.cwd), e.slice(1)),
70433
70724
  noResume: !0,
70434
70725
  onReadEntry: (i) => s.add(i)
70435
70726
  }) : s.add(e);
@@ -70499,7 +70790,7 @@ var require_pend = /* @__PURE__ */ __commonJSMin(((exports, module) => {
70499
70790
  //#endregion
70500
70791
  //#region ../../node_modules/.pnpm/yauzl@3.3.1/node_modules/yauzl/fd-slicer.js
70501
70792
  var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
70502
- var fs$5 = __require("fs");
70793
+ var fs$6 = __require("fs");
70503
70794
  var util$2 = __require("util");
70504
70795
  var stream = __require("stream");
70505
70796
  var Readable = stream.Readable;
@@ -70519,7 +70810,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
70519
70810
  FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
70520
70811
  var self = this;
70521
70812
  self.pend.go(function(cb) {
70522
- fs$5.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer) {
70813
+ fs$6.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer) {
70523
70814
  cb();
70524
70815
  callback(err, bytesRead, buffer);
70525
70816
  });
@@ -70536,7 +70827,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
70536
70827
  self.refCount -= 1;
70537
70828
  if (self.refCount < 0) throw new Error("invalid unref");
70538
70829
  if (self.refCount > 0) return;
70539
- fs$5.close(self.fd, onCloseDone);
70830
+ fs$6.close(self.fd, onCloseDone);
70540
70831
  function onCloseDone(err) {
70541
70832
  if (err) self.emit("error", err);
70542
70833
  else self.emit("close");
@@ -70563,7 +70854,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
70563
70854
  }
70564
70855
  self.context.pend.go(function(cb) {
70565
70856
  var buffer = Buffer.allocUnsafe(toRead);
70566
- fs$5.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
70857
+ fs$6.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
70567
70858
  if (err) self.destroy(err);
70568
70859
  else if (bytesRead === 0) {
70569
70860
  self.push(null);
@@ -75202,6 +75493,35 @@ const DEFAULT_CONFIG = {
75202
75493
  truncatedMarker: "[Old tool result content cleared]"
75203
75494
  };
75204
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
+ /**
75205
75525
  * Lightweight compaction that truncates old tool results without an LLM call.
75206
75526
  *
75207
75527
  * When the context window is filling up (>= 50% by default), old tool result
@@ -75257,21 +75577,26 @@ var MicroCompaction = class {
75257
75577
  }
75258
75578
  /**
75259
75579
  * Apply micro-compaction to a message list: replace old tool results
75260
- * before the cutoff line with the truncated marker.
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.
75261
75583
  */
75262
75584
  compact(messages) {
75263
75585
  const config = this.config;
75586
+ const superseded = findSupersededPaths(messages, this.cutoff);
75264
75587
  const result = [];
75265
75588
  let i = 0;
75266
75589
  for (const msg of messages) {
75267
- if (i < this.cutoff && msg.role === "tool" && msg.toolCallId !== void 0 && estimateTokensForMessages([msg]) >= config.minContentTokens) result.push({
75268
- ...msg,
75269
- content: [{
75270
- type: "text",
75271
- text: config.truncatedMarker
75272
- }]
75273
- });
75274
- else result.push(msg);
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);
75275
75600
  i++;
75276
75601
  }
75277
75602
  return result;
@@ -93974,6 +94299,9 @@ var Agent = class {
93974
94299
  if (this.memoStore !== void 0 && screamHomeDir !== void 0) {
93975
94300
  this.memoStore.init();
93976
94301
  MemoryMemoStore.migrateLegacyStores(screamHomeDir);
94302
+ try {
94303
+ this.memoStore.setEmbeddingEngine(createFastEmbedEngine());
94304
+ } catch {}
93977
94305
  }
93978
94306
  this.sessionMemory = new SessionMemory(this);
93979
94307
  this.workingSet = new WorkingSet();
@@ -97495,7 +97823,7 @@ function buildMcpHttpHeaders(config, envLookup) {
97495
97823
  var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97496
97824
  module.exports = isexe;
97497
97825
  isexe.sync = sync;
97498
- var fs$3 = __require("fs");
97826
+ var fs$4 = __require("fs");
97499
97827
  function checkPathExt(path, options) {
97500
97828
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
97501
97829
  if (!pathext) return true;
@@ -97512,12 +97840,12 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97512
97840
  return checkPathExt(path, options);
97513
97841
  }
97514
97842
  function isexe(path, options, cb) {
97515
- fs$3.stat(path, function(er, stat) {
97843
+ fs$4.stat(path, function(er, stat) {
97516
97844
  cb(er, er ? false : checkStat(stat, path, options));
97517
97845
  });
97518
97846
  }
97519
97847
  function sync(path, options) {
97520
- return checkStat(fs$3.statSync(path), path, options);
97848
+ return checkStat(fs$4.statSync(path), path, options);
97521
97849
  }
97522
97850
  }));
97523
97851
  //#endregion
@@ -97525,14 +97853,14 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97525
97853
  var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97526
97854
  module.exports = isexe;
97527
97855
  isexe.sync = sync;
97528
- var fs$2 = __require("fs");
97856
+ var fs$3 = __require("fs");
97529
97857
  function isexe(path, options, cb) {
97530
- fs$2.stat(path, function(er, stat) {
97858
+ fs$3.stat(path, function(er, stat) {
97531
97859
  cb(er, er ? false : checkStat(stat, options));
97532
97860
  });
97533
97861
  }
97534
97862
  function sync(path, options) {
97535
- return checkStat(fs$2.statSync(path), options);
97863
+ return checkStat(fs$3.statSync(path), options);
97536
97864
  }
97537
97865
  function checkStat(stat, options) {
97538
97866
  return stat.isFile() && checkMode(stat, options);
@@ -97596,7 +97924,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97596
97924
  //#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
97597
97925
  var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97598
97926
  const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
97599
- const path$3 = __require("path");
97927
+ const path$4 = __require("path");
97600
97928
  const COLON = isWindows ? ";" : ":";
97601
97929
  const isexe = require_isexe();
97602
97930
  const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -97626,7 +97954,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97626
97954
  if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
97627
97955
  const ppRaw = pathEnv[i];
97628
97956
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
97629
- const pCmd = path$3.join(pathPart, cmd);
97957
+ const pCmd = path$4.join(pathPart, cmd);
97630
97958
  resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
97631
97959
  });
97632
97960
  const subStep = (p, i, ii) => new Promise((resolve, reject) => {
@@ -97647,7 +97975,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97647
97975
  for (let i = 0; i < pathEnv.length; i++) {
97648
97976
  const ppRaw = pathEnv[i];
97649
97977
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
97650
- const pCmd = path$3.join(pathPart, cmd);
97978
+ const pCmd = path$4.join(pathPart, cmd);
97651
97979
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
97652
97980
  for (let j = 0; j < pathExt.length; j++) {
97653
97981
  const cur = p + pathExt[j];
@@ -97678,7 +98006,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97678
98006
  //#endregion
97679
98007
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
97680
98008
  var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97681
- const path$2 = __require("path");
98009
+ const path$3 = __require("path");
97682
98010
  const which = require_which();
97683
98011
  const getPathKey = require_path_key();
97684
98012
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -97693,12 +98021,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
97693
98021
  try {
97694
98022
  resolved = which.sync(parsed.command, {
97695
98023
  path: env[getPathKey({ env })],
97696
- pathExt: withoutPathExt ? path$2.delimiter : void 0
98024
+ pathExt: withoutPathExt ? path$3.delimiter : void 0
97697
98025
  });
97698
98026
  } catch (e) {} finally {
97699
98027
  if (shouldSwitchCwd) process.chdir(cwd);
97700
98028
  }
97701
- if (resolved) resolved = path$2.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
98029
+ if (resolved) resolved = path$3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
97702
98030
  return resolved;
97703
98031
  }
97704
98032
  function resolveCommand(parsed) {
@@ -97747,16 +98075,16 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
97747
98075
  //#endregion
97748
98076
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
97749
98077
  var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97750
- const fs$1 = __require("fs");
98078
+ const fs$2 = __require("fs");
97751
98079
  const shebangCommand = require_shebang_command();
97752
98080
  function readShebang(command) {
97753
98081
  const size = 150;
97754
98082
  const buffer = Buffer.alloc(size);
97755
98083
  let fd;
97756
98084
  try {
97757
- fd = fs$1.openSync(command, "r");
97758
- fs$1.readSync(fd, buffer, 0, size, 0);
97759
- fs$1.closeSync(fd);
98085
+ fd = fs$2.openSync(command, "r");
98086
+ fs$2.readSync(fd, buffer, 0, size, 0);
98087
+ fs$2.closeSync(fd);
97760
98088
  } catch (e) {}
97761
98089
  return shebangCommand(buffer.toString());
97762
98090
  }
@@ -97765,7 +98093,7 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97765
98093
  //#endregion
97766
98094
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
97767
98095
  var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97768
- const path$1 = __require("path");
98096
+ const path$2 = __require("path");
97769
98097
  const resolveCommand = require_resolveCommand();
97770
98098
  const escape = require_escape();
97771
98099
  const readShebang = require_readShebang();
@@ -97788,7 +98116,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
97788
98116
  const needsShell = !isExecutableRegExp.test(commandFile);
97789
98117
  if (parsed.options.forceShell || needsShell) {
97790
98118
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
97791
- parsed.command = path$1.normalize(parsed.command);
98119
+ parsed.command = path$2.normalize(parsed.command);
97792
98120
  parsed.command = escape.command(parsed.command);
97793
98121
  parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
97794
98122
  parsed.args = [
@@ -99488,17 +99816,17 @@ const UNSUPPORTED_RUNTIME_FIELDS = [
99488
99816
  "bootstrap"
99489
99817
  ];
99490
99818
  async function parseManifest(pluginRoot) {
99491
- const rootJsonPath = path.join(pluginRoot, SCREAM_PLUGIN_ROOT_PATH);
99492
- const dirJsonPath = path.join(pluginRoot, SCREAM_PLUGIN_DIR_PATH);
99493
- 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);
99494
99822
  const rootJsonExists = await isFile$1(rootJsonPath);
99495
99823
  const dirJsonExists = await isFile$1(dirJsonPath);
99496
99824
  const claudeDirJsonExists = await isFile$1(claudeDirJsonPath);
99497
99825
  if (!rootJsonExists && !dirJsonExists && !claudeDirJsonExists) {
99498
- const skillMdPath = path.join(pluginRoot, BARE_SKILL_PATH);
99826
+ const skillMdPath = path$1.join(pluginRoot, BARE_SKILL_PATH);
99499
99827
  if (await isFile$1(skillMdPath)) return {
99500
99828
  manifest: {
99501
- name: path.basename(pluginRoot),
99829
+ name: path$1.basename(pluginRoot),
99502
99830
  skills: [pluginRoot]
99503
99831
  },
99504
99832
  manifestKind: "bare-skill",
@@ -99508,11 +99836,11 @@ async function parseManifest(pluginRoot) {
99508
99836
  const discoveredSkillDirs = await discoverSkillDirs(pluginRoot, 3);
99509
99837
  if (discoveredSkillDirs.length > 0) return {
99510
99838
  manifest: {
99511
- name: path.basename(pluginRoot),
99839
+ name: path$1.basename(pluginRoot),
99512
99840
  skills: discoveredSkillDirs
99513
99841
  },
99514
99842
  manifestKind: "bare-skill",
99515
- manifestPath: path.join(discoveredSkillDirs[0], BARE_SKILL_PATH),
99843
+ manifestPath: path$1.join(discoveredSkillDirs[0], BARE_SKILL_PATH),
99516
99844
  diagnostics: []
99517
99845
  };
99518
99846
  return { diagnostics: [{
@@ -99533,7 +99861,7 @@ async function parseManifest(pluginRoot) {
99533
99861
  shadowedManifestPath,
99534
99862
  diagnostics: [{
99535
99863
  severity: "error",
99536
- message: `Failed to parse ${path.relative(pluginRoot, manifestPath)}: ${error.message}`
99864
+ message: `Failed to parse ${path$1.relative(pluginRoot, manifestPath)}: ${error.message}`
99537
99865
  }]
99538
99866
  };
99539
99867
  }
@@ -99574,7 +99902,7 @@ async function parseManifest(pluginRoot) {
99574
99902
  }
99575
99903
  let skills = await resolveSkillsField(pluginRoot, raw["skills"], diagnostics);
99576
99904
  if (raw["skills"] === void 0) {
99577
- if (await isFile$1(path.join(pluginRoot, "SKILL.md"))) skills = [pluginRoot];
99905
+ if (await isFile$1(path$1.join(pluginRoot, "SKILL.md"))) skills = [pluginRoot];
99578
99906
  }
99579
99907
  const skillInstructions = typeof raw["skillInstructions"] === "string" ? raw["skillInstructions"] : void 0;
99580
99908
  recordUnsupportedRuntimeFields(raw, diagnostics);
@@ -99629,7 +99957,7 @@ async function resolveSkillsField(pluginRoot, raw, diagnostics) {
99629
99957
  });
99630
99958
  continue;
99631
99959
  }
99632
- const absolute = path.resolve(pluginRoot, entry);
99960
+ const absolute = path$1.resolve(pluginRoot, entry);
99633
99961
  let real;
99634
99962
  try {
99635
99963
  real = await realpath(absolute);
@@ -99663,7 +99991,7 @@ async function resolvePluginPathField(input) {
99663
99991
  });
99664
99992
  return;
99665
99993
  }
99666
- const absolute = path.resolve(input.pluginRoot, input.value);
99994
+ const absolute = path$1.resolve(input.pluginRoot, input.value);
99667
99995
  let real;
99668
99996
  try {
99669
99997
  real = await realpath(absolute);
@@ -99749,7 +100077,7 @@ async function normalizePluginMcpServer(input) {
99749
100077
  });
99750
100078
  if (resolvedCommand === void 0) return void 0;
99751
100079
  command = resolvedCommand;
99752
- } else if (command.includes("/") || path.isAbsolute(command)) {
100080
+ } else if (command.includes("/") || path$1.isAbsolute(command)) {
99753
100081
  input.diagnostics.push({
99754
100082
  severity: "warn",
99755
100083
  message: `"mcpServers.${input.name}.command" must be a PATH command or start with "./"`
@@ -99810,8 +100138,8 @@ function isObject(value) {
99810
100138
  return typeof value === "object" && value !== null && !Array.isArray(value);
99811
100139
  }
99812
100140
  function isWithin$1(child, parent) {
99813
- const relative = path.relative(parent, child);
99814
- return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
100141
+ const relative = path$1.relative(parent, child);
100142
+ return relative === "" || !relative.startsWith("..") && !path$1.isAbsolute(relative);
99815
100143
  }
99816
100144
  /**
99817
100145
  * Recursively scan for `SKILL.md` files up to `maxDepth` levels below `root`.
@@ -99830,15 +100158,15 @@ async function discoverSkillDirs(root, maxDepth) {
99830
100158
  }
99831
100159
  for (const entry of entries) {
99832
100160
  if (!entry.isDirectory()) continue;
99833
- const child = path.join(dir, entry.name);
99834
- 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);
99835
100163
  await walk(child, depth + 1);
99836
100164
  }
99837
100165
  }
99838
100166
  await walk(root, 1);
99839
100167
  const sorted = found.sort((a, b) => a.length - b.length);
99840
100168
  const result = [];
99841
- 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);
99842
100170
  return result;
99843
100171
  }
99844
100172
  async function isFile$1(p) {
@@ -99857,13 +100185,13 @@ async function isDir(p) {
99857
100185
  }
99858
100186
  //#endregion
99859
100187
  //#region ../../packages/agent-core/src/plugin/store.ts
99860
- const INSTALLED_REL = path.join("plugins", "installed.json");
100188
+ const INSTALLED_REL = path$1.join("plugins", "installed.json");
99861
100189
  const EMPTY = {
99862
100190
  version: 1,
99863
100191
  plugins: []
99864
100192
  };
99865
100193
  async function readInstalled(screamHomeDir) {
99866
- const filePath = path.join(screamHomeDir, INSTALLED_REL);
100194
+ const filePath = path$1.join(screamHomeDir, INSTALLED_REL);
99867
100195
  let text;
99868
100196
  try {
99869
100197
  text = await readFile(filePath, "utf8");
@@ -99880,9 +100208,9 @@ async function readInstalled(screamHomeDir) {
99880
100208
  }
99881
100209
  }
99882
100210
  async function writeInstalled(screamHomeDir, data) {
99883
- const dir = path.join(screamHomeDir, "plugins");
100211
+ const dir = path$1.join(screamHomeDir, "plugins");
99884
100212
  await mkdir(dir, { recursive: true });
99885
- const final = path.join(dir, "installed.json");
100213
+ const final = path$1.join(dir, "installed.json");
99886
100214
  const tmp = `${final}.tmp`;
99887
100215
  await writeFile(tmp, JSON.stringify(data, null, 2), "utf8");
99888
100216
  await rename(tmp, final);
@@ -99904,7 +100232,7 @@ async function downloadZip(url, signal) {
99904
100232
  }
99905
100233
  async function extractZip(buffer, destDir) {
99906
100234
  await mkdir(destDir, { recursive: true });
99907
- const destDirResolved = path.resolve(destDir);
100235
+ const destDirResolved = path$1.resolve(destDir);
99908
100236
  let settled = false;
99909
100237
  await new Promise((resolve, reject) => {
99910
100238
  (0, import_yauzl.fromBuffer)(buffer, { lazyEntries: true }, (openErr, zipfile) => {
@@ -99914,8 +100242,8 @@ async function extractZip(buffer, destDir) {
99914
100242
  }
99915
100243
  const onEntry = (entry) => {
99916
100244
  const fileName = entry.fileName;
99917
- const destPath = path.resolve(destDir, fileName);
99918
- 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)) {
99919
100247
  if (!settled) {
99920
100248
  settled = true;
99921
100249
  reject(/* @__PURE__ */ new Error(`Path traversal detected in zip entry: ${fileName}`));
@@ -99944,7 +100272,7 @@ async function extractZip(buffer, destDir) {
99944
100272
  zipfile.close();
99945
100273
  return;
99946
100274
  }
99947
- 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(() => {
99948
100276
  zipfile.readEntry();
99949
100277
  }).catch((error) => {
99950
100278
  if (!settled) {
@@ -99985,16 +100313,16 @@ async function detectPluginRoot(dir) {
99985
100313
  const childDirs = (await readdir(dir, { withFileTypes: true })).filter((entry) => entry.isDirectory());
99986
100314
  const childDir = childDirs.length === 1 ? childDirs[0] : void 0;
99987
100315
  if (childDir !== void 0) {
99988
- const child = path.join(dir, childDir.name);
100316
+ const child = path$1.join(dir, childDir.name);
99989
100317
  if (await hasManifest(child)) return child;
99990
100318
  }
99991
100319
  return dir;
99992
100320
  }
99993
100321
  async function hasManifest(dir) {
99994
- const rootManifest = path.join(dir, "scream.plugin.json");
99995
- const dirManifest = path.join(dir, ".scream-plugin", "plugin.json");
99996
- const claudeDirManifest = path.join(dir, ".claude-plugin", "plugin.json");
99997
- 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");
99998
100326
  return await isFile(rootManifest) || await isFile(dirManifest) || await isFile(claudeDirManifest) || await isFile(skillMd);
99999
100327
  }
100000
100328
  async function isFile(p) {
@@ -100143,7 +100471,7 @@ function resolveInstallSource(source) {
100143
100471
  kind: "zip-url",
100144
100472
  path: trimmed
100145
100473
  };
100146
- 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}")`);
100147
100475
  return {
100148
100476
  kind: "local-path",
100149
100477
  path: trimmed
@@ -100281,7 +100609,7 @@ var PluginManager = class {
100281
100609
  sourceType = "zip-url";
100282
100610
  }
100283
100611
  const buffer = await downloadZip(zipUrl);
100284
- const tmpDir = await mkdtemp(path.join(tmpdir(), "scream-plugin-zip-"));
100612
+ const tmpDir = await mkdtemp(path$1.join(tmpdir(), "scream-plugin-zip-"));
100285
100613
  try {
100286
100614
  const detectedRoot = await extractZip(buffer, tmpDir);
100287
100615
  parsed = await parseManifest(detectedRoot);
@@ -100465,7 +100793,7 @@ var PluginManager = class {
100465
100793
  };
100466
100794
  async function normalizeInstallRoot(rootPath) {
100467
100795
  const trimmed = rootPath.trim();
100468
- 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}")`);
100469
100797
  let resolved;
100470
100798
  try {
100471
100799
  resolved = await realpath(trimmed);
@@ -100476,10 +100804,10 @@ async function normalizeInstallRoot(rootPath) {
100476
100804
  return resolved;
100477
100805
  }
100478
100806
  async function copyPluginToManagedRoot(screamHomeDir, id, sourceRoot) {
100479
- const managedRoot = path.join(screamHomeDir, "plugins", "managed", id);
100480
- const managedDir = path.dirname(managedRoot);
100807
+ const managedRoot = path$1.join(screamHomeDir, "plugins", "managed", id);
100808
+ const managedDir = path$1.dirname(managedRoot);
100481
100809
  await mkdir(managedDir, { recursive: true });
100482
- const stagingRoot = await mkdtemp(path.join(managedDir, `${id}-`));
100810
+ const stagingRoot = await mkdtemp(path$1.join(managedDir, `${id}-`));
100483
100811
  try {
100484
100812
  await cp(sourceRoot, stagingRoot, { recursive: true });
100485
100813
  await rm(managedRoot, {
@@ -100623,7 +100951,7 @@ function withPluginMcpRuntime(config, pluginRoot, screamHomeDir) {
100623
100951
  };
100624
100952
  }
100625
100953
  function isScreamNativeBinary() {
100626
- return !path.basename(process.execPath).toLowerCase().startsWith("node");
100954
+ return !path$1.basename(process.execPath).toLowerCase().startsWith("node");
100627
100955
  }
100628
100956
  //#endregion
100629
100957
  //#region ../../node_modules/.pnpm/@mozilla+readability@0.6.0/node_modules/@mozilla/readability/Readability.js
@@ -114155,7 +114483,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
114155
114483
  //#endregion
114156
114484
  //#region ../../packages/agent-core/src/session/export/zip.ts
114157
114485
  var import_yazl = (/* @__PURE__ */ __commonJSMin(((exports) => {
114158
- var fs = __require("fs");
114486
+ var fs$1 = __require("fs");
114159
114487
  var Transform = __require("stream").Transform;
114160
114488
  var PassThrough$1 = __require("stream").PassThrough;
114161
114489
  var zlib = __require("zlib");
@@ -114184,14 +114512,14 @@ var import_yazl = (/* @__PURE__ */ __commonJSMin(((exports) => {
114184
114512
  if (shouldIgnoreAdding(self)) return;
114185
114513
  var entry = new Entry(metadataPath, false, options);
114186
114514
  self.entries.push(entry);
114187
- fs.stat(realPath, function(err, stats) {
114515
+ fs$1.stat(realPath, function(err, stats) {
114188
114516
  if (err) return self.emit("error", err);
114189
114517
  if (!stats.isFile()) return self.emit("error", /* @__PURE__ */ new Error("not a file: " + realPath));
114190
114518
  entry.uncompressedSize = stats.size;
114191
114519
  if (options.mtime == null) entry.setLastModDate(stats.mtime);
114192
114520
  if (options.mode == null) entry.setFileAttributesMode(stats.mode);
114193
114521
  entry.setFileDataPumpFunction(function() {
114194
- var readStream = fs.createReadStream(realPath);
114522
+ var readStream = fs$1.createReadStream(realPath);
114195
114523
  entry.state = Entry.FILE_DATA_IN_PROGRESS;
114196
114524
  readStream.on("error", function(err) {
114197
114525
  self.emit("error", err);
@@ -124517,9 +124845,9 @@ var PlanBoxComponent = class {
124517
124845
  const fallbackTitle = visibleWidth(fallbackWithStatus) <= budget ? fallbackWithStatus : fallback;
124518
124846
  const planPath = this.planPath;
124519
124847
  if (planPath === void 0 || planPath.length === 0) return fallbackTitle;
124520
- const basename = path.basename(planPath);
124848
+ const basename = path$1.basename(planPath);
124521
124849
  if (basename.length === 0) return fallbackTitle;
124522
- 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;
124523
124851
  if (visibleWidth(title) > budget) return fallbackTitle;
124524
124852
  return title;
124525
124853
  }
@@ -136913,7 +137241,7 @@ function sourceLabel(source) {
136913
137241
  }
136914
137242
  function formatProject(memo) {
136915
137243
  if (memo.projectDir.length === 0) return "";
136916
- return path$8.basename(memo.projectDir);
137244
+ return path$9.basename(memo.projectDir);
136917
137245
  }
136918
137246
  function formatTags(memo) {
136919
137247
  if (memo.tags === void 0 || memo.tags.length === 0) return "";
@@ -139842,8 +140170,8 @@ async function runPluginNodeEntry(entry, args) {
139842
140170
  await import(pathToFileURL(entryReal).href);
139843
140171
  }
139844
140172
  function isWithin(candidate, root) {
139845
- const relative = path.relative(root, candidate);
139846
- return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
140173
+ const relative = path$1.relative(root, candidate);
140174
+ return relative === "" || !relative.startsWith("..") && !path$1.isAbsolute(relative);
139847
140175
  }
139848
140176
  //#endregion
139849
140177
  //#region src/utils/process/proctitle.ts