omnara 1.0.3 → 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 +483 -320
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -67,6 +67,7 @@ __export(sdk_gen_exports, {
67
67
  deleteSkill: () => deleteSkill,
68
68
  deleteSkillGrant: () => deleteSkillGrant,
69
69
  demoteSteeringInputToQueued: () => demoteSteeringInputToQueued,
70
+ downloadDaemonArtifact: () => downloadDaemonArtifact,
70
71
  endMachineDaemonRuntime: () => endMachineDaemonRuntime,
71
72
  getActor: () => getActor,
72
73
  getAgent: () => getAgent,
@@ -156,6 +157,7 @@ __export(sdk_gen_exports, {
156
157
  updateProjectMachinePoolGrant: () => updateProjectMachinePoolGrant,
157
158
  updateProjectModelGrant: () => updateProjectModelGrant,
158
159
  updateSecret: () => updateSecret,
160
+ updateSkill: () => updateSkill,
159
161
  uploadDaemonArtifact: () => uploadDaemonArtifact
160
162
  });
161
163
 
@@ -209,7 +211,7 @@ function createSseClient({
209
211
  sseMaxRetryAttempts,
210
212
  sseMaxRetryDelay,
211
213
  sseSleepFn,
212
- url: url3,
214
+ url: url4,
213
215
  ...options
214
216
  }) {
215
217
  let lastEventId;
@@ -233,9 +235,9 @@ function createSseClient({
233
235
  headers,
234
236
  signal
235
237
  };
236
- let request = new Request(url3, requestInit);
238
+ let request = new Request(url4, requestInit);
237
239
  if (onRequest) {
238
- request = await onRequest(url3, requestInit);
240
+ request = await onRequest(url4, requestInit);
239
241
  }
240
242
  const _fetch = options.fetch ?? globalThis.fetch;
241
243
  const response = await _fetch(request);
@@ -452,7 +454,7 @@ var serializeObjectParam = ({
452
454
  // ../sdk/src/generated/core/utils.gen.ts
453
455
  var PATH_PARAM_RE = /\{[^{}]+\}/g;
454
456
  var defaultPathSerializer = ({ path, url: _url }) => {
455
- let url3 = _url;
457
+ let url4 = _url;
456
458
  const matches = _url.match(PATH_PARAM_RE);
457
459
  if (matches) {
458
460
  for (const match of matches) {
@@ -475,11 +477,11 @@ var defaultPathSerializer = ({ path, url: _url }) => {
475
477
  continue;
476
478
  }
477
479
  if (Array.isArray(value)) {
478
- url3 = url3.replace(match, serializeArrayParam({ explode, name, style, value }));
480
+ url4 = url4.replace(match, serializeArrayParam({ explode, name, style, value }));
479
481
  continue;
480
482
  }
481
483
  if (typeof value === "object") {
482
- url3 = url3.replace(
484
+ url4 = url4.replace(
483
485
  match,
484
486
  serializeObjectParam({
485
487
  explode,
@@ -492,7 +494,7 @@ var defaultPathSerializer = ({ path, url: _url }) => {
492
494
  continue;
493
495
  }
494
496
  if (style === "matrix") {
495
- url3 = url3.replace(
497
+ url4 = url4.replace(
496
498
  match,
497
499
  `;${serializePrimitiveParam({
498
500
  name,
@@ -504,10 +506,10 @@ var defaultPathSerializer = ({ path, url: _url }) => {
504
506
  const replaceValue = encodeURIComponent(
505
507
  style === "label" ? `.${value}` : value
506
508
  );
507
- url3 = url3.replace(match, replaceValue);
509
+ url4 = url4.replace(match, replaceValue);
508
510
  }
509
511
  }
510
- return url3;
512
+ return url4;
511
513
  };
512
514
  var getUrl = ({
513
515
  baseUrl,
@@ -517,18 +519,18 @@ var getUrl = ({
517
519
  url: _url
518
520
  }) => {
519
521
  const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
520
- let url3 = (baseUrl ?? "") + pathUrl;
522
+ let url4 = (baseUrl ?? "") + pathUrl;
521
523
  if (path) {
522
- url3 = defaultPathSerializer({ path, url: url3 });
524
+ url4 = defaultPathSerializer({ path, url: url4 });
523
525
  }
524
526
  let search = query ? querySerializer(query) : "";
525
527
  if (search.startsWith("?")) {
526
528
  search = search.substring(1);
527
529
  }
528
530
  if (search) {
529
- url3 += `?${search}`;
531
+ url4 += `?${search}`;
530
532
  }
531
- return url3;
533
+ return url4;
532
534
  };
533
535
  function getValidRequestBody(options) {
534
536
  const hasBody = options.body !== void 0;
@@ -804,8 +806,8 @@ var createClient = (config2 = {}) => {
804
806
  opts.headers.delete("Content-Type");
805
807
  }
806
808
  const resolvedOpts = opts;
807
- const url3 = buildUrl(resolvedOpts);
808
- return { opts: resolvedOpts, url: url3 };
809
+ const url4 = buildUrl(resolvedOpts);
810
+ return { opts: resolvedOpts, url: url4 };
809
811
  };
810
812
  const request = async (options) => {
811
813
  const throwOnError = options.throwOnError ?? _config.throwOnError;
@@ -813,13 +815,13 @@ var createClient = (config2 = {}) => {
813
815
  let request2;
814
816
  let response;
815
817
  try {
816
- const { opts, url: url3 } = await beforeRequest(options);
818
+ const { opts, url: url4 } = await beforeRequest(options);
817
819
  const requestInit = {
818
820
  redirect: "follow",
819
821
  ...opts,
820
822
  body: getValidRequestBody(opts)
821
823
  };
822
- request2 = new Request(url3, requestInit);
824
+ request2 = new Request(url4, requestInit);
823
825
  for (const fn of interceptors.request.fns) {
824
826
  if (fn) {
825
827
  request2 = await fn(request2, opts);
@@ -921,13 +923,13 @@ var createClient = (config2 = {}) => {
921
923
  };
922
924
  const makeMethodFn = (method) => (options) => request({ ...options, method });
923
925
  const makeSseFn = (method) => async (options) => {
924
- const { opts, url: url3 } = await beforeRequest(options);
926
+ const { opts, url: url4 } = await beforeRequest(options);
925
927
  return createSseClient({
926
928
  ...opts,
927
929
  body: opts.body,
928
930
  method,
929
- onRequest: async (url4, init) => {
930
- let request2 = new Request(url4, init);
931
+ onRequest: async (url5, init) => {
932
+ let request2 = new Request(url5, init);
931
933
  for (const fn of interceptors.request.fns) {
932
934
  if (fn) {
933
935
  request2 = await fn(request2, opts);
@@ -936,7 +938,7 @@ var createClient = (config2 = {}) => {
936
938
  return request2;
937
939
  },
938
940
  serializedBody: getValidRequestBody(opts),
939
- url: url3
941
+ url: url4
940
942
  });
941
943
  };
942
944
  const _buildUrl = (options) => buildUrl({ ..._config, ...options });
@@ -970,7 +972,7 @@ var createClient = (config2 = {}) => {
970
972
  };
971
973
 
972
974
  // ../sdk/src/generated/client.gen.ts
973
- var client = createClient(createConfig({ throwOnError: true }));
975
+ var client = createClient(createConfig({ baseUrl: "https://api.omnara.com/v1", throwOnError: true }));
974
976
 
975
977
  // ../sdk/src/generated/zod.gen.ts
976
978
  import * as z from "zod";
@@ -991,8 +993,15 @@ var zCreatedResourceListSort = z.enum([
991
993
  "-created_at",
992
994
  "created_at"
993
995
  ]).default("-created_at");
996
+ var zAgentConfigErrorIssue = z.object({
997
+ path: z.string(),
998
+ message: z.string(),
999
+ line: z.int().gte(1).optional(),
1000
+ column: z.int().gte(1).optional()
1001
+ });
994
1002
  var zError = z.object({
995
1003
  error: z.string(),
1004
+ issues: z.array(zAgentConfigErrorIssue).optional(),
996
1005
  code: z.enum([
997
1006
  "invalid_request",
998
1007
  "unauthorized",
@@ -1328,6 +1337,21 @@ var zCreateSkillRequest = z.object({
1328
1337
  owner: zSkillOwnerInput,
1329
1338
  archive: z.string()
1330
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
+ });
1331
1355
  var zSkill = z.object({
1332
1356
  id: zSkillId,
1333
1357
  org_id: zOrganizationId,
@@ -1337,6 +1361,7 @@ var zSkill = z.object({
1337
1361
  revision: z.int().gte(1).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1338
1362
  description: z.string(),
1339
1363
  skill_md: z.string().optional(),
1364
+ files: z.array(zSkillFile).optional(),
1340
1365
  created_at: zTimestamp,
1341
1366
  updated_at: zTimestamp
1342
1367
  });
@@ -1823,6 +1848,15 @@ var zInlineMediaContentBlock = z.object({
1823
1848
  "text/markdown",
1824
1849
  "text/csv",
1825
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",
1826
1860
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
1827
1861
  "application/vnd.openxmlformats-officedocument.presentationml.presentation",
1828
1862
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@@ -3248,6 +3282,11 @@ var zGetSkillPath = z.object({
3248
3282
  skillID: z.string().regex(/^skl_[a-z2-7]{26}$/)
3249
3283
  });
3250
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;
3251
3290
  var zListSkillGrantsPath = z.object({
3252
3291
  orgID: z.string().regex(/^org_[a-z2-7]{26}$/),
3253
3292
  skillID: zSkillId
@@ -4035,6 +4074,11 @@ var zUploadDaemonArtifactQuery = z.object({
4035
4074
  filename: z.string().min(1).max(255)
4036
4075
  });
4037
4076
  var zUploadDaemonArtifactResponse = zUploadArtifactResponse;
4077
+ var zDownloadDaemonArtifactPath = z.object({
4078
+ toolCallID: zToolCallId,
4079
+ artifactID: zArtifactId
4080
+ });
4081
+ var zDownloadDaemonArtifactResponse = z.string();
4038
4082
 
4039
4083
  // ../sdk/src/validate-response.ts
4040
4084
  function valueAt(data, path) {
@@ -4086,7 +4130,7 @@ var listPersonalAccessTokens = (options) => (options?.client ?? client).get({
4086
4130
  name: "__Host-omnara_session",
4087
4131
  type: "apiKey"
4088
4132
  }],
4089
- url: "/api/v1/personal-access-tokens",
4133
+ url: "/personal-access-tokens",
4090
4134
  ...options
4091
4135
  });
4092
4136
  var createPersonalAccessToken = (options) => (options.client ?? client).post({
@@ -4096,7 +4140,7 @@ var createPersonalAccessToken = (options) => (options.client ?? client).post({
4096
4140
  name: "__Host-omnara_session",
4097
4141
  type: "apiKey"
4098
4142
  }, { name: "X-Omnara-Csrf", type: "apiKey" }],
4099
- url: "/api/v1/personal-access-tokens",
4143
+ url: "/personal-access-tokens",
4100
4144
  ...options,
4101
4145
  headers: {
4102
4146
  "Content-Type": "application/json",
@@ -4118,7 +4162,7 @@ var revokePersonalAccessToken = (options) => (options.client ?? client).post({
4118
4162
  },
4119
4163
  { name: "X-Omnara-Csrf", type: "apiKey" }
4120
4164
  ],
4121
- url: "/api/v1/personal-access-tokens/{tokenID}/revoke",
4165
+ url: "/personal-access-tokens/{tokenID}/revoke",
4122
4166
  ...options
4123
4167
  });
4124
4168
  var bootstrapDaemon = (options) => (options?.client ?? client).post({
@@ -4128,7 +4172,7 @@ var bootstrapDaemon = (options) => (options?.client ?? client).post({
4128
4172
  scheme: "bearer",
4129
4173
  type: "http"
4130
4174
  }],
4131
- url: "/api/v1/daemon/bootstrap",
4175
+ url: "/daemon/bootstrap",
4132
4176
  ...options
4133
4177
  });
4134
4178
  var recordMachineFailure = (options) => (options.client ?? client).post({
@@ -4139,7 +4183,7 @@ var recordMachineFailure = (options) => (options.client ?? client).post({
4139
4183
  scheme: "bearer",
4140
4184
  type: "http"
4141
4185
  }],
4142
- url: "/api/v1/daemon/failures",
4186
+ url: "/daemon/failures",
4143
4187
  ...options,
4144
4188
  headers: {
4145
4189
  "Content-Type": "text/plain",
@@ -4161,7 +4205,7 @@ var createOrganization = (options) => (options.client ?? client).post({
4161
4205
  },
4162
4206
  { name: "X-Omnara-Csrf", type: "apiKey" }
4163
4207
  ],
4164
- url: "/api/v1/orgs",
4208
+ url: "/orgs",
4165
4209
  ...options,
4166
4210
  headers: {
4167
4211
  "Content-Type": "application/json",
@@ -4183,7 +4227,7 @@ var deleteOrganization = (options) => (options.client ?? client).delete({
4183
4227
  },
4184
4228
  { name: "X-Omnara-Csrf", type: "apiKey" }
4185
4229
  ],
4186
- url: "/api/v1/orgs/{orgID}",
4230
+ url: "/orgs/{orgID}",
4187
4231
  ...options
4188
4232
  });
4189
4233
  var deleteCurrentUser = (options) => (options?.client ?? client).delete({
@@ -4201,7 +4245,7 @@ var deleteCurrentUser = (options) => (options?.client ?? client).delete({
4201
4245
  },
4202
4246
  { name: "X-Omnara-Csrf", type: "apiKey" }
4203
4247
  ],
4204
- url: "/api/v1/me",
4248
+ url: "/me",
4205
4249
  ...options
4206
4250
  });
4207
4251
  var getCurrentUser = (options) => (options?.client ?? client).get({
@@ -4215,7 +4259,7 @@ var getCurrentUser = (options) => (options?.client ?? client).get({
4215
4259
  name: "__Host-omnara_session",
4216
4260
  type: "apiKey"
4217
4261
  }],
4218
- url: "/api/v1/me",
4262
+ url: "/me",
4219
4263
  ...options
4220
4264
  });
4221
4265
  var listPendingInvitations = (options) => (options?.client ?? client).get({
@@ -4229,7 +4273,7 @@ var listPendingInvitations = (options) => (options?.client ?? client).get({
4229
4273
  name: "__Host-omnara_session",
4230
4274
  type: "apiKey"
4231
4275
  }],
4232
- url: "/api/v1/invitations",
4276
+ url: "/invitations",
4233
4277
  ...options
4234
4278
  });
4235
4279
  var acceptInvitation = (options) => (options.client ?? client).post({
@@ -4247,7 +4291,7 @@ var acceptInvitation = (options) => (options.client ?? client).post({
4247
4291
  },
4248
4292
  { name: "X-Omnara-Csrf", type: "apiKey" }
4249
4293
  ],
4250
- url: "/api/v1/invitations/{invitationID}/accept",
4294
+ url: "/invitations/{invitationID}/accept",
4251
4295
  ...options
4252
4296
  });
4253
4297
  var declineInvitation = (options) => (options.client ?? client).post({
@@ -4265,7 +4309,7 @@ var declineInvitation = (options) => (options.client ?? client).post({
4265
4309
  },
4266
4310
  { name: "X-Omnara-Csrf", type: "apiKey" }
4267
4311
  ],
4268
- url: "/api/v1/invitations/{invitationID}/decline",
4312
+ url: "/invitations/{invitationID}/decline",
4269
4313
  ...options
4270
4314
  });
4271
4315
  var getOrgOverview = (options) => (options.client ?? client).get({
@@ -4279,7 +4323,7 @@ var getOrgOverview = (options) => (options.client ?? client).get({
4279
4323
  name: "__Host-omnara_session",
4280
4324
  type: "apiKey"
4281
4325
  }],
4282
- url: "/api/v1/orgs/{orgID}/overview",
4326
+ url: "/orgs/{orgID}/overview",
4283
4327
  ...options
4284
4328
  });
4285
4329
  var listVisibleProjects = (options) => (options.client ?? client).get({
@@ -4293,7 +4337,7 @@ var listVisibleProjects = (options) => (options.client ?? client).get({
4293
4337
  name: "__Host-omnara_session",
4294
4338
  type: "apiKey"
4295
4339
  }],
4296
- url: "/api/v1/orgs/{orgID}/projects",
4340
+ url: "/orgs/{orgID}/projects",
4297
4341
  ...options
4298
4342
  });
4299
4343
  var createProject = (options) => (options.client ?? client).post({
@@ -4311,7 +4355,7 @@ var createProject = (options) => (options.client ?? client).post({
4311
4355
  },
4312
4356
  { name: "X-Omnara-Csrf", type: "apiKey" }
4313
4357
  ],
4314
- url: "/api/v1/orgs/{orgID}/projects",
4358
+ url: "/orgs/{orgID}/projects",
4315
4359
  ...options,
4316
4360
  headers: {
4317
4361
  "Content-Type": "application/json",
@@ -4333,7 +4377,7 @@ var deleteProject = (options) => (options.client ?? client).delete({
4333
4377
  },
4334
4378
  { name: "X-Omnara-Csrf", type: "apiKey" }
4335
4379
  ],
4336
- url: "/api/v1/orgs/{orgID}/projects/{projectID}",
4380
+ url: "/orgs/{orgID}/projects/{projectID}",
4337
4381
  ...options
4338
4382
  });
4339
4383
  var listOrgMembers = (options) => (options.client ?? client).get({
@@ -4347,7 +4391,7 @@ var listOrgMembers = (options) => (options.client ?? client).get({
4347
4391
  name: "__Host-omnara_session",
4348
4392
  type: "apiKey"
4349
4393
  }],
4350
- url: "/api/v1/orgs/{orgID}/members",
4394
+ url: "/orgs/{orgID}/members",
4351
4395
  ...options
4352
4396
  });
4353
4397
  var removeOrgMember = (options) => (options.client ?? client).delete({
@@ -4365,7 +4409,7 @@ var removeOrgMember = (options) => (options.client ?? client).delete({
4365
4409
  },
4366
4410
  { name: "X-Omnara-Csrf", type: "apiKey" }
4367
4411
  ],
4368
- url: "/api/v1/orgs/{orgID}/members/{userID}",
4412
+ url: "/orgs/{orgID}/members/{userID}",
4369
4413
  ...options
4370
4414
  });
4371
4415
  var updateOrgMember = (options) => (options.client ?? client).patch({
@@ -4383,7 +4427,7 @@ var updateOrgMember = (options) => (options.client ?? client).patch({
4383
4427
  },
4384
4428
  { name: "X-Omnara-Csrf", type: "apiKey" }
4385
4429
  ],
4386
- url: "/api/v1/orgs/{orgID}/members/{userID}",
4430
+ url: "/orgs/{orgID}/members/{userID}",
4387
4431
  ...options,
4388
4432
  headers: {
4389
4433
  "Content-Type": "application/json",
@@ -4401,7 +4445,7 @@ var listMemberProjectAccess = (options) => (options.client ?? client).get({
4401
4445
  name: "__Host-omnara_session",
4402
4446
  type: "apiKey"
4403
4447
  }],
4404
- url: "/api/v1/orgs/{orgID}/members/{userID}/projects",
4448
+ url: "/orgs/{orgID}/members/{userID}/projects",
4405
4449
  ...options
4406
4450
  });
4407
4451
  var removeMemberProjectAccess = (options) => (options.client ?? client).delete({
@@ -4419,7 +4463,7 @@ var removeMemberProjectAccess = (options) => (options.client ?? client).delete({
4419
4463
  },
4420
4464
  { name: "X-Omnara-Csrf", type: "apiKey" }
4421
4465
  ],
4422
- url: "/api/v1/orgs/{orgID}/members/{userID}/projects/{projectID}",
4466
+ url: "/orgs/{orgID}/members/{userID}/projects/{projectID}",
4423
4467
  ...options
4424
4468
  });
4425
4469
  var setMemberProjectAccess = (options) => (options.client ?? client).put({
@@ -4437,7 +4481,7 @@ var setMemberProjectAccess = (options) => (options.client ?? client).put({
4437
4481
  },
4438
4482
  { name: "X-Omnara-Csrf", type: "apiKey" }
4439
4483
  ],
4440
- url: "/api/v1/orgs/{orgID}/members/{userID}/projects/{projectID}",
4484
+ url: "/orgs/{orgID}/members/{userID}/projects/{projectID}",
4441
4485
  ...options,
4442
4486
  headers: {
4443
4487
  "Content-Type": "application/json",
@@ -4455,7 +4499,7 @@ var listOrgApiKeys = (options) => (options.client ?? client).get({
4455
4499
  name: "__Host-omnara_session",
4456
4500
  type: "apiKey"
4457
4501
  }],
4458
- url: "/api/v1/orgs/{orgID}/api-keys",
4502
+ url: "/orgs/{orgID}/api-keys",
4459
4503
  ...options
4460
4504
  });
4461
4505
  var createOrgApiKey = (options) => (options.client ?? client).post({
@@ -4465,7 +4509,7 @@ var createOrgApiKey = (options) => (options.client ?? client).post({
4465
4509
  name: "__Host-omnara_session",
4466
4510
  type: "apiKey"
4467
4511
  }, { name: "X-Omnara-Csrf", type: "apiKey" }],
4468
- url: "/api/v1/orgs/{orgID}/api-keys",
4512
+ url: "/orgs/{orgID}/api-keys",
4469
4513
  ...options,
4470
4514
  headers: {
4471
4515
  "Content-Type": "application/json",
@@ -4483,7 +4527,7 @@ var getOrgApiKey = (options) => (options.client ?? client).get({
4483
4527
  name: "__Host-omnara_session",
4484
4528
  type: "apiKey"
4485
4529
  }],
4486
- url: "/api/v1/orgs/{orgID}/api-keys/{keyID}",
4530
+ url: "/orgs/{orgID}/api-keys/{keyID}",
4487
4531
  ...options
4488
4532
  });
4489
4533
  var updateOrgApiKey = (options) => (options.client ?? client).patch({
@@ -4493,7 +4537,7 @@ var updateOrgApiKey = (options) => (options.client ?? client).patch({
4493
4537
  name: "__Host-omnara_session",
4494
4538
  type: "apiKey"
4495
4539
  }, { name: "X-Omnara-Csrf", type: "apiKey" }],
4496
- url: "/api/v1/orgs/{orgID}/api-keys/{keyID}",
4540
+ url: "/orgs/{orgID}/api-keys/{keyID}",
4497
4541
  ...options,
4498
4542
  headers: {
4499
4543
  "Content-Type": "application/json",
@@ -4507,7 +4551,7 @@ var revokeOrgApiKey = (options) => (options.client ?? client).post({
4507
4551
  name: "__Host-omnara_session",
4508
4552
  type: "apiKey"
4509
4553
  }, { name: "X-Omnara-Csrf", type: "apiKey" }],
4510
- url: "/api/v1/orgs/{orgID}/api-keys/{keyID}/revoke",
4554
+ url: "/orgs/{orgID}/api-keys/{keyID}/revoke",
4511
4555
  ...options
4512
4556
  });
4513
4557
  var listOrgApiKeyProjectAccess = (options) => (options.client ?? client).get({
@@ -4521,7 +4565,7 @@ var listOrgApiKeyProjectAccess = (options) => (options.client ?? client).get({
4521
4565
  name: "__Host-omnara_session",
4522
4566
  type: "apiKey"
4523
4567
  }],
4524
- url: "/api/v1/orgs/{orgID}/api-keys/{keyID}/projects",
4568
+ url: "/orgs/{orgID}/api-keys/{keyID}/projects",
4525
4569
  ...options
4526
4570
  });
4527
4571
  var removeOrgApiKeyProjectRole = (options) => (options.client ?? client).delete({
@@ -4531,7 +4575,7 @@ var removeOrgApiKeyProjectRole = (options) => (options.client ?? client).delete(
4531
4575
  name: "__Host-omnara_session",
4532
4576
  type: "apiKey"
4533
4577
  }, { name: "X-Omnara-Csrf", type: "apiKey" }],
4534
- url: "/api/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}",
4578
+ url: "/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}",
4535
4579
  ...options
4536
4580
  });
4537
4581
  var setOrgApiKeyProjectRole = (options) => (options.client ?? client).put({
@@ -4541,7 +4585,7 @@ var setOrgApiKeyProjectRole = (options) => (options.client ?? client).put({
4541
4585
  name: "__Host-omnara_session",
4542
4586
  type: "apiKey"
4543
4587
  }, { name: "X-Omnara-Csrf", type: "apiKey" }],
4544
- url: "/api/v1/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}",
4588
+ url: "/orgs/{orgID}/api-keys/{keyID}/projects/{projectID}",
4545
4589
  ...options,
4546
4590
  headers: {
4547
4591
  "Content-Type": "application/json",
@@ -4559,7 +4603,7 @@ var listOrgInvitations = (options) => (options.client ?? client).get({
4559
4603
  name: "__Host-omnara_session",
4560
4604
  type: "apiKey"
4561
4605
  }],
4562
- url: "/api/v1/orgs/{orgID}/invitations",
4606
+ url: "/orgs/{orgID}/invitations",
4563
4607
  ...options
4564
4608
  });
4565
4609
  var createOrgInvitation = (options) => (options.client ?? client).post({
@@ -4577,7 +4621,7 @@ var createOrgInvitation = (options) => (options.client ?? client).post({
4577
4621
  },
4578
4622
  { name: "X-Omnara-Csrf", type: "apiKey" }
4579
4623
  ],
4580
- url: "/api/v1/orgs/{orgID}/invitations",
4624
+ url: "/orgs/{orgID}/invitations",
4581
4625
  ...options,
4582
4626
  headers: {
4583
4627
  "Content-Type": "application/json",
@@ -4599,7 +4643,7 @@ var deleteOrgInvitation = (options) => (options.client ?? client).delete({
4599
4643
  },
4600
4644
  { name: "X-Omnara-Csrf", type: "apiKey" }
4601
4645
  ],
4602
- url: "/api/v1/orgs/{orgID}/invitations/{invitationID}",
4646
+ url: "/orgs/{orgID}/invitations/{invitationID}",
4603
4647
  ...options
4604
4648
  });
4605
4649
  var listSkills = (options) => (options.client ?? client).get({
@@ -4613,7 +4657,7 @@ var listSkills = (options) => (options.client ?? client).get({
4613
4657
  name: "__Host-omnara_session",
4614
4658
  type: "apiKey"
4615
4659
  }],
4616
- url: "/api/v1/orgs/{orgID}/skills",
4660
+ url: "/orgs/{orgID}/skills",
4617
4661
  ...options
4618
4662
  });
4619
4663
  var createSkill = (options) => (options.client ?? client).post({
@@ -4632,7 +4676,7 @@ var createSkill = (options) => (options.client ?? client).post({
4632
4676
  },
4633
4677
  { name: "X-Omnara-Csrf", type: "apiKey" }
4634
4678
  ],
4635
- url: "/api/v1/orgs/{orgID}/skills",
4679
+ url: "/orgs/{orgID}/skills",
4636
4680
  ...options,
4637
4681
  headers: {
4638
4682
  "Content-Type": null,
@@ -4654,7 +4698,7 @@ var deleteSkill = (options) => (options.client ?? client).delete({
4654
4698
  },
4655
4699
  { name: "X-Omnara-Csrf", type: "apiKey" }
4656
4700
  ],
4657
- url: "/api/v1/orgs/{orgID}/skills/{skillID}",
4701
+ url: "/orgs/{orgID}/skills/{skillID}",
4658
4702
  ...options
4659
4703
  });
4660
4704
  var getSkill = (options) => (options.client ?? client).get({
@@ -4668,9 +4712,32 @@ var getSkill = (options) => (options.client ?? client).get({
4668
4712
  name: "__Host-omnara_session",
4669
4713
  type: "apiKey"
4670
4714
  }],
4671
- url: "/api/v1/orgs/{orgID}/skills/{skillID}",
4715
+ url: "/orgs/{orgID}/skills/{skillID}",
4672
4716
  ...options
4673
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
+ });
4674
4741
  var listSkillGrants = (options) => (options.client ?? client).get({
4675
4742
  responseValidator: async (data) => await validateResponse(zListSkillGrantsResponse2, data),
4676
4743
  security: [{
@@ -4682,7 +4749,7 @@ var listSkillGrants = (options) => (options.client ?? client).get({
4682
4749
  name: "__Host-omnara_session",
4683
4750
  type: "apiKey"
4684
4751
  }],
4685
- url: "/api/v1/orgs/{orgID}/skills/{skillID}/grants",
4752
+ url: "/orgs/{orgID}/skills/{skillID}/grants",
4686
4753
  ...options
4687
4754
  });
4688
4755
  var createSkillGrant = (options) => (options.client ?? client).post({
@@ -4700,7 +4767,7 @@ var createSkillGrant = (options) => (options.client ?? client).post({
4700
4767
  },
4701
4768
  { name: "X-Omnara-Csrf", type: "apiKey" }
4702
4769
  ],
4703
- url: "/api/v1/orgs/{orgID}/skills/{skillID}/grants",
4770
+ url: "/orgs/{orgID}/skills/{skillID}/grants",
4704
4771
  ...options,
4705
4772
  headers: {
4706
4773
  "Content-Type": "application/json",
@@ -4722,7 +4789,7 @@ var deleteSkillGrant = (options) => (options.client ?? client).delete({
4722
4789
  },
4723
4790
  { name: "X-Omnara-Csrf", type: "apiKey" }
4724
4791
  ],
4725
- url: "/api/v1/orgs/{orgID}/skills/{skillID}/grants/{grantID}",
4792
+ url: "/orgs/{orgID}/skills/{skillID}/grants/{grantID}",
4726
4793
  ...options
4727
4794
  });
4728
4795
  var listProjectAvailableSkills = (options) => (options.client ?? client).get({
@@ -4736,7 +4803,7 @@ var listProjectAvailableSkills = (options) => (options.client ?? client).get({
4736
4803
  name: "__Host-omnara_session",
4737
4804
  type: "apiKey"
4738
4805
  }],
4739
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/skills",
4806
+ url: "/orgs/{orgID}/projects/{projectID}/skills",
4740
4807
  ...options
4741
4808
  });
4742
4809
  var listSecrets = (options) => (options.client ?? client).get({
@@ -4750,7 +4817,7 @@ var listSecrets = (options) => (options.client ?? client).get({
4750
4817
  name: "__Host-omnara_session",
4751
4818
  type: "apiKey"
4752
4819
  }],
4753
- url: "/api/v1/orgs/{orgID}/secrets",
4820
+ url: "/orgs/{orgID}/secrets",
4754
4821
  ...options
4755
4822
  });
4756
4823
  var createSecret = (options) => (options.client ?? client).post({
@@ -4768,7 +4835,7 @@ var createSecret = (options) => (options.client ?? client).post({
4768
4835
  },
4769
4836
  { name: "X-Omnara-Csrf", type: "apiKey" }
4770
4837
  ],
4771
- url: "/api/v1/orgs/{orgID}/secrets",
4838
+ url: "/orgs/{orgID}/secrets",
4772
4839
  ...options,
4773
4840
  headers: {
4774
4841
  "Content-Type": "application/json",
@@ -4790,7 +4857,7 @@ var startSecretMcpoAuth = (options) => (options.client ?? client).post({
4790
4857
  },
4791
4858
  { name: "X-Omnara-Csrf", type: "apiKey" }
4792
4859
  ],
4793
- url: "/api/v1/orgs/{orgID}/secrets/mcp-oauth",
4860
+ url: "/orgs/{orgID}/secrets/mcp-oauth",
4794
4861
  ...options,
4795
4862
  headers: {
4796
4863
  "Content-Type": "application/json",
@@ -4812,7 +4879,7 @@ var deleteSecret = (options) => (options.client ?? client).delete({
4812
4879
  },
4813
4880
  { name: "X-Omnara-Csrf", type: "apiKey" }
4814
4881
  ],
4815
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}",
4882
+ url: "/orgs/{orgID}/secrets/{secretID}",
4816
4883
  ...options
4817
4884
  });
4818
4885
  var getSecret = (options) => (options.client ?? client).get({
@@ -4826,7 +4893,7 @@ var getSecret = (options) => (options.client ?? client).get({
4826
4893
  name: "__Host-omnara_session",
4827
4894
  type: "apiKey"
4828
4895
  }],
4829
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}",
4896
+ url: "/orgs/{orgID}/secrets/{secretID}",
4830
4897
  ...options
4831
4898
  });
4832
4899
  var updateSecret = (options) => (options.client ?? client).patch({
@@ -4844,7 +4911,7 @@ var updateSecret = (options) => (options.client ?? client).patch({
4844
4911
  },
4845
4912
  { name: "X-Omnara-Csrf", type: "apiKey" }
4846
4913
  ],
4847
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}",
4914
+ url: "/orgs/{orgID}/secrets/{secretID}",
4848
4915
  ...options,
4849
4916
  headers: {
4850
4917
  "Content-Type": "application/json",
@@ -4866,7 +4933,7 @@ var createSecretVersion = (options) => (options.client ?? client).post({
4866
4933
  },
4867
4934
  { name: "X-Omnara-Csrf", type: "apiKey" }
4868
4935
  ],
4869
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}/versions",
4936
+ url: "/orgs/{orgID}/secrets/{secretID}/versions",
4870
4937
  ...options,
4871
4938
  headers: {
4872
4939
  "Content-Type": "application/json",
@@ -4884,7 +4951,7 @@ var listSecretGrants = (options) => (options.client ?? client).get({
4884
4951
  name: "__Host-omnara_session",
4885
4952
  type: "apiKey"
4886
4953
  }],
4887
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}/grants",
4954
+ url: "/orgs/{orgID}/secrets/{secretID}/grants",
4888
4955
  ...options
4889
4956
  });
4890
4957
  var createSecretGrant = (options) => (options.client ?? client).post({
@@ -4902,7 +4969,7 @@ var createSecretGrant = (options) => (options.client ?? client).post({
4902
4969
  },
4903
4970
  { name: "X-Omnara-Csrf", type: "apiKey" }
4904
4971
  ],
4905
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}/grants",
4972
+ url: "/orgs/{orgID}/secrets/{secretID}/grants",
4906
4973
  ...options,
4907
4974
  headers: {
4908
4975
  "Content-Type": "application/json",
@@ -4924,7 +4991,7 @@ var deleteSecretGrant = (options) => (options.client ?? client).delete({
4924
4991
  },
4925
4992
  { name: "X-Omnara-Csrf", type: "apiKey" }
4926
4993
  ],
4927
- url: "/api/v1/orgs/{orgID}/secrets/{secretID}/grants/{grantID}",
4994
+ url: "/orgs/{orgID}/secrets/{secretID}/grants/{grantID}",
4928
4995
  ...options
4929
4996
  });
4930
4997
  var listIntegrationInstalls = (options) => (options.client ?? client).get({
@@ -4938,7 +5005,7 @@ var listIntegrationInstalls = (options) => (options.client ?? client).get({
4938
5005
  name: "__Host-omnara_session",
4939
5006
  type: "apiKey"
4940
5007
  }],
4941
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/integration-installs",
5008
+ url: "/orgs/{orgID}/projects/{projectID}/integration-installs",
4942
5009
  ...options
4943
5010
  });
4944
5011
  var deleteIntegrationInstall = (options) => (options.client ?? client).delete({
@@ -4956,7 +5023,7 @@ var deleteIntegrationInstall = (options) => (options.client ?? client).delete({
4956
5023
  },
4957
5024
  { name: "X-Omnara-Csrf", type: "apiKey" }
4958
5025
  ],
4959
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/integration-installs/{integrationInstallID}",
5026
+ url: "/orgs/{orgID}/projects/{projectID}/integration-installs/{integrationInstallID}",
4960
5027
  ...options
4961
5028
  });
4962
5029
  var createAgentConfig = (options) => (options.client ?? client).post({
@@ -4974,7 +5041,7 @@ var createAgentConfig = (options) => (options.client ?? client).post({
4974
5041
  },
4975
5042
  { name: "X-Omnara-Csrf", type: "apiKey" }
4976
5043
  ],
4977
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-configs",
5044
+ url: "/orgs/{orgID}/projects/{projectID}/agent-configs",
4978
5045
  ...options,
4979
5046
  headers: {
4980
5047
  "Content-Type": "application/json",
@@ -4992,7 +5059,7 @@ var getToolCatalog = (options) => (options?.client ?? client).get({
4992
5059
  name: "__Host-omnara_session",
4993
5060
  type: "apiKey"
4994
5061
  }],
4995
- url: "/api/v1/tool-catalog",
5062
+ url: "/tool-catalog",
4996
5063
  ...options
4997
5064
  });
4998
5065
  var listMcpServers = (options) => (options?.client ?? client).get({
@@ -5006,7 +5073,7 @@ var listMcpServers = (options) => (options?.client ?? client).get({
5006
5073
  name: "__Host-omnara_session",
5007
5074
  type: "apiKey"
5008
5075
  }],
5009
- url: "/api/v1/mcp-servers",
5076
+ url: "/mcp-servers",
5010
5077
  ...options
5011
5078
  });
5012
5079
  var listMcpServerTools = (options) => (options.client ?? client).post({
@@ -5024,7 +5091,7 @@ var listMcpServerTools = (options) => (options.client ?? client).post({
5024
5091
  },
5025
5092
  { name: "X-Omnara-Csrf", type: "apiKey" }
5026
5093
  ],
5027
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/mcp-servers/tools",
5094
+ url: "/orgs/{orgID}/projects/{projectID}/mcp-servers/tools",
5028
5095
  ...options,
5029
5096
  headers: {
5030
5097
  "Content-Type": "application/json",
@@ -5042,7 +5109,7 @@ var getAgentConfig = (options) => (options.client ?? client).get({
5042
5109
  name: "__Host-omnara_session",
5043
5110
  type: "apiKey"
5044
5111
  }],
5045
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-configs/{agentConfigID}",
5112
+ url: "/orgs/{orgID}/projects/{projectID}/agent-configs/{agentConfigID}",
5046
5113
  ...options
5047
5114
  });
5048
5115
  var listAgentProfiles = (options) => (options.client ?? client).get({
@@ -5056,7 +5123,7 @@ var listAgentProfiles = (options) => (options.client ?? client).get({
5056
5123
  name: "__Host-omnara_session",
5057
5124
  type: "apiKey"
5058
5125
  }],
5059
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles",
5126
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles",
5060
5127
  ...options
5061
5128
  });
5062
5129
  var createAgentProfile = (options) => (options.client ?? client).post({
@@ -5074,7 +5141,7 @@ var createAgentProfile = (options) => (options.client ?? client).post({
5074
5141
  },
5075
5142
  { name: "X-Omnara-Csrf", type: "apiKey" }
5076
5143
  ],
5077
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles",
5144
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles",
5078
5145
  ...options,
5079
5146
  headers: {
5080
5147
  "Content-Type": "application/json",
@@ -5096,7 +5163,7 @@ var deleteAgentProfile = (options) => (options.client ?? client).delete({
5096
5163
  },
5097
5164
  { name: "X-Omnara-Csrf", type: "apiKey" }
5098
5165
  ],
5099
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}",
5166
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}",
5100
5167
  ...options
5101
5168
  });
5102
5169
  var getAgentProfile = (options) => (options.client ?? client).get({
@@ -5110,7 +5177,7 @@ var getAgentProfile = (options) => (options.client ?? client).get({
5110
5177
  name: "__Host-omnara_session",
5111
5178
  type: "apiKey"
5112
5179
  }],
5113
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}",
5180
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}",
5114
5181
  ...options
5115
5182
  });
5116
5183
  var renameAgentProfile = (options) => (options.client ?? client).patch({
@@ -5128,7 +5195,7 @@ var renameAgentProfile = (options) => (options.client ?? client).patch({
5128
5195
  },
5129
5196
  { name: "X-Omnara-Csrf", type: "apiKey" }
5130
5197
  ],
5131
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}",
5198
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}",
5132
5199
  ...options,
5133
5200
  headers: {
5134
5201
  "Content-Type": "application/json",
@@ -5150,7 +5217,7 @@ var updateAgentProfile = (options) => (options.client ?? client).post({
5150
5217
  },
5151
5218
  { name: "X-Omnara-Csrf", type: "apiKey" }
5152
5219
  ],
5153
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}/config",
5220
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}/config",
5154
5221
  ...options,
5155
5222
  headers: {
5156
5223
  "Content-Type": "application/json",
@@ -5172,7 +5239,7 @@ var createIntegrationOAuthSetup = (options) => (options.client ?? client).post({
5172
5239
  },
5173
5240
  { name: "X-Omnara-Csrf", type: "apiKey" }
5174
5241
  ],
5175
- 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",
5176
5243
  ...options,
5177
5244
  headers: {
5178
5245
  "Content-Type": "application/json",
@@ -5194,7 +5261,7 @@ var createSlackSetup = (options) => (options.client ?? client).post({
5194
5261
  },
5195
5262
  { name: "X-Omnara-Csrf", type: "apiKey" }
5196
5263
  ],
5197
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}/slack-setup",
5264
+ url: "/orgs/{orgID}/projects/{projectID}/agent-profiles/{agentProfileID}/slack-setup",
5198
5265
  ...options,
5199
5266
  headers: {
5200
5267
  "Content-Type": "application/json",
@@ -5212,7 +5279,7 @@ var listCronTriggers = (options) => (options.client ?? client).get({
5212
5279
  name: "__Host-omnara_session",
5213
5280
  type: "apiKey"
5214
5281
  }],
5215
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/cron-triggers",
5282
+ url: "/orgs/{orgID}/projects/{projectID}/cron-triggers",
5216
5283
  ...options
5217
5284
  });
5218
5285
  var createCronTrigger = (options) => (options.client ?? client).post({
@@ -5230,7 +5297,7 @@ var createCronTrigger = (options) => (options.client ?? client).post({
5230
5297
  },
5231
5298
  { name: "X-Omnara-Csrf", type: "apiKey" }
5232
5299
  ],
5233
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/cron-triggers",
5300
+ url: "/orgs/{orgID}/projects/{projectID}/cron-triggers",
5234
5301
  ...options,
5235
5302
  headers: {
5236
5303
  "Content-Type": "application/json",
@@ -5252,7 +5319,7 @@ var deleteCronTrigger = (options) => (options.client ?? client).delete({
5252
5319
  },
5253
5320
  { name: "X-Omnara-Csrf", type: "apiKey" }
5254
5321
  ],
5255
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/cron-triggers/{cronTriggerID}",
5322
+ url: "/orgs/{orgID}/projects/{projectID}/cron-triggers/{cronTriggerID}",
5256
5323
  ...options
5257
5324
  });
5258
5325
  var getCronTrigger = (options) => (options.client ?? client).get({
@@ -5266,7 +5333,7 @@ var getCronTrigger = (options) => (options.client ?? client).get({
5266
5333
  name: "__Host-omnara_session",
5267
5334
  type: "apiKey"
5268
5335
  }],
5269
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/cron-triggers/{cronTriggerID}",
5336
+ url: "/orgs/{orgID}/projects/{projectID}/cron-triggers/{cronTriggerID}",
5270
5337
  ...options
5271
5338
  });
5272
5339
  var updateCronTrigger = (options) => (options.client ?? client).patch({
@@ -5284,7 +5351,7 @@ var updateCronTrigger = (options) => (options.client ?? client).patch({
5284
5351
  },
5285
5352
  { name: "X-Omnara-Csrf", type: "apiKey" }
5286
5353
  ],
5287
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/cron-triggers/{cronTriggerID}",
5354
+ url: "/orgs/{orgID}/projects/{projectID}/cron-triggers/{cronTriggerID}",
5288
5355
  ...options,
5289
5356
  headers: {
5290
5357
  "Content-Type": "application/json",
@@ -5302,7 +5369,7 @@ var listAgents = (options) => (options.client ?? client).get({
5302
5369
  name: "__Host-omnara_session",
5303
5370
  type: "apiKey"
5304
5371
  }],
5305
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents",
5372
+ url: "/orgs/{orgID}/projects/{projectID}/agents",
5306
5373
  ...options
5307
5374
  });
5308
5375
  var createAgent = (options) => (options.client ?? client).post({
@@ -5320,7 +5387,7 @@ var createAgent = (options) => (options.client ?? client).post({
5320
5387
  },
5321
5388
  { name: "X-Omnara-Csrf", type: "apiKey" }
5322
5389
  ],
5323
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents",
5390
+ url: "/orgs/{orgID}/projects/{projectID}/agents",
5324
5391
  ...options,
5325
5392
  headers: {
5326
5393
  "Content-Type": "application/json",
@@ -5338,7 +5405,7 @@ var getAgent = (options) => (options.client ?? client).get({
5338
5405
  name: "__Host-omnara_session",
5339
5406
  type: "apiKey"
5340
5407
  }],
5341
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}",
5408
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}",
5342
5409
  ...options
5343
5410
  });
5344
5411
  var archiveAgent = (options) => (options.client ?? client).post({
@@ -5356,7 +5423,7 @@ var archiveAgent = (options) => (options.client ?? client).post({
5356
5423
  },
5357
5424
  { name: "X-Omnara-Csrf", type: "apiKey" }
5358
5425
  ],
5359
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive",
5426
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/archive",
5360
5427
  ...options
5361
5428
  });
5362
5429
  var updateAgentConfig = (options) => (options.client ?? client).post({
@@ -5374,7 +5441,7 @@ var updateAgentConfig = (options) => (options.client ?? client).post({
5374
5441
  },
5375
5442
  { name: "X-Omnara-Csrf", type: "apiKey" }
5376
5443
  ],
5377
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/config",
5444
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/config",
5378
5445
  ...options,
5379
5446
  headers: {
5380
5447
  "Content-Type": "application/json",
@@ -5396,7 +5463,7 @@ var createAgentInput = (options) => (options.client ?? client).post({
5396
5463
  },
5397
5464
  { name: "X-Omnara-Csrf", type: "apiKey" }
5398
5465
  ],
5399
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs",
5466
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs",
5400
5467
  ...options,
5401
5468
  headers: {
5402
5469
  "Content-Type": "application/json",
@@ -5414,7 +5481,7 @@ var listToolCalls = (options) => (options.client ?? client).get({
5414
5481
  name: "__Host-omnara_session",
5415
5482
  type: "apiKey"
5416
5483
  }],
5417
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/tool-calls",
5484
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/tool-calls",
5418
5485
  ...options
5419
5486
  });
5420
5487
  var submitToolCallResult = (options) => (options.client ?? client).post({
@@ -5432,7 +5499,7 @@ var submitToolCallResult = (options) => (options.client ?? client).post({
5432
5499
  },
5433
5500
  { name: "X-Omnara-Csrf", type: "apiKey" }
5434
5501
  ],
5435
- 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",
5436
5503
  ...options,
5437
5504
  headers: {
5438
5505
  "Content-Type": "application/json",
@@ -5450,7 +5517,7 @@ var listTurns = (options) => (options.client ?? client).get({
5450
5517
  name: "__Host-omnara_session",
5451
5518
  type: "apiKey"
5452
5519
  }],
5453
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns",
5520
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns",
5454
5521
  ...options
5455
5522
  });
5456
5523
  var listTurnEvents = (options) => (options.client ?? client).get({
@@ -5464,7 +5531,7 @@ var listTurnEvents = (options) => (options.client ?? client).get({
5464
5531
  name: "__Host-omnara_session",
5465
5532
  type: "apiKey"
5466
5533
  }],
5467
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns/{turnID}/events",
5534
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/turns/{turnID}/events",
5468
5535
  ...options
5469
5536
  });
5470
5537
  var listEvents = (options) => (options.client ?? client).get({
@@ -5478,7 +5545,7 @@ var listEvents = (options) => (options.client ?? client).get({
5478
5545
  name: "__Host-omnara_session",
5479
5546
  type: "apiKey"
5480
5547
  }],
5481
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/events",
5548
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/events",
5482
5549
  ...options
5483
5550
  });
5484
5551
  var streamEvents = (options) => (options.client ?? client).sse.get({
@@ -5492,7 +5559,7 @@ var streamEvents = (options) => (options.client ?? client).sse.get({
5492
5559
  name: "__Host-omnara_session",
5493
5560
  type: "apiKey"
5494
5561
  }],
5495
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/events/stream",
5562
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/events/stream",
5496
5563
  ...options
5497
5564
  });
5498
5565
  var cancelAgent = (options) => (options.client ?? client).post({
@@ -5510,7 +5577,7 @@ var cancelAgent = (options) => (options.client ?? client).post({
5510
5577
  },
5511
5578
  { name: "X-Omnara-Csrf", type: "apiKey" }
5512
5579
  ],
5513
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/cancel",
5580
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/cancel",
5514
5581
  ...options,
5515
5582
  headers: {
5516
5583
  "Content-Type": "application/json",
@@ -5528,7 +5595,7 @@ var listAgentInteractions = (options) => (options.client ?? client).get({
5528
5595
  name: "__Host-omnara_session",
5529
5596
  type: "apiKey"
5530
5597
  }],
5531
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/interactions",
5598
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/interactions",
5532
5599
  ...options
5533
5600
  });
5534
5601
  var resolveAgentInteraction = (options) => (options.client ?? client).post({
@@ -5546,7 +5613,7 @@ var resolveAgentInteraction = (options) => (options.client ?? client).post({
5546
5613
  },
5547
5614
  { name: "X-Omnara-Csrf", type: "apiKey" }
5548
5615
  ],
5549
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/interactions/{interactionID}/resolve",
5616
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/interactions/{interactionID}/resolve",
5550
5617
  ...options,
5551
5618
  headers: {
5552
5619
  "Content-Type": "application/json",
@@ -5564,7 +5631,7 @@ var listQueuedBacklogInputs = (options) => (options.client ?? client).get({
5564
5631
  name: "__Host-omnara_session",
5565
5632
  type: "apiKey"
5566
5633
  }],
5567
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/backlog",
5634
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/backlog",
5568
5635
  ...options
5569
5636
  });
5570
5637
  var cancelQueuedBacklogInput = (options) => (options.client ?? client).post({
@@ -5582,7 +5649,7 @@ var cancelQueuedBacklogInput = (options) => (options.client ?? client).post({
5582
5649
  },
5583
5650
  { name: "X-Omnara-Csrf", type: "apiKey" }
5584
5651
  ],
5585
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/{inputID}/cancel",
5652
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/{inputID}/cancel",
5586
5653
  ...options
5587
5654
  });
5588
5655
  var moveQueuedBacklogInput = (options) => (options.client ?? client).post({
@@ -5600,7 +5667,7 @@ var moveQueuedBacklogInput = (options) => (options.client ?? client).post({
5600
5667
  },
5601
5668
  { name: "X-Omnara-Csrf", type: "apiKey" }
5602
5669
  ],
5603
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/{inputID}/move",
5670
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/inputs/{inputID}/move",
5604
5671
  ...options,
5605
5672
  headers: {
5606
5673
  "Content-Type": "application/json",
@@ -5622,7 +5689,7 @@ var promoteQueuedInputToSteering = (options) => (options.client ?? client).post(
5622
5689
  },
5623
5690
  { name: "X-Omnara-Csrf", type: "apiKey" }
5624
5691
  ],
5625
- 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",
5626
5693
  ...options,
5627
5694
  headers: {
5628
5695
  "Content-Type": "application/json",
@@ -5644,7 +5711,7 @@ var demoteSteeringInputToQueued = (options) => (options.client ?? client).post({
5644
5711
  },
5645
5712
  { name: "X-Omnara-Csrf", type: "apiKey" }
5646
5713
  ],
5647
- 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",
5648
5715
  ...options
5649
5716
  });
5650
5717
  var getArtifact = (options) => (options.client ?? client).get({
@@ -5658,7 +5725,7 @@ var getArtifact = (options) => (options.client ?? client).get({
5658
5725
  name: "__Host-omnara_session",
5659
5726
  type: "apiKey"
5660
5727
  }],
5661
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/artifacts/{artifactID}",
5728
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/artifacts/{artifactID}",
5662
5729
  ...options
5663
5730
  });
5664
5731
  var getArtifactContent = (options) => (options.client ?? client).get({
@@ -5672,7 +5739,7 @@ var getArtifactContent = (options) => (options.client ?? client).get({
5672
5739
  name: "__Host-omnara_session",
5673
5740
  type: "apiKey"
5674
5741
  }],
5675
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/agents/{agentID}/artifacts/{artifactID}/content",
5742
+ url: "/orgs/{orgID}/projects/{projectID}/agents/{agentID}/artifacts/{artifactID}/content",
5676
5743
  ...options
5677
5744
  });
5678
5745
  var listVisibleProjectMachines = (options) => (options.client ?? client).get({
@@ -5686,7 +5753,7 @@ var listVisibleProjectMachines = (options) => (options.client ?? client).get({
5686
5753
  name: "__Host-omnara_session",
5687
5754
  type: "apiKey"
5688
5755
  }],
5689
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machines",
5756
+ url: "/orgs/{orgID}/projects/{projectID}/machines",
5690
5757
  ...options
5691
5758
  });
5692
5759
  var listProjectMachineGrants = (options) => (options.client ?? client).get({
@@ -5700,7 +5767,7 @@ var listProjectMachineGrants = (options) => (options.client ?? client).get({
5700
5767
  name: "__Host-omnara_session",
5701
5768
  type: "apiKey"
5702
5769
  }],
5703
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-grants",
5770
+ url: "/orgs/{orgID}/projects/{projectID}/machine-grants",
5704
5771
  ...options
5705
5772
  });
5706
5773
  var createProjectMachineGrant = (options) => (options.client ?? client).post({
@@ -5718,7 +5785,7 @@ var createProjectMachineGrant = (options) => (options.client ?? client).post({
5718
5785
  },
5719
5786
  { name: "X-Omnara-Csrf", type: "apiKey" }
5720
5787
  ],
5721
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-grants",
5788
+ url: "/orgs/{orgID}/projects/{projectID}/machine-grants",
5722
5789
  ...options,
5723
5790
  headers: {
5724
5791
  "Content-Type": "application/json",
@@ -5740,7 +5807,7 @@ var deleteProjectMachineGrant = (options) => (options.client ?? client).delete({
5740
5807
  },
5741
5808
  { name: "X-Omnara-Csrf", type: "apiKey" }
5742
5809
  ],
5743
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-grants/{grantID}",
5810
+ url: "/orgs/{orgID}/projects/{projectID}/machine-grants/{grantID}",
5744
5811
  ...options
5745
5812
  });
5746
5813
  var listProjectAvailableSecrets = (options) => (options.client ?? client).get({
@@ -5754,7 +5821,7 @@ var listProjectAvailableSecrets = (options) => (options.client ?? client).get({
5754
5821
  name: "__Host-omnara_session",
5755
5822
  type: "apiKey"
5756
5823
  }],
5757
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/secrets",
5824
+ url: "/orgs/{orgID}/projects/{projectID}/secrets",
5758
5825
  ...options
5759
5826
  });
5760
5827
  var getProjectAvailableSecret = (options) => (options.client ?? client).get({
@@ -5768,7 +5835,7 @@ var getProjectAvailableSecret = (options) => (options.client ?? client).get({
5768
5835
  name: "__Host-omnara_session",
5769
5836
  type: "apiKey"
5770
5837
  }],
5771
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/secrets/{secretID}",
5838
+ url: "/orgs/{orgID}/projects/{projectID}/secrets/{secretID}",
5772
5839
  ...options
5773
5840
  });
5774
5841
  var listActors = (options) => (options.client ?? client).get({
@@ -5782,7 +5849,7 @@ var listActors = (options) => (options.client ?? client).get({
5782
5849
  name: "__Host-omnara_session",
5783
5850
  type: "apiKey"
5784
5851
  }],
5785
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/actors",
5852
+ url: "/orgs/{orgID}/projects/{projectID}/actors",
5786
5853
  ...options
5787
5854
  });
5788
5855
  var putActor = (options) => (options.client ?? client).put({
@@ -5800,7 +5867,7 @@ var putActor = (options) => (options.client ?? client).put({
5800
5867
  },
5801
5868
  { name: "X-Omnara-Csrf", type: "apiKey" }
5802
5869
  ],
5803
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/actors",
5870
+ url: "/orgs/{orgID}/projects/{projectID}/actors",
5804
5871
  ...options,
5805
5872
  headers: {
5806
5873
  "Content-Type": "application/json",
@@ -5818,7 +5885,7 @@ var getActor = (options) => (options.client ?? client).get({
5818
5885
  name: "__Host-omnara_session",
5819
5886
  type: "apiKey"
5820
5887
  }],
5821
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/actors/{actorID}",
5888
+ url: "/orgs/{orgID}/projects/{projectID}/actors/{actorID}",
5822
5889
  ...options
5823
5890
  });
5824
5891
  var listVisibleMachines = (options) => (options.client ?? client).get({
@@ -5832,7 +5899,7 @@ var listVisibleMachines = (options) => (options.client ?? client).get({
5832
5899
  name: "__Host-omnara_session",
5833
5900
  type: "apiKey"
5834
5901
  }],
5835
- url: "/api/v1/orgs/{orgID}/machines",
5902
+ url: "/orgs/{orgID}/machines",
5836
5903
  ...options
5837
5904
  });
5838
5905
  var createMachine = (options) => (options.client ?? client).post({
@@ -5850,7 +5917,7 @@ var createMachine = (options) => (options.client ?? client).post({
5850
5917
  },
5851
5918
  { name: "X-Omnara-Csrf", type: "apiKey" }
5852
5919
  ],
5853
- url: "/api/v1/orgs/{orgID}/machines",
5920
+ url: "/orgs/{orgID}/machines",
5854
5921
  ...options,
5855
5922
  headers: {
5856
5923
  "Content-Type": "application/json",
@@ -5872,7 +5939,7 @@ var connectByoMachine = (options) => (options.client ?? client).post({
5872
5939
  },
5873
5940
  { name: "X-Omnara-Csrf", type: "apiKey" }
5874
5941
  ],
5875
- url: "/api/v1/orgs/{orgID}/machines/connect",
5942
+ url: "/orgs/{orgID}/machines/connect",
5876
5943
  ...options,
5877
5944
  headers: {
5878
5945
  "Content-Type": "application/json",
@@ -5894,7 +5961,7 @@ var deleteMachine = (options) => (options.client ?? client).delete({
5894
5961
  },
5895
5962
  { name: "X-Omnara-Csrf", type: "apiKey" }
5896
5963
  ],
5897
- url: "/api/v1/orgs/{orgID}/machines/{machineID}",
5964
+ url: "/orgs/{orgID}/machines/{machineID}",
5898
5965
  ...options
5899
5966
  });
5900
5967
  var getMachine = (options) => (options.client ?? client).get({
@@ -5908,7 +5975,7 @@ var getMachine = (options) => (options.client ?? client).get({
5908
5975
  name: "__Host-omnara_session",
5909
5976
  type: "apiKey"
5910
5977
  }],
5911
- url: "/api/v1/orgs/{orgID}/machines/{machineID}",
5978
+ url: "/orgs/{orgID}/machines/{machineID}",
5912
5979
  ...options
5913
5980
  });
5914
5981
  var updateMachine = (options) => (options.client ?? client).patch({
@@ -5926,7 +5993,7 @@ var updateMachine = (options) => (options.client ?? client).patch({
5926
5993
  },
5927
5994
  { name: "X-Omnara-Csrf", type: "apiKey" }
5928
5995
  ],
5929
- url: "/api/v1/orgs/{orgID}/machines/{machineID}",
5996
+ url: "/orgs/{orgID}/machines/{machineID}",
5930
5997
  ...options,
5931
5998
  headers: {
5932
5999
  "Content-Type": "application/json",
@@ -5944,7 +6011,7 @@ var listModelProviderConfigs = (options) => (options.client ?? client).get({
5944
6011
  name: "__Host-omnara_session",
5945
6012
  type: "apiKey"
5946
6013
  }],
5947
- url: "/api/v1/orgs/{orgID}/model-provider-configs",
6014
+ url: "/orgs/{orgID}/model-provider-configs",
5948
6015
  ...options
5949
6016
  });
5950
6017
  var createModelProviderConfig = (options) => (options.client ?? client).post({
@@ -5962,7 +6029,7 @@ var createModelProviderConfig = (options) => (options.client ?? client).post({
5962
6029
  },
5963
6030
  { name: "X-Omnara-Csrf", type: "apiKey" }
5964
6031
  ],
5965
- url: "/api/v1/orgs/{orgID}/model-provider-configs",
6032
+ url: "/orgs/{orgID}/model-provider-configs",
5966
6033
  ...options,
5967
6034
  headers: {
5968
6035
  "Content-Type": "application/json",
@@ -5984,7 +6051,7 @@ var deleteModelProviderConfig = (options) => (options.client ?? client).delete({
5984
6051
  },
5985
6052
  { name: "X-Omnara-Csrf", type: "apiKey" }
5986
6053
  ],
5987
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
6054
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
5988
6055
  ...options
5989
6056
  });
5990
6057
  var getModelProviderConfig = (options) => (options.client ?? client).get({
@@ -5998,7 +6065,7 @@ var getModelProviderConfig = (options) => (options.client ?? client).get({
5998
6065
  name: "__Host-omnara_session",
5999
6066
  type: "apiKey"
6000
6067
  }],
6001
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
6068
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
6002
6069
  ...options
6003
6070
  });
6004
6071
  var updateModelProviderConfig = (options) => (options.client ?? client).put({
@@ -6016,7 +6083,7 @@ var updateModelProviderConfig = (options) => (options.client ?? client).put({
6016
6083
  },
6017
6084
  { name: "X-Omnara-Csrf", type: "apiKey" }
6018
6085
  ],
6019
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
6086
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}",
6020
6087
  ...options,
6021
6088
  headers: {
6022
6089
  "Content-Type": "application/json",
@@ -6034,7 +6101,7 @@ var getModelCatalog = (options) => (options.client ?? client).get({
6034
6101
  name: "__Host-omnara_session",
6035
6102
  type: "apiKey"
6036
6103
  }],
6037
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/model-catalog",
6104
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/model-catalog",
6038
6105
  ...options
6039
6106
  });
6040
6107
  var listConfiguredModels = (options) => (options.client ?? client).get({
@@ -6048,7 +6115,7 @@ var listConfiguredModels = (options) => (options.client ?? client).get({
6048
6115
  name: "__Host-omnara_session",
6049
6116
  type: "apiKey"
6050
6117
  }],
6051
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models",
6118
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models",
6052
6119
  ...options
6053
6120
  });
6054
6121
  var createConfiguredModel = (options) => (options.client ?? client).post({
@@ -6066,7 +6133,7 @@ var createConfiguredModel = (options) => (options.client ?? client).post({
6066
6133
  },
6067
6134
  { name: "X-Omnara-Csrf", type: "apiKey" }
6068
6135
  ],
6069
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models",
6136
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models",
6070
6137
  ...options,
6071
6138
  headers: {
6072
6139
  "Content-Type": "application/json",
@@ -6088,7 +6155,7 @@ var deleteConfiguredModel = (options) => (options.client ?? client).delete({
6088
6155
  },
6089
6156
  { name: "X-Omnara-Csrf", type: "apiKey" }
6090
6157
  ],
6091
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models/{configuredModelID}",
6158
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models/{configuredModelID}",
6092
6159
  ...options
6093
6160
  });
6094
6161
  var updateConfiguredModel = (options) => (options.client ?? client).put({
@@ -6106,7 +6173,7 @@ var updateConfiguredModel = (options) => (options.client ?? client).put({
6106
6173
  },
6107
6174
  { name: "X-Omnara-Csrf", type: "apiKey" }
6108
6175
  ],
6109
- url: "/api/v1/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models/{configuredModelID}",
6176
+ url: "/orgs/{orgID}/model-provider-configs/{modelProviderConfigID}/models/{configuredModelID}",
6110
6177
  ...options,
6111
6178
  headers: {
6112
6179
  "Content-Type": "application/json",
@@ -6124,7 +6191,7 @@ var listProjectModelGrants = (options) => (options.client ?? client).get({
6124
6191
  name: "__Host-omnara_session",
6125
6192
  type: "apiKey"
6126
6193
  }],
6127
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/model-grants",
6194
+ url: "/orgs/{orgID}/projects/{projectID}/model-grants",
6128
6195
  ...options
6129
6196
  });
6130
6197
  var createProjectModelGrant = (options) => (options.client ?? client).post({
@@ -6142,7 +6209,7 @@ var createProjectModelGrant = (options) => (options.client ?? client).post({
6142
6209
  },
6143
6210
  { name: "X-Omnara-Csrf", type: "apiKey" }
6144
6211
  ],
6145
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/model-grants",
6212
+ url: "/orgs/{orgID}/projects/{projectID}/model-grants",
6146
6213
  ...options,
6147
6214
  headers: {
6148
6215
  "Content-Type": "application/json",
@@ -6164,7 +6231,7 @@ var deleteProjectModelGrant = (options) => (options.client ?? client).delete({
6164
6231
  },
6165
6232
  { name: "X-Omnara-Csrf", type: "apiKey" }
6166
6233
  ],
6167
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/model-grants/{modelGrantID}",
6234
+ url: "/orgs/{orgID}/projects/{projectID}/model-grants/{modelGrantID}",
6168
6235
  ...options
6169
6236
  });
6170
6237
  var updateProjectModelGrant = (options) => (options.client ?? client).patch({
@@ -6182,7 +6249,7 @@ var updateProjectModelGrant = (options) => (options.client ?? client).patch({
6182
6249
  },
6183
6250
  { name: "X-Omnara-Csrf", type: "apiKey" }
6184
6251
  ],
6185
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/model-grants/{modelGrantID}",
6252
+ url: "/orgs/{orgID}/projects/{projectID}/model-grants/{modelGrantID}",
6186
6253
  ...options,
6187
6254
  headers: {
6188
6255
  "Content-Type": "application/json",
@@ -6200,7 +6267,7 @@ var listMachinePools = (options) => (options.client ?? client).get({
6200
6267
  name: "__Host-omnara_session",
6201
6268
  type: "apiKey"
6202
6269
  }],
6203
- url: "/api/v1/orgs/{orgID}/machine-pools",
6270
+ url: "/orgs/{orgID}/machine-pools",
6204
6271
  ...options
6205
6272
  });
6206
6273
  var createMachinePool = (options) => (options.client ?? client).post({
@@ -6218,7 +6285,7 @@ var createMachinePool = (options) => (options.client ?? client).post({
6218
6285
  },
6219
6286
  { name: "X-Omnara-Csrf", type: "apiKey" }
6220
6287
  ],
6221
- url: "/api/v1/orgs/{orgID}/machine-pools",
6288
+ url: "/orgs/{orgID}/machine-pools",
6222
6289
  ...options,
6223
6290
  headers: {
6224
6291
  "Content-Type": "application/json",
@@ -6240,7 +6307,7 @@ var deleteMachinePool = (options) => (options.client ?? client).delete({
6240
6307
  },
6241
6308
  { name: "X-Omnara-Csrf", type: "apiKey" }
6242
6309
  ],
6243
- url: "/api/v1/orgs/{orgID}/machine-pools/{poolID}",
6310
+ url: "/orgs/{orgID}/machine-pools/{poolID}",
6244
6311
  ...options
6245
6312
  });
6246
6313
  var getMachinePool = (options) => (options.client ?? client).get({
@@ -6254,7 +6321,7 @@ var getMachinePool = (options) => (options.client ?? client).get({
6254
6321
  name: "__Host-omnara_session",
6255
6322
  type: "apiKey"
6256
6323
  }],
6257
- url: "/api/v1/orgs/{orgID}/machine-pools/{poolID}",
6324
+ url: "/orgs/{orgID}/machine-pools/{poolID}",
6258
6325
  ...options
6259
6326
  });
6260
6327
  var updateMachinePool = (options) => (options.client ?? client).put({
@@ -6272,7 +6339,7 @@ var updateMachinePool = (options) => (options.client ?? client).put({
6272
6339
  },
6273
6340
  { name: "X-Omnara-Csrf", type: "apiKey" }
6274
6341
  ],
6275
- url: "/api/v1/orgs/{orgID}/machine-pools/{poolID}",
6342
+ url: "/orgs/{orgID}/machine-pools/{poolID}",
6276
6343
  ...options,
6277
6344
  headers: {
6278
6345
  "Content-Type": "application/json",
@@ -6290,7 +6357,7 @@ var listProjectMachinePoolGrants = (options) => (options.client ?? client).get({
6290
6357
  name: "__Host-omnara_session",
6291
6358
  type: "apiKey"
6292
6359
  }],
6293
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants",
6360
+ url: "/orgs/{orgID}/projects/{projectID}/machine-pool-grants",
6294
6361
  ...options
6295
6362
  });
6296
6363
  var createProjectMachinePoolGrant = (options) => (options.client ?? client).post({
@@ -6308,7 +6375,7 @@ var createProjectMachinePoolGrant = (options) => (options.client ?? client).post
6308
6375
  },
6309
6376
  { name: "X-Omnara-Csrf", type: "apiKey" }
6310
6377
  ],
6311
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants",
6378
+ url: "/orgs/{orgID}/projects/{projectID}/machine-pool-grants",
6312
6379
  ...options,
6313
6380
  headers: {
6314
6381
  "Content-Type": "application/json",
@@ -6330,7 +6397,7 @@ var deleteProjectMachinePoolGrant = (options) => (options.client ?? client).dele
6330
6397
  },
6331
6398
  { name: "X-Omnara-Csrf", type: "apiKey" }
6332
6399
  ],
6333
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants/{poolGrantID}",
6400
+ url: "/orgs/{orgID}/projects/{projectID}/machine-pool-grants/{poolGrantID}",
6334
6401
  ...options
6335
6402
  });
6336
6403
  var getProjectMachinePoolGrant = (options) => (options.client ?? client).get({
@@ -6344,7 +6411,7 @@ var getProjectMachinePoolGrant = (options) => (options.client ?? client).get({
6344
6411
  name: "__Host-omnara_session",
6345
6412
  type: "apiKey"
6346
6413
  }],
6347
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants/{poolGrantID}",
6414
+ url: "/orgs/{orgID}/projects/{projectID}/machine-pool-grants/{poolGrantID}",
6348
6415
  ...options
6349
6416
  });
6350
6417
  var updateProjectMachinePoolGrant = (options) => (options.client ?? client).patch({
@@ -6362,7 +6429,7 @@ var updateProjectMachinePoolGrant = (options) => (options.client ?? client).patc
6362
6429
  },
6363
6430
  { name: "X-Omnara-Csrf", type: "apiKey" }
6364
6431
  ],
6365
- url: "/api/v1/orgs/{orgID}/projects/{projectID}/machine-pool-grants/{poolGrantID}",
6432
+ url: "/orgs/{orgID}/projects/{projectID}/machine-pool-grants/{poolGrantID}",
6366
6433
  ...options,
6367
6434
  headers: {
6368
6435
  "Content-Type": "application/json",
@@ -6380,7 +6447,7 @@ var listByoMachineDaemonTokens = (options) => (options.client ?? client).get({
6380
6447
  name: "__Host-omnara_session",
6381
6448
  type: "apiKey"
6382
6449
  }],
6383
- url: "/api/v1/orgs/{orgID}/machines/{machineID}/daemon-tokens",
6450
+ url: "/orgs/{orgID}/machines/{machineID}/daemon-tokens",
6384
6451
  ...options
6385
6452
  });
6386
6453
  var createByoMachineDaemonToken = (options) => (options.client ?? client).post({
@@ -6398,7 +6465,7 @@ var createByoMachineDaemonToken = (options) => (options.client ?? client).post({
6398
6465
  },
6399
6466
  { name: "X-Omnara-Csrf", type: "apiKey" }
6400
6467
  ],
6401
- url: "/api/v1/orgs/{orgID}/machines/{machineID}/daemon-tokens",
6468
+ url: "/orgs/{orgID}/machines/{machineID}/daemon-tokens",
6402
6469
  ...options,
6403
6470
  headers: {
6404
6471
  "Content-Type": "application/json",
@@ -6420,7 +6487,7 @@ var revokeMachineDaemonToken = (options) => (options.client ?? client).post({
6420
6487
  },
6421
6488
  { name: "X-Omnara-Csrf", type: "apiKey" }
6422
6489
  ],
6423
- url: "/api/v1/orgs/{orgID}/machines/{machineID}/daemon-tokens/{tokenID}/revoke",
6490
+ url: "/orgs/{orgID}/machines/{machineID}/daemon-tokens/{tokenID}/revoke",
6424
6491
  ...options
6425
6492
  });
6426
6493
  var registerMachineDaemonRuntime = (options) => (options.client ?? client).post({
@@ -6430,7 +6497,7 @@ var registerMachineDaemonRuntime = (options) => (options.client ?? client).post(
6430
6497
  scheme: "bearer",
6431
6498
  type: "http"
6432
6499
  }],
6433
- url: "/api/v1/daemon/runtimes",
6500
+ url: "/daemon/runtimes",
6434
6501
  ...options,
6435
6502
  headers: {
6436
6503
  "Content-Type": "application/json",
@@ -6443,7 +6510,7 @@ var socketMachineDaemonRuntime = (options) => (options.client ?? client).get({
6443
6510
  scheme: "bearer",
6444
6511
  type: "http"
6445
6512
  }],
6446
- url: "/api/v1/daemon/runtimes/{runtimeID}/socket",
6513
+ url: "/daemon/runtimes/{runtimeID}/socket",
6447
6514
  ...options
6448
6515
  });
6449
6516
  var endMachineDaemonRuntime = (options) => (options.client ?? client).post({
@@ -6453,7 +6520,7 @@ var endMachineDaemonRuntime = (options) => (options.client ?? client).post({
6453
6520
  scheme: "bearer",
6454
6521
  type: "http"
6455
6522
  }],
6456
- url: "/api/v1/daemon/runtimes/{runtimeID}/end",
6523
+ url: "/daemon/runtimes/{runtimeID}/end",
6457
6524
  ...options
6458
6525
  });
6459
6526
  var sleepMachineDaemonRuntime = (options) => (options.client ?? client).post({
@@ -6463,7 +6530,7 @@ var sleepMachineDaemonRuntime = (options) => (options.client ?? client).post({
6463
6530
  scheme: "bearer",
6464
6531
  type: "http"
6465
6532
  }],
6466
- url: "/api/v1/daemon/runtimes/{runtimeID}/sleep",
6533
+ url: "/daemon/runtimes/{runtimeID}/sleep",
6467
6534
  ...options
6468
6535
  });
6469
6536
  var getDaemonSkillArchive = (options) => (options.client ?? client).get({
@@ -6473,7 +6540,7 @@ var getDaemonSkillArchive = (options) => (options.client ?? client).get({
6473
6540
  scheme: "bearer",
6474
6541
  type: "http"
6475
6542
  }],
6476
- url: "/api/v1/daemon/skills/{skillID}/archive",
6543
+ url: "/daemon/skills/{skillID}/archive",
6477
6544
  ...options
6478
6545
  });
6479
6546
  var uploadDaemonArtifact = (options) => (options.client ?? client).post({
@@ -6484,13 +6551,23 @@ var uploadDaemonArtifact = (options) => (options.client ?? client).post({
6484
6551
  scheme: "bearer",
6485
6552
  type: "http"
6486
6553
  }],
6487
- url: "/api/v1/daemon/tool-calls/{toolCallID}/artifact",
6554
+ url: "/daemon/tool-calls/{toolCallID}/artifact",
6488
6555
  ...options,
6489
6556
  headers: {
6490
6557
  "Content-Type": "application/octet-stream",
6491
6558
  ...options.headers
6492
6559
  }
6493
6560
  });
6561
+ var downloadDaemonArtifact = (options) => (options.client ?? client).get({
6562
+ responseValidator: async (data) => await validateResponse(zDownloadDaemonArtifactResponse, data),
6563
+ security: [{
6564
+ key: "machineDaemonAuth",
6565
+ scheme: "bearer",
6566
+ type: "http"
6567
+ }],
6568
+ url: "/daemon/tool-calls/{toolCallID}/artifacts/{artifactID}/content",
6569
+ ...options
6570
+ });
6494
6571
 
6495
6572
  // ../sdk/src/auth.ts
6496
6573
  function bearerToken(token) {
@@ -6503,17 +6580,33 @@ function bearerToken(token) {
6503
6580
  };
6504
6581
  }
6505
6582
 
6583
+ // ../sdk/src/cli-login-token.ts
6584
+ var cliLoginTokenPrefix = "Omnara CLI";
6585
+ var cliLoginTokenHostSeparator = " on ";
6586
+ function cliLoginTokenName(hostName) {
6587
+ if (hostName === void 0) return cliLoginTokenPrefix;
6588
+ return `${cliLoginTokenPrefix}${cliLoginTokenHostSeparator}${hostName}`;
6589
+ }
6590
+
6506
6591
  // ../sdk/src/errors.ts
6592
+ import * as z2 from "zod";
6593
+ var errorIssuesSchema = z2.object({ issues: z2.array(zAgentConfigErrorIssue).optional() });
6594
+ function issuesFromBody(body) {
6595
+ const parsed = errorIssuesSchema.safeParse(body);
6596
+ return parsed.success ? parsed.data.issues ?? [] : [];
6597
+ }
6507
6598
  var ApiError = class _ApiError extends Error {
6508
6599
  status;
6509
6600
  code;
6510
6601
  body;
6602
+ issues;
6511
6603
  constructor(status, message, code, body) {
6512
6604
  super(message);
6513
6605
  this.name = "ApiError";
6514
6606
  this.status = status;
6515
6607
  this.code = code;
6516
6608
  this.body = body;
6609
+ this.issues = issuesFromBody(body);
6517
6610
  }
6518
6611
  static async fromResponse(response) {
6519
6612
  let message = `request failed with status ${response.status}`;
@@ -6525,7 +6618,9 @@ var ApiError = class _ApiError extends Error {
6525
6618
  data = void 0;
6526
6619
  }
6527
6620
  if (data && typeof data === "object") {
6528
- 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") {
6529
6624
  message = data.error;
6530
6625
  }
6531
6626
  if ("code" in data && typeof data.code === "string") {
@@ -6570,7 +6665,7 @@ function createOmnaraClient(options = {}) {
6570
6665
  })
6571
6666
  );
6572
6667
  client2.setConfig({
6573
- baseUrl: options.baseUrl ?? "",
6668
+ baseUrl: options.baseUrl ?? client.getConfig().baseUrl,
6574
6669
  credentials: options.credentials,
6575
6670
  headers: options.headers
6576
6671
  });
@@ -6590,24 +6685,31 @@ function createOmnaraClient(options = {}) {
6590
6685
  }
6591
6686
 
6592
6687
  // ../sdk/src/device.ts
6593
- import * as z2 from "zod";
6594
- var zDeviceAuthStartResponse = z2.object({
6595
- device_code: z2.string().min(1),
6596
- user_code: z2.string().min(1),
6597
- verification_uri: z2.string().min(1),
6598
- verification_uri_complete: z2.string().min(1),
6599
- expires_in: z2.number().int().positive(),
6600
- interval: z2.number().int().positive()
6601
- });
6602
- var zDeviceAuthWaitingResponse = z2.object({
6603
- interval: z2.number().int().positive()
6604
- });
6605
- var zDeviceAuthFailureResponse = z2.object({
6606
- error: z2.enum(["access_denied", "expired_token"])
6607
- });
6608
- var zDeviceAuthApprovedResponse = z2.object({
6609
- access_token: z2.string().min(1),
6610
- token_type: z2.string()
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
+ });
6698
+ var zDeviceAuthStartResponse = z3.object({
6699
+ device_code: z3.string().min(1),
6700
+ user_code: z3.string().min(1),
6701
+ verification_uri: z3.string().min(1),
6702
+ verification_uri_complete: z3.string().min(1),
6703
+ expires_in: z3.number().int().positive(),
6704
+ interval: z3.number().int().positive()
6705
+ });
6706
+ var zDeviceAuthErrorResponse = z3.object({
6707
+ error: z3.string().min(1),
6708
+ error_description: z3.string().optional()
6709
+ });
6710
+ var zDeviceAuthApprovedResponse = z3.object({
6711
+ access_token: z3.string().min(1),
6712
+ token_type: z3.string()
6611
6713
  });
6612
6714
  var DEVICE_AUTH_FAILURE_MESSAGES = {
6613
6715
  access_denied: "the login request was denied",
@@ -6621,29 +6723,55 @@ var DeviceAuthError = class extends Error {
6621
6723
  this.code = code;
6622
6724
  }
6623
6725
  };
6624
- async function postDeviceAuthJSON(fetchImpl, baseUrl, path, body) {
6625
- return fetchImpl(`${baseUrl.replace(/\/+$/, "")}${path}`, {
6726
+ async function postOAuthForm(fetchImpl, endpoint, body) {
6727
+ return fetchImpl(endpoint, {
6626
6728
  method: "POST",
6627
- headers: { "Content-Type": "application/json" },
6628
- 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()
6629
6734
  });
6630
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
+ }
6631
6743
  async function startDeviceAuth(options) {
6632
- const response = await postDeviceAuthJSON(
6633
- options.fetch ?? fetch,
6634
- options.baseUrl,
6635
- "/api/auth/device/code",
6636
- { client_name: options.clientName, token_name: options.tokenName }
6637
- );
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);
6638
6764
  if (!response.ok) throw await ApiError.fromResponse(response);
6639
6765
  const data = zDeviceAuthStartResponse.parse(await response.json());
6640
6766
  return {
6641
6767
  deviceCode: data.device_code,
6642
6768
  userCode: data.user_code,
6643
- verificationUri: new URL(data.verification_uri, options.baseUrl).toString(),
6644
- 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(),
6645
6771
  expiresInSeconds: data.expires_in,
6646
- intervalSeconds: data.interval
6772
+ intervalSeconds: data.interval,
6773
+ tokenEndpoint: metadata.token_endpoint,
6774
+ clientId: options.clientId
6647
6775
  };
6648
6776
  }
6649
6777
  function defaultSleep(seconds) {
@@ -6655,40 +6783,42 @@ async function pollDeviceAuthToken(options) {
6655
6783
  let interval = options.intervalSeconds;
6656
6784
  while (true) {
6657
6785
  await sleep2(interval);
6658
- const response = await postDeviceAuthJSON(
6659
- fetchImpl,
6660
- options.baseUrl,
6661
- "/api/auth/device/token",
6662
- {
6663
- device_code: options.deviceCode
6664
- }
6665
- );
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
+ });
6666
6791
  if (response.status === 200) {
6667
6792
  return zDeviceAuthApprovedResponse.parse(await response.json()).access_token;
6668
6793
  }
6669
- if (response.status === 202) {
6670
- interval = zDeviceAuthWaitingResponse.parse(await response.json()).interval;
6671
- continue;
6672
- }
6673
6794
  if (response.status === 400) {
6674
- const failure = zDeviceAuthFailureResponse.safeParse(
6795
+ const failure = zDeviceAuthErrorResponse.safeParse(
6675
6796
  await response.clone().json().catch(() => void 0)
6676
6797
  );
6677
- 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
+ }
6678
6808
  }
6679
6809
  throw await ApiError.fromResponse(response);
6680
6810
  }
6681
6811
  }
6682
6812
 
6683
6813
  // src/config.ts
6684
- import * as z4 from "zod";
6814
+ import * as z5 from "zod";
6685
6815
 
6686
6816
  // src/interactive.ts
6687
6817
  import { isCancel, select } from "@clack/prompts";
6688
6818
 
6689
6819
  // src/output.ts
6690
- import * as z3 from "zod";
6691
- var zRenderValue = z3.json();
6820
+ import * as z4 from "zod";
6821
+ var zRenderValue = z4.json();
6692
6822
  var PREFERRED_LEADING_COLUMNS = ["id", "name"];
6693
6823
  var HIDDEN_TABLE_COLUMNS = /* @__PURE__ */ new Set(["org_id", "project_id"]);
6694
6824
  var useColor = process.stdout.isTTY && process.env.NO_COLOR === void 0;
@@ -6860,9 +6990,9 @@ async function runCliAction(action) {
6860
6990
  } catch (error) {
6861
6991
  if (error instanceof CliInputError) {
6862
6992
  console.error(`error: ${error.message}`);
6863
- } else if (error instanceof z3.ZodError) {
6993
+ } else if (error instanceof z4.ZodError) {
6864
6994
  console.error(`error: unexpected response shape:
6865
- ${z3.prettifyError(error)}`);
6995
+ ${z4.prettifyError(error)}`);
6866
6996
  } else if (error instanceof ApiError) {
6867
6997
  const code = error.code ? ` [${error.code}]` : "";
6868
6998
  console.error(`error: API ${error.status}${code}: ${error.message}`);
@@ -6919,10 +7049,13 @@ async function promptProjectSelection(client2, orgId) {
6919
7049
  }
6920
7050
 
6921
7051
  // src/config.ts
6922
- var DEFAULT_BASE_URL = "https://app.omnara.com";
6923
- var zConfigFile = z4.looseObject({
6924
- base_url: z4.url().optional(),
6925
- token: z4.string().min(1).optional(),
7052
+ var DEFAULT_API_URL = "https://api.omnara.com/v1";
7053
+ var DEFAULT_ISSUER_URL = "https://app.omnara.com";
7054
+ var zConfigFile = z5.looseObject({
7055
+ api_url: z5.url().optional(),
7056
+ issuer_url: z5.url().optional(),
7057
+ base_url: z5.url().optional(),
7058
+ token: z5.string().min(1).optional(),
6926
7059
  org_id: zOrganizationId.optional(),
6927
7060
  project_id: zProjectId.optional()
6928
7061
  });
@@ -6935,12 +7068,12 @@ function warnConfigIgnored(message) {
6935
7068
  warnedAboutConfig = true;
6936
7069
  console.error(message);
6937
7070
  }
6938
- var zConfigContents = z4.string().transform((raw, ctx) => {
7071
+ var zConfigContents = z5.string().transform((raw, ctx) => {
6939
7072
  try {
6940
7073
  return JSON.parse(raw);
6941
7074
  } catch (error) {
6942
7075
  ctx.addIssue(error instanceof Error ? error.message : String(error));
6943
- return z4.NEVER;
7076
+ return z5.NEVER;
6944
7077
  }
6945
7078
  }).pipe(zConfigFile);
6946
7079
  function loadConfigFile() {
@@ -6952,7 +7085,7 @@ function readConfigFile() {
6952
7085
  const result = loadConfigFile();
6953
7086
  if (result.success) return result.data;
6954
7087
  warnConfigIgnored(
6955
- `warning: ignoring unreadable config at ${configFilePath()}: ${z4.prettifyError(result.error)}`
7088
+ `warning: ignoring unreadable config at ${configFilePath()}: ${z5.prettifyError(result.error)}`
6956
7089
  );
6957
7090
  return {};
6958
7091
  }
@@ -6960,7 +7093,7 @@ function readConfigFileForUpdate() {
6960
7093
  const result = loadConfigFile();
6961
7094
  if (result.success) return result.data;
6962
7095
  throw new CliInputError(
6963
- `refusing to modify unreadable config at ${configFilePath()} (fix or delete it first): ${z4.prettifyError(result.error)}`
7096
+ `refusing to modify unreadable config at ${configFilePath()} (fix or delete it first): ${z5.prettifyError(result.error)}`
6964
7097
  );
6965
7098
  }
6966
7099
  function updateConfigFile(patch) {
@@ -6972,7 +7105,7 @@ function updateConfigFile(patch) {
6972
7105
  const result = zConfigFile.safeParse(merged);
6973
7106
  if (!result.success) {
6974
7107
  throw new CliInputError(`refusing to save invalid config:
6975
- ${z4.prettifyError(result.error)}`);
7108
+ ${z5.prettifyError(result.error)}`);
6976
7109
  }
6977
7110
  mkdirSync(dirname(configFilePath()), { recursive: true, mode: 448 });
6978
7111
  writeFileSync(configFilePath(), `${JSON.stringify(result.data, null, 2)}
@@ -6980,18 +7113,32 @@ ${z4.prettifyError(result.error)}`);
6980
7113
  chmodSync(configFilePath(), 384);
6981
7114
  return result.data;
6982
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
+ }
6983
7127
  function loadConfig() {
6984
- const file = readConfigFile();
6985
- 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);
6986
7132
  const token = process.env.OMNARA_API_KEY ?? file.token;
6987
7133
  const client2 = createOmnaraClient({
6988
- baseUrl,
7134
+ baseUrl: apiUrl,
6989
7135
  auth: token ? bearerToken(token) : void 0,
6990
7136
  headers: { "User-Agent": "omnara-cli" }
6991
7137
  });
6992
7138
  return {
6993
7139
  client: client2,
6994
- baseUrl,
7140
+ apiUrl,
7141
+ issuerUrl,
6995
7142
  defaultOrgId: process.env.OMNARA_ORG_ID ?? file.org_id,
6996
7143
  defaultProjectId: process.env.OMNARA_PROJECT_ID ?? file.project_id
6997
7144
  };
@@ -7011,17 +7158,23 @@ function printConfig() {
7011
7158
  console.log(`config file ${configFilePath()}`);
7012
7159
  console.log(`org_id ${describeValue("OMNARA_ORG_ID", file.org_id)}`);
7013
7160
  console.log(`project_id ${describeValue("OMNARA_PROJECT_ID", file.project_id)}`);
7014
- 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)}`);
7015
7164
  }
7016
7165
  function registerConfigCommand(program2, cli) {
7017
- 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) => {
7018
7170
  await runCliAction(() => {
7019
- 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) {
7020
7172
  const clearStaleProject = options.org !== void 0 && options.project === void 0;
7021
7173
  updateConfigFile({
7022
7174
  ...options.org !== void 0 ? { org_id: options.org } : {},
7023
7175
  ...clearStaleProject ? { project_id: void 0 } : options.project !== void 0 ? { project_id: options.project } : {},
7024
- ...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 } : {}
7025
7178
  });
7026
7179
  }
7027
7180
  printConfig();
@@ -7042,10 +7195,10 @@ function registerConfigCommand(program2, cli) {
7042
7195
 
7043
7196
  // src/factory.ts
7044
7197
  import { InvalidArgumentError } from "commander";
7045
- import * as z6 from "zod";
7198
+ import * as z7 from "zod";
7046
7199
 
7047
7200
  // src/flags.ts
7048
- import * as z5 from "zod";
7201
+ import * as z6 from "zod";
7049
7202
  function kebabCase(name) {
7050
7203
  return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replaceAll("_", "-").toLowerCase();
7051
7204
  }
@@ -7162,7 +7315,7 @@ function finalizeFlag(draft) {
7162
7315
  };
7163
7316
  }
7164
7317
  function deriveFlags(schema) {
7165
- const jsonSchema = z5.toJSONSchema(schema, { io: "input" });
7318
+ const jsonSchema = z6.toJSONSchema(schema, { io: "input" });
7166
7319
  const drafts = /* @__PURE__ */ new Map();
7167
7320
  collectDrafts(drafts, jsonSchema, [], false);
7168
7321
  return [...drafts.values()].map(finalizeFlag);
@@ -7243,7 +7396,7 @@ function flowOp(spec) {
7243
7396
  type: "flow",
7244
7397
  execute: (input) => run({
7245
7398
  client: input.client,
7246
- baseUrl: input.baseUrl,
7399
+ apiUrl: input.apiUrl,
7247
7400
  path: parseWithSchema(spec.path, input.path, "arguments"),
7248
7401
  body: parseWithSchema(spec.body, input.body, "flags"),
7249
7402
  report: createFlowReporter(spec.summary)
@@ -7343,7 +7496,7 @@ function parseWithSchema(schema, value, label) {
7343
7496
  const result = schema.safeParse(value);
7344
7497
  if (!result.success) {
7345
7498
  throw new CliInputError(`invalid ${label}:
7346
- ${z6.prettifyError(result.error)}`);
7499
+ ${z7.prettifyError(result.error)}`);
7347
7500
  }
7348
7501
  return result.data;
7349
7502
  }
@@ -7351,7 +7504,7 @@ async function callOperation(spec, input) {
7351
7504
  const result = await spec.fn(input);
7352
7505
  return result.data;
7353
7506
  }
7354
- var zBodyObject = z6.looseObject({});
7507
+ var zBodyObject = z7.looseObject({});
7355
7508
  function deepMerge(base, patch) {
7356
7509
  const merged = { ...base };
7357
7510
  for (const [key, value] of Object.entries(patch)) {
@@ -7453,7 +7606,9 @@ function registerOperation(parent, config2, spec) {
7453
7606
  renderResult(data, true);
7454
7607
  return;
7455
7608
  }
7456
- const formatted = spec.format(data, { baseUrl: config2.baseUrl });
7609
+ const formatted = spec.format(data, {
7610
+ apiUrl: config2.apiUrl
7611
+ });
7457
7612
  renderResult(formatted.value, false, { columns: formatted.columns });
7458
7613
  });
7459
7614
  });
@@ -7469,7 +7624,7 @@ function registerFlow(parent, config2, spec) {
7469
7624
  const options = command.opts();
7470
7625
  await spec.execute({
7471
7626
  client: config2.client,
7472
- baseUrl: config2.baseUrl,
7627
+ apiUrl: config2.apiUrl,
7473
7628
  path: await resolvePathValues(plan, args, options, config2),
7474
7629
  body: collectFlagValues(bodyFlags, options)
7475
7630
  });
@@ -7488,25 +7643,25 @@ function registerGroup(program2, config2, group) {
7488
7643
  // src/login.ts
7489
7644
  import { hostname } from "node:os";
7490
7645
  import { intro as intro2, log as log2, note as note2, outro as outro2, spinner as spinner2 } from "@clack/prompts";
7491
- import * as z7 from "zod";
7646
+ import * as z8 from "zod";
7492
7647
 
7493
7648
  // src/browser.ts
7494
7649
  import { spawn } from "node:child_process";
7495
- function browserCommand(url3) {
7650
+ function browserCommand(url4) {
7496
7651
  if (process.platform === "darwin") {
7497
- return { command: "open", args: [url3], windowsVerbatimArguments: false };
7652
+ return { command: "open", args: [url4], windowsVerbatimArguments: false };
7498
7653
  }
7499
7654
  if (process.platform === "win32") {
7500
7655
  return {
7501
7656
  command: "cmd",
7502
- args: ["/c", "start", '""', `"${url3}"`],
7657
+ args: ["/c", "start", '""', `"${url4}"`],
7503
7658
  windowsVerbatimArguments: true
7504
7659
  };
7505
7660
  }
7506
- return { command: "xdg-open", args: [url3], windowsVerbatimArguments: false };
7661
+ return { command: "xdg-open", args: [url4], windowsVerbatimArguments: false };
7507
7662
  }
7508
- function openInBrowser(url3, onError) {
7509
- const { command, args, windowsVerbatimArguments } = browserCommand(url3);
7663
+ function openInBrowser(url4, onError) {
7664
+ const { command, args, windowsVerbatimArguments } = browserCommand(url4);
7510
7665
  const child = spawn(command, args, { stdio: "ignore", detached: true, windowsVerbatimArguments });
7511
7666
  child.once("error", () => {
7512
7667
  onError("could not open a browser; use the URL above");
@@ -7528,8 +7683,8 @@ async function isProjectVisible(client2, orgId, projectId) {
7528
7683
  } while (cursor !== void 0);
7529
7684
  return false;
7530
7685
  }
7531
- function interactiveReporter2(baseUrl) {
7532
- intro2(`Log in to ${baseUrl}`);
7686
+ function interactiveReporter2(issuerUrl) {
7687
+ intro2(`Log in to ${issuerUrl}`);
7533
7688
  const spin = spinner2();
7534
7689
  return {
7535
7690
  showCode(userCode, approvalUrl) {
@@ -7587,21 +7742,21 @@ function plainReporter2() {
7587
7742
  };
7588
7743
  }
7589
7744
  function loginTokenName(explicit, hostName) {
7590
- const candidate = explicit ?? `Omnara CLI on ${hostName}`;
7745
+ const candidate = explicit ?? cliLoginTokenName(hostName);
7591
7746
  const result = zResourceName.safeParse(candidate);
7592
7747
  if (result.success) return result.data;
7593
- if (explicit === void 0) return "Omnara CLI";
7748
+ if (explicit === void 0) return cliLoginTokenName();
7594
7749
  throw new CliInputError(`invalid token name:
7595
- ${z7.prettifyError(result.error)}`);
7750
+ ${z8.prettifyError(result.error)}`);
7596
7751
  }
7597
7752
  function registerLoginCommand(program2, cli) {
7598
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) => {
7599
7754
  await runCliAction(async () => {
7600
- readConfigFileForUpdate();
7601
- const report = canPromptInteractively() ? interactiveReporter2(cli.baseUrl) : plainReporter2();
7755
+ updateConfigFile({});
7756
+ const report = canPromptInteractively() ? interactiveReporter2(cli.issuerUrl) : plainReporter2();
7602
7757
  const start = await startDeviceAuth({
7603
- baseUrl: cli.baseUrl,
7604
- clientName: "Omnara CLI",
7758
+ issuerUrl: cli.issuerUrl,
7759
+ clientId: OMNARA_CLI_OAUTH_CLIENT_ID,
7605
7760
  tokenName: loginTokenName(options.tokenName, hostname())
7606
7761
  });
7607
7762
  report.showCode(start.userCode, start.verificationUriComplete);
@@ -7614,7 +7769,8 @@ function registerLoginCommand(program2, cli) {
7614
7769
  let token;
7615
7770
  try {
7616
7771
  token = await pollDeviceAuthToken({
7617
- baseUrl: cli.baseUrl,
7772
+ tokenEndpoint: start.tokenEndpoint,
7773
+ clientId: start.clientId,
7618
7774
  deviceCode: start.deviceCode,
7619
7775
  intervalSeconds: start.intervalSeconds
7620
7776
  });
@@ -7623,8 +7779,12 @@ function registerLoginCommand(program2, cli) {
7623
7779
  throw error;
7624
7780
  }
7625
7781
  report.stopWaiting(true);
7626
- const saved = updateConfigFile({ token, base_url: cli.baseUrl });
7627
- 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) });
7628
7788
  let orgId = saved.org_id;
7629
7789
  let loginMessage = "Logged in";
7630
7790
  let validationWarning;
@@ -7672,16 +7832,16 @@ function registerLoginCommand(program2, cli) {
7672
7832
  }
7673
7833
 
7674
7834
  // src/manifest.ts
7675
- import * as z14 from "zod";
7835
+ import * as z15 from "zod";
7676
7836
 
7677
7837
  // src/config-attachment.ts
7678
7838
  import { readFileSync as readFileSync2 } from "node:fs";
7679
- import * as z8 from "zod";
7680
- var zConfigSourceAttachment = z8.object({
7681
- file: z8.string().min(1).optional().describe("path to an agent config file (.yaml, .yml, or .json)"),
7682
- source: z8.string().min(1).optional().describe("inline agent config source (YAML or JSON)")
7839
+ import * as z9 from "zod";
7840
+ var zConfigSourceAttachment = z9.object({
7841
+ file: z9.string().min(1).optional().describe("path to an agent config file (.yaml, .yml, or .json)"),
7842
+ source: z9.string().min(1).optional().describe("inline agent config source (YAML or JSON)")
7683
7843
  });
7684
- var zConfigAttachment = z8.object({
7844
+ var zConfigAttachment = z9.object({
7685
7845
  config: zAgentConfigId.optional().describe("existing agent config ID"),
7686
7846
  ...zConfigSourceAttachment.shape
7687
7847
  });
@@ -7722,9 +7882,9 @@ function renderConfigSource(attachment) {
7722
7882
  }
7723
7883
  throw new CliInputError(SOURCE_HINT);
7724
7884
  }
7725
- var zProjectScope = z8.object({
7726
- orgID: z8.string().min(1),
7727
- projectID: z8.string().min(1)
7885
+ var zProjectScope = z9.object({
7886
+ orgID: z9.string().min(1),
7887
+ projectID: z9.string().min(1)
7728
7888
  });
7729
7889
  async function resolveConfigId(client2, path, attachment) {
7730
7890
  requireExactlyOne([attachment.config, attachment.file, attachment.source], ATTACHMENT_HINT);
@@ -7736,7 +7896,7 @@ async function resolveConfigId(client2, path, attachment) {
7736
7896
  });
7737
7897
  return data.id;
7738
7898
  }
7739
- var zProfilePath = zProjectScope.extend({ agentProfileID: z8.string().min(1) });
7899
+ var zProfilePath = zProjectScope.extend({ agentProfileID: z9.string().min(1) });
7740
7900
  async function currentProfileConfigId(client2, path) {
7741
7901
  const { data } = await sdk_gen_exports.getAgentProfile({ client: client2, path: zProfilePath.parse(path) });
7742
7902
  return data.current_config_id;
@@ -7772,7 +7932,7 @@ import { spawn as spawn2, spawnSync } from "node:child_process";
7772
7932
  import { accessSync, constants, existsSync as existsSync2, readdirSync, readFileSync as readFileSync3 } from "node:fs";
7773
7933
  import { homedir as homedir2 } from "node:os";
7774
7934
  import { basename, dirname as dirname2, isAbsolute, join as join2, resolve } from "node:path";
7775
- import * as z9 from "zod";
7935
+ import * as z10 from "zod";
7776
7936
  var zMachineSetupBody = zConnectByoMachineRequest;
7777
7937
  async function connectMachine(context) {
7778
7938
  const { client: client2, path, body, report } = context;
@@ -7792,13 +7952,16 @@ async function connectMachine(context) {
7792
7952
  function shellQuote(value) {
7793
7953
  return `'${value.replaceAll("'", `'\\''`)}'`;
7794
7954
  }
7795
- function installCommand(baseUrl) {
7796
- return `curl -fsSL ${shellQuote(`${baseUrl}/install/omnarad.sh`)} | sh`;
7955
+ function installScriptUrl(apiUrl) {
7956
+ return new URL("/install/omnarad.sh", apiUrl).toString();
7797
7957
  }
7798
- var formatMachineSetup = (response, { baseUrl }) => ({
7958
+ function installCommand(apiUrl) {
7959
+ return `curl -fsSL ${shellQuote(installScriptUrl(apiUrl))} | sh`;
7960
+ }
7961
+ var formatMachineSetup = (response, { apiUrl }) => ({
7799
7962
  value: {
7800
7963
  ...response,
7801
- install_command: installCommand(baseUrl),
7964
+ install_command: installCommand(apiUrl),
7802
7965
  install_note: "Run install_command on the target machine and paste the token when prompted."
7803
7966
  }
7804
7967
  });
@@ -7806,9 +7969,9 @@ var daemonConfigFileName = "daemon.json";
7806
7969
  var installLockFileName = "install.lock";
7807
7970
  var daemonLockFileName = "daemon.lock";
7808
7971
  var daemonLockPollMs = 250;
7809
- var zDaemonConfigFile = z9.looseObject({
7810
- machine_id: z9.string().optional(),
7811
- api_url: z9.string().optional()
7972
+ var zDaemonConfigFile = z10.looseObject({
7973
+ machine_id: z10.string().optional(),
7974
+ api_url: z10.string().optional()
7812
7975
  });
7813
7976
  function daemonHome() {
7814
7977
  const override = process.env.OMNARA_HOME;
@@ -7902,9 +8065,9 @@ function ensureDaemonHomeWritable(home) {
7902
8065
  var DaemonExitError = class extends Error {
7903
8066
  };
7904
8067
  async function runMachineCreateLocal(context) {
7905
- const { report, baseUrl } = context;
8068
+ const { report, apiUrl } = context;
7906
8069
  ensureSupportedPlatform(process.platform, process.arch);
7907
- ensureDaemonApiUrl(baseUrl);
8070
+ ensureDaemonApiUrl(apiUrl);
7908
8071
  const home = daemonHome();
7909
8072
  const existing = describeExistingInstallation(home);
7910
8073
  if (existing !== void 0) {
@@ -7922,7 +8085,7 @@ async function runMachineCreateLocal(context) {
7922
8085
  report.info(`Machine ID: ${machine.id}`);
7923
8086
  report.start("Installing omnarad on this machine");
7924
8087
  try {
7925
- await runInstaller(report, baseUrl, token, machine.id, home);
8088
+ await runInstaller(report, apiUrl, token, machine.id, home);
7926
8089
  } catch (error) {
7927
8090
  if (error instanceof DaemonExitError) {
7928
8091
  report.fail("omnarad exited after it was installed");
@@ -7939,7 +8102,7 @@ async function runMachineCreateLocal(context) {
7939
8102
  ${token}`);
7940
8103
  report.url(
7941
8104
  "Finish setup by running this, then paste the machine token when prompted",
7942
- installCommand(baseUrl)
8105
+ installCommand(apiUrl)
7943
8106
  );
7944
8107
  throw error;
7945
8108
  }
@@ -7996,11 +8159,11 @@ function readDaemonLockPid(home) {
7996
8159
  return void 0;
7997
8160
  }
7998
8161
  }
7999
- function installerScript(baseUrl) {
8162
+ function installerScript(apiUrl) {
8000
8163
  return [
8001
8164
  "installer=$(mktemp)",
8002
8165
  `trap 'rm -f "$installer"' EXIT`,
8003
- `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))}`,
8004
8167
  'sh "$installer"'
8005
8168
  ].join(" && ");
8006
8169
  }
@@ -8009,11 +8172,11 @@ function installerFailure(code, signal, log3) {
8009
8172
  return new Error(`omnarad installer failed (${reason})${log3 === "" ? "" : `
8010
8173
  ${log3}`}`);
8011
8174
  }
8012
- function runInstaller(report, baseUrl, token, machineId, home) {
8175
+ function runInstaller(report, apiUrl, token, machineId, home) {
8013
8176
  return new Promise((resolve3, reject) => {
8014
- const child = spawn2("/bin/sh", ["-c", installerScript(baseUrl)], {
8177
+ const child = spawn2("/bin/sh", ["-c", installerScript(apiUrl)], {
8015
8178
  stdio: ["ignore", "pipe", "pipe"],
8016
- env: { ...process.env, OMNARA_API_URL: baseUrl, OMNARA_MACHINE_TOKEN: token }
8179
+ env: { ...process.env, OMNARA_API_URL: apiUrl, OMNARA_MACHINE_TOKEN: token }
8017
8180
  });
8018
8181
  const relay = (signal) => {
8019
8182
  child.kill(signal);
@@ -8083,10 +8246,10 @@ function runInstaller(report, baseUrl, token, machineId, home) {
8083
8246
 
8084
8247
  // src/mcp-add.ts
8085
8248
  import { isMap, isScalar as isScalar2, parseDocument } from "yaml";
8086
- import * as z11 from "zod";
8249
+ import * as z12 from "zod";
8087
8250
 
8088
8251
  // src/mcp-oauth.ts
8089
- import * as z10 from "zod";
8252
+ import * as z11 from "zod";
8090
8253
 
8091
8254
  // src/poll.ts
8092
8255
  var POLL_INTERVAL_SECONDS = 2;
@@ -8134,11 +8297,11 @@ async function authorizeMcpOAuthSecret(options) {
8134
8297
  }
8135
8298
  });
8136
8299
  }
8137
- var zBrowserFlag = z10.boolean().default(true).describe("open the authorization URL in a browser");
8138
- function openAuthorizationUrl(report, title, url3, browser) {
8139
- report.url(title, url3);
8300
+ var zBrowserFlag = z11.boolean().default(true).describe("open the authorization URL in a browser");
8301
+ function openAuthorizationUrl(report, title, url4, browser) {
8302
+ report.url(title, url4);
8140
8303
  if (browser) {
8141
- openInBrowser(url3, (message) => {
8304
+ openInBrowser(url4, (message) => {
8142
8305
  report.warn(message);
8143
8306
  });
8144
8307
  }
@@ -8153,8 +8316,8 @@ async function runMcpOAuth(context) {
8153
8316
  client: client2,
8154
8317
  orgId: path.orgID,
8155
8318
  request,
8156
- onAuthorization(url3) {
8157
- 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);
8158
8321
  report.start("Waiting for the secret to be created");
8159
8322
  }
8160
8323
  });
@@ -8170,7 +8333,7 @@ async function runMcpOAuth(context) {
8170
8333
  // src/mcp-add.ts
8171
8334
  var SERVER_KEY_PATTERN = /^[a-zA-Z][a-zA-Z0-9-]{0,31}$/;
8172
8335
  var zMcpAddBody = zMcpoAuthStartRequest.omit({ owner: true, name: true }).extend({
8173
- server_name: z11.string().regex(
8336
+ server_name: z12.string().regex(
8174
8337
  SERVER_KEY_PATTERN,
8175
8338
  "must start with a letter and contain at most 32 letters, digits, or hyphens"
8176
8339
  ).describe("MCP server key used in the agent config"),
@@ -8180,10 +8343,10 @@ var zMcpAddBody = zMcpoAuthStartRequest.omit({ owner: true, name: true }).extend
8180
8343
  function targetLabel(target) {
8181
8344
  return target === "agent" ? "agent" : "agent profile";
8182
8345
  }
8183
- function serverEntry(url3, secretId) {
8184
- return { url: url3, auth: { type: "oauth", secret_id: secretId } };
8346
+ function serverEntry(url4, secretId) {
8347
+ return { url: url4, auth: { type: "oauth", secret_id: secretId } };
8185
8348
  }
8186
- var zJsonRecord = z11.record(z11.string(), z11.json());
8349
+ var zJsonRecord = z12.record(z12.string(), z12.json());
8187
8350
  function prepareJsonConfig(config2, serverName, mcpUrl) {
8188
8351
  let parsedJson;
8189
8352
  try {
@@ -8313,8 +8476,8 @@ async function runMcpAdd(context, target, targetId) {
8313
8476
  client: client2,
8314
8477
  orgId: scope.orgId,
8315
8478
  request,
8316
- onAuthorization(url3) {
8317
- 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);
8318
8481
  report.start("Waiting for the MCP OAuth secret to be created");
8319
8482
  }
8320
8483
  });
@@ -8350,10 +8513,10 @@ function runProfileMcpAdd(context) {
8350
8513
  import { readdirSync as readdirSync2, readFileSync as readFileSync4, statSync } from "node:fs";
8351
8514
  import { basename as basename2, dirname as dirname3, join as join3, resolve as resolve2 } from "node:path";
8352
8515
  import * as tar from "tar";
8353
- import * as z12 from "zod";
8354
- var zCreateSkillCliBody = z12.object({
8516
+ import * as z13 from "zod";
8517
+ var zCreateSkillCliBody = z13.object({
8355
8518
  owner: zSkillOwnerInput,
8356
- archive: z12.string().min(1).describe("path to a skill directory (packed automatically) or a .zip/.tar.gz archive")
8519
+ archive: z13.string().min(1).describe("path to a skill directory (packed automatically) or a .zip/.tar.gz archive")
8357
8520
  });
8358
8521
  var ARCHIVE_SUFFIXES = [".zip", ".tar.gz", ".tgz"];
8359
8522
  function assertPackable(dir) {
@@ -8395,16 +8558,16 @@ async function loadSkillArchive(archivePath) {
8395
8558
  }
8396
8559
 
8397
8560
  // src/slack-integration.ts
8398
- import * as z13 from "zod";
8399
- var zSlackBody = z13.object({
8400
- app_name: z13.string().optional().describe("name for a new Slack app"),
8401
- app_configuration_token: z13.string().optional().describe("Slack app configuration token for a new app"),
8402
- icon_filename: z13.string().optional().describe("filename for the new Slack app icon"),
8403
- icon_data_base64: z13.string().optional().describe("base64-encoded Slack app icon"),
8404
- client_id: z13.string().optional().describe("existing Slack app client ID"),
8405
- client_secret: z13.string().optional().describe("existing Slack app client secret"),
8406
- signing_secret: z13.string().optional().describe("existing Slack app signing secret"),
8407
- return_to: z13.string().optional().describe("console-relative path opened after authorization"),
8561
+ import * as z14 from "zod";
8562
+ var zSlackBody = z14.object({
8563
+ app_name: z14.string().optional().describe("name for a new Slack app"),
8564
+ app_configuration_token: z14.string().optional().describe("Slack app configuration token for a new app"),
8565
+ icon_filename: z14.string().optional().describe("filename for the new Slack app icon"),
8566
+ icon_data_base64: z14.string().optional().describe("base64-encoded Slack app icon"),
8567
+ client_id: z14.string().optional().describe("existing Slack app client ID"),
8568
+ client_secret: z14.string().optional().describe("existing Slack app client secret"),
8569
+ signing_secret: z14.string().optional().describe("existing Slack app signing secret"),
8570
+ return_to: z14.string().optional().describe("console-relative path opened after authorization"),
8408
8571
  browser: zBrowserFlag
8409
8572
  });
8410
8573
  function parseRequest(body) {
@@ -8433,7 +8596,7 @@ function parseRequest(body) {
8433
8596
  if (!result2.success) {
8434
8597
  throw new CliInputError(
8435
8598
  `invalid existing Slack app parameters:
8436
- ${z13.prettifyError(result2.error)}`
8599
+ ${z14.prettifyError(result2.error)}`
8437
8600
  );
8438
8601
  }
8439
8602
  return { kind: "existing-app", body: result2.data };
@@ -8455,7 +8618,7 @@ ${z13.prettifyError(result2.error)}`
8455
8618
  if (!result.success) {
8456
8619
  throw new CliInputError(
8457
8620
  `invalid Slack app parameters:
8458
- ${z13.prettifyError(result.error)}
8621
+ ${z14.prettifyError(result.error)}
8459
8622
  Pass --app-name and --app-configuration-token, or existing app credentials.`
8460
8623
  );
8461
8624
  }
@@ -8550,7 +8713,7 @@ var commandGroups = [
8550
8713
  body: zConfigAttachment.extend({
8551
8714
  profile: zAgentProfileId.optional(),
8552
8715
  name: zAgentName.optional(),
8553
- message: z14.string().optional()
8716
+ message: z15.string().optional()
8554
8717
  }),
8555
8718
  transformBody: async ({ profile, name, message, ...attachment }, { client: client2, path }) => ({
8556
8719
  profile,
@@ -8591,7 +8754,7 @@ var commandGroups = [
8591
8754
  flowOp({
8592
8755
  verb: "mcp-add",
8593
8756
  summary: "Create an OAuth secret and add an MCP server to an agent",
8594
- path: z14.object({
8757
+ path: z15.object({
8595
8758
  orgID: zOrganizationId,
8596
8759
  projectID: zProjectId,
8597
8760
  agentID: zAgentId
@@ -9060,7 +9223,7 @@ var commandGroups = [
9060
9223
  flowOp({
9061
9224
  verb: "mcp-oauth",
9062
9225
  summary: "Create a secret through an MCP server OAuth flow",
9063
- path: z14.object({ orgID: zOrganizationId }),
9226
+ path: z15.object({ orgID: zOrganizationId }),
9064
9227
  body: zMcpOAuthBody,
9065
9228
  run: runMcpOAuth
9066
9229
  })
@@ -9174,7 +9337,7 @@ var commandGroups = [
9174
9337
  flowOp({
9175
9338
  verb: "mcp-add",
9176
9339
  summary: "Create an OAuth secret and add an MCP server to an agent profile",
9177
- path: z14.object({
9340
+ path: z15.object({
9178
9341
  orgID: zOrganizationId,
9179
9342
  projectID: zProjectId,
9180
9343
  agentProfileID: zAgentProfileId
@@ -9186,7 +9349,7 @@ var commandGroups = [
9186
9349
  verb: "slack",
9187
9350
  aliases: ["slack-setup"],
9188
9351
  summary: "Connect Slack to an agent profile through OAuth",
9189
- path: z14.object({
9352
+ path: z15.object({
9190
9353
  orgID: zOrganizationId,
9191
9354
  projectID: zProjectId,
9192
9355
  agentProfileID: zAgentProfileId