13735 Commits

Author SHA1 Message Date
kumarabhirup
4e6ce90f0b
feat(skills): expand app-builder skill with comprehensive p5.js, Three.js, and dashboard guidance
Rewrites the app-builder SKILL.md from ~250 lines to ~2300 lines covering
the full Dench App system: p5.js for 2D games (state machines, sprites,
particles, physics, tilemaps, sound), Three.js for 3D (scene setup, controls,
GLTF loading, post-processing, first-person patterns), data dashboards
(Chart.js, D3, CSS-only), interactive tools, multi-file organization,
asset management, theme integration, error handling, and performance tuning.
2026-03-08 21:45:42 -07:00
kumarabhirup
1af9d75396
fix(terminal): add try/catch around PTY spawn to prevent silent hangs
Without error handling, if node-pty require or pty.spawn throws (bad
permissions, missing cwd, stale server), the client gets no response and
the terminal hangs with a blinking cursor. Now sends an exit event back.
2026-03-08 21:45:17 -07:00
kumarabhirup
7975405da9
fix(terminal): defer PTY spawn until container has layout dimensions
fitAddon.fit() was called synchronously on mount before the browser laid
out the container, sending 0-dimension cols/rows to the PTY. The shell
would hang without displaying a prompt. Now defers WS connection by 50ms,
re-fits after the shell reports ready, and shows an error if WS fails.
2026-03-08 21:27:37 -07:00
kumarabhirup
1275540eb4
chore: update dench and denchclaw versions to 2.1.5 in package.json 2026-03-08 20:54:48 -07:00
kumarabhirup
bf419cbaeb
chore: bump version to 2.1.5 in package.json 2026-03-08 20:47:46 -07:00
kumarabhirup
e1fc698f2e
feat(web): add in-browser terminal panel (Cmd+J)
xterm.js frontend + node-pty WebSocket server spawning the user's real shell,
with drag-to-resize drawer, multi-terminal tabs, live theme sync, and URL state.
2026-03-08 20:45:10 -07:00
kumarabhirup
039cbe6a43
feat: async I/O, tags field type, rich chat messages, deploy verification
- Convert sync filesystem and DuckDB operations to async across API routes,
  workspace lib, and active-runs to prevent event loop blocking during tree
  discovery, object lookups, and database queries
- Add "tags" field type for free-form string arrays with parse-tags utility,
  TagsBadges/TagsInput UI components, filter operators, and CRM skill docs
- Preserve rich text formatting (bold, italic, code, @mentions) in user chat
  messages by sending HTML alongside plain text through the transport layer
- Detect empty-stream errors, improve agent error emission, and add file
  mutation queues for concurrent write safety in active-runs
- Add pre-publish standalone node_modules verification in deploy script
  checking serverExternalPackages are present
- Extract syncManagedSkills and discoverWorkspaceDirs for multi-workspace
  skill syncing, add ensureSeedAssets for runtime app dir
- Bump version 2.1.1 → 2.1.4
2026-03-08 19:53:18 -07:00
kumarabhirup
870650dbda
chore: bump version to 2.1.1 for denchclaw and dench packages 2026-03-06 23:31:55 -08:00
kumarabhirup
36e9cf9517
fix(agent-runner): ensure tool events stream on first chat message
sessions.patch for verboseLevel=full was called before the agent RPC
created the session, so it silently failed on new chats. Tool events
were never emitted and the frontend only showed brief text responses.

Now patches both before (for existing sessions) and after the agent RPC
(for newly created sessions). Also adds SSE keepalive to the POST /api/chat
stream to prevent connection drops during long tool executions, and removes
the unused legacy CLI spawn codepath.
2026-03-06 23:30:31 -08:00
kumarabhirup
eaef8df20b
fix(telemetry): prevent anonymousId from leaking via npm package
The root layout called getOrCreateAnonymousId() in a Server Component
without marking the route as dynamic. Next.js treated it as static,
pre-rendering the developer's UUID into the standalone build shipped
via npm — so every `npx denchclaw` user shared the same PostHog identity.

- Add `export const dynamic = "force-dynamic"` to root layout
- Replace `process.env.HOME || "~"` fallback with `homedir()` in web
  telemetry and posthog-analytics plugin (Node.js path.join doesn't
  expand "~", creating a relative path under cwd instead)
2026-03-06 23:30:31 -08:00
Kumar Abhirup
42b67e7121
Merge pull request #83 from DenchHQ/kumareth/nested-object-views-fix
fix(workspace): recursively search for nested object directories in findObjectDir
2026-03-06 22:07:07 -08:00
kumarabhirup
b8ba9d5ed4
Merge branch 'main' of https://github.com/denchHQ/ironclaw into kumareth/nested-object-views-fix 2026-03-06 21:29:28 -08:00
kumarabhirup
8f4fd62d63
fix(workspace): prevent URL sync from wiping params on hydration render
The URL sync effect and hydration effect run in the same React render
cycle. Since React state updates (setActivePath) are batched, the URL
sync effect still saw activePath=null and pushed "/", stripping all
query params. This caused an alternating refresh bug where odd refreshes
showed the homepage and even refreshes worked correctly.

Skip the URL sync effect for one render after hydration completes, giving
React state time to update before the effect writes the URL.
2026-03-06 21:29:03 -08:00
kumarabhirup
7cf895a3c7
fix(workspace): recursively search for nested object directories in findObjectDir
findObjectDir only searched the workspace root and one level deep, so objects
nested inside category folders (e.g. marketing/influencer/) were not discovered
by the views API. This caused saved views, active_view, and view_settings to
silently return empty for any object beyond depth 1.

Replace the single-level scan with a depth-limited recursive search (max 4
levels), skipping known heavy directories (node_modules, .git, .next, etc.).

The sidebar tree builder (buildTree in tree/route.ts) already walks recursively,
so this brings findObjectDir in line with the rest of the workspace discovery.
2026-03-06 00:41:26 -08:00
kumarabhirup
4578dfa945
feat(cron): project schedule occurrences on calendar view
Parse cron/every/at schedules and project all occurrences within the
visible date range so the calendar shows upcoming runs, not just the
next one. Display scheduled times on event chips.
2026-03-05 22:54:37 -08:00
kumarabhirup
d829b73265
refactor(workspace): centralize URL sync and add back/forward navigation
Remove scattered router.replace("/") calls in favor of the URL sync effect.
Add popstate listener to restore app state on browser back/forward.
Preserve object-view params across shell-level URL updates.
Fix ObjectView overwriting URL params on initial mount.
2026-03-05 22:54:31 -08:00
kumarabhirup
5b87256cac
fix(workspace): preserve query params during sidebar and database navigation
Use URLSearchParams to merge new params instead of replacing the full URL.
2026-03-05 22:54:24 -08:00
kumarabhirup
7dd38c185c
refactor(workspace): rename replaceUrlToWorkspace to replaceUrlToRoot
URL sync is now handled by the centralized effect, not callers.
2026-03-05 22:54:18 -08:00
kumarabhirup
e3eb86c531
chore: bump version to 2.1.0
Major feature additions warrant a minor version bump.
2026-03-05 22:54:11 -08:00
kumarabhirup
ec73141a01
chore: bump version to 2.0.16 and enhance feedback API message handling
Update package versions for denchclaw and dench to 2.0.16. Refactor feedback API to convert chat lines into PostHog-compatible messages, preserving chronological order and including tool calls and results. Improve test cases to reflect changes in message handling.
2026-03-05 21:38:55 -08:00
kumarabhirup
38b062a71e
chore: fix test mocks, suppress cron pageview tracking, and minor docs
Add workspace mock to agent-runner tests, skip PostHog pageviews on cron paths to reduce noise, document web-chat storage path in CRM skill, and include cursor plans and build info.
2026-03-05 21:20:35 -08:00
kumarabhirup
f279524e32
feat(chat): add hero state with prompt suggestions for new conversations
Show an animated hero screen with rotating prompt suggestion cards when the chat is empty, using framer-motion for layout transitions. Add setText method to ChatEditor for programmatic content insertion.
2026-03-05 21:20:25 -08:00
kumarabhirup
c21bbb6cea
feat(cron): overhaul dashboard with calendar/timeline/insights views and action bar
Add tabbed views (overview, calendar, timeline, insights) to the cron dashboard, run status filters and action buttons (run now, disable, delete) to job detail, reuse ChatMessage for session transcripts, and wire URL state through workspace content.
2026-03-05 21:20:18 -08:00
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