omnara 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +17 -7
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -171,7 +171,7 @@ var zUpdateConfiguredModelRequest = z.object({
|
|
|
171
171
|
name: zResourceName.optional(),
|
|
172
172
|
provider_model_slug: z.string().min(1).optional(),
|
|
173
173
|
context_window_tokens: z.int().gte(2).lte(2147483647).optional(),
|
|
174
|
-
max_output_tokens: z.int().gte(1).lte(2147483647).
|
|
174
|
+
max_output_tokens: z.int().gte(1).lte(2147483647).nullish(),
|
|
175
175
|
default_max_output_tokens: z.int().gte(1).lte(2147483647).nullish(),
|
|
176
176
|
default_cache_retention: zModelCacheRetention.optional(),
|
|
177
177
|
supports_tools: z.boolean().optional(),
|
|
@@ -228,6 +228,7 @@ var zCreateModelProviderConfigRequest = z.object({
|
|
|
228
228
|
base_url: z.string().min(1).optional(),
|
|
229
229
|
endpoint_path: z.string().min(1).regex(/^\//).optional(),
|
|
230
230
|
request_timeout_ms: z.int().gte(1).lte(2147483647).optional(),
|
|
231
|
+
idle_timeout_ms: z.int().gte(1).lte(2147483647).optional(),
|
|
231
232
|
auth_kind: zModelProviderAuthKind.optional(),
|
|
232
233
|
auth_options: z.object({
|
|
233
234
|
header_name: z.string().min(1).optional()
|
|
@@ -238,6 +239,7 @@ var zUpdateModelProviderConfigRequest = z.object({
|
|
|
238
239
|
base_url: z.string().min(1).optional(),
|
|
239
240
|
endpoint_path: z.string().min(1).regex(/^\//).optional(),
|
|
240
241
|
request_timeout_ms: z.int().gte(1).lte(2147483647).optional(),
|
|
242
|
+
idle_timeout_ms: z.int().gte(1).lte(2147483647).optional(),
|
|
241
243
|
auth_kind: zModelProviderAuthKind.optional(),
|
|
242
244
|
auth_options: z.object({
|
|
243
245
|
header_name: z.string().min(1).optional()
|
|
@@ -261,6 +263,7 @@ var zModelProviderConfig = z.object({
|
|
|
261
263
|
base_url: z.string(),
|
|
262
264
|
endpoint_path: z.string(),
|
|
263
265
|
request_timeout_ms: z.int(),
|
|
266
|
+
idle_timeout_ms: z.int(),
|
|
264
267
|
auth_kind: zModelProviderAuthKind,
|
|
265
268
|
auth_options: z.object({
|
|
266
269
|
header_name: z.string().min(1).optional()
|
|
@@ -286,7 +289,7 @@ var zConfiguredModel = z.object({
|
|
|
286
289
|
current_revision_id: zConfiguredModelRevisionId,
|
|
287
290
|
provider_model_slug: z.string(),
|
|
288
291
|
context_window_tokens: z.int(),
|
|
289
|
-
max_output_tokens: z.int(),
|
|
292
|
+
max_output_tokens: z.int().nullable(),
|
|
290
293
|
default_max_output_tokens: z.int().nullish(),
|
|
291
294
|
default_cache_retention: zModelCacheRetention.optional(),
|
|
292
295
|
supports_tools: z.boolean(),
|
|
@@ -640,7 +643,7 @@ var zAgentConfigModel = z.object({
|
|
|
640
643
|
api_format: zModelApiFormat,
|
|
641
644
|
api_variant: zModelProviderApiVariantResponse,
|
|
642
645
|
context_window_tokens: z.int(),
|
|
643
|
-
max_output_tokens: z.int(),
|
|
646
|
+
max_output_tokens: z.int().nullable(),
|
|
644
647
|
default_max_output_tokens: z.int().nullish(),
|
|
645
648
|
default_cache_retention: zModelCacheRetention,
|
|
646
649
|
supports_tools: z.boolean(),
|
|
@@ -8620,7 +8623,7 @@ function hasToolCalls(event) {
|
|
|
8620
8623
|
return event.event_kind === "model_output" && event.content_blocks.some((block) => block.type === "tool_call");
|
|
8621
8624
|
}
|
|
8622
8625
|
function isFinishedModelOutput(event) {
|
|
8623
|
-
return event.event_kind === "model_output" && !hasToolCalls(event);
|
|
8626
|
+
return event.event_kind === "model_output" && event.stop_reason !== "max_tokens" && !hasToolCalls(event);
|
|
8624
8627
|
}
|
|
8625
8628
|
function isControlEvent(event) {
|
|
8626
8629
|
return event.event_kind === "agent_input" && event.input_kind === "control";
|
|
@@ -10320,7 +10323,7 @@ function formatVoid(message = "ok") {
|
|
|
10320
10323
|
// src/machine-setup.ts
|
|
10321
10324
|
import { spawn as spawn2, spawnSync } from "node:child_process";
|
|
10322
10325
|
import { accessSync, constants, existsSync as existsSync2, readdirSync, readFileSync as readFileSync3 } from "node:fs";
|
|
10323
|
-
import { homedir as homedir2 } from "node:os";
|
|
10326
|
+
import { homedir as homedir2, release } from "node:os";
|
|
10324
10327
|
import { basename, dirname as dirname2, isAbsolute, join as join2, resolve } from "node:path";
|
|
10325
10328
|
import * as z18 from "zod";
|
|
10326
10329
|
var zMachineSetupBody = zConnectByoMachineRequest;
|
|
@@ -10382,7 +10385,8 @@ function daemonHome() {
|
|
|
10382
10385
|
}
|
|
10383
10386
|
var supportedPlatforms = /* @__PURE__ */ new Set(["darwin", "linux"]);
|
|
10384
10387
|
var supportedArchitectures = /* @__PURE__ */ new Set(["x64", "arm64"]);
|
|
10385
|
-
|
|
10388
|
+
var macOS13DarwinMajor = 22;
|
|
10389
|
+
function ensureSupportedPlatform(platform, architecture, osRelease) {
|
|
10386
10390
|
if (!supportedPlatforms.has(platform)) {
|
|
10387
10391
|
throw new CliInputError(`omnarad supports macOS and Linux; this machine reports ${platform}`);
|
|
10388
10392
|
}
|
|
@@ -10391,6 +10395,12 @@ function ensureSupportedPlatform(platform, architecture) {
|
|
|
10391
10395
|
`omnarad supports amd64 and arm64; this machine reports ${architecture}`
|
|
10392
10396
|
);
|
|
10393
10397
|
}
|
|
10398
|
+
if (platform === "darwin") {
|
|
10399
|
+
const darwinMajor = Number(osRelease.split(".")[0]);
|
|
10400
|
+
if (!Number.isInteger(darwinMajor) || darwinMajor < macOS13DarwinMajor) {
|
|
10401
|
+
throw new CliInputError("omnarad requires macOS 13 or later; update macOS before installing");
|
|
10402
|
+
}
|
|
10403
|
+
}
|
|
10394
10404
|
}
|
|
10395
10405
|
function isLoopbackHost(hostname2) {
|
|
10396
10406
|
if (hostname2 === "localhost" || hostname2 === "[::1]" || hostname2 === "::1") return true;
|
|
@@ -10456,7 +10466,7 @@ var DaemonExitError = class extends Error {
|
|
|
10456
10466
|
};
|
|
10457
10467
|
async function runMachineCreateLocal(context) {
|
|
10458
10468
|
const { report, apiUrl } = context;
|
|
10459
|
-
ensureSupportedPlatform(process.platform, process.arch);
|
|
10469
|
+
ensureSupportedPlatform(process.platform, process.arch, release());
|
|
10460
10470
|
ensureDaemonApiUrl(apiUrl);
|
|
10461
10471
|
const home = daemonHome();
|
|
10462
10472
|
const existing = describeExistingInstallation(home);
|
package/package.json
CHANGED