visionclaw 0.1.159 → 0.1.161

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.
@@ -20175,23 +20175,192 @@ var require_prompts3 = __commonJS({
20175
20175
  }
20176
20176
  });
20177
20177
 
20178
+ // dist/utils/version-check.js
20179
+ function isBundled() {
20180
+ const v7 = "0.1.160";
20181
+ return typeof v7 === "string" && v7 !== "undefined";
20182
+ }
20183
+ function getPackageRoot() {
20184
+ const __dir = import_node_path3.default.dirname((0, import_node_url.fileURLToPath)(__importMetaUrl));
20185
+ return import_node_path3.default.resolve(__dir, isBundled() ? ".." : "../..");
20186
+ }
20187
+ function isLocalCheckoutPackageRoot(packageRoot) {
20188
+ return import_node_fs3.default.existsSync(import_node_path3.default.join(packageRoot, ".git")) || import_node_fs3.default.existsSync(import_node_path3.default.join(packageRoot, "src")) || import_node_fs3.default.existsSync(import_node_path3.default.join(packageRoot, "tsconfig.json"));
20189
+ }
20190
+ function getInstallationInfo() {
20191
+ return {
20192
+ packageRoot: PACKAGE_ROOT,
20193
+ isLocalCheckout: isLocalCheckoutPackageRoot(PACKAGE_ROOT)
20194
+ };
20195
+ }
20196
+ function getCurrentVersion() {
20197
+ const bundledVersion = "0.1.160";
20198
+ if (bundledVersion && bundledVersion !== "undefined") {
20199
+ return bundledVersion;
20200
+ }
20201
+ try {
20202
+ const pkg = JSON.parse(import_node_fs3.default.readFileSync(PACKAGE_JSON_PATH, "utf-8"));
20203
+ return pkg.version ?? "0.0.0";
20204
+ } catch {
20205
+ return "0.0.0";
20206
+ }
20207
+ }
20208
+ function compareSemver(a6, b10) {
20209
+ const parse5 = (v7) => v7.split(".").map((x9) => parseInt(x9, 10) || 0);
20210
+ const [aMaj, aMin, aPatch] = parse5(a6);
20211
+ const [bMaj, bMin, bPatch] = parse5(b10);
20212
+ if (aMaj !== bMaj)
20213
+ return aMaj - bMaj;
20214
+ if (aMin !== bMin)
20215
+ return aMin - bMin;
20216
+ return aPatch - bPatch;
20217
+ }
20218
+ async function getLatestNpmVersion() {
20219
+ const body = await httpGet(`https://registry.npmjs.org/${PACKAGE_NAME}/latest`);
20220
+ const parsed = JSON.parse(body);
20221
+ if (typeof parsed.version !== "string" || parsed.version.length === 0) {
20222
+ throw new Error("npm registry response did not include a version");
20223
+ }
20224
+ return parsed.version;
20225
+ }
20226
+ function getStatePath() {
20227
+ return import_node_path3.default.join(getConfigDir(), STATE_FILENAME);
20228
+ }
20229
+ function loadState() {
20230
+ try {
20231
+ const raw = import_node_fs3.default.readFileSync(getStatePath(), "utf-8");
20232
+ return JSON.parse(raw);
20233
+ } catch {
20234
+ return { lastCheckAt: 0 };
20235
+ }
20236
+ }
20237
+ function saveState(state2) {
20238
+ try {
20239
+ import_node_fs3.default.writeFileSync(getStatePath(), JSON.stringify(state2, null, 2), "utf-8");
20240
+ } catch {
20241
+ }
20242
+ }
20243
+ function shouldNotifyUpdate() {
20244
+ const state2 = loadState();
20245
+ const elapsed = Date.now() - state2.lastCheckAt;
20246
+ const due = elapsed >= CHECK_INTERVAL_MS;
20247
+ logger.debug(`Version check: last=${state2.lastCheckAt ? new Date(state2.lastCheckAt).toISOString() : "never"} elapsed=${Math.round(elapsed / 6e4)}min due=${due}`);
20248
+ return due;
20249
+ }
20250
+ function recordUpdateNotification(version5) {
20251
+ logger.debug(`Version check: recording notification for v${version5}`);
20252
+ saveState({
20253
+ lastCheckAt: Date.now(),
20254
+ lastNotifiedVersion: version5
20255
+ });
20256
+ }
20257
+ async function fetchChangelogFromNpm(latestVersion, fromVersion) {
20258
+ try {
20259
+ const url2 = `https://unpkg.com/${PACKAGE_NAME}@${latestVersion}/CHANGELOG.md`;
20260
+ logger.debug(`Version check: fetching changelog from ${url2}`);
20261
+ const body = await httpGet(url2);
20262
+ logger.debug(`Version check: fetched changelog (${body.length} bytes)`);
20263
+ const sections = extractChangelogSections(body, fromVersion);
20264
+ logger.debug(`Version check: extracted changelog sections (${sections.length} chars)`);
20265
+ return sections;
20266
+ } catch (err4) {
20267
+ logger.warn(`Version check: failed to fetch changelog: ${err4 instanceof Error ? err4.message : String(err4)}`);
20268
+ return void 0;
20269
+ }
20270
+ }
20271
+ function extractChangelogSections(changelog, fromVersion) {
20272
+ const lines = changelog.split("\n");
20273
+ const result = [];
20274
+ let capturing = false;
20275
+ for (const line of lines) {
20276
+ const match = /^## \[([^\]]+)\]/.exec(line);
20277
+ if (match) {
20278
+ const sectionVersion = match[1];
20279
+ if (compareSemver(sectionVersion, fromVersion) <= 0) {
20280
+ break;
20281
+ }
20282
+ capturing = true;
20283
+ }
20284
+ if (capturing) {
20285
+ result.push(line);
20286
+ }
20287
+ }
20288
+ return result.join("\n").trim();
20289
+ }
20290
+ function httpGet(url2, redirects = 0) {
20291
+ if (redirects > 5)
20292
+ return Promise.reject(new Error("Too many redirects"));
20293
+ return new Promise((resolve, reject) => {
20294
+ import_node_https.default.get(url2, { timeout: 1e4 }, (res) => {
20295
+ if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
20296
+ resolve(httpGet(res.headers.location, redirects + 1));
20297
+ return;
20298
+ }
20299
+ if (res.statusCode && res.statusCode >= 400) {
20300
+ reject(new Error(`HTTP ${res.statusCode}`));
20301
+ return;
20302
+ }
20303
+ let data2 = "";
20304
+ res.on("data", (chunk) => {
20305
+ data2 += chunk.toString();
20306
+ });
20307
+ res.on("end", () => resolve(data2));
20308
+ res.on("error", reject);
20309
+ }).on("error", reject);
20310
+ });
20311
+ }
20312
+ async function checkForUpdate() {
20313
+ const currentVersion = getCurrentVersion();
20314
+ logger.debug(`Version check: current=${currentVersion}, querying npm...`);
20315
+ const latestVersion = await getLatestNpmVersion();
20316
+ logger.debug(`Version check: latest=${latestVersion}`);
20317
+ if (compareSemver(latestVersion, currentVersion) <= 0) {
20318
+ logger.debug("Version check: already up to date");
20319
+ return { currentVersion, latestVersion, hasUpdate: false };
20320
+ }
20321
+ logger.debug(`Version check: update available ${currentVersion} \u2192 ${latestVersion}, fetching changelog...`);
20322
+ const changelog = await fetchChangelogFromNpm(latestVersion, currentVersion);
20323
+ return {
20324
+ currentVersion,
20325
+ latestVersion,
20326
+ hasUpdate: true,
20327
+ changelog
20328
+ };
20329
+ }
20330
+ var import_node_fs3, import_node_path3, import_node_url, import_node_https, PACKAGE_NAME, PACKAGE_ROOT, PACKAGE_JSON_PATH, CHECK_INTERVAL_MS, STATE_FILENAME;
20331
+ var init_version_check = __esm({
20332
+ "dist/utils/version-check.js"() {
20333
+ "use strict";
20334
+ import_node_fs3 = __toESM(require("node:fs"), 1);
20335
+ import_node_path3 = __toESM(require("node:path"), 1);
20336
+ import_node_url = require("node:url");
20337
+ import_node_https = __toESM(require("node:https"), 1);
20338
+ init_config();
20339
+ init_logger();
20340
+ PACKAGE_NAME = "visionclaw";
20341
+ PACKAGE_ROOT = getPackageRoot();
20342
+ PACKAGE_JSON_PATH = import_node_path3.default.join(PACKAGE_ROOT, "package.json");
20343
+ CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
20344
+ STATE_FILENAME = "version-check.json";
20345
+ }
20346
+ });
20347
+
20178
20348
  // dist/skills/install.js
20179
20349
  function getSkillsSourceDir() {
20180
- const builtinAssetDir = import_node_path3.default.join(__dirname2, "..", "builtin-skills");
20350
+ const root = getPackageRoot();
20181
20351
  const candidateDirs = [
20182
- builtinAssetDir,
20183
- __dirname2,
20184
- import_node_path3.default.join(__dirname2, "..", "..", "src", "skills")
20352
+ import_node_path4.default.join(root, "dist", "builtin-skills"),
20353
+ import_node_path4.default.join(root, "src", "skills")
20185
20354
  ];
20186
20355
  for (const dir of candidateDirs) {
20187
- if (!import_node_fs3.default.existsSync(dir))
20356
+ if (!import_node_fs4.default.existsSync(dir))
20188
20357
  continue;
20189
20358
  try {
20190
- const entries = import_node_fs3.default.readdirSync(dir, { withFileTypes: true });
20359
+ const entries = import_node_fs4.default.readdirSync(dir, { withFileTypes: true });
20191
20360
  const hasAnySkillFolder = entries.some((e6) => {
20192
20361
  if (!e6.isDirectory())
20193
20362
  return false;
20194
- return import_node_fs3.default.existsSync(import_node_path3.default.join(dir, e6.name, "SKILL.md"));
20363
+ return import_node_fs4.default.existsSync(import_node_path4.default.join(dir, e6.name, "SKILL.md"));
20195
20364
  });
20196
20365
  if (!hasAnySkillFolder)
20197
20366
  continue;
@@ -20206,8 +20375,8 @@ function getCatalogSourceDir() {
20206
20375
  const sourceDir = getSkillsSourceDir();
20207
20376
  if (!sourceDir)
20208
20377
  return null;
20209
- const catalogDir = import_node_path3.default.join(sourceDir, "catalog");
20210
- if (!import_node_fs3.default.existsSync(catalogDir))
20378
+ const catalogDir = import_node_path4.default.join(sourceDir, "catalog");
20379
+ if (!import_node_fs4.default.existsSync(catalogDir))
20211
20380
  return null;
20212
20381
  return catalogDir;
20213
20382
  }
@@ -20219,47 +20388,46 @@ function installBuiltinSkills(opts = {}) {
20219
20388
  return;
20220
20389
  }
20221
20390
  logger.debug(`Using built-in skills source: ${sourceDir}`);
20222
- if (!import_node_fs3.default.existsSync(targetDir)) {
20223
- import_node_fs3.default.mkdirSync(targetDir, { recursive: true });
20391
+ if (!import_node_fs4.default.existsSync(targetDir)) {
20392
+ import_node_fs4.default.mkdirSync(targetDir, { recursive: true });
20224
20393
  }
20225
- const entries = import_node_fs3.default.readdirSync(sourceDir, { withFileTypes: true });
20394
+ const entries = import_node_fs4.default.readdirSync(sourceDir, { withFileTypes: true });
20226
20395
  for (const entry of entries) {
20227
20396
  if (!entry.isDirectory())
20228
20397
  continue;
20229
- const skillSource = import_node_path3.default.join(sourceDir, entry.name);
20230
- const skillTarget = import_node_path3.default.join(targetDir, entry.name);
20231
- const skillFile = import_node_path3.default.join(skillSource, "SKILL.md");
20232
- if (!import_node_fs3.default.existsSync(skillFile))
20398
+ const skillSource = import_node_path4.default.join(sourceDir, entry.name);
20399
+ const skillTarget = import_node_path4.default.join(targetDir, entry.name);
20400
+ const skillFile = import_node_path4.default.join(skillSource, "SKILL.md");
20401
+ if (!import_node_fs4.default.existsSync(skillFile))
20233
20402
  continue;
20234
- const targetSkillMd = import_node_path3.default.join(skillTarget, "SKILL.md");
20235
- if (!opts.force && import_node_fs3.default.existsSync(targetSkillMd)) {
20403
+ const targetSkillMd = import_node_path4.default.join(skillTarget, "SKILL.md");
20404
+ if (!opts.force && import_node_fs4.default.existsSync(targetSkillMd)) {
20236
20405
  logger.debug(`Skill "${entry.name}" already installed, skipping`);
20237
20406
  continue;
20238
20407
  }
20239
- if (!import_node_fs3.default.existsSync(skillTarget)) {
20240
- import_node_fs3.default.mkdirSync(skillTarget, { recursive: true });
20408
+ if (!import_node_fs4.default.existsSync(skillTarget)) {
20409
+ import_node_fs4.default.mkdirSync(skillTarget, { recursive: true });
20241
20410
  }
20242
- const files = import_node_fs3.default.readdirSync(skillSource);
20411
+ const files = import_node_fs4.default.readdirSync(skillSource);
20243
20412
  for (const file2 of files) {
20244
- const src = import_node_path3.default.join(skillSource, file2);
20245
- const dst = import_node_path3.default.join(skillTarget, file2);
20246
- if (!opts.force && import_node_fs3.default.existsSync(dst))
20413
+ const src = import_node_path4.default.join(skillSource, file2);
20414
+ const dst = import_node_path4.default.join(skillTarget, file2);
20415
+ if (!opts.force && import_node_fs4.default.existsSync(dst))
20247
20416
  continue;
20248
- import_node_fs3.default.copyFileSync(src, dst);
20417
+ import_node_fs4.default.copyFileSync(src, dst);
20249
20418
  }
20250
20419
  logger.system(`${opts.force ? "Reinstalled" : "Installed"} built-in skill: ${entry.name}`);
20251
20420
  }
20252
20421
  }
20253
- var import_node_fs3, import_node_path3, import_node_url, __dirname2;
20422
+ var import_node_fs4, import_node_path4;
20254
20423
  var init_install = __esm({
20255
20424
  "dist/skills/install.js"() {
20256
20425
  "use strict";
20257
- import_node_fs3 = __toESM(require("node:fs"), 1);
20258
- import_node_path3 = __toESM(require("node:path"), 1);
20259
- import_node_url = require("node:url");
20426
+ import_node_fs4 = __toESM(require("node:fs"), 1);
20427
+ import_node_path4 = __toESM(require("node:path"), 1);
20260
20428
  init_config();
20261
20429
  init_logger();
20262
- __dirname2 = import_node_path3.default.dirname((0, import_node_url.fileURLToPath)(__importMetaUrl));
20430
+ init_version_check();
20263
20431
  }
20264
20432
  });
20265
20433
 
@@ -20348,11 +20516,11 @@ function upsertIngressRule(config2, hostname3, service) {
20348
20516
  };
20349
20517
  }
20350
20518
  function ensureIngressRule(tunnelId, hostname3, service) {
20351
- import_node_fs4.default.mkdirSync(CLOUDFLARED_DIR, { recursive: true });
20352
- const expectedCredentialsFile = import_node_path4.default.join(CLOUDFLARED_DIR, `${tunnelId}.json`);
20519
+ import_node_fs5.default.mkdirSync(CLOUDFLARED_DIR, { recursive: true });
20520
+ const expectedCredentialsFile = import_node_path5.default.join(CLOUDFLARED_DIR, `${tunnelId}.json`);
20353
20521
  let config2;
20354
- if (import_node_fs4.default.existsSync(CONFIG_PATH)) {
20355
- config2 = parseConfig(import_node_fs4.default.readFileSync(CONFIG_PATH, "utf-8"));
20522
+ if (import_node_fs5.default.existsSync(CONFIG_PATH)) {
20523
+ config2 = parseConfig(import_node_fs5.default.readFileSync(CONFIG_PATH, "utf-8"));
20356
20524
  config2.tunnel = tunnelId;
20357
20525
  config2.credentialsFile = expectedCredentialsFile;
20358
20526
  } else {
@@ -20367,18 +20535,18 @@ function ensureIngressRule(tunnelId, hostname3, service) {
20367
20535
  return;
20368
20536
  }
20369
20537
  config2 = upsertIngressRule(config2, hostname3, service);
20370
- import_node_fs4.default.writeFileSync(CONFIG_PATH, serializeConfig(config2), "utf-8");
20538
+ import_node_fs5.default.writeFileSync(CONFIG_PATH, serializeConfig(config2), "utf-8");
20371
20539
  }
20372
- var import_node_fs4, import_node_path4, import_node_os2, import_node_child_process, CLOUDFLARED_DIR, CONFIG_PATH;
20540
+ var import_node_fs5, import_node_path5, import_node_os2, import_node_child_process, CLOUDFLARED_DIR, CONFIG_PATH;
20373
20541
  var init_cloudflared_config = __esm({
20374
20542
  "dist/obs/cloudflared-config.js"() {
20375
20543
  "use strict";
20376
- import_node_fs4 = __toESM(require("node:fs"), 1);
20377
- import_node_path4 = __toESM(require("node:path"), 1);
20544
+ import_node_fs5 = __toESM(require("node:fs"), 1);
20545
+ import_node_path5 = __toESM(require("node:path"), 1);
20378
20546
  import_node_os2 = __toESM(require("node:os"), 1);
20379
20547
  import_node_child_process = require("node:child_process");
20380
- CLOUDFLARED_DIR = import_node_path4.default.join(import_node_os2.default.homedir(), ".cloudflared");
20381
- CONFIG_PATH = import_node_path4.default.join(CLOUDFLARED_DIR, "config.yml");
20548
+ CLOUDFLARED_DIR = import_node_path5.default.join(import_node_os2.default.homedir(), ".cloudflared");
20549
+ CONFIG_PATH = import_node_path5.default.join(CLOUDFLARED_DIR, "config.yml");
20382
20550
  }
20383
20551
  });
20384
20552
 
@@ -20412,7 +20580,7 @@ function resolvePhotoSourcePath(source) {
20412
20580
  return process.env.HOME ?? trimmed;
20413
20581
  }
20414
20582
  if (trimmed.startsWith("~/")) {
20415
- return import_node_path5.default.join(process.env.HOME ?? "", trimmed.slice(2));
20583
+ return import_node_path6.default.join(process.env.HOME ?? "", trimmed.slice(2));
20416
20584
  }
20417
20585
  return trimmed;
20418
20586
  }
@@ -20423,8 +20591,8 @@ async function setProfilePhotoAsync(botToken, source) {
20423
20591
  const optionNum = parseInt(source, 10);
20424
20592
  if (!isNaN(optionNum) && optionNum >= 1 && optionNum <= AVATAR_OPTIONS.length) {
20425
20593
  const opt = AVATAR_OPTIONS[optionNum - 1];
20426
- photoPath = import_node_path5.default.join(AVATARS_DIR, opt.file);
20427
- if (!import_node_fs5.default.existsSync(photoPath)) {
20594
+ photoPath = import_node_path6.default.join(AVATARS_DIR, opt.file);
20595
+ if (!import_node_fs6.default.existsSync(photoPath)) {
20428
20596
  logger.warn(`Avatar file not found at ${photoPath}`);
20429
20597
  return false;
20430
20598
  }
@@ -20435,19 +20603,19 @@ async function setProfilePhotoAsync(botToken, source) {
20435
20603
  return false;
20436
20604
  }
20437
20605
  const buffer = Buffer.from(await res.arrayBuffer());
20438
- tempFile = import_node_path5.default.join(AVATARS_DIR, `_temp_upload_${Date.now()}.jpg`);
20439
- import_node_fs5.default.writeFileSync(tempFile, buffer);
20606
+ tempFile = import_node_path6.default.join(AVATARS_DIR, `_temp_upload_${Date.now()}.jpg`);
20607
+ import_node_fs6.default.writeFileSync(tempFile, buffer);
20440
20608
  photoPath = tempFile;
20441
20609
  } else {
20442
20610
  const localPath = resolvePhotoSourcePath(source);
20443
- if (import_node_fs5.default.existsSync(localPath)) {
20611
+ if (import_node_fs6.default.existsSync(localPath)) {
20444
20612
  photoPath = localPath;
20445
20613
  } else {
20446
20614
  logger.warn(`Invalid profile photo source: ${source}`);
20447
20615
  return false;
20448
20616
  }
20449
20617
  }
20450
- const fileBuffer = import_node_fs5.default.readFileSync(photoPath);
20618
+ const fileBuffer = import_node_fs6.default.readFileSync(photoPath);
20451
20619
  logger.debug(`Setting bot profile photo from ${photoPath} (${fileBuffer.length} bytes)`);
20452
20620
  const data2 = await callSetProfilePhoto(botToken, fileBuffer);
20453
20621
  if (data2.ok) {
@@ -20460,27 +20628,53 @@ async function setProfilePhotoAsync(botToken, source) {
20460
20628
  logger.warn(`setMyProfilePhoto error: ${err4 instanceof Error ? err4.message : String(err4)}`);
20461
20629
  return false;
20462
20630
  } finally {
20463
- if (tempFile && import_node_fs5.default.existsSync(tempFile)) {
20464
- import_node_fs5.default.unlinkSync(tempFile);
20631
+ if (tempFile && import_node_fs6.default.existsSync(tempFile)) {
20632
+ import_node_fs6.default.unlinkSync(tempFile);
20465
20633
  }
20466
20634
  }
20467
20635
  }
20636
+ async function getBotDisplayName(botToken) {
20637
+ try {
20638
+ const res = await fetch(`https://api.telegram.org/bot${encodeURIComponent(botToken)}/getMyName`, { method: "GET", signal: AbortSignal.timeout(15e3) });
20639
+ const data2 = await res.json();
20640
+ if (data2.ok && typeof data2.result?.name === "string") {
20641
+ return data2.result.name;
20642
+ }
20643
+ } catch {
20644
+ }
20645
+ return null;
20646
+ }
20468
20647
  async function updateBotName(botToken, name, maxRetries = 2) {
20648
+ const desired = name.trim();
20649
+ if (!desired) {
20650
+ logger.warn("updateBotName: empty name after trim");
20651
+ return false;
20652
+ }
20653
+ const before = await getBotDisplayName(botToken);
20654
+ if (before !== null && before === desired) {
20655
+ logger.system(`Telegram bot name already "${desired}" \u2014 skipping setMyName`);
20656
+ return true;
20657
+ }
20469
20658
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
20470
20659
  try {
20471
- const res = await fetch(`https://api.telegram.org/bot${botToken}/setMyName`, {
20660
+ const res = await fetch(`https://api.telegram.org/bot${encodeURIComponent(botToken)}/setMyName`, {
20472
20661
  method: "POST",
20473
20662
  headers: { "Content-Type": "application/json" },
20474
- body: JSON.stringify({ name }),
20663
+ body: JSON.stringify({ name: desired }),
20475
20664
  signal: AbortSignal.timeout(3e4)
20476
20665
  });
20477
20666
  const data2 = await res.json();
20478
20667
  if (data2.ok) {
20479
- logger.system(`Telegram bot name updated to "${name}"`);
20668
+ logger.system(`Telegram bot name updated to "${desired}"`);
20480
20669
  return true;
20481
20670
  }
20482
20671
  const desc = data2.description ?? "";
20483
- const isRetryable = /timeout|gateway|retry|temporarily|too many/i.test(desc);
20672
+ const verified = await getBotDisplayName(botToken);
20673
+ if (verified !== null && verified === desired) {
20674
+ logger.system(`Telegram bot name already "${desired}" (setMyName returned error: ${desc || "unknown"})`);
20675
+ return true;
20676
+ }
20677
+ const isRetryable = /timeout|gateway|retry|temporarily/i.test(desc) && !/too many/i.test(desc);
20484
20678
  if (!isRetryable || attempt === maxRetries) {
20485
20679
  logger.warn(`Failed to update Telegram bot name: ${desc || "unknown error"}`);
20486
20680
  return false;
@@ -20489,6 +20683,11 @@ async function updateBotName(botToken, name, maxRetries = 2) {
20489
20683
  await new Promise((r6) => setTimeout(r6, 3e3 * (attempt + 1)));
20490
20684
  } catch (err4) {
20491
20685
  const msg = err4 instanceof Error ? err4.message : String(err4);
20686
+ const verified = await getBotDisplayName(botToken);
20687
+ if (verified !== null && verified === desired) {
20688
+ logger.system(`Telegram bot name already "${desired}" (after exception: ${msg})`);
20689
+ return true;
20690
+ }
20492
20691
  if (attempt === maxRetries) {
20493
20692
  logger.warn(`Failed to update Telegram bot name: ${msg}`);
20494
20693
  return false;
@@ -20499,16 +20698,15 @@ async function updateBotName(botToken, name, maxRetries = 2) {
20499
20698
  }
20500
20699
  return false;
20501
20700
  }
20502
- var import_node_fs5, import_node_path5, import_node_url2, __dirname3, AVATARS_DIR, AVATAR_OPTIONS;
20701
+ var import_node_fs6, import_node_path6, AVATARS_DIR, AVATAR_OPTIONS;
20503
20702
  var init_bot_profile = __esm({
20504
20703
  "dist/onboarding/bot-profile.js"() {
20505
20704
  "use strict";
20506
- import_node_fs5 = __toESM(require("node:fs"), 1);
20507
- import_node_path5 = __toESM(require("node:path"), 1);
20508
- import_node_url2 = require("node:url");
20705
+ import_node_fs6 = __toESM(require("node:fs"), 1);
20706
+ import_node_path6 = __toESM(require("node:path"), 1);
20509
20707
  init_logger();
20510
- __dirname3 = import_node_path5.default.dirname((0, import_node_url2.fileURLToPath)(__importMetaUrl));
20511
- AVATARS_DIR = import_node_path5.default.resolve(__dirname3, "../../assets/avatars");
20708
+ init_version_check();
20709
+ AVATARS_DIR = import_node_path6.default.resolve(getPackageRoot(), "assets/avatars");
20512
20710
  AVATAR_OPTIONS = [
20513
20711
  { name: "visionclaw", label: "VisionClaw", file: "visionclaw.jpg" },
20514
20712
  { name: "robot", label: "Friendly Robot", file: "robot.jpg" },
@@ -20524,7 +20722,7 @@ var init_bot_profile = __esm({
20524
20722
  // node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js
20525
20723
  function hasDockerEnv() {
20526
20724
  try {
20527
- import_node_fs6.default.statSync("/.dockerenv");
20725
+ import_node_fs7.default.statSync("/.dockerenv");
20528
20726
  return true;
20529
20727
  } catch {
20530
20728
  return false;
@@ -20532,7 +20730,7 @@ function hasDockerEnv() {
20532
20730
  }
20533
20731
  function hasDockerCGroup() {
20534
20732
  try {
20535
- return import_node_fs6.default.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
20733
+ return import_node_fs7.default.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
20536
20734
  } catch {
20537
20735
  return false;
20538
20736
  }
@@ -20543,10 +20741,10 @@ function isDocker() {
20543
20741
  }
20544
20742
  return isDockerCached;
20545
20743
  }
20546
- var import_node_fs6, isDockerCached;
20744
+ var import_node_fs7, isDockerCached;
20547
20745
  var init_is_docker = __esm({
20548
20746
  "node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js"() {
20549
- import_node_fs6 = __toESM(require("node:fs"), 1);
20747
+ import_node_fs7 = __toESM(require("node:fs"), 1);
20550
20748
  }
20551
20749
  });
20552
20750
 
@@ -20557,14 +20755,14 @@ function isInsideContainer() {
20557
20755
  }
20558
20756
  return cachedResult;
20559
20757
  }
20560
- var import_node_fs7, cachedResult, hasContainerEnv;
20758
+ var import_node_fs8, cachedResult, hasContainerEnv;
20561
20759
  var init_is_inside_container = __esm({
20562
20760
  "node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js"() {
20563
- import_node_fs7 = __toESM(require("node:fs"), 1);
20761
+ import_node_fs8 = __toESM(require("node:fs"), 1);
20564
20762
  init_is_docker();
20565
20763
  hasContainerEnv = () => {
20566
20764
  try {
20567
- import_node_fs7.default.statSync("/run/.containerenv");
20765
+ import_node_fs8.default.statSync("/run/.containerenv");
20568
20766
  return true;
20569
20767
  } catch {
20570
20768
  return false;
@@ -20574,12 +20772,12 @@ var init_is_inside_container = __esm({
20574
20772
  });
20575
20773
 
20576
20774
  // node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js
20577
- var import_node_process, import_node_os3, import_node_fs8, isWsl, is_wsl_default;
20775
+ var import_node_process, import_node_os3, import_node_fs9, isWsl, is_wsl_default;
20578
20776
  var init_is_wsl = __esm({
20579
20777
  "node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js"() {
20580
20778
  import_node_process = __toESM(require("node:process"), 1);
20581
20779
  import_node_os3 = __toESM(require("node:os"), 1);
20582
- import_node_fs8 = __toESM(require("node:fs"), 1);
20780
+ import_node_fs9 = __toESM(require("node:fs"), 1);
20583
20781
  init_is_inside_container();
20584
20782
  isWsl = () => {
20585
20783
  if (import_node_process.default.platform !== "linux") {
@@ -20592,7 +20790,7 @@ var init_is_wsl = __esm({
20592
20790
  return true;
20593
20791
  }
20594
20792
  try {
20595
- return import_node_fs8.default.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
20793
+ return import_node_fs9.default.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
20596
20794
  } catch {
20597
20795
  return false;
20598
20796
  }
@@ -20855,13 +21053,13 @@ function detectPlatformBinary({ [platform]: platformBinary }, { wsl }) {
20855
21053
  }
20856
21054
  return detectArchBinary(platformBinary);
20857
21055
  }
20858
- var import_node_process6, import_node_buffer, import_node_path6, import_node_url3, import_node_util5, import_node_child_process6, import_promises2, execFile5, __dirname4, localXdgOpenPath, platform, arch, pTryEach, baseOpen, open, apps, open_default;
21056
+ var import_node_process6, import_node_buffer, import_node_path7, import_node_url2, import_node_util5, import_node_child_process6, import_promises2, execFile5, __dirname2, localXdgOpenPath, platform, arch, pTryEach, baseOpen, open, apps, open_default;
20859
21057
  var init_open = __esm({
20860
21058
  "node_modules/.pnpm/open@10.2.0/node_modules/open/index.js"() {
20861
21059
  import_node_process6 = __toESM(require("node:process"), 1);
20862
21060
  import_node_buffer = require("node:buffer");
20863
- import_node_path6 = __toESM(require("node:path"), 1);
20864
- import_node_url3 = require("node:url");
21061
+ import_node_path7 = __toESM(require("node:path"), 1);
21062
+ import_node_url2 = require("node:url");
20865
21063
  import_node_util5 = require("node:util");
20866
21064
  import_node_child_process6 = __toESM(require("node:child_process"), 1);
20867
21065
  import_promises2 = __toESM(require("node:fs/promises"), 1);
@@ -20870,8 +21068,8 @@ var init_open = __esm({
20870
21068
  init_default_browser();
20871
21069
  init_is_inside_container();
20872
21070
  execFile5 = (0, import_node_util5.promisify)(import_node_child_process6.default.execFile);
20873
- __dirname4 = import_node_path6.default.dirname((0, import_node_url3.fileURLToPath)(__importMetaUrl));
20874
- localXdgOpenPath = import_node_path6.default.join(__dirname4, "xdg-open");
21071
+ __dirname2 = import_node_path7.default.dirname((0, import_node_url2.fileURLToPath)(__importMetaUrl));
21072
+ localXdgOpenPath = import_node_path7.default.join(__dirname2, "xdg-open");
20875
21073
  ({ platform, arch } = import_node_process6.default);
20876
21074
  pTryEach = async (array2, mapper) => {
20877
21075
  let latestError;
@@ -20993,14 +21191,14 @@ var init_open = __esm({
20993
21191
  if (app) {
20994
21192
  command = app;
20995
21193
  } else {
20996
- const isBundled = !__dirname4 || __dirname4 === "/";
21194
+ const isBundled2 = !__dirname2 || __dirname2 === "/";
20997
21195
  let exeLocalXdgOpen = false;
20998
21196
  try {
20999
21197
  await import_promises2.default.access(localXdgOpenPath, import_promises2.constants.X_OK);
21000
21198
  exeLocalXdgOpen = true;
21001
21199
  } catch {
21002
21200
  }
21003
- const useSystemXdgOpen = import_node_process6.default.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen);
21201
+ const useSystemXdgOpen = import_node_process6.default.versions.electron ?? (platform === "android" || isBundled2 || !exeLocalXdgOpen);
21004
21202
  command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
21005
21203
  }
21006
21204
  if (appArguments.length > 0) {
@@ -675856,7 +676054,7 @@ ${authUrl}
675856
676054
  server.on("request", (req, res) => {
675857
676055
  void (async () => {
675858
676056
  try {
675859
- const url2 = new import_node_url4.URL(req.url ?? "/", `http://127.0.0.1:${addr.port}`);
676057
+ const url2 = new import_node_url3.URL(req.url ?? "/", `http://127.0.0.1:${addr.port}`);
675860
676058
  if (url2.pathname !== "/callback") {
675861
676059
  res.writeHead(404);
675862
676060
  res.end("Not found");
@@ -675920,12 +676118,12 @@ ${authUrl}
675920
676118
  });
675921
676119
  });
675922
676120
  }
675923
- var import_node_http, import_node_url4, import_googleapis, SCOPES;
676121
+ var import_node_http, import_node_url3, import_googleapis, SCOPES;
675924
676122
  var init_google_auth = __esm({
675925
676123
  "dist/onboarding/google-auth.js"() {
675926
676124
  "use strict";
675927
676125
  import_node_http = __toESM(require("node:http"), 1);
675928
- import_node_url4 = require("node:url");
676126
+ import_node_url3 = require("node:url");
675929
676127
  init_open();
675930
676128
  import_googleapis = __toESM(require_src9(), 1);
675931
676129
  init_config();
@@ -675948,7 +676146,7 @@ function resolveNodeBinaryPath() {
675948
676146
  const whichPath = (0, import_node_child_process7.execSync)("which node", { encoding: "utf-8" }).trim();
675949
676147
  if (!whichPath)
675950
676148
  return null;
675951
- return (0, import_node_fs9.realpathSync)(whichPath);
676149
+ return (0, import_node_fs10.realpathSync)(whichPath);
675952
676150
  } catch {
675953
676151
  return null;
675954
676152
  }
@@ -675964,7 +676162,7 @@ function resolveCliclickBinaryPath() {
675964
676162
  const whichPath = (0, import_node_child_process7.execSync)("which cliclick", { encoding: "utf-8" }).trim();
675965
676163
  if (!whichPath)
675966
676164
  return null;
675967
- return (0, import_node_fs9.realpathSync)(whichPath);
676165
+ return (0, import_node_fs10.realpathSync)(whichPath);
675968
676166
  } catch {
675969
676167
  return null;
675970
676168
  }
@@ -676315,21 +676513,21 @@ async function checkDownloadsFolderPermission() {
676315
676513
  }
676316
676514
  }
676317
676515
  async function runSwiftCheck(label, code) {
676318
- const base = (0, import_node_path7.join)((0, import_node_os4.tmpdir)(), `visionclaw-perm-check-${label}`);
676516
+ const base = (0, import_node_path8.join)((0, import_node_os4.tmpdir)(), `visionclaw-perm-check-${label}`);
676319
676517
  const src = `${base}.swift`;
676320
676518
  const bin = base;
676321
676519
  try {
676322
- (0, import_node_fs9.writeFileSync)(src, code, "utf-8");
676520
+ (0, import_node_fs10.writeFileSync)(src, code, "utf-8");
676323
676521
  await execAsync(`swiftc -O -o "${bin}" "${src}" 2>/dev/null`, { timeout: 3e4 });
676324
676522
  try {
676325
- (0, import_node_fs9.unlinkSync)(src);
676523
+ (0, import_node_fs10.unlinkSync)(src);
676326
676524
  } catch {
676327
676525
  }
676328
676526
  await execAsync(`"${bin}"`, { timeout: 1e4 });
676329
676527
  return true;
676330
676528
  } catch {
676331
676529
  try {
676332
- (0, import_node_fs9.unlinkSync)(src);
676530
+ (0, import_node_fs10.unlinkSync)(src);
676333
676531
  } catch {
676334
676532
  }
676335
676533
  return false;
@@ -676488,14 +676686,14 @@ async function checkMacOSPermissions() {
676488
676686
  }
676489
676687
  return allGranted;
676490
676688
  }
676491
- var import_node_child_process7, import_node_fs9, import_node_os4, import_node_path7, import_node_util6, execAsync, TERMINAL_BUNDLE_ID, TERMINAL_NAME, cachedNodePath, cachedCliclickPath, TCC_SERVICES, WHISPER_MODEL_DIR, WHISPER_MODEL_FILENAME, WHISPER_MODEL_PATH, WHISPER_MODEL_URL;
676689
+ var import_node_child_process7, import_node_fs10, import_node_os4, import_node_path8, import_node_util6, execAsync, TERMINAL_BUNDLE_ID, TERMINAL_NAME, cachedNodePath, cachedCliclickPath, TCC_SERVICES, WHISPER_MODEL_DIR, WHISPER_MODEL_FILENAME, WHISPER_MODEL_PATH, WHISPER_MODEL_URL;
676492
676690
  var init_macos_permissions = __esm({
676493
676691
  "dist/onboarding/macos-permissions.js"() {
676494
676692
  "use strict";
676495
676693
  import_node_child_process7 = require("node:child_process");
676496
- import_node_fs9 = require("node:fs");
676694
+ import_node_fs10 = require("node:fs");
676497
676695
  import_node_os4 = require("node:os");
676498
- import_node_path7 = require("node:path");
676696
+ import_node_path8 = require("node:path");
676499
676697
  import_node_util6 = require("node:util");
676500
676698
  execAsync = (0, import_node_util6.promisify)(import_node_child_process7.exec);
676501
676699
  TERMINAL_BUNDLE_ID = "com.apple.Terminal";
@@ -676534,7 +676732,7 @@ function resolveLocalSourcePath(source) {
676534
676732
  return import_node_os5.default.homedir();
676535
676733
  }
676536
676734
  if (trimmed.startsWith("~/")) {
676537
- return import_node_path8.default.join(import_node_os5.default.homedir(), trimmed.slice(2));
676735
+ return import_node_path9.default.join(import_node_os5.default.homedir(), trimmed.slice(2));
676538
676736
  }
676539
676737
  return trimmed;
676540
676738
  }
@@ -676542,7 +676740,7 @@ async function installCloudflaredCertPem(source) {
676542
676740
  if (!source.trim()) {
676543
676741
  throw new Error("cloudflared.certPemSource is required when cloudflared is enabled");
676544
676742
  }
676545
- import_node_fs10.default.mkdirSync(CLOUDFLARED_DIR2, { recursive: true });
676743
+ import_node_fs11.default.mkdirSync(CLOUDFLARED_DIR2, { recursive: true });
676546
676744
  if (isRemoteSource(source)) {
676547
676745
  const response = await fetch(source, {
676548
676746
  signal: AbortSignal.timeout(3e4)
@@ -676551,25 +676749,25 @@ async function installCloudflaredCertPem(source) {
676551
676749
  throw new Error(`Failed to fetch cert.pem: HTTP ${response.status}`);
676552
676750
  }
676553
676751
  const content = Buffer.from(await response.arrayBuffer());
676554
- import_node_fs10.default.writeFileSync(CERT_PEM_PATH, content);
676752
+ import_node_fs11.default.writeFileSync(CERT_PEM_PATH, content);
676555
676753
  return CERT_PEM_PATH;
676556
676754
  }
676557
676755
  const localSourcePath = resolveLocalSourcePath(source);
676558
- if (!import_node_fs10.default.existsSync(localSourcePath)) {
676756
+ if (!import_node_fs11.default.existsSync(localSourcePath)) {
676559
676757
  throw new Error(`cloudflared cert.pem source file not found: ${source}`);
676560
676758
  }
676561
- import_node_fs10.default.copyFileSync(localSourcePath, CERT_PEM_PATH);
676759
+ import_node_fs11.default.copyFileSync(localSourcePath, CERT_PEM_PATH);
676562
676760
  return CERT_PEM_PATH;
676563
676761
  }
676564
- var import_node_fs10, import_node_os5, import_node_path8, CLOUDFLARED_DIR2, CERT_PEM_PATH;
676762
+ var import_node_fs11, import_node_os5, import_node_path9, CLOUDFLARED_DIR2, CERT_PEM_PATH;
676565
676763
  var init_cloudflared_cert = __esm({
676566
676764
  "dist/onboarding/cloudflared-cert.js"() {
676567
676765
  "use strict";
676568
- import_node_fs10 = __toESM(require("node:fs"), 1);
676766
+ import_node_fs11 = __toESM(require("node:fs"), 1);
676569
676767
  import_node_os5 = __toESM(require("node:os"), 1);
676570
- import_node_path8 = __toESM(require("node:path"), 1);
676571
- CLOUDFLARED_DIR2 = import_node_path8.default.join(import_node_os5.default.homedir(), ".cloudflared");
676572
- CERT_PEM_PATH = import_node_path8.default.join(CLOUDFLARED_DIR2, "cert.pem");
676768
+ import_node_path9 = __toESM(require("node:path"), 1);
676769
+ CLOUDFLARED_DIR2 = import_node_path9.default.join(import_node_os5.default.homedir(), ".cloudflared");
676770
+ CERT_PEM_PATH = import_node_path9.default.join(CLOUDFLARED_DIR2, "cert.pem");
676573
676771
  }
676574
676772
  });
676575
676773
 
@@ -676634,12 +676832,12 @@ async function readProvisioningSource(source) {
676634
676832
  content: await fetchFromOnboardingService(url2)
676635
676833
  };
676636
676834
  }
676637
- if (!import_node_fs11.default.existsSync(source)) {
676835
+ if (!import_node_fs12.default.existsSync(source)) {
676638
676836
  throw new Error(`Provisioning JSON file not found: ${source}`);
676639
676837
  }
676640
676838
  return {
676641
676839
  sourceType: "local",
676642
- content: import_node_fs11.default.readFileSync(source, "utf-8")
676840
+ content: import_node_fs12.default.readFileSync(source, "utf-8")
676643
676841
  };
676644
676842
  }
676645
676843
  async function loadProvisioningSpec(source) {
@@ -676655,11 +676853,11 @@ async function loadProvisioningSpec(source) {
676655
676853
  spec: ProvisioningSpecSchema.parse(parsed)
676656
676854
  };
676657
676855
  }
676658
- var import_node_fs11, GoogleServiceAccountSchema, AwsConfigSchema, GoogleWorkspaceConfigSchema, GoogleOAuthConfigSchema, TelegramConfigSchema, CloudflaredConfigSchema, GithubConfigSchema, GboxTunConfigSchema, OnboardingServiceConfigSchema, ProvisioningSpecSchema;
676856
+ var import_node_fs12, GoogleServiceAccountSchema, AwsConfigSchema, GoogleWorkspaceConfigSchema, GoogleOAuthConfigSchema, TelegramConfigSchema, CloudflaredConfigSchema, GithubConfigSchema, GboxTunConfigSchema, OnboardingServiceConfigSchema, ProvisioningSpecSchema;
676659
676857
  var init_provisioning_spec = __esm({
676660
676858
  "dist/onboarding/provisioning-spec.js"() {
676661
676859
  "use strict";
676662
- import_node_fs11 = __toESM(require("node:fs"), 1);
676860
+ import_node_fs12 = __toESM(require("node:fs"), 1);
676663
676861
  init_zod();
676664
676862
  GoogleServiceAccountSchema = external_exports.object({
676665
676863
  type: external_exports.string().min(1),
@@ -685076,15 +685274,15 @@ var init_provision_workspace_account = __esm({
685076
685274
 
685077
685275
  // dist/onboarding/setup-state.js
685078
685276
  function getSetupStateFile() {
685079
- return import_node_path9.default.join(getConfigDir(), "setup-state.json");
685277
+ return import_node_path10.default.join(getConfigDir(), "setup-state.json");
685080
685278
  }
685081
685279
  function loadSetupState() {
685082
685280
  const file2 = getSetupStateFile();
685083
- if (!import_node_fs12.default.existsSync(file2)) {
685281
+ if (!import_node_fs13.default.existsSync(file2)) {
685084
685282
  return SetupStateSchema.parse({});
685085
685283
  }
685086
685284
  try {
685087
- const raw = JSON.parse(import_node_fs12.default.readFileSync(file2, "utf-8"));
685285
+ const raw = JSON.parse(import_node_fs13.default.readFileSync(file2, "utf-8"));
685088
685286
  return SetupStateSchema.parse(raw);
685089
685287
  } catch {
685090
685288
  return SetupStateSchema.parse({});
@@ -685092,7 +685290,7 @@ function loadSetupState() {
685092
685290
  }
685093
685291
  function saveSetupState(state2) {
685094
685292
  ensureConfigDir();
685095
- import_node_fs12.default.writeFileSync(getSetupStateFile(), JSON.stringify(state2, null, 2), "utf-8");
685293
+ import_node_fs13.default.writeFileSync(getSetupStateFile(), JSON.stringify(state2, null, 2), "utf-8");
685096
685294
  }
685097
685295
  function updateSetupState(patch) {
685098
685296
  const nextState = SetupStateSchema.parse({
@@ -685104,16 +685302,16 @@ function updateSetupState(patch) {
685104
685302
  }
685105
685303
  function deleteSetupState() {
685106
685304
  const file2 = getSetupStateFile();
685107
- if (import_node_fs12.default.existsSync(file2)) {
685108
- import_node_fs12.default.unlinkSync(file2);
685305
+ if (import_node_fs13.default.existsSync(file2)) {
685306
+ import_node_fs13.default.unlinkSync(file2);
685109
685307
  }
685110
685308
  }
685111
- var import_node_fs12, import_node_path9, SetupStateSchema;
685309
+ var import_node_fs13, import_node_path10, SetupStateSchema;
685112
685310
  var init_setup_state = __esm({
685113
685311
  "dist/onboarding/setup-state.js"() {
685114
685312
  "use strict";
685115
- import_node_fs12 = __toESM(require("node:fs"), 1);
685116
- import_node_path9 = __toESM(require("node:path"), 1);
685313
+ import_node_fs13 = __toESM(require("node:fs"), 1);
685314
+ import_node_path10 = __toESM(require("node:path"), 1);
685117
685315
  init_zod();
685118
685316
  init_config();
685119
685317
  SetupStateSchema = external_exports.object({
@@ -685184,13 +685382,13 @@ function generatePlist(options) {
685184
685382
  </dict>
685185
685383
 
685186
685384
  <key>WorkingDirectory</key>
685187
- <string>${escapeXml((0, import_node_path10.join)((0, import_node_os6.homedir)(), ".visionclaw", "bin"))}</string>
685385
+ <string>${escapeXml((0, import_node_path11.join)((0, import_node_os6.homedir)(), ".visionclaw", "bin"))}</string>
685188
685386
 
685189
685387
  <key>StandardOutPath</key>
685190
- <string>${escapeXml((0, import_node_path10.join)(LOG_DIR, "gbox-tun-stdout.log"))}</string>
685388
+ <string>${escapeXml((0, import_node_path11.join)(LOG_DIR, "gbox-tun-stdout.log"))}</string>
685191
685389
 
685192
685390
  <key>StandardErrorPath</key>
685193
- <string>${escapeXml((0, import_node_path10.join)(LOG_DIR, "gbox-tun-stderr.log"))}</string>
685391
+ <string>${escapeXml((0, import_node_path11.join)(LOG_DIR, "gbox-tun-stderr.log"))}</string>
685194
685392
  </dict>
685195
685393
  </plist>
685196
685394
  `;
@@ -685212,9 +685410,9 @@ async function downloadGboxTunBinary(_server) {
685212
685410
  throw new Error(`Failed to download gbox-tun: HTTP ${response.status}`);
685213
685411
  }
685214
685412
  const buffer = Buffer.from(await response.arrayBuffer());
685215
- (0, import_node_fs13.mkdirSync)((0, import_node_path10.dirname)(GBOX_TUN_BIN), { recursive: true });
685216
- (0, import_node_fs13.writeFileSync)(GBOX_TUN_BIN, buffer);
685217
- (0, import_node_fs13.chmodSync)(GBOX_TUN_BIN, 493);
685413
+ (0, import_node_fs14.mkdirSync)((0, import_node_path11.dirname)(GBOX_TUN_BIN), { recursive: true });
685414
+ (0, import_node_fs14.writeFileSync)(GBOX_TUN_BIN, buffer);
685415
+ (0, import_node_fs14.chmodSync)(GBOX_TUN_BIN, 493);
685218
685416
  ok(`Downloaded gbox-tun (${buffer.length} bytes)`);
685219
685417
  }
685220
685418
  async function installGboxTunService(options) {
@@ -685225,7 +685423,7 @@ async function installGboxTunService(options) {
685225
685423
  console.log(`
685226
685424
  ${BOLD2}Installing gbox-tun as a system daemon...${RESET2}
685227
685425
  `);
685228
- if (!(0, import_node_fs13.existsSync)(GBOX_TUN_BIN)) {
685426
+ if (!(0, import_node_fs14.existsSync)(GBOX_TUN_BIN)) {
685229
685427
  try {
685230
685428
  await downloadGboxTunBinary(options.server);
685231
685429
  } catch (err4) {
@@ -685239,17 +685437,17 @@ ${BOLD2}Installing gbox-tun as a system daemon...${RESET2}
685239
685437
  stdio: "inherit"
685240
685438
  });
685241
685439
  }
685242
- (0, import_node_fs13.mkdirSync)(LOG_DIR, { recursive: true });
685440
+ (0, import_node_fs14.mkdirSync)(LOG_DIR, { recursive: true });
685243
685441
  const plist = generatePlist(options);
685244
685442
  const tmpPlist = `/tmp/${LABEL}.plist`;
685245
- (0, import_node_fs13.writeFileSync)(tmpPlist, plist, "utf-8");
685443
+ (0, import_node_fs14.writeFileSync)(tmpPlist, plist, "utf-8");
685246
685444
  try {
685247
685445
  (0, import_node_child_process8.execSync)(`sudo cp "${tmpPlist}" "${PLIST_PATH}"`, { stdio: "inherit" });
685248
685446
  (0, import_node_child_process8.execSync)(`sudo chmod 644 "${PLIST_PATH}"`, { stdio: "inherit" });
685249
685447
  (0, import_node_child_process8.execSync)(`sudo chown root:wheel "${PLIST_PATH}"`, { stdio: "inherit" });
685250
685448
  } finally {
685251
685449
  try {
685252
- (0, import_node_fs13.unlinkSync)(tmpPlist);
685450
+ (0, import_node_fs14.unlinkSync)(tmpPlist);
685253
685451
  } catch {
685254
685452
  }
685255
685453
  }
@@ -685287,7 +685485,7 @@ ${BOLD2}Uninstalling gbox-tun system daemon...${RESET2}
685287
685485
  } else {
685288
685486
  ok("gbox-tun daemon was not loaded");
685289
685487
  }
685290
- if ((0, import_node_fs13.existsSync)(PLIST_PATH)) {
685488
+ if ((0, import_node_fs14.existsSync)(PLIST_PATH)) {
685291
685489
  try {
685292
685490
  (0, import_node_child_process8.execSync)(`sudo rm "${PLIST_PATH}"`, { stdio: "inherit" });
685293
685491
  ok(`Plist removed: ${DIM2}${PLIST_PATH}${RESET2}`);
@@ -685297,8 +685495,8 @@ ${BOLD2}Uninstalling gbox-tun system daemon...${RESET2}
685297
685495
  } else {
685298
685496
  ok("Plist file did not exist");
685299
685497
  }
685300
- if ((0, import_node_fs13.existsSync)(GBOX_TUN_BIN)) {
685301
- (0, import_node_fs13.unlinkSync)(GBOX_TUN_BIN);
685498
+ if ((0, import_node_fs14.existsSync)(GBOX_TUN_BIN)) {
685499
+ (0, import_node_fs14.unlinkSync)(GBOX_TUN_BIN);
685302
685500
  ok(`gbox-tun binary removed: ${DIM2}${GBOX_TUN_BIN}${RESET2}`);
685303
685501
  }
685304
685502
  console.log(`
@@ -685313,14 +685511,14 @@ function printGboxTunServiceStatus() {
685313
685511
  console.log(`
685314
685512
  ${BOLD2}gbox-tun Service Status${RESET2}
685315
685513
  `);
685316
- if (!(0, import_node_fs13.existsSync)(GBOX_TUN_BIN)) {
685514
+ if (!(0, import_node_fs14.existsSync)(GBOX_TUN_BIN)) {
685317
685515
  fail("gbox-tun binary not installed");
685318
685516
  console.log(` Run ${DIM2}visionclaw setup${RESET2} to install gbox-tun.
685319
685517
  `);
685320
685518
  return;
685321
685519
  }
685322
685520
  ok(`Binary: ${DIM2}${GBOX_TUN_BIN}${RESET2}`);
685323
- if ((0, import_node_fs13.existsSync)(PLIST_PATH)) {
685521
+ if ((0, import_node_fs14.existsSync)(PLIST_PATH)) {
685324
685522
  ok(`Plist installed: ${DIM2}${PLIST_PATH}${RESET2}`);
685325
685523
  } else {
685326
685524
  fail("Plist not installed");
@@ -685347,19 +685545,19 @@ ${BOLD2}gbox-tun Service Status${RESET2}
685347
685545
  }
685348
685546
  console.log("");
685349
685547
  }
685350
- var import_node_child_process8, import_node_fs13, import_node_os6, import_node_path10, LABEL, LAUNCH_DAEMONS_DIR, PLIST_PATH, GBOX_TUN_BIN, LOG_DIR, GREEN2, RED2, YELLOW2, DIM2, RESET2, BOLD2;
685548
+ var import_node_child_process8, import_node_fs14, import_node_os6, import_node_path11, LABEL, LAUNCH_DAEMONS_DIR, PLIST_PATH, GBOX_TUN_BIN, LOG_DIR, GREEN2, RED2, YELLOW2, DIM2, RESET2, BOLD2;
685351
685549
  var init_gbox_tun = __esm({
685352
685550
  "dist/service/gbox-tun.js"() {
685353
685551
  "use strict";
685354
685552
  import_node_child_process8 = require("node:child_process");
685355
- import_node_fs13 = require("node:fs");
685553
+ import_node_fs14 = require("node:fs");
685356
685554
  import_node_os6 = require("node:os");
685357
- import_node_path10 = require("node:path");
685555
+ import_node_path11 = require("node:path");
685358
685556
  LABEL = "dev.visionclaw.gbox-tun";
685359
685557
  LAUNCH_DAEMONS_DIR = "/Library/LaunchDaemons";
685360
- PLIST_PATH = (0, import_node_path10.join)(LAUNCH_DAEMONS_DIR, `${LABEL}.plist`);
685361
- GBOX_TUN_BIN = (0, import_node_path10.join)((0, import_node_os6.homedir)(), ".visionclaw", "bin", "gbox-tun");
685362
- LOG_DIR = (0, import_node_path10.join)((0, import_node_os6.homedir)(), ".visionclaw", "logs");
685558
+ PLIST_PATH = (0, import_node_path11.join)(LAUNCH_DAEMONS_DIR, `${LABEL}.plist`);
685559
+ GBOX_TUN_BIN = (0, import_node_path11.join)((0, import_node_os6.homedir)(), ".visionclaw", "bin", "gbox-tun");
685560
+ LOG_DIR = (0, import_node_path11.join)((0, import_node_os6.homedir)(), ".visionclaw", "logs");
685363
685561
  GREEN2 = "\x1B[32m";
685364
685562
  RED2 = "\x1B[31m";
685365
685563
  YELLOW2 = "\x1B[33m";
@@ -685388,15 +685586,15 @@ function warn2(msg) {
685388
685586
  function resolveEntryScript() {
685389
685587
  try {
685390
685588
  const globalRoot = (0, import_node_child_process9.execSync)("pnpm root -g", { encoding: "utf-8" }).trim();
685391
- const candidate = (0, import_node_path11.join)(globalRoot, "visionclaw", "dist", "index.js");
685392
- if ((0, import_node_fs14.existsSync)(candidate))
685589
+ const candidate = (0, import_node_path12.join)(globalRoot, "visionclaw", "dist", "index.js");
685590
+ if ((0, import_node_fs15.existsSync)(candidate))
685393
685591
  return candidate;
685394
685592
  } catch {
685395
685593
  }
685396
685594
  try {
685397
685595
  const npmRoot = (0, import_node_child_process9.execSync)("npm root -g", { encoding: "utf-8" }).trim();
685398
- const candidate = (0, import_node_path11.join)(npmRoot, "visionclaw", "dist", "index.js");
685399
- if ((0, import_node_fs14.existsSync)(candidate))
685596
+ const candidate = (0, import_node_path12.join)(npmRoot, "visionclaw", "dist", "index.js");
685597
+ if ((0, import_node_fs15.existsSync)(candidate))
685400
685598
  return candidate;
685401
685599
  } catch {
685402
685600
  }
@@ -685495,10 +685693,10 @@ function generatePlist2() {
685495
685693
  <false/>
685496
685694
 
685497
685695
  <key>StandardOutPath</key>
685498
- <string>${escapeXml2((0, import_node_path11.join)(LOG_DIR2, "launchd-stdout.log"))}</string>
685696
+ <string>${escapeXml2((0, import_node_path12.join)(LOG_DIR2, "launchd-stdout.log"))}</string>
685499
685697
 
685500
685698
  <key>StandardErrorPath</key>
685501
- <string>${escapeXml2((0, import_node_path11.join)(LOG_DIR2, "launchd-stderr.log"))}</string>
685699
+ <string>${escapeXml2((0, import_node_path12.join)(LOG_DIR2, "launchd-stderr.log"))}</string>
685502
685700
  </dict>
685503
685701
  </plist>
685504
685702
  `;
@@ -685542,14 +685740,14 @@ ${BOLD3}Installing VisionClaw as a login service...${RESET3}
685542
685740
  stdio: "inherit"
685543
685741
  });
685544
685742
  }
685545
- (0, import_node_fs14.mkdirSync)(LOG_DIR2, { recursive: true });
685743
+ (0, import_node_fs15.mkdirSync)(LOG_DIR2, { recursive: true });
685546
685744
  const wrapper = generateWrapperScript(options);
685547
- (0, import_node_fs14.writeFileSync)(WRAPPER_PATH, wrapper, "utf-8");
685548
- (0, import_node_fs14.chmodSync)(WRAPPER_PATH, 493);
685745
+ (0, import_node_fs15.writeFileSync)(WRAPPER_PATH, wrapper, "utf-8");
685746
+ (0, import_node_fs15.chmodSync)(WRAPPER_PATH, 493);
685549
685747
  ok2(`Wrapper script written to ${DIM3}${WRAPPER_PATH}${RESET3}`);
685550
685748
  const plist = generatePlist2();
685551
- (0, import_node_fs14.mkdirSync)(LAUNCH_AGENTS_DIR, { recursive: true });
685552
- (0, import_node_fs14.writeFileSync)(PLIST_PATH2, plist, "utf-8");
685749
+ (0, import_node_fs15.mkdirSync)(LAUNCH_AGENTS_DIR, { recursive: true });
685750
+ (0, import_node_fs15.writeFileSync)(PLIST_PATH2, plist, "utf-8");
685553
685751
  ok2(`Plist written to ${DIM3}${PLIST_PATH2}${RESET3}`);
685554
685752
  const result = (0, import_node_child_process9.spawnSync)("launchctl", ["bootstrap", `gui/${process.getuid?.() ?? 501}`, PLIST_PATH2], { stdio: "inherit" });
685555
685753
  if (result.status === 0) {
@@ -685584,14 +685782,14 @@ ${BOLD3}Uninstalling VisionClaw login service...${RESET3}
685584
685782
  } else {
685585
685783
  ok2("Service was not loaded");
685586
685784
  }
685587
- if ((0, import_node_fs14.existsSync)(PLIST_PATH2)) {
685588
- (0, import_node_fs14.unlinkSync)(PLIST_PATH2);
685785
+ if ((0, import_node_fs15.existsSync)(PLIST_PATH2)) {
685786
+ (0, import_node_fs15.unlinkSync)(PLIST_PATH2);
685589
685787
  ok2(`Plist removed: ${DIM3}${PLIST_PATH2}${RESET3}`);
685590
685788
  } else {
685591
685789
  ok2("Plist file did not exist");
685592
685790
  }
685593
- if ((0, import_node_fs14.existsSync)(WRAPPER_PATH)) {
685594
- (0, import_node_fs14.unlinkSync)(WRAPPER_PATH);
685791
+ if ((0, import_node_fs15.existsSync)(WRAPPER_PATH)) {
685792
+ (0, import_node_fs15.unlinkSync)(WRAPPER_PATH);
685595
685793
  ok2(`Wrapper script removed: ${DIM3}${WRAPPER_PATH}${RESET3}`);
685596
685794
  }
685597
685795
  (0, import_node_child_process9.spawnSync)("pm2", ["delete", "visionclaw"], { stdio: "ignore" });
@@ -685608,7 +685806,7 @@ function printServiceStatus() {
685608
685806
  console.log(`
685609
685807
  ${BOLD3}VisionClaw Service Status${RESET3}
685610
685808
  `);
685611
- const plistExists = (0, import_node_fs14.existsSync)(PLIST_PATH2);
685809
+ const plistExists = (0, import_node_fs15.existsSync)(PLIST_PATH2);
685612
685810
  if (plistExists) {
685613
685811
  ok2(`Plist installed: ${DIM3}${PLIST_PATH2}${RESET3}`);
685614
685812
  } else {
@@ -685617,10 +685815,10 @@ ${BOLD3}VisionClaw Service Status${RESET3}
685617
685815
  `);
685618
685816
  return;
685619
685817
  }
685620
- if ((0, import_node_fs14.existsSync)(WRAPPER_PATH)) {
685818
+ if ((0, import_node_fs15.existsSync)(WRAPPER_PATH)) {
685621
685819
  ok2(`Wrapper script: ${DIM3}${WRAPPER_PATH}${RESET3}`);
685622
685820
  try {
685623
- const content = (0, import_node_fs14.readFileSync)(WRAPPER_PATH, "utf-8");
685821
+ const content = (0, import_node_fs15.readFileSync)(WRAPPER_PATH, "utf-8");
685624
685822
  const hasDebug = content.includes("--debug");
685625
685823
  const profileMatch = /--profile (\S+)/.exec(content);
685626
685824
  if (profileMatch) {
@@ -685669,20 +685867,20 @@ ${BOLD3}VisionClaw Service Status${RESET3}
685669
685867
  }
685670
685868
  console.log("");
685671
685869
  }
685672
- var import_node_child_process9, import_node_fs14, import_node_os7, import_node_path11, LABEL2, LAUNCH_AGENTS_DIR, PLIST_PATH2, VISIONCLAW_DIR, WRAPPER_PATH, LOG_DIR2, GREEN3, RED3, YELLOW3, DIM3, RESET3, BOLD3;
685870
+ var import_node_child_process9, import_node_fs15, import_node_os7, import_node_path12, LABEL2, LAUNCH_AGENTS_DIR, PLIST_PATH2, VISIONCLAW_DIR, WRAPPER_PATH, LOG_DIR2, GREEN3, RED3, YELLOW3, DIM3, RESET3, BOLD3;
685673
685871
  var init_launchd = __esm({
685674
685872
  "dist/service/launchd.js"() {
685675
685873
  "use strict";
685676
685874
  import_node_child_process9 = require("node:child_process");
685677
- import_node_fs14 = require("node:fs");
685875
+ import_node_fs15 = require("node:fs");
685678
685876
  import_node_os7 = require("node:os");
685679
- import_node_path11 = require("node:path");
685877
+ import_node_path12 = require("node:path");
685680
685878
  LABEL2 = "dev.visionclaw.agent";
685681
- LAUNCH_AGENTS_DIR = (0, import_node_path11.join)((0, import_node_os7.homedir)(), "Library", "LaunchAgents");
685682
- PLIST_PATH2 = (0, import_node_path11.join)(LAUNCH_AGENTS_DIR, `${LABEL2}.plist`);
685683
- VISIONCLAW_DIR = (0, import_node_path11.join)((0, import_node_os7.homedir)(), ".visionclaw");
685684
- WRAPPER_PATH = (0, import_node_path11.join)(VISIONCLAW_DIR, "start.sh");
685685
- LOG_DIR2 = (0, import_node_path11.join)(VISIONCLAW_DIR, "logs");
685879
+ LAUNCH_AGENTS_DIR = (0, import_node_path12.join)((0, import_node_os7.homedir)(), "Library", "LaunchAgents");
685880
+ PLIST_PATH2 = (0, import_node_path12.join)(LAUNCH_AGENTS_DIR, `${LABEL2}.plist`);
685881
+ VISIONCLAW_DIR = (0, import_node_path12.join)((0, import_node_os7.homedir)(), ".visionclaw");
685882
+ WRAPPER_PATH = (0, import_node_path12.join)(VISIONCLAW_DIR, "start.sh");
685883
+ LOG_DIR2 = (0, import_node_path12.join)(VISIONCLAW_DIR, "logs");
685686
685884
  GREEN3 = "\x1B[32m";
685687
685885
  RED3 = "\x1B[31m";
685688
685886
  YELLOW3 = "\x1B[33m";
@@ -685715,12 +685913,12 @@ async function commandExists(name) {
685715
685913
  }
685716
685914
  function checkChromeInstalled2() {
685717
685915
  const candidates = [
685718
- import_node_path12.default.join(process.env.PROGRAMFILES ?? "C:\\Program Files", "Google", "Chrome", "Application", "chrome.exe"),
685719
- import_node_path12.default.join(process.env["PROGRAMFILES(X86)"] ?? "C:\\Program Files (x86)", "Google", "Chrome", "Application", "chrome.exe"),
685720
- import_node_path12.default.join(process.env.LOCALAPPDATA ?? "", "Google", "Chrome", "Application", "chrome.exe")
685916
+ import_node_path13.default.join(process.env.PROGRAMFILES ?? "C:\\Program Files", "Google", "Chrome", "Application", "chrome.exe"),
685917
+ import_node_path13.default.join(process.env["PROGRAMFILES(X86)"] ?? "C:\\Program Files (x86)", "Google", "Chrome", "Application", "chrome.exe"),
685918
+ import_node_path13.default.join(process.env.LOCALAPPDATA ?? "", "Google", "Chrome", "Application", "chrome.exe")
685721
685919
  ];
685722
685920
  for (const p8 of candidates) {
685723
- if (import_node_fs15.default.existsSync(p8))
685921
+ if (import_node_fs16.default.existsSync(p8))
685724
685922
  return true;
685725
685923
  }
685726
685924
  return false;
@@ -685733,7 +685931,7 @@ async function checkFfmpegInstalled2() {
685733
685931
  "C:\\ffmpeg\\bin\\ffmpeg.exe"
685734
685932
  ];
685735
685933
  for (const c8 of candidates) {
685736
- if (import_node_fs15.default.existsSync(c8))
685934
+ if (import_node_fs16.default.existsSync(c8))
685737
685935
  return true;
685738
685936
  }
685739
685937
  return false;
@@ -685756,8 +685954,8 @@ async function checkWhisperCliInstalled() {
685756
685954
  if (await commandExists("whisper"))
685757
685955
  return true;
685758
685956
  try {
685759
- const npmPrefix = process.env.APPDATA ? import_node_path12.default.join(process.env.APPDATA, "npm", "node_modules", "whisper-cli") : "";
685760
- if (npmPrefix && import_node_fs15.default.existsSync(npmPrefix))
685957
+ const npmPrefix = process.env.APPDATA ? import_node_path13.default.join(process.env.APPDATA, "npm", "node_modules", "whisper-cli") : "";
685958
+ if (npmPrefix && import_node_fs16.default.existsSync(npmPrefix))
685761
685959
  return true;
685762
685960
  } catch {
685763
685961
  }
@@ -685859,14 +686057,14 @@ async function checkWindowsPrerequisites() {
685859
686057
  }
685860
686058
  return allGood;
685861
686059
  }
685862
- var import_node_child_process10, import_node_util7, import_node_fs15, import_node_path12, execAsync2;
686060
+ var import_node_child_process10, import_node_util7, import_node_fs16, import_node_path13, execAsync2;
685863
686061
  var init_windows_permissions = __esm({
685864
686062
  "dist/onboarding/windows-permissions.js"() {
685865
686063
  "use strict";
685866
686064
  import_node_child_process10 = require("node:child_process");
685867
686065
  import_node_util7 = require("node:util");
685868
- import_node_fs15 = __toESM(require("node:fs"), 1);
685869
- import_node_path12 = __toESM(require("node:path"), 1);
686066
+ import_node_fs16 = __toESM(require("node:fs"), 1);
686067
+ import_node_path13 = __toESM(require("node:path"), 1);
685870
686068
  execAsync2 = (0, import_node_util7.promisify)(import_node_child_process10.exec);
685871
686069
  }
685872
686070
  });
@@ -685913,12 +686111,12 @@ function findChromePath() {
685913
686111
  return "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
685914
686112
  }
685915
686113
  const candidates = [
685916
- import_node_path13.default.join(process.env.PROGRAMFILES ?? "C:\\Program Files", "Google", "Chrome", "Application", "chrome.exe"),
685917
- import_node_path13.default.join(process.env["PROGRAMFILES(X86)"] ?? "C:\\Program Files (x86)", "Google", "Chrome", "Application", "chrome.exe"),
685918
- import_node_path13.default.join(process.env.LOCALAPPDATA ?? "", "Google", "Chrome", "Application", "chrome.exe")
686114
+ import_node_path14.default.join(process.env.PROGRAMFILES ?? "C:\\Program Files", "Google", "Chrome", "Application", "chrome.exe"),
686115
+ import_node_path14.default.join(process.env["PROGRAMFILES(X86)"] ?? "C:\\Program Files (x86)", "Google", "Chrome", "Application", "chrome.exe"),
686116
+ import_node_path14.default.join(process.env.LOCALAPPDATA ?? "", "Google", "Chrome", "Application", "chrome.exe")
685919
686117
  ];
685920
686118
  for (const candidate of candidates) {
685921
- if (import_node_fs16.default.existsSync(candidate)) {
686119
+ if (import_node_fs17.default.existsSync(candidate)) {
685922
686120
  return candidate;
685923
686121
  }
685924
686122
  }
@@ -685953,8 +686151,8 @@ async function getPrimaryPage(context) {
685953
686151
  async function launchPersistentChrome() {
685954
686152
  ensureConfigDir();
685955
686153
  const profileDir = getPlaywrightProfileDir();
685956
- import_node_fs16.default.mkdirSync(profileDir, { recursive: true });
685957
- if (!import_node_fs16.default.existsSync(CHROME_PATH)) {
686154
+ import_node_fs17.default.mkdirSync(profileDir, { recursive: true });
686155
+ if (!import_node_fs17.default.existsSync(CHROME_PATH)) {
685958
686156
  throw new Error(`Chrome not found at ${CHROME_PATH}`);
685959
686157
  }
685960
686158
  return import_playwright.chromium.launchPersistentContext(profileDir, {
@@ -686027,8 +686225,8 @@ async function maybeSetupGithub(context, spec, state2) {
686027
686225
  console.log("Setup is paused and will wait for you to finish any GitHub signup friction in the browser.");
686028
686226
  await waitForOperator("Press Enter after GitHub signup/sign-in is complete in the browser.");
686029
686227
  }
686030
- const ghConfigDir = import_node_path13.default.join(import_node_os8.default.homedir(), ".config", "gh");
686031
- import_node_fs16.default.mkdirSync(ghConfigDir, { recursive: true });
686228
+ const ghConfigDir = import_node_path14.default.join(import_node_os8.default.homedir(), ".config", "gh");
686229
+ import_node_fs17.default.mkdirSync(ghConfigDir, { recursive: true });
686032
686230
  console.log("\nStarting GitHub CLI auth...");
686033
686231
  console.log("\n https://github.com/login/device");
686034
686232
  const result = (0, import_node_child_process11.spawnSync)("gh", ["auth", "login", "--web"], {
@@ -686090,8 +686288,8 @@ async function setupCloudflaredNamedTunnel(agentName, port = 3101) {
686090
686288
  console.log("cloudflared is not installed.");
686091
686289
  return null;
686092
686290
  }
686093
- const certPemPath = import_node_path13.default.join(import_node_os8.default.homedir(), ".cloudflared", "cert.pem");
686094
- if (!import_node_fs16.default.existsSync(certPemPath)) {
686291
+ const certPemPath = import_node_path14.default.join(import_node_os8.default.homedir(), ".cloudflared", "cert.pem");
686292
+ if (!import_node_fs17.default.existsSync(certPemPath)) {
686095
686293
  console.log(`cloudflared cert.pem not found at ${certPemPath}.`);
686096
686294
  return null;
686097
686295
  }
@@ -686132,7 +686330,7 @@ async function setupCloudflaredNamedTunnel(agentName, port = 3101) {
686132
686330
  }
686133
686331
  function writeIdentityMemory(gmail, gmailPassword, systemPassword, wallet, profilePhotos, githubUsername) {
686134
686332
  ensureConfigDir();
686135
- const memoryPath = import_node_path13.default.join(getMemoriesDir(), "identity.md");
686333
+ const memoryPath = import_node_path14.default.join(getMemoriesDir(), "identity.md");
686136
686334
  const photosDir = getProfilePhotosDir();
686137
686335
  const photoLines = profilePhotos.length > 0 ? [
686138
686336
  `- Current: ${profilePhotos[0]}`,
@@ -686162,19 +686360,19 @@ function writeIdentityMemory(gmail, gmailPassword, systemPassword, wallet, profi
686162
686360
  ## Profile Photos
686163
686361
  ${photoLines}
686164
686362
  `;
686165
- import_node_fs16.default.writeFileSync(memoryPath, content, "utf-8");
686363
+ import_node_fs17.default.writeFileSync(memoryPath, content, "utf-8");
686166
686364
  }
686167
686365
  function resolveLocalPath(source) {
686168
686366
  const trimmed = source.trim();
686169
686367
  if (trimmed === "~")
686170
686368
  return import_node_os8.default.homedir();
686171
686369
  if (trimmed.startsWith("~/"))
686172
- return import_node_path13.default.join(import_node_os8.default.homedir(), trimmed.slice(2));
686370
+ return import_node_path14.default.join(import_node_os8.default.homedir(), trimmed.slice(2));
686173
686371
  return trimmed;
686174
686372
  }
686175
686373
  async function downloadProfilePhotos(sources) {
686176
686374
  const dir = getProfilePhotosDir();
686177
- import_node_fs16.default.mkdirSync(dir, { recursive: true });
686375
+ import_node_fs17.default.mkdirSync(dir, { recursive: true });
686178
686376
  const saved = [];
686179
686377
  for (const source of sources) {
686180
686378
  const trimmed = source.trim();
@@ -686191,18 +686389,18 @@ async function downloadProfilePhotos(sources) {
686191
686389
  }
686192
686390
  buffer = Buffer.from(await res.arrayBuffer());
686193
686391
  const urlPath = new URL(trimmed).pathname;
686194
- filename = import_node_path13.default.basename(urlPath) || `photo_${saved.length + 1}.png`;
686392
+ filename = import_node_path14.default.basename(urlPath) || `photo_${saved.length + 1}.png`;
686195
686393
  } else {
686196
686394
  const localPath = resolveLocalPath(trimmed);
686197
- if (!import_node_fs16.default.existsSync(localPath)) {
686395
+ if (!import_node_fs17.default.existsSync(localPath)) {
686198
686396
  console.log(` Warning: profile photo not found: ${trimmed}`);
686199
686397
  continue;
686200
686398
  }
686201
- buffer = import_node_fs16.default.readFileSync(localPath);
686202
- filename = import_node_path13.default.basename(localPath);
686399
+ buffer = import_node_fs17.default.readFileSync(localPath);
686400
+ filename = import_node_path14.default.basename(localPath);
686203
686401
  }
686204
- const destPath = import_node_path13.default.join(dir, filename);
686205
- import_node_fs16.default.writeFileSync(destPath, buffer);
686402
+ const destPath = import_node_path14.default.join(dir, filename);
686403
+ import_node_fs17.default.writeFileSync(destPath, buffer);
686206
686404
  saved.push(filename);
686207
686405
  console.log(` Saved: ${filename} (${buffer.length} bytes)`);
686208
686406
  } catch (err4) {
@@ -686416,8 +686614,8 @@ Workspace account ready: ${workspaceAccount.email}`);
686416
686614
  const photoSources = spec.telegram.profilePhotoSources?.filter(Boolean) ?? [];
686417
686615
  const savedPhotos = await downloadProfilePhotos(photoSources);
686418
686616
  if (savedPhotos.length > 0) {
686419
- const initialPhoto = import_node_path13.default.join(getProfilePhotosDir(), savedPhotos[0]);
686420
- const photoBuffer = import_node_fs16.default.readFileSync(initialPhoto);
686617
+ const initialPhoto = import_node_path14.default.join(getProfilePhotosDir(), savedPhotos[0]);
686618
+ const photoBuffer = import_node_fs17.default.readFileSync(initialPhoto);
686421
686619
  let photoOk = false;
686422
686620
  while (!photoOk) {
686423
686621
  photoOk = await setProfilePhotoAsync(botToken, initialPhoto);
@@ -686477,15 +686675,19 @@ Workspace account ready: ${workspaceAccount.email}`);
686477
686675
  console.log('pm2 start "$(pnpm root -g)/visionclaw/dist/index.js" --name visionclaw -- --debug');
686478
686676
  console.log("To check agent logs:");
686479
686677
  console.log("pm2 log visionclaw");
686480
- console.log('\nNext step: run "visionclaw set-owner --email <owner-email>" to set up the owner.');
686678
+ if (config2.onboardingServiceUrl) {
686679
+ const onboardingLink = `${config2.onboardingServiceUrl.replace(/\/+$/, "")}/${encodeURIComponent(config2.agentName)}`;
686680
+ console.log(`
686681
+ Onboarding link: ${onboardingLink}`);
686682
+ }
686481
686683
  }
686482
- var import_node_fs16, import_node_os8, import_node_path13, import_prompts, import_node_child_process11, import_playwright, CHROME_PATH;
686684
+ var import_node_fs17, import_node_os8, import_node_path14, import_prompts, import_node_child_process11, import_playwright, CHROME_PATH;
686483
686685
  var init_onboarding = __esm({
686484
686686
  "dist/onboarding/index.js"() {
686485
686687
  "use strict";
686486
- import_node_fs16 = __toESM(require("node:fs"), 1);
686688
+ import_node_fs17 = __toESM(require("node:fs"), 1);
686487
686689
  import_node_os8 = __toESM(require("node:os"), 1);
686488
- import_node_path13 = __toESM(require("node:path"), 1);
686690
+ import_node_path14 = __toESM(require("node:path"), 1);
686489
686691
  import_prompts = __toESM(require_prompts3(), 1);
686490
686692
  import_node_child_process11 = require("node:child_process");
686491
686693
  import_playwright = require("playwright");
@@ -741764,7 +741966,7 @@ async function ensureSckBinary() {
741764
741966
  _sckBinaryReady = true;
741765
741967
  return SCK_HELPER_BIN;
741766
741968
  }
741767
- await import_promises5.default.mkdir(import_node_path14.default.dirname(SCK_HELPER_BIN), { recursive: true });
741969
+ await import_promises5.default.mkdir(import_node_path15.default.dirname(SCK_HELPER_BIN), { recursive: true });
741768
741970
  await execAsync3(`swiftc -O -framework ScreenCaptureKit -framework CoreGraphics -framework ImageIO -o "${SCK_HELPER_BIN}" "${SCK_HELPER_SRC}"`);
741769
741971
  _sckBinaryReady = true;
741770
741972
  logger.debug(`Compiled ScreenCaptureKit helper \u2192 ${SCK_HELPER_BIN}`);
@@ -741805,7 +742007,7 @@ async function findFfmpeg() {
741805
742007
  ];
741806
742008
  for (const candidate of candidates) {
741807
742009
  try {
741808
- import_node_fs17.default.accessSync(candidate, import_node_fs17.default.constants.X_OK);
742010
+ import_node_fs18.default.accessSync(candidate, import_node_fs18.default.constants.X_OK);
741809
742011
  _ffmpegPath = candidate;
741810
742012
  return candidate;
741811
742013
  } catch {
@@ -741841,8 +742043,8 @@ async function compressWithFfmpeg(inputPath, outputPath, maxColors = 128) {
741841
742043
  }
741842
742044
  }
741843
742045
  async function resizeWithSystemTools(buffer, targetW, targetH) {
741844
- const tmpIn = import_node_path14.default.join(import_node_os9.default.tmpdir(), `visionclaw-resize-in-${Date.now()}.png`);
741845
- const tmpOut = import_node_path14.default.join(import_node_os9.default.tmpdir(), `visionclaw-resize-out-${Date.now()}.png`);
742046
+ const tmpIn = import_node_path15.default.join(import_node_os9.default.tmpdir(), `visionclaw-resize-in-${Date.now()}.png`);
742047
+ const tmpOut = import_node_path15.default.join(import_node_os9.default.tmpdir(), `visionclaw-resize-out-${Date.now()}.png`);
741846
742048
  try {
741847
742049
  await import_promises5.default.writeFile(tmpIn, buffer);
741848
742050
  if (process.platform === "darwin") {
@@ -741876,7 +742078,7 @@ async function resizeWithSystemTools(buffer, targetW, targetH) {
741876
742078
  }
741877
742079
  }
741878
742080
  async function getImageDimensions(buffer) {
741879
- const tmpFile = import_node_path14.default.join(import_node_os9.default.tmpdir(), `visionclaw-dims-${Date.now()}.png`);
742081
+ const tmpFile = import_node_path15.default.join(import_node_os9.default.tmpdir(), `visionclaw-dims-${Date.now()}.png`);
741880
742082
  try {
741881
742083
  await import_promises5.default.writeFile(tmpFile, buffer);
741882
742084
  return await getImageDimensionsFromFile(tmpFile);
@@ -741978,8 +742180,8 @@ async function downloadAndResizeForVision(url2) {
741978
742180
  async function compressIfNeeded(buffer, maxSize = MAX_SCREENSHOT_SIZE) {
741979
742181
  if (buffer.length <= maxSize)
741980
742182
  return buffer;
741981
- const tmpIn = import_node_path14.default.join(import_node_os9.default.tmpdir(), `visionclaw-compress-in-${Date.now()}.png`);
741982
- const tmpOut = import_node_path14.default.join(import_node_os9.default.tmpdir(), `visionclaw-compress-out-${Date.now()}.png`);
742183
+ const tmpIn = import_node_path15.default.join(import_node_os9.default.tmpdir(), `visionclaw-compress-in-${Date.now()}.png`);
742184
+ const tmpOut = import_node_path15.default.join(import_node_os9.default.tmpdir(), `visionclaw-compress-out-${Date.now()}.png`);
741983
742185
  try {
741984
742186
  await import_promises5.default.writeFile(tmpIn, buffer);
741985
742187
  for (const maxColors of [128, 64]) {
@@ -742020,9 +742222,9 @@ async function cleanOldScreenshots() {
742020
742222
  let deleted = 0;
742021
742223
  const entries = await import_promises5.default.readdir(dir);
742022
742224
  for (const entry of entries) {
742023
- if (!IMAGE_EXTENSIONS.has(import_node_path14.default.extname(entry).toLowerCase()))
742225
+ if (!IMAGE_EXTENSIONS.has(import_node_path15.default.extname(entry).toLowerCase()))
742024
742226
  continue;
742025
- const filePath = import_node_path14.default.join(dir, entry);
742227
+ const filePath = import_node_path15.default.join(dir, entry);
742026
742228
  try {
742027
742229
  const stat = await import_promises5.default.stat(filePath);
742028
742230
  if (stat.isFile() && stat.mtimeMs < cutoff) {
@@ -742042,7 +742244,7 @@ async function cleanOldScreenshots() {
742042
742244
  async function takeScreenshot() {
742043
742245
  const screenshotsDir = getScreenshotsDir();
742044
742246
  await import_promises5.default.mkdir(screenshotsDir, { recursive: true });
742045
- const tmpFile = import_node_path14.default.join(import_node_os9.default.tmpdir(), `visionclaw-screenshot-${Date.now()}.png`);
742247
+ const tmpFile = import_node_path15.default.join(import_node_os9.default.tmpdir(), `visionclaw-screenshot-${Date.now()}.png`);
742046
742248
  try {
742047
742249
  if (process.platform === "darwin") {
742048
742250
  const sckBin = await ensureSckBinary();
@@ -742089,7 +742291,7 @@ async function takeScreenshot() {
742089
742291
  `$bmp.Save('${tmpFile}', [System.Drawing.Imaging.ImageFormat]::Png)`,
742090
742292
  `$g.Dispose(); $bmp.Dispose()`
742091
742293
  ].join("\n");
742092
- const ps1File = import_node_path14.default.join(import_node_os9.default.tmpdir(), `visionclaw-screenshot-${Date.now()}.ps1`);
742294
+ const ps1File = import_node_path15.default.join(import_node_os9.default.tmpdir(), `visionclaw-screenshot-${Date.now()}.ps1`);
742093
742295
  await import_promises5.default.writeFile(ps1File, ps1, "utf-8");
742094
742296
  try {
742095
742297
  await execAsync3(`powershell -NoProfile -ExecutionPolicy Bypass -File "${ps1File}"`, WINDOWS_EXEC_OPTIONS);
@@ -742109,7 +742311,7 @@ async function takeScreenshot() {
742109
742311
  const rawBuffer = await import_promises5.default.readFile(tmpFile);
742110
742312
  const resized = await resizeForVision(rawBuffer);
742111
742313
  const compressed = await compressIfNeeded(resized);
742112
- const filePath = import_node_path14.default.join(screenshotsDir, `screenshot-${Date.now()}.png`);
742314
+ const filePath = import_node_path15.default.join(screenshotsDir, `screenshot-${Date.now()}.png`);
742113
742315
  await import_promises5.default.writeFile(filePath, compressed);
742114
742316
  return { base64: compressed.toString("base64"), filePath };
742115
742317
  } finally {
@@ -742119,23 +742321,24 @@ async function takeScreenshot() {
742119
742321
  }
742120
742322
  }
742121
742323
  }
742122
- var import_node_child_process12, import_node_util8, import_node_fs17, import_promises5, import_node_path14, import_node_os9, execAsync3, WINDOWS_EXEC_OPTIONS, MAX_SCREENSHOT_SIZE, SCK_HELPER_SRC, SCK_HELPER_BIN, _sckBinaryReady, CLAUDE_MAX_LONG_EDGE_PX, CLAUDE_MAX_PIXELS, _ffmpegPath, SCREENSHOT_MAX_AGE_MS, CLEANUP_INTERVAL_MS, IMAGE_EXTENSIONS, lastCleanupMs;
742324
+ var import_node_child_process12, import_node_util8, import_node_fs18, import_promises5, import_node_path15, import_node_os9, execAsync3, WINDOWS_EXEC_OPTIONS, MAX_SCREENSHOT_SIZE, SCK_HELPER_SRC, SCK_HELPER_BIN, _sckBinaryReady, CLAUDE_MAX_LONG_EDGE_PX, CLAUDE_MAX_PIXELS, _ffmpegPath, SCREENSHOT_MAX_AGE_MS, CLEANUP_INTERVAL_MS, IMAGE_EXTENSIONS, lastCleanupMs;
742123
742325
  var init_screenshot = __esm({
742124
742326
  "dist/tools/screenshot.js"() {
742125
742327
  "use strict";
742126
742328
  import_node_child_process12 = require("node:child_process");
742127
742329
  import_node_util8 = require("node:util");
742128
- import_node_fs17 = __toESM(require("node:fs"), 1);
742330
+ import_node_fs18 = __toESM(require("node:fs"), 1);
742129
742331
  import_promises5 = __toESM(require("node:fs/promises"), 1);
742130
- import_node_path14 = __toESM(require("node:path"), 1);
742332
+ import_node_path15 = __toESM(require("node:path"), 1);
742131
742333
  import_node_os9 = __toESM(require("node:os"), 1);
742132
742334
  init_logger();
742133
742335
  init_config();
742336
+ init_version_check();
742134
742337
  execAsync3 = (0, import_node_util8.promisify)(import_node_child_process12.exec);
742135
742338
  WINDOWS_EXEC_OPTIONS = process.platform === "win32" ? { windowsHide: true } : {};
742136
742339
  MAX_SCREENSHOT_SIZE = 1 * 1024 * 1024;
742137
- SCK_HELPER_SRC = import_node_path14.default.join(import_node_path14.default.dirname(new URL(__importMetaUrl).pathname), "helpers", "macos-screenshot.swift");
742138
- SCK_HELPER_BIN = import_node_path14.default.join(getBaseDir(), "bin", "macos-screenshot");
742340
+ SCK_HELPER_SRC = import_node_path15.default.join(getPackageRoot(), "dist", "tools", "helpers", "macos-screenshot.swift");
742341
+ SCK_HELPER_BIN = import_node_path15.default.join(getBaseDir(), "bin", "macos-screenshot");
742139
742342
  CLAUDE_MAX_LONG_EDGE_PX = 1568;
742140
742343
  CLAUDE_MAX_PIXELS = 115e4;
742141
742344
  SCREENSHOT_MAX_AGE_MS = 24 * 60 * 60 * 1e3;
@@ -823519,7 +823722,7 @@ var require_dist9 = __commonJS({
823519
823722
  }
823520
823723
  __name(getDefaultStrategy, "getDefaultStrategy");
823521
823724
  var import_node_http3 = require("http");
823522
- var import_node_url8 = require("url");
823725
+ var import_node_url6 = require("url");
823523
823726
  var import_node_util17 = require("util");
823524
823727
  var import_undici = require_undici();
823525
823728
  async function makeRequest(url2, init) {
@@ -823558,7 +823761,7 @@ var require_dist9 = __commonJS({
823558
823761
  return body;
823559
823762
  } else if (import_node_util17.types.isArrayBuffer(body)) {
823560
823763
  return new Uint8Array(body);
823561
- } else if (body instanceof import_node_url8.URLSearchParams) {
823764
+ } else if (body instanceof import_node_url6.URLSearchParams) {
823562
823765
  return body.toString();
823563
823766
  } else if (body instanceof DataView) {
823564
823767
  return new Uint8Array(body.buffer);
@@ -855192,7 +855395,7 @@ var require_dist13 = __commonJS({
855192
855395
  var import_node_events22 = require("events");
855193
855396
  var import_node_timers2 = require("timers");
855194
855397
  var import_promises22 = require("timers/promises");
855195
- var import_node_url8 = require("url");
855398
+ var import_node_url6 = require("url");
855196
855399
  var import_node_util17 = require("util");
855197
855400
  var import_node_zlib = require("zlib");
855198
855401
  var import_collection5 = require_dist6();
@@ -855382,7 +855585,7 @@ var require_dist13 = __commonJS({
855382
855585
  throw new Error("Tried to connect a shard that wasn't idle");
855383
855586
  }
855384
855587
  const { version: version22, encoding, compression } = this.strategy.options;
855385
- const params = new import_node_url8.URLSearchParams({ v: version22, encoding });
855588
+ const params = new import_node_url6.URLSearchParams({ v: version22, encoding });
855386
855589
  if (compression) {
855387
855590
  const zlib2 = await getZlibSync();
855388
855591
  if (zlib2) {
@@ -866590,7 +866793,7 @@ var init_redact = __esm({
866590
866793
  // node_modules/.pnpm/@tencent-weixin+openclaw-weixin@1.0.2_patch_hash=5bea70c1008b705a8bff27562e128ced4459c2a094344016fcb0cc1014bb8328/node_modules/@tencent-weixin/openclaw-weixin/src/api/api.ts
866591
866794
  function readChannelVersion() {
866592
866795
  try {
866593
- const dir = import_node_path30.default.dirname((0, import_node_url6.fileURLToPath)(__importMetaUrl));
866796
+ const dir = import_node_path30.default.dirname((0, import_node_url4.fileURLToPath)(__importMetaUrl));
866594
866797
  const pkgPath = import_node_path30.default.resolve(dir, "..", "..", "package.json");
866595
866798
  const pkg = JSON.parse(import_node_fs34.default.readFileSync(pkgPath, "utf-8"));
866596
866799
  return pkg.version ?? "unknown";
@@ -866738,13 +866941,13 @@ async function sendTyping(params) {
866738
866941
  label: "sendTyping"
866739
866942
  });
866740
866943
  }
866741
- var import_node_crypto5, import_node_fs34, import_node_path30, import_node_url6, CHANNEL_VERSION, DEFAULT_LONG_POLL_TIMEOUT_MS, DEFAULT_API_TIMEOUT_MS, DEFAULT_CONFIG_TIMEOUT_MS;
866944
+ var import_node_crypto5, import_node_fs34, import_node_path30, import_node_url4, CHANNEL_VERSION, DEFAULT_LONG_POLL_TIMEOUT_MS, DEFAULT_API_TIMEOUT_MS, DEFAULT_CONFIG_TIMEOUT_MS;
866742
866945
  var init_api2 = __esm({
866743
866946
  "node_modules/.pnpm/@tencent-weixin+openclaw-weixin@1.0.2_patch_hash=5bea70c1008b705a8bff27562e128ced4459c2a094344016fcb0cc1014bb8328/node_modules/@tencent-weixin/openclaw-weixin/src/api/api.ts"() {
866744
866947
  import_node_crypto5 = __toESM(require("node:crypto"), 1);
866745
866948
  import_node_fs34 = __toESM(require("node:fs"), 1);
866746
866949
  import_node_path30 = __toESM(require("node:path"), 1);
866747
- import_node_url6 = require("node:url");
866950
+ import_node_url4 = require("node:url");
866748
866951
  init_accounts();
866749
866952
  init_logger2();
866750
866953
  init_redact();
@@ -877442,6 +877645,7 @@ async function runReconfigureCli(args = process.argv.slice(2)) {
877442
877645
  const modelLabel = getModelLabel(config2.model);
877443
877646
  const choices = [
877444
877647
  { title: "Update agent name", value: "name" },
877648
+ { title: "Update bot identity (Telegram name + profile photo)", value: "bot-identity" },
877445
877649
  { title: "Update Telegram bot token", value: "telegram" },
877446
877650
  { title: "Add/update Discord", value: "discord" },
877447
877651
  { title: `Update API credentials (${providerLabel})`, value: "apikey" },
@@ -877533,6 +877737,50 @@ Agent name updated to "${config2.agentName}".`);
877533
877737
  }
877534
877738
  break;
877535
877739
  }
877740
+ case "bot-identity": {
877741
+ const botToken = config2.channels.telegram?.botToken;
877742
+ if (!botToken) {
877743
+ console.log("\nTelegram bot token is not configured. Please set it first.");
877744
+ break;
877745
+ }
877746
+ const kebabName = config2.agentName.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
877747
+ const identityResult = await (0, import_prompts4.default)([
877748
+ {
877749
+ type: "text",
877750
+ name: "botName",
877751
+ message: "Bot display name:",
877752
+ initial: config2.agentName
877753
+ },
877754
+ {
877755
+ type: "text",
877756
+ name: "photoSource",
877757
+ message: "Profile photo (URL or local path):",
877758
+ initial: `https://onboarding.visionclaw.dev/api/agents/${kebabName}/image`
877759
+ }
877760
+ ]);
877761
+ if (!identityResult.botName && !identityResult.photoSource)
877762
+ break;
877763
+ if (identityResult.botName) {
877764
+ console.log(`
877765
+ Updating bot name to "${identityResult.botName}"\u2026`);
877766
+ const nameOk = await updateBotName(botToken, identityResult.botName);
877767
+ if (nameOk) {
877768
+ console.log("Bot name updated successfully.");
877769
+ } else {
877770
+ console.log("Failed to update bot name (see logs above).");
877771
+ }
877772
+ }
877773
+ if (identityResult.photoSource) {
877774
+ console.log(`Updating profile photo from: ${identityResult.photoSource}`);
877775
+ const photoOk = await setProfilePhotoAsync(botToken, identityResult.photoSource);
877776
+ if (photoOk) {
877777
+ console.log("Profile photo updated successfully.");
877778
+ } else {
877779
+ console.log("Failed to update profile photo (see logs above).");
877780
+ }
877781
+ }
877782
+ break;
877783
+ }
877536
877784
  case "owner": {
877537
877785
  if (!ownerConfig)
877538
877786
  break;
@@ -878001,6 +878249,7 @@ var init_reconfigure = __esm({
878001
878249
  import_prompts4 = __toESM(require_prompts3(), 1);
878002
878250
  init_config();
878003
878251
  init_google_auth();
878252
+ init_bot_profile();
878004
878253
  init_onboarding();
878005
878254
  init_types();
878006
878255
  }
@@ -878011,6 +878260,7 @@ init_config();
878011
878260
  init_logger();
878012
878261
  init_onboarding();
878013
878262
  init_install();
878263
+ init_version_check();
878014
878264
 
878015
878265
  // node_modules/.pnpm/@anthropic-ai+sdk@0.78.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/tslib.mjs
878016
878266
  function __classPrivateFieldSet4(receiver2, state2, value, kind, f5) {
@@ -879399,7 +879649,7 @@ ${underline}`);
879399
879649
  }
879400
879650
  return path53;
879401
879651
  };
879402
- var path11 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
879652
+ var path12 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
879403
879653
 
879404
879654
  // node_modules/.pnpm/@anthropic-ai+sdk@0.78.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs
879405
879655
  var Files = class extends APIResource {
@@ -879437,7 +879687,7 @@ var Files = class extends APIResource {
879437
879687
  */
879438
879688
  delete(fileID, params = {}, options) {
879439
879689
  const { betas } = params ?? {};
879440
- return this._client.delete(path11`/v1/files/${fileID}`, {
879690
+ return this._client.delete(path12`/v1/files/${fileID}`, {
879441
879691
  ...options,
879442
879692
  headers: buildHeaders([
879443
879693
  { "anthropic-beta": [...betas ?? [], "files-api-2025-04-14"].toString() },
@@ -879460,7 +879710,7 @@ var Files = class extends APIResource {
879460
879710
  */
879461
879711
  download(fileID, params = {}, options) {
879462
879712
  const { betas } = params ?? {};
879463
- return this._client.get(path11`/v1/files/${fileID}/content`, {
879713
+ return this._client.get(path12`/v1/files/${fileID}/content`, {
879464
879714
  ...options,
879465
879715
  headers: buildHeaders([
879466
879716
  {
@@ -879483,7 +879733,7 @@ var Files = class extends APIResource {
879483
879733
  */
879484
879734
  retrieveMetadata(fileID, params = {}, options) {
879485
879735
  const { betas } = params ?? {};
879486
- return this._client.get(path11`/v1/files/${fileID}`, {
879736
+ return this._client.get(path12`/v1/files/${fileID}`, {
879487
879737
  ...options,
879488
879738
  headers: buildHeaders([
879489
879739
  { "anthropic-beta": [...betas ?? [], "files-api-2025-04-14"].toString() },
@@ -879532,7 +879782,7 @@ var Models = class extends APIResource {
879532
879782
  */
879533
879783
  retrieve(modelID, params = {}, options) {
879534
879784
  const { betas } = params ?? {};
879535
- return this._client.get(path11`/v1/models/${modelID}?beta=true`, {
879785
+ return this._client.get(path12`/v1/models/${modelID}?beta=true`, {
879536
879786
  ...options,
879537
879787
  headers: buildHeaders([
879538
879788
  { ...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : void 0 },
@@ -880954,7 +881204,7 @@ var Batches = class extends APIResource {
880954
881204
  */
880955
881205
  retrieve(messageBatchID, params = {}, options) {
880956
881206
  const { betas } = params ?? {};
880957
- return this._client.get(path11`/v1/messages/batches/${messageBatchID}?beta=true`, {
881207
+ return this._client.get(path12`/v1/messages/batches/${messageBatchID}?beta=true`, {
880958
881208
  ...options,
880959
881209
  headers: buildHeaders([
880960
881210
  { "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() },
@@ -881007,7 +881257,7 @@ var Batches = class extends APIResource {
881007
881257
  */
881008
881258
  delete(messageBatchID, params = {}, options) {
881009
881259
  const { betas } = params ?? {};
881010
- return this._client.delete(path11`/v1/messages/batches/${messageBatchID}?beta=true`, {
881260
+ return this._client.delete(path12`/v1/messages/batches/${messageBatchID}?beta=true`, {
881011
881261
  ...options,
881012
881262
  headers: buildHeaders([
881013
881263
  { "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() },
@@ -881039,7 +881289,7 @@ var Batches = class extends APIResource {
881039
881289
  */
881040
881290
  cancel(messageBatchID, params = {}, options) {
881041
881291
  const { betas } = params ?? {};
881042
- return this._client.post(path11`/v1/messages/batches/${messageBatchID}/cancel?beta=true`, {
881292
+ return this._client.post(path12`/v1/messages/batches/${messageBatchID}/cancel?beta=true`, {
881043
881293
  ...options,
881044
881294
  headers: buildHeaders([
881045
881295
  { "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() },
@@ -881234,7 +881484,7 @@ var Versions = class extends APIResource {
881234
881484
  */
881235
881485
  create(skillID, params = {}, options) {
881236
881486
  const { betas, ...body } = params ?? {};
881237
- return this._client.post(path11`/v1/skills/${skillID}/versions?beta=true`, multipartFormRequestOptions({
881487
+ return this._client.post(path12`/v1/skills/${skillID}/versions?beta=true`, multipartFormRequestOptions({
881238
881488
  body,
881239
881489
  ...options,
881240
881490
  headers: buildHeaders([
@@ -881256,7 +881506,7 @@ var Versions = class extends APIResource {
881256
881506
  */
881257
881507
  retrieve(version5, params, options) {
881258
881508
  const { skill_id, betas } = params;
881259
- return this._client.get(path11`/v1/skills/${skill_id}/versions/${version5}?beta=true`, {
881509
+ return this._client.get(path12`/v1/skills/${skill_id}/versions/${version5}?beta=true`, {
881260
881510
  ...options,
881261
881511
  headers: buildHeaders([
881262
881512
  { "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() },
@@ -881279,7 +881529,7 @@ var Versions = class extends APIResource {
881279
881529
  */
881280
881530
  list(skillID, params = {}, options) {
881281
881531
  const { betas, ...query } = params ?? {};
881282
- return this._client.getAPIList(path11`/v1/skills/${skillID}/versions?beta=true`, PageCursor, {
881532
+ return this._client.getAPIList(path12`/v1/skills/${skillID}/versions?beta=true`, PageCursor, {
881283
881533
  query,
881284
881534
  ...options,
881285
881535
  headers: buildHeaders([
@@ -881301,7 +881551,7 @@ var Versions = class extends APIResource {
881301
881551
  */
881302
881552
  delete(version5, params, options) {
881303
881553
  const { skill_id, betas } = params;
881304
- return this._client.delete(path11`/v1/skills/${skill_id}/versions/${version5}?beta=true`, {
881554
+ return this._client.delete(path12`/v1/skills/${skill_id}/versions/${version5}?beta=true`, {
881305
881555
  ...options,
881306
881556
  headers: buildHeaders([
881307
881557
  { "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() },
@@ -881346,7 +881596,7 @@ var Skills = class extends APIResource {
881346
881596
  */
881347
881597
  retrieve(skillID, params = {}, options) {
881348
881598
  const { betas } = params ?? {};
881349
- return this._client.get(path11`/v1/skills/${skillID}?beta=true`, {
881599
+ return this._client.get(path12`/v1/skills/${skillID}?beta=true`, {
881350
881600
  ...options,
881351
881601
  headers: buildHeaders([
881352
881602
  { "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() },
@@ -881386,7 +881636,7 @@ var Skills = class extends APIResource {
881386
881636
  */
881387
881637
  delete(skillID, params = {}, options) {
881388
881638
  const { betas } = params ?? {};
881389
- return this._client.delete(path11`/v1/skills/${skillID}?beta=true`, {
881639
+ return this._client.delete(path12`/v1/skills/${skillID}?beta=true`, {
881390
881640
  ...options,
881391
881641
  headers: buildHeaders([
881392
881642
  { "anthropic-beta": [...betas ?? [], "skills-2025-10-02"].toString() },
@@ -882129,7 +882379,7 @@ var Batches2 = class extends APIResource {
882129
882379
  * ```
882130
882380
  */
882131
882381
  retrieve(messageBatchID, options) {
882132
- return this._client.get(path11`/v1/messages/batches/${messageBatchID}`, options);
882382
+ return this._client.get(path12`/v1/messages/batches/${messageBatchID}`, options);
882133
882383
  }
882134
882384
  /**
882135
882385
  * List all Message Batches within a Workspace. Most recently created batches are
@@ -882165,7 +882415,7 @@ var Batches2 = class extends APIResource {
882165
882415
  * ```
882166
882416
  */
882167
882417
  delete(messageBatchID, options) {
882168
- return this._client.delete(path11`/v1/messages/batches/${messageBatchID}`, options);
882418
+ return this._client.delete(path12`/v1/messages/batches/${messageBatchID}`, options);
882169
882419
  }
882170
882420
  /**
882171
882421
  * Batches may be canceled any time before processing ends. Once cancellation is
@@ -882189,7 +882439,7 @@ var Batches2 = class extends APIResource {
882189
882439
  * ```
882190
882440
  */
882191
882441
  cancel(messageBatchID, options) {
882192
- return this._client.post(path11`/v1/messages/batches/${messageBatchID}/cancel`, options);
882442
+ return this._client.post(path12`/v1/messages/batches/${messageBatchID}/cancel`, options);
882193
882443
  }
882194
882444
  /**
882195
882445
  * Streams the results of a Message Batch as a `.jsonl` file.
@@ -882344,7 +882594,7 @@ var Models2 = class extends APIResource {
882344
882594
  */
882345
882595
  retrieve(modelID, params = {}, options) {
882346
882596
  const { betas } = params ?? {};
882347
- return this._client.get(path11`/v1/models/${modelID}`, {
882597
+ return this._client.get(path12`/v1/models/${modelID}`, {
882348
882598
  ...options,
882349
882599
  headers: buildHeaders([
882350
882600
  { ...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : void 0 },
@@ -883355,7 +883605,7 @@ ${underline}`);
883355
883605
  }
883356
883606
  return path53;
883357
883607
  };
883358
- var path12 = /* @__PURE__ */ createPathTagFunction2(encodeURIPath2);
883608
+ var path13 = /* @__PURE__ */ createPathTagFunction2(encodeURIPath2);
883359
883609
 
883360
883610
  // node_modules/.pnpm/@anthropic-ai+bedrock-sdk@0.26.4_zod@4.3.6/node_modules/@anthropic-ai/bedrock-sdk/client.mjs
883361
883611
  var DEFAULT_VERSION = "bedrock-2023-05-31";
@@ -883443,9 +883693,9 @@ var AnthropicBedrock = class extends BaseAnthropic {
883443
883693
  const stream = options.body["stream"];
883444
883694
  options.body["stream"] = void 0;
883445
883695
  if (stream) {
883446
- options.path = path12`/model/${model}/invoke-with-response-stream`;
883696
+ options.path = path13`/model/${model}/invoke-with-response-stream`;
883447
883697
  } else {
883448
- options.path = path12`/model/${model}/invoke`;
883698
+ options.path = path13`/model/${model}/invoke`;
883449
883699
  }
883450
883700
  }
883451
883701
  return super.buildRequest(options);
@@ -885151,7 +885401,7 @@ ${underline}`);
885151
885401
  }
885152
885402
  return path53;
885153
885403
  };
885154
- var path13 = /* @__PURE__ */ createPathTagFunction3(encodeURIPath3);
885404
+ var path14 = /* @__PURE__ */ createPathTagFunction3(encodeURIPath3);
885155
885405
 
885156
885406
  // node_modules/.pnpm/openai@6.27.0_ws@8.19.0_zod@4.3.6/node_modules/openai/resources/chat/completions/messages.mjs
885157
885407
  var Messages3 = class extends APIResource2 {
@@ -885170,7 +885420,7 @@ var Messages3 = class extends APIResource2 {
885170
885420
  * ```
885171
885421
  */
885172
885422
  list(completionID, query = {}, options) {
885173
- return this._client.getAPIList(path13`/chat/completions/${completionID}/messages`, CursorPage, { query, ...options });
885423
+ return this._client.getAPIList(path14`/chat/completions/${completionID}/messages`, CursorPage, { query, ...options });
885174
885424
  }
885175
885425
  };
885176
885426
 
@@ -886519,7 +886769,7 @@ var Completions2 = class extends APIResource2 {
886519
886769
  * ```
886520
886770
  */
886521
886771
  retrieve(completionID, options) {
886522
- return this._client.get(path13`/chat/completions/${completionID}`, options);
886772
+ return this._client.get(path14`/chat/completions/${completionID}`, options);
886523
886773
  }
886524
886774
  /**
886525
886775
  * Modify a stored chat completion. Only Chat Completions that have been created
@@ -886535,7 +886785,7 @@ var Completions2 = class extends APIResource2 {
886535
886785
  * ```
886536
886786
  */
886537
886787
  update(completionID, body, options) {
886538
- return this._client.post(path13`/chat/completions/${completionID}`, { body, ...options });
886788
+ return this._client.post(path14`/chat/completions/${completionID}`, { body, ...options });
886539
886789
  }
886540
886790
  /**
886541
886791
  * List stored Chat Completions. Only Chat Completions that have been stored with
@@ -886563,7 +886813,7 @@ var Completions2 = class extends APIResource2 {
886563
886813
  * ```
886564
886814
  */
886565
886815
  delete(completionID, options) {
886566
- return this._client.delete(path13`/chat/completions/${completionID}`, options);
886816
+ return this._client.delete(path14`/chat/completions/${completionID}`, options);
886567
886817
  }
886568
886818
  parse(body, options) {
886569
886819
  validateInputTools(body.tools);
@@ -886735,7 +886985,7 @@ var Batches3 = class extends APIResource2 {
886735
886985
  * Retrieves a batch.
886736
886986
  */
886737
886987
  retrieve(batchID, options) {
886738
- return this._client.get(path13`/batches/${batchID}`, options);
886988
+ return this._client.get(path14`/batches/${batchID}`, options);
886739
886989
  }
886740
886990
  /**
886741
886991
  * List your organization's batches.
@@ -886749,7 +886999,7 @@ var Batches3 = class extends APIResource2 {
886749
886999
  * (if any) available in the output file.
886750
887000
  */
886751
887001
  cancel(batchID, options) {
886752
- return this._client.post(path13`/batches/${batchID}/cancel`, options);
887002
+ return this._client.post(path14`/batches/${batchID}/cancel`, options);
886753
887003
  }
886754
887004
  };
886755
887005
 
@@ -886773,7 +887023,7 @@ var Assistants = class extends APIResource2 {
886773
887023
  * @deprecated
886774
887024
  */
886775
887025
  retrieve(assistantID, options) {
886776
- return this._client.get(path13`/assistants/${assistantID}`, {
887026
+ return this._client.get(path14`/assistants/${assistantID}`, {
886777
887027
  ...options,
886778
887028
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
886779
887029
  });
@@ -886784,7 +887034,7 @@ var Assistants = class extends APIResource2 {
886784
887034
  * @deprecated
886785
887035
  */
886786
887036
  update(assistantID, body, options) {
886787
- return this._client.post(path13`/assistants/${assistantID}`, {
887037
+ return this._client.post(path14`/assistants/${assistantID}`, {
886788
887038
  body,
886789
887039
  ...options,
886790
887040
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -886808,7 +887058,7 @@ var Assistants = class extends APIResource2 {
886808
887058
  * @deprecated
886809
887059
  */
886810
887060
  delete(assistantID, options) {
886811
- return this._client.delete(path13`/assistants/${assistantID}`, {
887061
+ return this._client.delete(path14`/assistants/${assistantID}`, {
886812
887062
  ...options,
886813
887063
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
886814
887064
  });
@@ -886911,7 +887161,7 @@ var Sessions2 = class extends APIResource2 {
886911
887161
  * ```
886912
887162
  */
886913
887163
  cancel(sessionID, options) {
886914
- return this._client.post(path13`/chatkit/sessions/${sessionID}/cancel`, {
887164
+ return this._client.post(path14`/chatkit/sessions/${sessionID}/cancel`, {
886915
887165
  ...options,
886916
887166
  headers: buildHeaders3([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers])
886917
887167
  });
@@ -886930,7 +887180,7 @@ var Threads = class extends APIResource2 {
886930
887180
  * ```
886931
887181
  */
886932
887182
  retrieve(threadID, options) {
886933
- return this._client.get(path13`/chatkit/threads/${threadID}`, {
887183
+ return this._client.get(path14`/chatkit/threads/${threadID}`, {
886934
887184
  ...options,
886935
887185
  headers: buildHeaders3([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers])
886936
887186
  });
@@ -886964,7 +887214,7 @@ var Threads = class extends APIResource2 {
886964
887214
  * ```
886965
887215
  */
886966
887216
  delete(threadID, options) {
886967
- return this._client.delete(path13`/chatkit/threads/${threadID}`, {
887217
+ return this._client.delete(path14`/chatkit/threads/${threadID}`, {
886968
887218
  ...options,
886969
887219
  headers: buildHeaders3([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers])
886970
887220
  });
@@ -886983,7 +887233,7 @@ var Threads = class extends APIResource2 {
886983
887233
  * ```
886984
887234
  */
886985
887235
  listItems(threadID, query = {}, options) {
886986
- return this._client.getAPIList(path13`/chatkit/threads/${threadID}/items`, ConversationCursorPage, { query, ...options, headers: buildHeaders3([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers]) });
887236
+ return this._client.getAPIList(path14`/chatkit/threads/${threadID}/items`, ConversationCursorPage, { query, ...options, headers: buildHeaders3([{ "OpenAI-Beta": "chatkit_beta=v1" }, options?.headers]) });
886987
887237
  }
886988
887238
  };
886989
887239
 
@@ -887006,7 +887256,7 @@ var Messages4 = class extends APIResource2 {
887006
887256
  * @deprecated The Assistants API is deprecated in favor of the Responses API
887007
887257
  */
887008
887258
  create(threadID, body, options) {
887009
- return this._client.post(path13`/threads/${threadID}/messages`, {
887259
+ return this._client.post(path14`/threads/${threadID}/messages`, {
887010
887260
  body,
887011
887261
  ...options,
887012
887262
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -887019,7 +887269,7 @@ var Messages4 = class extends APIResource2 {
887019
887269
  */
887020
887270
  retrieve(messageID, params, options) {
887021
887271
  const { thread_id } = params;
887022
- return this._client.get(path13`/threads/${thread_id}/messages/${messageID}`, {
887272
+ return this._client.get(path14`/threads/${thread_id}/messages/${messageID}`, {
887023
887273
  ...options,
887024
887274
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
887025
887275
  });
@@ -887031,7 +887281,7 @@ var Messages4 = class extends APIResource2 {
887031
887281
  */
887032
887282
  update(messageID, params, options) {
887033
887283
  const { thread_id, ...body } = params;
887034
- return this._client.post(path13`/threads/${thread_id}/messages/${messageID}`, {
887284
+ return this._client.post(path14`/threads/${thread_id}/messages/${messageID}`, {
887035
887285
  body,
887036
887286
  ...options,
887037
887287
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -887043,7 +887293,7 @@ var Messages4 = class extends APIResource2 {
887043
887293
  * @deprecated The Assistants API is deprecated in favor of the Responses API
887044
887294
  */
887045
887295
  list(threadID, query = {}, options) {
887046
- return this._client.getAPIList(path13`/threads/${threadID}/messages`, CursorPage, {
887296
+ return this._client.getAPIList(path14`/threads/${threadID}/messages`, CursorPage, {
887047
887297
  query,
887048
887298
  ...options,
887049
887299
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -887056,7 +887306,7 @@ var Messages4 = class extends APIResource2 {
887056
887306
  */
887057
887307
  delete(messageID, params, options) {
887058
887308
  const { thread_id } = params;
887059
- return this._client.delete(path13`/threads/${thread_id}/messages/${messageID}`, {
887309
+ return this._client.delete(path14`/threads/${thread_id}/messages/${messageID}`, {
887060
887310
  ...options,
887061
887311
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
887062
887312
  });
@@ -887072,7 +887322,7 @@ var Steps = class extends APIResource2 {
887072
887322
  */
887073
887323
  retrieve(stepID, params, options) {
887074
887324
  const { thread_id, run_id, ...query } = params;
887075
- return this._client.get(path13`/threads/${thread_id}/runs/${run_id}/steps/${stepID}`, {
887325
+ return this._client.get(path14`/threads/${thread_id}/runs/${run_id}/steps/${stepID}`, {
887076
887326
  query,
887077
887327
  ...options,
887078
887328
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -887085,7 +887335,7 @@ var Steps = class extends APIResource2 {
887085
887335
  */
887086
887336
  list(runID, params, options) {
887087
887337
  const { thread_id, ...query } = params;
887088
- return this._client.getAPIList(path13`/threads/${thread_id}/runs/${runID}/steps`, CursorPage, {
887338
+ return this._client.getAPIList(path14`/threads/${thread_id}/runs/${runID}/steps`, CursorPage, {
887089
887339
  query,
887090
887340
  ...options,
887091
887341
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -887667,7 +887917,7 @@ var Runs = class extends APIResource2 {
887667
887917
  }
887668
887918
  create(threadID, params, options) {
887669
887919
  const { include, ...body } = params;
887670
- return this._client.post(path13`/threads/${threadID}/runs`, {
887920
+ return this._client.post(path14`/threads/${threadID}/runs`, {
887671
887921
  query: { include },
887672
887922
  body,
887673
887923
  ...options,
@@ -887683,7 +887933,7 @@ var Runs = class extends APIResource2 {
887683
887933
  */
887684
887934
  retrieve(runID, params, options) {
887685
887935
  const { thread_id } = params;
887686
- return this._client.get(path13`/threads/${thread_id}/runs/${runID}`, {
887936
+ return this._client.get(path14`/threads/${thread_id}/runs/${runID}`, {
887687
887937
  ...options,
887688
887938
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
887689
887939
  });
@@ -887695,7 +887945,7 @@ var Runs = class extends APIResource2 {
887695
887945
  */
887696
887946
  update(runID, params, options) {
887697
887947
  const { thread_id, ...body } = params;
887698
- return this._client.post(path13`/threads/${thread_id}/runs/${runID}`, {
887948
+ return this._client.post(path14`/threads/${thread_id}/runs/${runID}`, {
887699
887949
  body,
887700
887950
  ...options,
887701
887951
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -887707,7 +887957,7 @@ var Runs = class extends APIResource2 {
887707
887957
  * @deprecated The Assistants API is deprecated in favor of the Responses API
887708
887958
  */
887709
887959
  list(threadID, query = {}, options) {
887710
- return this._client.getAPIList(path13`/threads/${threadID}/runs`, CursorPage, {
887960
+ return this._client.getAPIList(path14`/threads/${threadID}/runs`, CursorPage, {
887711
887961
  query,
887712
887962
  ...options,
887713
887963
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -887720,7 +887970,7 @@ var Runs = class extends APIResource2 {
887720
887970
  */
887721
887971
  cancel(runID, params, options) {
887722
887972
  const { thread_id } = params;
887723
- return this._client.post(path13`/threads/${thread_id}/runs/${runID}/cancel`, {
887973
+ return this._client.post(path14`/threads/${thread_id}/runs/${runID}/cancel`, {
887724
887974
  ...options,
887725
887975
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
887726
887976
  });
@@ -887798,7 +888048,7 @@ var Runs = class extends APIResource2 {
887798
888048
  }
887799
888049
  submitToolOutputs(runID, params, options) {
887800
888050
  const { thread_id, ...body } = params;
887801
- return this._client.post(path13`/threads/${thread_id}/runs/${runID}/submit_tool_outputs`, {
888051
+ return this._client.post(path14`/threads/${thread_id}/runs/${runID}/submit_tool_outputs`, {
887802
888052
  body,
887803
888053
  ...options,
887804
888054
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
@@ -887851,7 +888101,7 @@ var Threads2 = class extends APIResource2 {
887851
888101
  * @deprecated The Assistants API is deprecated in favor of the Responses API
887852
888102
  */
887853
888103
  retrieve(threadID, options) {
887854
- return this._client.get(path13`/threads/${threadID}`, {
888104
+ return this._client.get(path14`/threads/${threadID}`, {
887855
888105
  ...options,
887856
888106
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
887857
888107
  });
@@ -887862,7 +888112,7 @@ var Threads2 = class extends APIResource2 {
887862
888112
  * @deprecated The Assistants API is deprecated in favor of the Responses API
887863
888113
  */
887864
888114
  update(threadID, body, options) {
887865
- return this._client.post(path13`/threads/${threadID}`, {
888115
+ return this._client.post(path14`/threads/${threadID}`, {
887866
888116
  body,
887867
888117
  ...options,
887868
888118
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -887874,7 +888124,7 @@ var Threads2 = class extends APIResource2 {
887874
888124
  * @deprecated The Assistants API is deprecated in favor of the Responses API
887875
888125
  */
887876
888126
  delete(threadID, options) {
887877
- return this._client.delete(path13`/threads/${threadID}`, {
888127
+ return this._client.delete(path14`/threads/${threadID}`, {
887878
888128
  ...options,
887879
888129
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
887880
888130
  });
@@ -887936,7 +888186,7 @@ var Content = class extends APIResource2 {
887936
888186
  */
887937
888187
  retrieve(fileID, params, options) {
887938
888188
  const { container_id } = params;
887939
- return this._client.get(path13`/containers/${container_id}/files/${fileID}/content`, {
888189
+ return this._client.get(path14`/containers/${container_id}/files/${fileID}/content`, {
887940
888190
  ...options,
887941
888191
  headers: buildHeaders3([{ Accept: "application/binary" }, options?.headers]),
887942
888192
  __binaryResponse: true
@@ -887957,20 +888207,20 @@ var Files2 = class extends APIResource2 {
887957
888207
  * a JSON request with a file ID.
887958
888208
  */
887959
888209
  create(containerID, body, options) {
887960
- return this._client.post(path13`/containers/${containerID}/files`, maybeMultipartFormRequestOptions({ body, ...options }, this._client));
888210
+ return this._client.post(path14`/containers/${containerID}/files`, maybeMultipartFormRequestOptions({ body, ...options }, this._client));
887961
888211
  }
887962
888212
  /**
887963
888213
  * Retrieve Container File
887964
888214
  */
887965
888215
  retrieve(fileID, params, options) {
887966
888216
  const { container_id } = params;
887967
- return this._client.get(path13`/containers/${container_id}/files/${fileID}`, options);
888217
+ return this._client.get(path14`/containers/${container_id}/files/${fileID}`, options);
887968
888218
  }
887969
888219
  /**
887970
888220
  * List Container files
887971
888221
  */
887972
888222
  list(containerID, query = {}, options) {
887973
- return this._client.getAPIList(path13`/containers/${containerID}/files`, CursorPage, {
888223
+ return this._client.getAPIList(path14`/containers/${containerID}/files`, CursorPage, {
887974
888224
  query,
887975
888225
  ...options
887976
888226
  });
@@ -887980,7 +888230,7 @@ var Files2 = class extends APIResource2 {
887980
888230
  */
887981
888231
  delete(fileID, params, options) {
887982
888232
  const { container_id } = params;
887983
- return this._client.delete(path13`/containers/${container_id}/files/${fileID}`, {
888233
+ return this._client.delete(path14`/containers/${container_id}/files/${fileID}`, {
887984
888234
  ...options,
887985
888235
  headers: buildHeaders3([{ Accept: "*/*" }, options?.headers])
887986
888236
  });
@@ -888004,7 +888254,7 @@ var Containers = class extends APIResource2 {
888004
888254
  * Retrieve Container
888005
888255
  */
888006
888256
  retrieve(containerID, options) {
888007
- return this._client.get(path13`/containers/${containerID}`, options);
888257
+ return this._client.get(path14`/containers/${containerID}`, options);
888008
888258
  }
888009
888259
  /**
888010
888260
  * List Containers
@@ -888016,7 +888266,7 @@ var Containers = class extends APIResource2 {
888016
888266
  * Delete Container
888017
888267
  */
888018
888268
  delete(containerID, options) {
888019
- return this._client.delete(path13`/containers/${containerID}`, {
888269
+ return this._client.delete(path14`/containers/${containerID}`, {
888020
888270
  ...options,
888021
888271
  headers: buildHeaders3([{ Accept: "*/*" }, options?.headers])
888022
888272
  });
@@ -888031,7 +888281,7 @@ var Items = class extends APIResource2 {
888031
888281
  */
888032
888282
  create(conversationID, params, options) {
888033
888283
  const { include, ...body } = params;
888034
- return this._client.post(path13`/conversations/${conversationID}/items`, {
888284
+ return this._client.post(path14`/conversations/${conversationID}/items`, {
888035
888285
  query: { include },
888036
888286
  body,
888037
888287
  ...options
@@ -888042,20 +888292,20 @@ var Items = class extends APIResource2 {
888042
888292
  */
888043
888293
  retrieve(itemID, params, options) {
888044
888294
  const { conversation_id, ...query } = params;
888045
- return this._client.get(path13`/conversations/${conversation_id}/items/${itemID}`, { query, ...options });
888295
+ return this._client.get(path14`/conversations/${conversation_id}/items/${itemID}`, { query, ...options });
888046
888296
  }
888047
888297
  /**
888048
888298
  * List all items for a conversation with the given ID.
888049
888299
  */
888050
888300
  list(conversationID, query = {}, options) {
888051
- return this._client.getAPIList(path13`/conversations/${conversationID}/items`, ConversationCursorPage, { query, ...options });
888301
+ return this._client.getAPIList(path14`/conversations/${conversationID}/items`, ConversationCursorPage, { query, ...options });
888052
888302
  }
888053
888303
  /**
888054
888304
  * Delete an item from a conversation with the given IDs.
888055
888305
  */
888056
888306
  delete(itemID, params, options) {
888057
888307
  const { conversation_id } = params;
888058
- return this._client.delete(path13`/conversations/${conversation_id}/items/${itemID}`, options);
888308
+ return this._client.delete(path14`/conversations/${conversation_id}/items/${itemID}`, options);
888059
888309
  }
888060
888310
  };
888061
888311
 
@@ -888075,19 +888325,19 @@ var Conversations = class extends APIResource2 {
888075
888325
  * Get a conversation
888076
888326
  */
888077
888327
  retrieve(conversationID, options) {
888078
- return this._client.get(path13`/conversations/${conversationID}`, options);
888328
+ return this._client.get(path14`/conversations/${conversationID}`, options);
888079
888329
  }
888080
888330
  /**
888081
888331
  * Update a conversation
888082
888332
  */
888083
888333
  update(conversationID, body, options) {
888084
- return this._client.post(path13`/conversations/${conversationID}`, { body, ...options });
888334
+ return this._client.post(path14`/conversations/${conversationID}`, { body, ...options });
888085
888335
  }
888086
888336
  /**
888087
888337
  * Delete a conversation. Items in the conversation will not be deleted.
888088
888338
  */
888089
888339
  delete(conversationID, options) {
888090
- return this._client.delete(path13`/conversations/${conversationID}`, options);
888340
+ return this._client.delete(path14`/conversations/${conversationID}`, options);
888091
888341
  }
888092
888342
  };
888093
888343
  Conversations.Items = Items;
@@ -888142,14 +888392,14 @@ var OutputItems = class extends APIResource2 {
888142
888392
  */
888143
888393
  retrieve(outputItemID, params, options) {
888144
888394
  const { eval_id, run_id } = params;
888145
- return this._client.get(path13`/evals/${eval_id}/runs/${run_id}/output_items/${outputItemID}`, options);
888395
+ return this._client.get(path14`/evals/${eval_id}/runs/${run_id}/output_items/${outputItemID}`, options);
888146
888396
  }
888147
888397
  /**
888148
888398
  * Get a list of output items for an evaluation run.
888149
888399
  */
888150
888400
  list(runID, params, options) {
888151
888401
  const { eval_id, ...query } = params;
888152
- return this._client.getAPIList(path13`/evals/${eval_id}/runs/${runID}/output_items`, CursorPage, { query, ...options });
888402
+ return this._client.getAPIList(path14`/evals/${eval_id}/runs/${runID}/output_items`, CursorPage, { query, ...options });
888153
888403
  }
888154
888404
  };
888155
888405
 
@@ -888165,20 +888415,20 @@ var Runs2 = class extends APIResource2 {
888165
888415
  * schema specified in the config of the evaluation.
888166
888416
  */
888167
888417
  create(evalID, body, options) {
888168
- return this._client.post(path13`/evals/${evalID}/runs`, { body, ...options });
888418
+ return this._client.post(path14`/evals/${evalID}/runs`, { body, ...options });
888169
888419
  }
888170
888420
  /**
888171
888421
  * Get an evaluation run by ID.
888172
888422
  */
888173
888423
  retrieve(runID, params, options) {
888174
888424
  const { eval_id } = params;
888175
- return this._client.get(path13`/evals/${eval_id}/runs/${runID}`, options);
888425
+ return this._client.get(path14`/evals/${eval_id}/runs/${runID}`, options);
888176
888426
  }
888177
888427
  /**
888178
888428
  * Get a list of runs for an evaluation.
888179
888429
  */
888180
888430
  list(evalID, query = {}, options) {
888181
- return this._client.getAPIList(path13`/evals/${evalID}/runs`, CursorPage, {
888431
+ return this._client.getAPIList(path14`/evals/${evalID}/runs`, CursorPage, {
888182
888432
  query,
888183
888433
  ...options
888184
888434
  });
@@ -888188,14 +888438,14 @@ var Runs2 = class extends APIResource2 {
888188
888438
  */
888189
888439
  delete(runID, params, options) {
888190
888440
  const { eval_id } = params;
888191
- return this._client.delete(path13`/evals/${eval_id}/runs/${runID}`, options);
888441
+ return this._client.delete(path14`/evals/${eval_id}/runs/${runID}`, options);
888192
888442
  }
888193
888443
  /**
888194
888444
  * Cancel an ongoing evaluation run.
888195
888445
  */
888196
888446
  cancel(runID, params, options) {
888197
888447
  const { eval_id } = params;
888198
- return this._client.post(path13`/evals/${eval_id}/runs/${runID}`, options);
888448
+ return this._client.post(path14`/evals/${eval_id}/runs/${runID}`, options);
888199
888449
  }
888200
888450
  };
888201
888451
  Runs2.OutputItems = OutputItems;
@@ -888221,13 +888471,13 @@ var Evals = class extends APIResource2 {
888221
888471
  * Get an evaluation by ID.
888222
888472
  */
888223
888473
  retrieve(evalID, options) {
888224
- return this._client.get(path13`/evals/${evalID}`, options);
888474
+ return this._client.get(path14`/evals/${evalID}`, options);
888225
888475
  }
888226
888476
  /**
888227
888477
  * Update certain properties of an evaluation.
888228
888478
  */
888229
888479
  update(evalID, body, options) {
888230
- return this._client.post(path13`/evals/${evalID}`, { body, ...options });
888480
+ return this._client.post(path14`/evals/${evalID}`, { body, ...options });
888231
888481
  }
888232
888482
  /**
888233
888483
  * List evaluations for a project.
@@ -888239,7 +888489,7 @@ var Evals = class extends APIResource2 {
888239
888489
  * Delete an evaluation.
888240
888490
  */
888241
888491
  delete(evalID, options) {
888242
- return this._client.delete(path13`/evals/${evalID}`, options);
888492
+ return this._client.delete(path14`/evals/${evalID}`, options);
888243
888493
  }
888244
888494
  };
888245
888495
  Evals.Runs = Runs2;
@@ -888275,7 +888525,7 @@ var Files3 = class extends APIResource2 {
888275
888525
  * Returns information about a specific file.
888276
888526
  */
888277
888527
  retrieve(fileID, options) {
888278
- return this._client.get(path13`/files/${fileID}`, options);
888528
+ return this._client.get(path14`/files/${fileID}`, options);
888279
888529
  }
888280
888530
  /**
888281
888531
  * Returns a list of files.
@@ -888287,13 +888537,13 @@ var Files3 = class extends APIResource2 {
888287
888537
  * Delete a file and remove it from all vector stores.
888288
888538
  */
888289
888539
  delete(fileID, options) {
888290
- return this._client.delete(path13`/files/${fileID}`, options);
888540
+ return this._client.delete(path14`/files/${fileID}`, options);
888291
888541
  }
888292
888542
  /**
888293
888543
  * Returns the contents of the specified file.
888294
888544
  */
888295
888545
  content(fileID, options) {
888296
- return this._client.get(path13`/files/${fileID}/content`, {
888546
+ return this._client.get(path14`/files/${fileID}/content`, {
888297
888547
  ...options,
888298
888548
  headers: buildHeaders3([{ Accept: "application/binary" }, options?.headers]),
888299
888549
  __binaryResponse: true
@@ -888396,7 +888646,7 @@ var Permissions = class extends APIResource2 {
888396
888646
  * ```
888397
888647
  */
888398
888648
  create(fineTunedModelCheckpoint, body, options) {
888399
- return this._client.getAPIList(path13`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, Page2, { body, method: "post", ...options });
888649
+ return this._client.getAPIList(path14`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, Page2, { body, method: "post", ...options });
888400
888650
  }
888401
888651
  /**
888402
888652
  * **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
@@ -888407,7 +888657,7 @@ var Permissions = class extends APIResource2 {
888407
888657
  * @deprecated Retrieve is deprecated. Please swap to the paginated list method instead.
888408
888658
  */
888409
888659
  retrieve(fineTunedModelCheckpoint, query = {}, options) {
888410
- return this._client.get(path13`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, {
888660
+ return this._client.get(path14`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, {
888411
888661
  query,
888412
888662
  ...options
888413
888663
  });
@@ -888429,7 +888679,7 @@ var Permissions = class extends APIResource2 {
888429
888679
  * ```
888430
888680
  */
888431
888681
  list(fineTunedModelCheckpoint, query = {}, options) {
888432
- return this._client.getAPIList(path13`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, ConversationCursorPage, { query, ...options });
888682
+ return this._client.getAPIList(path14`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, ConversationCursorPage, { query, ...options });
888433
888683
  }
888434
888684
  /**
888435
888685
  * **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
@@ -888451,7 +888701,7 @@ var Permissions = class extends APIResource2 {
888451
888701
  */
888452
888702
  delete(permissionID, params, options) {
888453
888703
  const { fine_tuned_model_checkpoint } = params;
888454
- return this._client.delete(path13`/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, options);
888704
+ return this._client.delete(path14`/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, options);
888455
888705
  }
888456
888706
  };
888457
888707
 
@@ -888480,7 +888730,7 @@ var Checkpoints2 = class extends APIResource2 {
888480
888730
  * ```
888481
888731
  */
888482
888732
  list(fineTuningJobID, query = {}, options) {
888483
- return this._client.getAPIList(path13`/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, CursorPage, { query, ...options });
888733
+ return this._client.getAPIList(path14`/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, CursorPage, { query, ...options });
888484
888734
  }
888485
888735
  };
888486
888736
 
@@ -888523,7 +888773,7 @@ var Jobs = class extends APIResource2 {
888523
888773
  * ```
888524
888774
  */
888525
888775
  retrieve(fineTuningJobID, options) {
888526
- return this._client.get(path13`/fine_tuning/jobs/${fineTuningJobID}`, options);
888776
+ return this._client.get(path14`/fine_tuning/jobs/${fineTuningJobID}`, options);
888527
888777
  }
888528
888778
  /**
888529
888779
  * List your organization's fine-tuning jobs
@@ -888550,7 +888800,7 @@ var Jobs = class extends APIResource2 {
888550
888800
  * ```
888551
888801
  */
888552
888802
  cancel(fineTuningJobID, options) {
888553
- return this._client.post(path13`/fine_tuning/jobs/${fineTuningJobID}/cancel`, options);
888803
+ return this._client.post(path14`/fine_tuning/jobs/${fineTuningJobID}/cancel`, options);
888554
888804
  }
888555
888805
  /**
888556
888806
  * Get status updates for a fine-tuning job.
@@ -888566,7 +888816,7 @@ var Jobs = class extends APIResource2 {
888566
888816
  * ```
888567
888817
  */
888568
888818
  listEvents(fineTuningJobID, query = {}, options) {
888569
- return this._client.getAPIList(path13`/fine_tuning/jobs/${fineTuningJobID}/events`, CursorPage, { query, ...options });
888819
+ return this._client.getAPIList(path14`/fine_tuning/jobs/${fineTuningJobID}/events`, CursorPage, { query, ...options });
888570
888820
  }
888571
888821
  /**
888572
888822
  * Pause a fine-tune job.
@@ -888579,7 +888829,7 @@ var Jobs = class extends APIResource2 {
888579
888829
  * ```
888580
888830
  */
888581
888831
  pause(fineTuningJobID, options) {
888582
- return this._client.post(path13`/fine_tuning/jobs/${fineTuningJobID}/pause`, options);
888832
+ return this._client.post(path14`/fine_tuning/jobs/${fineTuningJobID}/pause`, options);
888583
888833
  }
888584
888834
  /**
888585
888835
  * Resume a fine-tune job.
@@ -888592,7 +888842,7 @@ var Jobs = class extends APIResource2 {
888592
888842
  * ```
888593
888843
  */
888594
888844
  resume(fineTuningJobID, options) {
888595
- return this._client.post(path13`/fine_tuning/jobs/${fineTuningJobID}/resume`, options);
888845
+ return this._client.post(path14`/fine_tuning/jobs/${fineTuningJobID}/resume`, options);
888596
888846
  }
888597
888847
  };
888598
888848
  Jobs.Checkpoints = Checkpoints2;
@@ -888655,7 +888905,7 @@ var Models3 = class extends APIResource2 {
888655
888905
  * the owner and permissioning.
888656
888906
  */
888657
888907
  retrieve(model, options) {
888658
- return this._client.get(path13`/models/${model}`, options);
888908
+ return this._client.get(path14`/models/${model}`, options);
888659
888909
  }
888660
888910
  /**
888661
888911
  * Lists the currently available models, and provides basic information about each
@@ -888669,7 +888919,7 @@ var Models3 = class extends APIResource2 {
888669
888919
  * delete a model.
888670
888920
  */
888671
888921
  delete(model, options) {
888672
- return this._client.delete(path13`/models/${model}`, options);
888922
+ return this._client.delete(path14`/models/${model}`, options);
888673
888923
  }
888674
888924
  };
888675
888925
 
@@ -888698,7 +888948,7 @@ var Calls = class extends APIResource2 {
888698
888948
  * ```
888699
888949
  */
888700
888950
  accept(callID, body, options) {
888701
- return this._client.post(path13`/realtime/calls/${callID}/accept`, {
888951
+ return this._client.post(path14`/realtime/calls/${callID}/accept`, {
888702
888952
  body,
888703
888953
  ...options,
888704
888954
  headers: buildHeaders3([{ Accept: "*/*" }, options?.headers])
@@ -888713,7 +888963,7 @@ var Calls = class extends APIResource2 {
888713
888963
  * ```
888714
888964
  */
888715
888965
  hangup(callID, options) {
888716
- return this._client.post(path13`/realtime/calls/${callID}/hangup`, {
888966
+ return this._client.post(path14`/realtime/calls/${callID}/hangup`, {
888717
888967
  ...options,
888718
888968
  headers: buildHeaders3([{ Accept: "*/*" }, options?.headers])
888719
888969
  });
@@ -888729,7 +888979,7 @@ var Calls = class extends APIResource2 {
888729
888979
  * ```
888730
888980
  */
888731
888981
  refer(callID, body, options) {
888732
- return this._client.post(path13`/realtime/calls/${callID}/refer`, {
888982
+ return this._client.post(path14`/realtime/calls/${callID}/refer`, {
888733
888983
  body,
888734
888984
  ...options,
888735
888985
  headers: buildHeaders3([{ Accept: "*/*" }, options?.headers])
@@ -888744,7 +888994,7 @@ var Calls = class extends APIResource2 {
888744
888994
  * ```
888745
888995
  */
888746
888996
  reject(callID, body = {}, options) {
888747
- return this._client.post(path13`/realtime/calls/${callID}/reject`, {
888997
+ return this._client.post(path14`/realtime/calls/${callID}/reject`, {
888748
888998
  body,
888749
888999
  ...options,
888750
889000
  headers: buildHeaders3([{ Accept: "*/*" }, options?.headers])
@@ -889210,7 +889460,7 @@ var InputItems = class extends APIResource2 {
889210
889460
  * ```
889211
889461
  */
889212
889462
  list(responseID, query = {}, options) {
889213
- return this._client.getAPIList(path13`/responses/${responseID}/input_items`, CursorPage, { query, ...options });
889463
+ return this._client.getAPIList(path14`/responses/${responseID}/input_items`, CursorPage, { query, ...options });
889214
889464
  }
889215
889465
  };
889216
889466
 
@@ -889248,7 +889498,7 @@ var Responses = class extends APIResource2 {
889248
889498
  });
889249
889499
  }
889250
889500
  retrieve(responseID, query = {}, options) {
889251
- return this._client.get(path13`/responses/${responseID}`, {
889501
+ return this._client.get(path14`/responses/${responseID}`, {
889252
889502
  query,
889253
889503
  ...options,
889254
889504
  stream: query?.stream ?? false
@@ -889270,7 +889520,7 @@ var Responses = class extends APIResource2 {
889270
889520
  * ```
889271
889521
  */
889272
889522
  delete(responseID, options) {
889273
- return this._client.delete(path13`/responses/${responseID}`, {
889523
+ return this._client.delete(path14`/responses/${responseID}`, {
889274
889524
  ...options,
889275
889525
  headers: buildHeaders3([{ Accept: "*/*" }, options?.headers])
889276
889526
  });
@@ -889297,7 +889547,7 @@ var Responses = class extends APIResource2 {
889297
889547
  * ```
889298
889548
  */
889299
889549
  cancel(responseID, options) {
889300
- return this._client.post(path13`/responses/${responseID}/cancel`, options);
889550
+ return this._client.post(path14`/responses/${responseID}/cancel`, options);
889301
889551
  }
889302
889552
  /**
889303
889553
  * Compact a conversation. Returns a compacted response object.
@@ -889327,7 +889577,7 @@ var Content2 = class extends APIResource2 {
889327
889577
  * Download a skill zip bundle by its ID.
889328
889578
  */
889329
889579
  retrieve(skillID, options) {
889330
- return this._client.get(path13`/skills/${skillID}/content`, {
889580
+ return this._client.get(path14`/skills/${skillID}/content`, {
889331
889581
  ...options,
889332
889582
  headers: buildHeaders3([{ Accept: "application/binary" }, options?.headers]),
889333
889583
  __binaryResponse: true
@@ -889342,7 +889592,7 @@ var Content3 = class extends APIResource2 {
889342
889592
  */
889343
889593
  retrieve(version5, params, options) {
889344
889594
  const { skill_id } = params;
889345
- return this._client.get(path13`/skills/${skill_id}/versions/${version5}/content`, {
889595
+ return this._client.get(path14`/skills/${skill_id}/versions/${version5}/content`, {
889346
889596
  ...options,
889347
889597
  headers: buildHeaders3([{ Accept: "application/binary" }, options?.headers]),
889348
889598
  __binaryResponse: true
@@ -889360,20 +889610,20 @@ var Versions2 = class extends APIResource2 {
889360
889610
  * Create a new immutable skill version.
889361
889611
  */
889362
889612
  create(skillID, body = {}, options) {
889363
- return this._client.post(path13`/skills/${skillID}/versions`, maybeMultipartFormRequestOptions({ body, ...options }, this._client));
889613
+ return this._client.post(path14`/skills/${skillID}/versions`, maybeMultipartFormRequestOptions({ body, ...options }, this._client));
889364
889614
  }
889365
889615
  /**
889366
889616
  * Get a specific skill version.
889367
889617
  */
889368
889618
  retrieve(version5, params, options) {
889369
889619
  const { skill_id } = params;
889370
- return this._client.get(path13`/skills/${skill_id}/versions/${version5}`, options);
889620
+ return this._client.get(path14`/skills/${skill_id}/versions/${version5}`, options);
889371
889621
  }
889372
889622
  /**
889373
889623
  * List skill versions for a skill.
889374
889624
  */
889375
889625
  list(skillID, query = {}, options) {
889376
- return this._client.getAPIList(path13`/skills/${skillID}/versions`, CursorPage, {
889626
+ return this._client.getAPIList(path14`/skills/${skillID}/versions`, CursorPage, {
889377
889627
  query,
889378
889628
  ...options
889379
889629
  });
@@ -889383,7 +889633,7 @@ var Versions2 = class extends APIResource2 {
889383
889633
  */
889384
889634
  delete(version5, params, options) {
889385
889635
  const { skill_id } = params;
889386
- return this._client.delete(path13`/skills/${skill_id}/versions/${version5}`, options);
889636
+ return this._client.delete(path14`/skills/${skill_id}/versions/${version5}`, options);
889387
889637
  }
889388
889638
  };
889389
889639
  Versions2.Content = Content3;
@@ -889405,13 +889655,13 @@ var Skills2 = class extends APIResource2 {
889405
889655
  * Get a skill by its ID.
889406
889656
  */
889407
889657
  retrieve(skillID, options) {
889408
- return this._client.get(path13`/skills/${skillID}`, options);
889658
+ return this._client.get(path14`/skills/${skillID}`, options);
889409
889659
  }
889410
889660
  /**
889411
889661
  * Update the default version pointer for a skill.
889412
889662
  */
889413
889663
  update(skillID, body, options) {
889414
- return this._client.post(path13`/skills/${skillID}`, { body, ...options });
889664
+ return this._client.post(path14`/skills/${skillID}`, { body, ...options });
889415
889665
  }
889416
889666
  /**
889417
889667
  * List all skills for the current project.
@@ -889423,7 +889673,7 @@ var Skills2 = class extends APIResource2 {
889423
889673
  * Delete a skill by its ID.
889424
889674
  */
889425
889675
  delete(skillID, options) {
889426
- return this._client.delete(path13`/skills/${skillID}`, options);
889676
+ return this._client.delete(path14`/skills/${skillID}`, options);
889427
889677
  }
889428
889678
  };
889429
889679
  Skills2.Content = Content2;
@@ -889445,7 +889695,7 @@ var Parts = class extends APIResource2 {
889445
889695
  * [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).
889446
889696
  */
889447
889697
  create(uploadID, body, options) {
889448
- return this._client.post(path13`/uploads/${uploadID}/parts`, multipartFormRequestOptions2({ body, ...options }, this._client));
889698
+ return this._client.post(path14`/uploads/${uploadID}/parts`, multipartFormRequestOptions2({ body, ...options }, this._client));
889449
889699
  }
889450
889700
  };
889451
889701
 
@@ -889487,7 +889737,7 @@ var Uploads = class extends APIResource2 {
889487
889737
  * Returns the Upload object with status `cancelled`.
889488
889738
  */
889489
889739
  cancel(uploadID, options) {
889490
- return this._client.post(path13`/uploads/${uploadID}/cancel`, options);
889740
+ return this._client.post(path14`/uploads/${uploadID}/cancel`, options);
889491
889741
  }
889492
889742
  /**
889493
889743
  * Completes the
@@ -889507,7 +889757,7 @@ var Uploads = class extends APIResource2 {
889507
889757
  * object.
889508
889758
  */
889509
889759
  complete(uploadID, body, options) {
889510
- return this._client.post(path13`/uploads/${uploadID}/complete`, { body, ...options });
889760
+ return this._client.post(path14`/uploads/${uploadID}/complete`, { body, ...options });
889511
889761
  }
889512
889762
  };
889513
889763
  Uploads.Parts = Parts;
@@ -889537,7 +889787,7 @@ var FileBatches = class extends APIResource2 {
889537
889787
  * Create a vector store file batch.
889538
889788
  */
889539
889789
  create(vectorStoreID, body, options) {
889540
- return this._client.post(path13`/vector_stores/${vectorStoreID}/file_batches`, {
889790
+ return this._client.post(path14`/vector_stores/${vectorStoreID}/file_batches`, {
889541
889791
  body,
889542
889792
  ...options,
889543
889793
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -889548,7 +889798,7 @@ var FileBatches = class extends APIResource2 {
889548
889798
  */
889549
889799
  retrieve(batchID, params, options) {
889550
889800
  const { vector_store_id } = params;
889551
- return this._client.get(path13`/vector_stores/${vector_store_id}/file_batches/${batchID}`, {
889801
+ return this._client.get(path14`/vector_stores/${vector_store_id}/file_batches/${batchID}`, {
889552
889802
  ...options,
889553
889803
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
889554
889804
  });
@@ -889559,7 +889809,7 @@ var FileBatches = class extends APIResource2 {
889559
889809
  */
889560
889810
  cancel(batchID, params, options) {
889561
889811
  const { vector_store_id } = params;
889562
- return this._client.post(path13`/vector_stores/${vector_store_id}/file_batches/${batchID}/cancel`, {
889812
+ return this._client.post(path14`/vector_stores/${vector_store_id}/file_batches/${batchID}/cancel`, {
889563
889813
  ...options,
889564
889814
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
889565
889815
  });
@@ -889576,7 +889826,7 @@ var FileBatches = class extends APIResource2 {
889576
889826
  */
889577
889827
  listFiles(batchID, params, options) {
889578
889828
  const { vector_store_id, ...query } = params;
889579
- return this._client.getAPIList(path13`/vector_stores/${vector_store_id}/file_batches/${batchID}/files`, CursorPage, { query, ...options, headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]) });
889829
+ return this._client.getAPIList(path14`/vector_stores/${vector_store_id}/file_batches/${batchID}/files`, CursorPage, { query, ...options, headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]) });
889580
889830
  }
889581
889831
  /**
889582
889832
  * Wait for the given file batch to be processed.
@@ -889656,7 +889906,7 @@ var Files4 = class extends APIResource2 {
889656
889906
  * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object).
889657
889907
  */
889658
889908
  create(vectorStoreID, body, options) {
889659
- return this._client.post(path13`/vector_stores/${vectorStoreID}/files`, {
889909
+ return this._client.post(path14`/vector_stores/${vectorStoreID}/files`, {
889660
889910
  body,
889661
889911
  ...options,
889662
889912
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -889667,7 +889917,7 @@ var Files4 = class extends APIResource2 {
889667
889917
  */
889668
889918
  retrieve(fileID, params, options) {
889669
889919
  const { vector_store_id } = params;
889670
- return this._client.get(path13`/vector_stores/${vector_store_id}/files/${fileID}`, {
889920
+ return this._client.get(path14`/vector_stores/${vector_store_id}/files/${fileID}`, {
889671
889921
  ...options,
889672
889922
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
889673
889923
  });
@@ -889677,7 +889927,7 @@ var Files4 = class extends APIResource2 {
889677
889927
  */
889678
889928
  update(fileID, params, options) {
889679
889929
  const { vector_store_id, ...body } = params;
889680
- return this._client.post(path13`/vector_stores/${vector_store_id}/files/${fileID}`, {
889930
+ return this._client.post(path14`/vector_stores/${vector_store_id}/files/${fileID}`, {
889681
889931
  body,
889682
889932
  ...options,
889683
889933
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -889687,7 +889937,7 @@ var Files4 = class extends APIResource2 {
889687
889937
  * Returns a list of vector store files.
889688
889938
  */
889689
889939
  list(vectorStoreID, query = {}, options) {
889690
- return this._client.getAPIList(path13`/vector_stores/${vectorStoreID}/files`, CursorPage, {
889940
+ return this._client.getAPIList(path14`/vector_stores/${vectorStoreID}/files`, CursorPage, {
889691
889941
  query,
889692
889942
  ...options,
889693
889943
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -889701,7 +889951,7 @@ var Files4 = class extends APIResource2 {
889701
889951
  */
889702
889952
  delete(fileID, params, options) {
889703
889953
  const { vector_store_id } = params;
889704
- return this._client.delete(path13`/vector_stores/${vector_store_id}/files/${fileID}`, {
889954
+ return this._client.delete(path14`/vector_stores/${vector_store_id}/files/${fileID}`, {
889705
889955
  ...options,
889706
889956
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
889707
889957
  });
@@ -889776,7 +890026,7 @@ var Files4 = class extends APIResource2 {
889776
890026
  */
889777
890027
  content(fileID, params, options) {
889778
890028
  const { vector_store_id } = params;
889779
- return this._client.getAPIList(path13`/vector_stores/${vector_store_id}/files/${fileID}/content`, Page2, { ...options, headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]) });
890029
+ return this._client.getAPIList(path14`/vector_stores/${vector_store_id}/files/${fileID}/content`, Page2, { ...options, headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]) });
889780
890030
  }
889781
890031
  };
889782
890032
 
@@ -889801,7 +890051,7 @@ var VectorStores = class extends APIResource2 {
889801
890051
  * Retrieves a vector store.
889802
890052
  */
889803
890053
  retrieve(vectorStoreID, options) {
889804
- return this._client.get(path13`/vector_stores/${vectorStoreID}`, {
890054
+ return this._client.get(path14`/vector_stores/${vectorStoreID}`, {
889805
890055
  ...options,
889806
890056
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
889807
890057
  });
@@ -889810,7 +890060,7 @@ var VectorStores = class extends APIResource2 {
889810
890060
  * Modifies a vector store.
889811
890061
  */
889812
890062
  update(vectorStoreID, body, options) {
889813
- return this._client.post(path13`/vector_stores/${vectorStoreID}`, {
890063
+ return this._client.post(path14`/vector_stores/${vectorStoreID}`, {
889814
890064
  body,
889815
890065
  ...options,
889816
890066
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -889830,7 +890080,7 @@ var VectorStores = class extends APIResource2 {
889830
890080
  * Delete a vector store.
889831
890081
  */
889832
890082
  delete(vectorStoreID, options) {
889833
- return this._client.delete(path13`/vector_stores/${vectorStoreID}`, {
890083
+ return this._client.delete(path14`/vector_stores/${vectorStoreID}`, {
889834
890084
  ...options,
889835
890085
  headers: buildHeaders3([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
889836
890086
  });
@@ -889840,7 +890090,7 @@ var VectorStores = class extends APIResource2 {
889840
890090
  * filter.
889841
890091
  */
889842
890092
  search(vectorStoreID, body, options) {
889843
- return this._client.getAPIList(path13`/vector_stores/${vectorStoreID}/search`, Page2, {
890093
+ return this._client.getAPIList(path14`/vector_stores/${vectorStoreID}/search`, Page2, {
889844
890094
  body,
889845
890095
  method: "post",
889846
890096
  ...options,
@@ -889863,7 +890113,7 @@ var Videos = class extends APIResource2 {
889863
890113
  * Fetch the latest metadata for a generated video.
889864
890114
  */
889865
890115
  retrieve(videoID, options) {
889866
- return this._client.get(path13`/videos/${videoID}`, options);
890116
+ return this._client.get(path14`/videos/${videoID}`, options);
889867
890117
  }
889868
890118
  /**
889869
890119
  * List recently generated videos for the current project.
@@ -889875,7 +890125,7 @@ var Videos = class extends APIResource2 {
889875
890125
  * Permanently delete a completed or failed video and its stored assets.
889876
890126
  */
889877
890127
  delete(videoID, options) {
889878
- return this._client.delete(path13`/videos/${videoID}`, options);
890128
+ return this._client.delete(path14`/videos/${videoID}`, options);
889879
890129
  }
889880
890130
  /**
889881
890131
  * Download the generated video bytes or a derived preview asset.
@@ -889883,7 +890133,7 @@ var Videos = class extends APIResource2 {
889883
890133
  * Streams the rendered video content for the specified video job.
889884
890134
  */
889885
890135
  downloadContent(videoID, query = {}, options) {
889886
- return this._client.get(path13`/videos/${videoID}/content`, {
890136
+ return this._client.get(path14`/videos/${videoID}/content`, {
889887
890137
  query,
889888
890138
  ...options,
889889
890139
  headers: buildHeaders3([{ Accept: "application/binary" }, options?.headers]),
@@ -889894,7 +890144,7 @@ var Videos = class extends APIResource2 {
889894
890144
  * Create a remix of a completed video using a refreshed prompt.
889895
890145
  */
889896
890146
  remix(videoID, body, options) {
889897
- return this._client.post(path13`/videos/${videoID}/remix`, maybeMultipartFormRequestOptions({ body, ...options }, this._client));
890147
+ return this._client.post(path14`/videos/${videoID}/remix`, maybeMultipartFormRequestOptions({ body, ...options }, this._client));
889898
890148
  }
889899
890149
  };
889900
890150
 
@@ -921946,23 +922196,23 @@ IMPORTANT: You have called finish. Do NOT call any more tools. End your turn imm
921946
922196
  });
921947
922197
 
921948
922198
  // dist/tools/skill.js
921949
- var import_node_fs18 = __toESM(require("node:fs"), 1);
921950
- var import_node_path15 = __toESM(require("node:path"), 1);
922199
+ var import_node_fs19 = __toESM(require("node:fs"), 1);
922200
+ var import_node_path16 = __toESM(require("node:path"), 1);
921951
922201
  init_zod();
921952
922202
  init_config();
921953
922203
  init_install();
921954
922204
  var MAX_SKILLS = 20;
921955
922205
  function readSkillDescription(skillMdPath) {
921956
- if (!import_node_fs18.default.existsSync(skillMdPath))
922206
+ if (!import_node_fs19.default.existsSync(skillMdPath))
921957
922207
  return "(no description)";
921958
- const raw = import_node_fs18.default.readFileSync(skillMdPath, "utf-8");
922208
+ const raw = import_node_fs19.default.readFileSync(skillMdPath, "utf-8");
921959
922209
  const match = /^description:\s*(.+)$/m.exec(raw);
921960
922210
  return match ? match[1] : "(no description)";
921961
922211
  }
921962
922212
  function countSkills(skillsDir) {
921963
- if (!import_node_fs18.default.existsSync(skillsDir))
922213
+ if (!import_node_fs19.default.existsSync(skillsDir))
921964
922214
  return 0;
921965
- return import_node_fs18.default.readdirSync(skillsDir, { withFileTypes: true }).filter((e6) => e6.isDirectory()).length;
922215
+ return import_node_fs19.default.readdirSync(skillsDir, { withFileTypes: true }).filter((e6) => e6.isDirectory()).length;
921966
922216
  }
921967
922217
  function buildSkillLimitWarning(skillsDir) {
921968
922218
  const count = countSkills(skillsDir);
@@ -921977,24 +922227,24 @@ function isBuiltinCatalogSkill(skillName) {
921977
922227
  const catalogDir = getCatalogSourceDir();
921978
922228
  if (!catalogDir)
921979
922229
  return false;
921980
- return import_node_fs18.default.existsSync(import_node_path15.default.join(catalogDir, skillName, "SKILL.md"));
922230
+ return import_node_fs19.default.existsSync(import_node_path16.default.join(catalogDir, skillName, "SKILL.md"));
921981
922231
  }
921982
922232
  function collectCatalogSkills() {
921983
922233
  const result = /* @__PURE__ */ new Map();
921984
922234
  const builtinDir = getCatalogSourceDir();
921985
- if (builtinDir && import_node_fs18.default.existsSync(builtinDir)) {
921986
- for (const e6 of import_node_fs18.default.readdirSync(builtinDir, { withFileTypes: true })) {
921987
- if (e6.isDirectory() && import_node_fs18.default.existsSync(import_node_path15.default.join(builtinDir, e6.name, "SKILL.md"))) {
921988
- result.set(e6.name, import_node_path15.default.join(builtinDir, e6.name));
922235
+ if (builtinDir && import_node_fs19.default.existsSync(builtinDir)) {
922236
+ for (const e6 of import_node_fs19.default.readdirSync(builtinDir, { withFileTypes: true })) {
922237
+ if (e6.isDirectory() && import_node_fs19.default.existsSync(import_node_path16.default.join(builtinDir, e6.name, "SKILL.md"))) {
922238
+ result.set(e6.name, import_node_path16.default.join(builtinDir, e6.name));
921989
922239
  }
921990
922240
  }
921991
922241
  }
921992
922242
  const userDir = getUserCatalogDir();
921993
- if (import_node_fs18.default.existsSync(userDir)) {
921994
- for (const e6 of import_node_fs18.default.readdirSync(userDir, { withFileTypes: true })) {
921995
- if (e6.isDirectory() && import_node_fs18.default.existsSync(import_node_path15.default.join(userDir, e6.name, "SKILL.md"))) {
922243
+ if (import_node_fs19.default.existsSync(userDir)) {
922244
+ for (const e6 of import_node_fs19.default.readdirSync(userDir, { withFileTypes: true })) {
922245
+ if (e6.isDirectory() && import_node_fs19.default.existsSync(import_node_path16.default.join(userDir, e6.name, "SKILL.md"))) {
921996
922246
  if (!result.has(e6.name)) {
921997
- result.set(e6.name, import_node_path15.default.join(userDir, e6.name));
922247
+ result.set(e6.name, import_node_path16.default.join(userDir, e6.name));
921998
922248
  }
921999
922249
  }
922000
922250
  }
@@ -922021,19 +922271,19 @@ var manageSkillsTool = Tb("manage_skills", "Manage your skills. Skills are SKILL
922021
922271
  isError: true
922022
922272
  });
922023
922273
  }
922024
- const skillDir = import_node_path15.default.join(skillsDir, args.name);
922025
- if (!import_node_fs18.default.existsSync(skillDir)) {
922026
- import_node_fs18.default.mkdirSync(skillDir, { recursive: true });
922274
+ const skillDir = import_node_path16.default.join(skillsDir, args.name);
922275
+ if (!import_node_fs19.default.existsSync(skillDir)) {
922276
+ import_node_fs19.default.mkdirSync(skillDir, { recursive: true });
922027
922277
  }
922028
- const filePath = import_node_path15.default.join(skillDir, "SKILL.md");
922029
- const existed = import_node_fs18.default.existsSync(filePath);
922278
+ const filePath = import_node_path16.default.join(skillDir, "SKILL.md");
922279
+ const existed = import_node_fs19.default.existsSync(filePath);
922030
922280
  const skillContent = `---
922031
922281
  description: ${args.description}
922032
922282
  ---
922033
922283
 
922034
922284
  ${args.content}
922035
922285
  `;
922036
- import_node_fs18.default.writeFileSync(filePath, skillContent, "utf-8");
922286
+ import_node_fs19.default.writeFileSync(filePath, skillContent, "utf-8");
922037
922287
  const resultText = `Skill "${args.name}" ${existed ? "updated" : "created"} at ${filePath}.${existed ? "" : buildSkillLimitWarning(skillsDir)}`;
922038
922288
  return Promise.resolve({
922039
922289
  content: [{
@@ -922052,8 +922302,8 @@ ${args.content}
922052
922302
  isError: true
922053
922303
  });
922054
922304
  }
922055
- const skillDir = import_node_path15.default.join(skillsDir, args.name);
922056
- if (!import_node_fs18.default.existsSync(skillDir)) {
922305
+ const skillDir = import_node_path16.default.join(skillsDir, args.name);
922306
+ if (!import_node_fs19.default.existsSync(skillDir)) {
922057
922307
  return Promise.resolve({
922058
922308
  content: [{
922059
922309
  type: "text",
@@ -922063,7 +922313,7 @@ ${args.content}
922063
922313
  });
922064
922314
  }
922065
922315
  if (isBuiltinCatalogSkill(args.name)) {
922066
- import_node_fs18.default.rmSync(skillDir, { recursive: true });
922316
+ import_node_fs19.default.rmSync(skillDir, { recursive: true });
922067
922317
  return Promise.resolve({
922068
922318
  content: [{
922069
922319
  type: "text",
@@ -922072,14 +922322,14 @@ ${args.content}
922072
922322
  });
922073
922323
  }
922074
922324
  const userCatalogDir = getUserCatalogDir();
922075
- if (!import_node_fs18.default.existsSync(userCatalogDir)) {
922076
- import_node_fs18.default.mkdirSync(userCatalogDir, { recursive: true });
922325
+ if (!import_node_fs19.default.existsSync(userCatalogDir)) {
922326
+ import_node_fs19.default.mkdirSync(userCatalogDir, { recursive: true });
922077
922327
  }
922078
- const archiveDir = import_node_path15.default.join(userCatalogDir, args.name);
922079
- if (import_node_fs18.default.existsSync(archiveDir)) {
922080
- import_node_fs18.default.rmSync(archiveDir, { recursive: true });
922328
+ const archiveDir = import_node_path16.default.join(userCatalogDir, args.name);
922329
+ if (import_node_fs19.default.existsSync(archiveDir)) {
922330
+ import_node_fs19.default.rmSync(archiveDir, { recursive: true });
922081
922331
  }
922082
- import_node_fs18.default.renameSync(skillDir, archiveDir);
922332
+ import_node_fs19.default.renameSync(skillDir, archiveDir);
922083
922333
  return Promise.resolve({
922084
922334
  content: [{
922085
922335
  type: "text",
@@ -922088,12 +922338,12 @@ ${args.content}
922088
922338
  });
922089
922339
  }
922090
922340
  case "list": {
922091
- if (!import_node_fs18.default.existsSync(skillsDir)) {
922341
+ if (!import_node_fs19.default.existsSync(skillsDir)) {
922092
922342
  return Promise.resolve({
922093
922343
  content: [{ type: "text", text: "No skills directory found." }]
922094
922344
  });
922095
922345
  }
922096
- const entries = import_node_fs18.default.readdirSync(skillsDir, { withFileTypes: true });
922346
+ const entries = import_node_fs19.default.readdirSync(skillsDir, { withFileTypes: true });
922097
922347
  const skills = entries.filter((e6) => e6.isDirectory());
922098
922348
  if (skills.length === 0) {
922099
922349
  return Promise.resolve({
@@ -922101,7 +922351,7 @@ ${args.content}
922101
922351
  });
922102
922352
  }
922103
922353
  const lines = skills.map((dir) => {
922104
- const skillFile = import_node_path15.default.join(skillsDir, dir.name, "SKILL.md");
922354
+ const skillFile = import_node_path16.default.join(skillsDir, dir.name, "SKILL.md");
922105
922355
  return `- ${dir.name}: ${readSkillDescription(skillFile)}`;
922106
922356
  });
922107
922357
  return Promise.resolve({
@@ -922120,15 +922370,15 @@ ${lines.join("\n")}`
922120
922370
  });
922121
922371
  }
922122
922372
  const installedSet = /* @__PURE__ */ new Set();
922123
- if (import_node_fs18.default.existsSync(skillsDir)) {
922124
- for (const e6 of import_node_fs18.default.readdirSync(skillsDir, { withFileTypes: true })) {
922373
+ if (import_node_fs19.default.existsSync(skillsDir)) {
922374
+ for (const e6 of import_node_fs19.default.readdirSync(skillsDir, { withFileTypes: true })) {
922125
922375
  if (e6.isDirectory())
922126
922376
  installedSet.add(e6.name);
922127
922377
  }
922128
922378
  }
922129
922379
  const lines = [];
922130
922380
  for (const [name, sourceDir] of allCatalogSkills) {
922131
- const skillFile = import_node_path15.default.join(sourceDir, "SKILL.md");
922381
+ const skillFile = import_node_path16.default.join(sourceDir, "SKILL.md");
922132
922382
  const installed = installedSet.has(name) ? " [installed]" : "";
922133
922383
  const isUserSkill = sourceDir.startsWith(getUserCatalogDir());
922134
922384
  const origin = isUserSkill ? " (user-created)" : "";
@@ -922163,13 +922413,13 @@ ${lines.join("\n")}`
922163
922413
  isError: true
922164
922414
  });
922165
922415
  }
922166
- const targetSkillDir = import_node_path15.default.join(skillsDir, args.name);
922167
- if (!import_node_fs18.default.existsSync(targetSkillDir)) {
922168
- import_node_fs18.default.mkdirSync(targetSkillDir, { recursive: true });
922416
+ const targetSkillDir = import_node_path16.default.join(skillsDir, args.name);
922417
+ if (!import_node_fs19.default.existsSync(targetSkillDir)) {
922418
+ import_node_fs19.default.mkdirSync(targetSkillDir, { recursive: true });
922169
922419
  }
922170
- const files = import_node_fs18.default.readdirSync(catalogSkillDir);
922420
+ const files = import_node_fs19.default.readdirSync(catalogSkillDir);
922171
922421
  for (const file2 of files) {
922172
- import_node_fs18.default.copyFileSync(import_node_path15.default.join(catalogSkillDir, file2), import_node_path15.default.join(targetSkillDir, file2));
922422
+ import_node_fs19.default.copyFileSync(import_node_path16.default.join(catalogSkillDir, file2), import_node_path16.default.join(targetSkillDir, file2));
922173
922423
  }
922174
922424
  return Promise.resolve({
922175
922425
  content: [{
@@ -922205,160 +922455,7 @@ var import_node_fs20 = __toESM(require("node:fs"), 1);
922205
922455
  var import_node_path17 = __toESM(require("node:path"), 1);
922206
922456
  var import_node_os10 = __toESM(require("node:os"), 1);
922207
922457
  init_zod();
922208
-
922209
- // dist/utils/version-check.js
922210
- var import_node_fs19 = __toESM(require("node:fs"), 1);
922211
- var import_node_path16 = __toESM(require("node:path"), 1);
922212
- var import_node_url5 = require("node:url");
922213
- var import_node_https = __toESM(require("node:https"), 1);
922214
- init_config();
922215
- init_logger();
922216
- var PACKAGE_NAME = "visionclaw";
922217
- var PACKAGE_ROOT = import_node_path16.default.resolve(import_node_path16.default.dirname((0, import_node_url5.fileURLToPath)(__importMetaUrl)), "../..");
922218
- var PACKAGE_JSON_PATH = import_node_path16.default.resolve(import_node_path16.default.dirname((0, import_node_url5.fileURLToPath)(__importMetaUrl)), "../../package.json");
922219
- var CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
922220
- var STATE_FILENAME = "version-check.json";
922221
- function isLocalCheckoutPackageRoot(packageRoot) {
922222
- return import_node_fs19.default.existsSync(import_node_path16.default.join(packageRoot, ".git")) || import_node_fs19.default.existsSync(import_node_path16.default.join(packageRoot, "src")) || import_node_fs19.default.existsSync(import_node_path16.default.join(packageRoot, "tsconfig.json"));
922223
- }
922224
- function getInstallationInfo() {
922225
- return {
922226
- packageRoot: PACKAGE_ROOT,
922227
- isLocalCheckout: isLocalCheckoutPackageRoot(PACKAGE_ROOT)
922228
- };
922229
- }
922230
- function getCurrentVersion() {
922231
- try {
922232
- const pkg = JSON.parse(import_node_fs19.default.readFileSync(PACKAGE_JSON_PATH, "utf-8"));
922233
- return pkg.version ?? "0.0.0";
922234
- } catch {
922235
- return "0.0.0";
922236
- }
922237
- }
922238
- function compareSemver(a6, b10) {
922239
- const parse5 = (v7) => v7.split(".").map((x9) => parseInt(x9, 10) || 0);
922240
- const [aMaj, aMin, aPatch] = parse5(a6);
922241
- const [bMaj, bMin, bPatch] = parse5(b10);
922242
- if (aMaj !== bMaj)
922243
- return aMaj - bMaj;
922244
- if (aMin !== bMin)
922245
- return aMin - bMin;
922246
- return aPatch - bPatch;
922247
- }
922248
- async function getLatestNpmVersion() {
922249
- const body = await httpGet(`https://registry.npmjs.org/${PACKAGE_NAME}/latest`);
922250
- const parsed = JSON.parse(body);
922251
- if (typeof parsed.version !== "string" || parsed.version.length === 0) {
922252
- throw new Error("npm registry response did not include a version");
922253
- }
922254
- return parsed.version;
922255
- }
922256
- function getStatePath() {
922257
- return import_node_path16.default.join(getConfigDir(), STATE_FILENAME);
922258
- }
922259
- function loadState() {
922260
- try {
922261
- const raw = import_node_fs19.default.readFileSync(getStatePath(), "utf-8");
922262
- return JSON.parse(raw);
922263
- } catch {
922264
- return { lastCheckAt: 0 };
922265
- }
922266
- }
922267
- function saveState(state2) {
922268
- try {
922269
- import_node_fs19.default.writeFileSync(getStatePath(), JSON.stringify(state2, null, 2), "utf-8");
922270
- } catch {
922271
- }
922272
- }
922273
- function shouldNotifyUpdate() {
922274
- const state2 = loadState();
922275
- const elapsed = Date.now() - state2.lastCheckAt;
922276
- const due = elapsed >= CHECK_INTERVAL_MS;
922277
- logger.debug(`Version check: last=${state2.lastCheckAt ? new Date(state2.lastCheckAt).toISOString() : "never"} elapsed=${Math.round(elapsed / 6e4)}min due=${due}`);
922278
- return due;
922279
- }
922280
- function recordUpdateNotification(version5) {
922281
- logger.debug(`Version check: recording notification for v${version5}`);
922282
- saveState({
922283
- lastCheckAt: Date.now(),
922284
- lastNotifiedVersion: version5
922285
- });
922286
- }
922287
- async function fetchChangelogFromNpm(latestVersion, fromVersion) {
922288
- try {
922289
- const url2 = `https://unpkg.com/${PACKAGE_NAME}@${latestVersion}/CHANGELOG.md`;
922290
- logger.debug(`Version check: fetching changelog from ${url2}`);
922291
- const body = await httpGet(url2);
922292
- logger.debug(`Version check: fetched changelog (${body.length} bytes)`);
922293
- const sections = extractChangelogSections(body, fromVersion);
922294
- logger.debug(`Version check: extracted changelog sections (${sections.length} chars)`);
922295
- return sections;
922296
- } catch (err4) {
922297
- logger.warn(`Version check: failed to fetch changelog: ${err4 instanceof Error ? err4.message : String(err4)}`);
922298
- return void 0;
922299
- }
922300
- }
922301
- function extractChangelogSections(changelog, fromVersion) {
922302
- const lines = changelog.split("\n");
922303
- const result = [];
922304
- let capturing = false;
922305
- for (const line of lines) {
922306
- const match = /^## \[([^\]]+)\]/.exec(line);
922307
- if (match) {
922308
- const sectionVersion = match[1];
922309
- if (compareSemver(sectionVersion, fromVersion) <= 0) {
922310
- break;
922311
- }
922312
- capturing = true;
922313
- }
922314
- if (capturing) {
922315
- result.push(line);
922316
- }
922317
- }
922318
- return result.join("\n").trim();
922319
- }
922320
- function httpGet(url2, redirects = 0) {
922321
- if (redirects > 5)
922322
- return Promise.reject(new Error("Too many redirects"));
922323
- return new Promise((resolve, reject) => {
922324
- import_node_https.default.get(url2, { timeout: 1e4 }, (res) => {
922325
- if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
922326
- resolve(httpGet(res.headers.location, redirects + 1));
922327
- return;
922328
- }
922329
- if (res.statusCode && res.statusCode >= 400) {
922330
- reject(new Error(`HTTP ${res.statusCode}`));
922331
- return;
922332
- }
922333
- let data2 = "";
922334
- res.on("data", (chunk) => {
922335
- data2 += chunk.toString();
922336
- });
922337
- res.on("end", () => resolve(data2));
922338
- res.on("error", reject);
922339
- }).on("error", reject);
922340
- });
922341
- }
922342
- async function checkForUpdate() {
922343
- const currentVersion = getCurrentVersion();
922344
- logger.debug(`Version check: current=${currentVersion}, querying npm...`);
922345
- const latestVersion = await getLatestNpmVersion();
922346
- logger.debug(`Version check: latest=${latestVersion}`);
922347
- if (compareSemver(latestVersion, currentVersion) <= 0) {
922348
- logger.debug("Version check: already up to date");
922349
- return { currentVersion, latestVersion, hasUpdate: false };
922350
- }
922351
- logger.debug(`Version check: update available ${currentVersion} \u2192 ${latestVersion}, fetching changelog...`);
922352
- const changelog = await fetchChangelogFromNpm(latestVersion, currentVersion);
922353
- return {
922354
- currentVersion,
922355
- latestVersion,
922356
- hasUpdate: true,
922357
- changelog
922358
- };
922359
- }
922360
-
922361
- // dist/tools/upgrade.js
922458
+ init_version_check();
922362
922459
  init_restart();
922363
922460
  init_state();
922364
922461
  init_config();
@@ -928687,6 +928784,7 @@ var ActivityTracker = class {
928687
928784
  };
928688
928785
 
928689
928786
  // dist/agent/loop.js
928787
+ init_version_check();
928690
928788
  init_config();
928691
928789
  init_logger();
928692
928790
  init_screenshot();
@@ -930438,6 +930536,7 @@ async function getCalendarSummary(config2) {
930438
930536
  }
930439
930537
 
930440
930538
  // dist/agent/gather-context.js
930539
+ init_version_check();
930441
930540
  init_logger();
930442
930541
  async function gatherWakeContext(config2, doVersionCheck) {
930443
930542
  const [screenshotResult, calendarResult, versionResult] = await Promise.allSettled([
@@ -930571,6 +930670,7 @@ init_logger();
930571
930670
 
930572
930671
  // dist/agent/status.js
930573
930672
  init_logger();
930673
+ init_version_check();
930574
930674
  function buildHelpText() {
930575
930675
  return [
930576
930676
  "VisionClaw Commands:",
@@ -930970,7 +931070,7 @@ ${link}`);
930970
931070
  saveConfig(freshConfig);
930971
931071
  await channelManager.sendMessage(req.channel, req.sender, `${result.message}
930972
931072
  Account: ${accountId}
930973
- Restarting agent to activate WeChat channel...`);
931073
+ Agent will restart shortly and be back soon.`);
930974
931074
  const shutdownHook = async () => {
930975
931075
  if (deps.obsClose)
930976
931076
  await deps.obsClose();
@@ -931465,8 +931565,9 @@ init_state();
931465
931565
  var import_node_fs40 = __toESM(require("node:fs"), 1);
931466
931566
  var import_node_http2 = __toESM(require("node:http"), 1);
931467
931567
  var import_node_path39 = __toESM(require("node:path"), 1);
931468
- var import_node_url7 = require("node:url");
931568
+ var import_node_url5 = require("node:url");
931469
931569
  init_config();
931570
+ init_version_check();
931470
931571
  init_logger();
931471
931572
 
931472
931573
  // dist/obs/tunnel.js
@@ -933525,7 +933626,7 @@ function startObsServer(options = {}) {
933525
933626
  });
933526
933627
  const server = import_node_http2.default.createServer((req, res) => {
933527
933628
  try {
933528
- const url2 = new import_node_url7.URL(req.url ?? "/", `http://${req.headers.host ?? "localhost"}`);
933629
+ const url2 = new import_node_url5.URL(req.url ?? "/", `http://${req.headers.host ?? "localhost"}`);
933529
933630
  const pathname = url2.pathname;
933530
933631
  if (pathname === "/" || pathname === "/obs" || pathname === "/obs/") {
933531
933632
  const html = renderIndexHtml();
@@ -933896,18 +933997,8 @@ Global options:
933896
933997
  -h, --help Show this help and exit
933897
933998
  `);
933898
933999
  }
933899
- async function printVersionAndExit() {
933900
- try {
933901
- const fs54 = await import("node:fs");
933902
- const path52 = await import("node:path");
933903
- const url2 = await import("node:url");
933904
- const __dirname5 = path52.dirname(url2.fileURLToPath(__importMetaUrl));
933905
- const pkgPath = path52.join(__dirname5, "..", "package.json");
933906
- const pkg = JSON.parse(fs54.readFileSync(pkgPath, "utf-8"));
933907
- console.log(pkg.version ?? "unknown");
933908
- } catch (_err) {
933909
- console.log("unknown");
933910
- }
934000
+ function printVersionAndExit() {
934001
+ console.log(getCurrentVersion());
933911
934002
  process.exit(0);
933912
934003
  }
933913
934004
  async function main() {
@@ -933920,7 +934011,7 @@ async function main() {
933920
934011
  return;
933921
934012
  }
933922
934013
  if (parsed.version) {
933923
- await printVersionAndExit();
934014
+ printVersionAndExit();
933924
934015
  return;
933925
934016
  }
933926
934017
  setProfile(parsed.profile);
@@ -933949,7 +934040,7 @@ async function main() {
933949
934040
  };
933950
934041
  process.on("SIGTERM", () => handleSignal("SIGTERM"));
933951
934042
  process.on("SIGINT", () => handleSignal("SIGINT"));
933952
- logger.system(`VisionClaw - Personal Desktop Agent`);
934043
+ logger.system(`VisionClaw v${getCurrentVersion()}`);
933953
934044
  logger.system(`Profile: ${getProfile()}
933954
934045
  `);
933955
934046
  if (parsed.command === "prepare-mac") {