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.
Files changed (102) hide show
  1. package/LICENSE.md +82 -82
  2. package/README.ja.md +357 -353
  3. package/README.ko.md +351 -347
  4. package/README.md +51 -51
  5. package/README.ru.md +378 -374
  6. package/README.zh-cn.md +356 -352
  7. package/bin/evil-omo.js +201 -201
  8. package/bin/platform.d.ts +14 -14
  9. package/bin/platform.js +82 -82
  10. package/bin/platform.test.ts +218 -218
  11. package/dist/agents/gpt-apply-patch-guard.d.ts +2 -0
  12. package/dist/agents/hephaestus/gpt-5-3-codex.d.ts +0 -1
  13. package/dist/cli/doctor/checks/system.d.ts +15 -2
  14. package/dist/cli/doctor/spawn-with-timeout.d.ts +8 -0
  15. package/dist/cli/index.js +7193 -1032
  16. package/dist/cli/install-validators.d.ts +1 -0
  17. package/dist/cli/model-fallback-types.d.ts +1 -0
  18. package/dist/cli/provider-model-id-transform.d.ts +1 -1
  19. package/dist/cli/types.d.ts +3 -0
  20. package/dist/config/schema/agent-definitions.d.ts +3 -0
  21. package/dist/config/schema/evil-omo-config.d.ts +11 -2
  22. package/dist/create-tools.d.ts +2 -1
  23. package/dist/evil-omo.schema.json +24 -1
  24. package/dist/features/background-agent/index.d.ts +2 -0
  25. package/dist/features/background-agent/session-existence.d.ts +1 -1
  26. package/dist/features/background-agent/subagent-spawn-limits.d.ts +1 -1
  27. package/dist/features/background-agent/task-poller.d.ts +1 -0
  28. package/dist/features/background-agent/wait-for-task-session.d.ts +17 -0
  29. package/dist/features/builtin-commands/commands.d.ts +2 -1
  30. package/dist/features/claude-code-agent-loader/agent-definitions-loader.d.ts +3 -0
  31. package/dist/features/claude-code-agent-loader/index.d.ts +3 -0
  32. package/dist/features/claude-code-agent-loader/json-agent-loader.d.ts +2 -0
  33. package/dist/features/claude-code-agent-loader/loader.d.ts +2 -0
  34. package/dist/features/claude-code-agent-loader/opencode-config-agents-reader.d.ts +2 -0
  35. package/dist/features/claude-code-agent-loader/types.d.ts +9 -1
  36. package/dist/features/skill-mcp-manager/connection.d.ts +3 -4
  37. package/dist/features/skill-mcp-manager/http-client.d.ts +17 -3
  38. package/dist/features/skill-mcp-manager/manager.d.ts +2 -3
  39. package/dist/features/skill-mcp-manager/stdio-client.d.ts +16 -3
  40. package/dist/features/skill-mcp-manager/types.d.ts +16 -6
  41. package/dist/features/tmux-subagent/manager.d.ts +1 -0
  42. package/dist/features/tool-metadata-store/index.d.ts +7 -0
  43. package/dist/features/tool-metadata-store/publish-tool-metadata.d.ts +9 -0
  44. package/dist/features/tool-metadata-store/recover-tool-metadata.d.ts +3 -0
  45. package/dist/features/tool-metadata-store/resolve-tool-call-id.d.ts +6 -0
  46. package/dist/features/tool-metadata-store/task-metadata-contract.d.ts +10 -0
  47. package/dist/hooks/atlas/session-last-agent.d.ts +10 -1
  48. package/dist/hooks/atlas/system-reminder-templates.d.ts +2 -2
  49. package/dist/hooks/auto-update-checker/constants.d.ts +17 -2
  50. package/dist/hooks/auto-update-checker/hook.d.ts +22 -1
  51. package/dist/hooks/comment-checker/cli-runner.d.ts +4 -1
  52. package/dist/hooks/directory-agents-injector/hook.d.ts +7 -7
  53. package/dist/hooks/directory-readme-injector/hook.d.ts +7 -7
  54. package/dist/hooks/keyword-detector/hook.d.ts +1 -1
  55. package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +1 -1
  56. package/dist/hooks/model-fallback/next-fallback.d.ts +8 -0
  57. package/dist/hooks/read-image-resizer/image-resizer.d.ts +3 -1
  58. package/dist/hooks/rules-injector/injector.d.ts +12 -0
  59. package/dist/index.js +27641 -20106
  60. package/dist/openclaw/config.d.ts +1 -1
  61. package/dist/openclaw/dispatcher.d.ts +3 -13
  62. package/dist/openclaw/gateway-url-validation.d.ts +1 -0
  63. package/dist/openclaw/reply-listener-discord.d.ts +4 -0
  64. package/dist/openclaw/reply-listener-injection.d.ts +10 -0
  65. package/dist/openclaw/reply-listener-log.d.ts +2 -0
  66. package/dist/openclaw/reply-listener-paths.d.ts +7 -0
  67. package/dist/openclaw/reply-listener-process.d.ts +4 -0
  68. package/dist/openclaw/reply-listener-spawn.d.ts +5 -0
  69. package/dist/openclaw/reply-listener-startup.d.ts +12 -0
  70. package/dist/openclaw/reply-listener-state.d.ts +29 -0
  71. package/dist/openclaw/reply-listener-telegram.d.ts +4 -0
  72. package/dist/openclaw/reply-listener.d.ts +5 -18
  73. package/dist/openclaw/runtime-dispatch.d.ts +17 -0
  74. package/dist/openclaw/types.d.ts +4 -0
  75. package/dist/plugin/command-execute-before.d.ts +3 -1
  76. package/dist/plugin/tool-registry.d.ts +23 -0
  77. package/dist/plugin-handlers/agent-priority-order.d.ts +11 -0
  78. package/dist/shared/agent-display-names.d.ts +5 -0
  79. package/dist/shared/agent-tool-restrictions.d.ts +0 -5
  80. package/dist/shared/compaction-marker.d.ts +1 -0
  81. package/dist/shared/index.d.ts +3 -0
  82. package/dist/shared/migration/migrations-sidecar.d.ts +41 -0
  83. package/dist/shared/opencode-provider-auth.d.ts +3 -0
  84. package/dist/shared/parse-tools-config.d.ts +6 -0
  85. package/dist/shared/plugin-identity.d.ts +4 -2
  86. package/dist/shared/posthog-activity-state.d.ts +8 -0
  87. package/dist/shared/posthog.d.ts +14 -0
  88. package/dist/shared/resolve-agent-definition-paths.d.ts +1 -0
  89. package/dist/shared/shell-env.d.ts +6 -2
  90. package/dist/testing/module-mock-lifecycle.d.ts +21 -0
  91. package/dist/tools/call-omo-agent/agent-resolver.d.ts +17 -0
  92. package/dist/tools/call-omo-agent/constants.d.ts +1 -1
  93. package/dist/tools/delegate-task/delegated-model-config.d.ts +3 -0
  94. package/dist/tools/delegate-task/fallback-entry-resolution.d.ts +12 -0
  95. package/dist/tools/delegate-task/fallback-entry-settings.d.ts +7 -0
  96. package/dist/tools/delegate-task/subagent-discovery.d.ts +15 -0
  97. package/dist/tools/delegate-task/sync-task-fallback.d.ts +12 -0
  98. package/dist/tools/session-manager/tools.d.ts +19 -1
  99. package/dist/tools/skill/constants.d.ts +1 -1
  100. package/package.json +13 -12
  101. package/postinstall.mjs +133 -133
  102. 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();
@@ -1,2 +0,0 @@
1
- import type { ToolContextWithMetadata } from "./types";
2
- export declare function resolveCallID(ctx: ToolContextWithMetadata): string | undefined;