evil-omo 3.15.3 → 3.16.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/LICENSE.md +82 -82
- package/README.ja.md +353 -353
- package/README.ko.md +347 -347
- package/README.md +51 -51
- package/README.ru.md +374 -374
- package/README.zh-cn.md +352 -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/dynamic-agent-core-sections.d.ts +7 -0
- package/dist/agents/dynamic-agent-prompt-builder.d.ts +1 -1
- package/dist/cli/config-manager/backup-config.d.ts +6 -0
- package/dist/cli/config-manager/version-compatibility.d.ts +9 -0
- package/dist/cli/config-manager.d.ts +4 -0
- package/dist/cli/doctor/constants.d.ts +1 -1
- package/dist/cli/index.js +917 -822
- package/dist/cli/minimum-opencode-version.d.ts +1 -0
- package/dist/cli/model-fallback-types.d.ts +3 -0
- package/dist/cli/types.d.ts +1 -0
- package/dist/create-managers.d.ts +14 -0
- package/dist/features/background-agent/compaction-aware-message-resolver.d.ts +5 -2
- package/dist/features/boulder-state/storage.d.ts +7 -0
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +1 -1
- package/dist/features/claude-code-mcp-loader/env-expander.d.ts +5 -2
- package/dist/features/claude-code-plugin-loader/loader.d.ts +15 -0
- package/dist/features/claude-code-plugin-loader/scope-filter.d.ts +2 -0
- package/dist/features/claude-code-plugin-loader/types.d.ts +11 -0
- package/dist/features/claude-code-session-state/state.d.ts +1 -0
- package/dist/features/mcp-oauth/provider.d.ts +1 -0
- package/dist/features/mcp-oauth/refresh-mutex.d.ts +26 -0
- package/dist/features/skill-mcp-manager/error-redaction.d.ts +10 -0
- package/dist/features/skill-mcp-manager/oauth-handler.d.ts +7 -0
- package/dist/features/skill-mcp-manager/types.d.ts +3 -1
- package/dist/hooks/atlas/types.d.ts +1 -0
- package/dist/hooks/auto-update-checker/constants.d.ts +2 -2
- package/dist/hooks/keyword-detector/hook.d.ts +2 -1
- package/dist/hooks/ralph-loop/constants.d.ts +1 -0
- package/dist/hooks/ralph-loop/oracle-verification-detector.d.ts +8 -0
- package/dist/hooks/read-image-resizer/png-fallback-resizer.d.ts +2 -0
- package/dist/hooks/runtime-fallback/auto-retry-signal.d.ts +4 -0
- package/dist/hooks/runtime-fallback/error-classifier.d.ts +1 -5
- package/dist/hooks/session-recovery/types.d.ts +2 -0
- package/dist/hooks/todo-continuation-enforcer/pending-question-detection.d.ts +1 -1
- package/dist/hooks/todo-continuation-enforcer/token-limit-detection.d.ts +4 -0
- package/dist/hooks/todo-continuation-enforcer/types.d.ts +7 -0
- package/dist/hooks/unstable-agent-babysitter/task-message-analyzer.d.ts +1 -0
- package/dist/hooks/unstable-agent-babysitter/unstable-agent-babysitter-hook.d.ts +2 -0
- package/dist/index.js +2025 -1302
- package/dist/plugin/chat-params.d.ts +1 -0
- package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -0
- package/dist/shared/agent-display-names.d.ts +9 -2
- package/dist/shared/compaction-marker.d.ts +12 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/internal-initiator-marker.d.ts +1 -0
- package/dist/shared/session-prompt-params-state.d.ts +1 -0
- package/dist/tools/background-task/constants.d.ts +1 -1
- package/package.json +16 -18
- package/postinstall.mjs +133 -71
package/bin/platform.test.ts
CHANGED
|
@@ -1,218 +1,218 @@
|
|
|
1
|
-
// bin/platform.test.ts
|
|
2
|
-
import { describe, expect, test } from "bun:test";
|
|
3
|
-
import { getBinaryPath, getPlatformPackage, getPlatformPackageCandidates } from "./platform.js";
|
|
4
|
-
|
|
5
|
-
describe("getPlatformPackage", () => {
|
|
6
|
-
// #region Darwin platforms
|
|
7
|
-
test("returns darwin-arm64 for macOS ARM64", () => {
|
|
8
|
-
// #given macOS ARM64 platform
|
|
9
|
-
const input = { platform: "darwin", arch: "arm64" };
|
|
10
|
-
|
|
11
|
-
// #when getting platform package
|
|
12
|
-
const result = getPlatformPackage(input);
|
|
13
|
-
|
|
14
|
-
// #then returns correct package name
|
|
15
|
-
expect(result).toBe("evil-omo-darwin-arm64");
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
test("returns darwin-x64 for macOS Intel", () => {
|
|
19
|
-
// #given macOS x64 platform
|
|
20
|
-
const input = { platform: "darwin", arch: "x64" };
|
|
21
|
-
|
|
22
|
-
// #when getting platform package
|
|
23
|
-
const result = getPlatformPackage(input);
|
|
24
|
-
|
|
25
|
-
// #then returns correct package name
|
|
26
|
-
expect(result).toBe("evil-omo-darwin-x64");
|
|
27
|
-
});
|
|
28
|
-
// #endregion
|
|
29
|
-
|
|
30
|
-
// #region Linux glibc platforms
|
|
31
|
-
test("returns linux-x64 for Linux x64 with glibc", () => {
|
|
32
|
-
// #given Linux x64 with glibc
|
|
33
|
-
const input = { platform: "linux", arch: "x64", libcFamily: "glibc" };
|
|
34
|
-
|
|
35
|
-
// #when getting platform package
|
|
36
|
-
const result = getPlatformPackage(input);
|
|
37
|
-
|
|
38
|
-
// #then returns correct package name
|
|
39
|
-
expect(result).toBe("evil-omo-linux-x64");
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
test("returns linux-arm64 for Linux ARM64 with glibc", () => {
|
|
43
|
-
// #given Linux ARM64 with glibc
|
|
44
|
-
const input = { platform: "linux", arch: "arm64", libcFamily: "glibc" };
|
|
45
|
-
|
|
46
|
-
// #when getting platform package
|
|
47
|
-
const result = getPlatformPackage(input);
|
|
48
|
-
|
|
49
|
-
// #then returns correct package name
|
|
50
|
-
expect(result).toBe("evil-omo-linux-arm64");
|
|
51
|
-
});
|
|
52
|
-
// #endregion
|
|
53
|
-
|
|
54
|
-
// #region Linux musl platforms
|
|
55
|
-
test("returns linux-x64-musl for Alpine x64", () => {
|
|
56
|
-
// #given Linux x64 with musl (Alpine)
|
|
57
|
-
const input = { platform: "linux", arch: "x64", libcFamily: "musl" };
|
|
58
|
-
|
|
59
|
-
// #when getting platform package
|
|
60
|
-
const result = getPlatformPackage(input);
|
|
61
|
-
|
|
62
|
-
// #then returns correct package name with musl suffix
|
|
63
|
-
expect(result).toBe("evil-omo-linux-x64-musl");
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
test("returns linux-arm64-musl for Alpine ARM64", () => {
|
|
67
|
-
// #given Linux ARM64 with musl (Alpine)
|
|
68
|
-
const input = { platform: "linux", arch: "arm64", libcFamily: "musl" };
|
|
69
|
-
|
|
70
|
-
// #when getting platform package
|
|
71
|
-
const result = getPlatformPackage(input);
|
|
72
|
-
|
|
73
|
-
// #then returns correct package name with musl suffix
|
|
74
|
-
expect(result).toBe("evil-omo-linux-arm64-musl");
|
|
75
|
-
});
|
|
76
|
-
// #endregion
|
|
77
|
-
|
|
78
|
-
// #region Windows platform
|
|
79
|
-
test("returns windows-x64 for Windows", () => {
|
|
80
|
-
// #given Windows x64 platform (win32 is Node's platform name)
|
|
81
|
-
const input = { platform: "win32", arch: "x64" };
|
|
82
|
-
|
|
83
|
-
// #when getting platform package
|
|
84
|
-
const result = getPlatformPackage(input);
|
|
85
|
-
|
|
86
|
-
// #then returns correct package name with 'windows' not 'win32'
|
|
87
|
-
expect(result).toBe("evil-omo-windows-x64");
|
|
88
|
-
});
|
|
89
|
-
// #endregion
|
|
90
|
-
|
|
91
|
-
// #region Error cases
|
|
92
|
-
test("throws error for Linux with null libcFamily", () => {
|
|
93
|
-
// #given Linux platform with null libc detection
|
|
94
|
-
const input = { platform: "linux", arch: "x64", libcFamily: null };
|
|
95
|
-
|
|
96
|
-
// #when getting platform package
|
|
97
|
-
// #then throws descriptive error
|
|
98
|
-
expect(() => getPlatformPackage(input)).toThrow("Could not detect libc");
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
test("throws error for Linux with undefined libcFamily", () => {
|
|
102
|
-
// #given Linux platform with undefined libc
|
|
103
|
-
const input = { platform: "linux", arch: "x64", libcFamily: undefined };
|
|
104
|
-
|
|
105
|
-
// #when getting platform package
|
|
106
|
-
// #then throws descriptive error
|
|
107
|
-
expect(() => getPlatformPackage(input)).toThrow("Could not detect libc");
|
|
108
|
-
});
|
|
109
|
-
// #endregion
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
describe("getBinaryPath", () => {
|
|
113
|
-
test("returns path without .exe for Unix platforms", () => {
|
|
114
|
-
// #given Unix platform package
|
|
115
|
-
const pkg = "evil-omo-darwin-arm64";
|
|
116
|
-
const platform = "darwin";
|
|
117
|
-
|
|
118
|
-
// #when getting binary path
|
|
119
|
-
const result = getBinaryPath(pkg, platform);
|
|
120
|
-
|
|
121
|
-
// #then returns path without extension
|
|
122
|
-
expect(result).toBe("evil-omo-darwin-arm64/bin/evil-omo");
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
test("returns path with .exe for Windows", () => {
|
|
126
|
-
// #given Windows platform package
|
|
127
|
-
const pkg = "evil-omo-windows-x64";
|
|
128
|
-
const platform = "win32";
|
|
129
|
-
|
|
130
|
-
// #when getting binary path
|
|
131
|
-
const result = getBinaryPath(pkg, platform);
|
|
132
|
-
|
|
133
|
-
// #then returns path with .exe extension
|
|
134
|
-
expect(result).toBe("evil-omo-windows-x64/bin/evil-omo.exe");
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
test("returns path without .exe for Linux", () => {
|
|
138
|
-
// #given Linux platform package
|
|
139
|
-
const pkg = "evil-omo-linux-x64";
|
|
140
|
-
const platform = "linux";
|
|
141
|
-
|
|
142
|
-
// #when getting binary path
|
|
143
|
-
const result = getBinaryPath(pkg, platform);
|
|
144
|
-
|
|
145
|
-
// #then returns path without extension
|
|
146
|
-
expect(result).toBe("evil-omo-linux-x64/bin/evil-omo");
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
describe("getPlatformPackageCandidates", () => {
|
|
151
|
-
test("returns x64 and baseline candidates for Linux glibc", () => {
|
|
152
|
-
// #given Linux x64 with glibc
|
|
153
|
-
const input = { platform: "linux", arch: "x64", libcFamily: "glibc" };
|
|
154
|
-
|
|
155
|
-
// #when getting package candidates
|
|
156
|
-
const result = getPlatformPackageCandidates(input);
|
|
157
|
-
|
|
158
|
-
// #then returns modern first then baseline fallback
|
|
159
|
-
expect(result).toEqual([
|
|
160
|
-
"evil-omo-linux-x64",
|
|
161
|
-
"evil-omo-linux-x64-baseline",
|
|
162
|
-
]);
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
test("returns x64 musl and baseline candidates for Linux musl", () => {
|
|
166
|
-
// #given Linux x64 with musl
|
|
167
|
-
const input = { platform: "linux", arch: "x64", libcFamily: "musl" };
|
|
168
|
-
|
|
169
|
-
// #when getting package candidates
|
|
170
|
-
const result = getPlatformPackageCandidates(input);
|
|
171
|
-
|
|
172
|
-
// #then returns musl modern first then musl baseline fallback
|
|
173
|
-
expect(result).toEqual([
|
|
174
|
-
"evil-omo-linux-x64-musl",
|
|
175
|
-
"evil-omo-linux-x64-musl-baseline",
|
|
176
|
-
]);
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
test("returns baseline first when preferBaseline is true", () => {
|
|
180
|
-
// #given Windows x64 and baseline preference
|
|
181
|
-
const input = { platform: "win32", arch: "x64", preferBaseline: true };
|
|
182
|
-
|
|
183
|
-
// #when getting package candidates
|
|
184
|
-
const result = getPlatformPackageCandidates(input);
|
|
185
|
-
|
|
186
|
-
// #then baseline package is preferred first
|
|
187
|
-
expect(result).toEqual([
|
|
188
|
-
"evil-omo-windows-x64-baseline",
|
|
189
|
-
"evil-omo-windows-x64",
|
|
190
|
-
]);
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
test("supports renamed package family via packageBaseName override", () => {
|
|
196
|
-
// #given Linux x64 with glibc and renamed package base
|
|
197
|
-
const input = { platform: "linux", arch: "x64", libcFamily: "glibc", packageBaseName: "oh-my-openagent" };
|
|
198
|
-
|
|
199
|
-
// #when getting package candidates
|
|
200
|
-
const result = getPlatformPackageCandidates(input);
|
|
201
|
-
|
|
202
|
-
// #then returns renamed package family candidates
|
|
203
|
-
expect(result).toEqual([
|
|
204
|
-
"oh-my-openagent-linux-x64",
|
|
205
|
-
"oh-my-openagent-linux-x64-baseline",
|
|
206
|
-
]);
|
|
207
|
-
});
|
|
208
|
-
test("returns only one candidate for ARM64", () => {
|
|
209
|
-
// #given non-x64 platform
|
|
210
|
-
const input = { platform: "linux", arch: "arm64", libcFamily: "glibc" };
|
|
211
|
-
|
|
212
|
-
// #when getting package candidates
|
|
213
|
-
const result = getPlatformPackageCandidates(input);
|
|
214
|
-
|
|
215
|
-
// #then baseline fallback is not included
|
|
216
|
-
expect(result).toEqual(["evil-omo-linux-arm64"]);
|
|
217
|
-
});
|
|
218
|
-
});
|
|
1
|
+
// bin/platform.test.ts
|
|
2
|
+
import { describe, expect, test } from "bun:test";
|
|
3
|
+
import { getBinaryPath, getPlatformPackage, getPlatformPackageCandidates } from "./platform.js";
|
|
4
|
+
|
|
5
|
+
describe("getPlatformPackage", () => {
|
|
6
|
+
// #region Darwin platforms
|
|
7
|
+
test("returns darwin-arm64 for macOS ARM64", () => {
|
|
8
|
+
// #given macOS ARM64 platform
|
|
9
|
+
const input = { platform: "darwin", arch: "arm64" };
|
|
10
|
+
|
|
11
|
+
// #when getting platform package
|
|
12
|
+
const result = getPlatformPackage(input);
|
|
13
|
+
|
|
14
|
+
// #then returns correct package name
|
|
15
|
+
expect(result).toBe("evil-omo-darwin-arm64");
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test("returns darwin-x64 for macOS Intel", () => {
|
|
19
|
+
// #given macOS x64 platform
|
|
20
|
+
const input = { platform: "darwin", arch: "x64" };
|
|
21
|
+
|
|
22
|
+
// #when getting platform package
|
|
23
|
+
const result = getPlatformPackage(input);
|
|
24
|
+
|
|
25
|
+
// #then returns correct package name
|
|
26
|
+
expect(result).toBe("evil-omo-darwin-x64");
|
|
27
|
+
});
|
|
28
|
+
// #endregion
|
|
29
|
+
|
|
30
|
+
// #region Linux glibc platforms
|
|
31
|
+
test("returns linux-x64 for Linux x64 with glibc", () => {
|
|
32
|
+
// #given Linux x64 with glibc
|
|
33
|
+
const input = { platform: "linux", arch: "x64", libcFamily: "glibc" };
|
|
34
|
+
|
|
35
|
+
// #when getting platform package
|
|
36
|
+
const result = getPlatformPackage(input);
|
|
37
|
+
|
|
38
|
+
// #then returns correct package name
|
|
39
|
+
expect(result).toBe("evil-omo-linux-x64");
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test("returns linux-arm64 for Linux ARM64 with glibc", () => {
|
|
43
|
+
// #given Linux ARM64 with glibc
|
|
44
|
+
const input = { platform: "linux", arch: "arm64", libcFamily: "glibc" };
|
|
45
|
+
|
|
46
|
+
// #when getting platform package
|
|
47
|
+
const result = getPlatformPackage(input);
|
|
48
|
+
|
|
49
|
+
// #then returns correct package name
|
|
50
|
+
expect(result).toBe("evil-omo-linux-arm64");
|
|
51
|
+
});
|
|
52
|
+
// #endregion
|
|
53
|
+
|
|
54
|
+
// #region Linux musl platforms
|
|
55
|
+
test("returns linux-x64-musl for Alpine x64", () => {
|
|
56
|
+
// #given Linux x64 with musl (Alpine)
|
|
57
|
+
const input = { platform: "linux", arch: "x64", libcFamily: "musl" };
|
|
58
|
+
|
|
59
|
+
// #when getting platform package
|
|
60
|
+
const result = getPlatformPackage(input);
|
|
61
|
+
|
|
62
|
+
// #then returns correct package name with musl suffix
|
|
63
|
+
expect(result).toBe("evil-omo-linux-x64-musl");
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test("returns linux-arm64-musl for Alpine ARM64", () => {
|
|
67
|
+
// #given Linux ARM64 with musl (Alpine)
|
|
68
|
+
const input = { platform: "linux", arch: "arm64", libcFamily: "musl" };
|
|
69
|
+
|
|
70
|
+
// #when getting platform package
|
|
71
|
+
const result = getPlatformPackage(input);
|
|
72
|
+
|
|
73
|
+
// #then returns correct package name with musl suffix
|
|
74
|
+
expect(result).toBe("evil-omo-linux-arm64-musl");
|
|
75
|
+
});
|
|
76
|
+
// #endregion
|
|
77
|
+
|
|
78
|
+
// #region Windows platform
|
|
79
|
+
test("returns windows-x64 for Windows", () => {
|
|
80
|
+
// #given Windows x64 platform (win32 is Node's platform name)
|
|
81
|
+
const input = { platform: "win32", arch: "x64" };
|
|
82
|
+
|
|
83
|
+
// #when getting platform package
|
|
84
|
+
const result = getPlatformPackage(input);
|
|
85
|
+
|
|
86
|
+
// #then returns correct package name with 'windows' not 'win32'
|
|
87
|
+
expect(result).toBe("evil-omo-windows-x64");
|
|
88
|
+
});
|
|
89
|
+
// #endregion
|
|
90
|
+
|
|
91
|
+
// #region Error cases
|
|
92
|
+
test("throws error for Linux with null libcFamily", () => {
|
|
93
|
+
// #given Linux platform with null libc detection
|
|
94
|
+
const input = { platform: "linux", arch: "x64", libcFamily: null };
|
|
95
|
+
|
|
96
|
+
// #when getting platform package
|
|
97
|
+
// #then throws descriptive error
|
|
98
|
+
expect(() => getPlatformPackage(input)).toThrow("Could not detect libc");
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
test("throws error for Linux with undefined libcFamily", () => {
|
|
102
|
+
// #given Linux platform with undefined libc
|
|
103
|
+
const input = { platform: "linux", arch: "x64", libcFamily: undefined };
|
|
104
|
+
|
|
105
|
+
// #when getting platform package
|
|
106
|
+
// #then throws descriptive error
|
|
107
|
+
expect(() => getPlatformPackage(input)).toThrow("Could not detect libc");
|
|
108
|
+
});
|
|
109
|
+
// #endregion
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
describe("getBinaryPath", () => {
|
|
113
|
+
test("returns path without .exe for Unix platforms", () => {
|
|
114
|
+
// #given Unix platform package
|
|
115
|
+
const pkg = "evil-omo-darwin-arm64";
|
|
116
|
+
const platform = "darwin";
|
|
117
|
+
|
|
118
|
+
// #when getting binary path
|
|
119
|
+
const result = getBinaryPath(pkg, platform);
|
|
120
|
+
|
|
121
|
+
// #then returns path without extension
|
|
122
|
+
expect(result).toBe("evil-omo-darwin-arm64/bin/evil-omo");
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
test("returns path with .exe for Windows", () => {
|
|
126
|
+
// #given Windows platform package
|
|
127
|
+
const pkg = "evil-omo-windows-x64";
|
|
128
|
+
const platform = "win32";
|
|
129
|
+
|
|
130
|
+
// #when getting binary path
|
|
131
|
+
const result = getBinaryPath(pkg, platform);
|
|
132
|
+
|
|
133
|
+
// #then returns path with .exe extension
|
|
134
|
+
expect(result).toBe("evil-omo-windows-x64/bin/evil-omo.exe");
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
test("returns path without .exe for Linux", () => {
|
|
138
|
+
// #given Linux platform package
|
|
139
|
+
const pkg = "evil-omo-linux-x64";
|
|
140
|
+
const platform = "linux";
|
|
141
|
+
|
|
142
|
+
// #when getting binary path
|
|
143
|
+
const result = getBinaryPath(pkg, platform);
|
|
144
|
+
|
|
145
|
+
// #then returns path without extension
|
|
146
|
+
expect(result).toBe("evil-omo-linux-x64/bin/evil-omo");
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
describe("getPlatformPackageCandidates", () => {
|
|
151
|
+
test("returns x64 and baseline candidates for Linux glibc", () => {
|
|
152
|
+
// #given Linux x64 with glibc
|
|
153
|
+
const input = { platform: "linux", arch: "x64", libcFamily: "glibc" };
|
|
154
|
+
|
|
155
|
+
// #when getting package candidates
|
|
156
|
+
const result = getPlatformPackageCandidates(input);
|
|
157
|
+
|
|
158
|
+
// #then returns modern first then baseline fallback
|
|
159
|
+
expect(result).toEqual([
|
|
160
|
+
"evil-omo-linux-x64",
|
|
161
|
+
"evil-omo-linux-x64-baseline",
|
|
162
|
+
]);
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
test("returns x64 musl and baseline candidates for Linux musl", () => {
|
|
166
|
+
// #given Linux x64 with musl
|
|
167
|
+
const input = { platform: "linux", arch: "x64", libcFamily: "musl" };
|
|
168
|
+
|
|
169
|
+
// #when getting package candidates
|
|
170
|
+
const result = getPlatformPackageCandidates(input);
|
|
171
|
+
|
|
172
|
+
// #then returns musl modern first then musl baseline fallback
|
|
173
|
+
expect(result).toEqual([
|
|
174
|
+
"evil-omo-linux-x64-musl",
|
|
175
|
+
"evil-omo-linux-x64-musl-baseline",
|
|
176
|
+
]);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
test("returns baseline first when preferBaseline is true", () => {
|
|
180
|
+
// #given Windows x64 and baseline preference
|
|
181
|
+
const input = { platform: "win32", arch: "x64", preferBaseline: true };
|
|
182
|
+
|
|
183
|
+
// #when getting package candidates
|
|
184
|
+
const result = getPlatformPackageCandidates(input);
|
|
185
|
+
|
|
186
|
+
// #then baseline package is preferred first
|
|
187
|
+
expect(result).toEqual([
|
|
188
|
+
"evil-omo-windows-x64-baseline",
|
|
189
|
+
"evil-omo-windows-x64",
|
|
190
|
+
]);
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
test("supports renamed package family via packageBaseName override", () => {
|
|
196
|
+
// #given Linux x64 with glibc and renamed package base
|
|
197
|
+
const input = { platform: "linux", arch: "x64", libcFamily: "glibc", packageBaseName: "oh-my-openagent" };
|
|
198
|
+
|
|
199
|
+
// #when getting package candidates
|
|
200
|
+
const result = getPlatformPackageCandidates(input);
|
|
201
|
+
|
|
202
|
+
// #then returns renamed package family candidates
|
|
203
|
+
expect(result).toEqual([
|
|
204
|
+
"oh-my-openagent-linux-x64",
|
|
205
|
+
"oh-my-openagent-linux-x64-baseline",
|
|
206
|
+
]);
|
|
207
|
+
});
|
|
208
|
+
test("returns only one candidate for ARM64", () => {
|
|
209
|
+
// #given non-x64 platform
|
|
210
|
+
const input = { platform: "linux", arch: "arm64", libcFamily: "glibc" };
|
|
211
|
+
|
|
212
|
+
// #when getting package candidates
|
|
213
|
+
const result = getPlatformPackageCandidates(input);
|
|
214
|
+
|
|
215
|
+
// #then baseline fallback is not included
|
|
216
|
+
expect(result).toEqual(["evil-omo-linux-arm64"]);
|
|
217
|
+
});
|
|
218
|
+
});
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { AvailableAgent, AvailableCategory, AvailableSkill } from "./dynamic-agent-prompt-types";
|
|
2
2
|
import type { AvailableTool } from "./dynamic-agent-prompt-types";
|
|
3
|
+
/**
|
|
4
|
+
* Builds an explicit agent identity preamble that overrides any base system prompt identity.
|
|
5
|
+
* This is critical for mode: "primary" agents where OpenCode prepends its own system prompt
|
|
6
|
+
* containing a default identity (e.g., "You are Claude"). Without this override directive,
|
|
7
|
+
* the LLM may default to the base identity instead of the agent's intended persona.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildAgentIdentitySection(agentName: string, roleDescription: string): string;
|
|
3
10
|
export declare function buildKeyTriggersSection(agents: AvailableAgent[], _skills?: AvailableSkill[]): string;
|
|
4
11
|
export declare function buildToolSelectionTable(agents: AvailableAgent[], tools?: AvailableTool[], _skills?: AvailableSkill[]): string;
|
|
5
12
|
export declare function buildExploreSection(agents: AvailableAgent[]): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { AvailableAgent, AvailableTool, AvailableSkill, AvailableCategory, } from "./dynamic-agent-prompt-types";
|
|
2
2
|
export { categorizeTools } from "./dynamic-agent-tool-categorization";
|
|
3
|
-
export { buildKeyTriggersSection, buildToolSelectionTable, buildExploreSection, buildLibrarianSection, buildDelegationTable, buildOracleSection, buildNonClaudePlannerSection, buildParallelDelegationSection, } from "./dynamic-agent-core-sections";
|
|
3
|
+
export { buildAgentIdentitySection, buildKeyTriggersSection, buildToolSelectionTable, buildExploreSection, buildLibrarianSection, buildDelegationTable, buildOracleSection, buildNonClaudePlannerSection, buildParallelDelegationSection, } from "./dynamic-agent-core-sections";
|
|
4
4
|
export { buildCategorySkillsDelegationGuide } from "./dynamic-agent-category-skills-guide";
|
|
5
5
|
export { buildHardBlocksSection, buildAntiPatternsSection, buildToolCallFormatSection, buildUltraworkSection, buildAntiDuplicationSection, } from "./dynamic-agent-policy-sections";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface VersionCompatibility {
|
|
2
|
+
canUpgrade: boolean;
|
|
3
|
+
reason?: string;
|
|
4
|
+
isDowngrade: boolean;
|
|
5
|
+
isMajorBump: boolean;
|
|
6
|
+
requiresMigration: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function checkVersionCompatibility(currentVersion: string | null, newVersion: string): VersionCompatibility;
|
|
9
|
+
export declare function extractVersionFromPluginEntry(entry: string): string | null;
|
|
@@ -9,3 +9,7 @@ export { isOpenCodeInstalled, getOpenCodeVersion } from "./config-manager/openco
|
|
|
9
9
|
export { detectCurrentConfig } from "./config-manager/detect-current-config";
|
|
10
10
|
export type { BunInstallResult } from "./config-manager/bun-install";
|
|
11
11
|
export { runBunInstall, runBunInstallWithDetails } from "./config-manager/bun-install";
|
|
12
|
+
export type { VersionCompatibility } from "./config-manager/version-compatibility";
|
|
13
|
+
export { checkVersionCompatibility, extractVersionFromPluginEntry, } from "./config-manager/version-compatibility";
|
|
14
|
+
export type { BackupResult } from "./config-manager/backup-config";
|
|
15
|
+
export { backupConfigFile } from "./config-manager/backup-config";
|
|
@@ -24,6 +24,6 @@ export declare const EXIT_CODES: {
|
|
|
24
24
|
readonly SUCCESS: 0;
|
|
25
25
|
readonly FAILURE: 1;
|
|
26
26
|
};
|
|
27
|
-
export declare const MIN_OPENCODE_VERSION = "1.0
|
|
27
|
+
export declare const MIN_OPENCODE_VERSION = "1.4.0";
|
|
28
28
|
export declare const PACKAGE_NAME = "evil-omo";
|
|
29
29
|
export declare const OPENCODE_BINARIES: readonly ["opencode", "opencode-desktop"];
|