91 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
f98fb75e81
test(web): cover workspace binary write API 2026-03-04 11:14:56 -08:00
kumarabhirup
da440735d4
feat(web): add workspace binary write API endpoint 2026-03-04 11:14:14 -08:00
kumarabhirup
9890cd9d71
test(web): add raw-file binary write route coverage 2026-03-04 11:09:10 -08:00
kumarabhirup
19dffeabd4
feat(web): add binary workspace file write endpoint 2026-03-04 11:08:35 -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
ad41e74205
fix(web): stabilize object table row ordering
Add deterministic entry ID tie-breakers to object entry sorting so rows with identical creation timestamps do not reorder across auto-refresh cycles.
2026-03-03 20:30:56 -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
70ca59a66d
refactor(web): show IDENTITY.md in workspace, filter managed skills, hide bootstrap toggle
IDENTITY.md is now user-editable (no longer a system file). Managed skill filter updated from dench to crm/browser. Bootstrap seed toggle hidden from create-workspace dialog.
2026-03-03 15:38:41 -08:00
kumarabhirup
1398e556a1
feat(api): register default agent in config on workspace switch
Call setDefaultAgentInConfig when switching workspaces so the gateway picks up the active workspace agent.
2026-03-03 15:38:07 -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
bf6a0abe48
refactor(api): deduplicate workspace init using shared workspace-seed
Remove ~200 lines of duplicated CRM seed objects, DuckDB seeding, and identity generation from the init route by importing from @repo/cli/workspace-seed.
2026-03-03 15:37:49 -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
974ba61b48
refactor(api): update workspace tree and virtual-file routes
Use workspace lib for path resolution.
2026-03-03 13:46:49 -08:00
kumarabhirup
6084381346
refactor(api): update workspace delete for workspace model
Use workspace lib helpers instead of profile-based paths.
2026-03-03 13:46:44 -08:00
kumarabhirup
4f0f7af622
refactor(api): update workspace init for workspace model
Use discoverWorkspaces, setUIActiveWorkspace, resolveWorkspaceDir; remove inline spawn logic.
2026-03-03 13:46:39 -08:00
kumarabhirup
9b505e9ae6
refactor(api): update profiles API for workspace model
Use discoverWorkspaces and getActiveWorkspaceName; keep backward-compat response fields.
2026-03-03 13:46:34 -08:00
kumarabhirup
232d6640ba
feat(api): add workspace list and switch API routes
New /api/workspace/list and /api/workspace/switch for workspace discovery and switching.
2026-03-03 13:46:30 -08:00
kumarabhirup
7309d649dd
test(web): add workspace file-ops, objects, and tree-browse tests 2026-03-02 18:34:41 -08:00
kumarabhirup
f23b7133cb
feat(web): improve suggest-files and tree route with better error handling 2026-03-02 18:34:34 -08:00
kumarabhirup
f3fffec97f
fix(web): guard system files in file write route and allow aborting waiting-for-subagents runs 2026-03-02 18:34:27 -08:00
kumarabhirup
67812f0de6
feat(web): add workspace delete API route 2026-03-02 18:34:19 -08:00
kumarabhirup
efbeacff54
test(web): update workspace init tests for new profile-based flow 2026-03-02 18:34:12 -08:00
kumarabhirup
3568779912
feat(web): overhaul workspace init with profile creation, onboarding, and port allocation 2026-03-02 18:34:06 -08:00
kumarabhirup
d8e2d455b8
test(web): update profiles API tests for gateway metadata and switch validation 2026-03-02 18:33:59 -08:00
kumarabhirup
d4a2e445ca
feat(web): harden profile switch with validation, existence check, and env override detection 2026-03-02 18:33:52 -08:00
kumarabhirup
6f6b841d92
feat(web): enrich profiles API with gateway metadata 2026-03-02 18:33:44 -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
9ca4263147
👌 IMPROVE: discord fix 2026-02-24 17:20:34 -05: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
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
6665bf4a71
refactor: simplify web session management by removing unused functions and adding DELETE and PATCH endpoints
- Removed unused functions related to session index management.
- Added DELETE endpoint to remove a web chat session and its associated file.
- Added PATCH endpoint to update session metadata, including renaming sessions.
- Streamlined file writing for new session creation.
2026-02-21 15:17:10 -08:00
kumarabhirup
c8ae7acbf4
fix: restore remaining merge regressions (SKILL.md, MIME types, showHidden, symlink, activeProfileHint) 2026-02-21 14:39:55 -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
7cdcf61639
web: support subagent sessions in chat and stop API routes 2026-02-21 12:32:37 -08:00
kumarabhirup
54d048bfb9
web: merge subagent-stream into unified stream route 2026-02-21 12:32:32 -08:00
kumarabhirup
a2845a321e
fix: type JSON.parse results to avoid Object.values unknown entries 2026-02-21 11:11:47 -08:00
kumarabhirup
9c3c339f48
fix: prefix unused watcherReady with underscore 2026-02-21 11:04:43 -08:00
kumarabhirup
149dfb7d50
web: add SSE keepalive and waiting-for-subagents header in stream route 2026-02-21 11:04:32 -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
436a07c3c8
web: add HTML viewer with rendered preview and code modes 2026-02-20 00:42:49 -08:00