@automagik/omni 2.260320.2 → 2.260321.1

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
@@ -27766,6 +27766,11 @@ function dim(text) {
27766
27766
  function raw(text) {
27767
27767
  console.log(text);
27768
27768
  }
27769
+ function flushStdout() {
27770
+ return new Promise((resolve) => {
27771
+ process.stdout.write("", () => resolve());
27772
+ });
27773
+ }
27769
27774
 
27770
27775
  // src/version.ts
27771
27776
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
@@ -27774,7 +27779,7 @@ import { fileURLToPath } from "url";
27774
27779
  // package.json
27775
27780
  var package_default = {
27776
27781
  name: "@automagik/omni",
27777
- version: "2.260320.2",
27782
+ version: "2.260321.1",
27778
27783
  description: "LLM-optimized CLI for Omni v2",
27779
27784
  type: "module",
27780
27785
  bin: {
@@ -41750,6 +41755,7 @@ class GenieClient {
41750
41755
  hasTemplates;
41751
41756
  autoSpawn;
41752
41757
  autoSpawnDir;
41758
+ sessionName;
41753
41759
  agentRole;
41754
41760
  knownTeams = new Map;
41755
41761
  pendingTeams = new Set;
@@ -41760,6 +41766,7 @@ class GenieClient {
41760
41766
  this.agentRole = config2.agentRole;
41761
41767
  this.autoSpawn = config2.autoSpawn ?? true;
41762
41768
  this.autoSpawnDir = config2.autoSpawnDir ?? "";
41769
+ this.sessionName = config2.sessionName ?? "";
41763
41770
  this.hasTemplates = /\{\w+\}/.test(this.teamNameTemplate) || /\{\w+\}/.test(this.agentNameTemplate) || /\{\w+\}/.test(this.targetAgentTemplate);
41764
41771
  }
41765
41772
  isTeamKnown(teamName) {
@@ -41831,6 +41838,9 @@ class GenieClient {
41831
41838
  if (this.autoSpawnDir) {
41832
41839
  args.push("--cwd", this.autoSpawnDir);
41833
41840
  }
41841
+ if (this.sessionName) {
41842
+ args.push("--session", this.sessionName);
41843
+ }
41834
41844
  log7.info("Auto-spawning agent session", { teamName, agentRole: this.agentRole, args });
41835
41845
  try {
41836
41846
  await execFilePromise("genie", args);
@@ -45285,3 +45295,4 @@ if (isRootVersionOnly) {
45285
45295
  process.exit(0);
45286
45296
  }
45287
45297
  await program2.parseAsync(process.argv);
45298
+ await flushStdout();
package/dist/output.d.ts CHANGED
@@ -36,4 +36,11 @@ export declare function header(title: string): void;
36
36
  export declare function dim(text: string): void;
37
37
  /** Raw console.log (for custom formatting) */
38
38
  export declare function raw(text: string): void;
39
+ /**
40
+ * Flush stdout to ensure all buffered data is written.
41
+ * When stdout is a pipe (e.g., `--json | jq`), writes are buffered.
42
+ * Without explicit flushing, the process can exit before all data is written,
43
+ * causing truncated output.
44
+ */
45
+ export declare function flushStdout(): Promise<void>;
39
46
  //# sourceMappingURL=output.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,2CAA2C;AAC3C,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAED,kCAAkC;AAClC,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAWD,yBAAyB;AACzB,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,CAAC;AAE5C,4BAA4B;AAC5B,wBAAgB,gBAAgB,IAAI,YAAY,CAE/C;AAED,6BAA6B;AAC7B,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAc7D;AAED,oCAAoC;AACpC,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,QAAQ,SAAI,GAAG,KAAK,CAgB7E;AAED,6BAA6B;AAC7B,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAU1C;AAED,0BAA0B;AAC1B,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAU1C;AAED,gCAAgC;AAChC,wBAAgB,IAAI,CA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A6B;AAC7B,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAU1C;AAED,0BAA0B;AAC1B,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAU1C;AAED,gCAAgC;AAChC,wBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAgBzC;AAKD,6DAA6D;AAC7D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED,4GAA4G;AAC5G,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAA;CAAE,GAAG,IAAI,CAgBlG;AA2FD,6BAA6B;AAC7B,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAU1D;AAED,6BAA6B;AAC7B,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAK1C;AAED,kCAAkC;AAClC,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAKtC;AAED,8CAA8C;AAC9C,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAGtC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAM3C"}
@@ -29514,6 +29514,7 @@ class GenieClient {
29514
29514
  hasTemplates;
29515
29515
  autoSpawn;
29516
29516
  autoSpawnDir;
29517
+ sessionName;
29517
29518
  agentRole;
29518
29519
  knownTeams = new Map;
29519
29520
  pendingTeams = new Set;
@@ -29524,6 +29525,7 @@ class GenieClient {
29524
29525
  this.agentRole = config2.agentRole;
29525
29526
  this.autoSpawn = config2.autoSpawn ?? true;
29526
29527
  this.autoSpawnDir = config2.autoSpawnDir ?? "";
29528
+ this.sessionName = config2.sessionName ?? "";
29527
29529
  this.hasTemplates = /\{\w+\}/.test(this.teamNameTemplate) || /\{\w+\}/.test(this.agentNameTemplate) || /\{\w+\}/.test(this.targetAgentTemplate);
29528
29530
  }
29529
29531
  isTeamKnown(teamName) {
@@ -29595,6 +29597,9 @@ class GenieClient {
29595
29597
  if (this.autoSpawnDir) {
29596
29598
  args.push("--cwd", this.autoSpawnDir);
29597
29599
  }
29600
+ if (this.sessionName) {
29601
+ args.push("--session", this.sessionName);
29602
+ }
29598
29603
  log7.info("Auto-spawning agent session", { teamName, agentRole: this.agentRole, args });
29599
29604
  try {
29600
29605
  await execFilePromise("genie", args);
@@ -222917,7 +222922,7 @@ var init_sentry_scrub = __esm(() => {
222917
222922
  var require_package8 = __commonJS((exports, module) => {
222918
222923
  module.exports = {
222919
222924
  name: "@omni/api",
222920
- version: "2.260320.2",
222925
+ version: "2.260321.1",
222921
222926
  type: "module",
222922
222927
  exports: {
222923
222928
  ".": {
@@ -238282,8 +238287,11 @@ class AccessService {
238282
238287
  return phone.replace(/^\+/, "");
238283
238288
  }
238284
238289
  ruleMatches(rule, platformUserId) {
238285
- if (rule.platformUserId && rule.platformUserId === platformUserId) {
238286
- return true;
238290
+ if (rule.platformUserId) {
238291
+ const normalizeJid2 = (id) => id.replace(/@.*$/, "");
238292
+ if (normalizeJid2(rule.platformUserId) === normalizeJid2(platformUserId)) {
238293
+ return true;
238294
+ }
238287
238295
  }
238288
238296
  if (rule.phonePattern) {
238289
238297
  const normalizedPattern = this.normalizePhone(rule.phonePattern);
@@ -318364,6 +318372,9 @@ class MediaProcessingService {
318364
318372
  hasOpenAI: !!config4.openaiApiKey,
318365
318373
  hasGemini: !!config4.geminiApiKey
318366
318374
  });
318375
+ if (!config4.geminiApiKey && !config4.openaiApiKey) {
318376
+ log61.warn("No vision API configured \u2014 set GEMINI_API_KEY or OPENAI_API_KEY in .env for image/video/document processing");
318377
+ }
318367
318378
  }
318368
318379
  async process(filePath, mimeType, options) {
318369
318380
  const processor = this.findProcessor(mimeType);
@@ -339209,7 +339220,8 @@ function createGenieProviderInstance(provider, instance4) {
339209
339220
  const teamName = typeof schemaConfig.teamName === "string" ? schemaConfig.teamName : "genie";
339210
339221
  const agentRole = typeof schemaConfig.agentRole === "string" ? schemaConfig.agentRole : "team-lead";
339211
339222
  const autoSpawnDir = typeof schemaConfig.autoSpawnDir === "string" ? schemaConfig.autoSpawnDir : undefined;
339212
- const client = createGenieClient({ teamName, agentName, targetAgent, agentRole, autoSpawnDir });
339223
+ const sessionName = typeof schemaConfig.sessionName === "string" ? schemaConfig.sessionName : undefined;
339224
+ const client = createGenieClient({ teamName, agentName, targetAgent, agentRole, autoSpawnDir, sessionName });
339213
339225
  return new GenieAgentProvider(provider.id, provider.name, client, {
339214
339226
  prefixSenderName: instance4.agentPrefixSenderName ?? true
339215
339227
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/omni",
3
- "version": "2.260320.2",
3
+ "version": "2.260321.1",
4
4
  "description": "LLM-optimized CLI for Omni v2",
5
5
  "type": "module",
6
6
  "bin": {