13712 Commits

Author SHA1 Message Date
kumarabhirup
7cb654ea6a
fix(api): improve cron run transcript parsing for toolCall and toolResult formats
Handle the current toolCall message format alongside legacy tool_use, and merge toolResult messages back into the preceding assistant message.
2026-03-05 21:20:10 -08:00
kumarabhirup
cc1194b5eb
feat(api): add agent session fallback to web-sessions endpoint
When no web chat session file exists, search agent session directories (cron runs, CLI) and parse transcripts into UIMessage-compatible format.
2026-03-05 21:20:04 -08:00
kumarabhirup
6044372614
feat(cron): add URL-backed view state for cron dashboard and job detail
Persist cronView, cronCalMode, cronDate, cronRunFilter, and cronRun in URL params so cron UI state survives navigation and refresh.
2026-03-05 21:19:58 -08:00
kumarabhirup
0a2d426834
chore: bump version to 2.0.14
Bump denchclaw and dench alias packages from 2.0.12 to 2.0.14.
2026-03-05 21:19:51 -08:00
kumarabhirup
ca3f559b8f
fix(web): honor initial session ID and forward subagent session keys
Reconnect to the correct chat session when initialSessionId is provided instead of always picking the latest, and pass through the subagent sessionKey for clickable subagent cards.
2026-03-05 19:09:39 -08:00
kumarabhirup
3533aa3358
feat(web): persist file tree expansion and add column visibility callbacks
Save expanded file tree paths to localStorage so they survive page reloads, and surface an onColumnVisibilityChanged callback from DataTable/ObjectTable.
2026-03-05 19:09:34 -08:00
kumarabhirup
1c21b039fc
refactor(web): consolidate workspace onto root route with URL state machine
Move the workspace shell from /workspace to / and introduce a typed URL state codec (parseUrlState/serializeUrlState) for deep-linkable workspace params. Legacy /workspace URLs are still recognized for backward compatibility.
2026-03-05 19:09:29 -08:00
kumarabhirup
f9d454f5c7
feat(web): forward client identity to server and improve feedback traces
Bootstrap posthog-js with the persisted install ID from the server, forward distinctId to API routes, and restructure feedback traces to use chronological conversation order.
2026-03-05 19:09:19 -08:00
kumarabhirup
83f6b69f82
feat(telemetry): use session key as trace ID and improve AI event inputs
Use the session key directly as the PostHog trace ID so feedback and generation events share the same trace. Extract non-assistant messages from conversations for $ai_input.
2026-03-05 19:09:13 -08:00
kumarabhirup
a0853ec83c
feat(telemetry): unified identity for PostHog plugin with key fallback
Plugin reads the same persisted install ID from telemetry.json and falls back to a build-time baked PostHog key when no config-level key is set.
2026-03-05 19:09:05 -08:00
kumarabhirup
1e21185d47
feat(telemetry): replace hostname hash with persisted install-scoped anonymous ID
A random UUID is generated on first run and stored in ~/.openclaw-dench/telemetry.json, replacing the SHA-256 hostname hash that could theoretically be reversed.
2026-03-05 19:09:00 -08:00
kumarabhirup
135fa3608a
chore: bump version to 2.0.12 and add plugin build infra
Add build:plugin-env script to bake the PostHog key into the plugin at pack time.
2026-03-05 19:08:51 -08:00
kumarabhirup
c4ee320994
feat(feedback): forward client PostHog distinct ID to server-side AI traces
Ensures server-side trace events are attributed to the same user as client-side analytics.
2026-03-05 16:09:12 -08:00
kumarabhirup
00c04f89d3
refactor(telemetry): remove server-side anonymous ID in favor of PostHog native tracking
Let PostHog generate its own distinct ID client-side instead of deriving one from hostname/username.
2026-03-05 16:09:06 -08:00
kumarabhirup
a0aef2c2f8
chore: bump version to 2.0.9
Prepare next release version across root and dench alias package.
2026-03-05 16:09:00 -08:00
kumarabhirup
7908aa3337
chore(web): add Bookerly font files
Add Bookerly Regular, Bold, Italic, and BoldItalic TTF variants.
2026-03-05 15:36:07 -08:00
kumarabhirup
ab8906a421
feat(web): wrap app in PostHog React provider with survey-based feedback
Enables useThumbSurvey for feedback buttons and sends un-redacted conversation traces on user feedback.
2026-03-05 15:36:02 -08:00
kumarabhirup
261f49de9b
feat(telemetry): add trace conversation state and improve tool extraction
Populates $ai_input_state/$ai_output_state on traces for full conversation view in PostHog, and handles toolCall content blocks.
2026-03-05 15:35:57 -08:00
kumarabhirup
6b794dac4e
feat(telemetry): add structure-preserving privacy redaction
Redacts text content and tool arguments while keeping roles, tool names, and message ordering visible in PostHog.
2026-03-05 15:35:51 -08: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
113b1ffb17
docs: use npx prefix in telemetry CLI commands
Users run via npx, not a global install — fix all examples and output messages.
2026-03-05 15:35:42 -08:00
kumarabhirup
6ebdb5f851
chore: bump version to 2.0.8
Align root and dench alias package versions for next release.
2026-03-05 15:35:38 -08:00
kumarabhirup
251ad368a7
feat: add noOpen option to web runtime commands and prompt for browser opening
Introduce a `noOpen` option across various web runtime commands to control automatic browser opening. Implement a prompt to ask users if they want to open the web UI, enhancing user experience and flexibility during command execution.
2026-03-05 14:04:15 -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
8755c509f8
feat: extract real token usage from messages and auto-restart gateway on web runtime updates
Add extractUsageFromMessages and normalizeOutputForPostHog to pull actual
token counts and cost from OpenClaw per-message usage metadata, and convert
Anthropic-style tool call blocks to OpenAI format for PostHog AI observability.

Integrate gateway daemon restart (stop → install → start) into both the
update and start web runtime commands so the gateway stays in sync with
runtime upgrades.
2026-03-05 13:46:51 -08:00
kumarabhirup
460bf6bf6e
fix: resolve PostHog trace linkage, cost display, and tool capture
Switch TraceContextManager from runId to sessionId-based indexing so
tool spans share the same trace_id as their parent generation. Extract
tool names from agent_end messages for the PostHog Tools tab. Guard
against sending $0 cost and null token counts.
2026-03-05 12:58:24 -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
a771ab7259
fix: unify PostHog distinctId across client and server
Client-side posthog-js was using a random anonymous ID (reset every
page load) while server-side posthog-node used a deterministic
SHA256(hostname:username) hash. Bootstrap the client with the server's
anonymous ID so both sides share the same per-machine-per-user identity.
2026-03-05 10:47:36 -08:00
kumarabhirup
f41c0411eb
test: add port isolation tests for DenchClaw gateway fix
- New src/config/paths.test.ts: 11 tests covering resolveGatewayPort
  profile-aware precedence (env > config > profile > global default)
- Extend bootstrap-external.test.ts: 15 new tests for
  readExistingGatewayPort (config reading, fallback, edge cases) and
  isPersistedPortAcceptable (18789 rejection guard, end-to-end composition)
- Extend web-runtime-command.test.ts: 2 new tests verifying the fallback
  returns 19001 when manifest has no lastGatewayPort or is null
- Update test fixtures across all test files to expect port 19001

All 5 critical mutations verified: removing profile check, removing
18789 guard, reverting fallback, changing constant, breaking config
reader -- each caught by at least 2 tests.
2026-03-05 10:46:16 -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
b5557fb6dd
👌 IMPROVE: silent deployment 2026-03-04 20:06:38 -08:00
kumarabhirup
eb1e3a638c
Merge branch 'kumareth/ironclaw-v2.0' of https://github.com/denchHQ/ironclaw 2026-03-04 19:47:05 -08:00
kumarabhirup
0b292411d3
📖 DOC: images 2026-03-04 19:46:13 -08:00
Kumar Abhirup
c4c73e1296
DenchClaw v2.0 - External OpenClaw Runtime from DenchHQ/kumareth/ironclaw-v2.0
Merge pull request #81
2026-03-04 19:15:29 -08:00
kumarabhirup
cceeccb900
chore: bump to v2.0.5 with deploy scripts and prepack integration
Adds deploy convenience scripts, wires flatten-standalone-deps into web:prepack, and updates test:cli to include the new test file.
2026-03-04 19:06:56 -08:00
kumarabhirup
8847e44854
feat(cli): add flatten-standalone-deps for pnpm standalone builds
pnpm's standalone output uses symlinks that npm pack silently drops, breaking require('next') on user machines. This flattens the virtual store into a standard node_modules layout.
2026-03-04 19:06:50 -08:00
kumarabhirup
ec973f40d3
fix(cli): update bootstrap onboard test for accept-risk and skip-ui flags
Onboard command now passes --accept-risk and --skip-ui by default; align test expectations.
2026-03-04 19:06:44 -08:00
kumarabhirup
b4b644a726
fix(cli): dereference symlinks during web runtime installation
pnpm standalone output contains symlinks that break after npm pack; dereference ensures real files are copied.
2026-03-04 19:06:40 -08:00
kumarabhirup
ec326fb34d
chore: add env examples for development setup
Documents required environment variables so new contributors can onboard without guessing.
2026-03-04 19:06:35 -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
ee6f3c6df3
chore: update package versions and add posthog dependencies
- Bump version of denchclaw to 2.0.2 in package.json.
- Add posthog-node and posthog-js dependencies with specified versions.
- Update chokidar dependency in web package.json.
- Modify deploy script to publish an alias package (dench) alongside denchclaw.
2026-03-04 17:09:22 -08:00
kumarabhirup
286d0fdb48
delete em all 2026-03-04 16:34:45 -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
4d6eec741d
npx denchclaw 2026-03-04 13:23:34 -08:00
kumarabhirup
1c93a3b525
fix(cli): enforce full tool profile in dench bootstrap 2026-03-04 13:18:39 -08:00
kumarabhirup
2c5e5a8ac1
chore(web): refresh tsbuildinfo 2026-03-04 11:15:17 -08:00
kumarabhirup
bd859a52ef
test(web): add rich document editor interaction coverage 2026-03-04 11:15:04 -08:00
kumarabhirup
f98fb75e81
test(web): cover workspace binary write API 2026-03-04 11:14:56 -08:00
kumarabhirup
aaad832cc6
feat(web): add rich DOCX/TXT workspace editor 2026-03-04 11:14:48 -08:00