omnara 1.0.8 → 1.0.10

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 +53 -13
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -128,7 +128,12 @@ var zModelApiFormat = z.enum([
128
128
  "openai-chat-completions",
129
129
  "anthropic-messages"
130
130
  ]);
131
- var zModelProviderAuthKind = z.enum(["bearer_token", "api_key_header"]);
131
+ var zModelProviderAuthKind = z.enum([
132
+ "bearer_token",
133
+ "api_key_header",
134
+ "sigv4"
135
+ ]);
136
+ var zModelProviderAuthKindResponse = z.string();
132
137
  var zModelProviderApiVariant = z.enum([
133
138
  "default",
134
139
  "openrouter",
@@ -171,7 +176,7 @@ var zUpdateConfiguredModelRequest = z.object({
171
176
  name: zResourceName.optional(),
172
177
  provider_model_slug: z.string().min(1).optional(),
173
178
  context_window_tokens: z.int().gte(2).lte(2147483647).optional(),
174
- max_output_tokens: z.int().gte(1).lte(2147483647).optional(),
179
+ max_output_tokens: z.int().gte(1).lte(2147483647).nullish(),
175
180
  default_max_output_tokens: z.int().gte(1).lte(2147483647).nullish(),
176
181
  default_cache_retention: zModelCacheRetention.optional(),
177
182
  supports_tools: z.boolean().optional(),
@@ -228,9 +233,12 @@ var zCreateModelProviderConfigRequest = z.object({
228
233
  base_url: z.string().min(1).optional(),
229
234
  endpoint_path: z.string().min(1).regex(/^\//).optional(),
230
235
  request_timeout_ms: z.int().gte(1).lte(2147483647).optional(),
236
+ idle_timeout_ms: z.int().gte(1).lte(2147483647).optional(),
231
237
  auth_kind: zModelProviderAuthKind.optional(),
232
238
  auth_options: z.object({
233
- header_name: z.string().min(1).optional()
239
+ header_name: z.string().min(1).optional(),
240
+ service: z.string().min(1).max(64).optional(),
241
+ region: z.string().min(1).max(64).optional()
234
242
  }).optional(),
235
243
  credential_secret_id: zSecretId
236
244
  });
@@ -238,9 +246,12 @@ var zUpdateModelProviderConfigRequest = z.object({
238
246
  base_url: z.string().min(1).optional(),
239
247
  endpoint_path: z.string().min(1).regex(/^\//).optional(),
240
248
  request_timeout_ms: z.int().gte(1).lte(2147483647).optional(),
249
+ idle_timeout_ms: z.int().gte(1).lte(2147483647).optional(),
241
250
  auth_kind: zModelProviderAuthKind.optional(),
242
251
  auth_options: z.object({
243
- header_name: z.string().min(1).optional()
252
+ header_name: z.string().min(1).optional(),
253
+ service: z.string().min(1).max(64).optional(),
254
+ region: z.string().min(1).max(64).optional()
244
255
  }).optional(),
245
256
  credential_secret_id: zSecretId.optional()
246
257
  });
@@ -261,9 +272,12 @@ var zModelProviderConfig = z.object({
261
272
  base_url: z.string(),
262
273
  endpoint_path: z.string(),
263
274
  request_timeout_ms: z.int(),
264
- auth_kind: zModelProviderAuthKind,
275
+ idle_timeout_ms: z.int(),
276
+ auth_kind: zModelProviderAuthKindResponse,
265
277
  auth_options: z.object({
266
- header_name: z.string().min(1).optional()
278
+ header_name: z.string().min(1).optional(),
279
+ service: z.string().min(1).max(64).optional(),
280
+ region: z.string().min(1).max(64).optional()
267
281
  }),
268
282
  credential_secret_id: zSecretId,
269
283
  created_at: zTimestamp,
@@ -286,7 +300,7 @@ var zConfiguredModel = z.object({
286
300
  current_revision_id: zConfiguredModelRevisionId,
287
301
  provider_model_slug: z.string(),
288
302
  context_window_tokens: z.int(),
289
- max_output_tokens: z.int(),
303
+ max_output_tokens: z.int().nullable(),
290
304
  default_max_output_tokens: z.int().nullish(),
291
305
  default_cache_retention: zModelCacheRetention.optional(),
292
306
  supports_tools: z.boolean(),
@@ -640,7 +654,7 @@ var zAgentConfigModel = z.object({
640
654
  api_format: zModelApiFormat,
641
655
  api_variant: zModelProviderApiVariantResponse,
642
656
  context_window_tokens: z.int(),
643
- max_output_tokens: z.int(),
657
+ max_output_tokens: z.int().nullable(),
644
658
  default_max_output_tokens: z.int().nullish(),
645
659
  default_cache_retention: zModelCacheRetention,
646
660
  supports_tools: z.boolean(),
@@ -1595,7 +1609,7 @@ var zCreateMachinePoolRequestBase = z.object({
1595
1609
  });
1596
1610
  var zCreateMachinePoolRequest = zCreateMachinePoolRequestBase.and(z.union([
1597
1611
  z.object({
1598
- provider: z.enum(["unikraft"]),
1612
+ provider: z.enum(["unikraft", "modal"]),
1599
1613
  default_machine_cpu: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1600
1614
  default_machine_memory_mb: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
1601
1615
  max_total_cpu: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
@@ -2072,6 +2086,9 @@ var zCurrentUserOrg = z.object({
2072
2086
  role: z.string(),
2073
2087
  created_at: zTimestamp
2074
2088
  });
2089
+ var zListOrganizationsResponse = z.object({
2090
+ data: z.array(zCurrentUserOrg)
2091
+ });
2075
2092
  var zCurrentUser = z.object({
2076
2093
  user: zCurrentUserIdentity,
2077
2094
  orgs: z.array(zCurrentUserOrg)
@@ -2150,6 +2167,7 @@ var zRecordMachineFailureQuery = z.object({
2150
2167
  target_version: z.string().max(100).optional()
2151
2168
  });
2152
2169
  var zRecordMachineFailureResponse = z.void();
2170
+ var zListOrganizationsResponse2 = zListOrganizationsResponse;
2153
2171
  var zCreateOrganizationBody = zCreateOrganizationRequest;
2154
2172
  var zCreateOrganizationHeaders = z.object({
2155
2173
  "Idempotency-Key": z.string().min(1).max(255).optional()
@@ -4604,6 +4622,7 @@ __export(sdk_gen_exports, {
4604
4622
  listOrgApiKeys: () => listOrgApiKeys,
4605
4623
  listOrgInvitations: () => listOrgInvitations,
4606
4624
  listOrgMembers: () => listOrgMembers,
4625
+ listOrganizations: () => listOrganizations,
4607
4626
  listPendingInvitations: () => listPendingInvitations,
4608
4627
  listPersonalAccessTokens: () => listPersonalAccessTokens,
4609
4628
  listProjectAvailableSecrets: () => listProjectAvailableSecrets,
@@ -4728,6 +4747,20 @@ var recordMachineFailure = (options) => (options.client ?? client).post({
4728
4747
  ...options.headers
4729
4748
  }
4730
4749
  });
4750
+ var listOrganizations = (options) => (options?.client ?? client).get({
4751
+ responseValidator: relaxedResponseValidator(zListOrganizationsResponse2),
4752
+ security: [{
4753
+ key: "bearerAuth",
4754
+ scheme: "bearer",
4755
+ type: "http"
4756
+ }, {
4757
+ in: "cookie",
4758
+ name: "__Host-omnara_session",
4759
+ type: "apiKey"
4760
+ }],
4761
+ url: "/orgs",
4762
+ ...options
4763
+ });
4731
4764
  var createOrganization = (options) => (options.client ?? client).post({
4732
4765
  responseValidator: relaxedResponseValidator(zCreateOrganizationResponse2),
4733
4766
  security: [
@@ -8620,7 +8653,7 @@ function hasToolCalls(event) {
8620
8653
  return event.event_kind === "model_output" && event.content_blocks.some((block) => block.type === "tool_call");
8621
8654
  }
8622
8655
  function isFinishedModelOutput(event) {
8623
- return event.event_kind === "model_output" && !hasToolCalls(event);
8656
+ return event.event_kind === "model_output" && event.stop_reason !== "max_tokens" && !hasToolCalls(event);
8624
8657
  }
8625
8658
  function isControlEvent(event) {
8626
8659
  return event.event_kind === "agent_input" && event.input_kind === "control";
@@ -10320,7 +10353,7 @@ function formatVoid(message = "ok") {
10320
10353
  // src/machine-setup.ts
10321
10354
  import { spawn as spawn2, spawnSync } from "node:child_process";
10322
10355
  import { accessSync, constants, existsSync as existsSync2, readdirSync, readFileSync as readFileSync3 } from "node:fs";
10323
- import { homedir as homedir2 } from "node:os";
10356
+ import { homedir as homedir2, release } from "node:os";
10324
10357
  import { basename, dirname as dirname2, isAbsolute, join as join2, resolve } from "node:path";
10325
10358
  import * as z18 from "zod";
10326
10359
  var zMachineSetupBody = zConnectByoMachineRequest;
@@ -10382,7 +10415,8 @@ function daemonHome() {
10382
10415
  }
10383
10416
  var supportedPlatforms = /* @__PURE__ */ new Set(["darwin", "linux"]);
10384
10417
  var supportedArchitectures = /* @__PURE__ */ new Set(["x64", "arm64"]);
10385
- function ensureSupportedPlatform(platform, architecture) {
10418
+ var macOS13DarwinMajor = 22;
10419
+ function ensureSupportedPlatform(platform, architecture, osRelease) {
10386
10420
  if (!supportedPlatforms.has(platform)) {
10387
10421
  throw new CliInputError(`omnarad supports macOS and Linux; this machine reports ${platform}`);
10388
10422
  }
@@ -10391,6 +10425,12 @@ function ensureSupportedPlatform(platform, architecture) {
10391
10425
  `omnarad supports amd64 and arm64; this machine reports ${architecture}`
10392
10426
  );
10393
10427
  }
10428
+ if (platform === "darwin") {
10429
+ const darwinMajor = Number(osRelease.split(".")[0]);
10430
+ if (!Number.isInteger(darwinMajor) || darwinMajor < macOS13DarwinMajor) {
10431
+ throw new CliInputError("omnarad requires macOS 13 or later; update macOS before installing");
10432
+ }
10433
+ }
10394
10434
  }
10395
10435
  function isLoopbackHost(hostname2) {
10396
10436
  if (hostname2 === "localhost" || hostname2 === "[::1]" || hostname2 === "::1") return true;
@@ -10456,7 +10496,7 @@ var DaemonExitError = class extends Error {
10456
10496
  };
10457
10497
  async function runMachineCreateLocal(context) {
10458
10498
  const { report, apiUrl } = context;
10459
- ensureSupportedPlatform(process.platform, process.arch);
10499
+ ensureSupportedPlatform(process.platform, process.arch, release());
10460
10500
  ensureDaemonApiUrl(apiUrl);
10461
10501
  const home = daemonHome();
10462
10502
  const existing = describeExistingInstallation(home);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnara",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Command-line interface for Omnara: launch and manage agents, organizations, integrations, and MCP servers",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://omnara.com",