omnara 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/dist/bin.js +371 -247
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -157,6 +157,7 @@ __export(sdk_gen_exports, {
157
157
  updateProjectMachinePoolGrant: () => updateProjectMachinePoolGrant,
158
158
  updateProjectModelGrant: () => updateProjectModelGrant,
159
159
  updateSecret: () => updateSecret,
160
+ updateSkill: () => updateSkill,
160
161
  uploadDaemonArtifact: () => uploadDaemonArtifact
161
162
  });
162
163
 
@@ -210,7 +211,7 @@ function createSseClient({
210
211
  sseMaxRetryAttempts,
211
212
  sseMaxRetryDelay,
212
213
  sseSleepFn,
213
- url: url3,
214
+ url: url4,
214
215
  ...options
215
216
  }) {
216
217
  let lastEventId;
@@ -234,9 +235,9 @@ function createSseClient({
234
235
  headers,
235
236
  signal
236
237
  };
237
- let request = new Request(url3, requestInit);
238
+ let request = new Request(url4, requestInit);
238
239
  if (onRequest) {
239
- request = await onRequest(url3, requestInit);
240
+ request = await onRequest(url4, requestInit);
240
241
  }
241
242
  const _fetch = options.fetch ?? globalThis.fetch;
242
243
  const response = await _fetch(request);
@@ -453,7 +454,7 @@ var serializeObjectParam = ({
453
454
  // ../sdk/src/generated/core/utils.gen.ts
454
455
  var PATH_PARAM_RE = /\{[^{}]+\}/g;
455
456
  var defaultPathSerializer = ({ path, url: _url }) => {
456
- let url3 = _url;
457
+ let url4 = _url;
457
458
  const matches = _url.match(PATH_PARAM_RE);
458
459
  if (matches) {
459
460
  for (const match of matches) {
@@ -476,11 +477,11 @@ var defaultPathSerializer = ({ path, url: _url }) => {
476
477
  continue;
477
478
  }
478
479
  if (Array.isArray(value)) {
479
- url3 = url3.replace(match, serializeArrayParam({ explode, name, style, value }));
480
+ url4 = url4.replace(match, serializeArrayParam({ explode, name, style, value }));
480
481
  continue;
481
482
  }
482
483
  if (typeof value === "object") {
483
- url3 = url3.replace(
484
+ url4 = url4.replace(
484
485
  match,
485
486
  serializeObjectParam({
486
487
  explode,
@@ -493,7 +494,7 @@ var defaultPathSerializer = ({ path, url: _url }) => {
493
494
  continue;
494
495
  }
495
496
  if (style === "matrix") {
496
- url3 = url3.replace(
497
+ url4 = url4.replace(
497
498
  match,
498
499
  `;${serializePrimitiveParam({
499
500
  name,
@@ -505,10 +506,10 @@ var defaultPathSerializer = ({ path, url: _url }) => {
505
506
  const replaceValue = encodeURIComponent(
506
507
  style === "label" ? `.${value}` : value
507
508
  );
508
- url3 = url3.replace(match, replaceValue);
509
+ url4 = url4.replace(match, replaceValue);
509
510
  }
510
511
  }
511
- return url3;
512
+ return url4;
512
513
  };
513
514
  var getUrl = ({
514
515
  baseUrl,
@@ -518,18 +519,18 @@ var getUrl = ({
518
519
  url: _url
519
520
  }) => {
520
521
  const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
521
- let url3 = (baseUrl ?? "") + pathUrl;
522
+ let url4 = (baseUrl ?? "") + pathUrl;
522
523
  if (path) {
523
- url3 = defaultPathSerializer({ path, url: url3 });
524
+ url4 = defaultPathSerializer({ path, url: url4 });
524
525
  }
525
526
  let search = query ? querySerializer(query) : "";
526
527
  if (search.startsWith("?")) {
527
528
  search = search.substring(1);
528
529
  }
529
530
  if (search) {
530
- url3 += `?${search}`;
531
+ url4 += `?${search}`;
531
532
  }
532
- return url3;
533
+ return url4;
533
534
  };
534
535
  function getValidRequestBody(options) {
535
536
  const hasBody = options.body !== void 0;
@@ -805,8 +806,8 @@ var createClient = (config2 = {}) => {
805
806
  opts.headers.delete("Content-Type");
806
807
  }
807
808
  const resolvedOpts = opts;
808
- const url3 = buildUrl(resolvedOpts);
809
- return { opts: resolvedOpts, url: url3 };
809
+ const url4 = buildUrl(resolvedOpts);
810
+ return { opts: resolvedOpts, url: url4 };
810
811
  };
811
812
  const request = async (options) => {
812
813
  const throwOnError = options.throwOnError ?? _config.throwOnError;
@@ -814,13 +815,13 @@ var createClient = (config2 = {}) => {
814
815
  let request2;
815
816
  let response;
816
817
  try {
817
- const { opts, url: url3 } = await beforeRequest(options);
818
+ const { opts, url: url4 } = await beforeRequest(options);
818
819
  const requestInit = {
819
820
  redirect: "follow",
820
821
  ...opts,
821
822
  body: getValidRequestBody(opts)
822
823
  };
823
- request2 = new Request(url3, requestInit);
824
+ request2 = new Request(url4, requestInit);
824
825
  for (const fn of interceptors.request.fns) {
825
826
  if (fn) {
826
827
  request2 = await fn(request2, opts);
@@ -922,13 +923,13 @@ var createClient = (config2 = {}) => {
922
923
  };
923
924
  const makeMethodFn = (method) => (options) => request({ ...options, method });
924
925
  const makeSseFn = (method) => async (options) => {
925
- const { opts, url: url3 } = await beforeRequest(options);
926
+ const { opts, url: url4 } = await beforeRequest(options);
926
927
  return createSseClient({
927
928
  ...opts,
928
929
  body: opts.body,
929
930
  method,
930
- onRequest: async (url4, init) => {
931
- let request2 = new Request(url4, init);
931
+ onRequest: async (url5, init) => {
932
+ let request2 = new Request(url5, init);
932
933
  for (const fn of interceptors.request.fns) {
933
934
  if (fn) {
934
935
  request2 = await fn(request2, opts);
@@ -937,7 +938,7 @@ var createClient = (config2 = {}) => {
937
938
  return request2;
938
939
  },
939
940
  serializedBody: getValidRequestBody(opts),
940
- url: url3
941
+ url: url4
941
942
  });
942
943
  };
943
944
  const _buildUrl = (options) => buildUrl({ ..._config, ...options });
@@ -971,7 +972,7 @@ var createClient = (config2 = {}) => {
971
972
  };
972
973
 
973
974
  // ../sdk/src/generated/client.gen.ts
974
- var client = createClient(createConfig({ throwOnError: true }));
975
+ var client = createClient(createConfig({ baseUrl: "https://api.omnara.com/v1", throwOnError: true }));
975
976
 
976
977
  // ../sdk/src/generated/zod.gen.ts
977
978
  import * as z from "zod";
@@ -1336,6 +1337,21 @@ var zCreateSkillRequest = z.object({
1336
1337
  owner: zSkillOwnerInput,
1337
1338
  archive: z.string()
1338
1339
  });
1340
+ var zUpdateSkillRequest = z.intersection(z.union([
1341
+ z.object({
1342
+ archive: z.string()
1343
+ }),
1344
+ z.object({
1345
+ skill_md: z.string()
1346
+ })
1347
+ ]), z.object({
1348
+ archive: z.string().optional(),
1349
+ skill_md: z.string().optional()
1350
+ }));
1351
+ var zSkillFile = z.object({
1352
+ path: z.string(),
1353
+ size: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" })
1354
+ });
1339
1355
  var zSkill = z.object({
1340
1356
  id: zSkillId,
1341
1357
  org_id: zOrganizationId,
@@ -1345,6 +1361,7 @@ var zSkill = z.object({
1345
1361
  revision: z.int().gte(1).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1346
1362
  description: z.string(),
1347
1363
  skill_md: z.string().optional(),
1364
+ files: z.array(zSkillFile).optional(),
1348
1365
  created_at: zTimestamp,
1349
1366
  updated_at: zTimestamp
1350
1367
  });
@@ -1831,6 +1848,15 @@ var zInlineMediaContentBlock = z.object({
1831
1848
  "text/markdown",
1832
1849
  "text/csv",
1833
1850
  "text/tab-separated-values",
1851
+ "text/x-iif",
1852
+ "application/msword",
1853
+ "application/rtf",
1854
+ "application/vnd.oasis.opendocument.text",
1855
+ "application/vnd.apple.pages",
1856
+ "application/vnd.apple.keynote",
1857
+ "application/vnd.apple.iwork",
1858
+ "application/vnd.ms-powerpoint",
1859
+ "application/vnd.ms-excel",
1834
1860
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
1835
1861
  "application/vnd.openxmlformats-officedocument.presentationml.presentation",
1836
1862
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@@ -3256,6 +3282,11 @@ var zGetSkillPath = z.object({
3256
3282
  skillID: z.string().regex(/^skl_[a-z2-7]{26}$/)
3257
3283
  });
3258
3284
  var zGetSkillResponse = zSkill;
3285
+ var zUpdateSkillPath = z.object({
3286
+ orgID: z.string().regex(/^org_[a-z2-7]{26}$/),
3287
+ skillID: z.string().regex(/^skl_[a-z2-7]{26}$/)
3288
+ });
3289
+ var zUpdateSkillResponse = zSkill;
3259
3290
  var zListSkillGrantsPath = z.object({
3260
3291
  orgID: z.string().regex(/^org_[a-z2-7]{26}$/),
3261
3292
  skillID: zSkillId
@@ -4099,7 +4130,7 @@ var listPersonalAccessTokens = (options) => (options?.client ?? client).get({
4099
4130
  name: "__Host-omnara_session",
4100
4131
  type: "apiKey"
4101
4132
  }],
4102
- url: "/api/v1/personal-access-tokens",
4133
+ url: "/personal-access-tokens",
4103
4134
  ...options
4104
4135
  });
4105
4136
  var createPersonalAccessToken = (options) => (options.client ?? client).post({
@@ -4109,7 +4140,7 @@ var createPersonalAccessToken = (options) => (options.client ?? client).post({
4109
4140
  name: "__Host-omnara_session",
4110
4141
  type: "apiKey"
4111
4142
  }, { name: "X-Omnara-Csrf", type: "apiKey" }],
4112
- url: "/api/v1/personal-access-tokens",
4143
+ url: "/personal-access-tokens",
4113
4144
  ...options,
4114
4145
  headers: {
4115
4146
  "Content-Type": "application/json",
@@ -4131,7 +4162,7 @@ var revokePersonalAccessToken = (options) => (options.client ?? client).post({
4131
4162
  },
4132
4163
  { name: "X-Omnara-Csrf", type: "apiKey" }
4133
4164
  ],
4134
- url: "/api/v1/personal-access-tokens/{tokenID}/revoke",
4165
+ url: "/personal-access-tokens/{tokenID}/revoke",
4135
4166
  ...options
4136
4167
  });
4137
4168
  var bootstrapDaemon = (options) => (options?.client ?? client).post({
@@ -4141,7 +4172,7 @@ var bootstrapDaemon = (options) => (options?.client ?? client).post({
4141
4172
  scheme: "bearer",
4142
4173
  type: "http"
4143
4174
  }],
4144
- url: "/api/v1/daemon/bootstrap",
4175
+ url: "/daemon/bootstrap",
4145
4176
  ...options
4146
4177
  });
4147
4178
  var recordMachineFailure = (options) => (options.client ?? client).post({
@@ -4152,7 +4183,7 @@ var recordMachineFailure = (options) => (options.client ?? client).post({
4152
4183
  scheme: "bearer",
4153
4184
  type: "http"
4154
4185
  }],
4155
- url: "/api/v1/daemon/failures",
4186
+ url: "/daemon/failures",
4156
4187
  ...options,
4157
4188
  headers: {
4158
4189
  "Content-Type": "text/plain",
@@ -4174,7 +4205,7 @@ var createOrganization = (options) => (options.client ?? client).post({
4174
4205
  },
4175
4206
  { name: "X-Omnara-Csrf", type: "apiKey" }
4176
4207
  ],
4177
- url: "/api/v1/orgs",
4208
+ url: "/orgs",
4178
4209
  ...options,
4179
4210
  headers: {
4180
4211
  "Content-Type": "application/json",
@@ -4196,7 +4227,7 @@ var deleteOrganization = (options) => (options.client ?? client).delete({
4196
4227
  },
4197
4228
  { name: "X-Omnara-Csrf", type: "apiKey" }
4198
4229
  ],
4199
- url: "/api/v1/orgs/{orgID}",
4230
+ url: "/orgs/{orgID}",
4200
4231
  ...options
4201
4232
  });
4202
4233
  var deleteCurrentUser = (options) => (options?.client ?? client).delete({
@@ -4214,7 +4245,7 @@ var deleteCurrentUser = (options) => (options?.client ?? client).delete({
4214
4245
  },
4215
4246
  { name: "X-Omnara-Csrf", type: "apiKey" }
4216
4247
  ],
4217
- url: "/api/v1/me",
4248
+ url: "/me",
4218
4249
  ...options
4219
4250
  });
4220
4251
  var getCurrentUser = (options) => (options?.client ?? client).get({
@@ -4228,7 +4259,7 @@ var getCurrentUser = (options) => (options?.client ?? client).get({
4228
4259
  name: "__Host-omnara_session",
4229
4260
  type: "apiKey"
4230
4261
  }],
4231
- url: "/api/v1/me",
4262
+ url: "/me",
4232
4263
  ...options
4233
4264
  });
4234
4265
  var listPendingInvitations = (options) => (options?.client ?? client).get({
@@ -4242,7 +4273,7 @@ var listPendingInvitations = (options) => (options?.client ?? client).get({
4242
4273
  name: "__Host-omnara_session",
4243
4274
  type: "apiKey"
4244
4275
  }],
4245
- url: "/api/v1/invitations",
4276
+ url: "/invitations",
4246
4277
  ...options
4247
4278
  });
4248
4279
  var acceptInvitation = (options) => (options.client ?? client).post({
@@ -4260,7 +4291,7 @@ var acceptInvitation = (options) => (options.client ?? client).post({
4260
4291
  },
4261
4292
  { name: "X-Omnara-Csrf", type: "apiKey" }
4262
4293
  ],
4263
- url: "/api/v1/invitations/{invitationID}/accept",
4294
+ url: "/invitations/{invitationID}/accept",
4264
4295
  ...options
4265
4296
  });
4266
4297
  var declineInvitation = (options) => (options.client ?? client).post({
@@ -4278,7 +4309,7 @@ var declineInvitation = (options) => (options.client ?? client).post({
4278
4309
  },
4279
4310
  { name: "X-Omnara-Csrf", type: "apiKey" }
4280
4311
  ],
4281
- url: "/api/v1/invitations/{invitationID}/decline",
4312
+ url: "/invitations/{invitationID}/decline",
4282
4313
  ...options
4283
4314
  });
4284
4315
  var getOrgOverview = (options) => (options.client ?? client).get({
@@ -4292,7 +4323,7 @@ var getOrgOverview = (options) => (options.client ?? client).get({
4292
4323
  name: "__Host-omnara_session",
4293
4324
  type: "apiKey"
4294
4325
  }],
4295
- url: "/api/v1/orgs/{orgID}/overview",
4326
+ url: "/orgs/{orgID}/overview",
4296
4327
  ...options
4297
4328
  });
4298
4329
  var listVisibleProjects = (options) => (options.client ?? client).get({
@@ -4306,7 +4337,7 @@ var listVisibleProjects = (options) => (options.client ?? client).get({
4306
4337
  name: "__Host-omnara_session",
4307
4338
  type: "apiKey"
4308
4339
  }],
4309
- url: "/api/v1/orgs/{orgID}/projects",
4340
+ url: "/orgs/{orgID}/projects",
4310
4341
  ...options
4311
4342
  });
4312
4343
  var createProject = (options) => (options.client ?? client).post({
@@ -4324,7 +4355,7 @@ var createProject = (options) => (options.client ?? client).post({
4324
4355
  },
4325
4356
  { name: "X-Omnara-Csrf", type: "apiKey" }
4326
4357
  ],
4327
- url: "/api/v1/orgs/{orgID}/projects",
4358
+ url: "/orgs/{orgID}/projects",
4328
4359
  ...options,
4329
4360
  headers: {
4330
4361
  "Content-Type": "application/json",
@@ -4346,7 +4377,7 @@ var deleteProject = (options) => (options.client ?? client).delete({
4346
4377
  },
4347
4378
  { name: "X-Omnara-Csrf", type: "apiKey" }
4348
4379
  ],
4349
- url: "/api/v1/orgs/{orgID}/projects/{projectID}",
4380
+ url: "/orgs/{orgID}/projects/{projectID}",
4350
4381
  ...options
4351
4382
  });
4352
4383
  var listOrgMembers = (options) => (options.client ?? client).get({
@@ -4360,7 +4391,7 @@ var listOrgMembers = (options) => (options.client ?? client).get({
4360
4391
  name: "__Host-omnara_session",
4361
4392
  type: "apiKey"
4362
4393
  }],
4363
- url: "/api/v1/orgs/{orgID}/members",
4394
+ url: "/orgs/{orgID}/members",
4364
4395
  ...options
4365
4396
  });
4366
4397
  var removeOrgMember = (options) => (options.client ?? client).delete({
@@ -4378,7 +4409,7 @@ var removeOrgMember = (options) => (options.client ?? client).delete({
4378
4409
  },
4379
4410
  { name: "X-Omnara-Csrf", type: "apiKey" }
4380
4411
  ],
4381
- url: "/api/v1/orgs/{orgID}/members/{userID}",
4412
+ url: "/orgs/{orgID}/members/{userID}",
4382
4413
  ...options
4383
4414
  });
4384
4415
  var updateOrgMember = (options) => (options.client ?? client).patch({
@@ -4396,7 +4427,7 @@ var updateOrgMember = (options) => (options.client ?? client).patch({
4396
4427
  },
4397
4428
  { name: "X-Omnara-Csrf", type: "apiKey" }
4398
4429
  ],
4399
- url: "/api/v1/orgs/{orgID}/members/{userID}",
4430
+ url: "/orgs/{orgID}/members/{userID}",
4400
4431
  ...options,
4401
4432
  headers: {
4402
4433
  "Content-Type": "application/json",
@@ -4414,7 +4445,7 @@ var listMemberProjectAccess = (options) => (options.client ?? client).get({
4414
4445
  name: "__Host-omnara_session",
4415
4446
  type: "apiKey"
4416
4447
  }],
4417
- url: "/api/v1/orgs/{orgID}/members/{userID}/projects",
4448
+ url: "/orgs/{orgID}/members/{userID}/projects",
4418
4449
  ...options
4419
4450
  });
4420
4451
  var removeMemberProjectAccess = (options) => (options.client ?? client).delete({
@@ -4432,7 +4463,7 @@ var removeMemberProjectAccess = (options) => (options.client ?? client).delete({
4432
4463
  },
4433
4464
  { name: "X-Omnara-Csrf", type: "apiKey" }
4434
4465
  ],
4435
- url: "/api/v1/orgs/{orgID}/members/{userID}/projects/{projectID}",
4466
+ url: "/orgs/{orgID}/members/{userID}/projects/{projectID}",
4436
4467
  ...options
4437
4468
  });
4438
4469
  var setMemberProjectAccess = (options) => (options.client ?? client).put({
@@ -4450,7 +4481,7 @@ var setMemberProjectAccess = (options) => (options.client ?? client).put({
4450
4481
  },
4451
4482
  { name: "X-Omnara-Csrf", type: "apiKey" }
4452
4483
  ],
4453
- url: "/api/v1/orgs/{orgID}/members/{userID}/projects/{projectID}",
4484
+ url: "/orgs/{orgID}/members/{userID}/projects/{projectID}",
4454
4485
  ...options,
4455
4486
  headers: {
4456
4487
  "Content-Type": "application/json",
@@ -4468,7 +4499,7 @@ var listOrgApiKeys = (options) => (options.client ?? client).get({
4468
4499
  name: "__Host-omnara_session",
4469
4500
  type: "apiKey"
4470
4501
  }],
4471
- url: "/api/v1/orgs/{orgID}/api-keys",
4502
+ url: "/orgs/{orgID}/api-keys",
4472
4503
  ...options
4473
4504
  });
4474
4505
  var createOrgApiKey = (options) => (options.client ?? client).post({
@@ -4478,7 +4509,7 @@ var createOrgApiKey = (options) => (options.client ?? client).post({
4478
4509
  name: "__Host-omnara_session",
4479
4510
  type: "apiKey"
4480
4511
  }, { name: "X-Omnara-Csrf", type: "apiKey" }],
4481
- url: "/api/v1/orgs/{orgID}/api-keys",
4512
+ url: "/orgs/{orgID}/api-keys",
4482
4513
  ...options,
4483
4514
  headers: {
4484
4515
  "Content-Type": "application/json",
@@ -4496,7 +4527,7 @@ var getOrgApiKey = (options) => (options.client ?? client).get({
4496
4527
  name: "__Host-omnara_session",
4497
4528
  type: "apiKey"
4498
4529
  }],
4499
- url: "/api/v1/orgs/{orgID}/api-keys/{keyID}",
4530
+ url: "/orgs/{orgID}/api-keys/{keyID}",
4500
4531
  ...options
4501
4532
  });
4502
4533
  var updateOrgApiKey = (options) => (options.client ?? client).patch({
@@ -4506,7 +4537,7 @@ var updateOrgApiKey = (options) => (options.client ?? client).patch({
4506
4537
  name: "__Host-omnara_session",
4507
4538
  type: "apiKey"
4508
4539
  }, { name: "X-Omnara-Csrf", type: "apiKey" }],
4509
- url: "/api/v1/orgs/{orgID}/api-keys/{keyID}",
4540
+ url: "/orgs/{orgID}/api-keys/{keyID}",
4510
4541
  ...options,
4511
4542
  headers: {
4512
4543
  "Content-Type": "application/json",
@@ -4520,7 +4551,7 @@ var revokeOrgApiKey = (options) => (options.client ?? client).post({
4520
4551
  name: "__Host-omnara_session",
4521
4552
  type: "apiKey"
4522
4553
  }, { name: "X-Omnara-Csrf", type: "apiKey" }],
4523
- url: "/api/v1/orgs/{orgID}/api-keys/{keyID}/revoke",
4554
+ url: "/orgs/{orgID}/api-keys/{keyID}/revoke",
4524
4555
  ...options
4525
4556
  });
4526
4557
  var listOrgApiKeyProjectAccess = (options) => (options.client ?? client).get({
@@ -4534,7 +4565,7 @@ var listOrgApiKeyProjectAccess = (options) => (options.client ?? client).get({
4534
4565
  name: "__Host-omnara_session",
4535
4566
  type: "apiKey"
4536
4567
  }],
4537
- url: "/api/v1/orgs/{orgID}/api-keys/{keyID}/projects",
4568
+ url: "/orgs/{orgID}/api-keys/{keyID}/projects",
4538
4569
  ...options
4539
4570
  });
4540
4571
  var removeOrgApiKeyProjectRole = (options) => (options.client ?? client).delete({
@@ -4544,7 +4575,7 @@ var removeOrgApiKeyProjectRole = (options) => (options.client ?? client).delete(
4544
4575
  name: "__Host-omnara_session",
4545
4576
  type: "apiKey"
4546
4577
  }, { name: "X-Omnara-Csrf", type: "apiKey" }],
4547
- url: "/api/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}",
4578
+ url: "/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}",
4548
4579
  ...options
4549
4580
  });
4550
4581
  var setOrgApiKeyProjectRole = (options) => (options.client ?? client).put({
@@ -4554,7 +4585,7 @@ var setOrgApiKeyProjectRole = (options) => (options.client ?? client).put({
4554
4585
  name: "__Host-omnara_session",
4555
4586
  type: "apiKey"
4556
4587
  }, { name: "X-Omnara-Csrf", type: "apiKey" }],
4557
- url: "/api/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}",
4588
+ url: "/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}",
4558
4589
  ...options,
4559
4590
  headers: {
4560
4591
  "Content-Type": "application/json",
@@ -4572,7 +4603,7 @@ var listOrgInvitations = (options) => (options.client ?? client).get({
4572
4603
  name: "__Host-omnara_session",
4573
4604
  type: "apiKey"
4574
4605
  }],
4575
- url: "/api/v1/orgs/{orgID}/invitations",
4606
+ url: "/orgs/{orgID}/invitations",
4576
4607
  ...options
4577
4608
  });
4578
4609
  var createOrgInvitation = (options) => (options.client ?? client).post({
@@ -4590,7 +4621,7 @@ var createOrgInvitation = (options) => (options.client ?? client).post({
4590
4621
  },
4591
4622
  { name: "X-Omnara-Csrf", type: "apiKey" }
4592
4623
  ],
4593
- url: "/api/v1/orgs/{orgID}/invitations",
4624
+ url: "/orgs/{orgID}/invitations",
4594
4625
  ...options,
4595
4626
  headers: {
4596
4627
  "Content-Type": "application/json",
@@ -4612,7 +4643,7 @@ var deleteOrgInvitation = (options) => (options.client ?? client).delete({
4612
4643
  },
4613
4644
  { name: "X-Omnara-Csrf", type: "apiKey" }
4614
4645
  ],
4615
- url: "/api/v1/orgs/{orgID}/invitations/{invitationID}",
4646
+ url: "/orgs/{orgID}/invitations/{invitationID}",
4616
4647
  ...options
4617
4648
  });
4618
4649
  var listSkills = (options) => (options.client ?? client).get({
@@ -4626,7 +4657,7 @@ var listSkills = (options) => (options.client ?? client).get({
4626
4657
  name: "__Host-omnara_session",
4627
4658
  type: "apiKey"
4628
4659
  }],
4629
- url: "/api/v1/orgs/{orgID}/skills",
4660
+ url: "/orgs/{orgID}/skills",
4630
4661
  ...options
4631
4662
  });
4632
4663
  var createSkill = (options) => (options.client ?? client).post({
@@ -4645,7 +4676,7 @@ var createSkill = (options) => (options.client ?? client).post({
4645
4676
  },
4646
4677
  { name: "X-Omnara-Csrf", type: "apiKey" }
4647
4678
  ],
4648
- url: "/api/v1/orgs/{orgID}/skills",
4679
+ url: "/orgs/{orgID}/skills",
4649
4680
  ...options,
4650
4681
  headers: {
4651
4682
  "Content-Type": null,
@@ -4667,7 +4698,7 @@ var deleteSkill = (options) => (options.client ?? client).delete({
4667
4698
  },
4668
4699
  { name: "X-Omnara-Csrf", type: "apiKey" }
4669
4700
  ],
4670
- url: "/api/v1/orgs/{orgID}/skills/{skillID}",
4701
+ url: "/orgs/{orgID}/skills/{skillID}",
4671
4702
  ...options
4672
4703
  });
4673
4704
  var getSkill = (options) => (options.client ?? client).get({
@@ -4681,9 +4712,32 @@ var getSkill = (options) => (options.client ?? client).get({
4681
4712
  name: "__Host-omnara_session",
4682
4713
  type: "apiKey"
4683
4714
  }],
4684
- url: "/api/v1/orgs/{orgID}/skills/{skillID}",
4715
+ url: "/orgs/{orgID}/skills/{skillID}",
4685
4716
  ...options
4686
4717
  });
4718
+ var updateSkill = (options) => (options.client ?? client).post({
4719
+ ...formDataBodySerializer,
4720
+ responseValidator: async (data) => await validateResponse(zUpdateSkillResponse, data),
4721
+ security: [
4722
+ {
4723
+ key: "bearerAuth",
4724
+ scheme: "bearer",
4725
+ type: "http"
4726
+ },
4727
+ {
4728
+ in: "cookie",
4729
+ name: "__Host-omnara_session",
4730
+ type: "apiKey"
4731
+ },
4732
+ { name: "X-Omnara-Csrf", type: "apiKey" }
4733
+ ],
4734
+ url: "/orgs/{orgID}/skills/{skillID}",
4735
+ ...options,
4736
+ headers: {
4737
+ "Content-Type": null,
4738
+ ...options.headers
4739
+ }
4740
+ });
4687
4741
  var listSkillGrants = (options) => (options.client ?? client).get({
4688
4742
  responseValidator: async (data) => await validateResponse(zListSkillGrantsResponse2, data),
4689
4743
  security: [{
@@ -4695,7 +4749,7 @@ var listSkillGrants = (options) => (options.client ?? client).get({
4695
4749
  name: "__Host-omnara_session",
4696
4750
  type: "apiKey"
4697
4751
  }],
4698
- url: "/api/v1/orgs/{orgID}/skills/{skillID}/grants",
4752
+ url: "/orgs/{orgID}/skills/{skillID}/grants",
4699
4753
  ...options
4700
4754
  });
4701
4755
  var createSkillGrant = (options) => (options.client ?? client).post({
@@ -4713,7 +4767,7 @@ var createSkillGrant = (options) => (options.client ?? client).post({
4713
4767
  },
4714
4768
  { name: "X-Omnara-Csrf", type: "apiKey" }
4715
4769
  ],
4716
- url: "/api/v1/orgs/{orgID}/skills/{skillID}/grants",
4770
+ url: "/orgs/{orgID}/skills/{skillID}/grants",
4717
4771
  ...options,
4718
4772
  headers: {
4719
4773
  "Content-Type": "application/json",
@@ -4735,7 +4789,7 @@ var deleteSkillGrant = (options) => (options.client ?? client).delete({
4735
4789
  },
4736
4790
  { name: "X-Omnara-Csrf", type: "apiKey" }
4737
4791
  ],
4738
- url: "/api/v1/orgs/{orgID}/skills/{skillID}/grants/{grantID}",
4792
+ url: "/orgs/{orgID}/skills/{skillID}/grants/{grantID}",
4739
4793
  ...options
4740
4794
  });
4741
4795
  var listProjectAvailableSkills = (options) => (options.client ?? client).get({
@@ -4749,7 +4803,7 @@ var listProjectAvailableSkills = (options) => (options.client ?? client).get({
4749
4803
  name: "__Host-omnara_session",
4750
4804
  type: "apiKey"
4751
4805
  }],
4752
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/skills",
4806
+ url: "/orgs/{orgID}/projects/{projectID}/skills",
4753
4807
  ...options
4754
4808
  });
4755
4809
  var listSecrets = (options) => (options.client ?? client).get({
@@ -4763,7 +4817,7 @@ var listSecrets = (options) => (options.client ?? client).get({
4763
4817
  name: "__Host-omnara_session",
4764
4818
  type: "apiKey"
4765
4819
  }],
4766
- url: "/api/v1/orgs/{orgID}/secrets",
4820
+ url: "/orgs/{orgID}/secrets",
4767
4821
  ...options
4768
4822
  });
4769
4823
  var createSecret = (options) => (options.client ?? client).post({
@@ -4781,7 +4835,7 @@ var createSecret = (options) => (options.client ?? client).post({
4781
4835
  },
4782
4836
  { name: "X-Omnara-Csrf", type: "apiKey" }
4783
4837
  ],
4784
- url: "/api/v1/orgs/{orgID}/secrets",
4838
+ url: "/orgs/{orgID}/secrets",
4785
4839
  ...options,
4786
4840
  headers: {
4787
4841
  "Content-Type": "application/json",
@@ -4803,7 +4857,7 @@ var startSecretMcpoAuth = (options) => (options.client ?? client).post({
4803
4857
  },
4804
4858
  { name: "X-Omnara-Csrf", type: "apiKey" }
4805
4859
  ],
4806
- url: "/api/v1/orgs/{orgID}/secrets/mcp-oauth",
4860
+ url: "/orgs/{orgID}/secrets/mcp-oauth",
4807
4861
  ...options,
4808
4862
  headers: {
4809
4863
  "Content-Type": "application/json",
@@ -4825,7 +4879,7 @@ var deleteSecret = (options) => (options.client ?? client).delete({
4825
4879
  },
4826
4880
  { name: "X-Omnara-Csrf", type: "apiKey" }
4827
4881
  ],
4828
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}",
4882
+ url: "/orgs/{orgID}/secrets/{secretID}",
4829
4883
  ...options
4830
4884
  });
4831
4885
  var getSecret = (options) => (options.client ?? client).get({
@@ -4839,7 +4893,7 @@ var getSecret = (options) => (options.client ?? client).get({
4839
4893
  name: "__Host-omnara_session",
4840
4894
  type: "apiKey"
4841
4895
  }],
4842
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}",
4896
+ url: "/orgs/{orgID}/secrets/{secretID}",
4843
4897
  ...options
4844
4898
  });
4845
4899
  var updateSecret = (options) => (options.client ?? client).patch({
@@ -4857,7 +4911,7 @@ var updateSecret = (options) => (options.client ?? client).patch({
4857
4911
  },
4858
4912
  { name: "X-Omnara-Csrf", type: "apiKey" }
4859
4913
  ],
4860
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}",
4914
+ url: "/orgs/{orgID}/secrets/{secretID}",
4861
4915
  ...options,
4862
4916
  headers: {
4863
4917
  "Content-Type": "application/json",
@@ -4879,7 +4933,7 @@ var createSecretVersion = (options) => (options.client ?? client).post({
4879
4933
  },
4880
4934
  { name: "X-Omnara-Csrf", type: "apiKey" }
4881
4935
  ],
4882
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}/versions",
4936
+ url: "/orgs/{orgID}/secrets/{secretID}/versions",
4883
4937
  ...options,
4884
4938
  headers: {
4885
4939
  "Content-Type": "application/json",
@@ -4897,7 +4951,7 @@ var listSecretGrants = (options) => (options.client ?? client).get({
4897
4951
  name: "__Host-omnara_session",
4898
4952
  type: "apiKey"
4899
4953
  }],
4900
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}/grants",
4954
+ url: "/orgs/{orgID}/secrets/{secretID}/grants",
4901
4955
  ...options
4902
4956
  });
4903
4957
  var createSecretGrant = (options) => (options.client ?? client).post({
@@ -4915,7 +4969,7 @@ var createSecretGrant = (options) => (options.client ?? client).post({
4915
4969
  },
4916
4970
  { name: "X-Omnara-Csrf", type: "apiKey" }
4917
4971
  ],
4918
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}/grants",
4972
+ url: "/orgs/{orgID}/secrets/{secretID}/grants",
4919
4973
  ...options,
4920
4974
  headers: {
4921
4975
  "Content-Type": "application/json",
@@ -4937,7 +4991,7 @@ var deleteSecretGrant = (options) => (options.client ?? client).delete({
4937
4991
  },
4938
4992
  { name: "X-Omnara-Csrf", type: "apiKey" }
4939
4993
  ],
4940
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}/grants/{grantID}",
4994
+ url: "/orgs/{orgID}/secrets/{secretID}/grants/{grantID}",
4941
4995
  ...options
4942
4996
  });
4943
4997
  var listIntegrationInstalls = (options) => (options.client ?? client).get({
@@ -4951,7 +5005,7 @@ var listIntegrationInstalls = (options) => (options.client ?? client).get({
4951
5005
  name: "__Host-omnara_session",
4952
5006
  type: "apiKey"
4953
5007
  }],
4954
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/integration-installs",
5008
+ url: "/orgs/{orgID}/projects/{projectID}/integration-installs",
4955
5009
  ...options
4956
5010
  });
4957
5011
  var deleteIntegrationInstall = (options) => (options.client ?? client).delete({
@@ -4969,7 +5023,7 @@ var deleteIntegrationInstall = (options) => (options.client ?? client).delete({
4969
5023
  },
4970
5024
  { name: "X-Omnara-Csrf", type: "apiKey" }
4971
5025
  ],
4972
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/integration-installs/{integrationInstallID}",
5026
+ url: "/orgs/{orgID}/projects/{projectID}/integration-installs/{integrationInstallID}",
4973
5027
  ...options
4974
5028
  });
4975
5029
  var createAgentConfig = (options) => (options.client ?? client).post({
@@ -4987,7 +5041,7 @@ var createAgentConfig = (options) => (options.client ?? client).post({
4987
5041
  },
4988
5042
  { name: "X-Omnara-Csrf", type: "apiKey" }
4989
5043
  ],
4990
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-configs",
5044
+ url: "/orgs/{orgID}/projects/{projectID}/agent-configs",
4991
5045
  ...options,
4992
5046
  headers: {
4993
5047
  "Content-Type": "application/json",
@@ -5005,7 +5059,7 @@ var getToolCatalog = (options) => (options?.client ?? client).get({
5005
5059
  name: "__Host-omnara_session",
5006
5060
  type: "apiKey"
5007
5061
  }],
5008
- url: "/api/v1/tool-catalog",
5062
+ url: "/tool-catalog",
5009
5063
  ...options
5010
5064
  });
5011
5065
  var listMcpServers = (options) => (options?.client ?? client).get({
@@ -5019,7 +5073,7 @@ var listMcpServers = (options) => (options?.client ?? client).get({
5019
5073
  name: "__Host-omnara_session",
5020
5074
  type: "apiKey"
5021
5075
  }],
5022
- url: "/api/v1/mcp-servers",
5076
+ url: "/mcp-servers",
5023
5077
  ...options
5024
5078
  });
5025
5079
  var listMcpServerTools = (options) => (options.client ?? client).post({
@@ -5037,7 +5091,7 @@ var listMcpServerTools = (options) => (options.client ?? client).post({
5037
5091
  },
5038
5092
  { name: "X-Omnara-Csrf", type: "apiKey" }
5039
5093
  ],
5040
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/mcp-servers/tools",
5094
+ url: "/orgs/{orgID}/projects/{projectID}/mcp-servers/tools",
5041
5095
  ...options,
5042
5096
  headers: {
5043
5097
  "Content-Type": "application/json",
@@ -5055,7 +5109,7 @@ var getAgentConfig = (options) => (options.client ?? client).get({
5055
5109
  name: "__Host-omnara_session",
5056
5110
  type: "apiKey"
5057
5111
  }],
5058
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-configs/{agentConfigID}",
5112
+ url: "/orgs/{orgID}/projects/{projectID}/agent-configs/{agentConfigID}",
5059
5113
  ...options
5060
5114
  });
5061
5115
  var listAgentProfiles = (options) => (options.client ?? client).get({
@@ -5069,7 +5123,7 @@ var listAgentProfiles = (options) => (options.client ?? client).get({
5069
5123
  name: "__Host-omnara_session",
5070
5124
  type: "apiKey"
5071
5125
  }],
5072
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles",
5126
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles",
5073
5127
  ...options
5074
5128
  });
5075
5129
  var createAgentProfile = (options) => (options.client ?? client).post({
@@ -5087,7 +5141,7 @@ var createAgentProfile = (options) => (options.client ?? client).post({
5087
5141
  },
5088
5142
  { name: "X-Omnara-Csrf", type: "apiKey" }
5089
5143
  ],
5090
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles",
5144
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles",
5091
5145
  ...options,
5092
5146
  headers: {
5093
5147
  "Content-Type": "application/json",
@@ -5109,7 +5163,7 @@ var deleteAgentProfile = (options) => (options.client ?? client).delete({
5109
5163
  },
5110
5164
  { name: "X-Omnara-Csrf", type: "apiKey" }
5111
5165
  ],
5112
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}",
5166
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}",
5113
5167
  ...options
5114
5168
  });
5115
5169
  var getAgentProfile = (options) => (options.client ?? client).get({
@@ -5123,7 +5177,7 @@ var getAgentProfile = (options) => (options.client ?? client).get({
5123
5177
  name: "__Host-omnara_session",
5124
5178
  type: "apiKey"
5125
5179
  }],
5126
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}",
5180
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}",
5127
5181
  ...options
5128
5182
  });
5129
5183
  var renameAgentProfile = (options) => (options.client ?? client).patch({
@@ -5141,7 +5195,7 @@ var renameAgentProfile = (options) => (options.client ?? client).patch({
5141
5195
  },
5142
5196
  { name: "X-Omnara-Csrf", type: "apiKey" }
5143
5197
  ],
5144
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}",
5198
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}",
5145
5199
  ...options,
5146
5200
  headers: {
5147
5201
  "Content-Type": "application/json",
@@ -5163,7 +5217,7 @@ var updateAgentProfile = (options) => (options.client ?? client).post({
5163
5217
  },
5164
5218
  { name: "X-Omnara-Csrf", type: "apiKey" }
5165
5219
  ],
5166
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}/config",
5220
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}/config",
5167
5221
  ...options,
5168
5222
  headers: {
5169
5223
  "Content-Type": "application/json",
@@ -5185,7 +5239,7 @@ var createIntegrationOAuthSetup = (options) => (options.client ?? client).post({
5185
5239
  },
5186
5240
  { name: "X-Omnara-Csrf", type: "apiKey" }
5187
5241
  ],
5188
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}/integration-oauth/setup",
5242
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}/integration-oauth/setup",
5189
5243
  ...options,
5190
5244
  headers: {
5191
5245
  "Content-Type": "application/json",
@@ -5207,7 +5261,7 @@ var createSlackSetup = (options) => (options.client ?? client).post({
5207
5261
  },
5208
5262
  { name: "X-Omnara-Csrf", type: "apiKey" }
5209
5263
  ],
5210
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}/slack-setup",
5264
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}/slack-setup",
5211
5265
  ...options,
5212
5266
  headers: {
5213
5267
  "Content-Type": "application/json",
@@ -5225,7 +5279,7 @@ var listCronTriggers = (options) => (options.client ?? client).get({
5225
5279
  name: "__Host-omnara_session",
5226
5280
  type: "apiKey"
5227
5281
  }],
5228
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/cron-triggers",
5282
+ url: "/orgs/{orgID}/projects/{projectID}/cron-triggers",
5229
5283
  ...options
5230
5284
  });
5231
5285
  var createCronTrigger = (options) => (options.client ?? client).post({
@@ -5243,7 +5297,7 @@ var createCronTrigger = (options) => (options.client ?? client).post({
5243
5297
  },
5244
5298
  { name: "X-Omnara-Csrf", type: "apiKey" }
5245
5299
  ],
5246
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/cron-triggers",
5300
+ url: "/orgs/{orgID}/projects/{projectID}/cron-triggers",
5247
5301
  ...options,
5248
5302
  headers: {
5249
5303
  "Content-Type": "application/json",
@@ -5265,7 +5319,7 @@ var deleteCronTrigger = (options) => (options.client ?? client).delete({
5265
5319
  },
5266
5320
  { name: "X-Omnara-Csrf", type: "apiKey" }
5267
5321
  ],
5268
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/cron-triggers/{cronTriggerID}",
5322
+ url: "/orgs/{orgID}/projects/{projectID}/cron-triggers/{cronTriggerID}",
5269
5323
  ...options
5270
5324
  });
5271
5325
  var getCronTrigger = (options) => (options.client ?? client).get({
@@ -5279,7 +5333,7 @@ var getCronTrigger = (options) => (options.client ?? client).get({
5279
5333
  name: "__Host-omnara_session",
5280
5334
  type: "apiKey"
5281
5335
  }],
5282
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/cron-triggers/{cronTriggerID}",
5336
+ url: "/orgs/{orgID}/projects/{projectID}/cron-triggers/{cronTriggerID}",
5283
5337
  ...options
5284
5338
  });
5285
5339
  var updateCronTrigger = (options) => (options.client ?? client).patch({
@@ -5297,7 +5351,7 @@ var updateCronTrigger = (options) => (options.client ?? client).patch({
5297
5351
  },
5298
5352
  { name: "X-Omnara-Csrf", type: "apiKey" }
5299
5353
  ],
5300
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/cron-triggers/{cronTriggerID}",
5354
+ url: "/orgs/{orgID}/projects/{projectID}/cron-triggers/{cronTriggerID}",
5301
5355
  ...options,
5302
5356
  headers: {
5303
5357
  "Content-Type": "application/json",
@@ -5315,7 +5369,7 @@ var listAgents = (options) => (options.client ?? client).get({
5315
5369
  name: "__Host-omnara_session",
5316
5370
  type: "apiKey"
5317
5371
  }],
5318
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents",
5372
+ url: "/orgs/{orgID}/projects/{projectID}/agents",
5319
5373
  ...options
5320
5374
  });
5321
5375
  var createAgent = (options) => (options.client ?? client).post({
@@ -5333,7 +5387,7 @@ var createAgent = (options) => (options.client ?? client).post({
5333
5387
  },
5334
5388
  { name: "X-Omnara-Csrf", type: "apiKey" }
5335
5389
  ],
5336
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents",
5390
+ url: "/orgs/{orgID}/projects/{projectID}/agents",
5337
5391
  ...options,
5338
5392
  headers: {
5339
5393
  "Content-Type": "application/json",
@@ -5351,7 +5405,7 @@ var getAgent = (options) => (options.client ?? client).get({
5351
5405
  name: "__Host-omnara_session",
5352
5406
  type: "apiKey"
5353
5407
  }],
5354
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}",
5408
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}",
5355
5409
  ...options
5356
5410
  });
5357
5411
  var archiveAgent = (options) => (options.client ?? client).post({
@@ -5369,7 +5423,7 @@ var archiveAgent = (options) => (options.client ?? client).post({
5369
5423
  },
5370
5424
  { name: "X-Omnara-Csrf", type: "apiKey" }
5371
5425
  ],
5372
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive",
5426
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive",
5373
5427
  ...options
5374
5428
  });
5375
5429
  var updateAgentConfig = (options) => (options.client ?? client).post({
@@ -5387,7 +5441,7 @@ var updateAgentConfig = (options) => (options.client ?? client).post({
5387
5441
  },
5388
5442
  { name: "X-Omnara-Csrf", type: "apiKey" }
5389
5443
  ],
5390
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/config",
5444
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/config",
5391
5445
  ...options,
5392
5446
  headers: {
5393
5447
  "Content-Type": "application/json",
@@ -5409,7 +5463,7 @@ var createAgentInput = (options) => (options.client ?? client).post({
5409
5463
  },
5410
5464
  { name: "X-Omnara-Csrf", type: "apiKey" }
5411
5465
  ],
5412
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs",
5466
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs",
5413
5467
  ...options,
5414
5468
  headers: {
5415
5469
  "Content-Type": "application/json",
@@ -5427,7 +5481,7 @@ var listToolCalls = (options) => (options.client ?? client).get({
5427
5481
  name: "__Host-omnara_session",
5428
5482
  type: "apiKey"
5429
5483
  }],
5430
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/tool-calls",
5484
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/tool-calls",
5431
5485
  ...options
5432
5486
  });
5433
5487
  var submitToolCallResult = (options) => (options.client ?? client).post({
@@ -5445,7 +5499,7 @@ var submitToolCallResult = (options) => (options.client ?? client).post({
5445
5499
  },
5446
5500
  { name: "X-Omnara-Csrf", type: "apiKey" }
5447
5501
  ],
5448
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/tool-calls/{toolCallID}/result",
5502
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/tool-calls/{toolCallID}/result",
5449
5503
  ...options,
5450
5504
  headers: {
5451
5505
  "Content-Type": "application/json",
@@ -5463,7 +5517,7 @@ var listTurns = (options) => (options.client ?? client).get({
5463
5517
  name: "__Host-omnara_session",
5464
5518
  type: "apiKey"
5465
5519
  }],
5466
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns",
5520
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns",
5467
5521
  ...options
5468
5522
  });
5469
5523
  var listTurnEvents = (options) => (options.client ?? client).get({
@@ -5477,7 +5531,7 @@ var listTurnEvents = (options) => (options.client ?? client).get({
5477
5531
  name: "__Host-omnara_session",
5478
5532
  type: "apiKey"
5479
5533
  }],
5480
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns/{turnID}/events",
5534
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns/{turnID}/events",
5481
5535
  ...options
5482
5536
  });
5483
5537
  var listEvents = (options) => (options.client ?? client).get({
@@ -5491,7 +5545,7 @@ var listEvents = (options) => (options.client ?? client).get({
5491
5545
  name: "__Host-omnara_session",
5492
5546
  type: "apiKey"
5493
5547
  }],
5494
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/events",
5548
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/events",
5495
5549
  ...options
5496
5550
  });
5497
5551
  var streamEvents = (options) => (options.client ?? client).sse.get({
@@ -5505,7 +5559,7 @@ var streamEvents = (options) => (options.client ?? client).sse.get({
5505
5559
  name: "__Host-omnara_session",
5506
5560
  type: "apiKey"
5507
5561
  }],
5508
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/events/stream",
5562
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/events/stream",
5509
5563
  ...options
5510
5564
  });
5511
5565
  var cancelAgent = (options) => (options.client ?? client).post({
@@ -5523,7 +5577,7 @@ var cancelAgent = (options) => (options.client ?? client).post({
5523
5577
  },
5524
5578
  { name: "X-Omnara-Csrf", type: "apiKey" }
5525
5579
  ],
5526
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/cancel",
5580
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/cancel",
5527
5581
  ...options,
5528
5582
  headers: {
5529
5583
  "Content-Type": "application/json",
@@ -5541,7 +5595,7 @@ var listAgentInteractions = (options) => (options.client ?? client).get({
5541
5595
  name: "__Host-omnara_session",
5542
5596
  type: "apiKey"
5543
5597
  }],
5544
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/interactions",
5598
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/interactions",
5545
5599
  ...options
5546
5600
  });
5547
5601
  var resolveAgentInteraction = (options) => (options.client ?? client).post({
@@ -5559,7 +5613,7 @@ var resolveAgentInteraction = (options) => (options.client ?? client).post({
5559
5613
  },
5560
5614
  { name: "X-Omnara-Csrf", type: "apiKey" }
5561
5615
  ],
5562
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/interactions/{interactionID}/resolve",
5616
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/interactions/{interactionID}/resolve",
5563
5617
  ...options,
5564
5618
  headers: {
5565
5619
  "Content-Type": "application/json",
@@ -5577,7 +5631,7 @@ var listQueuedBacklogInputs = (options) => (options.client ?? client).get({
5577
5631
  name: "__Host-omnara_session",
5578
5632
  type: "apiKey"
5579
5633
  }],
5580
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/backlog",
5634
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/backlog",
5581
5635
  ...options
5582
5636
  });
5583
5637
  var cancelQueuedBacklogInput = (options) => (options.client ?? client).post({
@@ -5595,7 +5649,7 @@ var cancelQueuedBacklogInput = (options) => (options.client ?? client).post({
5595
5649
  },
5596
5650
  { name: "X-Omnara-Csrf", type: "apiKey" }
5597
5651
  ],
5598
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/{inputID}/cancel",
5652
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/{inputID}/cancel",
5599
5653
  ...options
5600
5654
  });
5601
5655
  var moveQueuedBacklogInput = (options) => (options.client ?? client).post({
@@ -5613,7 +5667,7 @@ var moveQueuedBacklogInput = (options) => (options.client ?? client).post({
5613
5667
  },
5614
5668
  { name: "X-Omnara-Csrf", type: "apiKey" }
5615
5669
  ],
5616
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/{inputID}/move",
5670
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/{inputID}/move",
5617
5671
  ...options,
5618
5672
  headers: {
5619
5673
  "Content-Type": "application/json",
@@ -5635,7 +5689,7 @@ var promoteQueuedInputToSteering = (options) => (options.client ?? client).post(
5635
5689
  },
5636
5690
  { name: "X-Omnara-Csrf", type: "apiKey" }
5637
5691
  ],
5638
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/{inputID}/promote_to_steering",
5692
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/{inputID}/promote_to_steering",
5639
5693
  ...options,
5640
5694
  headers: {
5641
5695
  "Content-Type": "application/json",
@@ -5657,7 +5711,7 @@ var demoteSteeringInputToQueued = (options) => (options.client ?? client).post({
5657
5711
  },
5658
5712
  { name: "X-Omnara-Csrf", type: "apiKey" }
5659
5713
  ],
5660
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/{inputID}/demote_to_queued",
5714
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/{inputID}/demote_to_queued",
5661
5715
  ...options
5662
5716
  });
5663
5717
  var getArtifact = (options) => (options.client ?? client).get({
@@ -5671,7 +5725,7 @@ var getArtifact = (options) => (options.client ?? client).get({
5671
5725
  name: "__Host-omnara_session",
5672
5726
  type: "apiKey"
5673
5727
  }],
5674
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/artifacts/{artifactID}",
5728
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/artifacts/{artifactID}",
5675
5729
  ...options
5676
5730
  });
5677
5731
  var getArtifactContent = (options) => (options.client ?? client).get({
@@ -5685,7 +5739,7 @@ var getArtifactContent = (options) => (options.client ?? client).get({
5685
5739
  name: "__Host-omnara_session",
5686
5740
  type: "apiKey"
5687
5741
  }],
5688
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/artifacts/{artifactID}/content",
5742
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/artifacts/{artifactID}/content",
5689
5743
  ...options
5690
5744
  });
5691
5745
  var listVisibleProjectMachines = (options) => (options.client ?? client).get({
@@ -5699,7 +5753,7 @@ var listVisibleProjectMachines = (options) => (options.client ?? client).get({
5699
5753
  name: "__Host-omnara_session",
5700
5754
  type: "apiKey"
5701
5755
  }],
5702
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machines",
5756
+ url: "/orgs/{orgID}/projects/{projectID}/machines",
5703
5757
  ...options
5704
5758
  });
5705
5759
  var listProjectMachineGrants = (options) => (options.client ?? client).get({
@@ -5713,7 +5767,7 @@ var listProjectMachineGrants = (options) => (options.client ?? client).get({
5713
5767
  name: "__Host-omnara_session",
5714
5768
  type: "apiKey"
5715
5769
  }],
5716
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-grants",
5770
+ url: "/orgs/{orgID}/projects/{projectID}/machine-grants",
5717
5771
  ...options
5718
5772
  });
5719
5773
  var createProjectMachineGrant = (options) => (options.client ?? client).post({
@@ -5731,7 +5785,7 @@ var createProjectMachineGrant = (options) => (options.client ?? client).post({
5731
5785
  },
5732
5786
  { name: "X-Omnara-Csrf", type: "apiKey" }
5733
5787
  ],
5734
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-grants",
5788
+ url: "/orgs/{orgID}/projects/{projectID}/machine-grants",
5735
5789
  ...options,
5736
5790
  headers: {
5737
5791
  "Content-Type": "application/json",
@@ -5753,7 +5807,7 @@ var deleteProjectMachineGrant = (options) => (options.client ?? client).delete({
5753
5807
  },
5754
5808
  { name: "X-Omnara-Csrf", type: "apiKey" }
5755
5809
  ],
5756
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-grants/{grantID}",
5810
+ url: "/orgs/{orgID}/projects/{projectID}/machine-grants/{grantID}",
5757
5811
  ...options
5758
5812
  });
5759
5813
  var listProjectAvailableSecrets = (options) => (options.client ?? client).get({
@@ -5767,7 +5821,7 @@ var listProjectAvailableSecrets = (options) => (options.client ?? client).get({
5767
5821
  name: "__Host-omnara_session",
5768
5822
  type: "apiKey"
5769
5823
  }],
5770
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/secrets",
5824
+ url: "/orgs/{orgID}/projects/{projectID}/secrets",
5771
5825
  ...options
5772
5826
  });
5773
5827
  var getProjectAvailableSecret = (options) => (options.client ?? client).get({
@@ -5781,7 +5835,7 @@ var getProjectAvailableSecret = (options) => (options.client ?? client).get({
5781
5835
  name: "__Host-omnara_session",
5782
5836
  type: "apiKey"
5783
5837
  }],
5784
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/secrets/{secretID}",
5838
+ url: "/orgs/{orgID}/projects/{projectID}/secrets/{secretID}",
5785
5839
  ...options
5786
5840
  });
5787
5841
  var listActors = (options) => (options.client ?? client).get({
@@ -5795,7 +5849,7 @@ var listActors = (options) => (options.client ?? client).get({
5795
5849
  name: "__Host-omnara_session",
5796
5850
  type: "apiKey"
5797
5851
  }],
5798
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/actors",
5852
+ url: "/orgs/{orgID}/projects/{projectID}/actors",
5799
5853
  ...options
5800
5854
  });
5801
5855
  var putActor = (options) => (options.client ?? client).put({
@@ -5813,7 +5867,7 @@ var putActor = (options) => (options.client ?? client).put({
5813
5867
  },
5814
5868
  { name: "X-Omnara-Csrf", type: "apiKey" }
5815
5869
  ],
5816
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/actors",
5870
+ url: "/orgs/{orgID}/projects/{projectID}/actors",
5817
5871
  ...options,
5818
5872
  headers: {
5819
5873
  "Content-Type": "application/json",
@@ -5831,7 +5885,7 @@ var getActor = (options) => (options.client ?? client).get({
5831
5885
  name: "__Host-omnara_session",
5832
5886
  type: "apiKey"
5833
5887
  }],
5834
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/actors/{actorID}",
5888
+ url: "/orgs/{orgID}/projects/{projectID}/actors/{actorID}",
5835
5889
  ...options
5836
5890
  });
5837
5891
  var listVisibleMachines = (options) => (options.client ?? client).get({
@@ -5845,7 +5899,7 @@ var listVisibleMachines = (options) => (options.client ?? client).get({
5845
5899
  name: "__Host-omnara_session",
5846
5900
  type: "apiKey"
5847
5901
  }],
5848
- url: "/api/v1/orgs/{orgID}/machines",
5902
+ url: "/orgs/{orgID}/machines",
5849
5903
  ...options
5850
5904
  });
5851
5905
  var createMachine = (options) => (options.client ?? client).post({
@@ -5863,7 +5917,7 @@ var createMachine = (options) => (options.client ?? client).post({
5863
5917
  },
5864
5918
  { name: "X-Omnara-Csrf", type: "apiKey" }
5865
5919
  ],
5866
- url: "/api/v1/orgs/{orgID}/machines",
5920
+ url: "/orgs/{orgID}/machines",
5867
5921
  ...options,
5868
5922
  headers: {
5869
5923
  "Content-Type": "application/json",
@@ -5885,7 +5939,7 @@ var connectByoMachine = (options) => (options.client ?? client).post({
5885
5939
  },
5886
5940
  { name: "X-Omnara-Csrf", type: "apiKey" }
5887
5941
  ],
5888
- url: "/api/v1/orgs/{orgID}/machines/connect",
5942
+ url: "/orgs/{orgID}/machines/connect",
5889
5943
  ...options,
5890
5944
  headers: {
5891
5945
  "Content-Type": "application/json",
@@ -5907,7 +5961,7 @@ var deleteMachine = (options) => (options.client ?? client).delete({
5907
5961
  },
5908
5962
  { name: "X-Omnara-Csrf", type: "apiKey" }
5909
5963
  ],
5910
- url: "/api/v1/orgs/{orgID}/machines/{machineID}",
5964
+ url: "/orgs/{orgID}/machines/{machineID}",
5911
5965
  ...options
5912
5966
  });
5913
5967
  var getMachine = (options) => (options.client ?? client).get({
@@ -5921,7 +5975,7 @@ var getMachine = (options) => (options.client ?? client).get({
5921
5975
  name: "__Host-omnara_session",
5922
5976
  type: "apiKey"
5923
5977
  }],
5924
- url: "/api/v1/orgs/{orgID}/machines/{machineID}",
5978
+ url: "/orgs/{orgID}/machines/{machineID}",
5925
5979
  ...options
5926
5980
  });
5927
5981
  var updateMachine = (options) => (options.client ?? client).patch({
@@ -5939,7 +5993,7 @@ var updateMachine = (options) => (options.client ?? client).patch({
5939
5993
  },
5940
5994
  { name: "X-Omnara-Csrf", type: "apiKey" }
5941
5995
  ],
5942
- url: "/api/v1/orgs/{orgID}/machines/{machineID}",
5996
+ url: "/orgs/{orgID}/machines/{machineID}",
5943
5997
  ...options,
5944
5998
  headers: {
5945
5999
  "Content-Type": "application/json",
@@ -5957,7 +6011,7 @@ var listModelProviderConfigs = (options) => (options.client ?? client).get({
5957
6011
  name: "__Host-omnara_session",
5958
6012
  type: "apiKey"
5959
6013
  }],
5960
- url: "/api/v1/orgs/{orgID}/model-provider-configs",
6014
+ url: "/orgs/{orgID}/model-provider-configs",
5961
6015
  ...options
5962
6016
  });
5963
6017
  var createModelProviderConfig = (options) => (options.client ?? client).post({
@@ -5975,7 +6029,7 @@ var createModelProviderConfig = (options) => (options.client ?? client).post({
5975
6029
  },
5976
6030
  { name: "X-Omnara-Csrf", type: "apiKey" }
5977
6031
  ],
5978
- url: "/api/v1/orgs/{orgID}/model-provider-configs",
6032
+ url: "/orgs/{orgID}/model-provider-configs",
5979
6033
  ...options,
5980
6034
  headers: {
5981
6035
  "Content-Type": "application/json",
@@ -5997,7 +6051,7 @@ var deleteModelProviderConfig = (options) => (options.client ?? client).delete({
5997
6051
  },
5998
6052
  { name: "X-Omnara-Csrf", type: "apiKey" }
5999
6053
  ],
6000
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
6054
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
6001
6055
  ...options
6002
6056
  });
6003
6057
  var getModelProviderConfig = (options) => (options.client ?? client).get({
@@ -6011,7 +6065,7 @@ var getModelProviderConfig = (options) => (options.client ?? client).get({
6011
6065
  name: "__Host-omnara_session",
6012
6066
  type: "apiKey"
6013
6067
  }],
6014
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
6068
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
6015
6069
  ...options
6016
6070
  });
6017
6071
  var updateModelProviderConfig = (options) => (options.client ?? client).put({
@@ -6029,7 +6083,7 @@ var updateModelProviderConfig = (options) => (options.client ?? client).put({
6029
6083
  },
6030
6084
  { name: "X-Omnara-Csrf", type: "apiKey" }
6031
6085
  ],
6032
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
6086
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
6033
6087
  ...options,
6034
6088
  headers: {
6035
6089
  "Content-Type": "application/json",
@@ -6047,7 +6101,7 @@ var getModelCatalog = (options) => (options.client ?? client).get({
6047
6101
  name: "__Host-omnara_session",
6048
6102
  type: "apiKey"
6049
6103
  }],
6050
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/model-catalog",
6104
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/model-catalog",
6051
6105
  ...options
6052
6106
  });
6053
6107
  var listConfiguredModels = (options) => (options.client ?? client).get({
@@ -6061,7 +6115,7 @@ var listConfiguredModels = (options) => (options.client ?? client).get({
6061
6115
  name: "__Host-omnara_session",
6062
6116
  type: "apiKey"
6063
6117
  }],
6064
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models",
6118
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models",
6065
6119
  ...options
6066
6120
  });
6067
6121
  var createConfiguredModel = (options) => (options.client ?? client).post({
@@ -6079,7 +6133,7 @@ var createConfiguredModel = (options) => (options.client ?? client).post({
6079
6133
  },
6080
6134
  { name: "X-Omnara-Csrf", type: "apiKey" }
6081
6135
  ],
6082
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models",
6136
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models",
6083
6137
  ...options,
6084
6138
  headers: {
6085
6139
  "Content-Type": "application/json",
@@ -6101,7 +6155,7 @@ var deleteConfiguredModel = (options) => (options.client ?? client).delete({
6101
6155
  },
6102
6156
  { name: "X-Omnara-Csrf", type: "apiKey" }
6103
6157
  ],
6104
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models/{configuredModelID}",
6158
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models/{configuredModelID}",
6105
6159
  ...options
6106
6160
  });
6107
6161
  var updateConfiguredModel = (options) => (options.client ?? client).put({
@@ -6119,7 +6173,7 @@ var updateConfiguredModel = (options) => (options.client ?? client).put({
6119
6173
  },
6120
6174
  { name: "X-Omnara-Csrf", type: "apiKey" }
6121
6175
  ],
6122
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models/{configuredModelID}",
6176
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models/{configuredModelID}",
6123
6177
  ...options,
6124
6178
  headers: {
6125
6179
  "Content-Type": "application/json",
@@ -6137,7 +6191,7 @@ var listProjectModelGrants = (options) => (options.client ?? client).get({
6137
6191
  name: "__Host-omnara_session",
6138
6192
  type: "apiKey"
6139
6193
  }],
6140
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/model-grants",
6194
+ url: "/orgs/{orgID}/projects/{projectID}/model-grants",
6141
6195
  ...options
6142
6196
  });
6143
6197
  var createProjectModelGrant = (options) => (options.client ?? client).post({
@@ -6155,7 +6209,7 @@ var createProjectModelGrant = (options) => (options.client ?? client).post({
6155
6209
  },
6156
6210
  { name: "X-Omnara-Csrf", type: "apiKey" }
6157
6211
  ],
6158
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/model-grants",
6212
+ url: "/orgs/{orgID}/projects/{projectID}/model-grants",
6159
6213
  ...options,
6160
6214
  headers: {
6161
6215
  "Content-Type": "application/json",
@@ -6177,7 +6231,7 @@ var deleteProjectModelGrant = (options) => (options.client ?? client).delete({
6177
6231
  },
6178
6232
  { name: "X-Omnara-Csrf", type: "apiKey" }
6179
6233
  ],
6180
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/model-grants/{modelGrantID}",
6234
+ url: "/orgs/{orgID}/projects/{projectID}/model-grants/{modelGrantID}",
6181
6235
  ...options
6182
6236
  });
6183
6237
  var updateProjectModelGrant = (options) => (options.client ?? client).patch({
@@ -6195,7 +6249,7 @@ var updateProjectModelGrant = (options) => (options.client ?? client).patch({
6195
6249
  },
6196
6250
  { name: "X-Omnara-Csrf", type: "apiKey" }
6197
6251
  ],
6198
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/model-grants/{modelGrantID}",
6252
+ url: "/orgs/{orgID}/projects/{projectID}/model-grants/{modelGrantID}",
6199
6253
  ...options,
6200
6254
  headers: {
6201
6255
  "Content-Type": "application/json",
@@ -6213,7 +6267,7 @@ var listMachinePools = (options) => (options.client ?? client).get({
6213
6267
  name: "__Host-omnara_session",
6214
6268
  type: "apiKey"
6215
6269
  }],
6216
- url: "/api/v1/orgs/{orgID}/machine-pools",
6270
+ url: "/orgs/{orgID}/machine-pools",
6217
6271
  ...options
6218
6272
  });
6219
6273
  var createMachinePool = (options) => (options.client ?? client).post({
@@ -6231,7 +6285,7 @@ var createMachinePool = (options) => (options.client ?? client).post({
6231
6285
  },
6232
6286
  { name: "X-Omnara-Csrf", type: "apiKey" }
6233
6287
  ],
6234
- url: "/api/v1/orgs/{orgID}/machine-pools",
6288
+ url: "/orgs/{orgID}/machine-pools",
6235
6289
  ...options,
6236
6290
  headers: {
6237
6291
  "Content-Type": "application/json",
@@ -6253,7 +6307,7 @@ var deleteMachinePool = (options) => (options.client ?? client).delete({
6253
6307
  },
6254
6308
  { name: "X-Omnara-Csrf", type: "apiKey" }
6255
6309
  ],
6256
- url: "/api/v1/orgs/{orgID}/machine-pools/{poolID}",
6310
+ url: "/orgs/{orgID}/machine-pools/{poolID}",
6257
6311
  ...options
6258
6312
  });
6259
6313
  var getMachinePool = (options) => (options.client ?? client).get({
@@ -6267,7 +6321,7 @@ var getMachinePool = (options) => (options.client ?? client).get({
6267
6321
  name: "__Host-omnara_session",
6268
6322
  type: "apiKey"
6269
6323
  }],
6270
- url: "/api/v1/orgs/{orgID}/machine-pools/{poolID}",
6324
+ url: "/orgs/{orgID}/machine-pools/{poolID}",
6271
6325
  ...options
6272
6326
  });
6273
6327
  var updateMachinePool = (options) => (options.client ?? client).put({
@@ -6285,7 +6339,7 @@ var updateMachinePool = (options) => (options.client ?? client).put({
6285
6339
  },
6286
6340
  { name: "X-Omnara-Csrf", type: "apiKey" }
6287
6341
  ],
6288
- url: "/api/v1/orgs/{orgID}/machine-pools/{poolID}",
6342
+ url: "/orgs/{orgID}/machine-pools/{poolID}",
6289
6343
  ...options,
6290
6344
  headers: {
6291
6345
  "Content-Type": "application/json",
@@ -6303,7 +6357,7 @@ var listProjectMachinePoolGrants = (options) => (options.client ?? client).get({
6303
6357
  name: "__Host-omnara_session",
6304
6358
  type: "apiKey"
6305
6359
  }],
6306
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants",
6360
+ url: "/orgs/{orgID}/projects/{projectID}/machine-pool-grants",
6307
6361
  ...options
6308
6362
  });
6309
6363
  var createProjectMachinePoolGrant = (options) => (options.client ?? client).post({
@@ -6321,7 +6375,7 @@ var createProjectMachinePoolGrant = (options) => (options.client ?? client).post
6321
6375
  },
6322
6376
  { name: "X-Omnara-Csrf", type: "apiKey" }
6323
6377
  ],
6324
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants",
6378
+ url: "/orgs/{orgID}/projects/{projectID}/machine-pool-grants",
6325
6379
  ...options,
6326
6380
  headers: {
6327
6381
  "Content-Type": "application/json",
@@ -6343,7 +6397,7 @@ var deleteProjectMachinePoolGrant = (options) => (options.client ?? client).dele
6343
6397
  },
6344
6398
  { name: "X-Omnara-Csrf", type: "apiKey" }
6345
6399
  ],
6346
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants/{poolGrantID}",
6400
+ url: "/orgs/{orgID}/projects/{projectID}/machine-pool-grants/{poolGrantID}",
6347
6401
  ...options
6348
6402
  });
6349
6403
  var getProjectMachinePoolGrant = (options) => (options.client ?? client).get({
@@ -6357,7 +6411,7 @@ var getProjectMachinePoolGrant = (options) => (options.client ?? client).get({
6357
6411
  name: "__Host-omnara_session",
6358
6412
  type: "apiKey"
6359
6413
  }],
6360
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants/{poolGrantID}",
6414
+ url: "/orgs/{orgID}/projects/{projectID}/machine-pool-grants/{poolGrantID}",
6361
6415
  ...options
6362
6416
  });
6363
6417
  var updateProjectMachinePoolGrant = (options) => (options.client ?? client).patch({
@@ -6375,7 +6429,7 @@ var updateProjectMachinePoolGrant = (options) => (options.client ?? client).patc
6375
6429
  },
6376
6430
  { name: "X-Omnara-Csrf", type: "apiKey" }
6377
6431
  ],
6378
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants/{poolGrantID}",
6432
+ url: "/orgs/{orgID}/projects/{projectID}/machine-pool-grants/{poolGrantID}",
6379
6433
  ...options,
6380
6434
  headers: {
6381
6435
  "Content-Type": "application/json",
@@ -6393,7 +6447,7 @@ var listByoMachineDaemonTokens = (options) => (options.client ?? client).get({
6393
6447
  name: "__Host-omnara_session",
6394
6448
  type: "apiKey"
6395
6449
  }],
6396
- url: "/api/v1/orgs/{orgID}/machines/{machineID}/daemon-tokens",
6450
+ url: "/orgs/{orgID}/machines/{machineID}/daemon-tokens",
6397
6451
  ...options
6398
6452
  });
6399
6453
  var createByoMachineDaemonToken = (options) => (options.client ?? client).post({
@@ -6411,7 +6465,7 @@ var createByoMachineDaemonToken = (options) => (options.client ?? client).post({
6411
6465
  },
6412
6466
  { name: "X-Omnara-Csrf", type: "apiKey" }
6413
6467
  ],
6414
- url: "/api/v1/orgs/{orgID}/machines/{machineID}/daemon-tokens",
6468
+ url: "/orgs/{orgID}/machines/{machineID}/daemon-tokens",
6415
6469
  ...options,
6416
6470
  headers: {
6417
6471
  "Content-Type": "application/json",
@@ -6433,7 +6487,7 @@ var revokeMachineDaemonToken = (options) => (options.client ?? client).post({
6433
6487
  },
6434
6488
  { name: "X-Omnara-Csrf", type: "apiKey" }
6435
6489
  ],
6436
- url: "/api/v1/orgs/{orgID}/machines/{machineID}/daemon-tokens/{tokenID}/revoke",
6490
+ url: "/orgs/{orgID}/machines/{machineID}/daemon-tokens/{tokenID}/revoke",
6437
6491
  ...options
6438
6492
  });
6439
6493
  var registerMachineDaemonRuntime = (options) => (options.client ?? client).post({
@@ -6443,7 +6497,7 @@ var registerMachineDaemonRuntime = (options) => (options.client ?? client).post(
6443
6497
  scheme: "bearer",
6444
6498
  type: "http"
6445
6499
  }],
6446
- url: "/api/v1/daemon/runtimes",
6500
+ url: "/daemon/runtimes",
6447
6501
  ...options,
6448
6502
  headers: {
6449
6503
  "Content-Type": "application/json",
@@ -6456,7 +6510,7 @@ var socketMachineDaemonRuntime = (options) => (options.client ?? client).get({
6456
6510
  scheme: "bearer",
6457
6511
  type: "http"
6458
6512
  }],
6459
- url: "/api/v1/daemon/runtimes/{runtimeID}/socket",
6513
+ url: "/daemon/runtimes/{runtimeID}/socket",
6460
6514
  ...options
6461
6515
  });
6462
6516
  var endMachineDaemonRuntime = (options) => (options.client ?? client).post({
@@ -6466,7 +6520,7 @@ var endMachineDaemonRuntime = (options) => (options.client ?? client).post({
6466
6520
  scheme: "bearer",
6467
6521
  type: "http"
6468
6522
  }],
6469
- url: "/api/v1/daemon/runtimes/{runtimeID}/end",
6523
+ url: "/daemon/runtimes/{runtimeID}/end",
6470
6524
  ...options
6471
6525
  });
6472
6526
  var sleepMachineDaemonRuntime = (options) => (options.client ?? client).post({
@@ -6476,7 +6530,7 @@ var sleepMachineDaemonRuntime = (options) => (options.client ?? client).post({
6476
6530
  scheme: "bearer",
6477
6531
  type: "http"
6478
6532
  }],
6479
- url: "/api/v1/daemon/runtimes/{runtimeID}/sleep",
6533
+ url: "/daemon/runtimes/{runtimeID}/sleep",
6480
6534
  ...options
6481
6535
  });
6482
6536
  var getDaemonSkillArchive = (options) => (options.client ?? client).get({
@@ -6486,7 +6540,7 @@ var getDaemonSkillArchive = (options) => (options.client ?? client).get({
6486
6540
  scheme: "bearer",
6487
6541
  type: "http"
6488
6542
  }],
6489
- url: "/api/v1/daemon/skills/{skillID}/archive",
6543
+ url: "/daemon/skills/{skillID}/archive",
6490
6544
  ...options
6491
6545
  });
6492
6546
  var uploadDaemonArtifact = (options) => (options.client ?? client).post({
@@ -6497,7 +6551,7 @@ var uploadDaemonArtifact = (options) => (options.client ?? client).post({
6497
6551
  scheme: "bearer",
6498
6552
  type: "http"
6499
6553
  }],
6500
- url: "/api/v1/daemon/tool-calls/{toolCallID}/artifact",
6554
+ url: "/daemon/tool-calls/{toolCallID}/artifact",
6501
6555
  ...options,
6502
6556
  headers: {
6503
6557
  "Content-Type": "application/octet-stream",
@@ -6511,7 +6565,7 @@ var downloadDaemonArtifact = (options) => (options.client ?? client).get({
6511
6565
  scheme: "bearer",
6512
6566
  type: "http"
6513
6567
  }],
6514
- url: "/api/v1/daemon/tool-calls/{toolCallID}/artifacts/{artifactID}/content",
6568
+ url: "/daemon/tool-calls/{toolCallID}/artifacts/{artifactID}/content",
6515
6569
  ...options
6516
6570
  });
6517
6571
 
@@ -6564,7 +6618,9 @@ var ApiError = class _ApiError extends Error {
6564
6618
  data = void 0;
6565
6619
  }
6566
6620
  if (data && typeof data === "object") {
6567
- if ("error" in data && typeof data.error === "string") {
6621
+ if ("error_description" in data && typeof data.error_description === "string") {
6622
+ message = data.error_description;
6623
+ } else if ("error" in data && typeof data.error === "string") {
6568
6624
  message = data.error;
6569
6625
  }
6570
6626
  if ("code" in data && typeof data.code === "string") {
@@ -6609,7 +6665,7 @@ function createOmnaraClient(options = {}) {
6609
6665
  })
6610
6666
  );
6611
6667
  client2.setConfig({
6612
- baseUrl: options.baseUrl ?? "",
6668
+ baseUrl: options.baseUrl ?? client.getConfig().baseUrl,
6613
6669
  credentials: options.credentials,
6614
6670
  headers: options.headers
6615
6671
  });
@@ -6630,6 +6686,15 @@ function createOmnaraClient(options = {}) {
6630
6686
 
6631
6687
  // ../sdk/src/device.ts
6632
6688
  import * as z3 from "zod";
6689
+ var OMNARA_CLI_OAUTH_CLIENT_ID = "omnara-cli";
6690
+ var OAUTH_DEVICE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
6691
+ var zAuthorizationServerMetadata = z3.object({
6692
+ issuer: z3.url(),
6693
+ device_authorization_endpoint: z3.url(),
6694
+ token_endpoint: z3.url(),
6695
+ grant_types_supported: z3.array(z3.string()),
6696
+ token_endpoint_auth_methods_supported: z3.array(z3.string())
6697
+ });
6633
6698
  var zDeviceAuthStartResponse = z3.object({
6634
6699
  device_code: z3.string().min(1),
6635
6700
  user_code: z3.string().min(1),
@@ -6638,11 +6703,9 @@ var zDeviceAuthStartResponse = z3.object({
6638
6703
  expires_in: z3.number().int().positive(),
6639
6704
  interval: z3.number().int().positive()
6640
6705
  });
6641
- var zDeviceAuthWaitingResponse = z3.object({
6642
- interval: z3.number().int().positive()
6643
- });
6644
- var zDeviceAuthFailureResponse = z3.object({
6645
- error: z3.enum(["access_denied", "expired_token"])
6706
+ var zDeviceAuthErrorResponse = z3.object({
6707
+ error: z3.string().min(1),
6708
+ error_description: z3.string().optional()
6646
6709
  });
6647
6710
  var zDeviceAuthApprovedResponse = z3.object({
6648
6711
  access_token: z3.string().min(1),
@@ -6660,29 +6723,55 @@ var DeviceAuthError = class extends Error {
6660
6723
  this.code = code;
6661
6724
  }
6662
6725
  };
6663
- async function postDeviceAuthJSON(fetchImpl, baseUrl, path, body) {
6664
- return fetchImpl(`${baseUrl.replace(/\/+$/, "")}${path}`, {
6726
+ async function postOAuthForm(fetchImpl, endpoint, body) {
6727
+ return fetchImpl(endpoint, {
6665
6728
  method: "POST",
6666
- headers: { "Content-Type": "application/json" },
6667
- body: JSON.stringify(body)
6729
+ headers: {
6730
+ Accept: "application/json",
6731
+ "Content-Type": "application/x-www-form-urlencoded"
6732
+ },
6733
+ body: new URLSearchParams(body).toString()
6668
6734
  });
6669
6735
  }
6736
+ function normalizeIssuer(raw) {
6737
+ const issuer = new URL(raw);
6738
+ if (issuer.username !== "" || issuer.password !== "" || issuer.pathname !== "/" || issuer.search !== "" || issuer.hash !== "") {
6739
+ throw new Error("authorization server issuer must be an origin");
6740
+ }
6741
+ return issuer.origin;
6742
+ }
6670
6743
  async function startDeviceAuth(options) {
6671
- const response = await postDeviceAuthJSON(
6672
- options.fetch ?? fetch,
6673
- options.baseUrl,
6674
- "/api/auth/device/code",
6675
- { client_name: options.clientName, token_name: options.tokenName }
6676
- );
6744
+ const fetchImpl = options.fetch ?? fetch;
6745
+ const expectedIssuer = normalizeIssuer(options.issuerUrl);
6746
+ const metadataUrl = new URL("/.well-known/oauth-authorization-server", `${expectedIssuer}/`);
6747
+ const metadataResponse = await fetchImpl(metadataUrl, { headers: { Accept: "application/json" } });
6748
+ if (!metadataResponse.ok) throw await ApiError.fromResponse(metadataResponse);
6749
+ const metadata = zAuthorizationServerMetadata.parse(await metadataResponse.json());
6750
+ if (normalizeIssuer(metadata.issuer) !== expectedIssuer) {
6751
+ throw new Error(
6752
+ `authorization server issuer mismatch: expected ${expectedIssuer}, received ${metadata.issuer}`
6753
+ );
6754
+ }
6755
+ if (!metadata.grant_types_supported.includes(OAUTH_DEVICE_GRANT_TYPE)) {
6756
+ throw new Error("authorization server does not support the OAuth device grant");
6757
+ }
6758
+ if (!metadata.token_endpoint_auth_methods_supported.includes("none")) {
6759
+ throw new Error("authorization server does not support public OAuth clients");
6760
+ }
6761
+ const body = { client_id: options.clientId };
6762
+ if (options.tokenName !== void 0) body.token_name = options.tokenName;
6763
+ const response = await postOAuthForm(fetchImpl, metadata.device_authorization_endpoint, body);
6677
6764
  if (!response.ok) throw await ApiError.fromResponse(response);
6678
6765
  const data = zDeviceAuthStartResponse.parse(await response.json());
6679
6766
  return {
6680
6767
  deviceCode: data.device_code,
6681
6768
  userCode: data.user_code,
6682
- verificationUri: new URL(data.verification_uri, options.baseUrl).toString(),
6683
- verificationUriComplete: new URL(data.verification_uri_complete, options.baseUrl).toString(),
6769
+ verificationUri: new URL(data.verification_uri, metadata.issuer).toString(),
6770
+ verificationUriComplete: new URL(data.verification_uri_complete, metadata.issuer).toString(),
6684
6771
  expiresInSeconds: data.expires_in,
6685
- intervalSeconds: data.interval
6772
+ intervalSeconds: data.interval,
6773
+ tokenEndpoint: metadata.token_endpoint,
6774
+ clientId: options.clientId
6686
6775
  };
6687
6776
  }
6688
6777
  function defaultSleep(seconds) {
@@ -6694,26 +6783,28 @@ async function pollDeviceAuthToken(options) {
6694
6783
  let interval = options.intervalSeconds;
6695
6784
  while (true) {
6696
6785
  await sleep2(interval);
6697
- const response = await postDeviceAuthJSON(
6698
- fetchImpl,
6699
- options.baseUrl,
6700
- "/api/auth/device/token",
6701
- {
6702
- device_code: options.deviceCode
6703
- }
6704
- );
6786
+ const response = await postOAuthForm(fetchImpl, options.tokenEndpoint, {
6787
+ grant_type: OAUTH_DEVICE_GRANT_TYPE,
6788
+ device_code: options.deviceCode,
6789
+ client_id: options.clientId
6790
+ });
6705
6791
  if (response.status === 200) {
6706
6792
  return zDeviceAuthApprovedResponse.parse(await response.json()).access_token;
6707
6793
  }
6708
- if (response.status === 202) {
6709
- interval = zDeviceAuthWaitingResponse.parse(await response.json()).interval;
6710
- continue;
6711
- }
6712
6794
  if (response.status === 400) {
6713
- const failure = zDeviceAuthFailureResponse.safeParse(
6795
+ const failure = zDeviceAuthErrorResponse.safeParse(
6714
6796
  await response.clone().json().catch(() => void 0)
6715
6797
  );
6716
- if (failure.success) throw new DeviceAuthError(failure.data.error);
6798
+ if (failure.success) {
6799
+ if (failure.data.error === "authorization_pending") continue;
6800
+ if (failure.data.error === "slow_down") {
6801
+ interval += 5;
6802
+ continue;
6803
+ }
6804
+ if (failure.data.error === "access_denied" || failure.data.error === "expired_token") {
6805
+ throw new DeviceAuthError(failure.data.error);
6806
+ }
6807
+ }
6717
6808
  }
6718
6809
  throw await ApiError.fromResponse(response);
6719
6810
  }
@@ -6958,8 +7049,11 @@ async function promptProjectSelection(client2, orgId) {
6958
7049
  }
6959
7050
 
6960
7051
  // src/config.ts
6961
- var DEFAULT_BASE_URL = "https://app.omnara.com";
7052
+ var DEFAULT_API_URL = "https://api.omnara.com/v1";
7053
+ var DEFAULT_ISSUER_URL = "https://app.omnara.com";
6962
7054
  var zConfigFile = z5.looseObject({
7055
+ api_url: z5.url().optional(),
7056
+ issuer_url: z5.url().optional(),
6963
7057
  base_url: z5.url().optional(),
6964
7058
  token: z5.string().min(1).optional(),
6965
7059
  org_id: zOrganizationId.optional(),
@@ -7019,18 +7113,32 @@ ${z5.prettifyError(result.error)}`);
7019
7113
  chmodSync(configFilePath(), 384);
7020
7114
  return result.data;
7021
7115
  }
7116
+ function resolveUrls(file, env) {
7117
+ return {
7118
+ apiUrl: env.OMNARA_API_URL ?? file.api_url ?? DEFAULT_API_URL,
7119
+ issuerUrl: env.OMNARA_ISSUER_URL ?? file.issuer_url ?? DEFAULT_ISSUER_URL
7120
+ };
7121
+ }
7122
+ function migrateLegacyBaseUrl(file) {
7123
+ const { base_url: baseUrl, ...rest } = file;
7124
+ if (baseUrl === void 0) return void 0;
7125
+ return rest;
7126
+ }
7022
7127
  function loadConfig() {
7023
- const file = readConfigFile();
7024
- const baseUrl = process.env.OMNARA_BASE_URL ?? file.base_url ?? DEFAULT_BASE_URL;
7128
+ const loaded = readConfigFile();
7129
+ const migrated = migrateLegacyBaseUrl(loaded);
7130
+ const file = migrated === void 0 ? loaded : updateConfigFile({ ...migrated, base_url: void 0 });
7131
+ const { apiUrl, issuerUrl } = resolveUrls(file, process.env);
7025
7132
  const token = process.env.OMNARA_API_KEY ?? file.token;
7026
7133
  const client2 = createOmnaraClient({
7027
- baseUrl,
7134
+ baseUrl: apiUrl,
7028
7135
  auth: token ? bearerToken(token) : void 0,
7029
7136
  headers: { "User-Agent": "omnara-cli" }
7030
7137
  });
7031
7138
  return {
7032
7139
  client: client2,
7033
- baseUrl,
7140
+ apiUrl,
7141
+ issuerUrl,
7034
7142
  defaultOrgId: process.env.OMNARA_ORG_ID ?? file.org_id,
7035
7143
  defaultProjectId: process.env.OMNARA_PROJECT_ID ?? file.project_id
7036
7144
  };
@@ -7050,17 +7158,23 @@ function printConfig() {
7050
7158
  console.log(`config file ${configFilePath()}`);
7051
7159
  console.log(`org_id ${describeValue("OMNARA_ORG_ID", file.org_id)}`);
7052
7160
  console.log(`project_id ${describeValue("OMNARA_PROJECT_ID", file.project_id)}`);
7053
- console.log(`base_url ${describeValue("OMNARA_BASE_URL", file.base_url, DEFAULT_BASE_URL)}`);
7161
+ const { apiUrl, issuerUrl } = resolveUrls(file, {});
7162
+ console.log(`api_url ${describeValue("OMNARA_API_URL", file.api_url, apiUrl)}`);
7163
+ console.log(`issuer_url ${describeValue("OMNARA_ISSUER_URL", file.issuer_url, issuerUrl)}`);
7054
7164
  }
7055
7165
  function registerConfigCommand(program2, cli) {
7056
- const config2 = program2.command("config").description("Show or set the default organization and project").option("--org <org-id>", "save this organization ID as the default").option("--project <project-id>", "save this project ID as the default").option("--base-url <url>", "save this API base URL as the default").action(async (options) => {
7166
+ const config2 = program2.command("config").description("Show or set the default organization and project").option("--org <org-id>", "save this organization ID as the default").option("--project <project-id>", "save this project ID as the default").option("--api-url <url>", "save this API root URL (used for requests) as the default").option(
7167
+ "--issuer-url <url>",
7168
+ "save this web app origin (used for login and browser links) as the default"
7169
+ ).action(async (options) => {
7057
7170
  await runCliAction(() => {
7058
- if (options.org !== void 0 || options.project !== void 0 || options.baseUrl !== void 0) {
7171
+ if (options.org !== void 0 || options.project !== void 0 || options.apiUrl !== void 0 || options.issuerUrl !== void 0) {
7059
7172
  const clearStaleProject = options.org !== void 0 && options.project === void 0;
7060
7173
  updateConfigFile({
7061
7174
  ...options.org !== void 0 ? { org_id: options.org } : {},
7062
7175
  ...clearStaleProject ? { project_id: void 0 } : options.project !== void 0 ? { project_id: options.project } : {},
7063
- ...options.baseUrl !== void 0 ? { base_url: options.baseUrl } : {}
7176
+ ...options.apiUrl !== void 0 ? { api_url: options.apiUrl } : {},
7177
+ ...options.issuerUrl !== void 0 ? { issuer_url: options.issuerUrl } : {}
7064
7178
  });
7065
7179
  }
7066
7180
  printConfig();
@@ -7282,7 +7396,7 @@ function flowOp(spec) {
7282
7396
  type: "flow",
7283
7397
  execute: (input) => run({
7284
7398
  client: input.client,
7285
- baseUrl: input.baseUrl,
7399
+ apiUrl: input.apiUrl,
7286
7400
  path: parseWithSchema(spec.path, input.path, "arguments"),
7287
7401
  body: parseWithSchema(spec.body, input.body, "flags"),
7288
7402
  report: createFlowReporter(spec.summary)
@@ -7492,7 +7606,9 @@ function registerOperation(parent, config2, spec) {
7492
7606
  renderResult(data, true);
7493
7607
  return;
7494
7608
  }
7495
- const formatted = spec.format(data, { baseUrl: config2.baseUrl });
7609
+ const formatted = spec.format(data, {
7610
+ apiUrl: config2.apiUrl
7611
+ });
7496
7612
  renderResult(formatted.value, false, { columns: formatted.columns });
7497
7613
  });
7498
7614
  });
@@ -7508,7 +7624,7 @@ function registerFlow(parent, config2, spec) {
7508
7624
  const options = command.opts();
7509
7625
  await spec.execute({
7510
7626
  client: config2.client,
7511
- baseUrl: config2.baseUrl,
7627
+ apiUrl: config2.apiUrl,
7512
7628
  path: await resolvePathValues(plan, args, options, config2),
7513
7629
  body: collectFlagValues(bodyFlags, options)
7514
7630
  });
@@ -7531,21 +7647,21 @@ import * as z8 from "zod";
7531
7647
 
7532
7648
  // src/browser.ts
7533
7649
  import { spawn } from "node:child_process";
7534
- function browserCommand(url3) {
7650
+ function browserCommand(url4) {
7535
7651
  if (process.platform === "darwin") {
7536
- return { command: "open", args: [url3], windowsVerbatimArguments: false };
7652
+ return { command: "open", args: [url4], windowsVerbatimArguments: false };
7537
7653
  }
7538
7654
  if (process.platform === "win32") {
7539
7655
  return {
7540
7656
  command: "cmd",
7541
- args: ["/c", "start", '""', `"${url3}"`],
7657
+ args: ["/c", "start", '""', `"${url4}"`],
7542
7658
  windowsVerbatimArguments: true
7543
7659
  };
7544
7660
  }
7545
- return { command: "xdg-open", args: [url3], windowsVerbatimArguments: false };
7661
+ return { command: "xdg-open", args: [url4], windowsVerbatimArguments: false };
7546
7662
  }
7547
- function openInBrowser(url3, onError) {
7548
- const { command, args, windowsVerbatimArguments } = browserCommand(url3);
7663
+ function openInBrowser(url4, onError) {
7664
+ const { command, args, windowsVerbatimArguments } = browserCommand(url4);
7549
7665
  const child = spawn(command, args, { stdio: "ignore", detached: true, windowsVerbatimArguments });
7550
7666
  child.once("error", () => {
7551
7667
  onError("could not open a browser; use the URL above");
@@ -7567,8 +7683,8 @@ async function isProjectVisible(client2, orgId, projectId) {
7567
7683
  } while (cursor !== void 0);
7568
7684
  return false;
7569
7685
  }
7570
- function interactiveReporter2(baseUrl) {
7571
- intro2(`Log in to ${baseUrl}`);
7686
+ function interactiveReporter2(issuerUrl) {
7687
+ intro2(`Log in to ${issuerUrl}`);
7572
7688
  const spin = spinner2();
7573
7689
  return {
7574
7690
  showCode(userCode, approvalUrl) {
@@ -7636,11 +7752,11 @@ ${z8.prettifyError(result.error)}`);
7636
7752
  function registerLoginCommand(program2, cli) {
7637
7753
  program2.command("login").description("Log in via the browser and save an API token").option("--no-browser", "print the approval URL instead of opening a browser").option("--token-name <name>", "name for the created API token").action(async (options) => {
7638
7754
  await runCliAction(async () => {
7639
- readConfigFileForUpdate();
7640
- const report = canPromptInteractively() ? interactiveReporter2(cli.baseUrl) : plainReporter2();
7755
+ updateConfigFile({});
7756
+ const report = canPromptInteractively() ? interactiveReporter2(cli.issuerUrl) : plainReporter2();
7641
7757
  const start = await startDeviceAuth({
7642
- baseUrl: cli.baseUrl,
7643
- clientName: "Omnara CLI",
7758
+ issuerUrl: cli.issuerUrl,
7759
+ clientId: OMNARA_CLI_OAUTH_CLIENT_ID,
7644
7760
  tokenName: loginTokenName(options.tokenName, hostname())
7645
7761
  });
7646
7762
  report.showCode(start.userCode, start.verificationUriComplete);
@@ -7653,7 +7769,8 @@ function registerLoginCommand(program2, cli) {
7653
7769
  let token;
7654
7770
  try {
7655
7771
  token = await pollDeviceAuthToken({
7656
- baseUrl: cli.baseUrl,
7772
+ tokenEndpoint: start.tokenEndpoint,
7773
+ clientId: start.clientId,
7657
7774
  deviceCode: start.deviceCode,
7658
7775
  intervalSeconds: start.intervalSeconds
7659
7776
  });
@@ -7662,8 +7779,12 @@ function registerLoginCommand(program2, cli) {
7662
7779
  throw error;
7663
7780
  }
7664
7781
  report.stopWaiting(true);
7665
- const saved = updateConfigFile({ token, base_url: cli.baseUrl });
7666
- const client2 = createOmnaraClient({ baseUrl: cli.baseUrl, auth: bearerToken(token) });
7782
+ const saved = updateConfigFile({
7783
+ token,
7784
+ api_url: cli.apiUrl,
7785
+ issuer_url: cli.issuerUrl
7786
+ });
7787
+ const client2 = createOmnaraClient({ baseUrl: cli.apiUrl, auth: bearerToken(token) });
7667
7788
  let orgId = saved.org_id;
7668
7789
  let loginMessage = "Logged in";
7669
7790
  let validationWarning;
@@ -7831,13 +7952,16 @@ async function connectMachine(context) {
7831
7952
  function shellQuote(value) {
7832
7953
  return `'${value.replaceAll("'", `'\\''`)}'`;
7833
7954
  }
7834
- function installCommand(baseUrl) {
7835
- return `curl -fsSL ${shellQuote(`${baseUrl}/install/omnarad.sh`)} | sh`;
7955
+ function installScriptUrl(apiUrl) {
7956
+ return new URL("/install/omnarad.sh", apiUrl).toString();
7957
+ }
7958
+ function installCommand(apiUrl) {
7959
+ return `curl -fsSL ${shellQuote(installScriptUrl(apiUrl))} | sh`;
7836
7960
  }
7837
- var formatMachineSetup = (response, { baseUrl }) => ({
7961
+ var formatMachineSetup = (response, { apiUrl }) => ({
7838
7962
  value: {
7839
7963
  ...response,
7840
- install_command: installCommand(baseUrl),
7964
+ install_command: installCommand(apiUrl),
7841
7965
  install_note: "Run install_command on the target machine and paste the token when prompted."
7842
7966
  }
7843
7967
  });
@@ -7941,9 +8065,9 @@ function ensureDaemonHomeWritable(home) {
7941
8065
  var DaemonExitError = class extends Error {
7942
8066
  };
7943
8067
  async function runMachineCreateLocal(context) {
7944
- const { report, baseUrl } = context;
8068
+ const { report, apiUrl } = context;
7945
8069
  ensureSupportedPlatform(process.platform, process.arch);
7946
- ensureDaemonApiUrl(baseUrl);
8070
+ ensureDaemonApiUrl(apiUrl);
7947
8071
  const home = daemonHome();
7948
8072
  const existing = describeExistingInstallation(home);
7949
8073
  if (existing !== void 0) {
@@ -7961,7 +8085,7 @@ async function runMachineCreateLocal(context) {
7961
8085
  report.info(`Machine ID: ${machine.id}`);
7962
8086
  report.start("Installing omnarad on this machine");
7963
8087
  try {
7964
- await runInstaller(report, baseUrl, token, machine.id, home);
8088
+ await runInstaller(report, apiUrl, token, machine.id, home);
7965
8089
  } catch (error) {
7966
8090
  if (error instanceof DaemonExitError) {
7967
8091
  report.fail("omnarad exited after it was installed");
@@ -7978,7 +8102,7 @@ async function runMachineCreateLocal(context) {
7978
8102
  ${token}`);
7979
8103
  report.url(
7980
8104
  "Finish setup by running this, then paste the machine token when prompted",
7981
- installCommand(baseUrl)
8105
+ installCommand(apiUrl)
7982
8106
  );
7983
8107
  throw error;
7984
8108
  }
@@ -8035,11 +8159,11 @@ function readDaemonLockPid(home) {
8035
8159
  return void 0;
8036
8160
  }
8037
8161
  }
8038
- function installerScript(baseUrl) {
8162
+ function installerScript(apiUrl) {
8039
8163
  return [
8040
8164
  "installer=$(mktemp)",
8041
8165
  `trap 'rm -f "$installer"' EXIT`,
8042
- `curl -qfsSL --connect-timeout 10 -m 60 --max-redirs 5 --max-filesize 1048576 --proto '=http,https' --proto-redir '=https' -o "$installer" ${shellQuote(`${baseUrl}/install/omnarad.sh`)}`,
8166
+ `curl -qfsSL --connect-timeout 10 -m 60 --max-redirs 5 --max-filesize 1048576 --proto '=http,https' --proto-redir '=https' -o "$installer" ${shellQuote(installScriptUrl(apiUrl))}`,
8043
8167
  'sh "$installer"'
8044
8168
  ].join(" && ");
8045
8169
  }
@@ -8048,11 +8172,11 @@ function installerFailure(code, signal, log3) {
8048
8172
  return new Error(`omnarad installer failed (${reason})${log3 === "" ? "" : `
8049
8173
  ${log3}`}`);
8050
8174
  }
8051
- function runInstaller(report, baseUrl, token, machineId, home) {
8175
+ function runInstaller(report, apiUrl, token, machineId, home) {
8052
8176
  return new Promise((resolve3, reject) => {
8053
- const child = spawn2("/bin/sh", ["-c", installerScript(baseUrl)], {
8177
+ const child = spawn2("/bin/sh", ["-c", installerScript(apiUrl)], {
8054
8178
  stdio: ["ignore", "pipe", "pipe"],
8055
- env: { ...process.env, OMNARA_API_URL: baseUrl, OMNARA_MACHINE_TOKEN: token }
8179
+ env: { ...process.env, OMNARA_API_URL: apiUrl, OMNARA_MACHINE_TOKEN: token }
8056
8180
  });
8057
8181
  const relay = (signal) => {
8058
8182
  child.kill(signal);
@@ -8174,10 +8298,10 @@ async function authorizeMcpOAuthSecret(options) {
8174
8298
  });
8175
8299
  }
8176
8300
  var zBrowserFlag = z11.boolean().default(true).describe("open the authorization URL in a browser");
8177
- function openAuthorizationUrl(report, title, url3, browser) {
8178
- report.url(title, url3);
8301
+ function openAuthorizationUrl(report, title, url4, browser) {
8302
+ report.url(title, url4);
8179
8303
  if (browser) {
8180
- openInBrowser(url3, (message) => {
8304
+ openInBrowser(url4, (message) => {
8181
8305
  report.warn(message);
8182
8306
  });
8183
8307
  }
@@ -8192,8 +8316,8 @@ async function runMcpOAuth(context) {
8192
8316
  client: client2,
8193
8317
  orgId: path.orgID,
8194
8318
  request,
8195
- onAuthorization(url3) {
8196
- openAuthorizationUrl(report, "Authorize this MCP server in your browser", url3, browser);
8319
+ onAuthorization(url4) {
8320
+ openAuthorizationUrl(report, "Authorize this MCP server in your browser", url4, browser);
8197
8321
  report.start("Waiting for the secret to be created");
8198
8322
  }
8199
8323
  });
@@ -8219,8 +8343,8 @@ var zMcpAddBody = zMcpoAuthStartRequest.omit({ owner: true, name: true }).extend
8219
8343
  function targetLabel(target) {
8220
8344
  return target === "agent" ? "agent" : "agent profile";
8221
8345
  }
8222
- function serverEntry(url3, secretId) {
8223
- return { url: url3, auth: { type: "oauth", secret_id: secretId } };
8346
+ function serverEntry(url4, secretId) {
8347
+ return { url: url4, auth: { type: "oauth", secret_id: secretId } };
8224
8348
  }
8225
8349
  var zJsonRecord = z12.record(z12.string(), z12.json());
8226
8350
  function prepareJsonConfig(config2, serverName, mcpUrl) {
@@ -8352,8 +8476,8 @@ async function runMcpAdd(context, target, targetId) {
8352
8476
  client: client2,
8353
8477
  orgId: scope.orgId,
8354
8478
  request,
8355
- onAuthorization(url3) {
8356
- openAuthorizationUrl(report, "Authorize this MCP server in your browser", url3, browser);
8479
+ onAuthorization(url4) {
8480
+ openAuthorizationUrl(report, "Authorize this MCP server in your browser", url4, browser);
8357
8481
  report.start("Waiting for the MCP OAuth secret to be created");
8358
8482
  }
8359
8483
  });