Merge version-2.0 into develop - #160
Conversation
Run providers from a persistent CAPA workspace without modifying in-repo configs, with scoped symlink exclusions, GUI wait-until-close, and stop killing active wraps. Co-authored-by: Cursor <cursoragent@cursor.com>
Introduces a new detached process for the wrap command, allowing for better handling of interactive providers without console input conflicts. The wrap watcher runs in a separate process, ensuring that the main CLI can spawn the provider without interference. Additionally, updates to the launch process now utilize spawnSync for improved TTY handling and reliability. - Added `__wrap_watch__` command to start the wrap watcher. - Implemented `startDetachedWatchWorker` to manage the detached process. - Updated `launchProvider` to use spawnSync for CLI interactions. - Enhanced PID detection to include wrap watchers.
- Simplified the console output for the capabilities file update in the add command. - Introduced a `quiet` option in the install command to suppress UI output. - Updated the install command to manage the `quiet` flag state effectively. - Enhanced server management to conditionally log server status based on the `quiet` setting. - Adjusted the capabilities debounce time for improved performance during live re-apply operations.
…rker Walk ancestors for wrap markers, restore workspace entries if relink fails, and keep the detached watcher's poll timer referenced. Co-authored-by: Cursor <cursoragent@cursor.com>
Enhance CLI wrap functionality and streamline install options
Add project capability CRUD, registry browse, drag-and-drop section ordering, and file-watcher SSE so the UI and capabilities.yaml stay in sync. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve plugins on configure/GET so MCP servers appear after add, discover OAuth endpoints on connect, and surface Needs OAuth on the Tools section plus connect-first when listing tools. Co-authored-by: Cursor <cursoragent@cursor.com>
Declare capabilities filePath before the self-write grace path, and fetch remote skill URLs only over public HTTPS with DNS/private-IP checks, redirect limits, and size caps. Co-authored-by: Cursor <cursoragent@cursor.com>
feat(web-ui): interactive capabilities editor with live YAML sync
Add project FS browse/upload APIs, local AgentSnippet install support, and web UI flows to reference local paths plus manage agents.base and additional snippets. Co-authored-by: Cursor <cursoragent@cursor.com>
Hide Windows cmd flashes during wrap live re-apply, skip redundant PATH checks, and initialize subagent/rule edit forms when opened from the list. Co-authored-by: Cursor <cursoragent@cursor.com>
Clamp local agent paths with assertSafeRepoPath, allow editing local rules, check upload size before buffering, and refuse symlink escapes under .capa/imports. Co-authored-by: Cursor <cursoragent@cursor.com>
feat: local skills/rules from file + Agents section
When run inside a shadow workspace, use the wrap marker's realProjectPath so tool lookup matches the project registered at install. Co-authored-by: Cursor <cursoragent@cursor.com>
From wrap (or any cwd), upsert the real project and POST configure when shell-tools returns not configured/not found, then retry. Co-authored-by: Cursor <cursoragent@cursor.com>
Refuse install/sh identity under ~/.capa/workspaces, resolve wrap identity via marker or fail, and prune/filter shadow workspace duplicates from the project list. Co-authored-by: Cursor <cursoragent@cursor.com>
Use path.relative for workspaces containment (Windows case-safe) and refuse overwriting another project path when auto-configuring from capa sh. Co-authored-by: Cursor <cursoragent@cursor.com>
fix: capa sh / install identity in wrap shadow workspaces
capa init now upserts the project and configures the server so it appears in the UI before install/wrap. UI delete runs shared clean (stops wrap sessions, prunes workspaces, clears DB) while keeping the capabilities file. Co-authored-by: Cursor <cursoragent@cursor.com>
Use argv token path equality so /proj cannot kill /proj2 wraps; roll back newly inserted projects when configure fails; make wrap-session writes non-fatal; use async rm in clean/prune paths. Co-authored-by: Cursor <cursoragent@cursor.com>
feat: register projects on init and delete from UI
Allow capa add to write servers, tools, rules, and hooks into the capabilities file, and add --passthrough on add/install to materialize provider-native files without a capa server, proxy MCP entry, or managed DB tracking. Co-authored-by: Cursor <cursoragent@cursor.com>
Passthrough no longer deletes existing skill directories it does not own, and native MCP upsert fails closed when provider config JSON is invalid instead of clobbering the file. Co-authored-by: Cursor <cursoragent@cursor.com>
Passthrough previously skipped RegistryManager and fed skills-sh:… into parseSkillSource. Shared tryResolveRegistryItem now powers both managed and passthrough add paths. Co-authored-by: Cursor <cursoragent@cursor.com>
Use claude plugin install for Claude-exclusive plugins targeting Claude Code, and unpack under .capa/plugins only when wiring to providers without a native installer. Co-authored-by: Cursor <cursoragent@cursor.com>
feat: expand capa add kinds and add --passthrough mode
Split oversized server, CLI, provider, and web-ui files into focused modules with stable re-export shims, and keep local Cursor agent config out of git. Co-authored-by: Cursor <cursoragent@cursor.com>
Centralize validatePluginDef via assertValidPluginSource so GitLab and URL forms reject unsafe subpaths the same way GitHub shorthand already did. Co-authored-by: Cursor <cursoragent@cursor.com>
…er bugs. Keep one wrap workspace per project id and provider, skip lockfile rewrites when pins are unchanged, avoid wrap overwriting install providers, and clean subagent files from capabilities when providers are unset. Co-authored-by: Cursor <cursoragent@cursor.com>
Refactor large modules for readability
Tighten capa MCP dedup, stop activity history from wiping live/loadMore state, share run-boundary helpers and a single project EventSource, and extract wrap shadow extras for config sync + noise rule. Co-authored-by: Cursor <cursoragent@cursor.com>
feat: agent activity observability and wrap project isolation
Allow capa auth --access-token for github.com, gitlab.com, and self-hosted hosts so CI can authenticate without browser OAuth. Co-authored-by: Cursor <cursoragent@cursor.com>
Show github-enterprise/gitlab-self-managed in capa auth listing, and return after process.exit on token-auth errors so mocked exits do not close SQLite twice. Co-authored-by: Cursor <cursoragent@cursor.com>
feat(auth): support headless git auth via access tokens
Document wrap, Web UI, activity traces, plugins, registries, and passthrough in the README and keep capabilities-manager/bootstrap skills in sync. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
docs: refresh README and shipped skills for v2
Cold capa wrap install shared project identity with the real repo, so orphan hook/rule cleanup deleted Cursor configs via absolute managed paths. Scope prune and skill cleanup to the shadow workspace only. Co-authored-by: Cursor <cursoragent@cursor.com>
When wrap prune removes one provider's managed hook row, do not unlink ~/.capa/hooks/<projectId>/<hookId> if another kept provider row still references it. Co-authored-by: Cursor <cursoragent@cursor.com>
Skip all orphan prune/cleanup on wrap shadow installs, and exclude DB-stored plus on-disk provider dirs (e.g. .cursor) from the symlink tree so capa install -p cursor and capa wrap claude do not clobber each other. Co-authored-by: Cursor <cursoragent@cursor.com>
fix(wrap): never mutate the real project during shadow install
Reuse shared single-segment id checks for skills, rules, sub-agents, and plugins, and resolve writes under the provider directory. Also point docs links at /getting-started/introduction/ and clarify the project page subtitle. Co-authored-by: Cursor <cursoragent@cursor.com>
Surface provider token in/out and cache read/write from stop hooks, add kind icons and a fading highlight for new spans, and format million-scale token counts with M. Co-authored-by: Cursor <cursoragent@cursor.com>
Per-id removal timers so rapid event updates no longer cancel earlier highlight cleanups. Co-authored-by: Cursor <cursoragent@cursor.com>
Harden install path ids and polish activity run dialog
Canonicalize project paths for macOS symlink roots, resolve Windows plugin roots portably, and clear the TypeScript errors blocking lint. Co-authored-by: Cursor <cursoragent@cursor.com>
Code Review by Qodo
1.
|
PR Summary by QodoCAPA v2 merge: wrap shadow workspaces, web editor/observability, registries
AI Description
Diagram
High-Level Assessment
Files changed (72)
|
Write project imports via open/write without check-then-act races, and keep exception stacks out of HTTP responses. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep first-line Error.message without treating path phrases like 'at C:\...' as stack frames. Co-authored-by: Cursor <cursoragent@cursor.com>
Reject absolute/parent-segment manifest paths in collectFiles, and mirror workspace directory edits into the real project before relinking. Co-authored-by: Cursor <cursoragent@cursor.com>
Cursor's agent CLI is agent.cmd; spawn without a shell cannot find it, so enable shell on win32 for CLI wrap launches. Co-authored-by: Cursor <cursoragent@cursor.com>
On-disk provider detection only matches distinctive paths (.cursor, CLAUDE.md), so a project skills folder is still symlinked unless openclaw is listed in capabilities or the install DB. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
develop: interactive capabilities editor,capa wrapshadow workspaces for CLI agents, live project/agent activity observability, and Claude marketplace registries.capa add, headless git auth via access tokens, and hardened install destinations so wrap never mutates the real project.Test plan
capa init/capa install/capa cleanagainst a sample projectcapa wrapfor Cursor and Claude — shadow workspace only; real project untouchedcapa addwith and without--passthrough