omnara 1.0.18 → 1.0.19

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 +151 -127
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -52,9 +52,9 @@ var zError = z.object({
52
52
  "request_too_large",
53
53
  "unsupported_media_type",
54
54
  "unprocessable",
55
+ "upstream_unavailable",
55
56
  "rate_limited",
56
57
  "internal_error",
57
- "upstream_error",
58
58
  "service_unavailable",
59
59
  "idempotency_key_conflict",
60
60
  "state_transition_conflict",
@@ -84,11 +84,11 @@ var zClientErrorCode = z.enum([
84
84
  "request_too_large",
85
85
  "unsupported_media_type",
86
86
  "unprocessable",
87
+ "upstream_unavailable",
87
88
  "rate_limited"
88
89
  ]);
89
90
  var zServerErrorCode = z.enum([
90
91
  "internal_error",
91
- "upstream_error",
92
92
  "service_unavailable",
93
93
  "authentication_unavailable"
94
94
  ]);
@@ -639,7 +639,7 @@ var zMcpServerAuthHint = z.object({
639
639
  var zMcpServerAuthRequiredError = z.object({
640
640
  error: z.string(),
641
641
  code: z.enum(["unprocessable"]),
642
- auth: zMcpServerAuthHint
642
+ auth: zMcpServerAuthHint.optional()
643
643
  });
644
644
  var zMcpServerInfo = z.object({
645
645
  name: z.string(),
@@ -3516,9 +3516,7 @@ function samePath(a, b) {
3516
3516
  return a.length === b.length && a.every((segment, index) => segment === b[index]);
3517
3517
  }
3518
3518
  function isUnknownEnumIssue(issue) {
3519
- if (issue.code === "invalid_value") {
3520
- return issue.values.length > 1 && isStringInput(issue);
3521
- }
3519
+ if (issue.code === "invalid_value") return isStringInput(issue);
3522
3520
  if (issue.code !== "invalid_union") return false;
3523
3521
  if (issue.errors.length === 0) return hasStringDiscriminator(issue);
3524
3522
  if (issue.errors.some((arm) => arm.every(isUnknownEnumIssue))) {
@@ -3874,6 +3872,9 @@ function cliLoginTokenName(hostName) {
3874
3872
  return `${cliLoginTokenPrefix}${cliLoginTokenHostSeparator}${hostName}`;
3875
3873
  }
3876
3874
 
3875
+ // ../sdk/src/client.ts
3876
+ import * as z6 from "zod";
3877
+
3877
3878
  // ../sdk/src/generated/core/bodySerializer.gen.ts
3878
3879
  var serializeFormDataPair = (data, key, value) => {
3879
3880
  if (typeof value === "string" || value instanceof Blob) {
@@ -4699,21 +4700,44 @@ var httpMethods = [
4699
4700
  "put",
4700
4701
  "trace"
4701
4702
  ];
4702
- function withoutClientSelector(options) {
4703
- const stripped = { ...options };
4704
- Reflect.deleteProperty(stripped, "client");
4705
- return stripped;
4703
+ var zMultipartPart = z6.union([
4704
+ z6.string(),
4705
+ z6.instanceof(Blob),
4706
+ z6.date().transform((date2) => date2.toISOString()),
4707
+ z6.union([z6.number(), z6.boolean(), z6.bigint()]).transform(String),
4708
+ z6.json().transform((value) => new Blob([JSON.stringify(value)], { type: "application/json" }))
4709
+ ]);
4710
+ var zMultipartBody = z6.record(
4711
+ z6.string(),
4712
+ z6.union([z6.array(zMultipartPart), zMultipartPart]).nullish()
4713
+ );
4714
+ var serializeMultipartBody = ((body) => {
4715
+ const form = new FormData();
4716
+ for (const [key, value] of Object.entries(zMultipartBody.parse(body))) {
4717
+ if (value === null || value === void 0) continue;
4718
+ for (const part of Array.isArray(value) ? value : [value]) form.append(key, part);
4719
+ }
4720
+ return form;
4721
+ });
4722
+ function normalizeRequestOptions(options) {
4723
+ const normalized = { ...options };
4724
+ Reflect.deleteProperty(normalized, "client");
4725
+ if (normalized.bodySerializer === formDataBodySerializer.bodySerializer) {
4726
+ normalized.bodySerializer = serializeMultipartBody;
4727
+ }
4728
+ return normalized;
4706
4729
  }
4707
- function stripClientSelector(client2) {
4730
+ function patchGeneratedRequests(client2) {
4708
4731
  const { request } = client2;
4709
- client2.request = (options) => request(withoutClientSelector(options));
4732
+ client2.request = (options) => request(normalizeRequestOptions(options));
4710
4733
  for (const method of httpMethods) {
4711
4734
  const dispatch = client2[method];
4712
- client2[method] = (options) => dispatch(withoutClientSelector(options));
4735
+ client2[method] = (options) => dispatch(normalizeRequestOptions(options));
4713
4736
  const sseDispatch = client2.sse[method];
4714
- client2.sse[method] = (options) => sseDispatch(withoutClientSelector(options));
4737
+ client2.sse[method] = (options) => sseDispatch(normalizeRequestOptions(options));
4715
4738
  }
4716
4739
  }
4740
+ patchGeneratedRequests(client);
4717
4741
  function createOmnaraClient(options = {}) {
4718
4742
  const client2 = createClient(
4719
4743
  createConfig({
@@ -4737,37 +4761,37 @@ function createOmnaraClient(options = {}) {
4737
4761
  if (!response.ok) throw await ApiError.fromResponse(response);
4738
4762
  return response;
4739
4763
  });
4740
- stripClientSelector(client2);
4764
+ patchGeneratedRequests(client2);
4741
4765
  return client2;
4742
4766
  }
4743
4767
 
4744
4768
  // ../sdk/src/device.ts
4745
- import * as z6 from "zod";
4769
+ import * as z7 from "zod";
4746
4770
  var OMNARA_CLI_OAUTH_CLIENT_ID = "omnara-cli";
4747
4771
  var OAUTH_DEVICE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
4748
- var zAuthorizationServerMetadata = z6.object({
4749
- issuer: z6.url(),
4750
- device_authorization_endpoint: z6.url(),
4751
- token_endpoint: z6.url(),
4752
- grant_types_supported: z6.array(z6.string()),
4753
- token_endpoint_auth_methods_supported: z6.array(z6.string())
4754
- });
4755
- var zDeviceAuthStartResponse = z6.object({
4756
- device_code: z6.string().min(1),
4757
- user_code: z6.string().min(1),
4758
- verification_uri: z6.string().min(1),
4759
- verification_uri_complete: z6.string().min(1),
4760
- expires_in: z6.number().int().positive(),
4761
- interval: z6.number().int().positive()
4762
- });
4763
- var zDeviceAuthErrorResponse = z6.object({
4764
- error: z6.string().min(1),
4765
- error_description: z6.string().optional()
4772
+ var zAuthorizationServerMetadata = z7.object({
4773
+ issuer: z7.url(),
4774
+ device_authorization_endpoint: z7.url(),
4775
+ token_endpoint: z7.url(),
4776
+ grant_types_supported: z7.array(z7.string()),
4777
+ token_endpoint_auth_methods_supported: z7.array(z7.string())
4778
+ });
4779
+ var zDeviceAuthStartResponse = z7.object({
4780
+ device_code: z7.string().min(1),
4781
+ user_code: z7.string().min(1),
4782
+ verification_uri: z7.string().min(1),
4783
+ verification_uri_complete: z7.string().min(1),
4784
+ expires_in: z7.number().int().positive(),
4785
+ interval: z7.number().int().positive()
4786
+ });
4787
+ var zDeviceAuthErrorResponse = z7.object({
4788
+ error: z7.string().min(1),
4789
+ error_description: z7.string().optional()
4766
4790
  });
4767
4791
  var zDeviceAuthFailure = zJsonText.pipe(zDeviceAuthErrorResponse);
4768
- var zDeviceAuthApprovedResponse = z6.object({
4769
- access_token: z6.string().min(1),
4770
- token_type: z6.string()
4792
+ var zDeviceAuthApprovedResponse = z7.object({
4793
+ access_token: z7.string().min(1),
4794
+ token_type: z7.string()
4771
4795
  });
4772
4796
  var DEVICE_AUTH_FAILURE_MESSAGES = {
4773
4797
  access_denied: "the login request was denied",
@@ -7569,15 +7593,15 @@ var downloadDaemonArtifact = (options) => (options.client ?? client).get({
7569
7593
  import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
7570
7594
  import { homedir } from "node:os";
7571
7595
  import { dirname, join } from "node:path";
7572
- import * as z8 from "zod";
7596
+ import * as z9 from "zod";
7573
7597
 
7574
7598
  // src/output.ts
7575
- import * as z7 from "zod";
7576
- var zRenderValue = z7.json();
7599
+ import * as z8 from "zod";
7600
+ var zRenderValue = z8.json();
7577
7601
  var zOptionalRenderValue = zRenderValue.optional();
7578
- var zListEnvelope = z7.strictObject({
7579
- data: z7.array(zRenderValue),
7580
- next_cursor: z7.string().nullable()
7602
+ var zListEnvelope = z8.strictObject({
7603
+ data: z8.array(zRenderValue),
7604
+ next_cursor: z8.string().nullable()
7581
7605
  });
7582
7606
  var PREFERRED_LEADING_COLUMNS = ["id", "name"];
7583
7607
  var HIDDEN_TABLE_COLUMNS = /* @__PURE__ */ new Set(["org_id", "project_id"]);
@@ -7749,9 +7773,9 @@ async function runCliAction(action) {
7749
7773
  } catch (error) {
7750
7774
  if (error instanceof CliInputError) {
7751
7775
  console.error(`error: ${error.message}`);
7752
- } else if (error instanceof z7.ZodError) {
7776
+ } else if (error instanceof z8.ZodError) {
7753
7777
  console.error(`error: unexpected response shape:
7754
- ${z7.prettifyError(error)}`);
7778
+ ${z8.prettifyError(error)}`);
7755
7779
  } else if (error instanceof ApiError) {
7756
7780
  const code = error.code ? ` [${error.code}]` : "";
7757
7781
  console.error(`error: API ${error.status}${code}: ${error.message}`);
@@ -7763,11 +7787,11 @@ ${z7.prettifyError(error)}`);
7763
7787
  }
7764
7788
 
7765
7789
  // src/config-file.ts
7766
- var zConfigFile = z8.looseObject({
7767
- api_url: z8.url().optional(),
7768
- issuer_url: z8.url().optional(),
7769
- base_url: z8.url().optional(),
7770
- token: z8.string().min(1).optional(),
7790
+ var zConfigFile = z9.looseObject({
7791
+ api_url: z9.url().optional(),
7792
+ issuer_url: z9.url().optional(),
7793
+ base_url: z9.url().optional(),
7794
+ token: z9.string().min(1).optional(),
7771
7795
  org_id: zOrganizationId.optional(),
7772
7796
  project_id: zProjectId.optional()
7773
7797
  });
@@ -7783,10 +7807,10 @@ function warnConfigIgnored(message) {
7783
7807
  function loadConfigFile() {
7784
7808
  const path = configFilePath();
7785
7809
  if (!existsSync(path)) return { readable: true, file: {} };
7786
- const json7 = zJsonText.safeParse(readFileSync(path, "utf8"));
7787
- if (!json7.success) return { readable: false, reason: z8.prettifyError(json7.error) };
7788
- const file = zConfigFile.safeParse(json7.data);
7789
- return file.success ? { readable: true, file: file.data } : { readable: false, reason: z8.prettifyError(file.error) };
7810
+ const json8 = zJsonText.safeParse(readFileSync(path, "utf8"));
7811
+ if (!json8.success) return { readable: false, reason: z9.prettifyError(json8.error) };
7812
+ const file = zConfigFile.safeParse(json8.data);
7813
+ return file.success ? { readable: true, file: file.data } : { readable: false, reason: z9.prettifyError(file.error) };
7790
7814
  }
7791
7815
  function readConfigFile() {
7792
7816
  const loaded = loadConfigFile();
@@ -7813,7 +7837,7 @@ function updateConfigFile(patch) {
7813
7837
  const result = zConfigFile.safeParse(merged);
7814
7838
  if (!result.success) {
7815
7839
  throw new CliInputError(`refusing to save invalid config:
7816
- ${z8.prettifyError(result.error)}`);
7840
+ ${z9.prettifyError(result.error)}`);
7817
7841
  }
7818
7842
  mkdirSync(dirname(configFilePath()), { recursive: true, mode: 448 });
7819
7843
  writeFileSync(configFilePath(), `${JSON.stringify(result.data, null, 2)}
@@ -7825,7 +7849,7 @@ ${z8.prettifyError(result.error)}`);
7825
7849
  // src/device-login.ts
7826
7850
  import { hostname } from "node:os";
7827
7851
  import { intro, log, note, outro, spinner } from "@clack/prompts";
7828
- import * as z9 from "zod";
7852
+ import * as z10 from "zod";
7829
7853
 
7830
7854
  // src/browser.ts
7831
7855
  import { spawn } from "node:child_process";
@@ -7998,7 +8022,7 @@ function loginTokenName(explicit, hostName) {
7998
8022
  if (result.success) return result.data;
7999
8023
  if (explicit === void 0) return cliLoginTokenName();
8000
8024
  throw new CliInputError(`invalid token name:
8001
- ${z9.prettifyError(result.error)}`);
8025
+ ${z10.prettifyError(result.error)}`);
8002
8026
  }
8003
8027
  async function loginWithDevice(options) {
8004
8028
  const { report, store } = options;
@@ -8234,14 +8258,14 @@ function registerConfigCommand(program2, cli) {
8234
8258
 
8235
8259
  // src/factory.ts
8236
8260
  import { InvalidArgumentError } from "commander";
8237
- import * as z11 from "zod";
8261
+ import * as z12 from "zod";
8238
8262
 
8239
8263
  // src/flags.ts
8240
- import * as z10 from "zod";
8241
- var zScalarKind = z10.union([
8242
- z10.string().transform(() => "string"),
8243
- z10.number().transform(() => "number"),
8244
- z10.boolean().transform(() => "boolean")
8264
+ import * as z11 from "zod";
8265
+ var zScalarKind = z11.union([
8266
+ z11.string().transform(() => "string"),
8267
+ z11.number().transform(() => "number"),
8268
+ z11.boolean().transform(() => "boolean")
8245
8269
  ]);
8246
8270
  function isChoice(value) {
8247
8271
  return typeof value === "string" || typeof value === "number";
@@ -8358,7 +8382,7 @@ function finalizeFlag(draft) {
8358
8382
  };
8359
8383
  }
8360
8384
  function deriveFlags(schema) {
8361
- const jsonSchema = z10.toJSONSchema(schema, { io: "input" });
8385
+ const jsonSchema = z11.toJSONSchema(schema, { io: "input" });
8362
8386
  const drafts = /* @__PURE__ */ new Map();
8363
8387
  collectDrafts(drafts, jsonSchema, [], false);
8364
8388
  return [...drafts.values()].map(finalizeFlag);
@@ -8429,9 +8453,9 @@ function createFlowReporter(title) {
8429
8453
  }
8430
8454
 
8431
8455
  // src/factory.ts
8432
- var zFlagValue = z11.json();
8433
- var zFlagObject = z11.record(z11.string(), zFlagValue);
8434
- var zNoParams = z11.object({});
8456
+ var zFlagValue = z12.json();
8457
+ var zFlagObject = z12.record(z12.string(), zFlagValue);
8458
+ var zNoParams = z12.object({});
8435
8459
  function op(spec) {
8436
8460
  return {
8437
8461
  type: "op",
@@ -8587,7 +8611,7 @@ function parseWithSchema(schema, value, label) {
8587
8611
  const result = schema.safeParse(value);
8588
8612
  if (!result.success) {
8589
8613
  throw new CliInputError(`invalid ${label}:
8590
- ${z11.prettifyError(result.error)}`);
8614
+ ${z12.prettifyError(result.error)}`);
8591
8615
  }
8592
8616
  return result.data;
8593
8617
  }
@@ -8632,7 +8656,7 @@ function registerPathParams(command, plan) {
8632
8656
  command.option(param.option, `defaults from config (${param.describe})`);
8633
8657
  }
8634
8658
  }
8635
- var zExplicitOption = z11.string().optional();
8659
+ var zExplicitOption = z12.string().optional();
8636
8660
  async function resolvePathValues(plan, args, options, config2) {
8637
8661
  const path = {};
8638
8662
  plan.positionalParams.forEach((param, index) => {
@@ -8775,10 +8799,10 @@ function registerLoginCommand(program2, cli) {
8775
8799
  }
8776
8800
 
8777
8801
  // src/manifest.ts
8778
- import * as z23 from "zod";
8802
+ import * as z24 from "zod";
8779
8803
 
8780
8804
  // src/agent-commands.ts
8781
- import * as z16 from "zod";
8805
+ import * as z17 from "zod";
8782
8806
 
8783
8807
  // ../sdk/src/generated/@tanstack/react-query.gen.ts
8784
8808
  import { infiniteQueryOptions, queryOptions } from "@tanstack/react-query";
@@ -8880,10 +8904,10 @@ function useOmnaraClient() {
8880
8904
  }
8881
8905
 
8882
8906
  // ../react/src/domains/query-keys.ts
8883
- import { z as z12 } from "zod";
8884
- var generatedQueryKeyEntry = z12.object({
8885
- _id: z12.string(),
8886
- path: z12.object({ orgID: z12.string().optional(), projectID: z12.string().optional() }).optional()
8907
+ import { z as z13 } from "zod";
8908
+ var generatedQueryKeyEntry = z13.object({
8909
+ _id: z13.string(),
8910
+ path: z13.object({ orgID: z13.string().optional(), projectID: z13.string().optional() }).optional()
8887
8911
  });
8888
8912
  function generatedQueryKey(query) {
8889
8913
  const parsed = generatedQueryKeyEntry.safeParse(query.queryKey[0]);
@@ -8906,7 +8930,7 @@ import { useCallback, useEffect, useMemo, useSyncExternalStore } from "react";
8906
8930
  import { useInfiniteQuery } from "@tanstack/react-query";
8907
8931
 
8908
8932
  // ../react/src/domains/agent-chat-messages.ts
8909
- import { z as z13 } from "zod";
8933
+ import { z as z14 } from "zod";
8910
8934
  function parseStreamData(data) {
8911
8935
  if ("event_kind" in data) return { kind: "event", event: data };
8912
8936
  if ("tool_call_id" in data && "state" in data) return { kind: "tool_call_update" };
@@ -8943,7 +8967,7 @@ function mediaPart(block, id) {
8943
8967
  function isHiddenContentBlock(block) {
8944
8968
  return block.metadata?.omnara_hidden === "true";
8945
8969
  }
8946
- var structuredToolError = z13.object({ error_code: z13.string() });
8970
+ var structuredToolError = z14.object({ error_code: z14.string() });
8947
8971
  function structuredToolErrorCode(blocks) {
8948
8972
  for (const block of blocks) {
8949
8973
  if (block.type !== "structured_data") continue;
@@ -10189,10 +10213,10 @@ import { render } from "ink";
10189
10213
  // src/chat-ui.tsx
10190
10214
  import { Box as Box2, Static, Text as Text2, useApp } from "ink";
10191
10215
  import { useEffect as useEffect3, useMemo as useMemo2, useReducer, useState as useState2 } from "react";
10192
- import * as z15 from "zod";
10216
+ import * as z16 from "zod";
10193
10217
 
10194
10218
  // src/agent-rendering.ts
10195
- import * as z14 from "zod";
10219
+ import * as z15 from "zod";
10196
10220
  var formatAgentEventList = (response) => {
10197
10221
  const page = {
10198
10222
  data: response.data.map((event) => ({
@@ -10209,10 +10233,10 @@ var formatAgentEventList = (response) => {
10209
10233
  return { value: next_before_sequence == null ? page : { ...page, next_before_sequence } };
10210
10234
  };
10211
10235
  var summaryWidth = 100;
10212
- var zJsonValue = z14.json();
10213
- var zRunCommandInput = z14.object({ command: z14.string() });
10236
+ var zJsonValue = z15.json();
10237
+ var zRunCommandInput = z15.object({ command: z15.string() });
10214
10238
  function summaryValue(value) {
10215
- const text = z14.string().safeParse(value);
10239
+ const text = z15.string().safeParse(value);
10216
10240
  return text.success ? text.data : JSON.stringify(value);
10217
10241
  }
10218
10242
  function toolCallSummary(name, input) {
@@ -10406,10 +10430,10 @@ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
10406
10430
  var spinnerFrames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
10407
10431
  var streamingTailLines = 8;
10408
10432
  var streamingTailChars = 1500;
10409
- var zToolInput2 = z15.record(z15.string(), z15.json());
10410
- var zToolOutput = z15.object({
10433
+ var zToolInput2 = z16.record(z16.string(), z16.json());
10434
+ var zToolOutput = z16.object({
10411
10435
  outcome: zToolCallOutcome,
10412
- contentBlocks: z15.array(zToolResultContentBlock)
10436
+ contentBlocks: z16.array(zToolResultContentBlock)
10413
10437
  });
10414
10438
  function formatDuration(ms) {
10415
10439
  const seconds = Math.max(1, Math.round(ms / 1e3));
@@ -10775,7 +10799,7 @@ var agentEventsStreamOp = customOp({
10775
10799
  },
10776
10800
  run: async ({ client: client2, path, args, options }) => {
10777
10801
  const agentID = parseWithSchema(zAgentId, args[0], "agent id");
10778
- const afterSequence = parseWithSchema(z16.int().gte(0).optional(), options.afterSequence, "--after-sequence") ?? 0;
10802
+ const afterSequence = parseWithSchema(z17.int().gte(0).optional(), options.afterSequence, "--after-sequence") ?? 0;
10779
10803
  const abort = new AbortController();
10780
10804
  process.once("SIGINT", () => {
10781
10805
  abort.abort();
@@ -10792,12 +10816,12 @@ var agentEventsStreamOp = customOp({
10792
10816
 
10793
10817
  // src/config-attachment.ts
10794
10818
  import { readFileSync as readFileSync2 } from "node:fs";
10795
- import * as z17 from "zod";
10796
- var zConfigSourceAttachment = z17.object({
10797
- file: z17.string().min(1).optional().describe("path to an agent config file (.yaml, .yml, or .json)"),
10798
- source: z17.string().min(1).optional().describe("inline agent config source (YAML or JSON)")
10819
+ import * as z18 from "zod";
10820
+ var zConfigSourceAttachment = z18.object({
10821
+ file: z18.string().min(1).optional().describe("path to an agent config file (.yaml, .yml, or .json)"),
10822
+ source: z18.string().min(1).optional().describe("inline agent config source (YAML or JSON)")
10799
10823
  });
10800
- var zConfigAttachment = z17.object({
10824
+ var zConfigAttachment = z18.object({
10801
10825
  config: zAgentConfigId.optional().describe("existing agent config ID"),
10802
10826
  ...zConfigSourceAttachment.shape
10803
10827
  });
@@ -10883,7 +10907,7 @@ import { spawn as spawn2, spawnSync } from "node:child_process";
10883
10907
  import { accessSync, constants, existsSync as existsSync2, readdirSync, readFileSync as readFileSync3 } from "node:fs";
10884
10908
  import { homedir as homedir2, release } from "node:os";
10885
10909
  import { basename, dirname as dirname2, isAbsolute, join as join2, resolve } from "node:path";
10886
- import * as z18 from "zod";
10910
+ import * as z19 from "zod";
10887
10911
  var zMachineSetupBody = zConnectByoMachineRequest;
10888
10912
  async function connectMachine(context) {
10889
10913
  const { client: client2, path, body, report } = context;
@@ -10920,9 +10944,9 @@ var daemonConfigFileName = "daemon.json";
10920
10944
  var installLockFileName = "install.lock";
10921
10945
  var daemonLockFileName = "daemon.lock";
10922
10946
  var daemonLockPollMs = 250;
10923
- var zDaemonConfigFile = z18.looseObject({
10924
- machine_id: z18.string().optional(),
10925
- api_url: z18.string().optional()
10947
+ var zDaemonConfigFile = z19.looseObject({
10948
+ machine_id: z19.string().optional(),
10949
+ api_url: z19.string().optional()
10926
10950
  });
10927
10951
  function daemonHome() {
10928
10952
  const override = process.env.OMNARA_HOME;
@@ -11204,10 +11228,10 @@ function runInstaller(report, apiUrl, token, machineId, home) {
11204
11228
 
11205
11229
  // src/mcp-add.ts
11206
11230
  import { isMap, isScalar as isScalar2, parseDocument } from "yaml";
11207
- import * as z20 from "zod";
11231
+ import * as z21 from "zod";
11208
11232
 
11209
11233
  // src/mcp-oauth.ts
11210
- import * as z19 from "zod";
11234
+ import * as z20 from "zod";
11211
11235
  async function authorizeMcpOAuthSecret(options) {
11212
11236
  const { data: start } = await sdk_gen_exports.startSecretMcpoAuth({
11213
11237
  client: options.client,
@@ -11228,7 +11252,7 @@ async function authorizeMcpOAuthSecret(options) {
11228
11252
  }
11229
11253
  });
11230
11254
  }
11231
- var zBrowserFlag = z19.boolean().default(true).describe("open the authorization URL in a browser");
11255
+ var zBrowserFlag = z20.boolean().default(true).describe("open the authorization URL in a browser");
11232
11256
  function openAuthorizationUrl(report, title, url4, browser) {
11233
11257
  report.url(title, url4);
11234
11258
  if (browser) {
@@ -11264,7 +11288,7 @@ async function runMcpOAuth(context) {
11264
11288
  // src/mcp-add.ts
11265
11289
  var SERVER_KEY_PATTERN = /^[a-zA-Z][a-zA-Z0-9-]{0,31}$/;
11266
11290
  var zMcpAddBody = zMcpoAuthStartRequest.omit({ owner: true, name: true }).extend({
11267
- server_name: z20.string().regex(
11291
+ server_name: z21.string().regex(
11268
11292
  SERVER_KEY_PATTERN,
11269
11293
  "must start with a letter and contain at most 32 letters, digits, or hyphens"
11270
11294
  ).describe("MCP server key used in the agent config"),
@@ -11277,11 +11301,11 @@ function targetLabel(target) {
11277
11301
  function serverEntry(url4, secretId) {
11278
11302
  return { url: url4, auth: { type: "oauth", secret_id: secretId } };
11279
11303
  }
11280
- var zJsonRecord = z20.record(z20.string(), z20.json());
11304
+ var zJsonRecord = z21.record(z21.string(), z21.json());
11281
11305
  function prepareJsonConfig(config2, serverName, mcpUrl) {
11282
- const json7 = zJsonText.safeParse(config2.source ?? "");
11283
- if (!json7.success) throw new CliInputError("the current agent config contains invalid JSON");
11284
- const parsed = zJsonRecord.safeParse(json7.data);
11306
+ const json8 = zJsonText.safeParse(config2.source ?? "");
11307
+ if (!json8.success) throw new CliInputError("the current agent config contains invalid JSON");
11308
+ const parsed = zJsonRecord.safeParse(json8.data);
11285
11309
  if (!parsed.success) throw new CliInputError("the current agent config must be an object");
11286
11310
  const mcp = zJsonRecord.optional().safeParse(parsed.data.mcp);
11287
11311
  if (!mcp.success) {
@@ -11440,10 +11464,10 @@ function runProfileMcpAdd(context) {
11440
11464
  import { readdirSync as readdirSync2, readFileSync as readFileSync4, statSync } from "node:fs";
11441
11465
  import { basename as basename2, dirname as dirname3, join as join3, resolve as resolve2 } from "node:path";
11442
11466
  import * as tar from "tar";
11443
- import * as z21 from "zod";
11444
- var zCreateSkillCliBody = z21.object({
11467
+ import * as z22 from "zod";
11468
+ var zCreateSkillCliBody = z22.object({
11445
11469
  owner: zSkillOwnerInput,
11446
- archive: z21.string().min(1).describe("path to a skill directory (packed automatically) or a .zip/.tar.gz archive")
11470
+ archive: z22.string().min(1).describe("path to a skill directory (packed automatically) or a .zip/.tar.gz archive")
11447
11471
  });
11448
11472
  var ARCHIVE_SUFFIXES = [".zip", ".tar.gz", ".tgz"];
11449
11473
  function assertPackable(dir) {
@@ -11485,16 +11509,16 @@ async function loadSkillArchive(archivePath) {
11485
11509
  }
11486
11510
 
11487
11511
  // src/slack-integration.ts
11488
- import * as z22 from "zod";
11489
- var zSlackBody = z22.object({
11490
- app_name: z22.string().optional().describe("name for a new Slack app"),
11491
- app_configuration_token: z22.string().optional().describe("Slack app configuration token for a new app"),
11492
- icon_filename: z22.string().optional().describe("filename for the new Slack app icon"),
11493
- icon_data_base64: z22.string().optional().describe("base64-encoded Slack app icon"),
11494
- client_id: z22.string().optional().describe("existing Slack app client ID"),
11495
- client_secret: z22.string().optional().describe("existing Slack app client secret"),
11496
- signing_secret: z22.string().optional().describe("existing Slack app signing secret"),
11497
- return_to: z22.string().optional().describe("console-relative path opened after authorization"),
11512
+ import * as z23 from "zod";
11513
+ var zSlackBody = z23.object({
11514
+ app_name: z23.string().optional().describe("name for a new Slack app"),
11515
+ app_configuration_token: z23.string().optional().describe("Slack app configuration token for a new app"),
11516
+ icon_filename: z23.string().optional().describe("filename for the new Slack app icon"),
11517
+ icon_data_base64: z23.string().optional().describe("base64-encoded Slack app icon"),
11518
+ client_id: z23.string().optional().describe("existing Slack app client ID"),
11519
+ client_secret: z23.string().optional().describe("existing Slack app client secret"),
11520
+ signing_secret: z23.string().optional().describe("existing Slack app signing secret"),
11521
+ return_to: z23.string().optional().describe("console-relative path opened after authorization"),
11498
11522
  browser: zBrowserFlag
11499
11523
  });
11500
11524
  function parseRequest(body) {
@@ -11524,7 +11548,7 @@ function parseRequest(body) {
11524
11548
  if (!result2.success) {
11525
11549
  throw new CliInputError(
11526
11550
  `invalid existing Slack app parameters:
11527
- ${z22.prettifyError(result2.error)}`
11551
+ ${z23.prettifyError(result2.error)}`
11528
11552
  );
11529
11553
  }
11530
11554
  return { kind: "existing-app", body: result2.data };
@@ -11545,7 +11569,7 @@ ${z22.prettifyError(result2.error)}`
11545
11569
  if (!result.success) {
11546
11570
  throw new CliInputError(
11547
11571
  `invalid Slack app parameters:
11548
- ${z22.prettifyError(result.error)}
11572
+ ${z23.prettifyError(result.error)}
11549
11573
  Pass --app-name and --app-configuration-token, or existing app credentials.`
11550
11574
  );
11551
11575
  }
@@ -11644,7 +11668,7 @@ var commandGroups = [
11644
11668
  body: zConfigAttachment.extend({
11645
11669
  profile: zAgentProfileId.optional(),
11646
11670
  name: zAgentName.optional(),
11647
- message: z23.string().optional()
11671
+ message: z24.string().optional()
11648
11672
  }),
11649
11673
  transformBody: async ({ profile, name, message, ...attachment }, { client: client2, path }) => ({
11650
11674
  profile,
@@ -11685,7 +11709,7 @@ var commandGroups = [
11685
11709
  flowOp({
11686
11710
  verb: "mcp-add",
11687
11711
  summary: "Create an OAuth secret and add an MCP server to an agent",
11688
- path: z23.object({
11712
+ path: z24.object({
11689
11713
  orgID: zOrganizationId,
11690
11714
  projectID: zProjectId,
11691
11715
  agentID: zAgentId
@@ -11701,7 +11725,7 @@ var commandGroups = [
11701
11725
  format: (response) => formatRecord()(response.agent_input),
11702
11726
  path: zCreateAgentInputPath,
11703
11727
  body: zCreateAgentInputBody.partial({ content_blocks: true }).extend({
11704
- message: z23.string().optional().describe("plain text to send as a single text block")
11728
+ message: z24.string().optional().describe("plain text to send as a single text block")
11705
11729
  }).transform(({ message, content_blocks, ...rest }, ctx) => {
11706
11730
  if (content_blocks !== void 0 && message === void 0) {
11707
11731
  return { ...rest, content_blocks };
@@ -11710,7 +11734,7 @@ var commandGroups = [
11710
11734
  return { ...rest, content_blocks: [{ type: "text", text: message }] };
11711
11735
  }
11712
11736
  ctx.addIssue("pass exactly one of --message or --content-blocks");
11713
- return z23.NEVER;
11737
+ return z24.NEVER;
11714
11738
  })
11715
11739
  })
11716
11740
  ],
@@ -11727,8 +11751,8 @@ var commandGroups = [
11727
11751
  format: formatAgentEventList,
11728
11752
  path: zListEventsPath,
11729
11753
  query: zListEventsQuery.extend({
11730
- before_sequence: z23.int().gte(0).optional(),
11731
- after_sequence: z23.int().gte(0).optional()
11754
+ before_sequence: z24.int().gte(0).optional(),
11755
+ after_sequence: z24.int().gte(0).optional()
11732
11756
  })
11733
11757
  }),
11734
11758
  agentEventsStreamOp
@@ -12225,7 +12249,7 @@ var commandGroups = [
12225
12249
  flowOp({
12226
12250
  verb: "mcp-oauth",
12227
12251
  summary: "Create a secret through an MCP server OAuth flow",
12228
- path: z23.object({ orgID: zOrganizationId }),
12252
+ path: z24.object({ orgID: zOrganizationId }),
12229
12253
  body: zMcpOAuthBody,
12230
12254
  run: runMcpOAuth
12231
12255
  })
@@ -12339,7 +12363,7 @@ var commandGroups = [
12339
12363
  flowOp({
12340
12364
  verb: "mcp-add",
12341
12365
  summary: "Create an OAuth secret and add an MCP server to an agent profile",
12342
- path: z23.object({
12366
+ path: z24.object({
12343
12367
  orgID: zOrganizationId,
12344
12368
  projectID: zProjectId,
12345
12369
  agentProfileID: zAgentProfileId
@@ -12351,7 +12375,7 @@ var commandGroups = [
12351
12375
  verb: "slack",
12352
12376
  aliases: ["slack-setup"],
12353
12377
  summary: "Connect Slack to an agent profile through OAuth",
12354
- path: z23.object({
12378
+ path: z24.object({
12355
12379
  orgID: zOrganizationId,
12356
12380
  projectID: zProjectId,
12357
12381
  agentProfileID: zAgentProfileId
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnara",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
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",