openhermes 4.9.2 β 4.12.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/CONTEXT.md +7 -7
- package/ETHOS.md +2 -2
- package/README.md +34 -33
- package/bootstrap.ts +310 -160
- package/harness/agents/oh-planner.md +1 -1
- package/harness/agents/openhermes.md +27 -126
- package/harness/codex/AUTOPILOT.md +131 -23
- package/harness/codex/CHARTER.md +4 -5
- package/harness/lib/background/background.test.ts +216 -0
- package/harness/lib/background/index.ts +7 -0
- package/harness/lib/background/interfaces.ts +31 -0
- package/harness/lib/background/manager.ts +320 -0
- package/harness/lib/composer/compose.test.ts +179 -0
- package/harness/lib/composer/compose.ts +65 -0
- package/harness/lib/composer/fragments/01-identity.md +1 -0
- package/harness/lib/composer/fragments/02-delegation.md +7 -0
- package/harness/lib/composer/fragments/03-permissions.md +13 -0
- package/harness/lib/composer/fragments/04-task-flow.md +55 -0
- package/harness/lib/composer/fragments/05-confidence.md +5 -0
- package/harness/lib/composer/fragments/06-parallelization.md +17 -0
- package/harness/lib/composer/fragments/07-shell.md +41 -0
- package/harness/lib/composer/fragments/08-routing.md +8 -0
- package/harness/lib/composer/fragments/09-guardrails.md +25 -0
- package/harness/lib/composer/index.ts +1 -0
- package/harness/lib/guards/guard-config.ts +72 -0
- package/harness/lib/hooks/builtins/confidence-gate-hook.ts +68 -0
- package/harness/lib/hooks/builtins/delegation-depth-hook.ts +78 -0
- package/harness/lib/hooks/builtins/dynamic-route-hook.ts +99 -0
- package/harness/lib/hooks/builtins/error-recovery-hook.ts +107 -0
- package/harness/lib/hooks/builtins/memory-sync-hook.ts +73 -0
- package/harness/lib/hooks/builtins/next-route-hook.ts +24 -0
- package/harness/lib/hooks/builtins/plan-check-hook.ts +43 -0
- package/harness/lib/hooks/builtins/route-tracking-hook.ts +201 -0
- package/harness/lib/hooks/builtins/sanity-check-hook.ts +52 -0
- package/harness/lib/hooks/builtins/shell-detect-hook.ts +96 -0
- package/harness/lib/hooks/builtins/subagent-failure-hook.ts +93 -0
- package/harness/lib/hooks/hooks.test.ts +1092 -0
- package/harness/lib/hooks/index.ts +42 -0
- package/harness/lib/hooks/registry.ts +416 -0
- package/harness/lib/hooks/types.ts +119 -0
- package/harness/lib/memory/index.ts +18 -0
- package/harness/lib/memory/interfaces.ts +53 -0
- package/harness/lib/memory/memory-manager.ts +205 -0
- package/harness/lib/memory/memory.test.ts +485 -0
- package/harness/lib/memory/plan-store.ts +346 -0
- package/harness/lib/plans/plan-location.ts +134 -0
- package/harness/lib/recovery/handler.ts +243 -0
- package/harness/lib/recovery/index.ts +14 -0
- package/harness/lib/recovery/interfaces.ts +48 -0
- package/harness/lib/recovery/patterns.ts +149 -0
- package/harness/lib/recovery/recovery.test.ts +312 -0
- package/harness/lib/routing/index.ts +21 -0
- package/harness/lib/routing/route-guidance.ts +147 -0
- package/harness/lib/routing/route-resolver.ts +58 -0
- package/harness/lib/routing/routing.test.ts +195 -0
- package/harness/lib/routing/skill-frontmatter.ts +125 -0
- package/harness/lib/routing/types.ts +52 -0
- package/harness/lib/sanity/anomaly-tracker.ts +127 -0
- package/harness/lib/sanity/checker.ts +189 -0
- package/harness/lib/sanity/index.ts +13 -0
- package/harness/lib/sanity/interfaces.ts +24 -0
- package/harness/lib/sanity/sanity.test.ts +472 -0
- package/harness/lib/sync/file-watcher.ts +175 -0
- package/harness/lib/sync/index.ts +11 -0
- package/harness/lib/sync/interfaces.ts +27 -0
- package/harness/lib/sync/plan-sync.ts +533 -0
- package/harness/lib/sync/sync.test.ts +858 -0
- package/harness/skills/oh-fusion/DEEP.md +109 -86
- package/harness/skills/oh-fusion/SKILL.md +47 -33
- package/harness/skills/oh-init/DEEP.md +2 -2
- package/harness/skills/oh-manifest/SKILL.md +2 -1
- package/harness/skills/oh-plan-review/DEEP.md +1 -1
- package/harness/skills/oh-planner/DEEP.md +3 -3
- package/harness/skills/oh-review/DEEP.md +5 -3
- package/harness/skills/oh-review/SKILL.md +1 -0
- package/harness/skills/oh-ship/SKILL.md +1 -1
- package/harness/skills/oh-skill-craft/SKILL.md +1 -4
- package/package.json +53 -55
- package/tsconfig.json +1 -1
- package/harness/commands/oh-doctor.md +0 -205
- package/harness/commands/oh-log.md +0 -18
- package/harness/skills/oh-learn/DEEP.md +0 -44
- package/harness/skills/oh-learn/SKILL.md +0 -30
- package/scripts/count-tokens.mjs +0 -158
- package/scripts/oh-doctor.ps1 +0 -342
package/CONTEXT.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# OpenHermes β Shared Language
|
|
2
2
|
|
|
3
3
|
## Terms
|
|
4
|
-
**OpenHermes** β OpenCode-native orchestration layer for this package.
|
|
5
|
-
**Skill** β A `SKILL.md` loaded on demand through OpenCode's skill tool.
|
|
6
|
-
**Command** β A slash command backed by package-local markdown
|
|
7
|
-
**Agent** β A primary or subagent definition loaded through OpenCode config.
|
|
8
|
-
**Instruction** β Markdown loaded through `AGENTS.md` or `opencode.json` instructions.
|
|
9
|
-
**Bootstrap** β The first-message context injected by the OpenHermes plugin.
|
|
4
|
+
**OpenHermes** β OpenCode-native orchestration layer for this package.
|
|
5
|
+
**Skill** β A `SKILL.md` loaded on demand through OpenCode's skill tool.
|
|
6
|
+
**Command** β A slash command backed by package-local command markdown; legacy compatibility loaders remain only where runtime-backed.
|
|
7
|
+
**Agent** β A primary or subagent definition loaded through OpenCode config.
|
|
8
|
+
**Instruction** β Markdown loaded through `AGENTS.md` or `opencode.json` instructions.
|
|
9
|
+
**Bootstrap** β The first-message context injected by the OpenHermes plugin.
|
|
10
10
|
|
|
11
11
|
### Confidence Gate Terms
|
|
12
12
|
**Confidence Gate** β Phase 0.5 protocol in the autopilot loop that evaluates signal strength before routing. Bounded to 1 conversational exchange max.
|
|
@@ -24,4 +24,4 @@
|
|
|
24
24
|
- OpenHermes is the default primary Agent.
|
|
25
25
|
|
|
26
26
|
## Flagged Ambiguities
|
|
27
|
-
- Durable state
|
|
27
|
+
- Durable state resolved β 4-Tier Memory subsystem (System/Project/Mission/Task) now provides structured persistence with importance-driven retention.
|
package/ETHOS.md
CHANGED
|
@@ -8,8 +8,8 @@ OpenCode-native loading over manual copying or hidden state.
|
|
|
8
8
|
## Small Surface
|
|
9
9
|
Every file earns its keep. Prefer markdown when behavior is declarative.
|
|
10
10
|
|
|
11
|
-
## Skills Over Glue
|
|
12
|
-
Behavior lives in `SKILL.md`,
|
|
11
|
+
## Skills Over Glue
|
|
12
|
+
Behavior lives in `SKILL.md`, command markdown, and agent markdown. Legacy command-doc compatibility loaders remain supported only where runtime-backed.
|
|
13
13
|
|
|
14
14
|
## Always Delegate β Never Execute
|
|
15
15
|
OpenHermes orchestrates and reports. Sub-agents execute. OpenHermes never writes code, runs tests, or touches files directly.
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<a href="https://www.npmjs.com/package/openhermes"><img src="https://img.shields.io/npm/v/openhermes?style=for-the-badge&label=version&color=FFD700" alt="
|
|
8
|
+
<a href="https://www.npmjs.com/package/openhermes"><img src="https://img.shields.io/npm/v/openhermes?style=for-the-badge&label=version&color=FFD700" alt="v4.11.3"></a>
|
|
9
9
|
<a href="https://github.com/nathwn12/openhermes/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge" alt="License: MIT"></a>
|
|
10
10
|
<a href="https://opencode.ai"><img src="https://img.shields.io/badge/runs%20on-OpenCode-6366f1?style=for-the-badge" alt="Runs on OpenCode"></a>
|
|
11
11
|
<a href="https://github.com/nathwn12/openhermes"><img src="https://img.shields.io/badge/β%20star%20on-GitHub-181717?style=for-the-badge" alt="Star on GitHub"></a>
|
|
@@ -31,27 +31,20 @@ To install from `dev` (latest features, may be unstable):
|
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
34
|
-
## One sentence.
|
|
34
|
+
## One sentence. One engine.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
OpenHermes v4.11 ships with a hardened internal architecture β 8 subsystems working together to make every session faster, more reliable, and fully autonomous:
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
|
43
|
-
|
|
44
|
-
| **
|
|
45
|
-
| **
|
|
46
|
-
| **
|
|
47
|
-
| **
|
|
48
|
-
| **5** | `oh-planner` β `oh-manifest` | Plan solid β enter build loop |
|
|
49
|
-
| **6** | `oh-planner` β `oh-builder` β `oh-gauntlet` | Implement β test β review β loop |
|
|
50
|
-
| **7** | `oh-gauntlet` β `oh-ship` | Tests pass β PR pipeline |
|
|
51
|
-
| **8** | `oh-ship` β `oh-retro` | Shipped β retrospective |
|
|
52
|
-
| **9** | `oh-retro` β `oh-planner` | Ready for the next cycle |
|
|
53
|
-
|
|
54
|
-
One sentence. Nine automated steps. Each skill loaded on demand, executed in isolation, routed to the next specialist. **Auto-classify, delegate, route, repeat.** That's the entire model.
|
|
38
|
+
| Subsystem | What it does |
|
|
39
|
+
|-----------|-------------|
|
|
40
|
+
| **Prompt Composer** | 9 modular fragments joined at runtime β byte-identical. Add a fragment, never edit the composition code. |
|
|
41
|
+
| **Auto-Recovery** | 9 error categories with typed actions β retry with backoff, compact on overflow, escalate on unknowns. Self-healing. |
|
|
42
|
+
| **4-Tier Memory** | System β Project β Mission β Task. Importance-scored, budget-enforced, plan-file-persisted. Context that survives hops. |
|
|
43
|
+
| **Hook Registry** | Pluggable pre-tool, post-tool, route, and session hooks with topological sort. 8 built-in hooks, zero routing boilerplate. |
|
|
44
|
+
| **MVCC Sync** | Atomic writes, version counters, conflict detection. Multiple sub-agents writing the same plan file β no data loss. |
|
|
45
|
+
| **Sanity Checker** | 8 output degeneration detectors β repetition, gibberish, low diversity β with automatic escalation and recovery injection. |
|
|
46
|
+
| **Background Cmd** | Fire-and-forget process spawning with timeout, status polling, and auto-cleanup. Non-blocking long-running tasks. |
|
|
47
|
+
| **Plan Location** | Resolves plan file paths per project with directory-per-project layout in `~/.local/share/openhermes/plans/`. |
|
|
55
48
|
|
|
56
49
|
---
|
|
57
50
|
|
|
@@ -78,15 +71,15 @@ The loop runs unsupervised because these never turn off:
|
|
|
78
71
|
| Capability | Why it matters |
|
|
79
72
|
|---|---|
|
|
80
73
|
| **Self-driving loop** | Type once. OpenHermes classifies, delegates, and routes β no pauses, no asking permission, no verbosity. |
|
|
81
|
-
| **
|
|
82
|
-
| **Auto-detected user skills** | Drop a skill in `~/.agents/skills/`. OpenHermes finds it. Same name as a built-in? Your version wins. Survives `npm update`. |
|
|
83
|
-
| **`/oh-doctor`** | Verify plugin load, skill discovery, command registration, config safety. |
|
|
84
|
-
| **`/oh-log`** | Session log β routing hops, skill loads, compaction events. |
|
|
74
|
+
| **30 specialist skills** | Planning β building β testing β browser β security β review β shipping β retro. Every dev cycle phase. |
|
|
75
|
+
| **Auto-detected user skills** | Drop a skill in `~/.agents/skills/` or `~/.config/opencode/skills/`. OpenHermes finds it. Same name as a built-in? Your version wins. Survives `npm update`. |
|
|
85
76
|
| **Shared operating model** | CHARTER + AUTOPILOT + CONTEXT + ETHOS injected every session. Every interaction grounded in the same rules. |
|
|
86
77
|
| **CORE/DEEP skill format** | Every skill is a two-file system: CORE (SKILL.md) handles 80% of passes in one read. DEEP.md loads on demand for hard cases. |
|
|
87
|
-
| **Plan file storage** | `~/.local/share/
|
|
78
|
+
| **Plan file storage** | `~/.local/share/openhermes/plans/`. Survives `npm update`. |
|
|
79
|
+
| **8 internal subsystems** | Composer, recovery, memory, sync, hooks, plans, sanity, background β all native Node.js / TypeScript. |
|
|
80
|
+
| **Zero npm dependency additions** | All new subsystems use native Node.js and TypeScript only. No new packages. |
|
|
88
81
|
|
|
89
|
-
##
|
|
82
|
+
## 30 skills β four tiers
|
|
90
83
|
|
|
91
84
|
### Tier 4 β Pipeline orchestrators
|
|
92
85
|
Full multi-phase workflows:
|
|
@@ -132,7 +125,6 @@ Single-purpose, one thing well:
|
|
|
132
125
|
| **oh-issue** | Break a plan/spec/PRD into independently-grabbable issues |
|
|
133
126
|
| **oh-prd** | Conversation β PRD β GitHub issue |
|
|
134
127
|
| **oh-freeze** | Restrict file edits to a specific directory |
|
|
135
|
-
| **oh-learn** | Extract, evolve, promote session learnings as instincts |
|
|
136
128
|
| **oh-guard** | Safety confirmation β warn before destructive operations |
|
|
137
129
|
| **oh-skills-link** | Verify OpenCode discovers the skill directory |
|
|
138
130
|
| **oh-skills-list** | List all available `oh-*` skills |
|
|
@@ -148,17 +140,26 @@ openhermes-pkg/
|
|
|
148
140
|
βββ ETHOS.md # Operating principles
|
|
149
141
|
βββ bootstrap.ts # Plugin entry β registers everything
|
|
150
142
|
βββ index.ts # Package entrypoint
|
|
151
|
-
βββ lib/ # harness-resolver.ts
|
|
152
143
|
βββ harness/
|
|
153
144
|
β βββ agents/ # Agent manifests (OpenHermes primary)
|
|
154
145
|
β βββ codex/ # CHARTER, AUTOPILOT
|
|
155
|
-
β βββ
|
|
156
|
-
β βββ
|
|
157
|
-
β
|
|
146
|
+
β βββ instructions/ # SHELL.md
|
|
147
|
+
β βββ lib/ # Internal subsystems
|
|
148
|
+
β β βββ composer/ # Prompt fragment composition
|
|
149
|
+
β β βββ recovery/ # Auto-recovery with error patterns
|
|
150
|
+
β β βββ memory/ # 4-tier hierarchical memory
|
|
151
|
+
β β βββ sync/ # MVCC plan synchronization
|
|
152
|
+
β β βββ hooks/ # Pluggable hook registry
|
|
153
|
+
β β βββ plans/ # Plan file path resolution
|
|
154
|
+
β β βββ sanity/ # Output degeneration detection
|
|
155
|
+
β β βββ background/ # Fire-and-forget command system
|
|
156
|
+
β βββ skills/ # 30 skill SKILL.md files (CORE/DEEP format)
|
|
157
|
+
βββ lib/ # harness-resolver.ts
|
|
158
158
|
βββ test/
|
|
159
|
+
βββ harness/ # Test utilities (fixture, builders, mocks)
|
|
159
160
|
```
|
|
160
161
|
|
|
161
|
-
Plan files: `~/.local/share/
|
|
162
|
+
Plan files: `~/.local/share/openhermes/plans/<project>/plan-<nnn>.md`
|
|
162
163
|
|
|
163
164
|
---
|
|
164
165
|
|
|
@@ -166,7 +167,7 @@ Plan files: `~/.local/share/opencode/openhermes/plans/<project>-plan-<nnn>.md`
|
|
|
166
167
|
|
|
167
168
|
1. Add the plugin line to `opencode.json`
|
|
168
169
|
2. Restart or reload OpenCode
|
|
169
|
-
3.
|
|
170
|
+
3. Verify the plugin loaded in the startup log
|
|
170
171
|
4. Type *any* prompt β "plan a feature", "investigate this bug", "refactor this module"
|
|
171
172
|
|
|
172
173
|
The first time you see OpenHermes auto-route to a specialist skill without you asking β you'll feel the loop.
|