openhermes 4.12.1 → 4.13.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.
Files changed (73) hide show
  1. package/CONTEXT.md +6 -6
  2. package/ETHOS.md +2 -2
  3. package/README.md +11 -17
  4. package/bootstrap.ts +118 -126
  5. package/docs/HOW-IT-WORKS.md +162 -0
  6. package/docs/adr/ADR-0001-rebuild-vs-increment.md +30 -0
  7. package/docs/adr/ADR-0002-routing-graph-vs-linear-chain.md +36 -0
  8. package/docs/adr/ADR-0003-per-directory-plan-storage.md +34 -0
  9. package/docs/adr/ADR-0004-composer-fragment-architecture.md +42 -0
  10. package/docs/adr/ADR-0005-hook-system-design.md +42 -0
  11. package/docs/adr/README.md +9 -0
  12. package/harness/codex/AUTOPILOT.md +35 -40
  13. package/harness/codex/CHARTER.md +3 -3
  14. package/harness/lib/composer/compose.test.ts +29 -29
  15. package/harness/lib/composer/fragments/02-delegation.md +5 -5
  16. package/harness/lib/composer/fragments/04-task-flow.md +13 -13
  17. package/harness/lib/composer/fragments/08-routing.md +1 -1
  18. package/harness/lib/composer/fragments/09-guardrails.md +25 -25
  19. package/harness/lib/composer/index.ts +1 -1
  20. package/harness/lib/guards/guard-config.ts +72 -72
  21. package/harness/lib/hooks/builtins/confidence-gate-hook.ts +9 -9
  22. package/harness/lib/hooks/builtins/delegation-depth-hook.ts +1 -1
  23. package/harness/lib/hooks/builtins/dynamic-route-hook.ts +99 -99
  24. package/harness/lib/hooks/builtins/next-route-hook.ts +24 -24
  25. package/harness/lib/hooks/builtins/plan-check-hook.ts +5 -5
  26. package/harness/lib/hooks/builtins/route-tracking-hook.ts +1 -1
  27. package/harness/lib/hooks/hooks.test.ts +160 -324
  28. package/harness/lib/hooks/index.ts +38 -42
  29. package/harness/lib/hooks/registry.ts +309 -416
  30. package/harness/lib/hooks/types.ts +116 -119
  31. package/harness/lib/plans/plan-location.ts +134 -134
  32. package/harness/lib/routing/index.ts +21 -21
  33. package/harness/lib/routing/route-guidance.ts +147 -147
  34. package/harness/lib/routing/route-resolver.ts +58 -58
  35. package/harness/lib/routing/routing.test.ts +195 -195
  36. package/harness/lib/routing/skill-frontmatter.ts +125 -125
  37. package/harness/lib/routing/types.ts +52 -52
  38. package/harness/skills/oh-ascii/SKILL.md +1 -1
  39. package/harness/skills/oh-fusion/DEEP.md +109 -109
  40. package/harness/skills/oh-fusion/SKILL.md +47 -47
  41. package/harness/skills/oh-init/DEEP.md +2 -2
  42. package/harness/skills/oh-plan-review/DEEP.md +1 -1
  43. package/harness/skills/oh-planner/DEEP.md +3 -3
  44. package/harness/skills/oh-review/DEEP.md +5 -5
  45. package/package.json +56 -53
  46. package/harness/lib/background/background.test.ts +0 -216
  47. package/harness/lib/background/index.ts +0 -7
  48. package/harness/lib/background/interfaces.ts +0 -31
  49. package/harness/lib/background/manager.ts +0 -320
  50. package/harness/lib/hooks/builtins/error-recovery-hook.ts +0 -107
  51. package/harness/lib/hooks/builtins/memory-sync-hook.ts +0 -73
  52. package/harness/lib/hooks/builtins/sanity-check-hook.ts +0 -52
  53. package/harness/lib/hooks/builtins/subagent-failure-hook.ts +0 -93
  54. package/harness/lib/memory/index.ts +0 -18
  55. package/harness/lib/memory/interfaces.ts +0 -53
  56. package/harness/lib/memory/memory-manager.ts +0 -205
  57. package/harness/lib/memory/memory.test.ts +0 -485
  58. package/harness/lib/memory/plan-store.ts +0 -346
  59. package/harness/lib/recovery/handler.ts +0 -243
  60. package/harness/lib/recovery/index.ts +0 -14
  61. package/harness/lib/recovery/interfaces.ts +0 -48
  62. package/harness/lib/recovery/patterns.ts +0 -149
  63. package/harness/lib/recovery/recovery.test.ts +0 -312
  64. package/harness/lib/sanity/anomaly-tracker.ts +0 -127
  65. package/harness/lib/sanity/checker.ts +0 -189
  66. package/harness/lib/sanity/index.ts +0 -13
  67. package/harness/lib/sanity/interfaces.ts +0 -24
  68. package/harness/lib/sanity/sanity.test.ts +0 -472
  69. package/harness/lib/sync/file-watcher.ts +0 -175
  70. package/harness/lib/sync/index.ts +0 -11
  71. package/harness/lib/sync/interfaces.ts +0 -27
  72. package/harness/lib/sync/plan-sync.ts +0 -533
  73. package/harness/lib/sync/sync.test.ts +0 -858
@@ -1,42 +1,38 @@
1
- // ---------------------------------------------------------------------------
2
- // Hook System — barrel export
3
- // ---------------------------------------------------------------------------
4
-
5
- export {
6
- HookPhase,
7
- HookResult,
8
- } from "./types.ts";
9
- export type {
10
- HookContextBase,
11
- HookContextExtras,
12
- HookContext,
13
- HookContextPatch,
14
- HookMetadata,
15
- PreToolUseHook,
16
- PostToolUseHook,
17
- RouteHook,
18
- SessionHook,
19
- AnyHook,
20
- } from "./types.ts";
21
-
22
- export { HookRegistry } from "./registry.ts";
23
-
24
- // Built-in hooks
25
- export { planCheckHook } from "./builtins/plan-check-hook.ts";
26
- export { shellDetectHook } from "./builtins/shell-detect-hook.ts";
27
- export { confidenceGateHook } from "./builtins/confidence-gate-hook.ts";
28
- export { delegationDepthHook, resetDepthTracker } from "./builtins/delegation-depth-hook.ts";
29
- export { errorRecoveryHook } from "./builtins/error-recovery-hook.ts";
30
- export { memorySyncHook } from "./builtins/memory-sync-hook.ts";
31
- export { sanityCheckHook } from "./builtins/sanity-check-hook.ts";
32
- export { dynamicRouteHook } from "./builtins/dynamic-route-hook.ts";
33
- export { nextRouteHook } from "./builtins/next-route-hook.ts";
34
- export { routeTrackingHook, resetRouteTracker, getHopHistory } from "./builtins/route-tracking-hook.ts";
35
- export type { HopRecord, RouteTrackingConfig } from "./builtins/route-tracking-hook.ts";
36
-
37
- // Guard configuration
38
- export type { GuardConfig, GuardProgression, GuardLevel } from "../guards/guard-config.ts";
39
- export { DEFAULT_GUARD_CONFIG, checkGuardProgression, mergeGuardConfig } from "../guards/guard-config.ts";
40
-
41
- // Subagent failure hook
42
- export { subagentFailureHook, resetSubagentFailures, getSubagentFailureCount } from "./builtins/subagent-failure-hook.ts";
1
+ // ---------------------------------------------------------------------------
2
+ // Hook System — barrel export
3
+ // ---------------------------------------------------------------------------
4
+
5
+ export {
6
+ HookPhase,
7
+ HookResult,
8
+ } from "./types.ts";
9
+ export type {
10
+ HookContextBase,
11
+ HookContextExtras,
12
+ HookContext,
13
+ HookContextPatch,
14
+ HookMetadata,
15
+ PreToolUseHook,
16
+ PostToolUseHook,
17
+ RouteHook,
18
+ SessionHook,
19
+ AnyHook,
20
+ } from "./types.ts";
21
+
22
+ export { HookRegistry } from "./registry.ts";
23
+
24
+ // Built-in hooks
25
+ export { planCheckHook } from "./builtins/plan-check-hook.ts";
26
+ export { shellDetectHook } from "./builtins/shell-detect-hook.ts";
27
+ export { confidenceGateHook } from "./builtins/confidence-gate-hook.ts";
28
+ export { delegationDepthHook, resetDepthTracker } from "./builtins/delegation-depth-hook.ts";
29
+ export { dynamicRouteHook } from "./builtins/dynamic-route-hook.ts";
30
+ export { nextRouteHook } from "./builtins/next-route-hook.ts";
31
+ export { routeTrackingHook, resetRouteTracker, getHopHistory } from "./builtins/route-tracking-hook.ts";
32
+ export type { HopRecord, RouteTrackingConfig } from "./builtins/route-tracking-hook.ts";
33
+
34
+ // Guard configuration
35
+ export type { GuardConfig, GuardProgression, GuardLevel } from "../guards/guard-config.ts";
36
+ export { DEFAULT_GUARD_CONFIG, checkGuardProgression, mergeGuardConfig } from "../guards/guard-config.ts";
37
+
38
+