@sylphx/cli 0.9.2 → 0.10.0

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/main.js CHANGED
@@ -15,7 +15,7 @@ var init_package = __esm({
15
15
  "package.json"() {
16
16
  package_default = {
17
17
  name: "@sylphx/cli",
18
- version: "0.9.2",
18
+ version: "0.10.0",
19
19
  description: "Sylphx Platform CLI \u2014 deploy and manage your applications from the terminal. 63 commands across deployment, logs, env vars, domains, databases, storage, monitoring, self-service (user), admin (users/quotas/audit/invitations/jwt-keys/project-migrate), and more.",
20
20
  type: "module",
21
21
  homepage: "https://sylphx.com",
@@ -71,7 +71,7 @@ var init_package = __esm({
71
71
  "@effect/cli": "0.75.1",
72
72
  "@effect/platform": "0.96.0",
73
73
  "@effect/platform-bun": "0.89.0",
74
- "@sylphx/sdk": "0.12.1",
74
+ "@sylphx/sdk": "0.12.2",
75
75
  chalk: "^5.3.0",
76
76
  effect: "3.21.0",
77
77
  eventsource: "^2.0.2",
@@ -11787,6 +11787,12 @@ import { Schema as Schema86 } from "effect";
11787
11787
  function validateServiceInstanceRange(service) {
11788
11788
  const min = service.min_instances ?? service.instances;
11789
11789
  const max = service.max_instances ?? service.instances;
11790
+ if ((min === 0 || service.instances === 0) && service.scale_to_zero !== true) {
11791
+ return {
11792
+ path: ["min_instances"],
11793
+ message: "zero minimum instances require scale_to_zero=true"
11794
+ };
11795
+ }
11790
11796
  if (min !== void 0 && max !== void 0 && max < min) {
11791
11797
  return {
11792
11798
  path: ["max_instances"],
@@ -15002,6 +15008,83 @@ var init_referrals = __esm({
15002
15008
  }
15003
15009
  });
15004
15010
 
15011
+ // ../contract/dist/schemas/service.js
15012
+ import { Schema as Schema113 } from "effect";
15013
+ function scalePolicyErrorPath(message) {
15014
+ if (message.includes("scaleToZero"))
15015
+ return ["scaleToZero"];
15016
+ if (message.includes("max"))
15017
+ return ["max"];
15018
+ if (message.includes("idleTimeoutSeconds"))
15019
+ return ["idleTimeoutSeconds"];
15020
+ if (message.includes("targetCPUPercent"))
15021
+ return ["targetCPUPercent"];
15022
+ if (message.includes("targetMemoryPercent"))
15023
+ return ["targetMemoryPercent"];
15024
+ return ["min"];
15025
+ }
15026
+ function validateScalePolicyValue(policy) {
15027
+ if (policy == null)
15028
+ return null;
15029
+ const min = policy.min;
15030
+ const max = policy.max;
15031
+ if (min !== void 0 && (!Number.isInteger(min) || min < 0 || min > 100)) {
15032
+ return "scalePolicy.min must be an integer between 0 and 100.";
15033
+ }
15034
+ if (max !== void 0 && (!Number.isInteger(max) || max < 1 || max > 100)) {
15035
+ return "scalePolicy.max must be an integer between 1 and 100.";
15036
+ }
15037
+ if (min !== void 0 && max !== void 0 && max < min) {
15038
+ return "scalePolicy.max must be greater than or equal to scalePolicy.min.";
15039
+ }
15040
+ if (min === 0 && policy.scaleToZero !== true) {
15041
+ return "scalePolicy.min=0 requires scalePolicy.scaleToZero=true.";
15042
+ }
15043
+ if (policy.idleTimeoutSeconds !== void 0 && (!Number.isInteger(policy.idleTimeoutSeconds) || policy.idleTimeoutSeconds < 60 || policy.idleTimeoutSeconds > 3600)) {
15044
+ return "scalePolicy.idleTimeoutSeconds must be an integer between 60 and 3600.";
15045
+ }
15046
+ for (const [key, value] of [
15047
+ ["targetCPUPercent", policy.targetCPUPercent],
15048
+ ["targetMemoryPercent", policy.targetMemoryPercent]
15049
+ ]) {
15050
+ if (value !== void 0 && (!Number.isInteger(value) || value < 1 || value > 100)) {
15051
+ return `scalePolicy.${key} must be an integer between 1 and 100.`;
15052
+ }
15053
+ }
15054
+ return null;
15055
+ }
15056
+ var SCALE_POLICY_LIMITS, ScalePolicyStruct, ScalePolicy;
15057
+ var init_service = __esm({
15058
+ "../contract/dist/schemas/service.js"() {
15059
+ "use strict";
15060
+ SCALE_POLICY_LIMITS = {
15061
+ minInstancesMin: 0,
15062
+ minInstancesMax: 100,
15063
+ maxInstancesMin: 1,
15064
+ maxInstancesMax: 100,
15065
+ idleTimeoutSecondsMin: 60,
15066
+ idleTimeoutSecondsMax: 3600,
15067
+ targetPercentMin: 1,
15068
+ targetPercentMax: 100
15069
+ };
15070
+ ScalePolicyStruct = Schema113.Struct({
15071
+ min: Schema113.optional(Schema113.Number.pipe(Schema113.int(), Schema113.between(SCALE_POLICY_LIMITS.minInstancesMin, SCALE_POLICY_LIMITS.minInstancesMax))),
15072
+ max: Schema113.optional(Schema113.Number.pipe(Schema113.int(), Schema113.between(SCALE_POLICY_LIMITS.maxInstancesMin, SCALE_POLICY_LIMITS.maxInstancesMax))),
15073
+ scaleToZero: Schema113.optional(Schema113.Boolean),
15074
+ idleTimeoutSeconds: Schema113.optional(Schema113.Number.pipe(Schema113.int(), Schema113.between(SCALE_POLICY_LIMITS.idleTimeoutSecondsMin, SCALE_POLICY_LIMITS.idleTimeoutSecondsMax))),
15075
+ regions: Schema113.optional(Schema113.Array(Schema113.String)),
15076
+ targetCPUPercent: Schema113.optional(Schema113.Number.pipe(Schema113.int(), Schema113.between(SCALE_POLICY_LIMITS.targetPercentMin, SCALE_POLICY_LIMITS.targetPercentMax))),
15077
+ targetMemoryPercent: Schema113.optional(Schema113.Number.pipe(Schema113.int(), Schema113.between(SCALE_POLICY_LIMITS.targetPercentMin, SCALE_POLICY_LIMITS.targetPercentMax)))
15078
+ });
15079
+ ScalePolicy = ScalePolicyStruct.pipe(Schema113.filter((policy) => {
15080
+ const message = validateScalePolicyValue(policy);
15081
+ if (!message)
15082
+ return true;
15083
+ return { path: scalePolicyErrorPath(message), message };
15084
+ }));
15085
+ }
15086
+ });
15087
+
15005
15088
  // ../contract/dist/index.js
15006
15089
  var init_dist = __esm({
15007
15090
  "../contract/dist/index.js"() {
@@ -15135,6 +15218,7 @@ var init_dist = __esm({
15135
15218
  init_search();
15136
15219
  init_secret();
15137
15220
  init_security();
15221
+ init_service();
15138
15222
  init_service_tokens();
15139
15223
  init_session_replay();
15140
15224
  init_storage();
@@ -15175,16 +15259,16 @@ function setHeader(headers, key, value) {
15175
15259
  delete headers[existingKey];
15176
15260
  headers[key] = value;
15177
15261
  }
15178
- function interpolatePath(path6, params) {
15179
- return path6.replace(/:(\w+)/g, (_match, key) => {
15262
+ function interpolatePath(path7, params) {
15263
+ return path7.replace(/:(\w+)/g, (_match, key) => {
15180
15264
  if (!(key in params)) {
15181
- throw new Error(`Missing path param :${key} for ${path6}`);
15265
+ throw new Error(`Missing path param :${key} for ${path7}`);
15182
15266
  }
15183
15267
  return encodeURIComponent(params[key]);
15184
15268
  });
15185
15269
  }
15186
- async function request(client, method, path6, opts) {
15187
- let url = `${client.apiBase}${path6}`;
15270
+ async function request(client, method, path7, opts) {
15271
+ let url = `${client.apiBase}${path7}`;
15188
15272
  if (opts?.query) {
15189
15273
  const entries = Object.entries(opts.query).filter(([, v]) => v !== void 0);
15190
15274
  if (entries.length > 0) {
@@ -15273,89 +15357,89 @@ var init_admin = __esm({
15273
15357
  init_dist();
15274
15358
  init_http();
15275
15359
  getProjectQuotas = (client, projectId) => {
15276
- const { method, path: path6 } = adminQuotasEndpoints.getProjectQuotas;
15277
- return request(client, method, interpolatePath(path6, { projectId }));
15360
+ const { method, path: path7 } = adminQuotasEndpoints.getProjectQuotas;
15361
+ return request(client, method, interpolatePath(path7, { projectId }));
15278
15362
  };
15279
15363
  getQuotaStats = (client, projectId) => {
15280
- const { method, path: path6 } = adminQuotasEndpoints.getQuotaStats;
15281
- return request(client, method, interpolatePath(path6, { projectId }));
15364
+ const { method, path: path7 } = adminQuotasEndpoints.getQuotaStats;
15365
+ return request(client, method, interpolatePath(path7, { projectId }));
15282
15366
  };
15283
15367
  getQuotaAlerts = (client, projectId) => {
15284
- const { method, path: path6 } = adminQuotasEndpoints.getQuotaAlerts;
15285
- return request(client, method, interpolatePath(path6, { projectId }));
15368
+ const { method, path: path7 } = adminQuotasEndpoints.getQuotaAlerts;
15369
+ return request(client, method, interpolatePath(path7, { projectId }));
15286
15370
  };
15287
15371
  updateProjectQuotas = (client, projectId, body) => {
15288
- const { method, path: path6 } = adminQuotasEndpoints.updateQuota;
15289
- return request(client, method, interpolatePath(path6, { projectId }), { body });
15372
+ const { method, path: path7 } = adminQuotasEndpoints.updateQuota;
15373
+ return request(client, method, interpolatePath(path7, { projectId }), { body });
15290
15374
  };
15291
15375
  acknowledgeQuotaAlert = (client, alertId) => {
15292
- const { method, path: path6 } = adminQuotasEndpoints.acknowledgeAlert;
15293
- return request(client, method, interpolatePath(path6, { alertId }));
15376
+ const { method, path: path7 } = adminQuotasEndpoints.acknowledgeAlert;
15377
+ return request(client, method, interpolatePath(path7, { alertId }));
15294
15378
  };
15295
15379
  getAuditLogs = (client, query) => {
15296
- const { method, path: path6 } = adminAuditEndpoints.logs;
15297
- return request(client, method, path6, query ? { query } : {});
15380
+ const { method, path: path7 } = adminAuditEndpoints.logs;
15381
+ return request(client, method, path7, query ? { query } : {});
15298
15382
  };
15299
15383
  getAuditActivity = (client) => {
15300
- const { method, path: path6 } = adminAuditEndpoints.activity;
15301
- return request(client, method, path6);
15384
+ const { method, path: path7 } = adminAuditEndpoints.activity;
15385
+ return request(client, method, path7);
15302
15386
  };
15303
15387
  listInvitations = (client) => {
15304
- const { method, path: path6 } = adminInvitationsEndpoints.list;
15305
- return request(client, method, path6);
15388
+ const { method, path: path7 } = adminInvitationsEndpoints.list;
15389
+ return request(client, method, path7);
15306
15390
  };
15307
15391
  createInvitation = (client, body) => {
15308
- const { method, path: path6 } = adminInvitationsEndpoints.create;
15309
- return request(client, method, path6, { body });
15392
+ const { method, path: path7 } = adminInvitationsEndpoints.create;
15393
+ return request(client, method, path7, { body });
15310
15394
  };
15311
15395
  revokeInvitation = (client, id) => {
15312
- const { method, path: path6 } = adminInvitationsEndpoints.revoke;
15313
- return request(client, method, interpolatePath(path6, { id }));
15396
+ const { method, path: path7 } = adminInvitationsEndpoints.revoke;
15397
+ return request(client, method, interpolatePath(path7, { id }));
15314
15398
  };
15315
15399
  resendInvitation = (client, id) => {
15316
- const { method, path: path6 } = adminInvitationsEndpoints.resend;
15317
- return request(client, method, interpolatePath(path6, { id }));
15400
+ const { method, path: path7 } = adminInvitationsEndpoints.resend;
15401
+ return request(client, method, interpolatePath(path7, { id }));
15318
15402
  };
15319
15403
  listJwtKeys = (client) => {
15320
- const { method, path: path6 } = adminJwtKeysEndpoints.list;
15321
- return request(client, method, path6);
15404
+ const { method, path: path7 } = adminJwtKeysEndpoints.list;
15405
+ return request(client, method, path7);
15322
15406
  };
15323
15407
  rotateJwtKeys = (client) => {
15324
- const { method, path: path6 } = adminJwtKeysEndpoints.rotate;
15325
- return request(client, method, path6);
15408
+ const { method, path: path7 } = adminJwtKeysEndpoints.rotate;
15409
+ return request(client, method, path7);
15326
15410
  };
15327
15411
  retireJwtKey = (client, keyId) => {
15328
- const { method, path: path6 } = adminJwtKeysEndpoints.forceRetire;
15329
- return request(client, method, interpolatePath(path6, { keyId }));
15412
+ const { method, path: path7 } = adminJwtKeysEndpoints.forceRetire;
15413
+ return request(client, method, interpolatePath(path7, { keyId }));
15330
15414
  };
15331
15415
  migrateProject = (client, projectId, body) => request(client, "POST", `/operator/projects/${encodeURIComponent(projectId)}/migrate`, { body });
15332
15416
  regenerateEnvironmentKey = (client, environmentId) => {
15333
- const { method, path: path6 } = adminProjectsEndpoints.regenerateSecretKey;
15334
- return request(client, method, interpolatePath(path6, { environmentId }));
15417
+ const { method, path: path7 } = adminProjectsEndpoints.regenerateSecretKey;
15418
+ return request(client, method, interpolatePath(path7, { environmentId }));
15335
15419
  };
15336
15420
  listUsers = (client) => {
15337
- const { method, path: path6 } = adminUsersEndpoints.search;
15338
- return request(client, method, path6);
15421
+ const { method, path: path7 } = adminUsersEndpoints.search;
15422
+ return request(client, method, path7);
15339
15423
  };
15340
15424
  getUser = (client, userId) => {
15341
- const { method, path: path6 } = adminUsersEndpoints.get;
15342
- return request(client, method, interpolatePath(path6, { userId }));
15425
+ const { method, path: path7 } = adminUsersEndpoints.get;
15426
+ return request(client, method, interpolatePath(path7, { userId }));
15343
15427
  };
15344
15428
  updateUserRole = (client, userId, body) => {
15345
- const { method, path: path6 } = adminUsersEndpoints.updateRole;
15346
- return request(client, method, interpolatePath(path6, { userId }), { body });
15429
+ const { method, path: path7 } = adminUsersEndpoints.updateRole;
15430
+ return request(client, method, interpolatePath(path7, { userId }), { body });
15347
15431
  };
15348
15432
  verifyUserEmail = (client, userId) => {
15349
- const { method, path: path6 } = adminUsersEndpoints.verifyEmail;
15350
- return request(client, method, interpolatePath(path6, { userId }));
15433
+ const { method, path: path7 } = adminUsersEndpoints.verifyEmail;
15434
+ return request(client, method, interpolatePath(path7, { userId }));
15351
15435
  };
15352
15436
  deleteUser = (client, userId) => {
15353
- const { method, path: path6 } = adminUsersEndpoints.delete;
15354
- return request(client, method, interpolatePath(path6, { userId }));
15437
+ const { method, path: path7 } = adminUsersEndpoints.delete;
15438
+ return request(client, method, interpolatePath(path7, { userId }));
15355
15439
  };
15356
15440
  revokeUserSessions = (client, userId) => {
15357
- const { method, path: path6 } = adminUsersEndpoints.revokeSessions;
15358
- return request(client, method, interpolatePath(path6, { userId }));
15441
+ const { method, path: path7 } = adminUsersEndpoints.revokeSessions;
15442
+ return request(client, method, interpolatePath(path7, { userId }));
15359
15443
  };
15360
15444
  }
15361
15445
  });
@@ -15372,8 +15456,8 @@ var init_adminBootstrap = __esm({
15372
15456
  init_dist();
15373
15457
  init_http();
15374
15458
  resetWindow = (client) => {
15375
- const { method, path: path6 } = adminBootstrapEndpoints.resetWindow;
15376
- return request(client, method, path6, { body: {} });
15459
+ const { method, path: path7 } = adminBootstrapEndpoints.resetWindow;
15460
+ return request(client, method, path7, { body: {} });
15377
15461
  };
15378
15462
  }
15379
15463
  });
@@ -15391,12 +15475,12 @@ var init_adminBranchDatabases = __esm({
15391
15475
  init_dist();
15392
15476
  init_http();
15393
15477
  create = (client, input) => {
15394
- const { method, path: path6 } = adminBranchDatabasesEndpoints.create;
15395
- return request(client, method, path6, { body: input });
15478
+ const { method, path: path7 } = adminBranchDatabasesEndpoints.create;
15479
+ return request(client, method, path7, { body: input });
15396
15480
  };
15397
15481
  destroy = (client, input) => {
15398
- const { method, path: path6 } = adminBranchDatabasesEndpoints.destroy;
15399
- return request(client, method, path6, { body: input });
15482
+ const { method, path: path7 } = adminBranchDatabasesEndpoints.destroy;
15483
+ return request(client, method, path7, { body: input });
15400
15484
  };
15401
15485
  }
15402
15486
  });
@@ -15413,8 +15497,8 @@ var init_adminBuilds = __esm({
15413
15497
  init_dist();
15414
15498
  init_http();
15415
15499
  reap = (client, input) => {
15416
- const { method, path: path6 } = adminBuildsEndpoints.reap;
15417
- return request(client, method, path6, { body: input });
15500
+ const { method, path: path7 } = adminBuildsEndpoints.reap;
15501
+ return request(client, method, path7, { body: input });
15418
15502
  };
15419
15503
  }
15420
15504
  });
@@ -15431,8 +15515,8 @@ var init_adminEnvServices = __esm({
15431
15515
  init_dist();
15432
15516
  init_http();
15433
15517
  repoint = (client, input) => {
15434
- const { method, path: path6 } = adminEnvServicesEndpoints.repoint;
15435
- return request(client, method, path6, { body: input });
15518
+ const { method, path: path7 } = adminEnvServicesEndpoints.repoint;
15519
+ return request(client, method, path7, { body: input });
15436
15520
  };
15437
15521
  }
15438
15522
  });
@@ -15449,8 +15533,8 @@ var init_adminEnvsSpec = __esm({
15449
15533
  init_dist();
15450
15534
  init_http();
15451
15535
  patch = (client, envId, input) => {
15452
- const { method, path: path6 } = adminEnvsSpecEndpoints.patch;
15453
- return request(client, method, interpolatePath(path6, { envId }), { body: input });
15536
+ const { method, path: path7 } = adminEnvsSpecEndpoints.patch;
15537
+ return request(client, method, interpolatePath(path7, { envId }), { body: input });
15454
15538
  };
15455
15539
  }
15456
15540
  });
@@ -15468,8 +15552,8 @@ var init_adminProjectCredentials = __esm({
15468
15552
  init_dist();
15469
15553
  init_http();
15470
15554
  rotateEnvironmentCredentials = (client, input) => {
15471
- const { method, path: path6 } = adminProjectsEndpoints.rotateEnvironmentCredentials;
15472
- return request(client, method, path6.replace(":environmentId", encodeURIComponent(input.environmentId)), {
15555
+ const { method, path: path7 } = adminProjectsEndpoints.rotateEnvironmentCredentials;
15556
+ return request(client, method, path7.replace(":environmentId", encodeURIComponent(input.environmentId)), {
15473
15557
  body: {
15474
15558
  reason: input.reason,
15475
15559
  syncDeploymentSecret: input.syncDeploymentSecret ?? false
@@ -15477,8 +15561,8 @@ var init_adminProjectCredentials = __esm({
15477
15561
  });
15478
15562
  };
15479
15563
  rotateEnvironmentCredentialsBySlug = (client, input) => {
15480
- const { method, path: path6 } = adminProjectsEndpoints.rotateEnvironmentCredentialsBySlug;
15481
- return request(client, method, path6.replace(":projectSlug", encodeURIComponent(input.projectSlug)).replace(":environmentName", encodeURIComponent(input.environmentName)), {
15564
+ const { method, path: path7 } = adminProjectsEndpoints.rotateEnvironmentCredentialsBySlug;
15565
+ return request(client, method, path7.replace(":projectSlug", encodeURIComponent(input.projectSlug)).replace(":environmentName", encodeURIComponent(input.environmentName)), {
15482
15566
  body: {
15483
15567
  reason: input.reason,
15484
15568
  syncDeploymentSecret: input.syncDeploymentSecret ?? false
@@ -15501,12 +15585,12 @@ var init_adminRateLimits = __esm({
15501
15585
  init_dist();
15502
15586
  init_http();
15503
15587
  list = (client) => {
15504
- const { method, path: path6 } = adminRateLimitsEndpoints.listStrategies;
15505
- return request(client, method, path6, {});
15588
+ const { method, path: path7 } = adminRateLimitsEndpoints.listStrategies;
15589
+ return request(client, method, path7, {});
15506
15590
  };
15507
15591
  set = (client, body) => {
15508
- const { method, path: path6 } = adminRateLimitsEndpoints.setStrategy;
15509
- return request(client, method, path6, { body });
15592
+ const { method, path: path7 } = adminRateLimitsEndpoints.setStrategy;
15593
+ return request(client, method, path7, { body });
15510
15594
  };
15511
15595
  }
15512
15596
  });
@@ -15523,8 +15607,8 @@ var init_adminReconcile = __esm({
15523
15607
  init_dist();
15524
15608
  init_http();
15525
15609
  reset = (client, input) => {
15526
- const { method, path: path6 } = adminReconcileEndpoints.reset;
15527
- return request(client, method, path6, { body: input });
15610
+ const { method, path: path7 } = adminReconcileEndpoints.reset;
15611
+ return request(client, method, path7, { body: input });
15528
15612
  };
15529
15613
  }
15530
15614
  });
@@ -15542,8 +15626,8 @@ var init_adminResources = __esm({
15542
15626
  init_dist();
15543
15627
  init_http();
15544
15628
  forceDelete = (client, id, input) => {
15545
- const { method, path: path6 } = adminResourcesEndpoints.forceDelete;
15546
- const interpolated = interpolatePath(path6, { id });
15629
+ const { method, path: path7 } = adminResourcesEndpoints.forceDelete;
15630
+ const interpolated = interpolatePath(path7, { id });
15547
15631
  const query = { reason: input.reason };
15548
15632
  if (input.cascade !== void 0)
15549
15633
  query.cascade = input.cascade ? "true" : "false";
@@ -15552,8 +15636,8 @@ var init_adminResources = __esm({
15552
15636
  return request(client, method, interpolated, { query });
15553
15637
  };
15554
15638
  reseal = (client, input) => {
15555
- const { method, path: path6 } = adminResourcesEndpoints.reseal;
15556
- return request(client, method, path6, { body: input });
15639
+ const { method, path: path7 } = adminResourcesEndpoints.reseal;
15640
+ return request(client, method, path7, { body: input });
15557
15641
  };
15558
15642
  }
15559
15643
  });
@@ -15571,12 +15655,12 @@ var init_adminSecrets = __esm({
15571
15655
  init_dist();
15572
15656
  init_http();
15573
15657
  list2 = (client) => {
15574
- const { method, path: path6 } = adminSecretsEndpoints.list;
15575
- return request(client, method, path6, {});
15658
+ const { method, path: path7 } = adminSecretsEndpoints.list;
15659
+ return request(client, method, path7, {});
15576
15660
  };
15577
15661
  rotate = (client, body) => {
15578
- const { method, path: path6 } = adminSecretsEndpoints.rotate;
15579
- return request(client, method, path6, { body });
15662
+ const { method, path: path7 } = adminSecretsEndpoints.rotate;
15663
+ return request(client, method, path7, { body });
15580
15664
  };
15581
15665
  }
15582
15666
  });
@@ -15677,25 +15761,25 @@ var init_backups3 = __esm({
15677
15761
  init_dist();
15678
15762
  init_http();
15679
15763
  list3 = (client, projectId, envId) => {
15680
- const { method, path: path6 } = backupsEndpoints.list;
15681
- return request(client, method, path6, { query: { projectId, envId } });
15764
+ const { method, path: path7 } = backupsEndpoints.list;
15765
+ return request(client, method, path7, { query: { projectId, envId } });
15682
15766
  };
15683
15767
  trigger = (client, projectId, envId) => {
15684
- const { method, path: path6 } = backupsEndpoints.trigger;
15685
- return request(client, method, path6, { body: { projectId, envId } });
15768
+ const { method, path: path7 } = backupsEndpoints.trigger;
15769
+ return request(client, method, path7, { body: { projectId, envId } });
15686
15770
  };
15687
15771
  restore = (client, backupId, targetDatabaseUrl) => {
15688
- const { method, path: path6 } = backupsEndpoints.restore;
15772
+ const { method, path: path7 } = backupsEndpoints.restore;
15689
15773
  const body = targetDatabaseUrl ? { targetDatabaseUrl } : {};
15690
- return request(client, method, interpolatePath(path6, { id: backupId }), {
15774
+ return request(client, method, interpolatePath(path7, { id: backupId }), {
15691
15775
  body
15692
15776
  });
15693
15777
  };
15694
15778
  restorePointInTime = (client, databaseId, body) => request(client, "POST", `/backups/databases/${encodeURIComponent(databaseId)}/pitr`, { body });
15695
15779
  restoreInPlace = (client, backupId) => request(client, "POST", `/backups/${encodeURIComponent(backupId)}/restore-in-place`);
15696
15780
  _delete = (client, backupId) => {
15697
- const { method, path: path6 } = backupsEndpoints.delete;
15698
- return request(client, method, interpolatePath(path6, { id: backupId }));
15781
+ const { method, path: path7 } = backupsEndpoints.delete;
15782
+ return request(client, method, interpolatePath(path7, { id: backupId }));
15699
15783
  };
15700
15784
  }
15701
15785
  });
@@ -15880,27 +15964,27 @@ var init_databases2 = __esm({
15880
15964
  init_dist();
15881
15965
  init_http();
15882
15966
  list6 = async (client) => {
15883
- const { method, path: path6 } = resourcesEndpoints.list;
15884
- const res = await request(client, method, path6, {
15967
+ const { method, path: path7 } = resourcesEndpoints.list;
15968
+ const res = await request(client, method, path7, {
15885
15969
  query: { kind: "database" }
15886
15970
  });
15887
15971
  return Array.isArray(res) ? res : res.data ?? [];
15888
15972
  };
15889
15973
  create3 = (client, input) => {
15890
- const { method, path: path6 } = resourcesEndpoints.create;
15891
- return request(client, method, path6, { body: { ...input, kind: "database" } });
15974
+ const { method, path: path7 } = resourcesEndpoints.create;
15975
+ return request(client, method, path7, { body: { ...input, kind: "database" } });
15892
15976
  };
15893
15977
  get = (client, id) => {
15894
- const { method, path: path6 } = resourcesEndpoints.get;
15895
- return request(client, method, interpolatePath(path6, { id }));
15978
+ const { method, path: path7 } = resourcesEndpoints.get;
15979
+ return request(client, method, interpolatePath(path7, { id }));
15896
15980
  };
15897
15981
  _delete3 = (client, id) => {
15898
- const { method, path: path6 } = resourcesEndpoints.delete;
15899
- return request(client, method, interpolatePath(path6, { id }));
15982
+ const { method, path: path7 } = resourcesEndpoints.delete;
15983
+ return request(client, method, interpolatePath(path7, { id }));
15900
15984
  };
15901
15985
  branch = (client, id, input) => {
15902
- const { method, path: path6 } = databasesEndpoints.branch;
15903
- return request(client, method, interpolatePath(path6, { id }), { body: input });
15986
+ const { method, path: path7 } = databasesEndpoints.branch;
15987
+ return request(client, method, interpolatePath(path7, { id }), { body: input });
15904
15988
  };
15905
15989
  }
15906
15990
  });
@@ -15927,8 +16011,8 @@ var init_environments2 = __esm({
15927
16011
  ...options.orgId ? { "x-preferred-org-id": options.orgId } : {}
15928
16012
  });
15929
16013
  list7 = async (client, projectId, options = {}) => {
15930
- const { method, path: path6 } = environmentsEndpoints.list;
15931
- const res = await request(client, method, interpolatePath(path6, { id: projectId }), { headers: orgHeaders2(options) });
16014
+ const { method, path: path7 } = environmentsEndpoints.list;
16015
+ const res = await request(client, method, interpolatePath(path7, { id: projectId }), { headers: orgHeaders2(options) });
15932
16016
  return Array.isArray(res) ? res : res.data ?? [];
15933
16017
  };
15934
16018
  resolveId = async (client, projectId, envType, options = {}) => {
@@ -15950,29 +16034,29 @@ var init_environments2 = __esm({
15950
16034
  return byType[0]?.id ?? null;
15951
16035
  };
15952
16036
  promote = (client, projectId, targetEnvId, sourceEnvId, options = {}) => {
15953
- const { method, path: path6 } = environmentsEndpoints.promote;
15954
- return request(client, method, interpolatePath(path6, { id: projectId, envId: targetEnvId }), {
16037
+ const { method, path: path7 } = environmentsEndpoints.promote;
16038
+ return request(client, method, interpolatePath(path7, { id: projectId, envId: targetEnvId }), {
15955
16039
  body: { sourceEnvId },
15956
16040
  headers: orgHeaders2(options)
15957
16041
  });
15958
16042
  };
15959
16043
  create4 = (client, projectId, input, options = {}) => {
15960
- const { method, path: path6 } = environmentsEndpoints.createStandalone;
15961
- return request(client, method, path6, {
16044
+ const { method, path: path7 } = environmentsEndpoints.createStandalone;
16045
+ return request(client, method, path7, {
15962
16046
  body: { projectId, envType: input.envType ?? "staging", ...input },
15963
16047
  headers: orgHeaders2(options)
15964
16048
  });
15965
16049
  };
15966
16050
  update2 = (client, envId, input, options = {}) => {
15967
- const { method, path: path6 } = environmentsEndpoints.update;
15968
- return request(client, method, interpolatePath(path6, { envId }), {
16051
+ const { method, path: path7 } = environmentsEndpoints.update;
16052
+ return request(client, method, interpolatePath(path7, { envId }), {
15969
16053
  body: input,
15970
16054
  headers: orgHeaders2(options)
15971
16055
  });
15972
16056
  };
15973
16057
  _delete4 = (client, envId, options = {}) => {
15974
- const { method, path: path6 } = environmentsEndpoints.delete;
15975
- return request(client, method, interpolatePath(path6, { envId }), { headers: orgHeaders2(options) });
16058
+ const { method, path: path7 } = environmentsEndpoints.delete;
16059
+ return request(client, method, interpolatePath(path7, { envId }), { headers: orgHeaders2(options) });
15976
16060
  };
15977
16061
  clone = (client, sourceEnvId, body, options = {}) => request(client, "POST", `/environments/${encodeURIComponent(sourceEnvId)}/clone`, {
15978
16062
  body,
@@ -15993,7 +16077,7 @@ __export(deployments_exports, {
15993
16077
  trigger: () => trigger2
15994
16078
  });
15995
16079
  async function triggerResolved(client, projectId, environment, options) {
15996
- const { method, path: path6 } = deploymentsEndpoints.trigger;
16080
+ const { method, path: path7 } = deploymentsEndpoints.trigger;
15997
16081
  const envId = options.envId ?? await resolveId(client, projectId, environment, options);
15998
16082
  if (!envId) {
15999
16083
  throw new ApiError2(404, `Environment '${environment}' not found`);
@@ -16002,7 +16086,7 @@ async function triggerResolved(client, projectId, environment, options) {
16002
16086
  if (options.frameworkSignals && Object.keys(options.frameworkSignals).length > 0) {
16003
16087
  body.frameworkSignals = options.frameworkSignals;
16004
16088
  }
16005
- return request(client, method, interpolatePath(path6, { id: projectId }), {
16089
+ return request(client, method, interpolatePath(path7, { id: projectId }), {
16006
16090
  body,
16007
16091
  headers: { "x-preferred-org-id": options.orgId }
16008
16092
  });
@@ -16031,27 +16115,27 @@ var init_deployments2 = __esm({
16031
16115
  init_errors2();
16032
16116
  init_http();
16033
16117
  status = (client, projectId, options = {}) => {
16034
- const { method, path: path6 } = deploymentsEndpoints.status;
16035
- return request(client, method, interpolatePath(path6, { id: projectId }), {
16118
+ const { method, path: path7 } = deploymentsEndpoints.status;
16119
+ return request(client, method, interpolatePath(path7, { id: projectId }), {
16036
16120
  headers: { "x-preferred-org-id": options.orgId }
16037
16121
  });
16038
16122
  };
16039
16123
  get2 = (client, deploymentId2, options = {}) => {
16040
- const { method, path: path6 } = deploymentsEndpoints.get;
16041
- return request(client, method, interpolatePath(path6, { id: deploymentId2 }), {
16124
+ const { method, path: path7 } = deploymentsEndpoints.get;
16125
+ return request(client, method, interpolatePath(path7, { id: deploymentId2 }), {
16042
16126
  headers: { "x-preferred-org-id": options.orgId }
16043
16127
  });
16044
16128
  };
16045
16129
  getBuild = (client, buildId, options = {}) => {
16046
- const { method, path: path6 } = deploymentsEndpoints.envScopedBuildDetail;
16047
- return request(client, method, interpolatePath(path6, { buildId }), {
16130
+ const { method, path: path7 } = deploymentsEndpoints.envScopedBuildDetail;
16131
+ return request(client, method, interpolatePath(path7, { buildId }), {
16048
16132
  headers: { "x-preferred-org-id": options.orgId }
16049
16133
  });
16050
16134
  };
16051
16135
  trigger2 = (client, projectId, environment, options = {}) => triggerResolved(client, projectId, environment, options);
16052
16136
  history2 = (client, projectId, envType, options = {}) => {
16053
- const { method, path: path6 } = deploymentsEndpoints.history;
16054
- return request(client, method, interpolatePath(path6, { id: projectId }), {
16137
+ const { method, path: path7 } = deploymentsEndpoints.history;
16138
+ return request(client, method, interpolatePath(path7, { id: projectId }), {
16055
16139
  query: { envType },
16056
16140
  headers: { "x-preferred-org-id": options.orgId }
16057
16141
  }).then((response) => {
@@ -16060,15 +16144,15 @@ var init_deployments2 = __esm({
16060
16144
  });
16061
16145
  };
16062
16146
  rollback = (client, projectId, body, options = {}) => {
16063
- const { method, path: path6 } = deploymentsEndpoints.rollback;
16064
- return request(client, method, interpolatePath(path6, { id: projectId }), {
16147
+ const { method, path: path7 } = deploymentsEndpoints.rollback;
16148
+ return request(client, method, interpolatePath(path7, { id: projectId }), {
16065
16149
  body,
16066
16150
  headers: { "x-preferred-org-id": options.orgId }
16067
16151
  });
16068
16152
  };
16069
16153
  cancel = (client, buildId) => {
16070
- const { method, path: path6 } = deploymentsEndpoints.envScopedCancelBuild;
16071
- return request(client, method, interpolatePath(path6, { buildId }));
16154
+ const { method, path: path7 } = deploymentsEndpoints.envScopedCancelBuild;
16155
+ return request(client, method, interpolatePath(path7, { buildId }));
16072
16156
  };
16073
16157
  }
16074
16158
  });
@@ -16095,31 +16179,31 @@ var init_domains2 = __esm({
16095
16179
  ...options.orgId ? { "x-preferred-org-id": options.orgId } : {}
16096
16180
  });
16097
16181
  list8 = (client, projectId, envType = "production", options = {}) => {
16098
- const { method, path: path6 } = domainsEndpoints.list;
16099
- return request(client, method, interpolatePath(path6, { projectId }), {
16182
+ const { method, path: path7 } = domainsEndpoints.list;
16183
+ return request(client, method, interpolatePath(path7, { projectId }), {
16100
16184
  query: { envType, envId: options.envId },
16101
16185
  headers: orgHeaders3(options)
16102
16186
  });
16103
16187
  };
16104
16188
  create5 = (client, projectId, apexDomain, envType = "production", options = {}) => {
16105
- const { method, path: path6 } = domainsEndpoints.create;
16106
- return request(client, method, interpolatePath(path6, { projectId }), {
16189
+ const { method, path: path7 } = domainsEndpoints.create;
16190
+ return request(client, method, interpolatePath(path7, { projectId }), {
16107
16191
  body: { apexDomain, envType, envId: options.envId },
16108
16192
  headers: orgHeaders3(options)
16109
16193
  });
16110
16194
  };
16111
16195
  addHostname = (client, projectId, domainId, hostname, opts, options = {}) => {
16112
- const { method, path: path6 } = domainsEndpoints.addHostname;
16196
+ const { method, path: path7 } = domainsEndpoints.addHostname;
16113
16197
  const { envType = "production", envId, ...body } = opts;
16114
- return request(client, method, interpolatePath(path6, { projectId, domainId }), {
16198
+ return request(client, method, interpolatePath(path7, { projectId, domainId }), {
16115
16199
  query: { envType, envId },
16116
16200
  body: { hostname, ...body },
16117
16201
  headers: orgHeaders3(options)
16118
16202
  });
16119
16203
  };
16120
16204
  removeHostname = (client, projectId, domainId, hostnameId, options = {}) => {
16121
- const { method, path: path6 } = domainsEndpoints.removeHostname;
16122
- return request(client, method, interpolatePath(path6, { projectId, domainId, hostnameId }), {
16205
+ const { method, path: path7 } = domainsEndpoints.removeHostname;
16206
+ return request(client, method, interpolatePath(path7, { projectId, domainId, hostnameId }), {
16123
16207
  headers: orgHeaders3(options)
16124
16208
  });
16125
16209
  };
@@ -16148,8 +16232,8 @@ var init_email2 = __esm({
16148
16232
  init_dist();
16149
16233
  init_http();
16150
16234
  listLogs = (client, projectId, options) => {
16151
- const { method, path: path6 } = emailAdminEndpoints.listLogs;
16152
- return request(client, method, interpolatePath(path6, { id: projectId }), {
16235
+ const { method, path: path7 } = emailAdminEndpoints.listLogs;
16236
+ return request(client, method, interpolatePath(path7, { id: projectId }), {
16153
16237
  query: {
16154
16238
  cursor: options?.cursor,
16155
16239
  email: options?.email,
@@ -16161,12 +16245,12 @@ var init_email2 = __esm({
16161
16245
  });
16162
16246
  };
16163
16247
  getLog = (client, projectId, logId) => {
16164
- const { method, path: path6 } = emailAdminEndpoints.getLog;
16165
- return request(client, method, interpolatePath(path6, { id: projectId, logId }));
16248
+ const { method, path: path7 } = emailAdminEndpoints.getLog;
16249
+ return request(client, method, interpolatePath(path7, { id: projectId, logId }));
16166
16250
  };
16167
16251
  listSuppressions = (client, projectId, options) => {
16168
- const { method, path: path6 } = emailAdminEndpoints.listSuppressions;
16169
- return request(client, method, interpolatePath(path6, { id: projectId }), {
16252
+ const { method, path: path7 } = emailAdminEndpoints.listSuppressions;
16253
+ return request(client, method, interpolatePath(path7, { id: projectId }), {
16170
16254
  query: {
16171
16255
  cursor: options?.cursor,
16172
16256
  email: options?.email,
@@ -16176,20 +16260,20 @@ var init_email2 = __esm({
16176
16260
  });
16177
16261
  };
16178
16262
  addSuppression = (client, projectId, input) => {
16179
- const { method, path: path6 } = emailAdminEndpoints.addSuppression;
16180
- return request(client, method, interpolatePath(path6, { id: projectId }), { body: input });
16263
+ const { method, path: path7 } = emailAdminEndpoints.addSuppression;
16264
+ return request(client, method, interpolatePath(path7, { id: projectId }), { body: input });
16181
16265
  };
16182
16266
  deleteSuppression = (client, projectId, email) => {
16183
- const { method, path: path6 } = emailAdminEndpoints.deleteSuppression;
16184
- return request(client, method, interpolatePath(path6, { id: projectId, email }));
16267
+ const { method, path: path7 } = emailAdminEndpoints.deleteSuppression;
16268
+ return request(client, method, interpolatePath(path7, { id: projectId, email }));
16185
16269
  };
16186
16270
  getSettings = (client, projectId) => {
16187
- const { method, path: path6 } = emailAdminEndpoints.getSettings;
16188
- return request(client, method, interpolatePath(path6, { id: projectId }));
16271
+ const { method, path: path7 } = emailAdminEndpoints.getSettings;
16272
+ return request(client, method, interpolatePath(path7, { id: projectId }));
16189
16273
  };
16190
16274
  updateSettings = (client, projectId, input) => {
16191
- const { method, path: path6 } = emailAdminEndpoints.updateSettings;
16192
- return request(client, method, interpolatePath(path6, { id: projectId }), {
16275
+ const { method, path: path7 } = emailAdminEndpoints.updateSettings;
16276
+ return request(client, method, interpolatePath(path7, { id: projectId }), {
16193
16277
  body: input
16194
16278
  });
16195
16279
  };
@@ -16244,13 +16328,13 @@ var init_envVars = __esm({
16244
16328
  ...options.orgId ? { "x-preferred-org-id": options.orgId } : {}
16245
16329
  });
16246
16330
  list9 = async (client, projectId, envType, options = {}) => {
16247
- const { method, path: path6 } = envVarsEndpoints.list;
16248
- const res = await request(client, method, interpolatePath(path6, { id: projectId }), { query: { envType, envId: options.envId }, headers: orgHeaders4(options) });
16331
+ const { method, path: path7 } = envVarsEndpoints.list;
16332
+ const res = await request(client, method, interpolatePath(path7, { id: projectId }), { query: { envType, envId: options.envId }, headers: orgHeaders4(options) });
16249
16333
  return Array.isArray(res) ? res : res.data ?? [];
16250
16334
  };
16251
16335
  set2 = (client, projectId, key, value, envType, secret, options = {}) => {
16252
- const { method, path: path6 } = envVarsEndpoints.set;
16253
- return request(client, method, interpolatePath(path6, { id: projectId }), {
16336
+ const { method, path: path7 } = envVarsEndpoints.set;
16337
+ return request(client, method, interpolatePath(path7, { id: projectId }), {
16254
16338
  body: {
16255
16339
  envType,
16256
16340
  envId: options.envId,
@@ -16260,15 +16344,15 @@ var init_envVars = __esm({
16260
16344
  });
16261
16345
  };
16262
16346
  setMany = (client, projectId, vars, envType, options = {}) => {
16263
- const { method, path: path6 } = envVarsEndpoints.set;
16264
- return request(client, method, interpolatePath(path6, { id: projectId }), {
16347
+ const { method, path: path7 } = envVarsEndpoints.set;
16348
+ return request(client, method, interpolatePath(path7, { id: projectId }), {
16265
16349
  body: { envType, envId: options.envId, vars },
16266
16350
  headers: orgHeaders4(options)
16267
16351
  });
16268
16352
  };
16269
16353
  _delete5 = (client, projectId, key, envType, options = {}) => {
16270
- const { method, path: path6 } = envVarsEndpoints.delete;
16271
- return request(client, method, interpolatePath(path6, { id: projectId, key }), {
16354
+ const { method, path: path7 } = envVarsEndpoints.delete;
16355
+ return request(client, method, interpolatePath(path7, { id: projectId, key }), {
16272
16356
  query: { envType, envId: options.envId },
16273
16357
  headers: orgHeaders4(options)
16274
16358
  });
@@ -16458,8 +16542,8 @@ var init_newsletter3 = __esm({
16458
16542
  asBooleanQuery = (value) => value === void 0 ? void 0 : String(value);
16459
16543
  asNumberQuery = (value) => value === void 0 ? void 0 : String(value);
16460
16544
  listSubscribers = (client, options) => {
16461
- const { method, path: path6 } = newsletterEndpoints.listSubscribers;
16462
- return request(client, method, path6, {
16545
+ const { method, path: path7 } = newsletterEndpoints.listSubscribers;
16546
+ return request(client, method, path7, {
16463
16547
  query: {
16464
16548
  projectId: options?.projectId,
16465
16549
  verified: asBooleanQuery(options?.verified),
@@ -16472,16 +16556,16 @@ var init_newsletter3 = __esm({
16472
16556
  });
16473
16557
  };
16474
16558
  getSubscriber = (client, email) => {
16475
- const { method, path: path6 } = newsletterEndpoints.getSubscriber;
16476
- return request(client, method, path6, { query: { email } });
16559
+ const { method, path: path7 } = newsletterEndpoints.getSubscriber;
16560
+ return request(client, method, path7, { query: { email } });
16477
16561
  };
16478
16562
  getPreferences = (client, email) => {
16479
- const { method, path: path6 } = newsletterEndpoints.getPreferences;
16480
- return request(client, method, path6, { query: { email } });
16563
+ const { method, path: path7 } = newsletterEndpoints.getPreferences;
16564
+ return request(client, method, path7, { query: { email } });
16481
16565
  };
16482
16566
  exportSubscribers = (client, options) => {
16483
- const { method, path: path6 } = newsletterEndpoints.exportSubscribers;
16484
- return request(client, method, path6, {
16567
+ const { method, path: path7 } = newsletterEndpoints.exportSubscribers;
16568
+ return request(client, method, path7, {
16485
16569
  query: {
16486
16570
  verified: asBooleanQuery(options?.verified),
16487
16571
  includeUnsubscribed: asBooleanQuery(options?.includeUnsubscribed)
@@ -16489,26 +16573,26 @@ var init_newsletter3 = __esm({
16489
16573
  });
16490
16574
  };
16491
16575
  subscriberStats = (client) => {
16492
- const { method, path: path6 } = newsletterEndpoints.subscriberStats;
16493
- return request(client, method, path6);
16576
+ const { method, path: path7 } = newsletterEndpoints.subscriberStats;
16577
+ return request(client, method, path7);
16494
16578
  };
16495
16579
  deleteSubscriber = (client, email) => {
16496
- const { method, path: path6 } = newsletterEndpoints.deleteSubscriber;
16580
+ const { method, path: path7 } = newsletterEndpoints.deleteSubscriber;
16497
16581
  const body = { email };
16498
- return request(client, method, path6, { body });
16582
+ return request(client, method, path7, { body });
16499
16583
  };
16500
16584
  bulkDeleteSubscribers = (client, input) => {
16501
- const { method, path: path6 } = newsletterEndpoints.bulkDeleteSubscribers;
16502
- return request(client, method, path6, { body: input });
16585
+ const { method, path: path7 } = newsletterEndpoints.bulkDeleteSubscribers;
16586
+ return request(client, method, path7, { body: input });
16503
16587
  };
16504
16588
  resendVerification = (client, email) => {
16505
- const { method, path: path6 } = newsletterEndpoints.resendVerification;
16589
+ const { method, path: path7 } = newsletterEndpoints.resendVerification;
16506
16590
  const body = { email };
16507
- return request(client, method, path6, { body });
16591
+ return request(client, method, path7, { body });
16508
16592
  };
16509
16593
  listSequences = (client, projectId, options) => {
16510
- const { method, path: path6 } = newsletterEndpoints.listSequences;
16511
- return request(client, method, path6, {
16594
+ const { method, path: path7 } = newsletterEndpoints.listSequences;
16595
+ return request(client, method, path7, {
16512
16596
  query: {
16513
16597
  projectId,
16514
16598
  includeInactive: asBooleanQuery(options?.includeInactive)
@@ -16516,45 +16600,45 @@ var init_newsletter3 = __esm({
16516
16600
  });
16517
16601
  };
16518
16602
  getSequence = (client, sequenceId) => {
16519
- const { method, path: path6 } = newsletterEndpoints.getSequence;
16520
- return request(client, method, interpolatePath(path6, { sequenceId }));
16603
+ const { method, path: path7 } = newsletterEndpoints.getSequence;
16604
+ return request(client, method, interpolatePath(path7, { sequenceId }));
16521
16605
  };
16522
16606
  createSequence = (client, input) => {
16523
- const { method, path: path6 } = newsletterEndpoints.createSequence;
16524
- return request(client, method, path6, { body: input });
16607
+ const { method, path: path7 } = newsletterEndpoints.createSequence;
16608
+ return request(client, method, path7, { body: input });
16525
16609
  };
16526
16610
  updateSequence = (client, sequenceId, input) => {
16527
- const { method, path: path6 } = newsletterEndpoints.updateSequence;
16528
- return request(client, method, interpolatePath(path6, { sequenceId }), { body: input });
16611
+ const { method, path: path7 } = newsletterEndpoints.updateSequence;
16612
+ return request(client, method, interpolatePath(path7, { sequenceId }), { body: input });
16529
16613
  };
16530
16614
  deleteSequence = (client, sequenceId) => {
16531
- const { method, path: path6 } = newsletterEndpoints.deleteSequence;
16532
- return request(client, method, interpolatePath(path6, { sequenceId }));
16615
+ const { method, path: path7 } = newsletterEndpoints.deleteSequence;
16616
+ return request(client, method, interpolatePath(path7, { sequenceId }));
16533
16617
  };
16534
16618
  sequenceAnalytics = (client, sequenceId) => {
16535
- const { method, path: path6 } = newsletterEndpoints.getSequenceAnalytics;
16536
- return request(client, method, interpolatePath(path6, { sequenceId }));
16619
+ const { method, path: path7 } = newsletterEndpoints.getSequenceAnalytics;
16620
+ return request(client, method, interpolatePath(path7, { sequenceId }));
16537
16621
  };
16538
16622
  addStep = (client, input) => {
16539
- const { method, path: path6 } = newsletterEndpoints.addStep;
16540
- return request(client, method, path6, { body: input });
16623
+ const { method, path: path7 } = newsletterEndpoints.addStep;
16624
+ return request(client, method, path7, { body: input });
16541
16625
  };
16542
16626
  updateStep = (client, stepId, input) => {
16543
- const { method, path: path6 } = newsletterEndpoints.updateStep;
16544
- return request(client, method, interpolatePath(path6, { stepId }), { body: input });
16627
+ const { method, path: path7 } = newsletterEndpoints.updateStep;
16628
+ return request(client, method, interpolatePath(path7, { stepId }), { body: input });
16545
16629
  };
16546
16630
  deleteStep = (client, stepId) => {
16547
- const { method, path: path6 } = newsletterEndpoints.deleteStep;
16548
- return request(client, method, interpolatePath(path6, { stepId }));
16631
+ const { method, path: path7 } = newsletterEndpoints.deleteStep;
16632
+ return request(client, method, interpolatePath(path7, { stepId }));
16549
16633
  };
16550
16634
  reorderSteps = (client, sequenceId, stepOrder) => {
16551
- const { method, path: path6 } = newsletterEndpoints.reorderSteps;
16635
+ const { method, path: path7 } = newsletterEndpoints.reorderSteps;
16552
16636
  const body = { sequenceId, stepOrder };
16553
- return request(client, method, path6, { body });
16637
+ return request(client, method, path7, { body });
16554
16638
  };
16555
16639
  listEnrollments = (client, sequenceId, options) => {
16556
- const { method, path: path6 } = newsletterEndpoints.listEnrollments;
16557
- return request(client, method, path6, {
16640
+ const { method, path: path7 } = newsletterEndpoints.listEnrollments;
16641
+ return request(client, method, path7, {
16558
16642
  query: {
16559
16643
  sequenceId,
16560
16644
  status: options?.status,
@@ -16564,24 +16648,24 @@ var init_newsletter3 = __esm({
16564
16648
  });
16565
16649
  };
16566
16650
  getEnrollment = (client, enrollmentId) => {
16567
- const { method, path: path6 } = newsletterEndpoints.getEnrollment;
16568
- return request(client, method, interpolatePath(path6, { enrollmentId }));
16651
+ const { method, path: path7 } = newsletterEndpoints.getEnrollment;
16652
+ return request(client, method, interpolatePath(path7, { enrollmentId }));
16569
16653
  };
16570
16654
  enrollSubscriber = (client, input) => {
16571
- const { method, path: path6 } = newsletterEndpoints.enrollSubscriber;
16572
- return request(client, method, path6, { body: input });
16655
+ const { method, path: path7 } = newsletterEndpoints.enrollSubscriber;
16656
+ return request(client, method, path7, { body: input });
16573
16657
  };
16574
16658
  cancelEnrollment = (client, enrollmentId) => {
16575
- const { method, path: path6 } = newsletterEndpoints.cancelEnrollment;
16576
- return request(client, method, interpolatePath(path6, { enrollmentId }));
16659
+ const { method, path: path7 } = newsletterEndpoints.cancelEnrollment;
16660
+ return request(client, method, interpolatePath(path7, { enrollmentId }));
16577
16661
  };
16578
16662
  pauseEnrollment = (client, enrollmentId) => {
16579
- const { method, path: path6 } = newsletterEndpoints.pauseEnrollment;
16580
- return request(client, method, interpolatePath(path6, { enrollmentId }));
16663
+ const { method, path: path7 } = newsletterEndpoints.pauseEnrollment;
16664
+ return request(client, method, interpolatePath(path7, { enrollmentId }));
16581
16665
  };
16582
16666
  resumeEnrollment = (client, enrollmentId) => {
16583
- const { method, path: path6 } = newsletterEndpoints.resumeEnrollment;
16584
- return request(client, method, interpolatePath(path6, { enrollmentId }));
16667
+ const { method, path: path7 } = newsletterEndpoints.resumeEnrollment;
16668
+ return request(client, method, interpolatePath(path7, { enrollmentId }));
16585
16669
  };
16586
16670
  }
16587
16671
  });
@@ -16628,18 +16712,18 @@ var init_oidc3 = __esm({
16628
16712
  "custom"
16629
16713
  ];
16630
16714
  list13 = (client, projectId) => {
16631
- const { method, path: path6 } = oidcEndpoints.listPolicies;
16632
- return request(client, method, interpolatePath(path6, { projectId }));
16715
+ const { method, path: path7 } = oidcEndpoints.listPolicies;
16716
+ return request(client, method, interpolatePath(path7, { projectId }));
16633
16717
  };
16634
16718
  create8 = (client, projectId, input) => {
16635
- const { method, path: path6 } = oidcEndpoints.createPolicy;
16636
- return request(client, method, interpolatePath(path6, { projectId }), {
16719
+ const { method, path: path7 } = oidcEndpoints.createPolicy;
16720
+ return request(client, method, interpolatePath(path7, { projectId }), {
16637
16721
  body: { audience: null, ...input }
16638
16722
  });
16639
16723
  };
16640
16724
  _delete7 = (client, projectId, policyId) => {
16641
- const { method, path: path6 } = oidcEndpoints.deletePolicy;
16642
- return request(client, method, interpolatePath(path6, { projectId, id: policyId }));
16725
+ const { method, path: path7 } = oidcEndpoints.deletePolicy;
16726
+ return request(client, method, interpolatePath(path7, { projectId, id: policyId }));
16643
16727
  };
16644
16728
  }
16645
16729
  });
@@ -16663,39 +16747,39 @@ var init_organizations2 = __esm({
16663
16747
  init_dist();
16664
16748
  init_http();
16665
16749
  current = (client) => {
16666
- const { method, path: path6 } = organizationsEndpoints.current;
16667
- return request(client, method, path6);
16750
+ const { method, path: path7 } = organizationsEndpoints.current;
16751
+ return request(client, method, path7);
16668
16752
  };
16669
16753
  listMemberships = (client) => {
16670
- const { method, path: path6 } = organizationsEndpoints.memberships;
16671
- return request(client, method, path6);
16754
+ const { method, path: path7 } = organizationsEndpoints.memberships;
16755
+ return request(client, method, path7);
16672
16756
  };
16673
16757
  create9 = (client, input) => {
16674
- const { method, path: path6 } = organizationsEndpoints.create;
16675
- return request(client, method, path6, { body: input });
16758
+ const { method, path: path7 } = organizationsEndpoints.create;
16759
+ return request(client, method, path7, { body: input });
16676
16760
  };
16677
16761
  getSettings2 = (client, id) => {
16678
- const { method, path: path6 } = organizationsEndpoints.getSettings;
16679
- return request(client, method, interpolatePath(path6, { id }));
16762
+ const { method, path: path7 } = organizationsEndpoints.getSettings;
16763
+ return request(client, method, interpolatePath(path7, { id }));
16680
16764
  };
16681
16765
  listMembers = async (client, orgId) => {
16682
- const { method, path: path6 } = organizationsEndpoints.listMembers;
16683
- const res = await request(client, method, interpolatePath(path6, { orgId }));
16766
+ const { method, path: path7 } = organizationsEndpoints.listMembers;
16767
+ const res = await request(client, method, interpolatePath(path7, { orgId }));
16684
16768
  return Array.isArray(res) ? res : res.members ?? [];
16685
16769
  };
16686
16770
  inviteMember = async (client, orgId, email, role) => {
16687
- const { method, path: path6 } = organizationsEndpoints.inviteMember;
16688
- await request(client, method, interpolatePath(path6, { orgId }), {
16771
+ const { method, path: path7 } = organizationsEndpoints.inviteMember;
16772
+ await request(client, method, interpolatePath(path7, { orgId }), {
16689
16773
  body: { email, role }
16690
16774
  });
16691
16775
  };
16692
16776
  removeMember = (client, orgId, userId) => {
16693
- const { method, path: path6 } = organizationsEndpoints.removeMember;
16694
- return request(client, method, interpolatePath(path6, { orgId, userId }));
16777
+ const { method, path: path7 } = organizationsEndpoints.removeMember;
16778
+ return request(client, method, interpolatePath(path7, { orgId, userId }));
16695
16779
  };
16696
16780
  updateMemberRole = (client, orgId, userId, role) => {
16697
- const { method, path: path6 } = organizationsEndpoints.updateMemberRole;
16698
- return request(client, method, interpolatePath(path6, { orgId, userId }), {
16781
+ const { method, path: path7 } = organizationsEndpoints.updateMemberRole;
16782
+ return request(client, method, interpolatePath(path7, { orgId, userId }), {
16699
16783
  body: { role }
16700
16784
  });
16701
16785
  };
@@ -16721,8 +16805,8 @@ var init_principal = __esm({
16721
16805
  init_dist();
16722
16806
  init_http();
16723
16807
  get3 = (client) => {
16724
- const { method, path: path6 } = authEndpoints.getPrincipal;
16725
- return request(client, method, path6);
16808
+ const { method, path: path7 } = authEndpoints.getPrincipal;
16809
+ return request(client, method, path7);
16726
16810
  };
16727
16811
  }
16728
16812
  });
@@ -16747,16 +16831,16 @@ var init_privacy3 = __esm({
16747
16831
  init_dist();
16748
16832
  init_http();
16749
16833
  startScan = (client, input) => {
16750
- const { method, path: path6 } = privacyEndpoints.startScan;
16751
- return request(client, method, path6, { body: input });
16834
+ const { method, path: path7 } = privacyEndpoints.startScan;
16835
+ return request(client, method, path7, { body: input });
16752
16836
  };
16753
16837
  getScan = (client, projectIdOrSlug, scanId) => {
16754
- const { method, path: path6 } = privacyEndpoints.getScan;
16755
- return request(client, method, interpolatePath(path6, { id: projectIdOrSlug, scanId }));
16838
+ const { method, path: path7 } = privacyEndpoints.getScan;
16839
+ return request(client, method, interpolatePath(path7, { id: projectIdOrSlug, scanId }));
16756
16840
  };
16757
16841
  listScans = (client, projectIdOrSlug, options) => {
16758
- const { method, path: path6 } = privacyEndpoints.listScans;
16759
- return request(client, method, interpolatePath(path6, { id: projectIdOrSlug }), {
16842
+ const { method, path: path7 } = privacyEndpoints.listScans;
16843
+ return request(client, method, interpolatePath(path7, { id: projectIdOrSlug }), {
16760
16844
  query: {
16761
16845
  status: options?.status,
16762
16846
  limit: options?.limit !== void 0 ? String(options.limit) : void 0,
@@ -16765,8 +16849,8 @@ var init_privacy3 = __esm({
16765
16849
  });
16766
16850
  };
16767
16851
  listCookies = (client, projectIdOrSlug, options) => {
16768
- const { method, path: path6 } = privacyEndpoints.listCookies;
16769
- return request(client, method, interpolatePath(path6, { id: projectIdOrSlug }), {
16852
+ const { method, path: path7 } = privacyEndpoints.listCookies;
16853
+ return request(client, method, interpolatePath(path7, { id: projectIdOrSlug }), {
16770
16854
  query: {
16771
16855
  scanId: options?.scanId,
16772
16856
  category: options?.category,
@@ -16778,28 +16862,28 @@ var init_privacy3 = __esm({
16778
16862
  });
16779
16863
  };
16780
16864
  summary = (client, projectIdOrSlug) => {
16781
- const { method, path: path6 } = privacyEndpoints.getSummary;
16782
- return request(client, method, interpolatePath(path6, { id: projectIdOrSlug }));
16865
+ const { method, path: path7 } = privacyEndpoints.getSummary;
16866
+ return request(client, method, interpolatePath(path7, { id: projectIdOrSlug }));
16783
16867
  };
16784
16868
  updateCookieCategory = (client, projectIdOrSlug, cookieId, category) => {
16785
- const { method, path: path6 } = privacyEndpoints.updateCookieCategory;
16786
- return request(client, method, interpolatePath(path6, { id: projectIdOrSlug, cookieId }), {
16869
+ const { method, path: path7 } = privacyEndpoints.updateCookieCategory;
16870
+ return request(client, method, interpolatePath(path7, { id: projectIdOrSlug, cookieId }), {
16787
16871
  body: { category }
16788
16872
  });
16789
16873
  };
16790
16874
  linkCookieToConsentType = (client, projectIdOrSlug, cookieId, consentTypeId) => {
16791
- const { method, path: path6 } = privacyEndpoints.linkCookie;
16792
- return request(client, method, interpolatePath(path6, { id: projectIdOrSlug, cookieId }), {
16875
+ const { method, path: path7 } = privacyEndpoints.linkCookie;
16876
+ return request(client, method, interpolatePath(path7, { id: projectIdOrSlug, cookieId }), {
16793
16877
  body: { consentTypeId }
16794
16878
  });
16795
16879
  };
16796
16880
  bulkLinkCookies = (client, input) => {
16797
- const { method, path: path6 } = privacyEndpoints.bulkLinkCookies;
16798
- return request(client, method, path6, { body: input });
16881
+ const { method, path: path7 } = privacyEndpoints.bulkLinkCookies;
16882
+ return request(client, method, path7, { body: input });
16799
16883
  };
16800
16884
  seedKnownCookies = (client) => {
16801
- const { method, path: path6 } = privacyEndpoints.seedKnownCookies;
16802
- return request(client, method, path6);
16885
+ const { method, path: path7 } = privacyEndpoints.seedKnownCookies;
16886
+ return request(client, method, path7);
16803
16887
  };
16804
16888
  }
16805
16889
  });
@@ -16825,40 +16909,40 @@ var init_projects2 = __esm({
16825
16909
  ...options.orgId ? { "x-preferred-org-id": options.orgId } : {}
16826
16910
  });
16827
16911
  list14 = async (client, options = {}) => {
16828
- const { method, path: path6 } = projectsEndpoints2.list;
16829
- const res = await request(client, method, path6, {
16912
+ const { method, path: path7 } = projectsEndpoints2.list;
16913
+ const res = await request(client, method, path7, {
16830
16914
  headers: orgHeaders6(options)
16831
16915
  });
16832
16916
  return Array.isArray(res) ? res : res.data ?? [];
16833
16917
  };
16834
16918
  get4 = (client, id, options = {}) => {
16835
- const { method, path: path6 } = projectsEndpoints2.get;
16836
- return request(client, method, interpolatePath(path6, { id }), {
16919
+ const { method, path: path7 } = projectsEndpoints2.get;
16920
+ return request(client, method, interpolatePath(path7, { id }), {
16837
16921
  headers: orgHeaders6(options)
16838
16922
  });
16839
16923
  };
16840
16924
  create10 = (client, input) => {
16841
- const { method, path: path6 } = projectsEndpoints2.create;
16842
- return request(client, method, path6, { body: input });
16925
+ const { method, path: path7 } = projectsEndpoints2.create;
16926
+ return request(client, method, path7, { body: input });
16843
16927
  };
16844
16928
  update4 = (client, id, input, options = {}) => {
16845
- const { method, path: path6 } = projectsEndpoints2.update;
16846
- return request(client, method, interpolatePath(path6, { id }), {
16929
+ const { method, path: path7 } = projectsEndpoints2.update;
16930
+ return request(client, method, interpolatePath(path7, { id }), {
16847
16931
  body: input,
16848
16932
  headers: orgHeaders6(options)
16849
16933
  });
16850
16934
  };
16851
16935
  _delete8 = (client, id) => {
16852
- const { method, path: path6 } = projectsEndpoints2.delete;
16853
- return request(client, method, interpolatePath(path6, { id }));
16936
+ const { method, path: path7 } = projectsEndpoints2.delete;
16937
+ return request(client, method, interpolatePath(path7, { id }));
16854
16938
  };
16855
16939
  getManifest = (client, id) => {
16856
- const { method, path: path6 } = projectManifestEndpoints.get;
16857
- return request(client, method, interpolatePath(path6, { id }));
16940
+ const { method, path: path7 } = projectManifestEndpoints.get;
16941
+ return request(client, method, interpolatePath(path7, { id }));
16858
16942
  };
16859
16943
  putManifest = (client, id, manifest) => {
16860
- const { method, path: path6 } = projectManifestEndpoints.put;
16861
- return request(client, method, interpolatePath(path6, { id }), { body: manifest });
16944
+ const { method, path: path7 } = projectManifestEndpoints.put;
16945
+ return request(client, method, interpolatePath(path7, { id }), { body: manifest });
16862
16946
  };
16863
16947
  }
16864
16948
  });
@@ -16990,8 +17074,8 @@ var init_resourceBindings = __esm({
16990
17074
  init_environments2();
16991
17075
  init_http();
16992
17076
  list17 = async (client, resourceId) => {
16993
- const { method, path: path6 } = resourcesEndpoints.listBindings;
16994
- const res = await request(client, method, interpolatePath(path6, { id: resourceId }));
17077
+ const { method, path: path7 } = resourcesEndpoints.listBindings;
17078
+ const res = await request(client, method, interpolatePath(path7, { id: resourceId }));
16995
17079
  return res.bindings ?? [];
16996
17080
  };
16997
17081
  create12 = async (client, resourceId, input) => {
@@ -16999,14 +17083,14 @@ var init_resourceBindings = __esm({
16999
17083
  if (!projectEnvironmentId) {
17000
17084
  throw new Error(`Environment '${input.envType}' not found for project '${input.projectId}'`);
17001
17085
  }
17002
- const { method, path: path6 } = resourcesEndpoints.createBinding;
17003
- return request(client, method, interpolatePath(path6, { id: resourceId }), {
17086
+ const { method, path: path7 } = resourcesEndpoints.createBinding;
17087
+ return request(client, method, interpolatePath(path7, { id: resourceId }), {
17004
17088
  body: { projectEnvironmentId, role: input.role ?? "primary" }
17005
17089
  });
17006
17090
  };
17007
17091
  _delete10 = (client, resourceId, bindingId) => {
17008
- const { method, path: path6 } = resourcesEndpoints.deleteBinding;
17009
- return request(client, method, interpolatePath(path6, { id: resourceId, bindingId }));
17092
+ const { method, path: path7 } = resourcesEndpoints.deleteBinding;
17093
+ return request(client, method, interpolatePath(path7, { id: resourceId, bindingId }));
17010
17094
  };
17011
17095
  }
17012
17096
  });
@@ -17024,13 +17108,13 @@ var init_resources2 = __esm({
17024
17108
  init_dist();
17025
17109
  init_http();
17026
17110
  list18 = async (client, options = {}) => {
17027
- const { method, path: path6 } = resourcesEndpoints.list;
17028
- const res = await request(client, method, path6, options.kind ? { query: { kind: options.kind } } : void 0);
17111
+ const { method, path: path7 } = resourcesEndpoints.list;
17112
+ const res = await request(client, method, path7, options.kind ? { query: { kind: options.kind } } : void 0);
17029
17113
  return Array.isArray(res) ? res : res.data ?? [];
17030
17114
  };
17031
17115
  get7 = (client, id) => {
17032
- const { method, path: path6 } = resourcesEndpoints.get;
17033
- return request(client, method, interpolatePath(path6, { id }));
17116
+ const { method, path: path7 } = resourcesEndpoints.get;
17117
+ return request(client, method, interpolatePath(path7, { id }));
17034
17118
  };
17035
17119
  }
17036
17120
  });
@@ -17050,20 +17134,20 @@ var init_runners3 = __esm({
17050
17134
  init_dist();
17051
17135
  init_http();
17052
17136
  register = (client, input) => {
17053
- const { method, path: path6 } = runnersEndpoints.create;
17054
- return request(client, method, path6, { body: input });
17137
+ const { method, path: path7 } = runnersEndpoints.create;
17138
+ return request(client, method, path7, { body: input });
17055
17139
  };
17056
17140
  list19 = (client) => {
17057
- const { method, path: path6 } = runnersEndpoints.list;
17058
- return request(client, method, path6);
17141
+ const { method, path: path7 } = runnersEndpoints.list;
17142
+ return request(client, method, path7);
17059
17143
  };
17060
17144
  listJobs = (client, runnerId) => {
17061
- const { method, path: path6 } = runnersEndpoints.listJobs;
17062
- return request(client, method, interpolatePath(path6, { runnerId }));
17145
+ const { method, path: path7 } = runnersEndpoints.listJobs;
17146
+ return request(client, method, interpolatePath(path7, { runnerId }));
17063
17147
  };
17064
17148
  unregister = (client, runnerId) => {
17065
- const { method, path: path6 } = runnersEndpoints.delete;
17066
- return request(client, method, interpolatePath(path6, { runnerId }));
17149
+ const { method, path: path7 } = runnersEndpoints.delete;
17150
+ return request(client, method, interpolatePath(path7, { runnerId }));
17067
17151
  };
17068
17152
  }
17069
17153
  });
@@ -17090,50 +17174,50 @@ var init_saml3 = __esm({
17090
17174
  init_dist();
17091
17175
  init_http();
17092
17176
  get8 = (client, organizationId) => {
17093
- const { method, path: path6 } = samlEndpoints.getProvider;
17094
- return request(client, method, path6, { query: { organizationId } });
17177
+ const { method, path: path7 } = samlEndpoints.getProvider;
17178
+ return request(client, method, path7, { query: { organizationId } });
17095
17179
  };
17096
17180
  create13 = (client, input) => {
17097
- const { method, path: path6 } = samlEndpoints.createProvider;
17098
- return request(client, method, path6, { body: input });
17181
+ const { method, path: path7 } = samlEndpoints.createProvider;
17182
+ return request(client, method, path7, { body: input });
17099
17183
  };
17100
17184
  update5 = (client, input) => {
17101
- const { method, path: path6 } = samlEndpoints.updateProvider;
17102
- return request(client, method, path6, { body: input });
17185
+ const { method, path: path7 } = samlEndpoints.updateProvider;
17186
+ return request(client, method, path7, { body: input });
17103
17187
  };
17104
17188
  setStatus = (client, providerId, enabled) => {
17105
- const { method, path: path6 } = samlEndpoints.setProviderStatus;
17106
- return request(client, method, path6, { body: { providerId, enabled } });
17189
+ const { method, path: path7 } = samlEndpoints.setProviderStatus;
17190
+ return request(client, method, path7, { body: { providerId, enabled } });
17107
17191
  };
17108
17192
  _delete11 = (client, providerId) => {
17109
- const { method, path: path6 } = samlEndpoints.deleteProvider;
17110
- return request(client, method, path6, { body: { providerId } });
17193
+ const { method, path: path7 } = samlEndpoints.deleteProvider;
17194
+ return request(client, method, path7, { body: { providerId } });
17111
17195
  };
17112
17196
  metadata = (client, organizationId) => {
17113
- const { method, path: path6 } = samlEndpoints.getMetadata;
17114
- return request(client, method, path6, { query: { organizationId } });
17197
+ const { method, path: path7 } = samlEndpoints.getMetadata;
17198
+ return request(client, method, path7, { query: { organizationId } });
17115
17199
  };
17116
17200
  logs = (client, providerId, limit) => {
17117
- const { method, path: path6 } = samlEndpoints.getLogs;
17118
- return request(client, method, path6, {
17201
+ const { method, path: path7 } = samlEndpoints.getLogs;
17202
+ return request(client, method, path7, {
17119
17203
  query: { providerId, limit: limit !== void 0 ? String(limit) : void 0 }
17120
17204
  });
17121
17205
  };
17122
17206
  testConfig = (client, input) => {
17123
- const { method, path: path6 } = samlEndpoints.testConfig;
17124
- return request(client, method, path6, { body: input });
17207
+ const { method, path: path7 } = samlEndpoints.testConfig;
17208
+ return request(client, method, path7, { body: input });
17125
17209
  };
17126
17210
  templates = (client) => {
17127
- const { method, path: path6 } = samlEndpoints.listTemplates;
17128
- return request(client, method, path6);
17211
+ const { method, path: path7 } = samlEndpoints.listTemplates;
17212
+ return request(client, method, path7);
17129
17213
  };
17130
17214
  nameIdFormats = (client) => {
17131
- const { method, path: path6 } = samlEndpoints.listNameIdFormats;
17132
- return request(client, method, path6);
17215
+ const { method, path: path7 } = samlEndpoints.listNameIdFormats;
17216
+ return request(client, method, path7);
17133
17217
  };
17134
17218
  signatureAlgorithms = (client) => {
17135
- const { method, path: path6 } = samlEndpoints.listSignatureAlgorithms;
17136
- return request(client, method, path6);
17219
+ const { method, path: path7 } = samlEndpoints.listSignatureAlgorithms;
17220
+ return request(client, method, path7);
17137
17221
  };
17138
17222
  }
17139
17223
  });
@@ -17183,8 +17267,8 @@ var init_search3 = __esm({
17183
17267
  init_dist();
17184
17268
  init_http();
17185
17269
  analytics = (client, projectId, options) => {
17186
- const { method, path: path6 } = searchEndpoints.getAnalytics;
17187
- return request(client, method, interpolatePath(path6, { projectId }), {
17270
+ const { method, path: path7 } = searchEndpoints.getAnalytics;
17271
+ return request(client, method, interpolatePath(path7, { projectId }), {
17188
17272
  query: {
17189
17273
  namespace: options?.namespace,
17190
17274
  dateFrom: options?.dateFrom,
@@ -17193,14 +17277,14 @@ var init_search3 = __esm({
17193
17277
  });
17194
17278
  };
17195
17279
  stats4 = (client, projectId, namespace) => {
17196
- const { method, path: path6 } = searchEndpoints.getStats;
17197
- return request(client, method, interpolatePath(path6, { projectId }), {
17280
+ const { method, path: path7 } = searchEndpoints.getStats;
17281
+ return request(client, method, interpolatePath(path7, { projectId }), {
17198
17282
  query: { namespace }
17199
17283
  });
17200
17284
  };
17201
17285
  listDocuments = (client, projectId, options) => {
17202
- const { method, path: path6 } = searchEndpoints.listDocuments;
17203
- return request(client, method, interpolatePath(path6, { projectId }), {
17286
+ const { method, path: path7 } = searchEndpoints.listDocuments;
17287
+ return request(client, method, interpolatePath(path7, { projectId }), {
17204
17288
  query: {
17205
17289
  namespace: options?.namespace,
17206
17290
  limit: options?.limit !== void 0 ? String(options.limit) : void 0,
@@ -17229,8 +17313,8 @@ var init_secrets2 = __esm({
17229
17313
  init_dist();
17230
17314
  init_http();
17231
17315
  list21 = (client, projectId, options) => {
17232
- const { method, path: path6 } = secretsEndpoints.list;
17233
- return request(client, method, path6, {
17316
+ const { method, path: path7 } = secretsEndpoints.list;
17317
+ return request(client, method, path7, {
17234
17318
  query: {
17235
17319
  projectId,
17236
17320
  environmentId: options?.environmentId,
@@ -17239,30 +17323,30 @@ var init_secrets2 = __esm({
17239
17323
  });
17240
17324
  };
17241
17325
  get10 = (client, id, options) => {
17242
- const { method, path: path6 } = secretsEndpoints.get;
17243
- return request(client, method, path6, {
17326
+ const { method, path: path7 } = secretsEndpoints.get;
17327
+ return request(client, method, path7, {
17244
17328
  query: { id, reveal: options?.reveal ? "true" : void 0 }
17245
17329
  });
17246
17330
  };
17247
17331
  create15 = (client, input) => {
17248
- const { method, path: path6 } = secretsEndpoints.create;
17249
- return request(client, method, path6, { body: input });
17332
+ const { method, path: path7 } = secretsEndpoints.create;
17333
+ return request(client, method, path7, { body: input });
17250
17334
  };
17251
17335
  update6 = (client, input) => {
17252
- const { method, path: path6 } = secretsEndpoints.update;
17253
- return request(client, method, path6, { body: input });
17336
+ const { method, path: path7 } = secretsEndpoints.update;
17337
+ return request(client, method, path7, { body: input });
17254
17338
  };
17255
17339
  _delete12 = (client, id) => {
17256
- const { method, path: path6 } = secretsEndpoints.delete;
17257
- return request(client, method, path6, { body: { id } });
17340
+ const { method, path: path7 } = secretsEndpoints.delete;
17341
+ return request(client, method, path7, { body: { id } });
17258
17342
  };
17259
17343
  rollback2 = (client, id, version6) => {
17260
- const { method, path: path6 } = secretsEndpoints.rollback;
17261
- return request(client, method, path6, { body: { id, version: version6 } });
17344
+ const { method, path: path7 } = secretsEndpoints.rollback;
17345
+ return request(client, method, path7, { body: { id, version: version6 } });
17262
17346
  };
17263
17347
  stats5 = (client, projectId) => {
17264
- const { method, path: path6 } = secretsEndpoints.stats;
17265
- return request(client, method, path6, { query: { projectId } });
17348
+ const { method, path: path7 } = secretsEndpoints.stats;
17349
+ return request(client, method, path7, { query: { projectId } });
17266
17350
  };
17267
17351
  }
17268
17352
  });
@@ -17280,12 +17364,12 @@ var init_security3 = __esm({
17280
17364
  init_dist();
17281
17365
  init_http();
17282
17366
  requestEmailChange = (client, body) => {
17283
- const { method, path: path6 } = securityEndpoints.email.requestChange;
17284
- return request(client, method, path6, { body });
17367
+ const { method, path: path7 } = securityEndpoints.email.requestChange;
17368
+ return request(client, method, path7, { body });
17285
17369
  };
17286
17370
  confirmEmailChange = (client, body) => {
17287
- const { method, path: path6 } = securityEndpoints.email.confirmChange;
17288
- return request(client, method, path6, { body });
17371
+ const { method, path: path7 } = securityEndpoints.email.confirmChange;
17372
+ return request(client, method, path7, { body });
17289
17373
  };
17290
17374
  }
17291
17375
  });
@@ -17352,26 +17436,26 @@ var init_serviceTokens = __esm({
17352
17436
  init_dist();
17353
17437
  init_http();
17354
17438
  list23 = (client, orgId, options) => {
17355
- const { method, path: path6 } = serviceTokensEndpoints.list;
17356
- return request(client, method, interpolatePath(path6, { orgId }), {
17439
+ const { method, path: path7 } = serviceTokensEndpoints.list;
17440
+ return request(client, method, interpolatePath(path7, { orgId }), {
17357
17441
  query: { includeRevoked: options?.includeRevoked ? "true" : void 0 }
17358
17442
  });
17359
17443
  };
17360
17444
  create16 = (client, orgId, input) => {
17361
- const { method, path: path6 } = serviceTokensEndpoints.create;
17362
- return request(client, method, interpolatePath(path6, { orgId }), { body: input });
17445
+ const { method, path: path7 } = serviceTokensEndpoints.create;
17446
+ return request(client, method, interpolatePath(path7, { orgId }), { body: input });
17363
17447
  };
17364
17448
  get12 = (client, orgId, tokenId) => {
17365
- const { method, path: path6 } = serviceTokensEndpoints.get;
17366
- return request(client, method, interpolatePath(path6, { orgId, tokenId }));
17449
+ const { method, path: path7 } = serviceTokensEndpoints.get;
17450
+ return request(client, method, interpolatePath(path7, { orgId, tokenId }));
17367
17451
  };
17368
17452
  revoke = (client, orgId, tokenId) => {
17369
- const { method, path: path6 } = serviceTokensEndpoints.revoke;
17370
- return request(client, method, interpolatePath(path6, { orgId, tokenId }));
17453
+ const { method, path: path7 } = serviceTokensEndpoints.revoke;
17454
+ return request(client, method, interpolatePath(path7, { orgId, tokenId }));
17371
17455
  };
17372
17456
  rotate2 = (client, orgId, tokenId) => {
17373
- const { method, path: path6 } = serviceTokensEndpoints.rotate;
17374
- return request(client, method, interpolatePath(path6, { orgId, tokenId }));
17457
+ const { method, path: path7 } = serviceTokensEndpoints.rotate;
17458
+ return request(client, method, interpolatePath(path7, { orgId, tokenId }));
17375
17459
  };
17376
17460
  }
17377
17461
  });
@@ -17498,52 +17582,52 @@ var init_user2 = __esm({
17498
17582
  init_dist();
17499
17583
  init_http();
17500
17584
  whoami = (client) => {
17501
- const { method, path: path6 } = usersEndpoints.whoami;
17502
- return request(client, method, path6);
17585
+ const { method, path: path7 } = usersEndpoints.whoami;
17586
+ return request(client, method, path7);
17503
17587
  };
17504
17588
  getProfile = (client) => {
17505
- const { method, path: path6 } = usersEndpoints.getProfile;
17506
- return request(client, method, path6);
17589
+ const { method, path: path7 } = usersEndpoints.getProfile;
17590
+ return request(client, method, path7);
17507
17591
  };
17508
17592
  updateProfile = (client, body) => {
17509
- const { method, path: path6 } = usersEndpoints.updateProfile;
17510
- return request(client, method, path6, { body });
17593
+ const { method, path: path7 } = usersEndpoints.updateProfile;
17594
+ return request(client, method, path7, { body });
17511
17595
  };
17512
17596
  getSecurity = (client) => {
17513
- const { method, path: path6 } = usersEndpoints.getSecurity;
17514
- return request(client, method, path6);
17597
+ const { method, path: path7 } = usersEndpoints.getSecurity;
17598
+ return request(client, method, path7);
17515
17599
  };
17516
17600
  changePassword = (client, body) => {
17517
- const { method, path: path6 } = usersEndpoints.changePassword;
17518
- return request(client, method, path6, { body });
17601
+ const { method, path: path7 } = usersEndpoints.changePassword;
17602
+ return request(client, method, path7, { body });
17519
17603
  };
17520
17604
  getConnectedAccounts = (client) => {
17521
- const { method, path: path6 } = usersEndpoints.getConnectedAccounts;
17522
- return request(client, method, path6);
17605
+ const { method, path: path7 } = usersEndpoints.getConnectedAccounts;
17606
+ return request(client, method, path7);
17523
17607
  };
17524
17608
  getLoginHistory = (client) => {
17525
- const { method, path: path6 } = usersEndpoints.getLoginHistory;
17526
- return request(client, method, path6);
17609
+ const { method, path: path7 } = usersEndpoints.getLoginHistory;
17610
+ return request(client, method, path7);
17527
17611
  };
17528
17612
  getSessions = (client) => {
17529
- const { method, path: path6 } = usersEndpoints.getSessions;
17530
- return request(client, method, path6);
17613
+ const { method, path: path7 } = usersEndpoints.getSessions;
17614
+ return request(client, method, path7);
17531
17615
  };
17532
17616
  revokeSession = (client, sessionId) => {
17533
- const { method, path: path6 } = usersEndpoints.revokeSession;
17534
- return request(client, method, interpolatePath(path6, { sessionId }));
17617
+ const { method, path: path7 } = usersEndpoints.revokeSession;
17618
+ return request(client, method, interpolatePath(path7, { sessionId }));
17535
17619
  };
17536
17620
  revokeAllSessions = (client) => {
17537
- const { method, path: path6 } = usersEndpoints.revokeAllSessions;
17538
- return request(client, method, path6);
17621
+ const { method, path: path7 } = usersEndpoints.revokeAllSessions;
17622
+ return request(client, method, path7);
17539
17623
  };
17540
17624
  exportData = (client) => {
17541
- const { method, path: path6 } = usersEndpoints.exportData;
17542
- return request(client, method, path6);
17625
+ const { method, path: path7 } = usersEndpoints.exportData;
17626
+ return request(client, method, path7);
17543
17627
  };
17544
17628
  deleteAccount = (client, body = { confirmEmail: "" }) => {
17545
- const { method, path: path6 } = usersEndpoints.deleteAccount;
17546
- return request(client, method, path6, { body });
17629
+ const { method, path: path7 } = usersEndpoints.deleteAccount;
17630
+ return request(client, method, path7, { body });
17547
17631
  };
17548
17632
  }
17549
17633
  });
@@ -17560,8 +17644,8 @@ var init_users2 = __esm({
17560
17644
  init_dist();
17561
17645
  init_http();
17562
17646
  whoami2 = (client) => {
17563
- const { method, path: path6 } = usersEndpoints.whoami;
17564
- return request(client, method, path6);
17647
+ const { method, path: path7 } = usersEndpoints.whoami;
17648
+ return request(client, method, path7);
17565
17649
  };
17566
17650
  }
17567
17651
  });
@@ -17592,15 +17676,15 @@ var init_volumes = __esm({
17592
17676
  init_dist();
17593
17677
  init_http();
17594
17678
  list27 = async (client, _projectId) => {
17595
- const { method, path: path6 } = resourcesEndpoints.list;
17596
- const res = await request(client, method, path6, {
17679
+ const { method, path: path7 } = resourcesEndpoints.list;
17680
+ const res = await request(client, method, path7, {
17597
17681
  query: { kind: "volume" }
17598
17682
  });
17599
17683
  return (Array.isArray(res) ? res : res.data ?? []).map(toVolume);
17600
17684
  };
17601
17685
  create19 = (client, _projectId, input) => {
17602
- const { method, path: path6 } = resourcesEndpoints.create;
17603
- return request(client, method, path6, {
17686
+ const { method, path: path7 } = resourcesEndpoints.create;
17687
+ return request(client, method, path7, {
17604
17688
  body: {
17605
17689
  kind: "volume",
17606
17690
  name: input.name,
@@ -17612,8 +17696,8 @@ var init_volumes = __esm({
17612
17696
  }).then((resource) => ({ volume: toVolume(resource) }));
17613
17697
  };
17614
17698
  _delete17 = (client, _projectId, volId) => {
17615
- const { method, path: path6 } = resourcesEndpoints.delete;
17616
- return request(client, method, interpolatePath(path6, { id: volId }));
17699
+ const { method, path: path7 } = resourcesEndpoints.delete;
17700
+ return request(client, method, interpolatePath(path7, { id: volId }));
17617
17701
  };
17618
17702
  }
17619
17703
  });
@@ -17811,7 +17895,7 @@ var init_env_flags = __esm({
17811
17895
  { name: "SYLPHX_TOKEN", purpose: "CI / agent auth \u2014 service-token or OAuth access JWT" },
17812
17896
  {
17813
17897
  name: "SYLPHX_TOKEN_FILE",
17814
- purpose: "Read CI / agent auth token from a local file; wins over stored OAuth"
17898
+ purpose: "CI / agent auth \u2014 path to a raw token or SYLPHX_TOKEN=... secret file"
17815
17899
  },
17816
17900
  {
17817
17901
  name: "SYLPHX_API_URL",
@@ -18160,89 +18244,83 @@ var init_ids2 = __esm({
18160
18244
  });
18161
18245
 
18162
18246
  // src/utils/auth-source.ts
18163
- import { existsSync, readFileSync } from "fs";
18164
- import { homedir } from "os";
18165
- import { resolve } from "path";
18166
- function resolveAuthToken() {
18167
- const envToken = normalizeToken(process.env[AUTH_ENV_VAR]);
18168
- if (envToken) {
18169
- return { source: "env", token: envToken };
18247
+ import fs2 from "fs";
18248
+ import os2 from "os";
18249
+ import path2 from "path";
18250
+ function normalizeToken(raw) {
18251
+ const token = raw?.trim();
18252
+ return token && token.length > 0 ? token : void 0;
18253
+ }
18254
+ function stripShellQuotes(value) {
18255
+ const trimmed = value.trim();
18256
+ if (trimmed.length >= 2) {
18257
+ const first = trimmed[0];
18258
+ const last = trimmed[trimmed.length - 1];
18259
+ if (first === '"' && last === '"' || first === "'" && last === "'") {
18260
+ return trimmed.slice(1, -1).trim();
18261
+ }
18170
18262
  }
18171
- const tokenFile = process.env[AUTH_TOKEN_FILE_ENV_VAR]?.trim();
18172
- if (tokenFile) {
18173
- const tokenFilePath = expandHome(tokenFile);
18174
- const tokenFromFile = readTokenFile(tokenFilePath);
18175
- if (tokenFromFile.token) {
18176
- return { source: "token-file", token: tokenFromFile.token, tokenFilePath };
18263
+ return trimmed;
18264
+ }
18265
+ function resolveTokenFilePath(filePath) {
18266
+ if (filePath === "~") return os2.homedir();
18267
+ if (filePath.startsWith("~/")) return path2.join(os2.homedir(), filePath.slice(2));
18268
+ return path2.resolve(filePath);
18269
+ }
18270
+ function parseAuthTokenFile(raw) {
18271
+ for (const line of raw.split(/\r?\n/)) {
18272
+ const trimmed = line.trim();
18273
+ if (!trimmed || trimmed.startsWith("#")) continue;
18274
+ const exportMatch = /^export\s+SYLPHX_TOKEN\s*=\s*(.*)$/.exec(trimmed);
18275
+ if (exportMatch) return normalizeToken(stripShellQuotes(exportMatch[1] ?? ""));
18276
+ const envMatch = /^SYLPHX_TOKEN\s*=\s*(.*)$/.exec(trimmed);
18277
+ if (envMatch) return normalizeToken(stripShellQuotes(envMatch[1] ?? ""));
18278
+ if (!trimmed.includes("=") && !/\s/.test(trimmed)) return normalizeToken(trimmed);
18279
+ }
18280
+ return void 0;
18281
+ }
18282
+ function resolveAuthTokenFile(filePath) {
18283
+ const resolved = resolveTokenFilePath(filePath);
18284
+ try {
18285
+ const token = parseAuthTokenFile(fs2.readFileSync(resolved, "utf8"));
18286
+ if (!token) {
18287
+ return {
18288
+ source: "token-file",
18289
+ token: void 0,
18290
+ tokenFilePath: resolved,
18291
+ error: `${AUTH_TOKEN_FILE_ENV_VAR} did not contain ${AUTH_ENV_VAR}`
18292
+ };
18177
18293
  }
18294
+ return { source: "token-file", token, tokenFilePath: resolved };
18295
+ } catch (err) {
18296
+ const detail = err instanceof Error ? err.message : String(err);
18178
18297
  return {
18179
18298
  source: "token-file",
18180
18299
  token: void 0,
18181
- tokenFilePath,
18182
- error: tokenFromFile.error ?? `${AUTH_TOKEN_FILE_ENV_VAR} did not contain a token`
18300
+ tokenFilePath: resolved,
18301
+ error: `${AUTH_TOKEN_FILE_ENV_VAR} is unreadable: ${detail}`
18183
18302
  };
18184
18303
  }
18304
+ }
18305
+ function resolveAuthToken() {
18306
+ const envToken = normalizeToken(process.env[AUTH_ENV_VAR]);
18307
+ if (envToken) return { source: "env", token: envToken };
18308
+ const tokenFile = process.env[AUTH_TOKEN_FILE_ENV_VAR]?.trim();
18309
+ if (tokenFile) return resolveAuthTokenFile(tokenFile);
18185
18310
  const stored = config.getAccessToken();
18186
18311
  if (stored) return { source: "session", token: stored };
18187
18312
  return { source: "none", token: void 0 };
18188
18313
  }
18189
18314
  function isExternalAuthActive() {
18190
- const auth = resolveAuthToken();
18191
- return auth.source === "env" || auth.source === "token-file";
18315
+ if (normalizeToken(process.env[AUTH_ENV_VAR])) return true;
18316
+ return Boolean(process.env[AUTH_TOKEN_FILE_ENV_VAR]?.trim());
18192
18317
  }
18193
18318
  function unauthenticatedMessage(auth = resolveAuthToken()) {
18194
- if (auth.source === "token-file") {
18195
- const detail = auth.error ? ` ${auth.error}.` : "";
18196
- const where = auth.tokenFilePath ? ` (${auth.tokenFilePath})` : "";
18197
- return [
18198
- `Not authenticated. ${AUTH_TOKEN_FILE_ENV_VAR}${where} could not be used.${detail}`,
18199
- `Set ${AUTH_ENV_VAR}, fix ${AUTH_TOKEN_FILE_ENV_VAR}, or run \`sylphx login\` first.`
18200
- ].join(" ");
18319
+ if (auth.error) {
18320
+ return `${auth.error}. Fix ${AUTH_TOKEN_FILE_ENV_VAR} or unset it; otherwise set ${AUTH_ENV_VAR} or run \`sylphx login\`.`;
18201
18321
  }
18202
18322
  return `Not authenticated. Set \`${AUTH_ENV_VAR}\`, set \`${AUTH_TOKEN_FILE_ENV_VAR}\`, or run \`sylphx login\` first.`;
18203
18323
  }
18204
- function normalizeToken(raw) {
18205
- const token = raw?.trim();
18206
- return token && token.length > 0 ? token : void 0;
18207
- }
18208
- function expandHome(value) {
18209
- if (value === "~") return homedir();
18210
- if (value.startsWith("~/")) return resolve(homedir(), value.slice(2));
18211
- return resolve(value);
18212
- }
18213
- function readTokenFile(tokenFilePath) {
18214
- try {
18215
- if (!existsSync(tokenFilePath)) {
18216
- return { error: "file does not exist" };
18217
- }
18218
- const contents = readFileSync(tokenFilePath, "utf8");
18219
- const token = parseTokenFile(contents);
18220
- return token ? { token } : { error: "file is empty or missing SYLPHX_TOKEN" };
18221
- } catch (err) {
18222
- const reason = err instanceof Error ? err.message : String(err);
18223
- return { error: `file could not be read: ${reason}` };
18224
- }
18225
- }
18226
- function parseTokenFile(contents) {
18227
- const lines = contents.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#"));
18228
- for (const line of lines) {
18229
- const match = /^(?:export\s+)?SYLPHX_TOKEN\s*=\s*(?<value>.*)$/u.exec(line);
18230
- const value = match?.groups?.value;
18231
- const token = normalizeToken(value ? unquote(value) : void 0);
18232
- if (token) return token;
18233
- }
18234
- if (lines.length === 1 && !/^[A-Z_][A-Z0-9_]*\s*=/u.test(lines[0])) {
18235
- return normalizeToken(unquote(lines[0]));
18236
- }
18237
- return void 0;
18238
- }
18239
- function unquote(value) {
18240
- const trimmed = value.trim();
18241
- if (trimmed.startsWith('"') && trimmed.endsWith('"') || trimmed.startsWith("'") && trimmed.endsWith("'")) {
18242
- return trimmed.slice(1, -1);
18243
- }
18244
- return trimmed;
18245
- }
18246
18324
  var AUTH_ENV_VAR, AUTH_TOKEN_FILE_ENV_VAR;
18247
18325
  var init_auth_source = __esm({
18248
18326
  "src/utils/auth-source.ts"() {
@@ -18309,8 +18387,8 @@ var init_baas_url = __esm({
18309
18387
  });
18310
18388
 
18311
18389
  // src/utils/oauth-refresh.ts
18312
- import fs2 from "fs";
18313
- import path2 from "path";
18390
+ import fs3 from "fs";
18391
+ import path3 from "path";
18314
18392
  import { Cause, Data, Effect, Exit, ParseResult } from "effect";
18315
18393
  function refreshBaseUrl() {
18316
18394
  return resolveBaasUrl();
@@ -18388,16 +18466,16 @@ function rotate3(refreshToken) {
18388
18466
  );
18389
18467
  }
18390
18468
  function sleep(ms) {
18391
- return new Promise((resolve3) => setTimeout(resolve3, ms));
18469
+ return new Promise((resolve2) => setTimeout(resolve2, ms));
18392
18470
  }
18393
18471
  function refreshLockDir() {
18394
18472
  return `${config.getConfigPath()}.refresh.lock`;
18395
18473
  }
18396
18474
  function tryAcquireRefreshLock(lockDir) {
18397
18475
  try {
18398
- fs2.mkdirSync(lockDir, { mode: 448 });
18399
- fs2.writeFileSync(
18400
- path2.join(lockDir, "owner.json"),
18476
+ fs3.mkdirSync(lockDir, { mode: 448 });
18477
+ fs3.writeFileSync(
18478
+ path3.join(lockDir, "owner.json"),
18401
18479
  JSON.stringify({ pid: process.pid, createdAt: (/* @__PURE__ */ new Date()).toISOString() }),
18402
18480
  { mode: 384 }
18403
18481
  );
@@ -18409,9 +18487,9 @@ function tryAcquireRefreshLock(lockDir) {
18409
18487
  }
18410
18488
  function removeStaleRefreshLock(lockDir) {
18411
18489
  try {
18412
- const stat = fs2.statSync(lockDir);
18490
+ const stat = fs3.statSync(lockDir);
18413
18491
  if (Date.now() - stat.mtimeMs < REFRESH_LOCK_STALE_MS) return false;
18414
- fs2.rmSync(lockDir, { recursive: true, force: true });
18492
+ fs3.rmSync(lockDir, { recursive: true, force: true });
18415
18493
  return true;
18416
18494
  } catch (err) {
18417
18495
  if (err.code === "ENOENT") return true;
@@ -18420,7 +18498,7 @@ function removeStaleRefreshLock(lockDir) {
18420
18498
  }
18421
18499
  async function withRefreshLock(fn) {
18422
18500
  const lockDir = refreshLockDir();
18423
- fs2.mkdirSync(path2.dirname(lockDir), { recursive: true, mode: 448 });
18501
+ fs3.mkdirSync(path3.dirname(lockDir), { recursive: true, mode: 448 });
18424
18502
  const startedAt = Date.now();
18425
18503
  let acquired = false;
18426
18504
  while (!acquired) {
@@ -18435,7 +18513,7 @@ async function withRefreshLock(fn) {
18435
18513
  try {
18436
18514
  return await fn();
18437
18515
  } finally {
18438
- fs2.rmSync(lockDir, { recursive: true, force: true });
18516
+ fs3.rmSync(lockDir, { recursive: true, force: true });
18439
18517
  }
18440
18518
  }
18441
18519
  function rotateAndPersist(refreshToken) {
@@ -18589,7 +18667,7 @@ async function withFreshAuth(fn) {
18589
18667
  function withClient(fn) {
18590
18668
  return withFreshAuth(() => fn(getClient()));
18591
18669
  }
18592
- async function authedFetch(path6, init = {}) {
18670
+ async function authedFetch(path7, init = {}) {
18593
18671
  return withFreshAuth(async () => {
18594
18672
  const auth = resolveAuthToken();
18595
18673
  const { token } = auth;
@@ -18597,7 +18675,7 @@ async function authedFetch(path6, init = {}) {
18597
18675
  throw new ApiError2(401, unauthenticatedMessage(auth));
18598
18676
  }
18599
18677
  const root2 = getManagementApiRoot();
18600
- const url = `${root2}${path6.startsWith("/") ? path6 : `/${path6}`}`;
18678
+ const url = `${root2}${path7.startsWith("/") ? path7 : `/${path7}`}`;
18601
18679
  const method = init.method ?? "GET";
18602
18680
  const headers = new Headers(init.headers);
18603
18681
  headers.set("Authorization", `Bearer ${token}`);
@@ -19692,9 +19770,9 @@ var ApiServiceLive = Layer2.succeed(ApiService, {
19692
19770
  */
19693
19771
  getOrgBillingSnapshot: Effect6.tryPromise({
19694
19772
  try: async () => {
19695
- const pluckOr404 = async (path6, fallback) => {
19773
+ const pluckOr404 = async (path7, fallback) => {
19696
19774
  try {
19697
- return await authedFetch(path6);
19775
+ return await authedFetch(path7);
19698
19776
  } catch (err) {
19699
19777
  if (err instanceof ApiError2 && err.status === 404) return fallback;
19700
19778
  throw err;
@@ -19883,7 +19961,7 @@ var requireAuthEffect = Effect8.gen(
19883
19961
  unauthenticatedMessage(auth),
19884
19962
  "",
19885
19963
  ` CI / agents: export ${AUTH_ENV_VAR}=svc_\u2026 (or an OAuth access JWT)`,
19886
- ` Local agent fleets: export ${AUTH_TOKEN_FILE_ENV_VAR}=~/.config/sylphx/agent.token`,
19964
+ ` Agent secret file: export ${AUTH_TOKEN_FILE_ENV_VAR}=~/.sylphx/agent-token.env`,
19887
19965
  " Interactive: run `sylphx login`",
19888
19966
  "",
19889
19967
  "See ADR-089 \xA72.10 for the agent auth contract."
@@ -21773,7 +21851,7 @@ var aiCommand = Command3.make(
21773
21851
  // src/programs/analytics.ts
21774
21852
  init_dist2();
21775
21853
  init_api();
21776
- import { readFileSync as readFileSync2 } from "fs";
21854
+ import { readFileSync } from "fs";
21777
21855
  import { Args as Args3, Command as Command4, Options as Options5 } from "@effect/cli";
21778
21856
  import { Console as Console5, Effect as Effect12 } from "effect";
21779
21857
  init_chalk();
@@ -21844,7 +21922,7 @@ function analyticsDestinationsAddEffect(opts) {
21844
21922
  yield* requireAuthEffect;
21845
21923
  const projectId = yield* resolveProjectIdEffect2(opts.project);
21846
21924
  const credentials = yield* Effect12.try({
21847
- try: () => JSON.parse(readFileSync2(opts.credentialsFile, "utf8")),
21925
+ try: () => JSON.parse(readFileSync(opts.credentialsFile, "utf8")),
21848
21926
  catch: (cause) => new CliArgError({
21849
21927
  command: "analytics",
21850
21928
  argument: "--credentials",
@@ -22028,7 +22106,7 @@ var analyticsCommand = Command4.make(
22028
22106
  // src/programs/api.ts
22029
22107
  init_api();
22030
22108
  init_effect_io();
22031
- import * as fs3 from "fs";
22109
+ import * as fs4 from "fs";
22032
22110
  import { Args as Args4, Command as Command5, Options as Options6 } from "@effect/cli";
22033
22111
  import { Effect as Effect13, Option } from "effect";
22034
22112
  var HTTP_METHODS = ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE"];
@@ -22044,7 +22122,7 @@ async function readBody(input) {
22044
22122
  if (input === "-") {
22045
22123
  return Bun.stdin.text();
22046
22124
  }
22047
- return fs3.promises.readFile(input, "utf8");
22125
+ return fs4.promises.readFile(input, "utf8");
22048
22126
  }
22049
22127
  var methodArg = Args4.text({ name: "method" }).pipe(
22050
22128
  Args4.withDescription("HTTP method (GET / HEAD / POST / PUT / PATCH / DELETE)")
@@ -22101,14 +22179,14 @@ function apiEffect(opts) {
22101
22179
  message: `failed to read --input: ${cause instanceof Error ? cause.message : String(cause)}`
22102
22180
  })
22103
22181
  }) : void 0;
22104
- const path6 = opts.path.startsWith("/") ? opts.path : `/${opts.path}`;
22182
+ const path7 = opts.path.startsWith("/") ? opts.path : `/${opts.path}`;
22105
22183
  const init = {
22106
22184
  method,
22107
22185
  ...body !== void 0 ? { body, headers: { "Content-Type": "application/json" } } : {}
22108
22186
  };
22109
22187
  const result = yield* Effect13.tryPromise({
22110
22188
  try: async () => {
22111
- const res = await authedFetch(path6, init);
22189
+ const res = await authedFetch(path7, init);
22112
22190
  return res;
22113
22191
  },
22114
22192
  catch: (cause) => {
@@ -22496,19 +22574,19 @@ function billingInvoicesDownloadEffect(opts) {
22496
22574
  catch: wrap5
22497
22575
  })
22498
22576
  );
22499
- const fs7 = yield* FileSystem.FileSystem;
22577
+ const fs8 = yield* FileSystem.FileSystem;
22500
22578
  const fallbackName = `invoice-${opts.invoiceId}.json`;
22501
- const path6 = opts.output ?? fallbackName;
22502
- yield* fs7.writeFileString(path6, JSON.stringify(detail, null, 2)).pipe(
22579
+ const path7 = opts.output ?? fallbackName;
22580
+ yield* fs8.writeFileString(path7, JSON.stringify(detail, null, 2)).pipe(
22503
22581
  Effect15.mapError(
22504
22582
  (cause) => new CliCommandError({
22505
22583
  command: "billing",
22506
22584
  reason: "unexpected",
22507
- message: `Failed to write ${path6}: ${String(cause)}`
22585
+ message: `Failed to write ${path7}: ${String(cause)}`
22508
22586
  })
22509
22587
  )
22510
22588
  );
22511
- yield* Console7.log(chalk_default.green(`\u2713 Saved invoice detail to ${chalk_default.bold(path6)}`));
22589
+ yield* Console7.log(chalk_default.green(`\u2713 Saved invoice detail to ${chalk_default.bold(path7)}`));
22512
22590
  if (!opts.output) {
22513
22591
  yield* Console7.log(chalk_default.dim(" (server does not yet emit PDF; JSON detail written instead)"));
22514
22592
  }
@@ -22791,10 +22869,10 @@ function certsAddEffect(opts) {
22791
22869
  return Effect17.gen(function* () {
22792
22870
  yield* requireAuthEffect;
22793
22871
  const link = yield* requireLinkedAppEffect;
22794
- const fs7 = yield* FileSystem2.FileSystem;
22872
+ const fs8 = yield* FileSystem2.FileSystem;
22795
22873
  const api2 = yield* ApiService;
22796
22874
  const projectId = opts.project ?? link.appId;
22797
- const read = (p) => fs7.readFileString(p).pipe(
22875
+ const read = (p) => fs8.readFileString(p).pipe(
22798
22876
  Effect17.mapError(
22799
22877
  (cause) => new CliCommandError({
22800
22878
  command: "certs",
@@ -22923,7 +23001,7 @@ init_api_url();
22923
23001
  init_chalk();
22924
23002
  init_effect_io();
22925
23003
  import { execSync } from "child_process";
22926
- import { existsSync as existsSync2, mkdirSync, writeFileSync } from "fs";
23004
+ import { existsSync, mkdirSync, writeFileSync } from "fs";
22927
23005
  import { dirname, join } from "path";
22928
23006
  import { Args as Args9, Command as Command11, Options as Options12 } from "@effect/cli";
22929
23007
  import { Console as Console11, Effect as Effect19 } from "effect";
@@ -23112,7 +23190,7 @@ function ciInitEffect(input) {
23112
23190
  );
23113
23191
  }
23114
23192
  const target = join(cwd, filename);
23115
- if (existsSync2(target) && !input.force) {
23193
+ if (existsSync(target) && !input.force) {
23116
23194
  return yield* Effect19.fail(
23117
23195
  new CliArgError({
23118
23196
  command: "ci",
@@ -23152,7 +23230,7 @@ function ciInitEffect(input) {
23152
23230
  writeFileSync(target, content);
23153
23231
  if (provider === "github") {
23154
23232
  const previewPath = join(cwd, ".github/workflows/deploy-preview.yml");
23155
- if (!existsSync2(previewPath) || input.force) {
23233
+ if (!existsSync(previewPath) || input.force) {
23156
23234
  writeFileSync(previewPath, githubPreviewWorkflow(input.env));
23157
23235
  }
23158
23236
  }
@@ -23249,7 +23327,7 @@ import { Console as Console12, Effect as Effect21 } from "effect";
23249
23327
 
23250
23328
  // src/lib/manifest.ts
23251
23329
  init_dist();
23252
- import { Data as Data3, Effect as Effect20, Either, ParseResult as ParseResult2, Schema as Schema113 } from "effect";
23330
+ import { Data as Data3, Effect as Effect20, Either, ParseResult as ParseResult2, Schema as Schema114 } from "effect";
23253
23331
  var MANIFEST_FILENAME = "sylphx.toml";
23254
23332
  var ManifestFileNotFoundError = class extends Data3.TaggedError("ManifestFileNotFoundError") {
23255
23333
  get message() {
@@ -23274,9 +23352,9 @@ function resolveManifestPath(explicit, cwd = process.cwd()) {
23274
23352
  }
23275
23353
  return `${cwd}/${MANIFEST_FILENAME}`;
23276
23354
  }
23277
- function manifestExistsSync(path6) {
23355
+ function manifestExistsSync(path7) {
23278
23356
  try {
23279
- return Bun.file(path6).size > 0;
23357
+ return Bun.file(path7).size > 0;
23280
23358
  } catch {
23281
23359
  return false;
23282
23360
  }
@@ -23301,19 +23379,19 @@ function formatPath(trail) {
23301
23379
  }
23302
23380
  return out;
23303
23381
  }
23304
- function parseTomlEffect(source, path6) {
23382
+ function parseTomlEffect(source, path7) {
23305
23383
  return Effect20.try({
23306
23384
  // Bun's built-in TOML parser. Returns a plain JS object; throws on
23307
23385
  // syntax errors with a line/col hint in the message.
23308
23386
  try: () => Bun.TOML.parse(source),
23309
23387
  catch: (cause) => {
23310
23388
  const msg = cause instanceof Error ? cause.message : String(cause);
23311
- return new ManifestParseError({ path: path6, line: extractLine(msg), cause: msg });
23389
+ return new ManifestParseError({ path: path7, line: extractLine(msg), cause: msg });
23312
23390
  }
23313
23391
  });
23314
23392
  }
23315
- function validateManifestEffect(parsed, path6) {
23316
- const either = Schema113.decodeUnknownEither(SylphxManifest, {
23393
+ function validateManifestEffect(parsed, path7) {
23394
+ const either = Schema114.decodeUnknownEither(SylphxManifest, {
23317
23395
  errors: "all",
23318
23396
  // Reject typos + unknown keys so users catch mistakes locally rather
23319
23397
  // than having the server silently drop fields on apply.
@@ -23323,27 +23401,27 @@ function validateManifestEffect(parsed, path6) {
23323
23401
  const parseErr = either.left;
23324
23402
  const pretty = ParseResult2.TreeFormatter.formatErrorSync(parseErr);
23325
23403
  const issues = flattenIssues(parseErr);
23326
- return Effect20.fail(new ManifestValidationError({ path: path6, pretty, issues }));
23404
+ return Effect20.fail(new ManifestValidationError({ path: path7, pretty, issues }));
23327
23405
  }
23328
23406
  function loadManifestEffect(explicitPath, cwd = process.cwd()) {
23329
23407
  return Effect20.gen(function* () {
23330
- const path6 = resolveManifestPath(explicitPath, cwd);
23331
- const file = Bun.file(path6);
23408
+ const path7 = resolveManifestPath(explicitPath, cwd);
23409
+ const file = Bun.file(path7);
23332
23410
  const exists = yield* Effect20.tryPromise({
23333
23411
  try: () => file.exists(),
23334
- catch: () => new ManifestFileNotFoundError({ path: path6 })
23412
+ catch: () => new ManifestFileNotFoundError({ path: path7 })
23335
23413
  });
23336
- if (!exists) return yield* Effect20.fail(new ManifestFileNotFoundError({ path: path6 }));
23414
+ if (!exists) return yield* Effect20.fail(new ManifestFileNotFoundError({ path: path7 }));
23337
23415
  const source = yield* Effect20.tryPromise({
23338
23416
  try: () => file.text(),
23339
23417
  catch: (cause) => new ManifestParseError({
23340
- path: path6,
23418
+ path: path7,
23341
23419
  cause: cause instanceof Error ? cause.message : String(cause)
23342
23420
  })
23343
23421
  });
23344
- const parsed = yield* parseTomlEffect(source, path6);
23345
- const manifest = yield* validateManifestEffect(parsed, path6);
23346
- return { path: path6, manifest, source };
23422
+ const parsed = yield* parseTomlEffect(source, path7);
23423
+ const manifest = yield* validateManifestEffect(parsed, path7);
23424
+ return { path: path7, manifest, source };
23347
23425
  });
23348
23426
  }
23349
23427
  function renderManifestToml(manifest) {
@@ -24477,14 +24555,14 @@ function dbPushEffect(input) {
24477
24555
  return Effect25.gen(function* () {
24478
24556
  yield* requireAuthEffect;
24479
24557
  const api2 = yield* ApiService;
24480
- const fs7 = yield* FileSystem3.FileSystem;
24481
- const path6 = input.file ?? "schema.sql";
24482
- const sql = yield* fs7.readFileString(path6).pipe(
24558
+ const fs8 = yield* FileSystem3.FileSystem;
24559
+ const path7 = input.file ?? "schema.sql";
24560
+ const sql = yield* fs8.readFileString(path7).pipe(
24483
24561
  Effect25.mapError(
24484
24562
  (cause) => new CliCommandError({
24485
24563
  command: "db",
24486
24564
  reason: "unexpected",
24487
- message: `Failed to read ${path6}: ${String(cause)}`
24565
+ message: `Failed to read ${path7}: ${String(cause)}`
24488
24566
  })
24489
24567
  )
24490
24568
  );
@@ -24531,7 +24609,7 @@ function dbPushEffect(input) {
24531
24609
  yield* Console15.log("");
24532
24610
  }
24533
24611
  if (!input.yes) {
24534
- const ok = yield* confirmEffect(` Apply ${path6} to database ${input.id}? (y/N) `);
24612
+ const ok = yield* confirmEffect(` Apply ${path7} to database ${input.id}? (y/N) `);
24535
24613
  if (!ok) {
24536
24614
  yield* Console15.log(chalk_default.dim(" Aborted."));
24537
24615
  return;
@@ -24555,23 +24633,23 @@ function dbPullEffect(input) {
24555
24633
  return Effect25.gen(function* () {
24556
24634
  yield* requireAuthEffect;
24557
24635
  const api2 = yield* ApiService;
24558
- const fs7 = yield* FileSystem3.FileSystem;
24636
+ const fs8 = yield* FileSystem3.FileSystem;
24559
24637
  const snap = yield* withSpinner(
24560
24638
  `Fetching schema for ${chalk_default.bold(input.id)}...`,
24561
24639
  api2.getDbSchema(input.id)
24562
24640
  );
24563
- const path6 = input.output ?? "schema.sql";
24564
- yield* fs7.writeFileString(path6, snap.sql).pipe(
24641
+ const path7 = input.output ?? "schema.sql";
24642
+ yield* fs8.writeFileString(path7, snap.sql).pipe(
24565
24643
  Effect25.mapError(
24566
24644
  (cause) => new CliCommandError({
24567
24645
  command: "db",
24568
24646
  reason: "unexpected",
24569
- message: `Failed to write ${path6}: ${String(cause)}`
24647
+ message: `Failed to write ${path7}: ${String(cause)}`
24570
24648
  })
24571
24649
  )
24572
24650
  );
24573
24651
  yield* Console15.log(
24574
- chalk_default.green(`\u2713 Wrote ${chalk_default.bold(path6)} ${chalk_default.dim(`(captured ${snap.capturedAt})`)}`)
24652
+ chalk_default.green(`\u2713 Wrote ${chalk_default.bold(path7)} ${chalk_default.dim(`(captured ${snap.capturedAt})`)}`)
24575
24653
  );
24576
24654
  });
24577
24655
  }
@@ -24581,8 +24659,8 @@ function dbDumpEffect(input) {
24581
24659
  const api2 = yield* ApiService;
24582
24660
  const snap = yield* withSpinner(`Dumping ${chalk_default.bold(input.id)}...`, api2.getDbSchema(input.id));
24583
24661
  if (input.output) {
24584
- const fs7 = yield* FileSystem3.FileSystem;
24585
- yield* fs7.writeFileString(input.output, snap.sql).pipe(
24662
+ const fs8 = yield* FileSystem3.FileSystem;
24663
+ yield* fs8.writeFileString(input.output, snap.sql).pipe(
24586
24664
  Effect25.mapError(
24587
24665
  (cause) => new CliCommandError({
24588
24666
  command: "db",
@@ -24723,9 +24801,9 @@ var SCAN_SKIP_DIRS = [
24723
24801
  var SCAN_SKIP_SUFFIXES = [".test.ts", ".test.tsx", ".spec.ts", ".spec.tsx"];
24724
24802
  var SDK_HEALTH_IMPORT_RE = /from\s+['"]@sylphx\/sdk\/health['"]/;
24725
24803
  var SDK_HEALTH_MOUNT_RE = /\bwithHealth\.(?:hono|express|fastify|fetch)\s*\(/;
24726
- async function readPackageJson(path6) {
24804
+ async function readPackageJson(path7) {
24727
24805
  try {
24728
- const file = Bun.file(path6);
24806
+ const file = Bun.file(path7);
24729
24807
  if (!await file.exists()) return null;
24730
24808
  const text2 = await file.text();
24731
24809
  const parsed = JSON.parse(text2);
@@ -24750,9 +24828,9 @@ function hasSdkHealthDependency(pkg) {
24750
24828
  }
24751
24829
  return false;
24752
24830
  }
24753
- async function fileText(path6) {
24831
+ async function fileText(path7) {
24754
24832
  try {
24755
- const file = Bun.file(path6);
24833
+ const file = Bun.file(path7);
24756
24834
  if (!await file.exists()) return null;
24757
24835
  return await file.text();
24758
24836
  } catch {
@@ -24760,8 +24838,8 @@ async function fileText(path6) {
24760
24838
  }
24761
24839
  }
24762
24840
  async function sourceMountsSdkHealth(cwd) {
24763
- const scanFile = async (path6) => {
24764
- const text2 = await fileText(path6);
24841
+ const scanFile = async (path7) => {
24842
+ const text2 = await fileText(path7);
24765
24843
  if (!text2) return false;
24766
24844
  return SDK_HEALTH_IMPORT_RE.test(text2) && SDK_HEALTH_MOUNT_RE.test(text2);
24767
24845
  };
@@ -24807,17 +24885,22 @@ async function detectFrameworkSignals(manifest, cwd = process.cwd()) {
24807
24885
  }
24808
24886
  return out;
24809
24887
  }
24810
- function resolveBuildContext(manifest, svc) {
24811
- if (svc.build?.context) return svc.build.context;
24812
- if (svc.build?.docker_context) return svc.build.docker_context;
24813
- if (manifest.build?.context) return manifest.build.context;
24814
- if (manifest.build?.docker_context) return manifest.build.docker_context;
24815
- return ".";
24816
- }
24817
24888
  function serviceScanDir(cwd, manifest, svc) {
24818
- const raw = resolveBuildContext(manifest, svc);
24889
+ const raw = resolveServiceScanContext(manifest, svc);
24819
24890
  return raw === "." || raw.length === 0 ? cwd : join2(cwd, raw);
24820
24891
  }
24892
+ function resolveServiceScanContext(manifest, svc) {
24893
+ const candidates = [
24894
+ svc.build?.context,
24895
+ svc.build?.docker_context,
24896
+ manifest.build?.context,
24897
+ manifest.build?.docker_context
24898
+ ];
24899
+ for (const candidate of candidates) {
24900
+ if (candidate !== void 0 && candidate !== null) return candidate;
24901
+ }
24902
+ return ".";
24903
+ }
24821
24904
  function summariseFrameworkSignals(signals) {
24822
24905
  const sdkServices = Object.entries(signals).filter(([, s]) => s.sdkHealthDetected === true).map(([name]) => name);
24823
24906
  if (sdkServices.length === 0) return null;
@@ -24878,7 +24961,7 @@ var DEFAULT_IDLE_TIMEOUT_MS = 9e4;
24878
24961
  var NON_FOLLOW_FLUSH_MS = 1e4;
24879
24962
  var TERMINAL_GRACE_MS = 500;
24880
24963
  function streamLogs(url, token, opts = {}) {
24881
- return new Promise((resolve3) => {
24964
+ return new Promise((resolve2) => {
24882
24965
  const headers = {
24883
24966
  "User-Agent": `sylphx-cli/${version2}`,
24884
24967
  Accept: "text/event-stream"
@@ -24899,7 +24982,7 @@ function streamLogs(url, token, opts = {}) {
24899
24982
  if (idleTimer) clearTimeout(idleTimer);
24900
24983
  if (nonFollowTimer) clearTimeout(nonFollowTimer);
24901
24984
  es.close();
24902
- resolve3(success);
24985
+ resolve2(success);
24903
24986
  };
24904
24987
  const touchIdle = () => {
24905
24988
  if (!opts.exitOnDone && !opts.follow) return;
@@ -24964,7 +25047,7 @@ function streamLogs(url, token, opts = {}) {
24964
25047
  finish(succeeded);
24965
25048
  } else {
24966
25049
  es.close();
24967
- resolve3(false);
25050
+ resolve2(false);
24968
25051
  }
24969
25052
  });
24970
25053
  if (!opts.follow) {
@@ -24976,7 +25059,7 @@ function streamLogs(url, token, opts = {}) {
24976
25059
  // src/programs/deploy.ts
24977
25060
  init_spinner();
24978
25061
  var DEPLOY_FALLBACK_POLL_INTERVAL_MS = 2e3;
24979
- var DEPLOY_FALLBACK_TIMEOUT_MS = 10 * 60 * 1e3;
25062
+ var DEPLOY_FALLBACK_TIMEOUT_MS = 30 * 60 * 1e3;
24980
25063
  var DEPLOY_SUCCESS_STATUSES = /* @__PURE__ */ new Set(["success", "succeeded"]);
24981
25064
  var DEPLOY_FAILURE_STATUSES = /* @__PURE__ */ new Set(["failed", "cancelled", "canceled", "error"]);
24982
25065
  function normaliseDeploymentStatus(status3) {
@@ -25027,8 +25110,8 @@ function waitForDeploymentRecordEffect(api2, id, options) {
25027
25110
  }
25028
25111
  function preflightManifestEffect(skipManifest) {
25029
25112
  if (skipManifest) return Effect26.succeed(void 0);
25030
- const path6 = resolveManifestPath(void 0);
25031
- if (!manifestExistsSync(path6)) return Effect26.succeed(void 0);
25113
+ const path7 = resolveManifestPath(void 0);
25114
+ if (!manifestExistsSync(path7)) return Effect26.succeed(void 0);
25032
25115
  return loadManifestEffect().pipe(
25033
25116
  Effect26.tap(
25034
25117
  (r) => Console16.log(chalk_default.dim(` \u2713 ${r.path} valid (manifest v${r.manifest.version})`))
@@ -25535,19 +25618,19 @@ import { Console as Console18, Effect as Effect28 } from "effect";
25535
25618
  // src/utils/update-check.ts
25536
25619
  init_package();
25537
25620
  init_env_flags();
25538
- import { mkdirSync as mkdirSync2, readFileSync as readFileSync3, writeFileSync as writeFileSync2 } from "fs";
25539
- import { homedir as homedir2 } from "os";
25621
+ import { mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
25622
+ import { homedir } from "os";
25540
25623
  import { join as join3 } from "path";
25541
25624
  var UPDATE_CHECK_TTL_MS = 24 * 60 * 60 * 1e3;
25542
25625
  var UPDATE_CHECK_FAIL_TTL_MS = 60 * 60 * 1e3;
25543
25626
  var REGISTRY_FETCH_TIMEOUT_MS = 3e3;
25544
25627
  var REGISTRY_URL = "https://registry.npmjs.org/@sylphx/cli/latest";
25545
25628
  function cachePath() {
25546
- return join3(homedir2(), ".sylphx", "cache", "version-check.json");
25629
+ return join3(homedir(), ".sylphx", "cache", "version-check.json");
25547
25630
  }
25548
25631
  function readCache() {
25549
25632
  try {
25550
- const raw = readFileSync3(cachePath(), "utf8");
25633
+ const raw = readFileSync2(cachePath(), "utf8");
25551
25634
  const parsed = JSON.parse(raw);
25552
25635
  if (typeof parsed.lastCheck !== "number") return void 0;
25553
25636
  return {
@@ -25561,7 +25644,7 @@ function readCache() {
25561
25644
  function writeCache(payload) {
25562
25645
  const file = cachePath();
25563
25646
  try {
25564
- mkdirSync2(join3(homedir2(), ".sylphx", "cache"), { recursive: true, mode: 448 });
25647
+ mkdirSync2(join3(homedir(), ".sylphx", "cache"), { recursive: true, mode: 448 });
25565
25648
  writeFileSync2(file, JSON.stringify(payload), { mode: 384 });
25566
25649
  } catch {
25567
25650
  }
@@ -25712,7 +25795,13 @@ function checkUrls() {
25712
25795
  }
25713
25796
  function checkAuth() {
25714
25797
  const auth = resolveAuthToken();
25715
- const { token, source } = auth;
25798
+ const { token, source, error } = auth;
25799
+ if (error)
25800
+ return fail(
25801
+ "Auth",
25802
+ error,
25803
+ `Fix ${AUTH_TOKEN_FILE_ENV_VAR}, unset it, or set ${AUTH_ENV_VAR}=svc_\u2026`
25804
+ );
25716
25805
  if (!token) {
25717
25806
  if (source === "token-file") {
25718
25807
  return fail("Auth", unauthenticatedMessage(auth), `fix ${AUTH_TOKEN_FILE_ENV_VAR} or unset it`);
@@ -25720,7 +25809,7 @@ function checkAuth() {
25720
25809
  return fail(
25721
25810
  "Auth",
25722
25811
  "no token found",
25723
- `\`sylphx login\` (interactive) OR \`export ${AUTH_ENV_VAR}=svc_\u2026\` (CI / agent) OR \`export ${AUTH_TOKEN_FILE_ENV_VAR}=~/.config/sylphx/agent.token\``
25812
+ `\`sylphx login\` (interactive), \`export ${AUTH_ENV_VAR}=svc_\u2026\`, or \`export ${AUTH_TOKEN_FILE_ENV_VAR}=~/.sylphx/agent-token.env\``
25724
25813
  );
25725
25814
  }
25726
25815
  if (source === "env") {
@@ -25733,6 +25822,24 @@ function checkAuth() {
25733
25822
  if (oauth2?.expiresAt) {
25734
25823
  const expiresAt = accessTokenExpiresAt(oauth2.accessToken, oauth2.expiresAt);
25735
25824
  const remaining = new Date(expiresAt).getTime() - Date.now();
25825
+ const refreshExpiresAt = oauth2.refreshExpiresAt ? Date.parse(oauth2.refreshExpiresAt) : NaN;
25826
+ if (Number.isFinite(refreshExpiresAt)) {
25827
+ const refreshRemaining = refreshExpiresAt - Date.now();
25828
+ if (refreshRemaining < 0) {
25829
+ return warn(
25830
+ "Auth",
25831
+ `stored OAuth pair (refresh token expired ${formatDuration2(-refreshRemaining)} ago)`,
25832
+ "Run `sylphx login` again, or use `SYLPHX_TOKEN_FILE` for agents."
25833
+ );
25834
+ }
25835
+ if (refreshRemaining < 7 * 24 * 60 * 60 * 1e3) {
25836
+ return warn(
25837
+ "Auth",
25838
+ `stored OAuth pair (refresh token expires in ${formatDuration2(refreshRemaining)})`,
25839
+ "Run `sylphx login` before it expires, or use `SYLPHX_TOKEN_FILE` for agents."
25840
+ );
25841
+ }
25842
+ }
25736
25843
  const refreshDetail = formatRefreshExpiry(oauth2.refreshExpiresAt);
25737
25844
  if (remaining < 0) {
25738
25845
  return warn(
@@ -26847,8 +26954,8 @@ var engagementCommand = Command21.make(
26847
26954
  );
26848
26955
 
26849
26956
  // src/programs/env.ts
26850
- import fs4 from "fs";
26851
- import path3 from "path";
26957
+ import fs5 from "fs";
26958
+ import path4 from "path";
26852
26959
  import { Args as Args17, Command as Command22, Options as Options24 } from "@effect/cli";
26853
26960
  import { Console as Console22, Effect as Effect32 } from "effect";
26854
26961
  init_chalk();
@@ -26947,7 +27054,7 @@ function envPullEffect(opts) {
26947
27054
  const api2 = yield* ApiService;
26948
27055
  const envType = opts.env ?? target.defaultEnv;
26949
27056
  const scope = target.orgId ? { orgId: target.orgId } : void 0;
26950
- const filePath = path3.resolve(opts.file);
27057
+ const filePath = path4.resolve(opts.file);
26951
27058
  const vars = yield* withSpinner(
26952
27059
  `Pulling env vars [${envType}]...`,
26953
27060
  api2.listEnvVars(target.projectId, envType, scope)
@@ -26976,7 +27083,7 @@ function envPullEffect(opts) {
26976
27083
  }
26977
27084
  lines.push("");
26978
27085
  yield* Effect32.try({
26979
- try: () => fs4.writeFileSync(filePath, lines.join("\n"), "utf-8"),
27086
+ try: () => fs5.writeFileSync(filePath, lines.join("\n"), "utf-8"),
26980
27087
  catch: (cause) => new CliCommandError({
26981
27088
  command: "env",
26982
27089
  reason: "unexpected",
@@ -26996,8 +27103,8 @@ function envPushEffect(opts) {
26996
27103
  const api2 = yield* ApiService;
26997
27104
  const envType = opts.env ?? target.defaultEnv;
26998
27105
  const scope = target.orgId ? { orgId: target.orgId } : void 0;
26999
- const filePath = path3.resolve(opts.file);
27000
- if (!fs4.existsSync(filePath)) {
27106
+ const filePath = path4.resolve(opts.file);
27107
+ if (!fs5.existsSync(filePath)) {
27001
27108
  return yield* Effect32.fail(
27002
27109
  new CliCommandError({
27003
27110
  command: "env",
@@ -27006,7 +27113,7 @@ function envPushEffect(opts) {
27006
27113
  })
27007
27114
  );
27008
27115
  }
27009
- const content = fs4.readFileSync(filePath, "utf-8");
27116
+ const content = fs5.readFileSync(filePath, "utf-8");
27010
27117
  const vars = [];
27011
27118
  for (const rawLine of content.split("\n")) {
27012
27119
  const line = rawLine.trim();
@@ -28138,8 +28245,8 @@ var healthCommand = Command25.make(
28138
28245
 
28139
28246
  // src/programs/init.ts
28140
28247
  import { execSync as execSync2 } from "child_process";
28141
- import fs5 from "fs";
28142
- import path4 from "path";
28248
+ import fs6 from "fs";
28249
+ import path5 from "path";
28143
28250
  import { Args as Args20, Command as Command26, Options as Options28 } from "@effect/cli";
28144
28251
  import { Console as Console26, Effect as Effect36 } from "effect";
28145
28252
  init_api_url();
@@ -28151,8 +28258,8 @@ function slugify(name) {
28151
28258
  }
28152
28259
  function readPackageJson2() {
28153
28260
  try {
28154
- const pkgPath = path4.join(process.cwd(), "package.json");
28155
- return JSON.parse(fs5.readFileSync(pkgPath, "utf-8"));
28261
+ const pkgPath = path5.join(process.cwd(), "package.json");
28262
+ return JSON.parse(fs6.readFileSync(pkgPath, "utf-8"));
28156
28263
  } catch {
28157
28264
  return void 0;
28158
28265
  }
@@ -28461,8 +28568,8 @@ var inspectCommand = Command27.make(
28461
28568
  ).pipe(Command27.withDescription("Inspect a deployment by id"));
28462
28569
 
28463
28570
  // src/programs/link.ts
28464
- import fs6 from "fs";
28465
- import path5 from "path";
28571
+ import fs7 from "fs";
28572
+ import path6 from "path";
28466
28573
  import { Command as Command28, Options as Options30 } from "@effect/cli";
28467
28574
  import { Console as Console28, Effect as Effect38 } from "effect";
28468
28575
  init_chalk();
@@ -28470,7 +28577,7 @@ init_effect_io();
28470
28577
  init_spinner();
28471
28578
  function readPackageName() {
28472
28579
  try {
28473
- const pkg = JSON.parse(fs6.readFileSync(path5.join(process.cwd(), "package.json"), "utf-8"));
28580
+ const pkg = JSON.parse(fs7.readFileSync(path6.join(process.cwd(), "package.json"), "utf-8"));
28474
28581
  return pkg.name;
28475
28582
  } catch {
28476
28583
  return void 0;
@@ -29070,7 +29177,7 @@ import { Console as Console32, Effect as Effect42 } from "effect";
29070
29177
 
29071
29178
  // src/lib/migrate-health-checks.ts
29072
29179
  import { mkdir, readdir as readdir2, readFile as readFile2, writeFile } from "fs/promises";
29073
- import { isAbsolute, join as join4, relative, resolve as resolve2 } from "path";
29180
+ import { isAbsolute, join as join4, relative, resolve } from "path";
29074
29181
  var DEP_SECTIONS = [
29075
29182
  "dependencies",
29076
29183
  "devDependencies",
@@ -29131,9 +29238,9 @@ async function listTopLevelEntries(dir) {
29131
29238
  return /* @__PURE__ */ new Set();
29132
29239
  }
29133
29240
  }
29134
- async function fileExists(path6) {
29241
+ async function fileExists(path7) {
29135
29242
  try {
29136
- await readFile2(path6, "utf8");
29243
+ await readFile2(path7, "utf8");
29137
29244
  return true;
29138
29245
  } catch {
29139
29246
  return false;
@@ -29179,18 +29286,18 @@ async function scanForHandlers(projectDir) {
29179
29286
  const lines = text2.split("\n");
29180
29287
  for (let i = 0; i < lines.length; i++) {
29181
29288
  const line = lines[i] ?? "";
29182
- for (const path6 of HEALTH_PATH_PATTERNS) {
29183
- const pattern = new RegExp(`\\.get\\(\\s*['"\`]${path6.replace(/\//g, "\\/")}['"\`]`);
29289
+ for (const path7 of HEALTH_PATH_PATTERNS) {
29290
+ const pattern = new RegExp(`\\.get\\(\\s*['"\`]${path7.replace(/\//g, "\\/")}['"\`]`);
29184
29291
  if (pattern.test(line)) {
29185
- out.push({ path: path6, handlerPath: full, line: i + 1 });
29292
+ out.push({ path: path7, handlerPath: full, line: i + 1, rootOnly: false });
29186
29293
  }
29187
29294
  }
29188
- for (const path6 of ROOT_LEGACY_HEALTH_PATH_PATTERNS) {
29295
+ for (const path7 of ROOT_LEGACY_HEALTH_PATH_PATTERNS) {
29189
29296
  const pattern = new RegExp(
29190
- `${ROOT_ROUTE_RECEIVER_RE.source}['"\`]${path6.replace(/\//g, "\\/")}['"\`]`
29297
+ `${ROOT_ROUTE_RECEIVER_RE.source}['"\`]${path7.replace(/\//g, "\\/")}['"\`]`
29191
29298
  );
29192
29299
  if (pattern.test(line)) {
29193
- out.push({ path: path6, handlerPath: full, line: i + 1 });
29300
+ out.push({ path: path7, handlerPath: full, line: i + 1, rootOnly: true });
29194
29301
  }
29195
29302
  }
29196
29303
  }
@@ -29206,7 +29313,7 @@ function plannedChangesForFramework(framework, entryFile, pkgHasSdk, handlers) {
29206
29313
  changes.push({
29207
29314
  kind: "add-dep",
29208
29315
  file: "package.json",
29209
- summary: "Add `@sylphx/sdk` to dependencies (workspace:* in this repo, published semver elsewhere)."
29316
+ summary: "Add `@sylphx/sdk` to dependencies using the correct package range."
29210
29317
  });
29211
29318
  }
29212
29319
  if (framework === "nextjs") {
@@ -29411,21 +29518,21 @@ async function nextHealthRouteUsesSdk(cwd) {
29411
29518
  if (!text2) return false;
29412
29519
  return /from\s+['"]@sylphx\/sdk\/health['"]/.test(text2) && /\bwithHealth\.fetch\s*\(/.test(text2) && /export\s+(?:const|function)\s+GET\b/.test(text2);
29413
29520
  }
29414
- async function readTextOrNull(path6) {
29521
+ async function readTextOrNull(path7) {
29415
29522
  try {
29416
- return await readFile2(path6, "utf8");
29523
+ return await readFile2(path7, "utf8");
29417
29524
  } catch {
29418
29525
  return null;
29419
29526
  }
29420
29527
  }
29421
- var REPO_ROOT = resolve2(import.meta.dir, "../../../..");
29528
+ var REPO_ROOT = resolve(import.meta.dir, "../../../..");
29422
29529
  function isInsideRepo(cwd) {
29423
- const rel = relative(REPO_ROOT, resolve2(cwd));
29530
+ const rel = relative(REPO_ROOT, resolve(cwd));
29424
29531
  return rel === "" || !rel.startsWith("..") && !isAbsolute(rel);
29425
29532
  }
29426
29533
  async function resolveSdkDependencyVersion(cwd) {
29427
29534
  if (isInsideRepo(cwd)) return "workspace:*";
29428
- const cliPkg = await readPackageJson3(resolve2(import.meta.dir, "../../package.json"));
29535
+ const cliPkg = await readPackageJson3(resolve(import.meta.dir, "../../package.json"));
29429
29536
  const declared = cliPkg?.dependencies?.["@sylphx/sdk"];
29430
29537
  if (declared && declared !== "workspace:*") {
29431
29538
  return declared.startsWith("^") || declared.startsWith("~") ? declared : `^${declared}`;
@@ -29436,15 +29543,15 @@ async function applyPlan(ctx) {
29436
29543
  const issues = [];
29437
29544
  if (!ctx.pkgHasSdk) {
29438
29545
  try {
29439
- const path6 = join4(ctx.cwd, "package.json");
29440
- const text2 = await readFile2(path6, "utf8");
29546
+ const path7 = join4(ctx.cwd, "package.json");
29547
+ const text2 = await readFile2(path7, "utf8");
29441
29548
  const obj = JSON.parse(text2);
29442
29549
  const version6 = await resolveSdkDependencyVersion(ctx.cwd);
29443
29550
  const next = {
29444
29551
  ...obj,
29445
29552
  dependencies: { "@sylphx/sdk": version6, ...obj.dependencies ?? {} }
29446
29553
  };
29447
- await writeFile(path6, `${JSON.stringify(next, null, " ")}
29554
+ await writeFile(path7, `${JSON.stringify(next, null, " ")}
29448
29555
  `);
29449
29556
  } catch (err) {
29450
29557
  issues.push({
@@ -29454,14 +29561,14 @@ async function applyPlan(ctx) {
29454
29561
  }
29455
29562
  }
29456
29563
  if (ctx.framework === "nextjs") {
29457
- const path6 = join4(ctx.cwd, "src/app/healthz/route.ts");
29564
+ const path7 = join4(ctx.cwd, "src/app/healthz/route.ts");
29458
29565
  try {
29459
29566
  await mkdir(join4(ctx.cwd, "src/app/healthz"), { recursive: true });
29460
- await writeFile(path6, NEXTJS_HEALTH_ROUTE_TEMPLATE);
29567
+ await writeFile(path7, NEXTJS_HEALTH_ROUTE_TEMPLATE);
29461
29568
  } catch (err) {
29462
29569
  issues.push({
29463
29570
  kind: "parse-error",
29464
- message: `Failed to write Next.js route at ${path6}: ${err instanceof Error ? err.message : String(err)}`,
29571
+ message: `Failed to write Next.js route at ${path7}: ${err instanceof Error ? err.message : String(err)}`,
29465
29572
  hint: "Create the directory tree `src/app/healthz/` manually then re-run the codemod with --apply."
29466
29573
  });
29467
29574
  }
@@ -29480,7 +29587,7 @@ async function applyPlan(ctx) {
29480
29587
  for (const h of ctx.handlers) {
29481
29588
  try {
29482
29589
  const text2 = await readFile2(h.handlerPath, "utf8");
29483
- const next = removeHandlerLine(text2, h.path);
29590
+ const next = removeHandlerLine(text2, h.path, h.rootOnly);
29484
29591
  if (next !== text2) await writeFile(h.handlerPath, next);
29485
29592
  } catch (err) {
29486
29593
  issues.push({
@@ -29544,10 +29651,11 @@ ${mountLine}`;
29544
29651
  }
29545
29652
  return next;
29546
29653
  }
29547
- function removeHandlerLine(source, path6) {
29654
+ function removeHandlerLine(source, path7, rootOnly) {
29548
29655
  const lines = source.split("\n");
29549
29656
  const out = [];
29550
- const pattern = new RegExp(`\\.get\\(\\s*['"\`]${path6.replace(/\//g, "\\/")}['"\`]`);
29657
+ const routeReceiver = rootOnly ? ROOT_ROUTE_RECEIVER_RE.source : "\\.get\\(\\s*";
29658
+ const pattern = new RegExp(`${routeReceiver}['"\`]${path7.replace(/\//g, "\\/")}['"\`]`);
29551
29659
  let skipping = 0;
29552
29660
  for (const line of lines) {
29553
29661
  if (skipping > 0) {
@@ -29859,9 +29967,9 @@ function sourceMapsUploadEffect(opts) {
29859
29967
  return Effect43.gen(function* () {
29860
29968
  yield* requireAuthEffect;
29861
29969
  const link = yield* requireLinkedAppEffect;
29862
- const fs7 = yield* FileSystem4.FileSystem;
29970
+ const fs8 = yield* FileSystem4.FileSystem;
29863
29971
  const api2 = yield* ApiService;
29864
- const content = yield* fs7.readFileString(opts.file).pipe(
29972
+ const content = yield* fs8.readFileString(opts.file).pipe(
29865
29973
  Effect43.mapError(
29866
29974
  (cause) => new CliCommandError({
29867
29975
  command: "monitoring",
@@ -31013,7 +31121,7 @@ function readFeatures(raw) {
31013
31121
  };
31014
31122
  return {
31015
31123
  maxServices: pick("maxServices"),
31016
- maxInstances: pick("maxReplicasPerService"),
31124
+ maxInstances: pick("maxInstancesPerService"),
31017
31125
  maxCpu: pick("maxCpu"),
31018
31126
  maxMemory: pick("maxMemory"),
31019
31127
  maxDbTier: pick("maxDbTier"),
@@ -31201,8 +31309,8 @@ init_chalk();
31201
31309
  init_effect_io();
31202
31310
  init_spinner();
31203
31311
  var VALID_DATA_MODES = ["none", "last-1d", "last-7d", "all"];
31204
- function branchDbPath(path6, projectId, envId) {
31205
- return path6.replace(":id", encodeURIComponent(projectId)).replace(":envId", encodeURIComponent(envId));
31312
+ function branchDbPath(path7, projectId, envId) {
31313
+ return path7.replace(":id", encodeURIComponent(projectId)).replace(":envId", encodeURIComponent(envId));
31206
31314
  }
31207
31315
  function statusColour5(status3) {
31208
31316
  switch (status3) {
@@ -34939,6 +35047,7 @@ import { Console as Console55, Effect as Effect65 } from "effect";
34939
35047
  init_chalk();
34940
35048
  init_effect_io();
34941
35049
  init_spinner();
35050
+ var SERVICE_INSTANCE_TYPES = ["nano", "micro", "small", "standard", "large", "xlarge"];
34942
35051
  function resolveServicesProjectEffect(command, opts) {
34943
35052
  return Effect65.gen(function* () {
34944
35053
  const orgId = yield* resolveOrgScopeEffect(command, opts.org);
@@ -34949,6 +35058,9 @@ function resolveServicesProjectEffect(command, opts) {
34949
35058
  function orgOptions(target) {
34950
35059
  return target.orgId ? { orgId: target.orgId } : void 0;
34951
35060
  }
35061
+ function formatScalePolicyValue(value) {
35062
+ return value === void 0 ? "default" : String(value);
35063
+ }
34952
35064
  var servicesListEffect = servicesListEffectWith("pretty");
34953
35065
  function servicesListEffectWith(output, projectOptions = {}) {
34954
35066
  return Effect65.gen(function* () {
@@ -35009,6 +35121,15 @@ function servicesUpdateEffect(input) {
35009
35121
  })
35010
35122
  );
35011
35123
  }
35124
+ if (input.minInstances !== void 0 && input.maxInstances !== void 0 && input.maxInstances < input.minInstances) {
35125
+ return yield* Effect65.fail(
35126
+ new CliCommandError({
35127
+ command: "services update",
35128
+ reason: "invalid-input",
35129
+ message: "--max-instances must be greater than or equal to --min-instances."
35130
+ })
35131
+ );
35132
+ }
35012
35133
  const body = {};
35013
35134
  if (input.repo !== void 0) body.githubRepo = input.repo;
35014
35135
  if (input.branch !== void 0) body.githubBranch = input.branch;
@@ -35017,6 +35138,14 @@ function servicesUpdateEffect(input) {
35017
35138
  if (input.startCommand !== void 0) body.startCommand = input.startCommand;
35018
35139
  if (input.port !== void 0) body.port = input.port;
35019
35140
  if (input.healthCheckPath !== void 0) body.healthCheckPath = input.healthCheckPath;
35141
+ if (input.minInstances !== void 0 || input.maxInstances !== void 0 || input.scaleToZero !== void 0) {
35142
+ body.scalePolicy = {
35143
+ ...input.minInstances !== void 0 ? { min: input.minInstances } : {},
35144
+ ...input.maxInstances !== void 0 ? { max: input.maxInstances } : {},
35145
+ ...input.scaleToZero !== void 0 ? { scaleToZero: input.scaleToZero } : {}
35146
+ };
35147
+ }
35148
+ if (input.instanceType !== void 0) body.instanceType = input.instanceType;
35020
35149
  if (input.active) body.isActive = true;
35021
35150
  if (input.inactive) body.isActive = false;
35022
35151
  if (Object.keys(body).length === 0) {
@@ -35046,6 +35175,15 @@ function servicesUpdateEffect(input) {
35046
35175
  if (updated.port) yield* Console55.log(chalk_default.dim(` Port: ${updated.port}`));
35047
35176
  if (updated.healthCheckPath)
35048
35177
  yield* Console55.log(chalk_default.dim(` Health check: ${updated.healthCheckPath}`));
35178
+ if (updated.instanceType)
35179
+ yield* Console55.log(chalk_default.dim(` Instance type: ${updated.instanceType}`));
35180
+ if (updated.scalePolicy) {
35181
+ const policy = updated.scalePolicy;
35182
+ const min = formatScalePolicyValue(policy.min);
35183
+ const max = formatScalePolicyValue(policy.max);
35184
+ const scaleToZero = formatScalePolicyValue(policy.scaleToZero);
35185
+ yield* Console55.log(chalk_default.dim(` Scale: min=${min} max=${max} scaleToZero=${scaleToZero}`));
35186
+ }
35049
35187
  })
35050
35188
  );
35051
35189
  });
@@ -35139,6 +35277,22 @@ var updateCmd5 = Command55.make(
35139
35277
  Options56.withDescription("HTTP readiness path for web services"),
35140
35278
  Options56.optional
35141
35279
  ),
35280
+ instanceType: Options56.choice("instance-type", SERVICE_INSTANCE_TYPES).pipe(
35281
+ Options56.withDescription("Service instance type"),
35282
+ Options56.optional
35283
+ ),
35284
+ minInstances: Options56.integer("min-instances").pipe(
35285
+ Options56.withDescription("Minimum service instances"),
35286
+ Options56.optional
35287
+ ),
35288
+ maxInstances: Options56.integer("max-instances").pipe(
35289
+ Options56.withDescription("Maximum service instances"),
35290
+ Options56.optional
35291
+ ),
35292
+ scaleToZero: Options56.boolean("scale-to-zero", { negationNames: ["no-scale-to-zero"] }).pipe(
35293
+ Options56.withDescription("Allow the service to idle at zero instances"),
35294
+ Options56.optional
35295
+ ),
35142
35296
  active: Options56.boolean("active").pipe(Options56.withDescription("Mark service active")),
35143
35297
  inactive: Options56.boolean("inactive").pipe(Options56.withDescription("Mark service inactive")),
35144
35298
  output: outputOption,
@@ -35154,6 +35308,10 @@ var updateCmd5 = Command55.make(
35154
35308
  startCommand,
35155
35309
  port,
35156
35310
  healthCheckPath,
35311
+ instanceType,
35312
+ minInstances,
35313
+ maxInstances,
35314
+ scaleToZero,
35157
35315
  active,
35158
35316
  inactive,
35159
35317
  output,
@@ -35168,6 +35326,10 @@ var updateCmd5 = Command55.make(
35168
35326
  startCommand: startCommand._tag === "Some" ? startCommand.value : void 0,
35169
35327
  port: port._tag === "Some" ? port.value : void 0,
35170
35328
  healthCheckPath: healthCheckPath._tag === "Some" ? healthCheckPath.value : void 0,
35329
+ instanceType: instanceType._tag === "Some" ? instanceType.value : void 0,
35330
+ minInstances: minInstances._tag === "Some" ? minInstances.value : void 0,
35331
+ maxInstances: maxInstances._tag === "Some" ? maxInstances.value : void 0,
35332
+ scaleToZero: scaleToZero._tag === "Some" ? scaleToZero.value : void 0,
35171
35333
  active,
35172
35334
  inactive,
35173
35335
  output,
@@ -37739,10 +37901,10 @@ var root = Command68.make(
37739
37901
  [
37740
37902
  "Run `sylphx --help` for usage. Start with `sylphx login`.",
37741
37903
  "",
37742
- "Non-interactive (CI / agents): set `SYLPHX_TOKEN` or `SYLPHX_TOKEN_FILE`",
37743
- "(svc_* service token or OAuth access token). Every command honours external",
37744
- "auth before falling back to the stored OAuth session. See `sylphx whoami`",
37745
- "to confirm the source."
37904
+ "Non-interactive (CI / agents): set `SYLPHX_TOKEN` (svc_* service token",
37905
+ "or OAuth access token), or set `SYLPHX_TOKEN_FILE` to a mounted secret",
37906
+ "file. Every command honours machine auth before falling back to the",
37907
+ "stored OAuth session. See `sylphx whoami` to confirm the source."
37746
37908
  ].join("\n")
37747
37909
  )
37748
37910
  ).pipe(