22 Commits

Author SHA1 Message Date
kumarabhirup
fc04de7eb8
🚀 RELEASE: v2.3.3 2026-03-15 14:52:23 -07:00
kumarabhirup
1c92aaf5d7
fix(bootstrap): create workspace dir before setting openclaw config
On fresh Linux installs (e.g. running as root), `openclaw config set
agents.defaults.workspace` fails because the target directory doesn't
exist yet — some OpenClaw builds validate the path on disk before
accepting the value. Create the directory eagerly with mkdirSync before
the config set call.

Also surface the exit code in runOpenClawOrThrow errors when stderr is
empty, so silent failures are easier to diagnose.

Fixes #101
2026-03-15 04:29:07 -07:00
kumarabhirup
9a784d275e
feat(cli): integrate Dench Cloud setup into bootstrap flow
Bootstrap now prompts for Dench Cloud API key and model, syncs bundled plugins generically, and migrates legacy dench-cloud-provider.
2026-03-15 04:16:01 -07:00
Kumar Abhirup
e490380d01
Merge pull request #90 from alexanderwcheney/fix/bootstrap-gateway-mode-ordering
fix(bootstrap): set gateway.mode before onboard to prevent crash loop
2026-03-15 02:16:57 -07:00
kumarabhirup
2efe2ecf41
fix(bootstrap): preserve gateway config around onboarding
Set gateway mode and port before onboarding so the first daemon start succeeds, then reapply them after onboarding so wizard defaults cannot drift DenchClaw off its expected local gateway.
2026-03-15 01:05:43 -07:00
Alex Cheney
13cdeba7e3 fix(bootstrap): set gateway.mode before onboard to prevent crash loop
During bootstrap, `onboard --install-daemon` starts the gateway daemon
immediately. The gateway's startup guard requires `gateway.mode=local`
but this was only set *after* onboard completed, causing the daemon to
block with "Gateway start blocked: set gateway.mode=local" and enter a
crash loop. The web UI then fails with "Gateway WebSocket connection
failed".

Move `ensureGatewayModeLocal()` and `ensureGatewayPort()` to run before
the onboard command so the config is in place when the daemon first
starts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 14:37:24 -07:00
kumarabhirup
0681c4ad23
fix(bootstrap): strip npm_config_* env vars from npm global commands
When denchclaw is launched via `npx`, npm injects environment variables
(most critically `npm_config_prefix`) that redirect `npm install -g` and
`npm ls -g` to a temporary npx-managed prefix instead of the user's real
global npm directory. This causes openclaw to be installed to a location
that doesn't persist on PATH, so subsequent commands like `denchclaw
restart` fail with "openclaw CLI not found".

Strip `npm_config_*`, `npm_package_*`, and npm lifecycle variables from
the environment passed to npm global commands (`npm ls -g`, `npm install
-g`, `npm prefix -g`) so they use the user's actual npm configuration.
2026-03-10 14:08:37 -07:00
kumarabhirup
ddac5c777b
fix(cli): restart gateway after bundled plugin install
Ensures newly installed or updated plugins are loaded without manual restart.
2026-03-05 15:35:46 -08:00
kumarabhirup
136d3049b7
feat: add configuration for plugin load paths in OpenClaw
Enhance the installBundledPlugins function to set the plugins.load.paths configuration for posthog-analytics using OpenClaw. This addition allows for dynamic loading of plugin paths, improving plugin management during the bootstrap process.
2026-03-05 13:57:38 -08:00
kumarabhirup
fdd89b4e6f
feat: add PostHog AI observability, feedback UI, and telemetry privacy mode
Integrate PostHog LLM Analytics via a bundled OpenClaw plugin that captures
$ai_generation, $ai_span, and $ai_trace events with configurable privacy
mode (content redaction on by default). Add like/dislike feedback buttons
to the web chat UI backed by a /api/feedback route. Extend the CLI with
`telemetry privacy on|off` subcommands and fix command delegation so
telemetry subcommands aren't forwarded to OpenClaw. Harden the web runtime
installer to auto-flatten pnpm standalone deps and dereference dangling
symlinks, preventing "Cannot find module 'next'" crashes in dev. Move
plugin installation before onboard in bootstrap so the gateway starts
with plugins.allow already configured.
2026-03-05 12:28:08 -08:00
kumarabhirup
4bcd47b848
fix: prevent DenchClaw gateway from hijacking OpenClaw's port 18789
The bootstrap port selection logic tried OpenClaw's default port (18789)
before the DenchClaw range (19001+). If OpenClaw was temporarily down
during bootstrap, DenchClaw would claim 18789 and persist it to config
and the LaunchAgent plist, killing OpenClaw on every subsequent restart.

- Remove the DEFAULT_GATEWAY_PORT (18789) branch from bootstrap; always
  start from DENCHCLAW_GATEWAY_PORT_START (19001)
- Read previously persisted config port and reuse it (unless it is 18789)
- Extract isPersistedPortAcceptable guard to reject corrupted 18789 state
- Add DENCHCLAW_DEFAULT_GATEWAY_PORT constant and make resolveGatewayPort
  profile-aware so the "dench" profile falls back to 19001
- Fix hardcoded 18789 fallback in web-runtime-command.ts
2026-03-05 10:46:03 -08:00
kumarabhirup
78e04e20b8
fix(cli): improve bootstrap onboard UX and fix command references
Always pass --skip-ui and --accept-risk to openclaw onboard so the
wizard never prompts for TUI/Web UI selection — bootstrap manages the
web UI lifecycle itself. Add a post-onboard spinner to eliminate the
silent gap while config-set calls, gateway probing, and web runtime
startup run. Fix remediation messages to use `npx denchclaw`.
2026-03-04 18:33:17 -08:00
kumarabhirup
912e7711bb
fix tests, add telemetry, deploy v2.0.4
- Fix bootstrap-command test: mock ensureManagedWebRuntime to probe
  directly instead of requiring standalone build on disk
- Add PostHog telemetry to CLI and web app with opt-out support
- Add dench alias package (npm rejects name; kept for future use)
- Bump version to 2.0.4 and publish to npm
2026-03-04 17:33:27 -08:00
kumarabhirup
af45d4d17b
CLI: add managed web runtime with start/stop/update commands and major-version gating
Refactor bootstrap to use a managed web runtime lifecycle instead of
ad-hoc standalone server spawning. The managed runtime copies packaged
Next.js assets into ~/.openclaw-dench/web-runtime/, tracks deployment
state via manifest/process metadata, and cleanly separates Dench-owned
processes from foreign listeners on the target port.

- Fix false-negative web readiness when /api/profiles returns null
  activeProfile (first-run regression).
- Add `dench start` (start without updating assets), `dench stop`
  (terminate only Dench-managed web server), and `dench update`
  (refresh web runtime with major-version OpenClaw update gate).
- Major-version transitions (e.g. v2->v3) require mandatory OpenClaw
  update; non-interactive mode fails closed without --yes.
- All lifecycle commands show the ASCII banner/logo animation.
- Deploy smoke checks now verify update/stop/start --help paths.
2026-03-04 16:32:58 -08:00
kumarabhirup
1c93a3b525
fix(cli): enforce full tool profile in dench bootstrap 2026-03-04 13:18:39 -08:00
kumarabhirup
7fa49f58ce
feat(cli): add ensureSubagentDefaults function to set default subagent configurations
This commit introduces the ensureSubagentDefaults function, which sets various default configurations for subagents, including max concurrent agents, max spawn depth, and run timeout settings. The function is called during the bootstrap process to ensure these defaults are applied for the specified profile.
2026-03-03 16:34:03 -08:00
kumarabhirup
501276bdea
refactor(cli): remove dench-specific bootstrap code
syncBundledDenchSkill is now handled by the generalized seedWorkspaceFromAssets call.
2026-03-03 15:37:39 -08:00
kumarabhirup
227739d729
refactor(cli): update bootstrap for workspace path
Use workspace dir instead of workspace-profile; ensure agents.defaults.workspace before onboard.
2026-03-03 13:47:23 -08:00
kumarabhirup
75b8410709
fix(cli): sync bootstrap gateway port for web runtime 2026-03-03 12:24:43 -08:00
kumarabhirup
37400badc2
fix(cli): harden bootstrap profile and recovery paths
Make bootstrap deterministic across profile flag order and stale local runtime state so onboarding and health checks converge on the intended profile, gateway service, and web port.
2026-03-02 22:10:46 -08:00
kumarabhirup
0f057c0346
feat(cli): overhaul bootstrap-external with gateway auto-fix, robust CLI detection, and agent-auth check 2026-03-02 18:31:15 -08:00
kumarabhirup
52707f471d
refactor!: IronClaw v2.0 - external OpenClaw runtime
BREAKING CHANGE: Convert repository to IronClaw-only package with strict
external dependency on globally installed `openclaw` runtime.

### Changes

- Remove entire OpenClaw core source from repository (src/agents/*, src/acp/*,
  src/commands/*, and related modules)
- Implement CLI delegation: non-bootstrap commands now delegate to global
  `openclaw` binary via external contract
- Remove local OpenClaw path resolution from web app; always spawn global
  `openclaw` binary instead of local scripts
- Rename package.json scripts: `pnpm openclaw` → `pnpm ironclaw`,
  `openclaw:rpc` → `ironclaw:rpc`
- Update bootstrap flow to verify and install global OpenClaw when missing
- Migrate web workspace/profile logic to align with OpenClaw state paths
- Add migration contract tests for stream-json, session subscribe, and profile
  resolution behaviors
- Update build/release pipeline for IronClaw-only artifacts
- Update documentation for new peer + global installation model

### Architecture

IronClaw is now strictly a frontend/UI/bootstrap layer:
- `npx ironclaw` bootstraps OpenClaw (if missing), runs guided onboarding
- IronClaw UI serves on localhost:3100
- OpenClaw Gateway runs on standard port 18789
- Communication via stable CLI contracts and Gateway WebSocket protocol only

### Migration

Users must have `openclaw` installed globally:
  npm install -g openclaw

Existing IronClaw profiles and sessions remain compatible through gateway
protocol stability.

Refs: bootstrap_dev_testing, ironclaw_frontend_split, strict-external-openclaw
2026-03-01 16:11:40 -08:00