@hybridaione/hybridclaw 0.8.2 → 0.8.4

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 (163) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +12 -3
  3. package/config.example.json +8 -1
  4. package/console/dist/assets/index-CSApibDa.js +13 -0
  5. package/console/dist/index.html +1 -1
  6. package/container/dist/approval-policy.js +17 -1
  7. package/container/dist/approval-policy.js.map +1 -1
  8. package/container/dist/browser-tools.js +277 -9
  9. package/container/dist/browser-tools.js.map +1 -1
  10. package/container/dist/context-guard.js +84 -0
  11. package/container/dist/context-guard.js.map +1 -0
  12. package/container/dist/in-loop-compaction.js +184 -0
  13. package/container/dist/in-loop-compaction.js.map +1 -0
  14. package/container/dist/index.js +116 -8
  15. package/container/dist/index.js.map +1 -1
  16. package/container/dist/providers/hybridai.js +3 -2
  17. package/container/dist/providers/hybridai.js.map +1 -1
  18. package/container/dist/text-truncation.js +28 -0
  19. package/container/dist/text-truncation.js.map +1 -0
  20. package/container/dist/token-usage.js +35 -11
  21. package/container/dist/token-usage.js.map +1 -1
  22. package/container/dist/web-fetch.js +15 -4
  23. package/container/dist/web-fetch.js.map +1 -1
  24. package/container/package-lock.json +2 -2
  25. package/container/package.json +1 -1
  26. package/container/shared/context-guard-config.d.ts +14 -0
  27. package/container/shared/context-guard-config.js +73 -0
  28. package/container/shared/model-names.d.ts +8 -0
  29. package/container/shared/model-names.js +38 -0
  30. package/container/src/approval-policy.ts +17 -1
  31. package/container/src/browser-tools.ts +297 -13
  32. package/container/src/context-guard.ts +142 -0
  33. package/container/src/in-loop-compaction.ts +241 -0
  34. package/container/src/index.ts +143 -2
  35. package/container/src/providers/hybridai.ts +3 -2
  36. package/container/src/text-truncation.ts +34 -0
  37. package/container/src/token-usage.ts +49 -10
  38. package/container/src/types.ts +9 -0
  39. package/container/src/web-fetch.ts +24 -7
  40. package/dist/agent/conversation.d.ts +1 -0
  41. package/dist/agent/conversation.d.ts.map +1 -1
  42. package/dist/agent/conversation.js +2 -1
  43. package/dist/agent/conversation.js.map +1 -1
  44. package/dist/agent/prompt-hooks.d.ts +3 -1
  45. package/dist/agent/prompt-hooks.d.ts.map +1 -1
  46. package/dist/agent/prompt-hooks.js +21 -0
  47. package/dist/agent/prompt-hooks.js.map +1 -1
  48. package/dist/audit/observability-ingest.d.ts.map +1 -1
  49. package/dist/audit/observability-ingest.js +13 -1
  50. package/dist/audit/observability-ingest.js.map +1 -1
  51. package/dist/channels/discord/delivery.d.ts +2 -1
  52. package/dist/channels/discord/delivery.d.ts.map +1 -1
  53. package/dist/channels/discord/delivery.js +6 -2
  54. package/dist/channels/discord/delivery.js.map +1 -1
  55. package/dist/channels/discord/runtime.d.ts.map +1 -1
  56. package/dist/channels/discord/runtime.js.map +1 -1
  57. package/dist/cli.d.ts.map +1 -1
  58. package/dist/cli.js +101 -8
  59. package/dist/cli.js.map +1 -1
  60. package/dist/command-registry.d.ts +8 -2
  61. package/dist/command-registry.d.ts.map +1 -1
  62. package/dist/command-registry.js +151 -7
  63. package/dist/command-registry.js.map +1 -1
  64. package/dist/config/config.d.ts +5 -0
  65. package/dist/config/config.d.ts.map +1 -1
  66. package/dist/config/config.js +12 -0
  67. package/dist/config/config.js.map +1 -1
  68. package/dist/config/runtime-config.d.ts +8 -1
  69. package/dist/config/runtime-config.d.ts.map +1 -1
  70. package/dist/config/runtime-config.js +7 -1
  71. package/dist/config/runtime-config.js.map +1 -1
  72. package/dist/gateway/gateway-client.d.ts +2 -2
  73. package/dist/gateway/gateway-client.d.ts.map +1 -1
  74. package/dist/gateway/gateway-client.js.map +1 -1
  75. package/dist/gateway/gateway-http-server.d.ts +2 -0
  76. package/dist/gateway/gateway-http-server.d.ts.map +1 -0
  77. package/dist/gateway/{health.js → gateway-http-server.js} +14 -4
  78. package/dist/gateway/gateway-http-server.js.map +1 -0
  79. package/dist/gateway/gateway-service.d.ts +3 -2
  80. package/dist/gateway/gateway-service.d.ts.map +1 -1
  81. package/dist/gateway/gateway-service.js +361 -64
  82. package/dist/gateway/gateway-service.js.map +1 -1
  83. package/dist/gateway/gateway-types.d.ts +32 -1
  84. package/dist/gateway/gateway-types.d.ts.map +1 -1
  85. package/dist/gateway/gateway-types.js.map +1 -1
  86. package/dist/gateway/gateway.js +4 -4
  87. package/dist/gateway/gateway.js.map +1 -1
  88. package/dist/infra/container-runner.d.ts.map +1 -1
  89. package/dist/infra/container-runner.js +8 -1
  90. package/dist/infra/container-runner.js.map +1 -1
  91. package/dist/infra/host-runner.d.ts.map +1 -1
  92. package/dist/infra/host-runner.js +8 -1
  93. package/dist/infra/host-runner.js.map +1 -1
  94. package/dist/memory/citation-extractor.d.ts +3 -0
  95. package/dist/memory/citation-extractor.d.ts.map +1 -0
  96. package/dist/memory/citation-extractor.js +14 -0
  97. package/dist/memory/citation-extractor.js.map +1 -0
  98. package/dist/memory/memory-service.d.ts +2 -1
  99. package/dist/memory/memory-service.d.ts.map +1 -1
  100. package/dist/memory/memory-service.js +15 -4
  101. package/dist/memory/memory-service.js.map +1 -1
  102. package/dist/plugins/plugin-config.d.ts +20 -0
  103. package/dist/plugins/plugin-config.d.ts.map +1 -0
  104. package/dist/plugins/plugin-config.js +125 -0
  105. package/dist/plugins/plugin-config.js.map +1 -0
  106. package/dist/plugins/plugin-formatting.d.ts.map +1 -1
  107. package/dist/plugins/plugin-formatting.js +7 -0
  108. package/dist/plugins/plugin-formatting.js.map +1 -1
  109. package/dist/plugins/plugin-install.d.ts +4 -0
  110. package/dist/plugins/plugin-install.d.ts.map +1 -1
  111. package/dist/plugins/plugin-install.js +94 -35
  112. package/dist/plugins/plugin-install.js.map +1 -1
  113. package/dist/plugins/plugin-manager.d.ts +17 -1
  114. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  115. package/dist/plugins/plugin-manager.js +189 -35
  116. package/dist/plugins/plugin-manager.js.map +1 -1
  117. package/dist/plugins/plugin-types.d.ts +13 -0
  118. package/dist/plugins/plugin-types.d.ts.map +1 -1
  119. package/dist/providers/local-discovery.d.ts.map +1 -1
  120. package/dist/providers/local-discovery.js +60 -2
  121. package/dist/providers/local-discovery.js.map +1 -1
  122. package/dist/providers/model-catalog.d.ts.map +1 -1
  123. package/dist/providers/model-catalog.js +2 -1
  124. package/dist/providers/model-catalog.js.map +1 -1
  125. package/dist/providers/model-names.d.ts +4 -0
  126. package/dist/providers/model-names.d.ts.map +1 -0
  127. package/dist/providers/model-names.js +15 -0
  128. package/dist/providers/model-names.js.map +1 -0
  129. package/dist/providers/task-routing.d.ts.map +1 -1
  130. package/dist/providers/task-routing.js.map +1 -1
  131. package/dist/skills/skills.d.ts.map +1 -1
  132. package/dist/skills/skills.js +2 -40
  133. package/dist/skills/skills.js.map +1 -1
  134. package/dist/tui-slash-command.d.ts +3 -1
  135. package/dist/tui-slash-command.d.ts.map +1 -1
  136. package/dist/tui-slash-command.js +2 -2
  137. package/dist/tui-slash-command.js.map +1 -1
  138. package/dist/tui-slash-menu.d.ts +2 -1
  139. package/dist/tui-slash-menu.d.ts.map +1 -1
  140. package/dist/tui-slash-menu.js +2 -2
  141. package/dist/tui-slash-menu.js.map +1 -1
  142. package/dist/tui.d.ts.map +1 -1
  143. package/dist/tui.js +92 -23
  144. package/dist/tui.js.map +1 -1
  145. package/dist/types.d.ts +19 -0
  146. package/dist/types.d.ts.map +1 -1
  147. package/dist/types.js.map +1 -1
  148. package/dist/utils/executables.d.ts +4 -0
  149. package/dist/utils/executables.d.ts.map +1 -0
  150. package/dist/utils/executables.js +67 -0
  151. package/dist/utils/executables.js.map +1 -0
  152. package/docs/development/README.md +2 -0
  153. package/docs/development/extensibility.md +3 -0
  154. package/docs/development/plugins.md +81 -4
  155. package/docs/development/qmd-memory-plugin.md +172 -0
  156. package/docs/development/releasing.md +20 -0
  157. package/docs/development/runtime.md +2 -1
  158. package/docs/index.html +20 -7
  159. package/package.json +1 -1
  160. package/console/dist/assets/index-tVP5mPxn.js +0 -13
  161. package/dist/gateway/health.d.ts +0 -2
  162. package/dist/gateway/health.d.ts.map +0 -1
  163. package/dist/gateway/health.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,52 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.8.4](https://github.com/HybridAIOne/hybridclaw/tree/v0.8.4)
6
+
7
+ ### Added
8
+
9
+ - **Local plugin runtime and admin plugin visibility**: Added local plugins
10
+ with typed manifests, plugin tools, memory layers, prompt hooks, lifecycle
11
+ hooks, CLI/TUI `plugin` management commands, and a dedicated `Plugins` page
12
+ in the embedded admin console.
13
+ - **Installable QMD memory plugin**: Added the repo-shipped
14
+ `plugins/qmd-memory` source plus maintainer docs for markdown-backed
15
+ retrieval and optional session-transcript export into QMD collections.
16
+ - **In-loop context compaction guard**: Added token-budget-aware context
17
+ compaction with reusable guard config so long sessions can flush durable
18
+ memory and trim prompt context before requests exceed model budgets.
19
+ - **Recalled memory citations**: Added citation metadata for recalled memory
20
+ snippets so injected context can be traced back to its originating memory.
21
+
22
+ ### Fixed
23
+
24
+ - **Docker runtime packaging and login redirect gating**: Fixed the published
25
+ container image startup path by shipping `container/shared/` in the runtime
26
+ stage, and restricted browser login redirects to Docker deployments instead
27
+ of forcing them on localhost web sessions.
28
+ - **Cloudflare-tolerant web fetch retries**: `web_fetch` can retry with a
29
+ bot-style user agent when the first attempt lands on a Cloudflare challenge
30
+ page.
31
+ - **Model catalog sync and LM Studio metadata handling**: Synced HybridAI bot
32
+ models and display labels more consistently, and restored LM Studio v1
33
+ context-window metadata detection.
34
+
35
+ ## [0.8.3](https://github.com/HybridAIOne/hybridclaw/tree/v0.8.3)
36
+
37
+ ### Added
38
+
39
+ - **Landing-page release highlights**: Added the 0.8.1 and 0.8.2 user-facing
40
+ updates to the docs landing page so the latest shipped changes are visible
41
+ from the project site.
42
+
43
+ ### Fixed
44
+
45
+ - **Browser click fallbacks for JS-only cards**: `browser_click` can fall back
46
+ to visible text or CSS selectors when snapshot refs are missing, resolves a
47
+ likely clickable ancestor before dispatching the click, keeps provider-safe
48
+ tool schema metadata, and preserves backward-compatible mixed-target
49
+ priority of `text`, then `selector`, then `ref`.
50
+
5
51
  ## [0.8.2](https://github.com/HybridAIOne/hybridclaw/tree/v0.8.2)
6
52
 
7
53
  ### Added
package/README.md CHANGED
@@ -7,6 +7,7 @@
7
7
  [![License](https://img.shields.io/github/license/HybridAIOne/hybridclaw)](https://github.com/HybridAIOne/hybridclaw/blob/main/LICENSE)
8
8
  [![Docs](https://img.shields.io/badge/docs-github%20pages-blue)](https://hybridaione.github.io/hybridclaw/)
9
9
  [![Powered by HybridAI](https://img.shields.io/badge/powered%20by-HybridAI-blueviolet)](https://hybridai.one)
10
+ [![Discord](https://img.shields.io/badge/Discord-join%20chat-5865F2?logo=discord&logoColor=white)](https://discord.gg/jsVW4vJw27)
10
11
 
11
12
  <img width="540" height="511" alt="image" src="docs/hero.png" />
12
13
 
@@ -17,6 +18,9 @@ HybridClaw keeps one assistant brain across team chat, inbox, browser, and
17
18
  document workflows with shared memory, approvals, scheduling, and bundled
18
19
  skills for office docs, GitHub, Notion, Stripe, WordPress, Google Workspace,
19
20
  and Apple apps.
21
+ Local plugins can extend the gateway with typed manifests, plugin tools,
22
+ memory layers, prompt hooks, and lifecycle hooks, including the installable
23
+ QMD-backed memory layer shipped in `plugins/qmd-memory`.
20
24
 
21
25
  Operators can also health-check the runtime with `hybridclaw doctor`, tune
22
26
  skill availability globally or per channel, and review adaptive skill health
@@ -94,7 +98,7 @@ hybridclaw tui
94
98
 
95
99
  # Embedded admin console
96
100
  # open http://127.0.0.1:9090/admin
97
- # Includes Dashboard, Sessions, Channels, Config, Models, Scheduler, MCP, Audit, Skills, and Tools
101
+ # Includes Dashboard, Gateway, Sessions, Bindings, Models, Scheduler, MCP, Audit, Skills, Plugins, Tools, and Config
98
102
  # If WEB_API_TOKEN is unset, localhost access opens without a login prompt
99
103
  # If WEB_API_TOKEN is set, /chat, /agents, and /admin all prompt for the same token
100
104
  ```
@@ -209,6 +213,7 @@ HybridClaw creates `~/.hybridclaw/config.json` on first run and hot-reloads most
209
213
  - `sessionReset.*` controls automatic daily and idle session expiry. The default policy resets both daily and after 24 hours idle at `04:00` in the gateway host's local timezone; set `sessionReset.defaultPolicy.mode` to `none` to disable automatic resets.
210
214
  - `sessionRouting.*` controls DM continuity scope. The default `per-channel-peer` mode keeps direct messages isolated by transport and peer identity; `per-linked-identity` plus `sessionRouting.identityLinks` can collapse verified aliases onto one shared main session.
211
215
  - `skills.disabled` and `skills.channelDisabled.{discord,msteams,whatsapp,email}` control global and per-channel skill availability. Use `hybridclaw skill enable|disable <name> [--channel <kind>]` or the TUI `/skill config` checklist to manage them.
216
+ - `plugins.list[]` controls plugin overrides such as `enabled`, custom `path`, and top-level `config` values. Use `hybridclaw plugin config <plugin-id> [key] [value|--unset]` for focused edits without rewriting the full config file.
212
217
  - `adaptiveSkills.*` controls observation, inspection, amendment staging, and rollback for the self-improving skill loop. See [docs/development/adaptive-skills.md](./docs/development/adaptive-skills.md) for the operator workflow.
213
218
  - `email.pollIntervalMs` defaults to `30000` (30 seconds) and is clamped to a minimum of `1000`.
214
219
  - `ops.webApiToken` (or `WEB_API_TOKEN`) gates the built-in `/chat`, `/agents`, and `/admin` surfaces plus the admin API. When unset, localhost browser access stays open without a login prompt.
@@ -458,6 +463,9 @@ CLI runtime commands:
458
463
  - `hybridclaw skill enable <skill-name> [--channel <kind>]`, `disable`, `toggle` — Manage global and per-channel skill availability
459
464
  - `hybridclaw skill inspect <skill-name>` / `hybridclaw skill inspect --all`, `runs`, `amend`, `history` — Review adaptive skill health, observations, and amendment history
460
465
  - `hybridclaw skill install <skill> [install-id]` — Run a declared skill dependency installer
466
+ - `hybridclaw plugin list` — Show discovered plugins, enabled state, registered tools/hooks, and load errors
467
+ - `hybridclaw plugin config <plugin-id> [key] [value|--unset]` — Inspect or change one top-level `plugins.list[].config` override
468
+ - `hybridclaw plugin install <path|npm-spec>`, `reinstall`, `uninstall` — Manage plugins installed under `~/.hybridclaw/plugins`
461
469
  - `hybridclaw update [status|--check] [--yes]` — Check for updates and upgrade global npm installs (source checkouts get git-based update instructions)
462
470
  - `hybridclaw audit ...` — Verify and inspect structured audit trail (`recent`, `search`, `approvals`, `verify`, `instructions`)
463
471
  - `hybridclaw audit instructions [--sync]` — Compare runtime instruction copies under `~/.hybridclaw/instructions/` against installed sources and restore shipped defaults when needed
@@ -499,7 +507,8 @@ Up/Down on an empty prompt recalls earlier prompts. Use `/agent`, `/agent list`,
499
507
  the agent/default model chain, and `/model info` to inspect the active scope.
500
508
  `/status` shows both the current session and agent; `/compact` handles session
501
509
  compaction; `/reset` runs the confirmed workspace reset flow; `/skill config`
502
- opens the interactive skill availability checklist; and `/mcp ...` manages
503
- runtime MCP servers. When a TUI session exits, HybridClaw prints the
510
+ opens the interactive skill availability checklist; `/plugin list`,
511
+ `/plugin config ...`, and `/plugin reload` manage runtime plugins; and
512
+ `/mcp ...` manages runtime MCP servers. When a TUI session exits, HybridClaw prints the
504
513
  input/output token split, tool/file totals, and a ready-to-run
505
514
  `hybridclaw tui --resume <sessionId>` command for that session.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": 16,
2
+ "version": 17,
3
3
  "security": {
4
4
  "trustModelAccepted": false,
5
5
  "trustModelAcceptedAt": "",
@@ -345,6 +345,13 @@
345
345
  "enabled": true,
346
346
  "maxMessages": 80,
347
347
  "maxChars": 24000
348
+ },
349
+ "inLoopGuard": {
350
+ "enabled": true,
351
+ "perResultShare": 0.5,
352
+ "compactionRatio": 0.75,
353
+ "overflowRatio": 0.9,
354
+ "maxRetries": 3
348
355
  }
349
356
  },
350
357
  "promptHooks": {