73 Commits

Author SHA1 Message Date
kumarabhirup
286d0fdb48
delete em all 2026-03-04 16:34:45 -08:00
kumarabhirup
4d6eec741d
npx denchclaw 2026-03-04 13:23:34 -08:00
kumarabhirup
b2c946b08d
test(web): cover multi-view resolution and scheduling interactions 2026-03-04 11:07:54 -08:00
kumarabhirup
b5987e931c
feat(web): add multi-view schema and settings persistence 2026-03-04 11:03:27 -08:00
kumarabhirup
68015d6c14
refactor(web): enhance entry detail and object table components for improved data handling
This commit introduces several enhancements across the EntryDetailModal and ObjectTable components. Key changes include the addition of a FormattedFieldValue component for consistent display of various field types, improved handling of entry metadata, and the introduction of input type resolution for fields. Additionally, navigation callbacks for entries have been refined to support better interaction within the object table. These updates aim to streamline data presentation and enhance user experience.
2026-03-03 22:54:12 -08:00
kumarabhirup
0820d7211f
fix(web): fall back to profile gateway WS target 2026-03-03 20:30:29 -08:00
kumarabhirup
a1cb0b8372
refactor(web): streamline subagent session enrichment and tool event handling
This commit refactors the handling of subagent sessions by removing the enrichSubagentMessages function and integrating its functionality into the GET request handler. It also introduces the enrichSubagentSessionFromTranscript function to enhance session data retrieval. Additionally, the persistSubscribeUserMessage function is updated to ensure user messages are saved to the session JSONL file, improving message persistence across page reloads. These changes enhance the clarity and efficiency of subagent session management.
2026-03-03 17:35:34 -08:00
kumarabhirup
045b73f42e
fix(web): subagent tool events — live streaming + persisted enrichment
Subagent sessions were missing tool call displays because the gateway's
passive subscribe mode (agent.subscribe unsupported) only broadcasts
assistant + lifecycle events, not tool events.

Three fixes:
- Use start-mode GatewayProcessHandle for subagent follow-up messages
  so the agent RPC streams all events (including tools) on the same
  WebSocket connection
- Enrich persisted subagent JSONL at load time from the gateway's
  on-disk session transcript when tool-invocation parts are missing
- Best-effort enrichment at finalization time from gateway transcript
  for subscribe-only runs that didn't receive tool events
2026-03-03 16:26:34 -08:00
kumarabhirup
72d5204e52
test: update tests for dench-to-crm rename and IDENTITY.md visibility
All test assertions updated to reference crm instead of dench, and IDENTITY.md is now expected to be visible in the workspace tree.
2026-03-03 15:38:46 -08:00
kumarabhirup
38f3cb6efe
feat(web): use workspace-aware agent IDs for gateway sessions
Replace hardcoded agent:main: session keys with resolveActiveAgentId() so each workspace routes to its own gateway agent.
2026-03-03 15:38:00 -08:00
kumarabhirup
74b3b23e26
feat(web): add multi-workspace agent config management
Add ensureAgentInConfig, setDefaultAgentInConfig, and resolveActiveAgentId to manage per-workspace agent entries in openclaw.json so the gateway routes to the correct workspace.
2026-03-03 15:37:54 -08:00
kumarabhirup
365e1650bc
fix(test): resolve lint errors in workspace and init route tests
Remove unused useEnvWorkspace; fix base-to-string in identity content assertion.
2026-03-03 13:48:05 -08:00
kumarabhirup
f6eee0b398
refactor(cli): update workspace-seed with dynamic identity and dench skill
Build identity template with workspace path; add seedDenchSkill for skills/dench.
2026-03-03 13:47:38 -08:00
kumarabhirup
796a2fcb34
refactor(workspace): profile to workspace model in web lib
Replace profile terminology with workspace; pin to .openclaw-ironclaw state dir.
2026-03-03 13:46:25 -08:00
kumarabhirup
ba65d0b4e8
test(web): add workspace-profiles tests 2026-03-02 18:36:26 -08:00
kumarabhirup
910d0521e2
test(web): add subagent-runs tests 2026-03-02 18:33:38 -08:00
kumarabhirup
2723352028
feat(web): extend subagent-runs with status reasoning and media URL support 2026-03-02 18:33:31 -08:00
kumarabhirup
14feec10af
test(web): add active-runs tests with retry and lifecycle coverage 2026-03-02 18:33:24 -08:00
kumarabhirup
0d219413a8
feat(web): enhance active-runs with WS RPC, subscribe retry, and chat event support 2026-03-02 18:33:17 -08:00
kumarabhirup
f6769d3e05
test(web): add comprehensive agent-runner tests 2026-03-02 18:33:09 -08:00
kumarabhirup
7bd6583697
feat(web): add WebSocket gateway client and RPC support to agent-runner 2026-03-02 18:33:01 -08:00
kumarabhirup
ba1a66d222
feat(web): extend workspace lib with profile discovery and state dir resolution 2026-03-02 18:32:53 -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
kumarabhirup
00baf45a2f
fix(web): handle array-style date values in object view filters
YAML-parsed date_between/between filters store range values as a
two-element array under `value`, but the filter system expected
separate value/valueTo fields. Add normalizeFilterGroup at the YAML
read boundary and defensive array handling in the evaluator and SQL
builder so both formats work correctly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-22 02:08:25 -08:00
kumarabhirup
20ace16d4c
fix(web): prevent subagent sessions from leaking into chat sidebar
- Skip updateIndex for session IDs containing :subagent: so they don't
  appear as top-level "New Chat" entries in the sidebar
- Filter subagent IDs in the sidebar component as a safety net
- Clean up existing leaked entries from index.json

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-22 01:11:26 -08:00
kumarabhirup
a046cf2349
refactor(web): unify subagent tracking with parent session system
Subagents now use the same ActiveRun infrastructure as parent sessions:
- startSubscribeRun() creates a subscribe-only ActiveRun when sessions_spawn
  tool results are detected, using the same event buffering, persistence,
  and SSE reconnection as parent runs
- Stream/stop/chat routes no longer branch on subagent vs parent; both
  use getActiveRun/subscribeToRun with the session key as map key
- hasRunningSubagentsForParent moved into active-runs.ts to check the
  unified activeRuns map (+ disk registry fallback)
- Deferred finalization on lifecycle/end with 5s safety timeout
- ev.data.text fallback for assistant events without delta field
- 24h cleanup grace for subscribe-only runs (vs 30s for parent)

Reverts the broken childSessionKey registration from 32cfcf14f.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-22 00:35:07 -08:00
kumarabhirup
32cfcf14fa
fix(web): use correct field name childSessionKey in sessions_spawn registration
The spawn tool result uses `childSessionKey` (not `sessionKey`), and
task/label come from the tool input args, not the result details.
Without this fix registerSubagent was never called because the
extracted sessionKey was always undefined.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-22 00:15:33 -08:00
kumarabhirup
b29b2e39a3
fix(web): repair subagent streaming pipeline
- Handle ev.data.text fallback when delta is absent in assistant events
  (both active-runs and subagent-runs)
- Defer subagent finalizeRun until subscribe process closes so buffered
  events in readline are still delivered to SSE subscribers
- Register subagents from sessions_spawn tool results in active-runs so
  hasRunningSubagentsForParent works without opening SubagentPanel first
- Add disk registry fallback in hasRunningSubagentsForParent for cases
  where in-memory parentIndex has no entries
- Fix pre-commit hook: tolerate oxfmt exit 2 when all files are ignored

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-22 00:06:31 -08:00
kumarabhirup
6594de6186
Merge Ironclaw changes onto upstream Openclaw 2026.2.22
Replays all Ironclaw-specific changes (176 commits) onto the latest
upstream Openclaw release (2026.2.22). Conflicts auto-resolved in
favor of Ironclaw to guarantee zero change loss.

Merge base: cbc3de6c9 (2026-02-16)
Upstream: a37e12eab (upstream/main, 2026.2.22)
Ironclaw: 3009566c9 (origin/main, 2026.2.15-1.9)
Backup: ironclaw-backup-pre-sync

Conflict resolutions:
- 6 GitHub workflow files: deleted (Ironclaw intentionally stripped)
- src/sessions/session-key-utils.test.ts: kept (Ironclaw modified)
- Duplicate imports from merge: deduplicated
- Unused imports from upstream code Ironclaw overrode: removed
- Broken test indentation from merge: fixed

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 18:06:01 -08:00
kumarabhirup
7aadd02313
test: add comprehensive workspace test suite and deploy pre-flight checks
- Profile management: discoverProfiles, getEffectiveProfile precedence,
  setUIActiveProfile, resolveWebChatDir, workspace registry (32 tests)
- Workspace init API: creation, bootstrap seeding, custom paths,
  validation, idempotency (13 tests)
- Profile switch API: GET/POST profiles, validation, default reset (10 tests)
- Chat isolation: profile-scoped chat dirs, session isolation (7 tests)
- LLM context awareness: bootstrap loading, subagent filtering,
  resolveBootstrapContextForRun content isolation (15 unit + 5 live)
- Subagent streaming: registerSubagent, event replay, persistence,
  ensureRegisteredFromDisk, fan-out (24 unit + 5 live)
- deploy.sh: add --skip-tests flag, pnpm test + web:build pre-flight,
  auto git commit/push of version bump after publish
- package.json: add test:workspace and test:workspace:live scripts

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 15:38:31 -08:00
kumarabhirup
92fadd6700
fix: filter non-parent events in main NDJSON handler and fix workspace creation path
Bug 1: Subagent events from gateway broadcasts were processed as parent
events because the sessionKey filter was accidentally removed during the
subagent decoupling refactor. Re-add the filter in wireChildProcess.

Bug 2: Creating workspaces at custom paths failed because:
- mkdir API rejected absolute paths outside workspace root
- Directory picker started at workspace root, not home
- Error responses from mkdir were silently swallowed
Add absolute path support to mkdir, handle errors in picker UI,
start picker at home dir, and normalize init route paths.
2026-02-21 13:45:11 -08:00
kumarabhirup
109b88b93c
web: restore functional features dropped by design merge
Restore backend/logic features that were incorrectly auto-merged from the
design branch:

- Spreadsheet viewer (xlsx, csv, ods, etc.) and xlsx dependency
- HTML iframe viewer with source toggle
- Directory picker modal for workspace creation
- Workspace registry for custom-path workspaces
- Session auto-discovery for orphaned sessions
- Workspace init seeding (CRM objects, DuckDB, templates, bootstrap files)
- Symlink resolution and showHidden in tree/browse routes
- Upload to workspace assets/ instead of hidden ~/.ironclaw/uploads/
- Webpack dev watcher config (next.config.ts)
- router.push for back-button navigation history
2026-02-21 13:10:32 -08:00
kumarabhirup
db4c90b37d
Merge remote-tracking branch 'origin/markrachapoom/design' into kumareth/workspaces
Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	apps/web/app/api/chat/subagent-stream/route.ts
#	apps/web/app/api/workspace/watch/route.ts
#	apps/web/app/components/chat-panel.tsx
#	apps/web/app/components/subagent-panel.tsx
#	apps/web/lib/subagent-runs.ts
#	apps/web/tsconfig.tsbuildinfo
2026-02-21 12:40:07 -08:00
kumarabhirup
7d762b2b75
web: refactor subagent-runs to use direct gateway subscription with interactive messaging 2026-02-21 12:32:21 -08:00
kumarabhirup
3ee2528b75
web: filter silent-reply tokens and remove subagent event routing from parent stream 2026-02-21 12:32:16 -08:00
kumarabhirup
a2845a321e
fix: type JSON.parse results to avoid Object.values unknown entries 2026-02-21 11:11:47 -08:00
kumarabhirup
9d8c384517
web: add waiting-for-subagents state and subscribe continuation in active-runs 2026-02-21 11:04:26 -08:00
kumarabhirup
6650287da2
fix: prefix unused key variable in activateGatewayFallback 2026-02-21 11:04:20 -08:00
kumarabhirup
f83731d3b5
web: replace gateway WS with subscribe-child streams in subagent-runs 2026-02-21 11:04:07 -08:00
kumarabhirup
a6dab967a2
web: add globalSeq to AgentEvent and spawnAgentSubscribeProcess helper 2026-02-21 11:04:01 -08:00
kumarabhirup
0f28afd59b
web: remove gateway-events.ts WebSocket module in favor of subscribe-child streams 2026-02-21 11:03:57 -08:00
kumarabhirup
76f06e0eaf
web: scope subagent storage to workspace profile
Subagent event JSONL files and rehydration metadata were stored in the
shared ~/.openclaw/web-chat/ directory regardless of the active workspace
profile, while parent chat sessions were correctly profile-scoped.

Move subagent event persistence into the profile-scoped web-chat dir
(web-chat-<profile>/subagent-events/) and add a profile-local
subagent-index.json for fast rehydration after page refresh. The shared
gateway registry (~/.openclaw/subagents/runs.json) remains the fallback
source. Existing events in the legacy shared path are still readable as
a migration fallback.
2026-02-20 13:37:46 -08:00
Mark
ca8ac9fda1 Revert "Merge kumar workspaces to design branch"
This reverts commit bf4445115b911fa7831e6a35f7d0114154bb58ec, reversing
changes made to face53f2341417e339c02d5d7d4c412b961f87f6.
2026-02-20 12:45:42 -08:00
Mark
bf4445115b Merge kumar workspaces to design branch 2026-02-20 12:04:56 -08:00
kumarabhirup
a0cc5834f2
web: persist subagent events to disk and support rehydration after refresh 2026-02-19 21:52:10 -08:00
kumarabhirup
f5c6fa186f
web: auto-create index entries for unindexed sessions in active-runs 2026-02-19 21:52:01 -08:00
kumarabhirup
8271c1ec12
web: add workspace registry for custom profile workspace paths 2026-02-19 21:51:49 -08:00
Mark
a0ba55feec Integrate file preview on the side 2026-02-19 17:46:54 -08:00
kumarabhirup
21f60da24d
🚀 RELEASE: Workspaces 2026-02-19 14:59:34 -08:00
kumarabhirup
b7baae188c
🚀 RELEASE: full table filter 2026-02-17 00:36:01 -08:00