openhermes 1.4.1 → 1.5.0
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/bootstrap.mjs +42 -48
- package/index.mjs +33 -5
- package/package.json +1 -1
package/bootstrap.mjs
CHANGED
|
@@ -128,8 +128,6 @@ export const BootstrapPlugin = async ({ client, directory }) => {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
return {
|
|
131
|
-
name: "openhermes-bootstrap",
|
|
132
|
-
|
|
133
131
|
config: async (config) => {
|
|
134
132
|
config.skills = config.skills || {}
|
|
135
133
|
config.skills.paths = config.skills.paths || []
|
|
@@ -137,92 +135,88 @@ export const BootstrapPlugin = async ({ client, directory }) => {
|
|
|
137
135
|
config.skills.paths.push(SKILLS_DIR)
|
|
138
136
|
}
|
|
139
137
|
|
|
140
|
-
config.agent = config.agent || {}
|
|
141
138
|
const PROMPTS_DIR = path.join(HARNESS_DIR, "prompts")
|
|
142
139
|
const p = (name) => `{file:${path.join(PROMPTS_DIR, name)}}`
|
|
140
|
+
const COMMANDS_DIR = path.join(HARNESS_DIR, "commands")
|
|
141
|
+
const ct = (file) => `{file:${path.join(COMMANDS_DIR, file)}}\n\n$ARGUMENTS`
|
|
142
|
+
|
|
143
|
+
const existingCommands = config.command ?? {}
|
|
144
|
+
const existingAgents = { ...(config.agent ?? {}) }
|
|
145
|
+
|
|
146
|
+
if (existingAgents.build && typeof existingAgents.build === "object") {
|
|
147
|
+
existingAgents.build = { ...existingAgents.build, mode: "subagent", hidden: true }
|
|
148
|
+
}
|
|
143
149
|
|
|
144
|
-
|
|
150
|
+
config.command = {
|
|
151
|
+
...existingCommands,
|
|
152
|
+
"build-fix": { agent: "build-error-resolver", description: "Fix build and TypeScript errors", subtask: true, template: ct("build-fix.md") },
|
|
153
|
+
"code-review": { agent: "code-reviewer", description: "Review code for quality, security, and maintainability", subtask: true, template: ct("code-review.md") },
|
|
154
|
+
"plan": { agent: "planner", description: "Create a detailed implementation plan", subtask: true, template: ct("plan.md") },
|
|
155
|
+
"security": { agent: "security-reviewer", description: "Run comprehensive security review", subtask: true, template: ct("security.md") },
|
|
156
|
+
"doctor": { agent: "OpenHermes", description: "Run OpenCode OpenHermes health diagnostics", subtask: true, template: ct("doctor.md") },
|
|
157
|
+
"memory-search": { agent: "OpenHermes", description: "Search OpenHermes memory with LLM summarization", subtask: true, template: ct("memory-search.md") },
|
|
158
|
+
"learn": { agent: "OpenHermes", description: "Create a new skill from recent work patterns", subtask: true, template: ct("learn.md") },
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
config.agent = {
|
|
162
|
+
...existingAgents,
|
|
163
|
+
"OpenHermes": {
|
|
164
|
+
description: "Fully autonomous primary coding agent (all tools allowed)",
|
|
165
|
+
mode: "primary",
|
|
166
|
+
color: "#F59E0B",
|
|
167
|
+
permission: {
|
|
168
|
+
bash: { "*": "allow" },
|
|
169
|
+
edit: "allow",
|
|
170
|
+
read: "allow",
|
|
171
|
+
task: { "*": "allow" },
|
|
172
|
+
},
|
|
173
|
+
},
|
|
145
174
|
"architect": {
|
|
146
175
|
description: "Software architecture specialist for system design",
|
|
147
176
|
mode: "subagent",
|
|
148
177
|
prompt: p("architect.txt"),
|
|
149
|
-
permission: { read: "allow", edit: "deny", bash: "deny" }
|
|
178
|
+
permission: { read: "allow", edit: "deny", bash: "deny" },
|
|
150
179
|
},
|
|
151
180
|
"build-error-resolver": {
|
|
152
181
|
description: "Build and TypeScript error resolution specialist",
|
|
153
182
|
mode: "subagent",
|
|
154
183
|
prompt: p("build-error-resolver.md"),
|
|
155
|
-
permission: { read: "allow", edit: "allow" }
|
|
184
|
+
permission: { read: "allow", edit: "allow" },
|
|
156
185
|
},
|
|
157
186
|
"code-reviewer": {
|
|
158
187
|
description: "Expert code review specialist",
|
|
159
188
|
mode: "subagent",
|
|
160
189
|
prompt: p("code-reviewer.md"),
|
|
161
|
-
permission: { read: "allow", edit: "deny", bash: "deny", task: { explore: "allow", "*": "deny" } }
|
|
190
|
+
permission: { read: "allow", edit: "deny", bash: "deny", task: { explore: "allow", "*": "deny" } },
|
|
162
191
|
},
|
|
163
192
|
"e2e-runner": {
|
|
164
193
|
description: "End-to-end testing specialist using Playwright",
|
|
165
194
|
mode: "subagent",
|
|
166
195
|
prompt: p("e2e-runner.txt"),
|
|
167
|
-
permission: { read: "allow", edit: "allow" }
|
|
196
|
+
permission: { read: "allow", edit: "allow" },
|
|
168
197
|
},
|
|
169
198
|
"explore": {
|
|
170
199
|
description: "Fast read-only codebase exploration agent",
|
|
171
200
|
mode: "subagent",
|
|
172
201
|
prompt: p("explore.md"),
|
|
173
|
-
permission: { read: "allow", grep: "allow", glob: "allow", list: "allow", edit: "deny", bash: "deny" }
|
|
202
|
+
permission: { read: "allow", grep: "allow", glob: "allow", list: "allow", edit: "deny", bash: "deny" },
|
|
174
203
|
},
|
|
175
204
|
"planner": {
|
|
176
205
|
description: "Expert planning specialist for complex features and refactoring",
|
|
177
206
|
mode: "subagent",
|
|
178
207
|
color: "#3B82F6",
|
|
179
208
|
prompt: p("planner.md"),
|
|
180
|
-
permission: { read: "allow", edit: "deny", bash: "deny" }
|
|
209
|
+
permission: { read: "allow", edit: "deny", bash: "deny" },
|
|
181
210
|
},
|
|
182
211
|
"security-reviewer": {
|
|
183
212
|
description: "Security vulnerability detection and remediation specialist",
|
|
184
213
|
mode: "subagent",
|
|
185
214
|
prompt: p("security-reviewer.md"),
|
|
186
|
-
permission: { read: "allow", edit: "deny", bash: "deny", task: { "*": "allow" } }
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
for (const [name, def] of Object.entries(SUBAGENTS)) {
|
|
190
|
-
if (!config.agent[name]) config.agent[name] = def
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
if (!config.agent["OpenHermes"]) {
|
|
194
|
-
config.agent["OpenHermes"] = {
|
|
195
|
-
description: "Fully autonomous primary coding agent (all tools allowed)",
|
|
196
|
-
mode: "primary",
|
|
197
|
-
color: "#F59E0B",
|
|
198
|
-
permission: {
|
|
199
|
-
bash: { "*": "allow" },
|
|
200
|
-
edit: "allow",
|
|
201
|
-
read: "allow",
|
|
202
|
-
task: { "*": "allow" }
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
if (!config.default_agent) {
|
|
207
|
-
config.default_agent = "OpenHermes"
|
|
215
|
+
permission: { read: "allow", edit: "deny", bash: "deny", task: { "*": "allow" } },
|
|
216
|
+
},
|
|
208
217
|
}
|
|
209
218
|
|
|
210
|
-
config.
|
|
211
|
-
const COMMANDS_DIR = path.join(HARNESS_DIR, "commands")
|
|
212
|
-
const ct = (file) => `{file:${path.join(COMMANDS_DIR, file)}}\n\n$ARGUMENTS`
|
|
213
|
-
|
|
214
|
-
const COMMANDS = {
|
|
215
|
-
"build-fix": { agent: "build-error-resolver", description: "Fix build and TypeScript errors", subtask: true, template: ct("build-fix.md") },
|
|
216
|
-
"code-review": { agent: "code-reviewer", description: "Review code for quality, security, and maintainability", subtask: true, template: ct("code-review.md") },
|
|
217
|
-
"plan": { agent: "planner", description: "Create a detailed implementation plan", subtask: true, template: ct("plan.md") },
|
|
218
|
-
"security": { agent: "security-reviewer", description: "Run comprehensive security review", subtask: true, template: ct("security.md") },
|
|
219
|
-
"doctor": { agent: "OpenHermes", description: "Run OpenCode OpenHermes health diagnostics", subtask: true, template: ct("doctor.md") },
|
|
220
|
-
"memory-search": { agent: "OpenHermes", description: "Search OpenHermes memory with LLM summarization", subtask: true, template: ct("memory-search.md") },
|
|
221
|
-
"learn": { agent: "OpenHermes", description: "Create a new skill from recent work patterns", subtask: true, template: ct("learn.md") }
|
|
222
|
-
}
|
|
223
|
-
for (const [name, def] of Object.entries(COMMANDS)) {
|
|
224
|
-
if (!config.command[name]) config.command[name] = def
|
|
225
|
-
}
|
|
219
|
+
config.default_agent = "OpenHermes"
|
|
226
220
|
},
|
|
227
221
|
|
|
228
222
|
"experimental.chat.messages.transform": async (_input, output) => {
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { AutorecallPlugin } from "./autorecall.mjs"
|
|
2
|
+
import { CuratorPlugin } from "./curator.mjs"
|
|
3
|
+
import { SkillBuilderPlugin } from "./skill-builder.mjs"
|
|
4
|
+
import { BootstrapPlugin } from "./bootstrap.mjs"
|
|
5
|
+
import { MemoryToolsPlugin } from "./lib/memory-tools-plugin.mjs"
|
|
6
|
+
|
|
7
|
+
export default async (input) => {
|
|
8
|
+
const [bootstrap, autorecall, curator, skillBuilder, memoryTools] = await Promise.all([
|
|
9
|
+
BootstrapPlugin(input),
|
|
10
|
+
AutorecallPlugin(input),
|
|
11
|
+
CuratorPlugin(input),
|
|
12
|
+
SkillBuilderPlugin(input),
|
|
13
|
+
MemoryToolsPlugin(input),
|
|
14
|
+
])
|
|
15
|
+
|
|
16
|
+
const merged = {}
|
|
17
|
+
if (bootstrap.config) merged.config = bootstrap.config
|
|
18
|
+
if (memoryTools.tool) merged.tool = memoryTools.tool
|
|
19
|
+
|
|
20
|
+
const eventHandlers = [autorecall.event, curator.event, skillBuilder.event].filter(Boolean)
|
|
21
|
+
if (eventHandlers.length) {
|
|
22
|
+
merged.event = async (payload) => {
|
|
23
|
+
await Promise.all(eventHandlers.map(fn => fn(payload)))
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
for (const hook of ["experimental.chat.messages.transform", "experimental.session.compacting", "tool.execute.after"]) {
|
|
28
|
+
const handler = bootstrap[hook] || curator[hook] || skillBuilder[hook]
|
|
29
|
+
if (handler) merged[hook] = handler
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return merged
|
|
33
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openhermes",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "OpenHermes plugin suite for OpenCode — autonomous checkpointing, native memory tools, subagent routing, slash commands, and skill-candidate detection.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|