@semiont/cli 0.2.39 → 0.2.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -341,10 +341,10 @@ function mergeDefs(...defs) {
341
341
  function cloneDef(schema2) {
342
342
  return mergeDefs(schema2._zod.def);
343
343
  }
344
- function getElementAtPath(obj, path40) {
345
- if (!path40)
344
+ function getElementAtPath(obj, path39) {
345
+ if (!path39)
346
346
  return obj;
347
- return path40.reduce((acc, key) => acc?.[key], obj);
347
+ return path39.reduce((acc, key) => acc?.[key], obj);
348
348
  }
349
349
  function promiseAllObject(promisesObj) {
350
350
  const keys = Object.keys(promisesObj);
@@ -634,11 +634,11 @@ function aborted(x, startIndex = 0) {
634
634
  }
635
635
  return false;
636
636
  }
637
- function prefixIssues(path40, issues) {
637
+ function prefixIssues(path39, issues) {
638
638
  return issues.map((iss) => {
639
639
  var _a4;
640
640
  (_a4 = iss).path ?? (_a4.path = []);
641
- iss.path.unshift(path40);
641
+ iss.path.unshift(path39);
642
642
  return iss;
643
643
  });
644
644
  }
@@ -859,7 +859,7 @@ function formatError(error46, mapper = (issue2) => issue2.message) {
859
859
  }
860
860
  function treeifyError(error46, mapper = (issue2) => issue2.message) {
861
861
  const result = { errors: [] };
862
- const processError = (error47, path40 = []) => {
862
+ const processError = (error47, path39 = []) => {
863
863
  var _a4, _b;
864
864
  for (const issue2 of error47.issues) {
865
865
  if (issue2.code === "invalid_union" && issue2.errors.length) {
@@ -869,7 +869,7 @@ function treeifyError(error46, mapper = (issue2) => issue2.message) {
869
869
  } else if (issue2.code === "invalid_element") {
870
870
  processError({ issues: issue2.issues }, issue2.path);
871
871
  } else {
872
- const fullpath = [...path40, ...issue2.path];
872
+ const fullpath = [...path39, ...issue2.path];
873
873
  if (fullpath.length === 0) {
874
874
  result.errors.push(mapper(issue2));
875
875
  continue;
@@ -901,8 +901,8 @@ function treeifyError(error46, mapper = (issue2) => issue2.message) {
901
901
  }
902
902
  function toDotPath(_path) {
903
903
  const segs = [];
904
- const path40 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
905
- for (const seg of path40) {
904
+ const path39 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
905
+ for (const seg of path39) {
906
906
  if (typeof seg === "number")
907
907
  segs.push(`[${seg}]`);
908
908
  else if (typeof seg === "symbol")
@@ -14051,7 +14051,7 @@ var init_backend_service = __esm({
14051
14051
  }
14052
14052
  }
14053
14053
  async collectProcessLogs() {
14054
- const logPath = path3.join(this.typedConfig.projectRoot || this.projectRoot, "apps/backend/logs/app.log");
14054
+ const logPath = path3.join(this.typedConfig.projectRoot || this.projectRoot, "backend", "logs", "app.log");
14055
14055
  const recent = [];
14056
14056
  const errorLogs = [];
14057
14057
  try {
@@ -15826,28 +15826,31 @@ function resolveBackendNpmPackage() {
15826
15826
  }
15827
15827
  }
15828
15828
  function getBackendPaths(context) {
15829
+ const projectRoot = context.service.projectRoot;
15830
+ const runtimeDir = path10.join(projectRoot, "backend");
15829
15831
  const semiontRepo = context.options?.semiontRepo;
15830
15832
  if (semiontRepo) {
15831
15833
  const sourceDir = path10.join(semiontRepo, "apps", "backend");
15832
- return buildPaths(sourceDir, false);
15834
+ return buildPaths(sourceDir, runtimeDir, false);
15833
15835
  }
15834
15836
  const npmDir = resolveBackendNpmPackage();
15835
15837
  if (npmDir) {
15836
- return buildPaths(npmDir, true);
15838
+ return buildPaths(npmDir, runtimeDir, true);
15837
15839
  }
15838
15840
  throw new Error(
15839
15841
  "Cannot find backend source. Either:\n - Set SEMIONT_REPO to your semiont clone, or\n - Run: npm install @semiont/backend"
15840
15842
  );
15841
15843
  }
15842
- function buildPaths(sourceDir, fromNpmPackage) {
15844
+ function buildPaths(sourceDir, runtimeDir, fromNpmPackage) {
15843
15845
  return {
15844
15846
  sourceDir,
15845
- pidFile: path10.join(sourceDir, ".pid"),
15846
- envFile: path10.join(sourceDir, ".env"),
15847
- logsDir: path10.join(sourceDir, "logs"),
15848
- appLogFile: path10.join(sourceDir, "logs", "app.log"),
15849
- errorLogFile: path10.join(sourceDir, "logs", "error.log"),
15850
- tmpDir: path10.join(sourceDir, "tmp"),
15847
+ runtimeDir,
15848
+ pidFile: path10.join(runtimeDir, ".pid"),
15849
+ envFile: path10.join(runtimeDir, ".env"),
15850
+ logsDir: path10.join(runtimeDir, "logs"),
15851
+ appLogFile: path10.join(runtimeDir, "logs", "app.log"),
15852
+ errorLogFile: path10.join(runtimeDir, "logs", "error.log"),
15853
+ tmpDir: path10.join(runtimeDir, "tmp"),
15851
15854
  distDir: path10.join(sourceDir, "dist"),
15852
15855
  fromNpmPackage
15853
15856
  };
@@ -15880,7 +15883,8 @@ var init_backend_check = __esm({
15880
15883
  let healthy = false;
15881
15884
  let details = {
15882
15885
  backendDir,
15883
- port: config2.port
15886
+ port: config2.port,
15887
+ source: paths.fromNpmPackage ? "npm package" : "SEMIONT_REPO"
15884
15888
  };
15885
15889
  if (!fs10.existsSync(backendDir)) {
15886
15890
  details.message = "Backend not provisioned";
@@ -16026,28 +16030,31 @@ function resolveFrontendNpmPackage() {
16026
16030
  }
16027
16031
  }
16028
16032
  function getFrontendPaths(context) {
16033
+ const projectRoot = context.service.projectRoot;
16034
+ const runtimeDir = path11.join(projectRoot, "frontend");
16029
16035
  const semiontRepo = context.options?.semiontRepo;
16030
16036
  if (semiontRepo) {
16031
16037
  const sourceDir = path11.join(semiontRepo, "apps", "frontend");
16032
- return buildPaths2(sourceDir, false);
16038
+ return buildPaths2(sourceDir, runtimeDir, false);
16033
16039
  }
16034
16040
  const npmDir = resolveFrontendNpmPackage();
16035
16041
  if (npmDir) {
16036
- return buildPaths2(npmDir, true);
16042
+ return buildPaths2(npmDir, runtimeDir, true);
16037
16043
  }
16038
16044
  throw new Error(
16039
16045
  "Cannot find frontend source. Either:\n - Set SEMIONT_REPO to your semiont clone, or\n - Run: npm install @semiont/frontend"
16040
16046
  );
16041
16047
  }
16042
- function buildPaths2(sourceDir, fromNpmPackage) {
16048
+ function buildPaths2(sourceDir, runtimeDir, fromNpmPackage) {
16043
16049
  return {
16044
16050
  sourceDir,
16045
- pidFile: path11.join(sourceDir, ".pid"),
16046
- envLocalFile: path11.join(sourceDir, ".env.local"),
16047
- logsDir: path11.join(sourceDir, "logs"),
16048
- appLogFile: path11.join(sourceDir, "logs", "app.log"),
16049
- errorLogFile: path11.join(sourceDir, "logs", "error.log"),
16050
- tmpDir: path11.join(sourceDir, "tmp"),
16051
+ runtimeDir,
16052
+ pidFile: path11.join(runtimeDir, ".pid"),
16053
+ envLocalFile: path11.join(runtimeDir, ".env.local"),
16054
+ logsDir: path11.join(runtimeDir, "logs"),
16055
+ appLogFile: path11.join(runtimeDir, "logs", "app.log"),
16056
+ errorLogFile: path11.join(runtimeDir, "logs", "error.log"),
16057
+ tmpDir: path11.join(runtimeDir, "tmp"),
16051
16058
  nextDir: path11.join(sourceDir, ".next"),
16052
16059
  fromNpmPackage
16053
16060
  };
@@ -16078,7 +16085,8 @@ var init_frontend_check = __esm({
16078
16085
  let healthy = false;
16079
16086
  let details = {
16080
16087
  frontendDir,
16081
- port: config2.port
16088
+ port: config2.port,
16089
+ source: paths.fromNpmPackage ? "npm package" : "SEMIONT_REPO"
16082
16090
  };
16083
16091
  if (!fs11.existsSync(frontendDir)) {
16084
16092
  details.message = "Frontend not provisioned";
@@ -16854,9 +16862,9 @@ async function startJanusGraph(context) {
16854
16862
  }
16855
16863
  };
16856
16864
  }
16857
- async function fileExists(path40) {
16865
+ async function fileExists(path39) {
16858
16866
  try {
16859
- await fs15.access(path40);
16867
+ await fs15.access(path39);
16860
16868
  return true;
16861
16869
  } catch {
16862
16870
  return false;
@@ -16917,6 +16925,10 @@ var init_backend_start = __esm({
16917
16925
  const config2 = service.config;
16918
16926
  const paths = getBackendPaths(context);
16919
16927
  const { sourceDir: backendSourceDir, envFile, pidFile, logsDir, tmpDir } = paths;
16928
+ if (service.verbose) {
16929
+ printInfo(`Source: ${backendSourceDir}`);
16930
+ printInfo(`Mode: ${paths.fromNpmPackage ? "npm package" : "SEMIONT_REPO"}`);
16931
+ }
16920
16932
  if (!fs16.existsSync(backendSourceDir)) {
16921
16933
  return {
16922
16934
  success: false,
@@ -17135,6 +17147,10 @@ var init_frontend_start = __esm({
17135
17147
  const config2 = service.config;
17136
17148
  const paths = getFrontendPaths(context);
17137
17149
  const { sourceDir: frontendSourceDir, envLocalFile: envFile, pidFile, logsDir, tmpDir } = paths;
17150
+ if (service.verbose) {
17151
+ printInfo(`Source: ${frontendSourceDir}`);
17152
+ printInfo(`Mode: ${paths.fromNpmPackage ? "npm package" : "SEMIONT_REPO"}`);
17153
+ }
17138
17154
  if (!fs17.existsSync(frontendSourceDir)) {
17139
17155
  return {
17140
17156
  success: false,
@@ -17788,9 +17804,9 @@ Files placed here will persist across service restarts.
17788
17804
  // src/platforms/posix/handlers/graph-provision.ts
17789
17805
  import * as fs21 from "fs/promises";
17790
17806
  import { execSync as execSync10 } from "child_process";
17791
- async function fileExists2(path40) {
17807
+ async function fileExists2(path39) {
17792
17808
  try {
17793
- await fs21.access(path40);
17809
+ await fs21.access(path39);
17794
17810
  return true;
17795
17811
  } catch {
17796
17812
  return false;
@@ -18004,7 +18020,7 @@ var init_backend_provision = __esm({
18004
18020
  }
18005
18021
  }
18006
18022
  const paths = getBackendPaths(context);
18007
- const { sourceDir: backendSourceDir, envFile, logsDir, tmpDir } = paths;
18023
+ const { sourceDir: backendSourceDir, runtimeDir, envFile, logsDir, tmpDir } = paths;
18008
18024
  if (!service.quiet) {
18009
18025
  printInfo(`Provisioning backend service ${service.name}...`);
18010
18026
  if (paths.fromNpmPackage) {
@@ -18012,11 +18028,13 @@ var init_backend_provision = __esm({
18012
18028
  } else {
18013
18029
  printInfo(`Using semiont repo: ${options.semiontRepo}`);
18014
18030
  }
18031
+ printInfo(`Runtime directory: ${runtimeDir}`);
18015
18032
  }
18033
+ fs22.mkdirSync(runtimeDir, { recursive: true });
18016
18034
  fs22.mkdirSync(logsDir, { recursive: true });
18017
18035
  fs22.mkdirSync(tmpDir, { recursive: true });
18018
18036
  if (!service.quiet) {
18019
- printInfo(`Created runtime directories in: ${backendSourceDir}`);
18037
+ printInfo(`Created runtime directories in: ${runtimeDir}`);
18020
18038
  }
18021
18039
  const envConfig = service.environmentConfig;
18022
18040
  const dbConfig = envConfig.services?.database;
@@ -18107,6 +18125,17 @@ var init_backend_provision = __esm({
18107
18125
  printSuccess("Created .env with configuration from environment file");
18108
18126
  }
18109
18127
  const prismaSchemaPath = path18.join(backendSourceDir, "prisma", "schema.prisma");
18128
+ if (!paths.fromNpmPackage) {
18129
+ const staleEnv = path18.join(backendSourceDir, ".env");
18130
+ if (fs22.existsSync(staleEnv)) {
18131
+ const backupPath = `${staleEnv}.backup.${Date.now()}`;
18132
+ fs22.renameSync(staleEnv, backupPath);
18133
+ if (!service.quiet) {
18134
+ printWarning(`Moved stale ${staleEnv} to ${path18.basename(backupPath)}`);
18135
+ printInfo(`Runtime .env is now at: ${envFile}`);
18136
+ }
18137
+ }
18138
+ }
18110
18139
  if (paths.fromNpmPackage) {
18111
18140
  if (!service.quiet) {
18112
18141
  printInfo("Using pre-built npm package \u2014 skipping install, build, and prisma generate");
@@ -18246,7 +18275,7 @@ var init_backend_provision = __esm({
18246
18275
  printInfo("You may need to run migrations manually: npx prisma migrate deploy");
18247
18276
  }
18248
18277
  }
18249
- const readmePath = path18.join(backendSourceDir, "RUNTIME.md");
18278
+ const readmePath = path18.join(runtimeDir, "RUNTIME.md");
18250
18279
  if (!fs22.existsSync(readmePath)) {
18251
18280
  const readmeContent = `# Backend Runtime Directory
18252
18281
 
@@ -18254,37 +18283,28 @@ This directory contains runtime files for the backend service.
18254
18283
 
18255
18284
  ## Structure
18256
18285
 
18257
- - \`.env\` - Environment configuration (git-ignored)
18286
+ - \`.env\` - Environment configuration
18258
18287
  - \`logs/\` - Application logs
18259
18288
  - \`tmp/\` - Temporary files
18260
18289
  - \`.pid\` - Process ID when running
18261
18290
 
18262
- ## Configuration
18263
-
18264
- Edit \`.env\` to configure:
18265
- - Database connection (DATABASE_URL)
18266
- - Backend URL (BACKEND_URL)
18267
- - JWT secret (JWT_SECRET)
18268
- - Port (PORT)
18269
- - Other environment-specific settings
18270
-
18271
18291
  ## Source Code
18272
18292
 
18273
- The backend source code is located at:
18274
- ${backendSourceDir}
18293
+ ${paths.fromNpmPackage ? `Installed npm package: ${backendSourceDir}` : `Semiont repo: ${backendSourceDir}`}
18275
18294
 
18276
18295
  ## Commands
18277
18296
 
18278
18297
  - Start: \`semiont start --service backend --environment ${service.environment}\`
18279
18298
  - Check: \`semiont check --service backend --environment ${service.environment}\`
18280
18299
  - Stop: \`semiont stop --service backend --environment ${service.environment}\`
18281
- - Logs: \`tail -f logs/app.log\`
18300
+ - Logs: \`tail -f ${logsDir}/app.log\`
18282
18301
  `;
18283
18302
  fs22.writeFileSync(readmePath, readmeContent);
18284
18303
  }
18285
18304
  const metadata = {
18286
18305
  serviceType: "backend",
18287
18306
  backendSourceDir,
18307
+ runtimeDir,
18288
18308
  envFile,
18289
18309
  logsDir,
18290
18310
  tmpDir,
@@ -18295,6 +18315,7 @@ ${backendSourceDir}
18295
18315
  printInfo("");
18296
18316
  printInfo("Backend details:");
18297
18317
  printInfo(` Source directory: ${backendSourceDir}`);
18318
+ printInfo(` Runtime directory: ${runtimeDir}`);
18298
18319
  printInfo(` Environment file: ${envFile}`);
18299
18320
  printInfo(` Logs directory: ${logsDir}`);
18300
18321
  printInfo("");
@@ -18370,7 +18391,7 @@ var init_frontend_provision = __esm({
18370
18391
  }
18371
18392
  }
18372
18393
  const paths = getFrontendPaths(context);
18373
- const { sourceDir: frontendSourceDir, logsDir, tmpDir, envLocalFile: envFile } = paths;
18394
+ const { sourceDir: frontendSourceDir, runtimeDir, logsDir, tmpDir, envLocalFile: envFile } = paths;
18374
18395
  if (!service.quiet) {
18375
18396
  printInfo(`Provisioning frontend service ${service.name}...`);
18376
18397
  if (paths.fromNpmPackage) {
@@ -18378,11 +18399,13 @@ var init_frontend_provision = __esm({
18378
18399
  } else {
18379
18400
  printInfo(`Using source directory: ${frontendSourceDir}`);
18380
18401
  }
18402
+ printInfo(`Runtime directory: ${runtimeDir}`);
18381
18403
  }
18404
+ fs23.mkdirSync(runtimeDir, { recursive: true });
18382
18405
  fs23.mkdirSync(logsDir, { recursive: true });
18383
18406
  fs23.mkdirSync(tmpDir, { recursive: true });
18384
18407
  if (!service.quiet) {
18385
- printInfo(`Created runtime directories in: ${frontendSourceDir}`);
18408
+ printInfo(`Created runtime directories in: ${runtimeDir}`);
18386
18409
  }
18387
18410
  const envExamplePath = path19.join(frontendSourceDir, ".env.example");
18388
18411
  if (fs23.existsSync(envFile)) {
@@ -18502,6 +18525,17 @@ NEXT_PUBLIC_OAUTH_ALLOWED_DOMAINS=${oauthAllowedDomains.join(",")}
18502
18525
  printSuccess(`Generated secure NEXTAUTH_SECRET (32 bytes)`);
18503
18526
  }
18504
18527
  }
18528
+ if (!paths.fromNpmPackage) {
18529
+ const staleEnvLocal = path19.join(frontendSourceDir, ".env.local");
18530
+ if (fs23.existsSync(staleEnvLocal)) {
18531
+ const backupPath = `${staleEnvLocal}.backup.${Date.now()}`;
18532
+ fs23.renameSync(staleEnvLocal, backupPath);
18533
+ if (!service.quiet) {
18534
+ printWarning(`Moved stale ${staleEnvLocal} to ${path19.basename(backupPath)}`);
18535
+ printInfo(`Runtime .env.local is now at: ${envFile}`);
18536
+ }
18537
+ }
18538
+ }
18505
18539
  if (paths.fromNpmPackage) {
18506
18540
  if (!service.quiet) {
18507
18541
  printInfo("Using pre-built npm package \u2014 skipping install, build, and workspace steps");
@@ -18594,7 +18628,7 @@ NEXT_PUBLIC_OAUTH_ALLOWED_DOMAINS=${oauthAllowedDomains.join(",")}
18594
18628
  }
18595
18629
  }
18596
18630
  }
18597
- const readmePath = path19.join(frontendSourceDir, "RUNTIME.md");
18631
+ const readmePath = path19.join(runtimeDir, "RUNTIME.md");
18598
18632
  if (!fs23.existsSync(readmePath)) {
18599
18633
  const readmeContent = `# Frontend Runtime Directory
18600
18634
 
@@ -18602,35 +18636,28 @@ This directory contains runtime files for the frontend service.
18602
18636
 
18603
18637
  ## Structure
18604
18638
 
18605
- - \`.env.local\` - Environment configuration (git-ignored)
18639
+ - \`.env.local\` - Environment configuration
18606
18640
  - \`logs/\` - Application logs
18607
18641
  - \`tmp/\` - Temporary files
18608
18642
  - \`.pid\` - Process ID when running
18609
18643
 
18610
- ## Configuration
18611
-
18612
- Edit \`.env.local\` to configure:
18613
- - Server API URL (SERVER_API_URL) - set to localhost for POSIX platform
18614
- - Port (PORT)
18615
- - Other environment-specific settings
18616
-
18617
18644
  ## Source Code
18618
18645
 
18619
- The frontend source code is located at:
18620
- ${frontendSourceDir}
18646
+ ${paths.fromNpmPackage ? `Installed npm package: ${frontendSourceDir}` : `Semiont repo: ${frontendSourceDir}`}
18621
18647
 
18622
18648
  ## Commands
18623
18649
 
18624
18650
  - Start: \`semiont start --service frontend --environment ${service.environment}\`
18625
18651
  - Check: \`semiont check --service frontend --environment ${service.environment}\`
18626
18652
  - Stop: \`semiont stop --service frontend --environment ${service.environment}\`
18627
- - Logs: \`tail -f logs/app.log\`
18653
+ - Logs: \`tail -f ${logsDir}/app.log\`
18628
18654
  `;
18629
18655
  fs23.writeFileSync(readmePath, readmeContent);
18630
18656
  }
18631
18657
  const metadata = {
18632
18658
  serviceType: "frontend",
18633
18659
  frontendSourceDir,
18660
+ runtimeDir,
18634
18661
  envFile,
18635
18662
  logsDir,
18636
18663
  tmpDir,
@@ -18641,6 +18668,7 @@ ${frontendSourceDir}
18641
18668
  printInfo("");
18642
18669
  printInfo("Frontend details:");
18643
18670
  printInfo(` Source directory: ${frontendSourceDir}`);
18671
+ printInfo(` Runtime directory: ${runtimeDir}`);
18644
18672
  printInfo(` Environment file: ${envFile}`);
18645
18673
  printInfo(` Logs directory: ${logsDir}`);
18646
18674
  printInfo("");
@@ -19051,9 +19079,9 @@ async function stopJanusGraph(context) {
19051
19079
  };
19052
19080
  }
19053
19081
  }
19054
- async function fileExists3(path40) {
19082
+ async function fileExists3(path39) {
19055
19083
  try {
19056
- await fs25.access(path40);
19084
+ await fs25.access(path39);
19057
19085
  return true;
19058
19086
  } catch {
19059
19087
  return false;
@@ -19350,7 +19378,6 @@ var init_process_manager = __esm({
19350
19378
 
19351
19379
  // src/platforms/posix/handlers/backend-stop.ts
19352
19380
  import * as fs27 from "fs";
19353
- import * as path24 from "path";
19354
19381
  var stopBackendService, backendStopDescriptor;
19355
19382
  var init_backend_stop = __esm({
19356
19383
  "src/platforms/posix/handlers/backend-stop.ts"() {
@@ -19358,21 +19385,15 @@ var init_backend_stop = __esm({
19358
19385
  init_cli_logger();
19359
19386
  init_process_manager();
19360
19387
  init_preflight_utils();
19388
+ init_backend_paths();
19361
19389
  stopBackendService = async (context) => {
19362
19390
  const { service } = context;
19363
- const semiontRepo = context.options?.semiontRepo;
19364
- if (!semiontRepo) {
19365
- return {
19366
- success: false,
19367
- error: "Semiont repository path is required",
19368
- metadata: { serviceType: "backend" }
19369
- };
19391
+ const paths = getBackendPaths(context);
19392
+ const { sourceDir: backendSourceDir, pidFile, appLogFile: appLogPath, errorLogFile: errorLogPath } = paths;
19393
+ if (service.verbose) {
19394
+ printInfo(`Source: ${backendSourceDir}`);
19395
+ printInfo(`Mode: ${paths.fromNpmPackage ? "npm package" : "SEMIONT_REPO"}`);
19370
19396
  }
19371
- const backendSourceDir = path24.join(semiontRepo, "apps", "backend");
19372
- const pidFile = path24.join(backendSourceDir, ".pid");
19373
- const logsDir = path24.join(backendSourceDir, "logs");
19374
- const appLogPath = path24.join(logsDir, "app.log");
19375
- const errorLogPath = path24.join(logsDir, "error.log");
19376
19397
  if (!fs27.existsSync(backendSourceDir)) {
19377
19398
  return {
19378
19399
  success: false,
@@ -19526,6 +19547,10 @@ var init_frontend_stop = __esm({
19526
19547
  const { service } = context;
19527
19548
  const paths = getFrontendPaths(context);
19528
19549
  const { sourceDir: frontendSourceDir, pidFile, appLogFile: appLogPath, errorLogFile: errorLogPath } = paths;
19550
+ if (service.verbose) {
19551
+ printInfo(`Source: ${frontendSourceDir}`);
19552
+ printInfo(`Mode: ${paths.fromNpmPackage ? "npm package" : "SEMIONT_REPO"}`);
19553
+ }
19529
19554
  if (!fs28.existsSync(frontendSourceDir)) {
19530
19555
  return {
19531
19556
  success: false,
@@ -19842,7 +19867,7 @@ var init_handlers = __esm({
19842
19867
  // src/platforms/posix/platform.ts
19843
19868
  import { execSync as execSync17 } from "child_process";
19844
19869
  import * as fs30 from "fs";
19845
- import * as path25 from "path";
19870
+ import * as path24 from "path";
19846
19871
  var PosixPlatform;
19847
19872
  var init_platform2 = __esm({
19848
19873
  "src/platforms/posix/platform.ts"() {
@@ -19975,19 +20000,19 @@ var init_platform2 = __esm({
19975
20000
  }
19976
20001
  if (logs.length === 0) {
19977
20002
  const logPaths = [
19978
- path25.join("/var/log", service.name, "*.log"),
19979
- path25.join(service.projectRoot, "logs", "*.log"),
19980
- path25.join(service.projectRoot, ".logs", "*.log")
20003
+ path24.join("/var/log", service.name, "*.log"),
20004
+ path24.join(service.projectRoot, "logs", "*.log"),
20005
+ path24.join(service.projectRoot, ".logs", "*.log")
19981
20006
  ];
19982
20007
  for (const pattern of logPaths) {
19983
- const dir = path25.dirname(pattern);
19984
- const filePattern = path25.basename(pattern);
20008
+ const dir = path24.dirname(pattern);
20009
+ const filePattern = path24.basename(pattern);
19985
20010
  if (fs30.existsSync(dir)) {
19986
20011
  const files = fs30.readdirSync(dir).filter(
19987
20012
  (f) => f.match(filePattern.replace("*", ".*"))
19988
20013
  );
19989
20014
  for (const file2 of files) {
19990
- const fullPath = path25.join(dir, file2);
20015
+ const fullPath = path24.join(dir, file2);
19991
20016
  const content = this.tailFile(fullPath, tail);
19992
20017
  if (content) {
19993
20018
  const lines = content.split("\n");
@@ -20021,17 +20046,17 @@ var init_platform2 = __esm({
20021
20046
  "/var/log/postgresql/*.log",
20022
20047
  "/var/log/mysql/*.log",
20023
20048
  "/var/log/mongodb/*.log",
20024
- path25.join(service.projectRoot, "data", "logs", "*.log")
20049
+ path24.join(service.projectRoot, "data", "logs", "*.log")
20025
20050
  ];
20026
20051
  for (const pattern of logPaths) {
20027
- const dir = path25.dirname(pattern);
20028
- const filePattern = path25.basename(pattern);
20052
+ const dir = path24.dirname(pattern);
20053
+ const filePattern = path24.basename(pattern);
20029
20054
  if (fs30.existsSync(dir)) {
20030
20055
  const files = fs30.readdirSync(dir).filter(
20031
20056
  (f) => f.match(filePattern.replace("*", ".*"))
20032
20057
  );
20033
20058
  for (const file2 of files.slice(-1)) {
20034
- const fullPath = path25.join(dir, file2);
20059
+ const fullPath = path24.join(dir, file2);
20035
20060
  const content = this.tailFile(fullPath, tail);
20036
20061
  if (content) {
20037
20062
  const lines = content.split("\n");
@@ -20985,11 +21010,11 @@ var init_database_start2 = __esm({
20985
21010
 
20986
21011
  // src/platforms/container/handlers/graph-start.ts
20987
21012
  import * as fs31 from "fs/promises";
20988
- import * as path26 from "path";
21013
+ import * as path25 from "path";
20989
21014
  import { execSync as execSync23 } from "child_process";
20990
21015
  async function startJanusGraph2(context) {
20991
21016
  const { service, containerName } = context;
20992
- const composePath = path26.join(service.projectRoot, "docker-compose.janusgraph.yml");
21017
+ const composePath = path25.join(service.projectRoot, "docker-compose.janusgraph.yml");
20993
21018
  if (!await fileExists4(composePath)) {
20994
21019
  return {
20995
21020
  success: false,
@@ -21115,9 +21140,9 @@ async function startJanusGraph2(context) {
21115
21140
  };
21116
21141
  }
21117
21142
  }
21118
- async function fileExists4(path40) {
21143
+ async function fileExists4(path39) {
21119
21144
  try {
21120
- await fs31.access(path40);
21145
+ await fs31.access(path39);
21121
21146
  return true;
21122
21147
  } catch {
21123
21148
  return false;
@@ -21167,7 +21192,7 @@ var init_graph_start2 = __esm({
21167
21192
  // src/platforms/container/handlers/database-provision.ts
21168
21193
  import { execSync as execSync24 } from "child_process";
21169
21194
  import * as fs32 from "fs";
21170
- import * as path27 from "path";
21195
+ import * as path26 from "path";
21171
21196
  var provisionDatabaseContainer, preflightDatabaseProvision, databaseProvisionDescriptor;
21172
21197
  var init_database_provision = __esm({
21173
21198
  "src/platforms/container/handlers/database-provision.ts"() {
@@ -21204,9 +21229,9 @@ var init_database_provision = __esm({
21204
21229
  } catch (error46) {
21205
21230
  printWarning(`Failed to pull image ${image}, will try to use local`);
21206
21231
  }
21207
- const initScriptsPath = path27.join(service.projectRoot, "db", "init");
21208
- const migrationsPath = path27.join(service.projectRoot, "db", "migrations");
21209
- const seedDataPath = path27.join(service.projectRoot, "db", "seed");
21232
+ const initScriptsPath = path26.join(service.projectRoot, "db", "init");
21233
+ const migrationsPath = path26.join(service.projectRoot, "db", "migrations");
21234
+ const seedDataPath = path26.join(service.projectRoot, "db", "seed");
21210
21235
  const hasInitScripts = fs32.existsSync(initScriptsPath);
21211
21236
  const hasMigrations = fs32.existsSync(migrationsPath);
21212
21237
  const hasSeedData = fs32.existsSync(seedDataPath);
@@ -23957,7 +23982,7 @@ var init_js_yaml = __esm({
23957
23982
 
23958
23983
  // src/platforms/container/handlers/graph-provision.ts
23959
23984
  import * as fs33 from "fs/promises";
23960
- import * as path28 from "path";
23985
+ import * as path27 from "path";
23961
23986
  import { execSync as execSync25 } from "child_process";
23962
23987
  var provisionGraphService2, preflightGraphProvision2, graphProvisionDescriptor2;
23963
23988
  var init_graph_provision2 = __esm({
@@ -24102,7 +24127,7 @@ var init_graph_provision2 = __esm({
24102
24127
  ...withElasticsearch && { "elasticsearch-data": {} }
24103
24128
  }
24104
24129
  };
24105
- const composePath = path28.join(service.projectRoot, "docker-compose.janusgraph.yml");
24130
+ const composePath = path27.join(service.projectRoot, "docker-compose.janusgraph.yml");
24106
24131
  await fs33.writeFile(
24107
24132
  composePath,
24108
24133
  `# Generated by semiont provision --service janusgraph
@@ -24171,12 +24196,12 @@ var init_graph_provision2 = __esm({
24171
24196
  });
24172
24197
 
24173
24198
  // src/platforms/container/handlers/graph-stop.ts
24174
- import * as path29 from "path";
24199
+ import * as path28 from "path";
24175
24200
  import { execSync as execSync26 } from "child_process";
24176
24201
  import * as fs34 from "fs/promises";
24177
24202
  async function stopJanusGraph2(context) {
24178
24203
  const { service, options, containerName } = context;
24179
- const composePath = path29.join(service.projectRoot, "docker-compose.janusgraph.yml");
24204
+ const composePath = path28.join(service.projectRoot, "docker-compose.janusgraph.yml");
24180
24205
  if (!await fileExists5(composePath)) {
24181
24206
  if (!service.quiet) {
24182
24207
  printWarning("JanusGraph is not provisioned.");
@@ -24272,9 +24297,9 @@ async function stopJanusGraph2(context) {
24272
24297
  };
24273
24298
  }
24274
24299
  }
24275
- async function fileExists5(path40) {
24300
+ async function fileExists5(path39) {
24276
24301
  try {
24277
- await fs34.access(path40);
24302
+ await fs34.access(path39);
24278
24303
  return true;
24279
24304
  } catch {
24280
24305
  return false;
@@ -24463,18 +24488,18 @@ var init_database_stop = __esm({
24463
24488
  });
24464
24489
 
24465
24490
  // src/platforms/container/handlers/proxy-paths.ts
24466
- import * as path30 from "path";
24491
+ import * as path29 from "path";
24467
24492
  function getProxyPaths2(context) {
24468
24493
  const projectRoot = context.service.projectRoot;
24469
- const runtimeDir = path30.join(projectRoot, "proxy");
24494
+ const runtimeDir = path29.join(projectRoot, "proxy");
24470
24495
  return {
24471
24496
  runtimeDir,
24472
- logsDir: path30.join(runtimeDir, "logs"),
24473
- pidFile: path30.join(runtimeDir, "proxy.pid"),
24474
- configFile: path30.join(runtimeDir, "envoy.yaml"),
24475
- containerLogFile: path30.join(runtimeDir, "logs", "container.log"),
24476
- accessLogFile: path30.join(runtimeDir, "logs", "access.log"),
24477
- adminLogFile: path30.join(runtimeDir, "logs", "admin.log")
24497
+ logsDir: path29.join(runtimeDir, "logs"),
24498
+ pidFile: path29.join(runtimeDir, "proxy.pid"),
24499
+ configFile: path29.join(runtimeDir, "envoy.yaml"),
24500
+ containerLogFile: path29.join(runtimeDir, "logs", "container.log"),
24501
+ accessLogFile: path29.join(runtimeDir, "logs", "access.log"),
24502
+ adminLogFile: path29.join(runtimeDir, "logs", "admin.log")
24478
24503
  };
24479
24504
  }
24480
24505
  var init_proxy_paths2 = __esm({
@@ -24485,7 +24510,7 @@ var init_proxy_paths2 = __esm({
24485
24510
 
24486
24511
  // src/platforms/container/handlers/proxy-provision.ts
24487
24512
  import * as fs35 from "fs";
24488
- import * as path31 from "path";
24513
+ import * as path30 from "path";
24489
24514
  import { execSync as execSync28 } from "child_process";
24490
24515
  function getHostAddress() {
24491
24516
  const platform = process.platform;
@@ -24552,7 +24577,7 @@ var init_proxy_provision2 = __esm({
24552
24577
  const backendPort = config2.backendPort || 4e3;
24553
24578
  const frontendPort = config2.frontendPort || 3e3;
24554
24579
  if (config2.type === "envoy") {
24555
- const templatePath = path31.join(getTemplatesDir(import.meta.url), "envoy.yaml");
24580
+ const templatePath = path30.join(getTemplatesDir(import.meta.url), "envoy.yaml");
24556
24581
  if (!fs35.existsSync(templatePath)) {
24557
24582
  return {
24558
24583
  success: false,
@@ -26387,7 +26412,7 @@ var init_rds_start = __esm({
26387
26412
 
26388
26413
  // src/platforms/aws/handlers/stack-provision.ts
26389
26414
  import { spawnSync } from "child_process";
26390
- import * as path32 from "path";
26415
+ import * as path31 from "path";
26391
26416
  import * as fs38 from "fs";
26392
26417
  var provisionStackService, preflightStackProvision, stackProvisionDescriptor;
26393
26418
  var init_stack_provision = __esm({
@@ -26458,7 +26483,7 @@ var init_stack_provision = __esm({
26458
26483
  continue;
26459
26484
  }
26460
26485
  try {
26461
- const cdkContextPath = path32.join(projectRoot, "cdk.context.json");
26486
+ const cdkContextPath = path31.join(projectRoot, "cdk.context.json");
26462
26487
  const cdkContext = fs38.existsSync(cdkContextPath) ? JSON.parse(fs38.readFileSync(cdkContextPath, "utf-8")) : {};
26463
26488
  cdkContext[`availability-zones:account=${awsConfig.accountId}:region=${awsConfig.region}`] = cdkContext[`availability-zones:account=${awsConfig.accountId}:region=${awsConfig.region}`] || [`${awsConfig.region}a`, `${awsConfig.region}b`];
26464
26489
  fs38.writeFileSync(cdkContextPath, JSON.stringify(cdkContext, null, 2));
@@ -26562,7 +26587,7 @@ var init_stack_provision = __esm({
26562
26587
 
26563
26588
  // src/platforms/aws/handlers/ecs-publish.ts
26564
26589
  import { execSync as execSync37 } from "child_process";
26565
- import * as path33 from "path";
26590
+ import * as path32 from "path";
26566
26591
  import * as fs39 from "fs";
26567
26592
  async function createNewTaskDefinition(service, imageUri, region, _accountId, cfnDiscoveredResources, resourceName) {
26568
26593
  if (!service || !imageUri) return "";
@@ -26699,7 +26724,7 @@ var init_ecs_publish = __esm({
26699
26724
  }
26700
26725
  }
26701
26726
  try {
26702
- const apiTypesPath = path33.join(buildContext, "packages", "api-types");
26727
+ const apiTypesPath = path32.join(buildContext, "packages", "api-types");
26703
26728
  if (fs39.existsSync(apiTypesPath)) {
26704
26729
  execSync37("npm run build", {
26705
26730
  cwd: apiTypesPath,
@@ -26707,7 +26732,7 @@ var init_ecs_publish = __esm({
26707
26732
  stdio: service.verbose ? "inherit" : "pipe"
26708
26733
  });
26709
26734
  }
26710
- const appPath = path33.join(buildContext, "apps", service.name);
26735
+ const appPath = path32.join(buildContext, "apps", service.name);
26711
26736
  if (fs39.existsSync(appPath)) {
26712
26737
  execSync37("npm run build", {
26713
26738
  cwd: appPath,
@@ -29671,17 +29696,17 @@ var init_headers = __esm({
29671
29696
  function encodeURIPath(str3) {
29672
29697
  return str3.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
29673
29698
  }
29674
- var EMPTY, createPathTagFunction, path34;
29699
+ var EMPTY, createPathTagFunction, path33;
29675
29700
  var init_path = __esm({
29676
29701
  "../../node_modules/@anthropic-ai/sdk/internal/utils/path.mjs"() {
29677
29702
  init_error();
29678
29703
  EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
29679
- createPathTagFunction = (pathEncoder = encodeURIPath) => function path40(statics, ...params) {
29704
+ createPathTagFunction = (pathEncoder = encodeURIPath) => function path39(statics, ...params) {
29680
29705
  if (statics.length === 1)
29681
29706
  return statics[0];
29682
29707
  let postPath = false;
29683
29708
  const invalidSegments = [];
29684
- const path41 = statics.reduce((previousValue, currentValue, index) => {
29709
+ const path40 = statics.reduce((previousValue, currentValue, index) => {
29685
29710
  if (/[?#]/.test(currentValue)) {
29686
29711
  postPath = true;
29687
29712
  }
@@ -29698,7 +29723,7 @@ var init_path = __esm({
29698
29723
  }
29699
29724
  return previousValue + currentValue + (index === params.length ? "" : encoded);
29700
29725
  }, "");
29701
- const pathOnly = path41.split(/[?#]/, 1)[0];
29726
+ const pathOnly = path40.split(/[?#]/, 1)[0];
29702
29727
  const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
29703
29728
  let match;
29704
29729
  while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
@@ -29719,12 +29744,12 @@ var init_path = __esm({
29719
29744
  }, "");
29720
29745
  throw new AnthropicError(`Path parameters result in path with invalid segments:
29721
29746
  ${invalidSegments.map((e) => e.error).join("\n")}
29722
- ${path41}
29747
+ ${path40}
29723
29748
  ${underline}`);
29724
29749
  }
29725
- return path41;
29750
+ return path40;
29726
29751
  };
29727
- path34 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
29752
+ path33 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
29728
29753
  }
29729
29754
  });
29730
29755
 
@@ -29772,7 +29797,7 @@ var init_files = __esm({
29772
29797
  */
29773
29798
  delete(fileID, params = {}, options) {
29774
29799
  const { betas } = params ?? {};
29775
- return this._client.delete(path34`/v1/files/${fileID}`, {
29800
+ return this._client.delete(path33`/v1/files/${fileID}`, {
29776
29801
  ...options,
29777
29802
  headers: buildHeaders([
29778
29803
  { "anthropic-beta": [...betas ?? [], "files-api-2025-04-14"].toString() },
@@ -29795,7 +29820,7 @@ var init_files = __esm({
29795
29820
  */
29796
29821
  download(fileID, params = {}, options) {
29797
29822
  const { betas } = params ?? {};
29798
- return this._client.get(path34`/v1/files/${fileID}/content`, {
29823
+ return this._client.get(path33`/v1/files/${fileID}/content`, {
29799
29824
  ...options,
29800
29825
  headers: buildHeaders([
29801
29826
  {
@@ -29818,7 +29843,7 @@ var init_files = __esm({
29818
29843
  */
29819
29844
  retrieveMetadata(fileID, params = {}, options) {
29820
29845
  const { betas } = params ?? {};
29821
- return this._client.get(path34`/v1/files/${fileID}`, {
29846
+ return this._client.get(path33`/v1/files/${fileID}`, {
29822
29847
  ...options,
29823
29848
  headers: buildHeaders([
29824
29849
  { "anthropic-beta": [...betas ?? [], "files-api-2025-04-14"].toString() },
@@ -29875,7 +29900,7 @@ var init_models = __esm({
29875
29900
  */
29876
29901
  retrieve(modelID, params = {}, options) {
29877
29902
  const { betas } = params ?? {};
29878
- return this._client.get(path34`/v1/models/${modelID}?beta=true`, {
29903
+ return this._client.get(path33`/v1/models/${modelID}?beta=true`, {
29879
29904
  ...options,
29880
29905
  headers: buildHeaders([
29881
29906
  { ...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : void 0 },
@@ -30028,7 +30053,7 @@ var init_batches = __esm({
30028
30053
  */
30029
30054
  retrieve(messageBatchID, params = {}, options) {
30030
30055
  const { betas } = params ?? {};
30031
- return this._client.get(path34`/v1/messages/batches/${messageBatchID}?beta=true`, {
30056
+ return this._client.get(path33`/v1/messages/batches/${messageBatchID}?beta=true`, {
30032
30057
  ...options,
30033
30058
  headers: buildHeaders([
30034
30059
  { "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() },
@@ -30081,7 +30106,7 @@ var init_batches = __esm({
30081
30106
  */
30082
30107
  delete(messageBatchID, params = {}, options) {
30083
30108
  const { betas } = params ?? {};
30084
- return this._client.delete(path34`/v1/messages/batches/${messageBatchID}?beta=true`, {
30109
+ return this._client.delete(path33`/v1/messages/batches/${messageBatchID}?beta=true`, {
30085
30110
  ...options,
30086
30111
  headers: buildHeaders([
30087
30112
  { "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() },
@@ -30113,7 +30138,7 @@ var init_batches = __esm({
30113
30138
  */
30114
30139
  cancel(messageBatchID, params = {}, options) {
30115
30140
  const { betas } = params ?? {};
30116
- return this._client.post(path34`/v1/messages/batches/${messageBatchID}/cancel?beta=true`, {
30141
+ return this._client.post(path33`/v1/messages/batches/${messageBatchID}/cancel?beta=true`, {
30117
30142
  ...options,
30118
30143
  headers: buildHeaders([
30119
30144
  { "anthropic-beta": [...betas ?? [], "message-batches-2024-09-24"].toString() },
@@ -32017,7 +32042,7 @@ var init_batches2 = __esm({
32017
32042
  * ```
32018
32043
  */
32019
32044
  retrieve(messageBatchID, options) {
32020
- return this._client.get(path34`/v1/messages/batches/${messageBatchID}`, options);
32045
+ return this._client.get(path33`/v1/messages/batches/${messageBatchID}`, options);
32021
32046
  }
32022
32047
  /**
32023
32048
  * List all Message Batches within a Workspace. Most recently created batches are
@@ -32053,7 +32078,7 @@ var init_batches2 = __esm({
32053
32078
  * ```
32054
32079
  */
32055
32080
  delete(messageBatchID, options) {
32056
- return this._client.delete(path34`/v1/messages/batches/${messageBatchID}`, options);
32081
+ return this._client.delete(path33`/v1/messages/batches/${messageBatchID}`, options);
32057
32082
  }
32058
32083
  /**
32059
32084
  * Batches may be canceled any time before processing ends. Once cancellation is
@@ -32077,7 +32102,7 @@ var init_batches2 = __esm({
32077
32102
  * ```
32078
32103
  */
32079
32104
  cancel(messageBatchID, options) {
32080
- return this._client.post(path34`/v1/messages/batches/${messageBatchID}/cancel`, options);
32105
+ return this._client.post(path33`/v1/messages/batches/${messageBatchID}/cancel`, options);
32081
32106
  }
32082
32107
  /**
32083
32108
  * Streams the results of a Message Batch as a `.jsonl` file.
@@ -32204,7 +32229,7 @@ var init_models2 = __esm({
32204
32229
  */
32205
32230
  retrieve(modelID, params = {}, options) {
32206
32231
  const { betas } = params ?? {};
32207
- return this._client.get(path34`/v1/models/${modelID}`, {
32232
+ return this._client.get(path33`/v1/models/${modelID}`, {
32208
32233
  ...options,
32209
32234
  headers: buildHeaders([
32210
32235
  { ...betas?.toString() != null ? { "anthropic-beta": betas?.toString() } : void 0 },
@@ -32405,9 +32430,9 @@ var init_client = __esm({
32405
32430
  makeStatusError(status, error46, message, headers) {
32406
32431
  return APIError.generate(status, error46, message, headers);
32407
32432
  }
32408
- buildURL(path40, query, defaultBaseURL) {
32433
+ buildURL(path39, query, defaultBaseURL) {
32409
32434
  const baseURL = !__classPrivateFieldGet(this, _BaseAnthropic_instances, "m", _BaseAnthropic_baseURLOverridden).call(this) && defaultBaseURL || this.baseURL;
32410
- const url2 = isAbsoluteURL(path40) ? new URL(path40) : new URL(baseURL + (baseURL.endsWith("/") && path40.startsWith("/") ? path40.slice(1) : path40));
32435
+ const url2 = isAbsoluteURL(path39) ? new URL(path39) : new URL(baseURL + (baseURL.endsWith("/") && path39.startsWith("/") ? path39.slice(1) : path39));
32411
32436
  const defaultQuery = this.defaultQuery();
32412
32437
  if (!isEmptyObj(defaultQuery)) {
32413
32438
  query = { ...defaultQuery, ...query };
@@ -32438,24 +32463,24 @@ var init_client = __esm({
32438
32463
  */
32439
32464
  async prepareRequest(request, { url: url2, options }) {
32440
32465
  }
32441
- get(path40, opts) {
32442
- return this.methodRequest("get", path40, opts);
32466
+ get(path39, opts) {
32467
+ return this.methodRequest("get", path39, opts);
32443
32468
  }
32444
- post(path40, opts) {
32445
- return this.methodRequest("post", path40, opts);
32469
+ post(path39, opts) {
32470
+ return this.methodRequest("post", path39, opts);
32446
32471
  }
32447
- patch(path40, opts) {
32448
- return this.methodRequest("patch", path40, opts);
32472
+ patch(path39, opts) {
32473
+ return this.methodRequest("patch", path39, opts);
32449
32474
  }
32450
- put(path40, opts) {
32451
- return this.methodRequest("put", path40, opts);
32475
+ put(path39, opts) {
32476
+ return this.methodRequest("put", path39, opts);
32452
32477
  }
32453
- delete(path40, opts) {
32454
- return this.methodRequest("delete", path40, opts);
32478
+ delete(path39, opts) {
32479
+ return this.methodRequest("delete", path39, opts);
32455
32480
  }
32456
- methodRequest(method, path40, opts) {
32481
+ methodRequest(method, path39, opts) {
32457
32482
  return this.request(Promise.resolve(opts).then((opts2) => {
32458
- return { method, path: path40, ...opts2 };
32483
+ return { method, path: path39, ...opts2 };
32459
32484
  }));
32460
32485
  }
32461
32486
  request(options, remainingRetries = null) {
@@ -32559,8 +32584,8 @@ var init_client = __esm({
32559
32584
  }));
32560
32585
  return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
32561
32586
  }
32562
- getAPIList(path40, Page3, opts) {
32563
- return this.requestAPIList(Page3, { method: "get", path: path40, ...opts });
32587
+ getAPIList(path39, Page3, opts) {
32588
+ return this.requestAPIList(Page3, { method: "get", path: path39, ...opts });
32564
32589
  }
32565
32590
  requestAPIList(Page3, options) {
32566
32591
  const request = this.makeRequest(options, null, void 0);
@@ -32647,8 +32672,8 @@ var init_client = __esm({
32647
32672
  }
32648
32673
  async buildRequest(inputOptions, { retryCount = 0 } = {}) {
32649
32674
  const options = { ...inputOptions };
32650
- const { method, path: path40, query, defaultBaseURL } = options;
32651
- const url2 = this.buildURL(path40, query, defaultBaseURL);
32675
+ const { method, path: path39, query, defaultBaseURL } = options;
32676
+ const url2 = this.buildURL(path39, query, defaultBaseURL);
32652
32677
  if ("timeout" in options)
32653
32678
  validatePositiveInteger("timeout", options.timeout);
32654
32679
  options.timeout = options.timeout ?? this.timeout;
@@ -34521,17 +34546,17 @@ var init_resource2 = __esm({
34521
34546
  function encodeURIPath2(str3) {
34522
34547
  return str3.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
34523
34548
  }
34524
- var EMPTY2, createPathTagFunction2, path35;
34549
+ var EMPTY2, createPathTagFunction2, path34;
34525
34550
  var init_path2 = __esm({
34526
34551
  "../../node_modules/openai/internal/utils/path.mjs"() {
34527
34552
  init_error3();
34528
34553
  EMPTY2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
34529
- createPathTagFunction2 = (pathEncoder = encodeURIPath2) => function path40(statics, ...params) {
34554
+ createPathTagFunction2 = (pathEncoder = encodeURIPath2) => function path39(statics, ...params) {
34530
34555
  if (statics.length === 1)
34531
34556
  return statics[0];
34532
34557
  let postPath = false;
34533
34558
  const invalidSegments = [];
34534
- const path41 = statics.reduce((previousValue, currentValue, index) => {
34559
+ const path40 = statics.reduce((previousValue, currentValue, index) => {
34535
34560
  if (/[?#]/.test(currentValue)) {
34536
34561
  postPath = true;
34537
34562
  }
@@ -34548,7 +34573,7 @@ var init_path2 = __esm({
34548
34573
  }
34549
34574
  return previousValue + currentValue + (index === params.length ? "" : encoded);
34550
34575
  }, "");
34551
- const pathOnly = path41.split(/[?#]/, 1)[0];
34576
+ const pathOnly = path40.split(/[?#]/, 1)[0];
34552
34577
  const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
34553
34578
  let match;
34554
34579
  while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
@@ -34569,12 +34594,12 @@ var init_path2 = __esm({
34569
34594
  }, "");
34570
34595
  throw new OpenAIError(`Path parameters result in path with invalid segments:
34571
34596
  ${invalidSegments.map((e) => e.error).join("\n")}
34572
- ${path41}
34597
+ ${path40}
34573
34598
  ${underline}`);
34574
34599
  }
34575
- return path41;
34600
+ return path40;
34576
34601
  };
34577
- path35 = /* @__PURE__ */ createPathTagFunction2(encodeURIPath2);
34602
+ path34 = /* @__PURE__ */ createPathTagFunction2(encodeURIPath2);
34578
34603
  }
34579
34604
  });
34580
34605
 
@@ -34601,7 +34626,7 @@ var init_messages3 = __esm({
34601
34626
  * ```
34602
34627
  */
34603
34628
  list(completionID, query = {}, options) {
34604
- return this._client.getAPIList(path35`/chat/completions/${completionID}/messages`, CursorPage, { query, ...options });
34629
+ return this._client.getAPIList(path34`/chat/completions/${completionID}/messages`, CursorPage, { query, ...options });
34605
34630
  }
34606
34631
  };
34607
34632
  }
@@ -35996,7 +36021,7 @@ var init_completions2 = __esm({
35996
36021
  * ```
35997
36022
  */
35998
36023
  retrieve(completionID, options) {
35999
- return this._client.get(path35`/chat/completions/${completionID}`, options);
36024
+ return this._client.get(path34`/chat/completions/${completionID}`, options);
36000
36025
  }
36001
36026
  /**
36002
36027
  * Modify a stored chat completion. Only Chat Completions that have been created
@@ -36012,7 +36037,7 @@ var init_completions2 = __esm({
36012
36037
  * ```
36013
36038
  */
36014
36039
  update(completionID, body, options) {
36015
- return this._client.post(path35`/chat/completions/${completionID}`, { body, ...options });
36040
+ return this._client.post(path34`/chat/completions/${completionID}`, { body, ...options });
36016
36041
  }
36017
36042
  /**
36018
36043
  * List stored Chat Completions. Only Chat Completions that have been stored with
@@ -36040,7 +36065,7 @@ var init_completions2 = __esm({
36040
36065
  * ```
36041
36066
  */
36042
36067
  delete(completionID, options) {
36043
- return this._client.delete(path35`/chat/completions/${completionID}`, options);
36068
+ return this._client.delete(path34`/chat/completions/${completionID}`, options);
36044
36069
  }
36045
36070
  parse(body, options) {
36046
36071
  validateInputTools(body.tools);
@@ -36288,7 +36313,7 @@ var init_batches3 = __esm({
36288
36313
  * Retrieves a batch.
36289
36314
  */
36290
36315
  retrieve(batchID, options) {
36291
- return this._client.get(path35`/batches/${batchID}`, options);
36316
+ return this._client.get(path34`/batches/${batchID}`, options);
36292
36317
  }
36293
36318
  /**
36294
36319
  * List your organization's batches.
@@ -36302,7 +36327,7 @@ var init_batches3 = __esm({
36302
36327
  * (if any) available in the output file.
36303
36328
  */
36304
36329
  cancel(batchID, options) {
36305
- return this._client.post(path35`/batches/${batchID}/cancel`, options);
36330
+ return this._client.post(path34`/batches/${batchID}/cancel`, options);
36306
36331
  }
36307
36332
  };
36308
36333
  }
@@ -36345,7 +36370,7 @@ var init_assistants = __esm({
36345
36370
  * ```
36346
36371
  */
36347
36372
  retrieve(assistantID, options) {
36348
- return this._client.get(path35`/assistants/${assistantID}`, {
36373
+ return this._client.get(path34`/assistants/${assistantID}`, {
36349
36374
  ...options,
36350
36375
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
36351
36376
  });
@@ -36361,7 +36386,7 @@ var init_assistants = __esm({
36361
36386
  * ```
36362
36387
  */
36363
36388
  update(assistantID, body, options) {
36364
- return this._client.post(path35`/assistants/${assistantID}`, {
36389
+ return this._client.post(path34`/assistants/${assistantID}`, {
36365
36390
  body,
36366
36391
  ...options,
36367
36392
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -36395,7 +36420,7 @@ var init_assistants = __esm({
36395
36420
  * ```
36396
36421
  */
36397
36422
  delete(assistantID, options) {
36398
- return this._client.delete(path35`/assistants/${assistantID}`, {
36423
+ return this._client.delete(path34`/assistants/${assistantID}`, {
36399
36424
  ...options,
36400
36425
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
36401
36426
  });
@@ -36506,7 +36531,7 @@ var init_messages4 = __esm({
36506
36531
  * @deprecated The Assistants API is deprecated in favor of the Responses API
36507
36532
  */
36508
36533
  create(threadID, body, options) {
36509
- return this._client.post(path35`/threads/${threadID}/messages`, {
36534
+ return this._client.post(path34`/threads/${threadID}/messages`, {
36510
36535
  body,
36511
36536
  ...options,
36512
36537
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -36519,7 +36544,7 @@ var init_messages4 = __esm({
36519
36544
  */
36520
36545
  retrieve(messageID, params, options) {
36521
36546
  const { thread_id } = params;
36522
- return this._client.get(path35`/threads/${thread_id}/messages/${messageID}`, {
36547
+ return this._client.get(path34`/threads/${thread_id}/messages/${messageID}`, {
36523
36548
  ...options,
36524
36549
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
36525
36550
  });
@@ -36531,7 +36556,7 @@ var init_messages4 = __esm({
36531
36556
  */
36532
36557
  update(messageID, params, options) {
36533
36558
  const { thread_id, ...body } = params;
36534
- return this._client.post(path35`/threads/${thread_id}/messages/${messageID}`, {
36559
+ return this._client.post(path34`/threads/${thread_id}/messages/${messageID}`, {
36535
36560
  body,
36536
36561
  ...options,
36537
36562
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -36543,7 +36568,7 @@ var init_messages4 = __esm({
36543
36568
  * @deprecated The Assistants API is deprecated in favor of the Responses API
36544
36569
  */
36545
36570
  list(threadID, query = {}, options) {
36546
- return this._client.getAPIList(path35`/threads/${threadID}/messages`, CursorPage, {
36571
+ return this._client.getAPIList(path34`/threads/${threadID}/messages`, CursorPage, {
36547
36572
  query,
36548
36573
  ...options,
36549
36574
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -36556,7 +36581,7 @@ var init_messages4 = __esm({
36556
36581
  */
36557
36582
  delete(messageID, params, options) {
36558
36583
  const { thread_id } = params;
36559
- return this._client.delete(path35`/threads/${thread_id}/messages/${messageID}`, {
36584
+ return this._client.delete(path34`/threads/${thread_id}/messages/${messageID}`, {
36560
36585
  ...options,
36561
36586
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
36562
36587
  });
@@ -36581,7 +36606,7 @@ var init_steps = __esm({
36581
36606
  */
36582
36607
  retrieve(stepID, params, options) {
36583
36608
  const { thread_id, run_id, ...query } = params;
36584
- return this._client.get(path35`/threads/${thread_id}/runs/${run_id}/steps/${stepID}`, {
36609
+ return this._client.get(path34`/threads/${thread_id}/runs/${run_id}/steps/${stepID}`, {
36585
36610
  query,
36586
36611
  ...options,
36587
36612
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -36594,7 +36619,7 @@ var init_steps = __esm({
36594
36619
  */
36595
36620
  list(runID, params, options) {
36596
36621
  const { thread_id, ...query } = params;
36597
- return this._client.getAPIList(path35`/threads/${thread_id}/runs/${runID}/steps`, CursorPage, {
36622
+ return this._client.getAPIList(path34`/threads/${thread_id}/runs/${runID}/steps`, CursorPage, {
36598
36623
  query,
36599
36624
  ...options,
36600
36625
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -37200,7 +37225,7 @@ var init_runs = __esm({
37200
37225
  }
37201
37226
  create(threadID, params, options) {
37202
37227
  const { include, ...body } = params;
37203
- return this._client.post(path35`/threads/${threadID}/runs`, {
37228
+ return this._client.post(path34`/threads/${threadID}/runs`, {
37204
37229
  query: { include },
37205
37230
  body,
37206
37231
  ...options,
@@ -37215,7 +37240,7 @@ var init_runs = __esm({
37215
37240
  */
37216
37241
  retrieve(runID, params, options) {
37217
37242
  const { thread_id } = params;
37218
- return this._client.get(path35`/threads/${thread_id}/runs/${runID}`, {
37243
+ return this._client.get(path34`/threads/${thread_id}/runs/${runID}`, {
37219
37244
  ...options,
37220
37245
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
37221
37246
  });
@@ -37227,7 +37252,7 @@ var init_runs = __esm({
37227
37252
  */
37228
37253
  update(runID, params, options) {
37229
37254
  const { thread_id, ...body } = params;
37230
- return this._client.post(path35`/threads/${thread_id}/runs/${runID}`, {
37255
+ return this._client.post(path34`/threads/${thread_id}/runs/${runID}`, {
37231
37256
  body,
37232
37257
  ...options,
37233
37258
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -37239,7 +37264,7 @@ var init_runs = __esm({
37239
37264
  * @deprecated The Assistants API is deprecated in favor of the Responses API
37240
37265
  */
37241
37266
  list(threadID, query = {}, options) {
37242
- return this._client.getAPIList(path35`/threads/${threadID}/runs`, CursorPage, {
37267
+ return this._client.getAPIList(path34`/threads/${threadID}/runs`, CursorPage, {
37243
37268
  query,
37244
37269
  ...options,
37245
37270
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -37252,7 +37277,7 @@ var init_runs = __esm({
37252
37277
  */
37253
37278
  cancel(runID, params, options) {
37254
37279
  const { thread_id } = params;
37255
- return this._client.post(path35`/threads/${thread_id}/runs/${runID}/cancel`, {
37280
+ return this._client.post(path34`/threads/${thread_id}/runs/${runID}/cancel`, {
37256
37281
  ...options,
37257
37282
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
37258
37283
  });
@@ -37330,7 +37355,7 @@ var init_runs = __esm({
37330
37355
  }
37331
37356
  submitToolOutputs(runID, params, options) {
37332
37357
  const { thread_id, ...body } = params;
37333
- return this._client.post(path35`/threads/${thread_id}/runs/${runID}/submit_tool_outputs`, {
37358
+ return this._client.post(path34`/threads/${thread_id}/runs/${runID}/submit_tool_outputs`, {
37334
37359
  body,
37335
37360
  ...options,
37336
37361
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]),
@@ -37395,7 +37420,7 @@ var init_threads = __esm({
37395
37420
  * @deprecated The Assistants API is deprecated in favor of the Responses API
37396
37421
  */
37397
37422
  retrieve(threadID, options) {
37398
- return this._client.get(path35`/threads/${threadID}`, {
37423
+ return this._client.get(path34`/threads/${threadID}`, {
37399
37424
  ...options,
37400
37425
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
37401
37426
  });
@@ -37406,7 +37431,7 @@ var init_threads = __esm({
37406
37431
  * @deprecated The Assistants API is deprecated in favor of the Responses API
37407
37432
  */
37408
37433
  update(threadID, body, options) {
37409
- return this._client.post(path35`/threads/${threadID}`, {
37434
+ return this._client.post(path34`/threads/${threadID}`, {
37410
37435
  body,
37411
37436
  ...options,
37412
37437
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -37418,7 +37443,7 @@ var init_threads = __esm({
37418
37443
  * @deprecated The Assistants API is deprecated in favor of the Responses API
37419
37444
  */
37420
37445
  delete(threadID, options) {
37421
- return this._client.delete(path35`/threads/${threadID}`, {
37446
+ return this._client.delete(path34`/threads/${threadID}`, {
37422
37447
  ...options,
37423
37448
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
37424
37449
  });
@@ -37503,7 +37528,7 @@ var init_content = __esm({
37503
37528
  */
37504
37529
  retrieve(fileID, params, options) {
37505
37530
  const { container_id } = params;
37506
- return this._client.get(path35`/containers/${container_id}/files/${fileID}/content`, {
37531
+ return this._client.get(path34`/containers/${container_id}/files/${fileID}/content`, {
37507
37532
  ...options,
37508
37533
  headers: buildHeaders2([{ Accept: "application/binary" }, options?.headers]),
37509
37534
  __binaryResponse: true
@@ -37536,20 +37561,20 @@ var init_files2 = __esm({
37536
37561
  * a JSON request with a file ID.
37537
37562
  */
37538
37563
  create(containerID, body, options) {
37539
- return this._client.post(path35`/containers/${containerID}/files`, multipartFormRequestOptions2({ body, ...options }, this._client));
37564
+ return this._client.post(path34`/containers/${containerID}/files`, multipartFormRequestOptions2({ body, ...options }, this._client));
37540
37565
  }
37541
37566
  /**
37542
37567
  * Retrieve Container File
37543
37568
  */
37544
37569
  retrieve(fileID, params, options) {
37545
37570
  const { container_id } = params;
37546
- return this._client.get(path35`/containers/${container_id}/files/${fileID}`, options);
37571
+ return this._client.get(path34`/containers/${container_id}/files/${fileID}`, options);
37547
37572
  }
37548
37573
  /**
37549
37574
  * List Container files
37550
37575
  */
37551
37576
  list(containerID, query = {}, options) {
37552
- return this._client.getAPIList(path35`/containers/${containerID}/files`, CursorPage, {
37577
+ return this._client.getAPIList(path34`/containers/${containerID}/files`, CursorPage, {
37553
37578
  query,
37554
37579
  ...options
37555
37580
  });
@@ -37559,7 +37584,7 @@ var init_files2 = __esm({
37559
37584
  */
37560
37585
  delete(fileID, params, options) {
37561
37586
  const { container_id } = params;
37562
- return this._client.delete(path35`/containers/${container_id}/files/${fileID}`, {
37587
+ return this._client.delete(path34`/containers/${container_id}/files/${fileID}`, {
37563
37588
  ...options,
37564
37589
  headers: buildHeaders2([{ Accept: "*/*" }, options?.headers])
37565
37590
  });
@@ -37594,7 +37619,7 @@ var init_containers = __esm({
37594
37619
  * Retrieve Container
37595
37620
  */
37596
37621
  retrieve(containerID, options) {
37597
- return this._client.get(path35`/containers/${containerID}`, options);
37622
+ return this._client.get(path34`/containers/${containerID}`, options);
37598
37623
  }
37599
37624
  /**
37600
37625
  * List Containers
@@ -37606,7 +37631,7 @@ var init_containers = __esm({
37606
37631
  * Delete Container
37607
37632
  */
37608
37633
  delete(containerID, options) {
37609
- return this._client.delete(path35`/containers/${containerID}`, {
37634
+ return this._client.delete(path34`/containers/${containerID}`, {
37610
37635
  ...options,
37611
37636
  headers: buildHeaders2([{ Accept: "*/*" }, options?.headers])
37612
37637
  });
@@ -37629,7 +37654,7 @@ var init_items = __esm({
37629
37654
  */
37630
37655
  create(conversationID, params, options) {
37631
37656
  const { include, ...body } = params;
37632
- return this._client.post(path35`/conversations/${conversationID}/items`, {
37657
+ return this._client.post(path34`/conversations/${conversationID}/items`, {
37633
37658
  query: { include },
37634
37659
  body,
37635
37660
  ...options
@@ -37640,20 +37665,20 @@ var init_items = __esm({
37640
37665
  */
37641
37666
  retrieve(itemID, params, options) {
37642
37667
  const { conversation_id, ...query } = params;
37643
- return this._client.get(path35`/conversations/${conversation_id}/items/${itemID}`, { query, ...options });
37668
+ return this._client.get(path34`/conversations/${conversation_id}/items/${itemID}`, { query, ...options });
37644
37669
  }
37645
37670
  /**
37646
37671
  * List all items for a conversation with the given ID.
37647
37672
  */
37648
37673
  list(conversationID, query = {}, options) {
37649
- return this._client.getAPIList(path35`/conversations/${conversationID}/items`, ConversationCursorPage, { query, ...options });
37674
+ return this._client.getAPIList(path34`/conversations/${conversationID}/items`, ConversationCursorPage, { query, ...options });
37650
37675
  }
37651
37676
  /**
37652
37677
  * Delete an item from a conversation with the given IDs.
37653
37678
  */
37654
37679
  delete(itemID, params, options) {
37655
37680
  const { conversation_id } = params;
37656
- return this._client.delete(path35`/conversations/${conversation_id}/items/${itemID}`, options);
37681
+ return this._client.delete(path34`/conversations/${conversation_id}/items/${itemID}`, options);
37657
37682
  }
37658
37683
  };
37659
37684
  }
@@ -37682,19 +37707,19 @@ var init_conversations = __esm({
37682
37707
  * Get a conversation
37683
37708
  */
37684
37709
  retrieve(conversationID, options) {
37685
- return this._client.get(path35`/conversations/${conversationID}`, options);
37710
+ return this._client.get(path34`/conversations/${conversationID}`, options);
37686
37711
  }
37687
37712
  /**
37688
37713
  * Update a conversation
37689
37714
  */
37690
37715
  update(conversationID, body, options) {
37691
- return this._client.post(path35`/conversations/${conversationID}`, { body, ...options });
37716
+ return this._client.post(path34`/conversations/${conversationID}`, { body, ...options });
37692
37717
  }
37693
37718
  /**
37694
37719
  * Delete a conversation. Items in the conversation will not be deleted.
37695
37720
  */
37696
37721
  delete(conversationID, options) {
37697
- return this._client.delete(path35`/conversations/${conversationID}`, options);
37722
+ return this._client.delete(path34`/conversations/${conversationID}`, options);
37698
37723
  }
37699
37724
  };
37700
37725
  Conversations.Items = Items;
@@ -37764,14 +37789,14 @@ var init_output_items = __esm({
37764
37789
  */
37765
37790
  retrieve(outputItemID, params, options) {
37766
37791
  const { eval_id, run_id } = params;
37767
- return this._client.get(path35`/evals/${eval_id}/runs/${run_id}/output_items/${outputItemID}`, options);
37792
+ return this._client.get(path34`/evals/${eval_id}/runs/${run_id}/output_items/${outputItemID}`, options);
37768
37793
  }
37769
37794
  /**
37770
37795
  * Get a list of output items for an evaluation run.
37771
37796
  */
37772
37797
  list(runID, params, options) {
37773
37798
  const { eval_id, ...query } = params;
37774
- return this._client.getAPIList(path35`/evals/${eval_id}/runs/${runID}/output_items`, CursorPage, { query, ...options });
37799
+ return this._client.getAPIList(path34`/evals/${eval_id}/runs/${runID}/output_items`, CursorPage, { query, ...options });
37775
37800
  }
37776
37801
  };
37777
37802
  }
@@ -37797,20 +37822,20 @@ var init_runs2 = __esm({
37797
37822
  * schema specified in the config of the evaluation.
37798
37823
  */
37799
37824
  create(evalID, body, options) {
37800
- return this._client.post(path35`/evals/${evalID}/runs`, { body, ...options });
37825
+ return this._client.post(path34`/evals/${evalID}/runs`, { body, ...options });
37801
37826
  }
37802
37827
  /**
37803
37828
  * Get an evaluation run by ID.
37804
37829
  */
37805
37830
  retrieve(runID, params, options) {
37806
37831
  const { eval_id } = params;
37807
- return this._client.get(path35`/evals/${eval_id}/runs/${runID}`, options);
37832
+ return this._client.get(path34`/evals/${eval_id}/runs/${runID}`, options);
37808
37833
  }
37809
37834
  /**
37810
37835
  * Get a list of runs for an evaluation.
37811
37836
  */
37812
37837
  list(evalID, query = {}, options) {
37813
- return this._client.getAPIList(path35`/evals/${evalID}/runs`, CursorPage, {
37838
+ return this._client.getAPIList(path34`/evals/${evalID}/runs`, CursorPage, {
37814
37839
  query,
37815
37840
  ...options
37816
37841
  });
@@ -37820,14 +37845,14 @@ var init_runs2 = __esm({
37820
37845
  */
37821
37846
  delete(runID, params, options) {
37822
37847
  const { eval_id } = params;
37823
- return this._client.delete(path35`/evals/${eval_id}/runs/${runID}`, options);
37848
+ return this._client.delete(path34`/evals/${eval_id}/runs/${runID}`, options);
37824
37849
  }
37825
37850
  /**
37826
37851
  * Cancel an ongoing evaluation run.
37827
37852
  */
37828
37853
  cancel(runID, params, options) {
37829
37854
  const { eval_id } = params;
37830
- return this._client.post(path35`/evals/${eval_id}/runs/${runID}`, options);
37855
+ return this._client.post(path34`/evals/${eval_id}/runs/${runID}`, options);
37831
37856
  }
37832
37857
  };
37833
37858
  Runs2.OutputItems = OutputItems;
@@ -37863,13 +37888,13 @@ var init_evals = __esm({
37863
37888
  * Get an evaluation by ID.
37864
37889
  */
37865
37890
  retrieve(evalID, options) {
37866
- return this._client.get(path35`/evals/${evalID}`, options);
37891
+ return this._client.get(path34`/evals/${evalID}`, options);
37867
37892
  }
37868
37893
  /**
37869
37894
  * Update certain properties of an evaluation.
37870
37895
  */
37871
37896
  update(evalID, body, options) {
37872
- return this._client.post(path35`/evals/${evalID}`, { body, ...options });
37897
+ return this._client.post(path34`/evals/${evalID}`, { body, ...options });
37873
37898
  }
37874
37899
  /**
37875
37900
  * List evaluations for a project.
@@ -37881,7 +37906,7 @@ var init_evals = __esm({
37881
37906
  * Delete an evaluation.
37882
37907
  */
37883
37908
  delete(evalID, options) {
37884
- return this._client.delete(path35`/evals/${evalID}`, options);
37909
+ return this._client.delete(path34`/evals/${evalID}`, options);
37885
37910
  }
37886
37911
  };
37887
37912
  Evals.Runs = Runs2;
@@ -37930,7 +37955,7 @@ var init_files3 = __esm({
37930
37955
  * Returns information about a specific file.
37931
37956
  */
37932
37957
  retrieve(fileID, options) {
37933
- return this._client.get(path35`/files/${fileID}`, options);
37958
+ return this._client.get(path34`/files/${fileID}`, options);
37934
37959
  }
37935
37960
  /**
37936
37961
  * Returns a list of files.
@@ -37942,13 +37967,13 @@ var init_files3 = __esm({
37942
37967
  * Delete a file.
37943
37968
  */
37944
37969
  delete(fileID, options) {
37945
- return this._client.delete(path35`/files/${fileID}`, options);
37970
+ return this._client.delete(path34`/files/${fileID}`, options);
37946
37971
  }
37947
37972
  /**
37948
37973
  * Returns the contents of the specified file.
37949
37974
  */
37950
37975
  content(fileID, options) {
37951
- return this._client.get(path35`/files/${fileID}/content`, {
37976
+ return this._client.get(path34`/files/${fileID}/content`, {
37952
37977
  ...options,
37953
37978
  headers: buildHeaders2([{ Accept: "application/binary" }, options?.headers]),
37954
37979
  __binaryResponse: true
@@ -38079,7 +38104,7 @@ var init_permissions = __esm({
38079
38104
  * ```
38080
38105
  */
38081
38106
  create(fineTunedModelCheckpoint, body, options) {
38082
- return this._client.getAPIList(path35`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, Page2, { body, method: "post", ...options });
38107
+ return this._client.getAPIList(path34`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, Page2, { body, method: "post", ...options });
38083
38108
  }
38084
38109
  /**
38085
38110
  * **NOTE:** This endpoint requires an [admin API key](../admin-api-keys).
@@ -38096,7 +38121,7 @@ var init_permissions = __esm({
38096
38121
  * ```
38097
38122
  */
38098
38123
  retrieve(fineTunedModelCheckpoint, query = {}, options) {
38099
- return this._client.get(path35`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, {
38124
+ return this._client.get(path34`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, {
38100
38125
  query,
38101
38126
  ...options
38102
38127
  });
@@ -38121,7 +38146,7 @@ var init_permissions = __esm({
38121
38146
  */
38122
38147
  delete(permissionID, params, options) {
38123
38148
  const { fine_tuned_model_checkpoint } = params;
38124
- return this._client.delete(path35`/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, options);
38149
+ return this._client.delete(path34`/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, options);
38125
38150
  }
38126
38151
  };
38127
38152
  }
@@ -38166,7 +38191,7 @@ var init_checkpoints2 = __esm({
38166
38191
  * ```
38167
38192
  */
38168
38193
  list(fineTuningJobID, query = {}, options) {
38169
- return this._client.getAPIList(path35`/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, CursorPage, { query, ...options });
38194
+ return this._client.getAPIList(path34`/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, CursorPage, { query, ...options });
38170
38195
  }
38171
38196
  };
38172
38197
  }
@@ -38219,7 +38244,7 @@ var init_jobs = __esm({
38219
38244
  * ```
38220
38245
  */
38221
38246
  retrieve(fineTuningJobID, options) {
38222
- return this._client.get(path35`/fine_tuning/jobs/${fineTuningJobID}`, options);
38247
+ return this._client.get(path34`/fine_tuning/jobs/${fineTuningJobID}`, options);
38223
38248
  }
38224
38249
  /**
38225
38250
  * List your organization's fine-tuning jobs
@@ -38246,7 +38271,7 @@ var init_jobs = __esm({
38246
38271
  * ```
38247
38272
  */
38248
38273
  cancel(fineTuningJobID, options) {
38249
- return this._client.post(path35`/fine_tuning/jobs/${fineTuningJobID}/cancel`, options);
38274
+ return this._client.post(path34`/fine_tuning/jobs/${fineTuningJobID}/cancel`, options);
38250
38275
  }
38251
38276
  /**
38252
38277
  * Get status updates for a fine-tuning job.
@@ -38262,7 +38287,7 @@ var init_jobs = __esm({
38262
38287
  * ```
38263
38288
  */
38264
38289
  listEvents(fineTuningJobID, query = {}, options) {
38265
- return this._client.getAPIList(path35`/fine_tuning/jobs/${fineTuningJobID}/events`, CursorPage, { query, ...options });
38290
+ return this._client.getAPIList(path34`/fine_tuning/jobs/${fineTuningJobID}/events`, CursorPage, { query, ...options });
38266
38291
  }
38267
38292
  /**
38268
38293
  * Pause a fine-tune job.
@@ -38275,7 +38300,7 @@ var init_jobs = __esm({
38275
38300
  * ```
38276
38301
  */
38277
38302
  pause(fineTuningJobID, options) {
38278
- return this._client.post(path35`/fine_tuning/jobs/${fineTuningJobID}/pause`, options);
38303
+ return this._client.post(path34`/fine_tuning/jobs/${fineTuningJobID}/pause`, options);
38279
38304
  }
38280
38305
  /**
38281
38306
  * Resume a fine-tune job.
@@ -38288,7 +38313,7 @@ var init_jobs = __esm({
38288
38313
  * ```
38289
38314
  */
38290
38315
  resume(fineTuningJobID, options) {
38291
- return this._client.post(path35`/fine_tuning/jobs/${fineTuningJobID}/resume`, options);
38316
+ return this._client.post(path34`/fine_tuning/jobs/${fineTuningJobID}/resume`, options);
38292
38317
  }
38293
38318
  };
38294
38319
  Jobs.Checkpoints = Checkpoints2;
@@ -38394,7 +38419,7 @@ var init_models3 = __esm({
38394
38419
  * the owner and permissioning.
38395
38420
  */
38396
38421
  retrieve(model, options) {
38397
- return this._client.get(path35`/models/${model}`, options);
38422
+ return this._client.get(path34`/models/${model}`, options);
38398
38423
  }
38399
38424
  /**
38400
38425
  * Lists the currently available models, and provides basic information about each
@@ -38408,7 +38433,7 @@ var init_models3 = __esm({
38408
38433
  * delete a model.
38409
38434
  */
38410
38435
  delete(model, options) {
38411
- return this._client.delete(path35`/models/${model}`, options);
38436
+ return this._client.delete(path34`/models/${model}`, options);
38412
38437
  }
38413
38438
  };
38414
38439
  }
@@ -38876,7 +38901,7 @@ var init_input_items = __esm({
38876
38901
  * ```
38877
38902
  */
38878
38903
  list(responseID, query = {}, options) {
38879
- return this._client.getAPIList(path35`/responses/${responseID}/input_items`, CursorPage, { query, ...options });
38904
+ return this._client.getAPIList(path34`/responses/${responseID}/input_items`, CursorPage, { query, ...options });
38880
38905
  }
38881
38906
  };
38882
38907
  }
@@ -38907,7 +38932,7 @@ var init_responses = __esm({
38907
38932
  });
38908
38933
  }
38909
38934
  retrieve(responseID, query = {}, options) {
38910
- return this._client.get(path35`/responses/${responseID}`, {
38935
+ return this._client.get(path34`/responses/${responseID}`, {
38911
38936
  query,
38912
38937
  ...options,
38913
38938
  stream: query?.stream ?? false
@@ -38929,7 +38954,7 @@ var init_responses = __esm({
38929
38954
  * ```
38930
38955
  */
38931
38956
  delete(responseID, options) {
38932
- return this._client.delete(path35`/responses/${responseID}`, {
38957
+ return this._client.delete(path34`/responses/${responseID}`, {
38933
38958
  ...options,
38934
38959
  headers: buildHeaders2([{ Accept: "*/*" }, options?.headers])
38935
38960
  });
@@ -38956,7 +38981,7 @@ var init_responses = __esm({
38956
38981
  * ```
38957
38982
  */
38958
38983
  cancel(responseID, options) {
38959
- return this._client.post(path35`/responses/${responseID}/cancel`, options);
38984
+ return this._client.post(path34`/responses/${responseID}/cancel`, options);
38960
38985
  }
38961
38986
  };
38962
38987
  Responses.InputItems = InputItems;
@@ -38985,7 +39010,7 @@ var init_parts = __esm({
38985
39010
  * [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).
38986
39011
  */
38987
39012
  create(uploadID, body, options) {
38988
- return this._client.post(path35`/uploads/${uploadID}/parts`, multipartFormRequestOptions2({ body, ...options }, this._client));
39013
+ return this._client.post(path34`/uploads/${uploadID}/parts`, multipartFormRequestOptions2({ body, ...options }, this._client));
38989
39014
  }
38990
39015
  };
38991
39016
  }
@@ -39032,7 +39057,7 @@ var init_uploads5 = __esm({
39032
39057
  * Cancels the Upload. No Parts may be added after an Upload is cancelled.
39033
39058
  */
39034
39059
  cancel(uploadID, options) {
39035
- return this._client.post(path35`/uploads/${uploadID}/cancel`, options);
39060
+ return this._client.post(path34`/uploads/${uploadID}/cancel`, options);
39036
39061
  }
39037
39062
  /**
39038
39063
  * Completes the
@@ -39050,7 +39075,7 @@ var init_uploads5 = __esm({
39050
39075
  * an Upload is completed.
39051
39076
  */
39052
39077
  complete(uploadID, body, options) {
39053
- return this._client.post(path35`/uploads/${uploadID}/complete`, { body, ...options });
39078
+ return this._client.post(path34`/uploads/${uploadID}/complete`, { body, ...options });
39054
39079
  }
39055
39080
  };
39056
39081
  Uploads.Parts = Parts;
@@ -39096,7 +39121,7 @@ var init_file_batches = __esm({
39096
39121
  * Create a vector store file batch.
39097
39122
  */
39098
39123
  create(vectorStoreID, body, options) {
39099
- return this._client.post(path35`/vector_stores/${vectorStoreID}/file_batches`, {
39124
+ return this._client.post(path34`/vector_stores/${vectorStoreID}/file_batches`, {
39100
39125
  body,
39101
39126
  ...options,
39102
39127
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -39107,7 +39132,7 @@ var init_file_batches = __esm({
39107
39132
  */
39108
39133
  retrieve(batchID, params, options) {
39109
39134
  const { vector_store_id } = params;
39110
- return this._client.get(path35`/vector_stores/${vector_store_id}/file_batches/${batchID}`, {
39135
+ return this._client.get(path34`/vector_stores/${vector_store_id}/file_batches/${batchID}`, {
39111
39136
  ...options,
39112
39137
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
39113
39138
  });
@@ -39118,7 +39143,7 @@ var init_file_batches = __esm({
39118
39143
  */
39119
39144
  cancel(batchID, params, options) {
39120
39145
  const { vector_store_id } = params;
39121
- return this._client.post(path35`/vector_stores/${vector_store_id}/file_batches/${batchID}/cancel`, {
39146
+ return this._client.post(path34`/vector_stores/${vector_store_id}/file_batches/${batchID}/cancel`, {
39122
39147
  ...options,
39123
39148
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
39124
39149
  });
@@ -39135,7 +39160,7 @@ var init_file_batches = __esm({
39135
39160
  */
39136
39161
  listFiles(batchID, params, options) {
39137
39162
  const { vector_store_id, ...query } = params;
39138
- return this._client.getAPIList(path35`/vector_stores/${vector_store_id}/file_batches/${batchID}/files`, CursorPage, { query, ...options, headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]) });
39163
+ return this._client.getAPIList(path34`/vector_stores/${vector_store_id}/file_batches/${batchID}/files`, CursorPage, { query, ...options, headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]) });
39139
39164
  }
39140
39165
  /**
39141
39166
  * Wait for the given file batch to be processed.
@@ -39225,7 +39250,7 @@ var init_files4 = __esm({
39225
39250
  * [vector store](https://platform.openai.com/docs/api-reference/vector-stores/object).
39226
39251
  */
39227
39252
  create(vectorStoreID, body, options) {
39228
- return this._client.post(path35`/vector_stores/${vectorStoreID}/files`, {
39253
+ return this._client.post(path34`/vector_stores/${vectorStoreID}/files`, {
39229
39254
  body,
39230
39255
  ...options,
39231
39256
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -39236,7 +39261,7 @@ var init_files4 = __esm({
39236
39261
  */
39237
39262
  retrieve(fileID, params, options) {
39238
39263
  const { vector_store_id } = params;
39239
- return this._client.get(path35`/vector_stores/${vector_store_id}/files/${fileID}`, {
39264
+ return this._client.get(path34`/vector_stores/${vector_store_id}/files/${fileID}`, {
39240
39265
  ...options,
39241
39266
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
39242
39267
  });
@@ -39246,7 +39271,7 @@ var init_files4 = __esm({
39246
39271
  */
39247
39272
  update(fileID, params, options) {
39248
39273
  const { vector_store_id, ...body } = params;
39249
- return this._client.post(path35`/vector_stores/${vector_store_id}/files/${fileID}`, {
39274
+ return this._client.post(path34`/vector_stores/${vector_store_id}/files/${fileID}`, {
39250
39275
  body,
39251
39276
  ...options,
39252
39277
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -39256,7 +39281,7 @@ var init_files4 = __esm({
39256
39281
  * Returns a list of vector store files.
39257
39282
  */
39258
39283
  list(vectorStoreID, query = {}, options) {
39259
- return this._client.getAPIList(path35`/vector_stores/${vectorStoreID}/files`, CursorPage, {
39284
+ return this._client.getAPIList(path34`/vector_stores/${vectorStoreID}/files`, CursorPage, {
39260
39285
  query,
39261
39286
  ...options,
39262
39287
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -39270,7 +39295,7 @@ var init_files4 = __esm({
39270
39295
  */
39271
39296
  delete(fileID, params, options) {
39272
39297
  const { vector_store_id } = params;
39273
- return this._client.delete(path35`/vector_stores/${vector_store_id}/files/${fileID}`, {
39298
+ return this._client.delete(path34`/vector_stores/${vector_store_id}/files/${fileID}`, {
39274
39299
  ...options,
39275
39300
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
39276
39301
  });
@@ -39345,7 +39370,7 @@ var init_files4 = __esm({
39345
39370
  */
39346
39371
  content(fileID, params, options) {
39347
39372
  const { vector_store_id } = params;
39348
- return this._client.getAPIList(path35`/vector_stores/${vector_store_id}/files/${fileID}/content`, Page2, { ...options, headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]) });
39373
+ return this._client.getAPIList(path34`/vector_stores/${vector_store_id}/files/${fileID}/content`, Page2, { ...options, headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]) });
39349
39374
  }
39350
39375
  };
39351
39376
  }
@@ -39383,7 +39408,7 @@ var init_vector_stores = __esm({
39383
39408
  * Retrieves a vector store.
39384
39409
  */
39385
39410
  retrieve(vectorStoreID, options) {
39386
- return this._client.get(path35`/vector_stores/${vectorStoreID}`, {
39411
+ return this._client.get(path34`/vector_stores/${vectorStoreID}`, {
39387
39412
  ...options,
39388
39413
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
39389
39414
  });
@@ -39392,7 +39417,7 @@ var init_vector_stores = __esm({
39392
39417
  * Modifies a vector store.
39393
39418
  */
39394
39419
  update(vectorStoreID, body, options) {
39395
- return this._client.post(path35`/vector_stores/${vectorStoreID}`, {
39420
+ return this._client.post(path34`/vector_stores/${vectorStoreID}`, {
39396
39421
  body,
39397
39422
  ...options,
39398
39423
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
@@ -39412,7 +39437,7 @@ var init_vector_stores = __esm({
39412
39437
  * Delete a vector store.
39413
39438
  */
39414
39439
  delete(vectorStoreID, options) {
39415
- return this._client.delete(path35`/vector_stores/${vectorStoreID}`, {
39440
+ return this._client.delete(path34`/vector_stores/${vectorStoreID}`, {
39416
39441
  ...options,
39417
39442
  headers: buildHeaders2([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
39418
39443
  });
@@ -39422,7 +39447,7 @@ var init_vector_stores = __esm({
39422
39447
  * filter.
39423
39448
  */
39424
39449
  search(vectorStoreID, body, options) {
39425
- return this._client.getAPIList(path35`/vector_stores/${vectorStoreID}/search`, Page2, {
39450
+ return this._client.getAPIList(path34`/vector_stores/${vectorStoreID}/search`, Page2, {
39426
39451
  body,
39427
39452
  method: "post",
39428
39453
  ...options,
@@ -39725,9 +39750,9 @@ var init_client2 = __esm({
39725
39750
  this.apiKey = token;
39726
39751
  return true;
39727
39752
  }
39728
- buildURL(path40, query, defaultBaseURL) {
39753
+ buildURL(path39, query, defaultBaseURL) {
39729
39754
  const baseURL = !__classPrivateFieldGet2(this, _OpenAI_instances, "m", _OpenAI_baseURLOverridden).call(this) && defaultBaseURL || this.baseURL;
39730
- const url2 = isAbsoluteURL2(path40) ? new URL(path40) : new URL(baseURL + (baseURL.endsWith("/") && path40.startsWith("/") ? path40.slice(1) : path40));
39755
+ const url2 = isAbsoluteURL2(path39) ? new URL(path39) : new URL(baseURL + (baseURL.endsWith("/") && path39.startsWith("/") ? path39.slice(1) : path39));
39731
39756
  const defaultQuery = this.defaultQuery();
39732
39757
  if (!isEmptyObj2(defaultQuery)) {
39733
39758
  query = { ...defaultQuery, ...query };
@@ -39751,24 +39776,24 @@ var init_client2 = __esm({
39751
39776
  */
39752
39777
  async prepareRequest(request, { url: url2, options }) {
39753
39778
  }
39754
- get(path40, opts) {
39755
- return this.methodRequest("get", path40, opts);
39779
+ get(path39, opts) {
39780
+ return this.methodRequest("get", path39, opts);
39756
39781
  }
39757
- post(path40, opts) {
39758
- return this.methodRequest("post", path40, opts);
39782
+ post(path39, opts) {
39783
+ return this.methodRequest("post", path39, opts);
39759
39784
  }
39760
- patch(path40, opts) {
39761
- return this.methodRequest("patch", path40, opts);
39785
+ patch(path39, opts) {
39786
+ return this.methodRequest("patch", path39, opts);
39762
39787
  }
39763
- put(path40, opts) {
39764
- return this.methodRequest("put", path40, opts);
39788
+ put(path39, opts) {
39789
+ return this.methodRequest("put", path39, opts);
39765
39790
  }
39766
- delete(path40, opts) {
39767
- return this.methodRequest("delete", path40, opts);
39791
+ delete(path39, opts) {
39792
+ return this.methodRequest("delete", path39, opts);
39768
39793
  }
39769
- methodRequest(method, path40, opts) {
39794
+ methodRequest(method, path39, opts) {
39770
39795
  return this.request(Promise.resolve(opts).then((opts2) => {
39771
- return { method, path: path40, ...opts2 };
39796
+ return { method, path: path39, ...opts2 };
39772
39797
  }));
39773
39798
  }
39774
39799
  request(options, remainingRetries = null) {
@@ -39872,8 +39897,8 @@ var init_client2 = __esm({
39872
39897
  }));
39873
39898
  return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
39874
39899
  }
39875
- getAPIList(path40, Page3, opts) {
39876
- return this.requestAPIList(Page3, { method: "get", path: path40, ...opts });
39900
+ getAPIList(path39, Page3, opts) {
39901
+ return this.requestAPIList(Page3, { method: "get", path: path39, ...opts });
39877
39902
  }
39878
39903
  requestAPIList(Page3, options) {
39879
39904
  const request = this.makeRequest(options, null, void 0);
@@ -39951,8 +39976,8 @@ var init_client2 = __esm({
39951
39976
  }
39952
39977
  async buildRequest(inputOptions, { retryCount = 0 } = {}) {
39953
39978
  const options = { ...inputOptions };
39954
- const { method, path: path40, query, defaultBaseURL } = options;
39955
- const url2 = this.buildURL(path40, query, defaultBaseURL);
39979
+ const { method, path: path39, query, defaultBaseURL } = options;
39980
+ const url2 = this.buildURL(path39, query, defaultBaseURL);
39956
39981
  if ("timeout" in options)
39957
39982
  validatePositiveInteger2("timeout", options.timeout);
39958
39983
  options.timeout = options.timeout ?? this.timeout;
@@ -40753,7 +40778,7 @@ __export(config_loader_exports, {
40753
40778
  loadEnvironmentConfig: () => loadEnvironmentConfig
40754
40779
  });
40755
40780
  import * as fs40 from "fs";
40756
- import * as path36 from "path";
40781
+ import * as path35 from "path";
40757
40782
  import { createConfigLoader, listEnvironmentNames, ConfigurationError } from "@semiont/core";
40758
40783
  function findProjectRoot() {
40759
40784
  const root = process.env.SEMIONT_ROOT;
@@ -40771,8 +40796,8 @@ function findProjectRoot() {
40771
40796
  "Check that SEMIONT_ROOT environment variable is set correctly"
40772
40797
  );
40773
40798
  }
40774
- const hasSemiontJson = fs40.existsSync(path36.join(root, "semiont.json"));
40775
- const hasEnvironments = fs40.existsSync(path36.join(root, "environments"));
40799
+ const hasSemiontJson = fs40.existsSync(path35.join(root, "semiont.json"));
40800
+ const hasEnvironments = fs40.existsSync(path35.join(root, "environments"));
40776
40801
  if (!hasSemiontJson && !hasEnvironments) {
40777
40802
  throw new ConfigurationError(
40778
40803
  `SEMIONT_ROOT does not point to a valid Semiont project: ${root}`,
@@ -40785,7 +40810,7 @@ function findProjectRoot() {
40785
40810
  function getAvailableEnvironments() {
40786
40811
  try {
40787
40812
  const projectRoot = findProjectRoot();
40788
- const configDir = path36.join(projectRoot, "environments");
40813
+ const configDir = path35.join(projectRoot, "environments");
40789
40814
  if (!fs40.existsSync(configDir)) {
40790
40815
  return [];
40791
40816
  }
@@ -40804,11 +40829,11 @@ var init_config_loader = __esm({
40804
40829
  "use strict";
40805
40830
  nodeFileReader = {
40806
40831
  readIfExists: (filePath) => {
40807
- const absolutePath = path36.resolve(filePath);
40832
+ const absolutePath = path35.resolve(filePath);
40808
40833
  return fs40.existsSync(absolutePath) ? fs40.readFileSync(absolutePath, "utf-8") : null;
40809
40834
  },
40810
40835
  readRequired: (filePath) => {
40811
- const absolutePath = path36.resolve(filePath);
40836
+ const absolutePath = path35.resolve(filePath);
40812
40837
  if (!fs40.existsSync(absolutePath)) {
40813
40838
  throw new ConfigurationError(
40814
40839
  `Configuration file not found: ${absolutePath}`,
@@ -41947,7 +41972,7 @@ import express from "express";
41947
41972
  import { createServer as createServer4 } from "http";
41948
41973
  import { Server as SocketIOServer } from "socket.io";
41949
41974
  import { fileURLToPath as fileURLToPath2 } from "url";
41950
- import { dirname as dirname11, join as join35 } from "path";
41975
+ import { dirname as dirname11, join as join34 } from "path";
41951
41976
  import fs41 from "fs";
41952
41977
  var __filename, __dirname, embeddedJS, embeddedCSS, WebDashboardServer;
41953
41978
  var init_web_dashboard_server = __esm({
@@ -41998,15 +42023,15 @@ var init_web_dashboard_server = __esm({
41998
42023
  });
41999
42024
  } else {
42000
42025
  const possibleDirs = [
42001
- join35(__dirname, "..", "..", "..", "dist", "dashboard"),
42002
- join35(__dirname, "dashboard"),
42003
- join35(__dirname, "..", "dashboard"),
42004
- join35(process.cwd(), "dist", "dashboard"),
42005
- join35(process.cwd(), "apps", "cli", "dist", "dashboard")
42026
+ join34(__dirname, "..", "..", "..", "dist", "dashboard"),
42027
+ join34(__dirname, "dashboard"),
42028
+ join34(__dirname, "..", "dashboard"),
42029
+ join34(process.cwd(), "dist", "dashboard"),
42030
+ join34(process.cwd(), "apps", "cli", "dist", "dashboard")
42006
42031
  ];
42007
42032
  let distDir = null;
42008
42033
  for (const dir of possibleDirs) {
42009
- if (fs41.existsSync(join35(dir, "dashboard.js"))) {
42034
+ if (fs41.existsSync(join34(dir, "dashboard.js"))) {
42010
42035
  distDir = dir;
42011
42036
  bundleExists = true;
42012
42037
  console.log(`Found dashboard bundle at: ${dir}`);
@@ -42407,7 +42432,7 @@ var require_package = __commonJS({
42407
42432
  "package.json"(exports, module) {
42408
42433
  module.exports = {
42409
42434
  name: "@semiont/cli",
42410
- version: "0.2.39",
42435
+ version: "0.2.41",
42411
42436
  description: "Semiont CLI - Unified environment management tool",
42412
42437
  _comment: "AWS SDK dependencies (@aws-sdk/*) are only used by platforms/aws",
42413
42438
  type: "module",
@@ -42471,9 +42496,8 @@ var require_package = __commonJS({
42471
42496
  "@aws-sdk/client-secrets-manager": "^3.600.0",
42472
42497
  "@aws-sdk/client-sts": "^3.859.0",
42473
42498
  "@aws-sdk/client-wafv2": "^3.859.0",
42474
- "@prisma/client": "^6.13.0",
42475
- "@semiont/api-client": "^0.2.39",
42476
- "@semiont/core": "^0.2.39",
42499
+ "@semiont/api-client": "^0.2.41",
42500
+ "@semiont/core": "^0.2.41",
42477
42501
  "@testcontainers/postgresql": "^11.5.1",
42478
42502
  arg: "^5.0.2",
42479
42503
  argon2: "^0.43.0",
@@ -42491,6 +42515,7 @@ var require_package = __commonJS({
42491
42515
  zod: "^3.23.8"
42492
42516
  },
42493
42517
  devDependencies: {
42518
+ "@prisma/client": "^6.13.0",
42494
42519
  "@types/express": "^4.17.17",
42495
42520
  "@types/ink": "^0.5.2",
42496
42521
  "@types/js-yaml": "^4.0.9",
@@ -43843,7 +43868,7 @@ function isCommandDefinition(obj) {
43843
43868
 
43844
43869
  // src/core/service-discovery.ts
43845
43870
  init_config_loader();
43846
- import * as path37 from "path";
43871
+ import * as path36 from "path";
43847
43872
  import * as fs42 from "fs";
43848
43873
  var BUILT_IN_SERVICES = ["frontend", "backend", "database", "filesystem"];
43849
43874
  var environmentServicesCache = /* @__PURE__ */ new Map();
@@ -43853,7 +43878,7 @@ async function loadEnvironmentServices(environment) {
43853
43878
  }
43854
43879
  try {
43855
43880
  const PROJECT_ROOT = findProjectRoot();
43856
- const configPath = path37.join(PROJECT_ROOT, "environments", `${environment}.json`);
43881
+ const configPath = path36.join(PROJECT_ROOT, "environments", `${environment}.json`);
43857
43882
  if (!fs42.existsSync(configPath)) {
43858
43883
  return [...BUILT_IN_SERVICES];
43859
43884
  }
@@ -43888,7 +43913,7 @@ async function isValidService(service, environment) {
43888
43913
  import { parseEnvironment as parseEnvironment2 } from "@semiont/core";
43889
43914
 
43890
43915
  // src/core/service-resolver.ts
43891
- import * as path38 from "path";
43916
+ import * as path37 from "path";
43892
43917
  import { ConfigurationError as ConfigurationError2 } from "@semiont/core";
43893
43918
  function getServicePlatform(serviceName, config2) {
43894
43919
  const environment = config2._metadata?.environment;
@@ -43936,7 +43961,7 @@ function resolveServiceDeployments(serviceNames, config2) {
43936
43961
  const serviceConfig = config2.services?.[serviceName];
43937
43962
  if (!serviceConfig) {
43938
43963
  const availableServices = Object.keys(config2.services || {});
43939
- const configPath = path38.join(projectRoot, "environments", `${environment}.json`);
43964
+ const configPath = path37.join(projectRoot, "environments", `${environment}.json`);
43940
43965
  console.warn(`\u274C Service '${serviceName}' not found in environment '${environment}'`);
43941
43966
  if (availableServices.length > 0) {
43942
43967
  console.warn(` Available services: ${availableServices.join(", ")}`);
@@ -43975,7 +44000,7 @@ function resolveServiceDeployments(serviceNames, config2) {
43975
44000
  // src/core/command-service-matcher.ts
43976
44001
  init_service_factory();
43977
44002
  init_service_command_capabilities();
43978
- import * as path39 from "path";
44003
+ import * as path38 from "path";
43979
44004
  async function checkServiceSupportsCommand(serviceName, command, envConfig) {
43980
44005
  try {
43981
44006
  const projectRoot = envConfig._metadata?.projectRoot;
@@ -44059,7 +44084,7 @@ async function resolveServiceSelector(selector, capability, envConfig) {
44059
44084
  if (!projectRoot) {
44060
44085
  throw new Error("Project root is required in envConfig._metadata");
44061
44086
  }
44062
- const configPath = path39.join(projectRoot, "environments", `${environment}.json`);
44087
+ const configPath = path38.join(projectRoot, "environments", `${environment}.json`);
44063
44088
  const errorMessage = [
44064
44089
  `Unknown service '${selector}' in environment '${environment}'`,
44065
44090
  `Available services: ${availableServices.join(", ")}`,
@@ -44555,14 +44580,14 @@ var OutputFormatter = class {
44555
44580
  /**
44556
44581
  * Get nested value from object using dot notation
44557
44582
  */
44558
- static getNestedValue(obj, path40) {
44559
- return path40.split(".").reduce((current, key) => current?.[key], obj);
44583
+ static getNestedValue(obj, path39) {
44584
+ return path39.split(".").reduce((current, key) => current?.[key], obj);
44560
44585
  }
44561
44586
  /**
44562
44587
  * Set nested value in object using dot notation
44563
44588
  */
44564
- static setNestedValue(obj, path40, value) {
44565
- const keys = path40.split(".");
44589
+ static setNestedValue(obj, path39, value) {
44590
+ const keys = path39.split(".");
44566
44591
  const lastKey = keys.pop();
44567
44592
  const target = keys.reduce((current, key) => {
44568
44593
  if (!(key in current)) {