@hybridaione/hybridclaw 0.2.12 → 0.3.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 (103) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +12 -7
  3. package/config.example.json +8 -2
  4. package/container/dist/approval-policy.js +1183 -0
  5. package/container/dist/approval-policy.js.map +1 -0
  6. package/container/dist/browser-tools.js +1523 -0
  7. package/container/dist/browser-tools.js.map +1 -0
  8. package/container/dist/extensions.js +114 -0
  9. package/container/dist/extensions.js.map +1 -0
  10. package/container/dist/hybridai-client.js +256 -0
  11. package/container/dist/hybridai-client.js.map +1 -0
  12. package/container/dist/index.js +866 -0
  13. package/container/dist/index.js.map +1 -0
  14. package/container/dist/ipc.js +32 -0
  15. package/container/dist/ipc.js.map +1 -0
  16. package/container/dist/model-retry.js +18 -0
  17. package/container/dist/model-retry.js.map +1 -0
  18. package/container/dist/runtime-paths.js +79 -0
  19. package/container/dist/runtime-paths.js.map +1 -0
  20. package/container/dist/token-usage.js +168 -0
  21. package/container/dist/token-usage.js.map +1 -0
  22. package/container/dist/tools.js +2265 -0
  23. package/container/dist/tools.js.map +1 -0
  24. package/container/dist/types.js +2 -0
  25. package/container/dist/types.js.map +1 -0
  26. package/container/dist/web-fetch.js +396 -0
  27. package/container/dist/web-fetch.js.map +1 -0
  28. package/container/package-lock.json +2 -2
  29. package/container/package.json +1 -1
  30. package/container/src/browser-tools.ts +20 -23
  31. package/container/src/index.ts +19 -29
  32. package/container/src/ipc.ts +1 -1
  33. package/container/src/runtime-paths.ts +116 -0
  34. package/container/src/tools.ts +32 -47
  35. package/dist/agent.d.ts.map +1 -1
  36. package/dist/agent.js +20 -8
  37. package/dist/agent.js.map +1 -1
  38. package/dist/audit-cli.d.ts.map +1 -1
  39. package/dist/audit-cli.js +25 -31
  40. package/dist/audit-cli.js.map +1 -1
  41. package/dist/cli-flags.d.ts +9 -0
  42. package/dist/cli-flags.d.ts.map +1 -0
  43. package/dist/cli-flags.js +53 -0
  44. package/dist/cli-flags.js.map +1 -0
  45. package/dist/cli.js +82 -51
  46. package/dist/cli.js.map +1 -1
  47. package/dist/config.d.ts +9 -0
  48. package/dist/config.d.ts.map +1 -1
  49. package/dist/config.js +63 -1
  50. package/dist/config.js.map +1 -1
  51. package/dist/container-runner.d.ts +25 -0
  52. package/dist/container-runner.d.ts.map +1 -1
  53. package/dist/container-runner.js +31 -6
  54. package/dist/container-runner.js.map +1 -1
  55. package/dist/container-setup.js +2 -2
  56. package/dist/container-setup.js.map +1 -1
  57. package/dist/executor.d.ts +45 -0
  58. package/dist/executor.d.ts.map +1 -0
  59. package/dist/executor.js +87 -0
  60. package/dist/executor.js.map +1 -0
  61. package/dist/gateway-service.d.ts.map +1 -1
  62. package/dist/gateway-service.js +8 -5
  63. package/dist/gateway-service.js.map +1 -1
  64. package/dist/gateway-types.d.ts +15 -0
  65. package/dist/gateway-types.d.ts.map +1 -1
  66. package/dist/gateway-types.js.map +1 -1
  67. package/dist/gateway.js +2 -2
  68. package/dist/gateway.js.map +1 -1
  69. package/dist/health.d.ts.map +1 -1
  70. package/dist/health.js +2 -1
  71. package/dist/health.js.map +1 -1
  72. package/dist/host-runner.d.ts +43 -0
  73. package/dist/host-runner.d.ts.map +1 -0
  74. package/dist/host-runner.js +284 -0
  75. package/dist/host-runner.js.map +1 -0
  76. package/dist/install-root.d.ts +4 -0
  77. package/dist/install-root.d.ts.map +1 -0
  78. package/dist/install-root.js +74 -0
  79. package/dist/install-root.js.map +1 -0
  80. package/dist/instruction-approval-audit.d.ts.map +1 -1
  81. package/dist/instruction-approval-audit.js +3 -3
  82. package/dist/instruction-approval-audit.js.map +1 -1
  83. package/dist/instruction-integrity.d.ts +27 -16
  84. package/dist/instruction-integrity.d.ts.map +1 -1
  85. package/dist/instruction-integrity.js +74 -93
  86. package/dist/instruction-integrity.js.map +1 -1
  87. package/dist/onboarding.d.ts.map +1 -1
  88. package/dist/onboarding.js +10 -6
  89. package/dist/onboarding.js.map +1 -1
  90. package/dist/prompt-hooks.d.ts.map +1 -1
  91. package/dist/prompt-hooks.js +2 -4
  92. package/dist/prompt-hooks.js.map +1 -1
  93. package/dist/runtime-config.d.ts +6 -1
  94. package/dist/runtime-config.d.ts.map +1 -1
  95. package/dist/runtime-config.js +79 -11
  96. package/dist/runtime-config.js.map +1 -1
  97. package/dist/tui.js +4 -4
  98. package/dist/tui.js.map +1 -1
  99. package/dist/workspace.d.ts.map +1 -1
  100. package/dist/workspace.js +3 -2
  101. package/dist/workspace.js.map +1 -1
  102. package/docs/index.html +26 -26
  103. package/package.json +4 -3
package/CHANGELOG.md CHANGED
@@ -2,12 +2,23 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.3.0](https://github.com/HybridAIOne/hybridclaw/tree/v0.3.0)
6
+
5
7
  ### Added
6
8
 
9
+ - **Configurable sandbox modes**: Gateway start/restart now accept `--sandbox=container|host`, runtime config adds `container.sandboxMode`, and gateway/TUI status surfaces show the active sandbox mode so operators can avoid Docker-in-Docker when HybridClaw itself already runs inside a container.
10
+
7
11
  ### Changed
8
12
 
13
+ - **Container runtime hardening**: Container execution now drops Linux capabilities, disables privilege escalation, enforces a PID limit, uses a sized `/tmp` tmpfs, and adds `container.memorySwap` / `container.network` tuning alongside GHCR-first image pulls before the optional Docker Hub mirror.
14
+ - **Packaged host runtime**: Root builds now compile and ship `container/dist/` so host sandbox mode can launch the bundled agent runtime from installed npm packages.
15
+ - **Instruction sync workflow**: `hybridclaw audit instructions` now compares runtime copies in `~/.hybridclaw/instructions/` to installed package sources and uses `--sync` to restore shipped defaults instead of maintaining a local approval-hash baseline.
16
+
9
17
  ### Fixed
10
18
 
19
+ - **Release container publishing resilience**: Release-tag container publishing now always publishes GHCR even when Docker Hub credentials are absent, instead of failing before any registry push occurs.
20
+ - **Install-root asset resolution**: Runtime docs/templates/instructions now resolve from the actual install root, so onboarding, prompt guardrails, workspace bootstrap files, and the built-in site no longer depend on `process.cwd()`.
21
+
11
22
  ## [0.2.12](https://github.com/HybridAIOne/hybridclaw/tree/v0.2.12)
12
23
 
13
24
  ### Added
package/README.md CHANGED
@@ -11,13 +11,14 @@ npm install -g @hybridaione/hybridclaw
11
11
  hybridclaw onboarding
12
12
  ```
13
13
 
14
- Latest release: [v0.2.12](https://github.com/HybridAIOne/hybridclaw/releases/tag/v0.2.12)
14
+ Latest release: [v0.3.0](https://github.com/HybridAIOne/hybridclaw/releases/tag/v0.3.0)
15
15
 
16
- ## Release highlights (v0.2.12)
16
+ ## Release highlights (v0.3.0)
17
17
 
18
- - Runtime config/data now default to `~/.hybridclaw`, with automatic migration from legacy `./config.json` and `./data`.
19
- - HybridClaw now auto-pulls prebuilt runtime images (Docker Hub first, GHCR fallback) before trying a local build.
20
- - Discord slash command registration now removes duplicate guild `/status` entries and keeps global-only commands clean.
18
+ - Gateway start/restart now support `--sandbox=container|host`, runtime config adds `container.sandboxMode`, and gateway/TUI status surfaces show the active mode.
19
+ - Container execution is hardened with dropped capabilities, `no-new-privileges`, PID limits, configurable network/memory-swap controls, and better GHCR-first image handling.
20
+ - Root builds now package `container/dist/` so host sandbox mode can launch the bundled agent runtime from installed npm packages.
21
+ - Runtime docs/templates/instructions now resolve from the actual install root, and `hybridclaw audit instructions --sync` restores shipped instruction copies under `~/.hybridclaw/instructions/`.
21
22
 
22
23
  ## HybridAI Advantage
23
24
 
@@ -74,6 +75,8 @@ Runtime model:
74
75
  - If `DISCORD_TOKEN` is set, Discord runs inside gateway automatically.
75
76
  - `hybridclaw tui` is a thin client that connects to the gateway.
76
77
  - `hybridclaw gateway` and `hybridclaw tui` validate the container image at startup.
78
+ - `container.sandboxMode` defaults to `container`, but if HybridClaw is already running inside a container and the setting is not explicitly pinned, the gateway auto-switches to `host` to avoid Docker-in-Docker.
79
+ - Use `hybridclaw gateway start --sandbox=host` or `hybridclaw gateway restart --sandbox=host` to force host execution for a given launch.
77
80
  - On first run, HybridClaw automatically prepares that image (pulls a prebuilt image first, then falls back to local build if needed).
78
81
  - If container setup fails, run `npm run build:container` in the project root and retry.
79
82
 
@@ -84,6 +87,7 @@ HybridClaw creates `~/.hybridclaw/config.json` on first run and hot-reloads most
84
87
  - Start from `config.example.json` (reference).
85
88
  - Runtime data is stored in `~/.hybridclaw/` by default (`config.json`, `data/hybridclaw.db`, audit/session files).
86
89
  - On upgrade, legacy `./config.json` and `./data` are migrated to `~/.hybridclaw` automatically; backups are kept in `~/.hybridclaw/migration-backups/` when needed.
90
+ - `container.*` controls execution isolation, including `sandboxMode`, `memory`, `memorySwap`, `cpus`, `network`, and additional mounts.
87
91
  - Keep secrets in `.env` (`HYBRIDAI_API_KEY` required, `DISCORD_TOKEN` optional).
88
92
  - Trust-model acceptance is stored in `~/.hybridclaw/config.json` under `security.*` and is required before runtime starts.
89
93
  - See [TRUST_MODEL.md](./TRUST_MODEL.md) for onboarding acceptance policy and [SECURITY.md](./SECURITY.md) for technical security guidelines.
@@ -94,8 +98,8 @@ HybridClaw creates `~/.hybridclaw/config.json` on first run and hot-reloads most
94
98
  CLI runtime commands:
95
99
 
96
100
  - `hybridclaw --version` / `-v` — Print installed HybridClaw version
97
- - `hybridclaw gateway start [--foreground]` — Start gateway (backend by default; foreground with flag)
98
- - `hybridclaw gateway restart [--foreground]` — Restart managed gateway backend process
101
+ - `hybridclaw gateway start [--foreground] [--sandbox=container|host]` — Start gateway (backend by default; foreground with flag)
102
+ - `hybridclaw gateway restart [--foreground] [--sandbox=container|host]` — Restart managed gateway backend process
99
103
  - `hybridclaw gateway stop` — Stop managed gateway backend process
100
104
  - `hybridclaw gateway status` — Show lifecycle/API status
101
105
  - `hybridclaw gateway <command...>` — Send a command to a running gateway (for example `sessions`, `bot info`)
@@ -103,6 +107,7 @@ CLI runtime commands:
103
107
  - `hybridclaw onboarding` — Run HybridAI account/API key onboarding
104
108
  - `hybridclaw update [status|--check] [--yes]` — Check for updates and upgrade global npm installs (source checkouts get git-based update instructions)
105
109
  - `hybridclaw audit ...` — Verify and inspect structured audit trail (`recent`, `search`, `approvals`, `verify`, `instructions`)
110
+ - `hybridclaw audit instructions [--sync]` — Compare runtime instruction copies under `~/.hybridclaw/instructions/` against installed sources and restore shipped defaults when needed
106
111
 
107
112
  In Discord, use `!claw help` to see all commands. Key ones:
108
113
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": 5,
2
+ "version": 6,
3
3
  "security": {
4
4
  "trustModelAccepted": false,
5
5
  "trustModelAcceptedAt": "",
@@ -69,9 +69,12 @@
69
69
  "models": ["gpt-5-nano", "gpt-5-mini", "gpt-5"]
70
70
  },
71
71
  "container": {
72
+ "sandboxMode": "container",
72
73
  "image": "hybridclaw-agent",
73
74
  "memory": "512m",
75
+ "memorySwap": "",
74
76
  "cpus": "1",
77
+ "network": "bridge",
75
78
  "timeoutMs": 300000,
76
79
  "additionalMounts": "",
77
80
  "maxOutputBytes": 10485760,
@@ -158,6 +161,8 @@
158
161
  "description": "Runs standup summary every weekday at 9am.",
159
162
  "schedule": {
160
163
  "kind": "cron",
164
+ "at": null,
165
+ "everyMs": null,
161
166
  "expr": "0 9 * * 1-5",
162
167
  "tz": "America/New_York"
163
168
  },
@@ -168,7 +173,8 @@
168
173
  "delivery": {
169
174
  "kind": "channel",
170
175
  "channel": "discord",
171
- "to": "123456789012345678"
176
+ "to": "123456789012345678",
177
+ "webhookUrl": ""
172
178
  },
173
179
  "enabled": false
174
180
  }