@automagik/omni 2.260705.17 → 2.260705.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.
package/dist/index.js CHANGED
@@ -72872,6 +72872,14 @@ var init_postgres_js = __esm(() => {
72872
72872
  });
72873
72873
 
72874
72874
  // ../db/src/client.ts
72875
+ import { readFileSync as readFileSync11 } from "fs";
72876
+ function resolveSslConfig(caFile, env2 = process.env) {
72877
+ const path = caFile || env2.DATABASE_SSL_CA_FILE;
72878
+ if (!path) {
72879
+ return;
72880
+ }
72881
+ return { ca: readFileSync11(path, "utf8"), rejectUnauthorized: true };
72882
+ }
72875
72883
  function getDefaultDatabaseUrl() {
72876
72884
  const url = process.env.DATABASE_URL;
72877
72885
  if (!url) {
@@ -72881,10 +72889,12 @@ function getDefaultDatabaseUrl() {
72881
72889
  }
72882
72890
  function createPostgresClient(config2) {
72883
72891
  const url = config2?.url ?? getDefaultDatabaseUrl();
72892
+ const ssl = resolveSslConfig(config2?.sslCaFile);
72884
72893
  const client = src_default(url, {
72885
72894
  max: config2?.maxConnections ?? 10,
72886
72895
  idle_timeout: config2?.idleTimeout ?? 20,
72887
- connect_timeout: config2?.connectTimeout ?? 10
72896
+ connect_timeout: config2?.connectTimeout ?? 10,
72897
+ ...ssl ? { ssl } : {}
72888
72898
  });
72889
72899
  sqlClient = client;
72890
72900
  return client;
@@ -125010,7 +125020,7 @@ import { fileURLToPath } from "url";
125010
125020
  // package.json
125011
125021
  var package_default = {
125012
125022
  name: "@automagik/omni",
125013
- version: "2.260705.17",
125023
+ version: "2.260705.19",
125014
125024
  description: "LLM-optimized CLI for Omni",
125015
125025
  type: "module",
125016
125026
  bin: {
@@ -135124,7 +135134,7 @@ init_output();
135124
135134
  init_src2();
135125
135135
  import { execFileSync as execFileSync4, execSync } from "child_process";
135126
135136
  import * as nodeCrypto2 from "crypto";
135127
- import { existsSync as existsSync15, mkdirSync as mkdirSync10, readFileSync as readFileSync11, writeFileSync as writeFileSync10 } from "fs";
135137
+ import { existsSync as existsSync15, mkdirSync as mkdirSync10, readFileSync as readFileSync12, writeFileSync as writeFileSync10 } from "fs";
135128
135138
  import { homedir as homedir11 } from "os";
135129
135139
  import { dirname as dirname6, resolve as resolve3 } from "path";
135130
135140
  import { createInterface as createInterface2 } from "readline";
@@ -135357,7 +135367,7 @@ var PLUGIN_MARKER = "plugin-openclaw/omni.ts";
135357
135367
  function readOpenClawConfig(configPath) {
135358
135368
  if (!existsSync15(configPath))
135359
135369
  return {};
135360
- const raw2 = readFileSync11(configPath, "utf-8").trim();
135370
+ const raw2 = readFileSync12(configPath, "utf-8").trim();
135361
135371
  if (!raw2)
135362
135372
  return {};
135363
135373
  return JSON.parse(raw2);
@@ -136451,7 +136461,7 @@ function createSayCommand() {
136451
136461
  }
136452
136462
 
136453
136463
  // src/commands/see.ts
136454
- import { existsSync as existsSync16, readFileSync as readFileSync12, statSync as statSync5 } from "fs";
136464
+ import { existsSync as existsSync16, readFileSync as readFileSync13, statSync as statSync5 } from "fs";
136455
136465
  import { extname as extname4 } from "path";
136456
136466
  init_output();
136457
136467
  var MIME_BY_EXT = {
@@ -136494,7 +136504,7 @@ function loadMedia(file) {
136494
136504
  error(`File is empty: ${file}`);
136495
136505
  }
136496
136506
  try {
136497
- return { buffer: readFileSync12(file), mimeType: guessMimeType(file) };
136507
+ return { buffer: readFileSync13(file), mimeType: guessMimeType(file) };
136498
136508
  } catch (err2) {
136499
136509
  const message2 = err2 instanceof Error ? err2.message : "Unknown error";
136500
136510
  return error(`Failed to read ${file}: ${message2}`);
@@ -136569,7 +136579,7 @@ function createSeeCommand() {
136569
136579
  }
136570
136580
 
136571
136581
  // src/commands/send.ts
136572
- import { existsSync as existsSync17, readFileSync as readFileSync13 } from "fs";
136582
+ import { existsSync as existsSync17, readFileSync as readFileSync14 } from "fs";
136573
136583
  import { basename as basename5, extname as extname5 } from "path";
136574
136584
  init_source();
136575
136585
  init_config();
@@ -136589,7 +136599,7 @@ function getMediaType2(path) {
136589
136599
  return "document";
136590
136600
  }
136591
136601
  function readFileAsBase64(path) {
136592
- const buffer3 = readFileSync13(path);
136602
+ const buffer3 = readFileSync14(path);
136593
136603
  return buffer3.toString("base64");
136594
136604
  }
136595
136605
  function parseLoadingMessages(value) {
@@ -137909,7 +137919,7 @@ async function cleanupLegacyArtifacts(skipList) {
137909
137919
  init_output();
137910
137920
 
137911
137921
  // src/update-diagnostics.ts
137912
- import { existsSync as existsSync19, mkdirSync as mkdirSync12, readFileSync as readFileSync14, writeFileSync as writeFileSync11 } from "fs";
137922
+ import { existsSync as existsSync19, mkdirSync as mkdirSync12, readFileSync as readFileSync15, writeFileSync as writeFileSync11 } from "fs";
137913
137923
  import { homedir as homedir13 } from "os";
137914
137924
  import { join as join18 } from "path";
137915
137925
  var UPDATE_DIAGNOSTICS_SCHEMA_VERSION = 1;
@@ -137944,7 +137954,7 @@ function tailFileLines(path, maxLines) {
137944
137954
  if (!existsSync19(path))
137945
137955
  return [];
137946
137956
  try {
137947
- const raw2 = readFileSync14(path, "utf8");
137957
+ const raw2 = readFileSync15(path, "utf8");
137948
137958
  const lines = raw2.split(/\r?\n/);
137949
137959
  if (lines.length > 0 && lines[lines.length - 1] === "")
137950
137960
  lines.pop();
@@ -138784,7 +138794,7 @@ init_config();
138784
138794
  init_output();
138785
138795
 
138786
138796
  // src/manifest-pin.ts
138787
- import { existsSync as existsSync21, readFileSync as readFileSync15, renameSync as renameSync3, writeFileSync as writeFileSync12 } from "fs";
138797
+ import { existsSync as existsSync21, readFileSync as readFileSync16, renameSync as renameSync3, writeFileSync as writeFileSync12 } from "fs";
138788
138798
  import { homedir as homedir14 } from "os";
138789
138799
  import { join as join20 } from "path";
138790
138800
  var PACKAGE_NAME2 = "@automagik/omni";
@@ -138794,7 +138804,7 @@ function pinManifestEntry(manifestPath, exactVersion) {
138794
138804
  return false;
138795
138805
  let manifest;
138796
138806
  try {
138797
- manifest = JSON.parse(readFileSync15(manifestPath, "utf-8"));
138807
+ manifest = JSON.parse(readFileSync16(manifestPath, "utf-8"));
138798
138808
  } catch {
138799
138809
  return false;
138800
138810
  }
@@ -225590,7 +225590,7 @@ var init_sentry_scrub = __esm(() => {
225590
225590
  var require_package7 = __commonJS((exports, module) => {
225591
225591
  module.exports = {
225592
225592
  name: "@omni/api",
225593
- version: "2.260705.17",
225593
+ version: "2.260705.19",
225594
225594
  type: "module",
225595
225595
  exports: {
225596
225596
  ".": {
@@ -281344,6 +281344,14 @@ var init_postgres_js = __esm(() => {
281344
281344
  });
281345
281345
 
281346
281346
  // ../db/src/client.ts
281347
+ import { readFileSync as readFileSync2 } from "fs";
281348
+ function resolveSslConfig(caFile, env2 = process.env) {
281349
+ const path = caFile || env2.DATABASE_SSL_CA_FILE;
281350
+ if (!path) {
281351
+ return;
281352
+ }
281353
+ return { ca: readFileSync2(path, "utf8"), rejectUnauthorized: true };
281354
+ }
281347
281355
  function getDefaultDatabaseUrl() {
281348
281356
  const url = process.env.DATABASE_URL;
281349
281357
  if (!url) {
@@ -281353,10 +281361,12 @@ function getDefaultDatabaseUrl() {
281353
281361
  }
281354
281362
  function createPostgresClient(config4) {
281355
281363
  const url = config4?.url ?? getDefaultDatabaseUrl();
281364
+ const ssl = resolveSslConfig(config4?.sslCaFile);
281356
281365
  const client = src_default6(url, {
281357
281366
  max: config4?.maxConnections ?? 10,
281358
281367
  idle_timeout: config4?.idleTimeout ?? 20,
281359
- connect_timeout: config4?.connectTimeout ?? 10
281368
+ connect_timeout: config4?.connectTimeout ?? 10,
281369
+ ...ssl ? { ssl } : {}
281360
281370
  });
281361
281371
  sqlClient = client;
281362
281372
  return client;
@@ -323222,7 +323232,7 @@ Messages:
323222
323232
  var init_prompts = () => {};
323223
323233
 
323224
323234
  // ../media-processing/src/processors/image.ts
323225
- import { readFileSync as readFileSync3 } from "fs";
323235
+ import { readFileSync as readFileSync4 } from "fs";
323226
323236
  function isTimeoutError(error3) {
323227
323237
  if (!(error3 instanceof Error))
323228
323238
  return false;
@@ -323277,7 +323287,7 @@ var init_image = __esm(() => {
323277
323287
  const prompt = options?.caption ? `${basePrompt}
323278
323288
 
323279
323289
  Additional context (caption): ${options.caption}` : basePrompt;
323280
- const imageData = readFileSync3(filePath);
323290
+ const imageData = readFileSync4(filePath);
323281
323291
  let result = await this.describeWithGemini(imageData, mimeType, prompt);
323282
323292
  if (!result.success && this.config.openaiApiKey) {
323283
323293
  this.log.info("Gemini description failed, trying OpenAI fallback...");
@@ -323442,7 +323452,7 @@ Additional context (caption): ${options.caption}` : basePrompt;
323442
323452
 
323443
323453
  // ../media-processing/src/processors/video.ts
323444
323454
  import { execFile as execFile4 } from "child_process";
323445
- import { readFileSync as readFileSync4, statSync as statSync2 } from "fs";
323455
+ import { readFileSync as readFileSync5, statSync as statSync2 } from "fs";
323446
323456
  import { promises as fs14 } from "fs";
323447
323457
  import { tmpdir as tmpdir10 } from "os";
323448
323458
  import { basename as basename5, join as join19 } from "path";
@@ -323548,7 +323558,7 @@ var init_video = __esm(() => {
323548
323558
  Additional context: ${options.caption}` : basePrompt;
323549
323559
  const prepared = await prepareVideoForGemini(filePath, mimeType, stats.size);
323550
323560
  try {
323551
- const videoData = readFileSync4(prepared.filePath);
323561
+ const videoData = readFileSync5(prepared.filePath);
323552
323562
  const result = await this.describeWithGemini(videoData, prepared.mimeType, prompt);
323553
323563
  result.processingTimeMs = Math.round(performance.now() - startTime2);
323554
323564
  if (result.success) {
@@ -332624,7 +332634,7 @@ var require_lib12 = __commonJS((exports, module) => {
332624
332634
  });
332625
332635
 
332626
332636
  // ../media-processing/src/processors/document.ts
332627
- import { readFileSync as readFileSync5 } from "fs";
332637
+ import { readFileSync as readFileSync6 } from "fs";
332628
332638
  var MIN_TEXT_LENGTH = 50, JSON_SUMMARIZE_THRESHOLD, JSON_MAX_ARRAY_EXAMPLES = 3, DocumentProcessor;
332629
332639
  var init_document = __esm(() => {
332630
332640
  init_dist3();
@@ -332692,7 +332702,7 @@ var init_document = __esm(() => {
332692
332702
  async processPdf(filePath, ocrPrompt) {
332693
332703
  try {
332694
332704
  const pdfParse = (await import("pdf-parse")).default;
332695
- const dataBuffer = readFileSync5(filePath);
332705
+ const dataBuffer = readFileSync6(filePath);
332696
332706
  const data = await pdfParse(dataBuffer);
332697
332707
  const text3 = data.text?.trim() ?? "";
332698
332708
  if (text3.length < MIN_TEXT_LENGTH) {
@@ -332783,7 +332793,7 @@ ${csv}`);
332783
332793
  }
332784
332794
  async processExcelOoxmlFallback(filePath) {
332785
332795
  const JSZip = (await Promise.resolve().then(() => __toESM(require_lib12(), 1))).default;
332786
- const zip = await JSZip.loadAsync(readFileSync5(filePath));
332796
+ const zip = await JSZip.loadAsync(readFileSync6(filePath));
332787
332797
  const sharedStringsXml = await this.getZipText(zip, "xl/sharedStrings.xml");
332788
332798
  const sharedStrings = sharedStringsXml ? this.parseSharedStrings(sharedStringsXml) : [];
332789
332799
  const sheetNames = await this.parseWorkbookSheetNames(zip);
@@ -332900,7 +332910,7 @@ ${rows.join(`
332900
332910
  }
332901
332911
  async processCsv(filePath) {
332902
332912
  try {
332903
- const content = readFileSync5(filePath, "utf-8");
332913
+ const content = readFileSync6(filePath, "utf-8");
332904
332914
  return {
332905
332915
  success: true,
332906
332916
  content,
@@ -332918,7 +332928,7 @@ ${rows.join(`
332918
332928
  }
332919
332929
  async processText(filePath, isMarkdown) {
332920
332930
  try {
332921
- const content = readFileSync5(filePath, "utf-8");
332931
+ const content = readFileSync6(filePath, "utf-8");
332922
332932
  return {
332923
332933
  success: true,
332924
332934
  content,
@@ -332936,7 +332946,7 @@ ${rows.join(`
332936
332946
  }
332937
332947
  async processJson(filePath) {
332938
332948
  try {
332939
- const content = readFileSync5(filePath, "utf-8");
332949
+ const content = readFileSync6(filePath, "utf-8");
332940
332950
  const data = JSON.parse(content);
332941
332951
  if (content.length < JSON_SUMMARIZE_THRESHOLD) {
332942
332952
  return {
@@ -333056,7 +333066,7 @@ ${rows.join(`
333056
333066
  const timeouts = getMediaTimeouts();
333057
333067
  try {
333058
333068
  const { text: text3, inputTokens, outputTokens } = await this.executeWithResilience("gemini", async () => {
333059
- const pdfData = readFileSync5(filePath);
333069
+ const pdfData = readFileSync6(filePath);
333060
333070
  const result = await model.generateContent([
333061
333071
  {
333062
333072
  inlineData: {
@@ -343846,7 +343856,7 @@ var init_timeout = __esm(() => {
343846
343856
  });
343847
343857
 
343848
343858
  // ../api/src/middleware/version-headers.ts
343849
- import { existsSync as existsSync5, readFileSync as readFileSync6 } from "fs";
343859
+ import { existsSync as existsSync5, readFileSync as readFileSync7 } from "fs";
343850
343860
  import { join as join24 } from "path";
343851
343861
  function loadRepoPackageVersion() {
343852
343862
  try {
@@ -343856,7 +343866,7 @@ function loadRepoPackageVersion() {
343856
343866
  ]) {
343857
343867
  if (!existsSync5(candidate))
343858
343868
  continue;
343859
- const parsed = JSON.parse(readFileSync6(candidate, "utf-8"));
343869
+ const parsed = JSON.parse(readFileSync7(candidate, "utf-8"));
343860
343870
  if (parsed.version)
343861
343871
  return parsed.version;
343862
343872
  }
@@ -343880,7 +343890,7 @@ function loadServerVersionInfo() {
343880
343890
  if (!existsSync5(candidate)) {
343881
343891
  continue;
343882
343892
  }
343883
- const parsed = JSON.parse(readFileSync6(candidate, "utf-8"));
343893
+ const parsed = JSON.parse(readFileSync7(candidate, "utf-8"));
343884
343894
  return {
343885
343895
  version: parsed.version ?? resolveFallbackVersion(),
343886
343896
  commit: parsed.commit ?? FALLBACK_COMMIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/omni",
3
- "version": "2.260705.17",
3
+ "version": "2.260705.19",
4
4
  "description": "LLM-optimized CLI for Omni",
5
5
  "type": "module",
6
6
  "bin": {