omnius 1.0.6 → 1.0.8
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 +47 -40
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -86423,8 +86423,8 @@ var require_follow_redirects = __commonJS({
|
|
|
86423
86423
|
}
|
|
86424
86424
|
return parsed;
|
|
86425
86425
|
}
|
|
86426
|
-
function resolveUrl(
|
|
86427
|
-
return useNativeURL ? new URL3(
|
|
86426
|
+
function resolveUrl(relative15, base3) {
|
|
86427
|
+
return useNativeURL ? new URL3(relative15, base3) : parseUrl(url.resolve(base3, relative15));
|
|
86428
86428
|
}
|
|
86429
86429
|
function validateUrl(input) {
|
|
86430
86430
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
@@ -245198,21 +245198,21 @@ var require_pattern = __commonJS({
|
|
|
245198
245198
|
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
245199
245199
|
function partitionAbsoluteAndRelative(patterns) {
|
|
245200
245200
|
const absolute = [];
|
|
245201
|
-
const
|
|
245201
|
+
const relative15 = [];
|
|
245202
245202
|
for (const pattern of patterns) {
|
|
245203
|
-
if (
|
|
245203
|
+
if (isAbsolute7(pattern)) {
|
|
245204
245204
|
absolute.push(pattern);
|
|
245205
245205
|
} else {
|
|
245206
|
-
|
|
245206
|
+
relative15.push(pattern);
|
|
245207
245207
|
}
|
|
245208
245208
|
}
|
|
245209
|
-
return [absolute,
|
|
245209
|
+
return [absolute, relative15];
|
|
245210
245210
|
}
|
|
245211
245211
|
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
245212
|
-
function
|
|
245212
|
+
function isAbsolute7(pattern) {
|
|
245213
245213
|
return path11.isAbsolute(pattern);
|
|
245214
245214
|
}
|
|
245215
|
-
exports.isAbsolute =
|
|
245215
|
+
exports.isAbsolute = isAbsolute7;
|
|
245216
245216
|
}
|
|
245217
245217
|
});
|
|
245218
245218
|
|
|
@@ -259304,7 +259304,7 @@ var require_util9 = __commonJS({
|
|
|
259304
259304
|
}
|
|
259305
259305
|
path11 = url.path;
|
|
259306
259306
|
}
|
|
259307
|
-
var
|
|
259307
|
+
var isAbsolute7 = exports.isAbsolute(path11);
|
|
259308
259308
|
var parts = path11.split(/\/+/);
|
|
259309
259309
|
for (var part, up = 0, i2 = parts.length - 1; i2 >= 0; i2--) {
|
|
259310
259310
|
part = parts[i2];
|
|
@@ -259324,7 +259324,7 @@ var require_util9 = __commonJS({
|
|
|
259324
259324
|
}
|
|
259325
259325
|
path11 = parts.join("/");
|
|
259326
259326
|
if (path11 === "") {
|
|
259327
|
-
path11 =
|
|
259327
|
+
path11 = isAbsolute7 ? "/" : ".";
|
|
259328
259328
|
}
|
|
259329
259329
|
if (url) {
|
|
259330
259330
|
url.path = path11;
|
|
@@ -259369,7 +259369,7 @@ var require_util9 = __commonJS({
|
|
|
259369
259369
|
exports.isAbsolute = function(aPath) {
|
|
259370
259370
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
259371
259371
|
};
|
|
259372
|
-
function
|
|
259372
|
+
function relative15(aRoot, aPath) {
|
|
259373
259373
|
if (aRoot === "") {
|
|
259374
259374
|
aRoot = ".";
|
|
259375
259375
|
}
|
|
@@ -259388,7 +259388,7 @@ var require_util9 = __commonJS({
|
|
|
259388
259388
|
}
|
|
259389
259389
|
return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
|
|
259390
259390
|
}
|
|
259391
|
-
exports.relative =
|
|
259391
|
+
exports.relative = relative15;
|
|
259392
259392
|
var supportsNullProto = (function() {
|
|
259393
259393
|
var obj = /* @__PURE__ */ Object.create(null);
|
|
259394
259394
|
return !("__proto__" in obj);
|
|
@@ -270819,11 +270819,11 @@ ${lanes.join("\n")}
|
|
|
270819
270819
|
return toComponents2;
|
|
270820
270820
|
}
|
|
270821
270821
|
const components = toComponents2.slice(start2);
|
|
270822
|
-
const
|
|
270822
|
+
const relative15 = [];
|
|
270823
270823
|
for (; start2 < fromComponents.length; start2++) {
|
|
270824
|
-
|
|
270824
|
+
relative15.push("..");
|
|
270825
270825
|
}
|
|
270826
|
-
return ["", ...
|
|
270826
|
+
return ["", ...relative15, ...components];
|
|
270827
270827
|
}
|
|
270828
270828
|
function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) {
|
|
270829
270829
|
Debug.assert(getRootLength(fromDirectory) > 0 === getRootLength(to) > 0, "Paths must either both be absolute or both be relative");
|
|
@@ -315366,9 +315366,9 @@ ${lanes.join("\n")}
|
|
|
315366
315366
|
if (!startsWithDirectory(target, realPathDirectory, getCanonicalFileName)) {
|
|
315367
315367
|
return;
|
|
315368
315368
|
}
|
|
315369
|
-
const
|
|
315369
|
+
const relative15 = getRelativePathFromDirectory(realPathDirectory, target, getCanonicalFileName);
|
|
315370
315370
|
for (const symlinkDirectory of symlinkDirectories) {
|
|
315371
|
-
const option = resolvePath(symlinkDirectory,
|
|
315371
|
+
const option = resolvePath(symlinkDirectory, relative15);
|
|
315372
315372
|
const result2 = cb(option, target === referenceRedirect);
|
|
315373
315373
|
shouldFilterIgnoredPaths = true;
|
|
315374
315374
|
if (result2) return result2;
|
|
@@ -474939,15 +474939,15 @@ var require_path_browserify = __commonJS({
|
|
|
474939
474939
|
normalize: function normalize2(path11) {
|
|
474940
474940
|
assertPath(path11);
|
|
474941
474941
|
if (path11.length === 0) return ".";
|
|
474942
|
-
var
|
|
474942
|
+
var isAbsolute7 = path11.charCodeAt(0) === 47;
|
|
474943
474943
|
var trailingSeparator = path11.charCodeAt(path11.length - 1) === 47;
|
|
474944
|
-
path11 = normalizeStringPosix(path11, !
|
|
474945
|
-
if (path11.length === 0 && !
|
|
474944
|
+
path11 = normalizeStringPosix(path11, !isAbsolute7);
|
|
474945
|
+
if (path11.length === 0 && !isAbsolute7) path11 = ".";
|
|
474946
474946
|
if (path11.length > 0 && trailingSeparator) path11 += "/";
|
|
474947
|
-
if (
|
|
474947
|
+
if (isAbsolute7) return "/" + path11;
|
|
474948
474948
|
return path11;
|
|
474949
474949
|
},
|
|
474950
|
-
isAbsolute: function
|
|
474950
|
+
isAbsolute: function isAbsolute7(path11) {
|
|
474951
474951
|
assertPath(path11);
|
|
474952
474952
|
return path11.length > 0 && path11.charCodeAt(0) === 47;
|
|
474953
474953
|
},
|
|
@@ -474969,7 +474969,7 @@ var require_path_browserify = __commonJS({
|
|
|
474969
474969
|
return ".";
|
|
474970
474970
|
return posix.normalize(joined);
|
|
474971
474971
|
},
|
|
474972
|
-
relative: function
|
|
474972
|
+
relative: function relative15(from3, to) {
|
|
474973
474973
|
assertPath(from3);
|
|
474974
474974
|
assertPath(to);
|
|
474975
474975
|
if (from3 === to) return "";
|
|
@@ -475161,9 +475161,9 @@ var require_path_browserify = __commonJS({
|
|
|
475161
475161
|
var ret = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
475162
475162
|
if (path11.length === 0) return ret;
|
|
475163
475163
|
var code8 = path11.charCodeAt(0);
|
|
475164
|
-
var
|
|
475164
|
+
var isAbsolute7 = code8 === 47;
|
|
475165
475165
|
var start2;
|
|
475166
|
-
if (
|
|
475166
|
+
if (isAbsolute7) {
|
|
475167
475167
|
ret.root = "/";
|
|
475168
475168
|
start2 = 1;
|
|
475169
475169
|
} else {
|
|
@@ -475199,11 +475199,11 @@ var require_path_browserify = __commonJS({
|
|
|
475199
475199
|
preDotState === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
475200
475200
|
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
|
|
475201
475201
|
if (end !== -1) {
|
|
475202
|
-
if (startPart === 0 &&
|
|
475202
|
+
if (startPart === 0 && isAbsolute7) ret.base = ret.name = path11.slice(1, end);
|
|
475203
475203
|
else ret.base = ret.name = path11.slice(startPart, end);
|
|
475204
475204
|
}
|
|
475205
475205
|
} else {
|
|
475206
|
-
if (startPart === 0 &&
|
|
475206
|
+
if (startPart === 0 && isAbsolute7) {
|
|
475207
475207
|
ret.name = path11.slice(1, startDot);
|
|
475208
475208
|
ret.base = path11.slice(1, end);
|
|
475209
475209
|
} else {
|
|
@@ -475213,7 +475213,7 @@ var require_path_browserify = __commonJS({
|
|
|
475213
475213
|
ret.ext = path11.slice(startDot, end);
|
|
475214
475214
|
}
|
|
475215
475215
|
if (startPart > 0) ret.dir = path11.slice(0, startPart - 1);
|
|
475216
|
-
else if (
|
|
475216
|
+
else if (isAbsolute7) ret.dir = "/";
|
|
475217
475217
|
return ret;
|
|
475218
475218
|
},
|
|
475219
475219
|
sep: "/",
|
|
@@ -477799,12 +477799,12 @@ var require_dist3 = __commonJS({
|
|
|
477799
477799
|
return patterns.length > 0 ? buildCrawler(options2, patterns) : [];
|
|
477800
477800
|
}
|
|
477801
477801
|
async function glob3(globInput, options2) {
|
|
477802
|
-
const [crawler,
|
|
477803
|
-
return crawler ? formatPaths(await crawler.withPromise(),
|
|
477802
|
+
const [crawler, relative15] = getCrawler(globInput, options2);
|
|
477803
|
+
return crawler ? formatPaths(await crawler.withPromise(), relative15) : [];
|
|
477804
477804
|
}
|
|
477805
477805
|
function globSync(globInput, options2) {
|
|
477806
|
-
const [crawler,
|
|
477807
|
-
return crawler ? formatPaths(crawler.sync(),
|
|
477806
|
+
const [crawler, relative15] = getCrawler(globInput, options2);
|
|
477807
|
+
return crawler ? formatPaths(crawler.sync(), relative15) : [];
|
|
477808
477808
|
}
|
|
477809
477809
|
exports.convertPathToPattern = convertPathToPattern;
|
|
477810
477810
|
exports.escapePath = escapePath;
|
|
@@ -593612,11 +593612,11 @@ function runProcess3(command, args, cwd4, timeoutMs) {
|
|
|
593612
593612
|
child.stderr?.on("data", (chunk) => {
|
|
593613
593613
|
stderr += chunk.toString();
|
|
593614
593614
|
});
|
|
593615
|
-
child
|
|
593615
|
+
onChildError(child, (err) => {
|
|
593616
593616
|
clearTimeout(timer);
|
|
593617
593617
|
resolveProcess({ code: 127, stdout, stderr: stderr + String(err.message || err) });
|
|
593618
593618
|
});
|
|
593619
|
-
child
|
|
593619
|
+
onChildClose(child, (code8) => {
|
|
593620
593620
|
clearTimeout(timer);
|
|
593621
593621
|
resolveProcess({ code: code8, stdout, stderr });
|
|
593622
593622
|
});
|
|
@@ -593626,6 +593626,7 @@ var MANIFEST_FILE, PATH_KEYS, MEDIA_PATH_RE, CreativeAudioFileTool;
|
|
|
593626
593626
|
var init_telegram_creative_tools = __esm({
|
|
593627
593627
|
"packages/cli/src/tui/telegram-creative-tools.ts"() {
|
|
593628
593628
|
"use strict";
|
|
593629
|
+
init_typed_node_events();
|
|
593629
593630
|
init_dist5();
|
|
593630
593631
|
MANIFEST_FILE = ".omnius-creative-manifest.json";
|
|
593631
593632
|
PATH_KEYS = ["path", "file", "file_path", "filename", "filepath", "filePath"];
|
|
@@ -593842,8 +593843,8 @@ var init_vision_ingress = __esm({
|
|
|
593842
593843
|
});
|
|
593843
593844
|
|
|
593844
593845
|
// packages/cli/src/tui/telegram-bridge.ts
|
|
593845
|
-
import { mkdirSync as mkdirSync60, existsSync as existsSync105, unlinkSync as unlinkSync21, readFileSync as readFileSync86, writeFileSync as writeFileSync57 } from "node:fs";
|
|
593846
|
-
import { join as join120, resolve as resolve39, basename as basename22 } from "node:path";
|
|
593846
|
+
import { mkdirSync as mkdirSync60, existsSync as existsSync105, unlinkSync as unlinkSync21, statSync as statSync35, readFileSync as readFileSync86, writeFileSync as writeFileSync57 } from "node:fs";
|
|
593847
|
+
import { join as join120, resolve as resolve39, basename as basename22, relative as relative13, isAbsolute as isAbsolute6 } from "node:path";
|
|
593847
593848
|
import { writeFile as writeFileAsync } from "node:fs/promises";
|
|
593848
593849
|
import { createHash as createHash19, randomInt } from "node:crypto";
|
|
593849
593850
|
function parseTelegramInteractionDecision(text, forcedRoute, options2 = {}) {
|
|
@@ -594407,6 +594408,10 @@ function telegramImageMime(media) {
|
|
|
594407
594408
|
if (ext === ".tif" || ext === ".tiff") return "image/tiff";
|
|
594408
594409
|
return "image/jpeg";
|
|
594409
594410
|
}
|
|
594411
|
+
function isPathInside(root, path11) {
|
|
594412
|
+
const rel = relative13(resolve39(root), resolve39(path11));
|
|
594413
|
+
return rel === "" || Boolean(rel) && !rel.startsWith("..") && !isAbsolute6(rel);
|
|
594414
|
+
}
|
|
594410
594415
|
function extractTelegramMentionedUsernames(message2, text) {
|
|
594411
594416
|
const usernames = /* @__PURE__ */ new Set();
|
|
594412
594417
|
const entities = [
|
|
@@ -596888,6 +596893,7 @@ Content-Type: ${contentType}\r
|
|
|
596888
596893
|
async sendGeneratedArtifactsFromSubAgent(msg, subAgent, finalText, includeMentioned) {
|
|
596889
596894
|
const root = subAgent.creativeWorkspaceRoot;
|
|
596890
596895
|
if (!root) return;
|
|
596896
|
+
const rootAbs = resolve39(root);
|
|
596891
596897
|
const paths = new Set(subAgent.generatedArtifacts);
|
|
596892
596898
|
for (const path11 of collectGeneratedArtifactPathsFromText(finalText, root)) {
|
|
596893
596899
|
paths.add(path11);
|
|
@@ -596898,8 +596904,9 @@ Content-Type: ${contentType}\r
|
|
|
596898
596904
|
);
|
|
596899
596905
|
for (const path11 of paths) {
|
|
596900
596906
|
const abs = resolve39(path11);
|
|
596907
|
+
if (!isPathInside(rootAbs, abs)) continue;
|
|
596901
596908
|
if (!includeMentioned && alreadySentByText.has(abs)) continue;
|
|
596902
|
-
if (!existsSync105(abs)) continue;
|
|
596909
|
+
if (!existsSync105(abs) || !statSync35(abs).isFile()) continue;
|
|
596903
596910
|
const kind = classifyMedia(abs) ?? "document";
|
|
596904
596911
|
await this.sendMediaReference(msg.chatId, {
|
|
596905
596912
|
original: abs,
|
|
@@ -621377,7 +621384,7 @@ var init_clipboard_media = __esm({
|
|
|
621377
621384
|
|
|
621378
621385
|
// packages/cli/src/tui/interactive.ts
|
|
621379
621386
|
import { cwd } from "node:process";
|
|
621380
|
-
import { resolve as resolve44, join as join136, dirname as dirname38, extname as extname13, relative as
|
|
621387
|
+
import { resolve as resolve44, join as join136, dirname as dirname38, extname as extname13, relative as relative14 } from "node:path";
|
|
621381
621388
|
import { createRequire as createRequire7 } from "node:module";
|
|
621382
621389
|
import { fileURLToPath as fileURLToPath18 } from "node:url";
|
|
621383
621390
|
import {
|
|
@@ -622413,7 +622420,7 @@ async function renderAsciiPreviewForToolResult(toolName, output, repoRoot, write
|
|
|
622413
622420
|
const { extractSavedImagePath: extractSavedImagePath2 } = await Promise.resolve().then(() => (init_image_ascii_preview(), image_ascii_preview_exports));
|
|
622414
622421
|
const imagePath = extractSavedImagePath2(output, repoRoot);
|
|
622415
622422
|
if (!imagePath) return;
|
|
622416
|
-
const displayPath =
|
|
622423
|
+
const displayPath = relative14(repoRoot, imagePath).startsWith("..") ? imagePath : relative14(repoRoot, imagePath);
|
|
622417
622424
|
const title = toolName === "generate_image" ? "Generated image" : toolName === "screenshot" ? "Screenshot" : toolName === "camera_capture" ? "Camera frame" : "Image";
|
|
622418
622425
|
await renderAsciiPreviewForImage(imagePath, displayPath, title, writer);
|
|
622419
622426
|
} catch {
|
|
@@ -626414,7 +626421,7 @@ Log: ${nexusLogPath}`)
|
|
|
626414
626421
|
const { pasteClipboardImageToFile: pasteClipboardImageToFile2 } = await Promise.resolve().then(() => (init_clipboard_media(), clipboard_media_exports));
|
|
626415
626422
|
const pasted = pasteClipboardImageToFile2(repoRoot);
|
|
626416
626423
|
if (!pasted) return { ok: false, message: "Clipboard does not contain a supported image or no clipboard reader is available." };
|
|
626417
|
-
const relPath =
|
|
626424
|
+
const relPath = relative14(repoRoot, pasted.path).startsWith("..") ? pasted.path : relative14(repoRoot, pasted.path);
|
|
626418
626425
|
const asciiContextPromise = renderAsciiPreviewForImage(
|
|
626419
626426
|
pasted.path,
|
|
626420
626427
|
relPath,
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.8",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "CC-BY-NC-4.0",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED