evil-omo 3.16.1 → 3.17.4
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/LICENSE.md +82 -82
- package/README.ja.md +357 -353
- package/README.ko.md +351 -347
- package/README.md +51 -51
- package/README.ru.md +378 -374
- package/README.zh-cn.md +356 -352
- package/bin/evil-omo.js +201 -201
- package/bin/platform.d.ts +14 -14
- package/bin/platform.js +82 -82
- package/bin/platform.test.ts +218 -218
- package/dist/agents/gpt-apply-patch-guard.d.ts +2 -0
- package/dist/agents/hephaestus/gpt-5-3-codex.d.ts +0 -1
- package/dist/cli/doctor/checks/system.d.ts +15 -2
- package/dist/cli/doctor/spawn-with-timeout.d.ts +8 -0
- package/dist/cli/index.js +7193 -1032
- package/dist/cli/install-validators.d.ts +1 -0
- package/dist/cli/model-fallback-types.d.ts +1 -0
- package/dist/cli/provider-model-id-transform.d.ts +1 -1
- package/dist/cli/types.d.ts +3 -0
- package/dist/config/schema/agent-definitions.d.ts +3 -0
- package/dist/config/schema/evil-omo-config.d.ts +11 -2
- package/dist/create-tools.d.ts +2 -1
- package/dist/evil-omo.schema.json +24 -1
- package/dist/features/background-agent/index.d.ts +2 -0
- package/dist/features/background-agent/session-existence.d.ts +1 -1
- package/dist/features/background-agent/subagent-spawn-limits.d.ts +1 -1
- package/dist/features/background-agent/task-poller.d.ts +1 -0
- package/dist/features/background-agent/wait-for-task-session.d.ts +17 -0
- package/dist/features/builtin-commands/commands.d.ts +2 -1
- package/dist/features/claude-code-agent-loader/agent-definitions-loader.d.ts +3 -0
- package/dist/features/claude-code-agent-loader/index.d.ts +3 -0
- package/dist/features/claude-code-agent-loader/json-agent-loader.d.ts +2 -0
- package/dist/features/claude-code-agent-loader/loader.d.ts +2 -0
- package/dist/features/claude-code-agent-loader/opencode-config-agents-reader.d.ts +2 -0
- package/dist/features/claude-code-agent-loader/types.d.ts +9 -1
- package/dist/features/skill-mcp-manager/connection.d.ts +3 -4
- package/dist/features/skill-mcp-manager/http-client.d.ts +17 -3
- package/dist/features/skill-mcp-manager/manager.d.ts +2 -3
- package/dist/features/skill-mcp-manager/stdio-client.d.ts +16 -3
- package/dist/features/skill-mcp-manager/types.d.ts +16 -6
- package/dist/features/tmux-subagent/manager.d.ts +1 -0
- package/dist/features/tool-metadata-store/index.d.ts +7 -0
- package/dist/features/tool-metadata-store/publish-tool-metadata.d.ts +9 -0
- package/dist/features/tool-metadata-store/recover-tool-metadata.d.ts +3 -0
- package/dist/features/tool-metadata-store/resolve-tool-call-id.d.ts +6 -0
- package/dist/features/tool-metadata-store/task-metadata-contract.d.ts +10 -0
- package/dist/hooks/atlas/session-last-agent.d.ts +10 -1
- package/dist/hooks/atlas/system-reminder-templates.d.ts +2 -2
- package/dist/hooks/auto-update-checker/constants.d.ts +17 -2
- package/dist/hooks/auto-update-checker/hook.d.ts +22 -1
- package/dist/hooks/comment-checker/cli-runner.d.ts +4 -1
- package/dist/hooks/directory-agents-injector/hook.d.ts +7 -7
- package/dist/hooks/directory-readme-injector/hook.d.ts +7 -7
- package/dist/hooks/keyword-detector/hook.d.ts +1 -1
- package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +1 -1
- package/dist/hooks/model-fallback/next-fallback.d.ts +8 -0
- package/dist/hooks/read-image-resizer/image-resizer.d.ts +3 -1
- package/dist/hooks/rules-injector/injector.d.ts +12 -0
- package/dist/index.js +27641 -20106
- package/dist/openclaw/config.d.ts +1 -1
- package/dist/openclaw/dispatcher.d.ts +3 -13
- package/dist/openclaw/gateway-url-validation.d.ts +1 -0
- package/dist/openclaw/reply-listener-discord.d.ts +4 -0
- package/dist/openclaw/reply-listener-injection.d.ts +10 -0
- package/dist/openclaw/reply-listener-log.d.ts +2 -0
- package/dist/openclaw/reply-listener-paths.d.ts +7 -0
- package/dist/openclaw/reply-listener-process.d.ts +4 -0
- package/dist/openclaw/reply-listener-spawn.d.ts +5 -0
- package/dist/openclaw/reply-listener-startup.d.ts +12 -0
- package/dist/openclaw/reply-listener-state.d.ts +29 -0
- package/dist/openclaw/reply-listener-telegram.d.ts +4 -0
- package/dist/openclaw/reply-listener.d.ts +5 -18
- package/dist/openclaw/runtime-dispatch.d.ts +17 -0
- package/dist/openclaw/types.d.ts +4 -0
- package/dist/plugin/command-execute-before.d.ts +3 -1
- package/dist/plugin/tool-registry.d.ts +23 -0
- package/dist/plugin-handlers/agent-priority-order.d.ts +11 -0
- package/dist/shared/agent-display-names.d.ts +5 -0
- package/dist/shared/agent-tool-restrictions.d.ts +0 -5
- package/dist/shared/compaction-marker.d.ts +1 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/migration/migrations-sidecar.d.ts +41 -0
- package/dist/shared/opencode-provider-auth.d.ts +3 -0
- package/dist/shared/parse-tools-config.d.ts +6 -0
- package/dist/shared/plugin-identity.d.ts +4 -2
- package/dist/shared/posthog-activity-state.d.ts +8 -0
- package/dist/shared/posthog.d.ts +14 -0
- package/dist/shared/resolve-agent-definition-paths.d.ts +1 -0
- package/dist/shared/shell-env.d.ts +6 -2
- package/dist/testing/module-mock-lifecycle.d.ts +21 -0
- package/dist/tools/call-omo-agent/agent-resolver.d.ts +17 -0
- package/dist/tools/call-omo-agent/constants.d.ts +1 -1
- package/dist/tools/delegate-task/delegated-model-config.d.ts +3 -0
- package/dist/tools/delegate-task/fallback-entry-resolution.d.ts +12 -0
- package/dist/tools/delegate-task/fallback-entry-settings.d.ts +7 -0
- package/dist/tools/delegate-task/subagent-discovery.d.ts +15 -0
- package/dist/tools/delegate-task/sync-task-fallback.d.ts +12 -0
- package/dist/tools/session-manager/tools.d.ts +19 -1
- package/dist/tools/skill/constants.d.ts +1 -1
- package/package.json +13 -12
- package/postinstall.mjs +133 -133
- package/dist/tools/delegate-task/resolve-call-id.d.ts +0 -2
package/postinstall.mjs
CHANGED
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
// postinstall.mjs
|
|
2
|
-
// Runs after npm install to verify platform binary is available
|
|
3
|
-
|
|
4
|
-
import { readFileSync } from "node:fs";
|
|
5
|
-
import { createRequire } from "node:module";
|
|
6
|
-
import { getPlatformPackageCandidates, getBinaryPath } from "./bin/platform.js";
|
|
7
|
-
|
|
8
|
-
const require = createRequire(import.meta.url);
|
|
9
|
-
|
|
10
|
-
const MIN_OPENCODE_VERSION = "1.4.0";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Parse version string into numeric parts
|
|
14
|
-
* @param {string} version
|
|
15
|
-
* @returns {number[]}
|
|
16
|
-
*/
|
|
17
|
-
function parseVersion(version) {
|
|
18
|
-
return version
|
|
19
|
-
.replace(/^v/, "")
|
|
20
|
-
.split("-")[0]
|
|
21
|
-
.split(".")
|
|
22
|
-
.map((part) => Number.parseInt(part, 10) || 0);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Compare two version strings
|
|
27
|
-
* @param {string} current
|
|
28
|
-
* @param {string} minimum
|
|
29
|
-
* @returns {boolean} true if current >= minimum
|
|
30
|
-
*/
|
|
31
|
-
function compareVersions(current, minimum) {
|
|
32
|
-
const currentParts = parseVersion(current);
|
|
33
|
-
const minimumParts = parseVersion(minimum);
|
|
34
|
-
const length = Math.max(currentParts.length, minimumParts.length);
|
|
35
|
-
|
|
36
|
-
for (let index = 0; index < length; index++) {
|
|
37
|
-
const currentPart = currentParts[index] ?? 0;
|
|
38
|
-
const minimumPart = minimumParts[index] ?? 0;
|
|
39
|
-
if (currentPart > minimumPart) return true;
|
|
40
|
-
if (currentPart < minimumPart) return false;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Check if opencode version meets minimum requirement
|
|
48
|
-
* @returns {{ok: boolean, version: string | null}}
|
|
49
|
-
*/
|
|
50
|
-
function checkOpenCodeVersion() {
|
|
51
|
-
try {
|
|
52
|
-
const result = require("child_process").execSync("opencode --version", {
|
|
53
|
-
encoding: "utf-8",
|
|
54
|
-
stdio: ["pipe", "pipe", "ignore"],
|
|
55
|
-
});
|
|
56
|
-
const version = result.trim();
|
|
57
|
-
const ok = compareVersions(version, MIN_OPENCODE_VERSION);
|
|
58
|
-
return { ok, version };
|
|
59
|
-
} catch {
|
|
60
|
-
return { ok: true, version: null };
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Detect libc family on Linux
|
|
66
|
-
*/
|
|
67
|
-
function getLibcFamily() {
|
|
68
|
-
if (process.platform !== "linux") {
|
|
69
|
-
return undefined;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
try {
|
|
73
|
-
const detectLibc = require("detect-libc");
|
|
74
|
-
return detectLibc.familySync();
|
|
75
|
-
} catch {
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function getPackageBaseName() {
|
|
81
|
-
try {
|
|
82
|
-
const packageJson = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8"));
|
|
83
|
-
return packageJson.name || "evil-omo";
|
|
84
|
-
} catch {
|
|
85
|
-
return "evil-omo";
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function main() {
|
|
90
|
-
const { platform, arch } = process;
|
|
91
|
-
const libcFamily = getLibcFamily();
|
|
92
|
-
const packageBaseName = getPackageBaseName();
|
|
93
|
-
|
|
94
|
-
// Check opencode version requirement
|
|
95
|
-
const versionCheck = checkOpenCodeVersion();
|
|
96
|
-
if (versionCheck.version && !versionCheck.ok) {
|
|
97
|
-
console.warn(`⚠ evil-omo requires OpenCode >= ${MIN_OPENCODE_VERSION}`);
|
|
98
|
-
console.warn(` Detected: ${versionCheck.version}`);
|
|
99
|
-
console.warn(` Please update OpenCode to avoid compatibility issues.`);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
try {
|
|
103
|
-
const packageCandidates = getPlatformPackageCandidates({
|
|
104
|
-
platform,
|
|
105
|
-
arch,
|
|
106
|
-
libcFamily,
|
|
107
|
-
packageBaseName,
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
const resolvedPackage = packageCandidates.find((pkg) => {
|
|
111
|
-
try {
|
|
112
|
-
require.resolve(getBinaryPath(pkg, platform));
|
|
113
|
-
return true;
|
|
114
|
-
} catch {
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
if (!resolvedPackage) {
|
|
120
|
-
throw new Error(
|
|
121
|
-
`No platform binary package installed. Tried: ${packageCandidates.join(", ")}`
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
console.log(`✓ evil-omo binary installed for ${platform}-${arch} (${resolvedPackage})`);
|
|
126
|
-
} catch (error) {
|
|
127
|
-
console.warn(`⚠ evil-omo: ${error.message}`);
|
|
128
|
-
console.warn(` The CLI may not work on this platform.`);
|
|
129
|
-
// Don't fail installation - let user try anyway
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
main();
|
|
1
|
+
// postinstall.mjs
|
|
2
|
+
// Runs after npm install to verify platform binary is available
|
|
3
|
+
|
|
4
|
+
import { readFileSync } from "node:fs";
|
|
5
|
+
import { createRequire } from "node:module";
|
|
6
|
+
import { getPlatformPackageCandidates, getBinaryPath } from "./bin/platform.js";
|
|
7
|
+
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
|
|
10
|
+
const MIN_OPENCODE_VERSION = "1.4.0";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Parse version string into numeric parts
|
|
14
|
+
* @param {string} version
|
|
15
|
+
* @returns {number[]}
|
|
16
|
+
*/
|
|
17
|
+
function parseVersion(version) {
|
|
18
|
+
return version
|
|
19
|
+
.replace(/^v/, "")
|
|
20
|
+
.split("-")[0]
|
|
21
|
+
.split(".")
|
|
22
|
+
.map((part) => Number.parseInt(part, 10) || 0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Compare two version strings
|
|
27
|
+
* @param {string} current
|
|
28
|
+
* @param {string} minimum
|
|
29
|
+
* @returns {boolean} true if current >= minimum
|
|
30
|
+
*/
|
|
31
|
+
function compareVersions(current, minimum) {
|
|
32
|
+
const currentParts = parseVersion(current);
|
|
33
|
+
const minimumParts = parseVersion(minimum);
|
|
34
|
+
const length = Math.max(currentParts.length, minimumParts.length);
|
|
35
|
+
|
|
36
|
+
for (let index = 0; index < length; index++) {
|
|
37
|
+
const currentPart = currentParts[index] ?? 0;
|
|
38
|
+
const minimumPart = minimumParts[index] ?? 0;
|
|
39
|
+
if (currentPart > minimumPart) return true;
|
|
40
|
+
if (currentPart < minimumPart) return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Check if opencode version meets minimum requirement
|
|
48
|
+
* @returns {{ok: boolean, version: string | null}}
|
|
49
|
+
*/
|
|
50
|
+
function checkOpenCodeVersion() {
|
|
51
|
+
try {
|
|
52
|
+
const result = require("child_process").execSync("opencode --version", {
|
|
53
|
+
encoding: "utf-8",
|
|
54
|
+
stdio: ["pipe", "pipe", "ignore"],
|
|
55
|
+
});
|
|
56
|
+
const version = result.trim();
|
|
57
|
+
const ok = compareVersions(version, MIN_OPENCODE_VERSION);
|
|
58
|
+
return { ok, version };
|
|
59
|
+
} catch {
|
|
60
|
+
return { ok: true, version: null };
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Detect libc family on Linux
|
|
66
|
+
*/
|
|
67
|
+
function getLibcFamily() {
|
|
68
|
+
if (process.platform !== "linux") {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
try {
|
|
73
|
+
const detectLibc = require("detect-libc");
|
|
74
|
+
return detectLibc.familySync();
|
|
75
|
+
} catch {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function getPackageBaseName() {
|
|
81
|
+
try {
|
|
82
|
+
const packageJson = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8"));
|
|
83
|
+
return packageJson.name || "evil-omo";
|
|
84
|
+
} catch {
|
|
85
|
+
return "evil-omo";
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function main() {
|
|
90
|
+
const { platform, arch } = process;
|
|
91
|
+
const libcFamily = getLibcFamily();
|
|
92
|
+
const packageBaseName = getPackageBaseName();
|
|
93
|
+
|
|
94
|
+
// Check opencode version requirement
|
|
95
|
+
const versionCheck = checkOpenCodeVersion();
|
|
96
|
+
if (versionCheck.version && !versionCheck.ok) {
|
|
97
|
+
console.warn(`⚠ evil-omo requires OpenCode >= ${MIN_OPENCODE_VERSION}`);
|
|
98
|
+
console.warn(` Detected: ${versionCheck.version}`);
|
|
99
|
+
console.warn(` Please update OpenCode to avoid compatibility issues.`);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
try {
|
|
103
|
+
const packageCandidates = getPlatformPackageCandidates({
|
|
104
|
+
platform,
|
|
105
|
+
arch,
|
|
106
|
+
libcFamily,
|
|
107
|
+
packageBaseName,
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const resolvedPackage = packageCandidates.find((pkg) => {
|
|
111
|
+
try {
|
|
112
|
+
require.resolve(getBinaryPath(pkg, platform));
|
|
113
|
+
return true;
|
|
114
|
+
} catch {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
if (!resolvedPackage) {
|
|
120
|
+
throw new Error(
|
|
121
|
+
`No platform binary package installed. Tried: ${packageCandidates.join(", ")}`
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
console.log(`✓ evil-omo binary installed for ${platform}-${arch} (${resolvedPackage})`);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
console.warn(`⚠ evil-omo: ${error.message}`);
|
|
128
|
+
console.warn(` The CLI may not work on this platform.`);
|
|
129
|
+
// Don't fail installation - let user try anyway
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
main();
|