openhermes 1.4.1 → 1.5.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.
Files changed (3) hide show
  1. package/bootstrap.mjs +38 -48
  2. package/index.mjs +33 -5
  3. 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,84 @@ 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
+ config.command = {
147
+ ...existingCommands,
148
+ "build-fix": { agent: "build-error-resolver", description: "Fix build and TypeScript errors", subtask: true, template: ct("build-fix.md") },
149
+ "code-review": { agent: "code-reviewer", description: "Review code for quality, security, and maintainability", subtask: true, template: ct("code-review.md") },
150
+ "plan": { agent: "planner", description: "Create a detailed implementation plan", subtask: true, template: ct("plan.md") },
151
+ "security": { agent: "security-reviewer", description: "Run comprehensive security review", subtask: true, template: ct("security.md") },
152
+ "doctor": { agent: "OpenHermes", description: "Run OpenCode OpenHermes health diagnostics", subtask: true, template: ct("doctor.md") },
153
+ "memory-search": { agent: "OpenHermes", description: "Search OpenHermes memory with LLM summarization", subtask: true, template: ct("memory-search.md") },
154
+ "learn": { agent: "OpenHermes", description: "Create a new skill from recent work patterns", subtask: true, template: ct("learn.md") },
155
+ }
143
156
 
144
- const SUBAGENTS = {
157
+ config.agent = {
158
+ ...existingAgents,
159
+ "OpenHermes": {
160
+ description: "Fully autonomous primary coding agent (all tools allowed)",
161
+ mode: "primary",
162
+ color: "#F59E0B",
163
+ permission: {
164
+ bash: { "*": "allow" },
165
+ edit: "allow",
166
+ read: "allow",
167
+ task: { "*": "allow" },
168
+ },
169
+ },
145
170
  "architect": {
146
171
  description: "Software architecture specialist for system design",
147
172
  mode: "subagent",
148
173
  prompt: p("architect.txt"),
149
- permission: { read: "allow", edit: "deny", bash: "deny" }
174
+ permission: { read: "allow", edit: "deny", bash: "deny" },
150
175
  },
151
176
  "build-error-resolver": {
152
177
  description: "Build and TypeScript error resolution specialist",
153
178
  mode: "subagent",
154
179
  prompt: p("build-error-resolver.md"),
155
- permission: { read: "allow", edit: "allow" }
180
+ permission: { read: "allow", edit: "allow" },
156
181
  },
157
182
  "code-reviewer": {
158
183
  description: "Expert code review specialist",
159
184
  mode: "subagent",
160
185
  prompt: p("code-reviewer.md"),
161
- permission: { read: "allow", edit: "deny", bash: "deny", task: { explore: "allow", "*": "deny" } }
186
+ permission: { read: "allow", edit: "deny", bash: "deny", task: { explore: "allow", "*": "deny" } },
162
187
  },
163
188
  "e2e-runner": {
164
189
  description: "End-to-end testing specialist using Playwright",
165
190
  mode: "subagent",
166
191
  prompt: p("e2e-runner.txt"),
167
- permission: { read: "allow", edit: "allow" }
192
+ permission: { read: "allow", edit: "allow" },
168
193
  },
169
194
  "explore": {
170
195
  description: "Fast read-only codebase exploration agent",
171
196
  mode: "subagent",
172
197
  prompt: p("explore.md"),
173
- permission: { read: "allow", grep: "allow", glob: "allow", list: "allow", edit: "deny", bash: "deny" }
198
+ permission: { read: "allow", grep: "allow", glob: "allow", list: "allow", edit: "deny", bash: "deny" },
174
199
  },
175
200
  "planner": {
176
201
  description: "Expert planning specialist for complex features and refactoring",
177
202
  mode: "subagent",
178
203
  color: "#3B82F6",
179
204
  prompt: p("planner.md"),
180
- permission: { read: "allow", edit: "deny", bash: "deny" }
205
+ permission: { read: "allow", edit: "deny", bash: "deny" },
181
206
  },
182
207
  "security-reviewer": {
183
208
  description: "Security vulnerability detection and remediation specialist",
184
209
  mode: "subagent",
185
210
  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"
211
+ permission: { read: "allow", edit: "deny", bash: "deny", task: { "*": "allow" } },
212
+ },
208
213
  }
209
214
 
210
- config.command = config.command || {}
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
- }
215
+ config.default_agent = "OpenHermes"
226
216
  },
227
217
 
228
218
  "experimental.chat.messages.transform": async (_input, output) => {
package/index.mjs CHANGED
@@ -1,5 +1,33 @@
1
- export { AutorecallPlugin } from "./autorecall.mjs"
2
- export { CuratorPlugin } from "./curator.mjs"
3
- export { SkillBuilderPlugin } from "./skill-builder.mjs"
4
- export { BootstrapPlugin } from "./bootstrap.mjs"
5
- export { MemoryToolsPlugin } from "./lib/memory-tools-plugin.mjs"
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.4.1",
3
+ "version": "1.5.1",
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",